Import nats.c_3.4.1.orig.tar.gz
authorVictor Seva <vseva@debian.org>
Tue, 25 Oct 2022 22:37:32 +0000 (23:37 +0100)
committerVictor Seva <vseva@debian.org>
Tue, 25 Oct 2022 22:37:32 +0000 (23:37 +0100)
[dgit import orig nats.c_3.4.1.orig.tar.gz]

643 files changed:
.gitignore [new file with mode: 0644]
.gitmodules [new file with mode: 0644]
.travis.yml [new file with mode: 0644]
CMakeLists.txt [new file with mode: 0644]
CODE-OF-CONDUCT.md [new file with mode: 0644]
GOVERNANCE.md [new file with mode: 0644]
LICENSE [new file with mode: 0644]
MAINTAINERS.md [new file with mode: 0644]
README.md [new file with mode: 0644]
buildOnTravis.sh [new file with mode: 0755]
dependencies.md [new file with mode: 0644]
doc/DoxyFile.NATS.Client [new file with mode: 0644]
doc/DoxyFile.NATS.Client.bak [new file with mode: 0644]
doc/DoxyFile.NATS.Client.in [new file with mode: 0644]
doc/customdoxygen.css [new file with mode: 0755]
doc/footer.html [new file with mode: 0755]
doc/header.html [new file with mode: 0755]
doc/html/annotated.html [new file with mode: 0644]
doc/html/annotated_dup.js [new file with mode: 0644]
doc/html/arrowdown.png [new file with mode: 0644]
doc/html/arrowright.png [new file with mode: 0644]
doc/html/bc_s.png [new file with mode: 0644]
doc/html/bc_sd.png [new file with mode: 0644]
doc/html/bdwn.png [new file with mode: 0644]
doc/html/classes.html [new file with mode: 0644]
doc/html/closed.png [new file with mode: 0644]
doc/html/customdoxygen.css [new file with mode: 0644]
doc/html/deprecated.html [new file with mode: 0644]
doc/html/dir_085924db4bed469054a9264cf96b0d5e.html [new file with mode: 0644]
doc/html/dir_085924db4bed469054a9264cf96b0d5e.js [new file with mode: 0644]
doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html [new file with mode: 0644]
doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.js [new file with mode: 0644]
doc/html/doc.png [new file with mode: 0644]
doc/html/docd.png [new file with mode: 0644]
doc/html/doxygen.png [new file with mode: 0644]
doc/html/doxygen.svg [new file with mode: 0644]
doc/html/dynsections.js [new file with mode: 0644]
doc/html/files.html [new file with mode: 0644]
doc/html/files.js [new file with mode: 0644]
doc/html/files_dup.js [new file with mode: 0644]
doc/html/folderclosed.png [new file with mode: 0644]
doc/html/folderopen.png [new file with mode: 0644]
doc/html/functions.html [new file with mode: 0644]
doc/html/functions_b.html [new file with mode: 0644]
doc/html/functions_c.html [new file with mode: 0644]
doc/html/functions_d.html [new file with mode: 0644]
doc/html/functions_dup.js [new file with mode: 0644]
doc/html/functions_e.html [new file with mode: 0644]
doc/html/functions_f.html [new file with mode: 0644]
doc/html/functions_h.html [new file with mode: 0644]
doc/html/functions_i.html [new file with mode: 0644]
doc/html/functions_k.html [new file with mode: 0644]
doc/html/functions_l.html [new file with mode: 0644]
doc/html/functions_m.html [new file with mode: 0644]
doc/html/functions_n.html [new file with mode: 0644]
doc/html/functions_o.html [new file with mode: 0644]
doc/html/functions_p.html [new file with mode: 0644]
doc/html/functions_q.html [new file with mode: 0644]
doc/html/functions_r.html [new file with mode: 0644]
doc/html/functions_s.html [new file with mode: 0644]
doc/html/functions_t.html [new file with mode: 0644]
doc/html/functions_vars.html [new file with mode: 0644]
doc/html/functions_vars.js [new file with mode: 0644]
doc/html/functions_vars_b.html [new file with mode: 0644]
doc/html/functions_vars_c.html [new file with mode: 0644]
doc/html/functions_vars_d.html [new file with mode: 0644]
doc/html/functions_vars_e.html [new file with mode: 0644]
doc/html/functions_vars_f.html [new file with mode: 0644]
doc/html/functions_vars_h.html [new file with mode: 0644]
doc/html/functions_vars_i.html [new file with mode: 0644]
doc/html/functions_vars_k.html [new file with mode: 0644]
doc/html/functions_vars_l.html [new file with mode: 0644]
doc/html/functions_vars_m.html [new file with mode: 0644]
doc/html/functions_vars_n.html [new file with mode: 0644]
doc/html/functions_vars_o.html [new file with mode: 0644]
doc/html/functions_vars_p.html [new file with mode: 0644]
doc/html/functions_vars_q.html [new file with mode: 0644]
doc/html/functions_vars_r.html [new file with mode: 0644]
doc/html/functions_vars_s.html [new file with mode: 0644]
doc/html/functions_vars_t.html [new file with mode: 0644]
doc/html/functions_vars_w.html [new file with mode: 0644]
doc/html/functions_w.html [new file with mode: 0644]
doc/html/globals.html [new file with mode: 0644]
doc/html/globals_d.html [new file with mode: 0644]
doc/html/globals_defs.html [new file with mode: 0644]
doc/html/globals_dup.js [new file with mode: 0644]
doc/html/globals_enum.html [new file with mode: 0644]
doc/html/globals_eval.html [new file with mode: 0644]
doc/html/globals_func.html [new file with mode: 0644]
doc/html/globals_func.js [new file with mode: 0644]
doc/html/globals_func_k.html [new file with mode: 0644]
doc/html/globals_func_n.html [new file with mode: 0644]
doc/html/globals_func_s.html [new file with mode: 0644]
doc/html/globals_k.html [new file with mode: 0644]
doc/html/globals_n.html [new file with mode: 0644]
doc/html/globals_r.html [new file with mode: 0644]
doc/html/globals_s.html [new file with mode: 0644]
doc/html/globals_type.html [new file with mode: 0644]
doc/html/group__callbacks_group.html [new file with mode: 0644]
doc/html/group__callbacks_group.js [new file with mode: 0644]
doc/html/group__conn_group.html [new file with mode: 0644]
doc/html/group__conn_group.js [new file with mode: 0644]
doc/html/group__conn_mgt_group.html [new file with mode: 0644]
doc/html/group__conn_mgt_group.js [new file with mode: 0644]
doc/html/group__conn_pub_group.html [new file with mode: 0644]
doc/html/group__conn_pub_group.js [new file with mode: 0644]
doc/html/group__conn_sub_group.html [new file with mode: 0644]
doc/html/group__conn_sub_group.js [new file with mode: 0644]
doc/html/group__env_variables_group.html [new file with mode: 0644]
doc/html/group__func_group.html [new file with mode: 0644]
doc/html/group__func_group.js [new file with mode: 0644]
doc/html/group__inbox_group.html [new file with mode: 0644]
doc/html/group__inbox_group.js [new file with mode: 0644]
doc/html/group__js_assets_group.html [new file with mode: 0644]
doc/html/group__js_assets_group.js [new file with mode: 0644]
doc/html/group__js_group.html [new file with mode: 0644]
doc/html/group__js_group.js [new file with mode: 0644]
doc/html/group__js_msg.html [new file with mode: 0644]
doc/html/group__js_msg.js [new file with mode: 0644]
doc/html/group__js_pub_group.html [new file with mode: 0644]
doc/html/group__js_pub_group.js [new file with mode: 0644]
doc/html/group__js_sub_group.html [new file with mode: 0644]
doc/html/group__js_sub_group.js [new file with mode: 0644]
doc/html/group__kv_entry.html [new file with mode: 0644]
doc/html/group__kv_entry.js [new file with mode: 0644]
doc/html/group__kv_group.html [new file with mode: 0644]
doc/html/group__kv_group.js [new file with mode: 0644]
doc/html/group__kv_group_mgt.html [new file with mode: 0644]
doc/html/group__kv_group_mgt.js [new file with mode: 0644]
doc/html/group__kv_status.html [new file with mode: 0644]
doc/html/group__kv_status.js [new file with mode: 0644]
doc/html/group__kv_watcher.html [new file with mode: 0644]
doc/html/group__kv_watcher.js [new file with mode: 0644]
doc/html/group__libevent_functions.html [new file with mode: 0644]
doc/html/group__libevent_functions.js [new file with mode: 0644]
doc/html/group__library_group.html [new file with mode: 0644]
doc/html/group__library_group.js [new file with mode: 0644]
doc/html/group__libuv_functions.html [new file with mode: 0644]
doc/html/group__libuv_functions.js [new file with mode: 0644]
doc/html/group__msg_group.html [new file with mode: 0644]
doc/html/group__msg_group.js [new file with mode: 0644]
doc/html/group__opts_group.html [new file with mode: 0644]
doc/html/group__opts_group.js [new file with mode: 0644]
doc/html/group__stan_conn_group.html [new file with mode: 0644]
doc/html/group__stan_conn_group.js [new file with mode: 0644]
doc/html/group__stan_conn_mgt_group.html [new file with mode: 0644]
doc/html/group__stan_conn_mgt_group.js [new file with mode: 0644]
doc/html/group__stan_conn_opts_group.html [new file with mode: 0644]
doc/html/group__stan_conn_opts_group.js [new file with mode: 0644]
doc/html/group__stan_conn_pub_group.html [new file with mode: 0644]
doc/html/group__stan_conn_pub_group.js [new file with mode: 0644]
doc/html/group__stan_conn_sub_group.html [new file with mode: 0644]
doc/html/group__stan_conn_sub_group.js [new file with mode: 0644]
doc/html/group__stan_msg_group.html [new file with mode: 0644]
doc/html/group__stan_msg_group.js [new file with mode: 0644]
doc/html/group__stan_sub_group.html [new file with mode: 0644]
doc/html/group__stan_sub_group.js [new file with mode: 0644]
doc/html/group__stan_sub_opts_group.html [new file with mode: 0644]
doc/html/group__stan_sub_opts_group.js [new file with mode: 0644]
doc/html/group__stats_group.html [new file with mode: 0644]
doc/html/group__stats_group.js [new file with mode: 0644]
doc/html/group__status_group.html [new file with mode: 0644]
doc/html/group__status_group.js [new file with mode: 0644]
doc/html/group__sub_group.html [new file with mode: 0644]
doc/html/group__sub_group.js [new file with mode: 0644]
doc/html/group__types_group.html [new file with mode: 0644]
doc/html/group__types_group.js [new file with mode: 0644]
doc/html/group__wildcards_group.html [new file with mode: 0644]
doc/html/index.html [new file with mode: 0644]
doc/html/jquery.js [new file with mode: 0644]
doc/html/libevent_8h.html [new file with mode: 0644]
doc/html/libevent_8h.js [new file with mode: 0644]
doc/html/libevent_8h_source.html [new file with mode: 0644]
doc/html/libuv_8h.html [new file with mode: 0644]
doc/html/libuv_8h.js [new file with mode: 0644]
doc/html/libuv_8h_source.html [new file with mode: 0644]
doc/html/menu.js [new file with mode: 0644]
doc/html/menudata.js [new file with mode: 0644]
doc/html/modules.html [new file with mode: 0644]
doc/html/modules.js [new file with mode: 0644]
doc/html/nats_8h.html [new file with mode: 0644]
doc/html/nats_8h.js [new file with mode: 0644]
doc/html/nats_8h_source.html [new file with mode: 0644]
doc/html/nav_f.png [new file with mode: 0644]
doc/html/nav_fd.png [new file with mode: 0644]
doc/html/nav_g.png [new file with mode: 0644]
doc/html/nav_h.png [new file with mode: 0644]
doc/html/nav_hd.png [new file with mode: 0644]
doc/html/navtree.css [new file with mode: 0644]
doc/html/navtree.js [new file with mode: 0644]
doc/html/navtreedata.js [new file with mode: 0644]
doc/html/navtreeindex0.js [new file with mode: 0644]
doc/html/navtreeindex1.js [new file with mode: 0644]
doc/html/navtreeindex2.js [new file with mode: 0644]
doc/html/navtreeindex3.js [new file with mode: 0644]
doc/html/navtreeindex4.js [new file with mode: 0644]
doc/html/open.png [new file with mode: 0644]
doc/html/pages.html [new file with mode: 0644]
doc/html/resize.js [new file with mode: 0644]
doc/html/search/all_0.html [new file with mode: 0644]
doc/html/search/all_0.js [new file with mode: 0644]
doc/html/search/all_1.html [new file with mode: 0644]
doc/html/search/all_1.js [new file with mode: 0644]
doc/html/search/all_10.html [new file with mode: 0644]
doc/html/search/all_10.js [new file with mode: 0644]
doc/html/search/all_11.html [new file with mode: 0644]
doc/html/search/all_11.js [new file with mode: 0644]
doc/html/search/all_12.html [new file with mode: 0644]
doc/html/search/all_12.js [new file with mode: 0644]
doc/html/search/all_13.html [new file with mode: 0644]
doc/html/search/all_13.js [new file with mode: 0644]
doc/html/search/all_14.html [new file with mode: 0644]
doc/html/search/all_14.js [new file with mode: 0644]
doc/html/search/all_2.html [new file with mode: 0644]
doc/html/search/all_2.js [new file with mode: 0644]
doc/html/search/all_3.html [new file with mode: 0644]
doc/html/search/all_3.js [new file with mode: 0644]
doc/html/search/all_4.html [new file with mode: 0644]
doc/html/search/all_4.js [new file with mode: 0644]
doc/html/search/all_5.html [new file with mode: 0644]
doc/html/search/all_5.js [new file with mode: 0644]
doc/html/search/all_6.html [new file with mode: 0644]
doc/html/search/all_6.js [new file with mode: 0644]
doc/html/search/all_7.html [new file with mode: 0644]
doc/html/search/all_7.js [new file with mode: 0644]
doc/html/search/all_8.html [new file with mode: 0644]
doc/html/search/all_8.js [new file with mode: 0644]
doc/html/search/all_9.html [new file with mode: 0644]
doc/html/search/all_9.js [new file with mode: 0644]
doc/html/search/all_a.html [new file with mode: 0644]
doc/html/search/all_a.js [new file with mode: 0644]
doc/html/search/all_b.html [new file with mode: 0644]
doc/html/search/all_b.js [new file with mode: 0644]
doc/html/search/all_c.html [new file with mode: 0644]
doc/html/search/all_c.js [new file with mode: 0644]
doc/html/search/all_d.html [new file with mode: 0644]
doc/html/search/all_d.js [new file with mode: 0644]
doc/html/search/all_e.html [new file with mode: 0644]
doc/html/search/all_e.js [new file with mode: 0644]
doc/html/search/all_f.html [new file with mode: 0644]
doc/html/search/all_f.js [new file with mode: 0644]
doc/html/search/classes_0.html [new file with mode: 0644]
doc/html/search/classes_0.js [new file with mode: 0644]
doc/html/search/classes_1.html [new file with mode: 0644]
doc/html/search/classes_1.js [new file with mode: 0644]
doc/html/search/classes_2.html [new file with mode: 0644]
doc/html/search/classes_2.js [new file with mode: 0644]
doc/html/search/close.png [new file with mode: 0644]
doc/html/search/close.svg [new file with mode: 0644]
doc/html/search/defines_0.html [new file with mode: 0644]
doc/html/search/defines_0.js [new file with mode: 0644]
doc/html/search/defines_1.html [new file with mode: 0644]
doc/html/search/defines_1.js [new file with mode: 0644]
doc/html/search/enums_0.html [new file with mode: 0644]
doc/html/search/enums_0.js [new file with mode: 0644]
doc/html/search/enums_1.html [new file with mode: 0644]
doc/html/search/enums_1.js [new file with mode: 0644]
doc/html/search/enums_2.html [new file with mode: 0644]
doc/html/search/enums_2.js [new file with mode: 0644]
doc/html/search/enumvalues_0.html [new file with mode: 0644]
doc/html/search/enumvalues_0.js [new file with mode: 0644]
doc/html/search/enumvalues_1.html [new file with mode: 0644]
doc/html/search/enumvalues_1.js [new file with mode: 0644]
doc/html/search/enumvalues_2.html [new file with mode: 0644]
doc/html/search/enumvalues_2.js [new file with mode: 0644]
doc/html/search/enumvalues_3.html [new file with mode: 0644]
doc/html/search/enumvalues_3.js [new file with mode: 0644]
doc/html/search/files_0.html [new file with mode: 0644]
doc/html/search/files_0.js [new file with mode: 0644]
doc/html/search/files_1.html [new file with mode: 0644]
doc/html/search/files_1.js [new file with mode: 0644]
doc/html/search/files_2.html [new file with mode: 0644]
doc/html/search/files_2.js [new file with mode: 0644]
doc/html/search/functions_0.html [new file with mode: 0644]
doc/html/search/functions_0.js [new file with mode: 0644]
doc/html/search/functions_1.html [new file with mode: 0644]
doc/html/search/functions_1.js [new file with mode: 0644]
doc/html/search/functions_2.html [new file with mode: 0644]
doc/html/search/functions_2.js [new file with mode: 0644]
doc/html/search/functions_3.html [new file with mode: 0644]
doc/html/search/functions_3.js [new file with mode: 0644]
doc/html/search/groups_0.html [new file with mode: 0644]
doc/html/search/groups_0.js [new file with mode: 0644]
doc/html/search/groups_1.html [new file with mode: 0644]
doc/html/search/groups_1.js [new file with mode: 0644]
doc/html/search/groups_2.html [new file with mode: 0644]
doc/html/search/groups_2.js [new file with mode: 0644]
doc/html/search/groups_3.html [new file with mode: 0644]
doc/html/search/groups_3.js [new file with mode: 0644]
doc/html/search/groups_4.html [new file with mode: 0644]
doc/html/search/groups_4.js [new file with mode: 0644]
doc/html/search/groups_5.html [new file with mode: 0644]
doc/html/search/groups_5.js [new file with mode: 0644]
doc/html/search/groups_6.html [new file with mode: 0644]
doc/html/search/groups_6.js [new file with mode: 0644]
doc/html/search/groups_7.html [new file with mode: 0644]
doc/html/search/groups_7.js [new file with mode: 0644]
doc/html/search/groups_8.html [new file with mode: 0644]
doc/html/search/groups_8.js [new file with mode: 0644]
doc/html/search/groups_9.html [new file with mode: 0644]
doc/html/search/groups_9.js [new file with mode: 0644]
doc/html/search/groups_a.html [new file with mode: 0644]
doc/html/search/groups_a.js [new file with mode: 0644]
doc/html/search/groups_b.html [new file with mode: 0644]
doc/html/search/groups_b.js [new file with mode: 0644]
doc/html/search/groups_c.html [new file with mode: 0644]
doc/html/search/groups_c.js [new file with mode: 0644]
doc/html/search/mag.svg [new file with mode: 0644]
doc/html/search/mag_d.svg [new file with mode: 0644]
doc/html/search/mag_sel.png [new file with mode: 0644]
doc/html/search/mag_sel.svg [new file with mode: 0644]
doc/html/search/mag_seld.svg [new file with mode: 0644]
doc/html/search/nomatches.html [new file with mode: 0644]
doc/html/search/pages_0.html [new file with mode: 0644]
doc/html/search/pages_0.js [new file with mode: 0644]
doc/html/search/pages_1.html [new file with mode: 0644]
doc/html/search/pages_1.js [new file with mode: 0644]
doc/html/search/search.css [new file with mode: 0644]
doc/html/search/search.js [new file with mode: 0644]
doc/html/search/search_l.png [new file with mode: 0644]
doc/html/search/search_m.png [new file with mode: 0644]
doc/html/search/search_r.png [new file with mode: 0644]
doc/html/search/searchdata.js [new file with mode: 0644]
doc/html/search/typedefs_0.html [new file with mode: 0644]
doc/html/search/typedefs_0.js [new file with mode: 0644]
doc/html/search/typedefs_1.html [new file with mode: 0644]
doc/html/search/typedefs_1.js [new file with mode: 0644]
doc/html/search/typedefs_2.html [new file with mode: 0644]
doc/html/search/typedefs_2.js [new file with mode: 0644]
doc/html/search/typedefs_3.html [new file with mode: 0644]
doc/html/search/typedefs_3.js [new file with mode: 0644]
doc/html/search/variables_0.html [new file with mode: 0644]
doc/html/search/variables_0.js [new file with mode: 0644]
doc/html/search/variables_1.html [new file with mode: 0644]
doc/html/search/variables_1.js [new file with mode: 0644]
doc/html/search/variables_10.html [new file with mode: 0644]
doc/html/search/variables_10.js [new file with mode: 0644]
doc/html/search/variables_11.html [new file with mode: 0644]
doc/html/search/variables_11.js [new file with mode: 0644]
doc/html/search/variables_12.html [new file with mode: 0644]
doc/html/search/variables_12.js [new file with mode: 0644]
doc/html/search/variables_2.html [new file with mode: 0644]
doc/html/search/variables_2.js [new file with mode: 0644]
doc/html/search/variables_3.html [new file with mode: 0644]
doc/html/search/variables_3.js [new file with mode: 0644]
doc/html/search/variables_4.html [new file with mode: 0644]
doc/html/search/variables_4.js [new file with mode: 0644]
doc/html/search/variables_5.html [new file with mode: 0644]
doc/html/search/variables_5.js [new file with mode: 0644]
doc/html/search/variables_6.html [new file with mode: 0644]
doc/html/search/variables_6.js [new file with mode: 0644]
doc/html/search/variables_7.html [new file with mode: 0644]
doc/html/search/variables_7.js [new file with mode: 0644]
doc/html/search/variables_8.html [new file with mode: 0644]
doc/html/search/variables_8.js [new file with mode: 0644]
doc/html/search/variables_9.html [new file with mode: 0644]
doc/html/search/variables_9.js [new file with mode: 0644]
doc/html/search/variables_a.html [new file with mode: 0644]
doc/html/search/variables_a.js [new file with mode: 0644]
doc/html/search/variables_b.html [new file with mode: 0644]
doc/html/search/variables_b.js [new file with mode: 0644]
doc/html/search/variables_c.html [new file with mode: 0644]
doc/html/search/variables_c.js [new file with mode: 0644]
doc/html/search/variables_d.html [new file with mode: 0644]
doc/html/search/variables_d.js [new file with mode: 0644]
doc/html/search/variables_e.html [new file with mode: 0644]
doc/html/search/variables_e.js [new file with mode: 0644]
doc/html/search/variables_f.html [new file with mode: 0644]
doc/html/search/variables_f.js [new file with mode: 0644]
doc/html/splitbar.png [new file with mode: 0644]
doc/html/splitbard.png [new file with mode: 0644]
doc/html/status_8h.html [new file with mode: 0644]
doc/html/status_8h.js [new file with mode: 0644]
doc/html/status_8h_source.html [new file with mode: 0644]
doc/html/structjs_a_p_i_stats-members.html [new file with mode: 0644]
doc/html/structjs_a_p_i_stats.html [new file with mode: 0644]
doc/html/structjs_a_p_i_stats.js [new file with mode: 0644]
doc/html/structjs_account_info-members.html [new file with mode: 0644]
doc/html/structjs_account_info.html [new file with mode: 0644]
doc/html/structjs_account_info.js [new file with mode: 0644]
doc/html/structjs_account_limits-members.html [new file with mode: 0644]
doc/html/structjs_account_limits.html [new file with mode: 0644]
doc/html/structjs_account_limits.js [new file with mode: 0644]
doc/html/structjs_cluster_info-members.html [new file with mode: 0644]
doc/html/structjs_cluster_info.html [new file with mode: 0644]
doc/html/structjs_cluster_info.js [new file with mode: 0644]
doc/html/structjs_consumer_config-members.html [new file with mode: 0644]
doc/html/structjs_consumer_config.html [new file with mode: 0644]
doc/html/structjs_consumer_config.js [new file with mode: 0644]
doc/html/structjs_consumer_info-members.html [new file with mode: 0644]
doc/html/structjs_consumer_info.html [new file with mode: 0644]
doc/html/structjs_consumer_info.js [new file with mode: 0644]
doc/html/structjs_consumer_info_list-members.html [new file with mode: 0644]
doc/html/structjs_consumer_info_list.html [new file with mode: 0644]
doc/html/structjs_consumer_info_list.js [new file with mode: 0644]
doc/html/structjs_consumer_names_list-members.html [new file with mode: 0644]
doc/html/structjs_consumer_names_list.html [new file with mode: 0644]
doc/html/structjs_consumer_names_list.js [new file with mode: 0644]
doc/html/structjs_consumer_sequence_mismatch-members.html [new file with mode: 0644]
doc/html/structjs_consumer_sequence_mismatch.html [new file with mode: 0644]
doc/html/structjs_consumer_sequence_mismatch.js [new file with mode: 0644]
doc/html/structjs_direct_get_msg_options-members.html [new file with mode: 0644]
doc/html/structjs_direct_get_msg_options.html [new file with mode: 0644]
doc/html/structjs_direct_get_msg_options.js [new file with mode: 0644]
doc/html/structjs_external_stream-members.html [new file with mode: 0644]
doc/html/structjs_external_stream.html [new file with mode: 0644]
doc/html/structjs_external_stream.js [new file with mode: 0644]
doc/html/structjs_fetch_request-members.html [new file with mode: 0644]
doc/html/structjs_fetch_request.html [new file with mode: 0644]
doc/html/structjs_fetch_request.js [new file with mode: 0644]
doc/html/structjs_lost_stream_data-members.html [new file with mode: 0644]
doc/html/structjs_lost_stream_data.html [new file with mode: 0644]
doc/html/structjs_lost_stream_data.js [new file with mode: 0644]
doc/html/structjs_msg_meta_data-members.html [new file with mode: 0644]
doc/html/structjs_msg_meta_data.html [new file with mode: 0644]
doc/html/structjs_msg_meta_data.js [new file with mode: 0644]
doc/html/structjs_options-members.html [new file with mode: 0644]
doc/html/structjs_options.html [new file with mode: 0644]
doc/html/structjs_options.js [new file with mode: 0644]
doc/html/structjs_options_1_1js_options_publish_async-members.html [new file with mode: 0644]
doc/html/structjs_options_1_1js_options_publish_async.html [new file with mode: 0644]
doc/html/structjs_options_1_1js_options_publish_async.js [new file with mode: 0644]
doc/html/structjs_options_1_1js_options_stream-members.html [new file with mode: 0644]
doc/html/structjs_options_1_1js_options_stream.html [new file with mode: 0644]
doc/html/structjs_options_1_1js_options_stream.js [new file with mode: 0644]
doc/html/structjs_options_1_1js_options_stream_1_1js_options_stream_info-members.html [new file with mode: 0644]
doc/html/structjs_options_1_1js_options_stream_1_1js_options_stream_info.html [new file with mode: 0644]
doc/html/structjs_options_1_1js_options_stream_1_1js_options_stream_info.js [new file with mode: 0644]
doc/html/structjs_options_1_1js_options_stream_1_1js_options_stream_purge-members.html [new file with mode: 0644]
doc/html/structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html [new file with mode: 0644]
doc/html/structjs_options_1_1js_options_stream_1_1js_options_stream_purge.js [new file with mode: 0644]
doc/html/structjs_peer_info-members.html [new file with mode: 0644]
doc/html/structjs_peer_info.html [new file with mode: 0644]
doc/html/structjs_peer_info.js [new file with mode: 0644]
doc/html/structjs_placement-members.html [new file with mode: 0644]
doc/html/structjs_placement.html [new file with mode: 0644]
doc/html/structjs_placement.js [new file with mode: 0644]
doc/html/structjs_pub_ack-members.html [new file with mode: 0644]
doc/html/structjs_pub_ack.html [new file with mode: 0644]
doc/html/structjs_pub_ack.js [new file with mode: 0644]
doc/html/structjs_pub_ack_err-members.html [new file with mode: 0644]
doc/html/structjs_pub_ack_err.html [new file with mode: 0644]
doc/html/structjs_pub_ack_err.js [new file with mode: 0644]
doc/html/structjs_pub_options-members.html [new file with mode: 0644]
doc/html/structjs_pub_options.html [new file with mode: 0644]
doc/html/structjs_pub_options.js [new file with mode: 0644]
doc/html/structjs_re_publish-members.html [new file with mode: 0644]
doc/html/structjs_re_publish.html [new file with mode: 0644]
doc/html/structjs_re_publish.js [new file with mode: 0644]
doc/html/structjs_sequence_info-members.html [new file with mode: 0644]
doc/html/structjs_sequence_info.html [new file with mode: 0644]
doc/html/structjs_sequence_info.js [new file with mode: 0644]
doc/html/structjs_sequence_pair-members.html [new file with mode: 0644]
doc/html/structjs_sequence_pair.html [new file with mode: 0644]
doc/html/structjs_sequence_pair.js [new file with mode: 0644]
doc/html/structjs_stream_config-members.html [new file with mode: 0644]
doc/html/structjs_stream_config.html [new file with mode: 0644]
doc/html/structjs_stream_config.js [new file with mode: 0644]
doc/html/structjs_stream_info-members.html [new file with mode: 0644]
doc/html/structjs_stream_info.html [new file with mode: 0644]
doc/html/structjs_stream_info.js [new file with mode: 0644]
doc/html/structjs_stream_info_list-members.html [new file with mode: 0644]
doc/html/structjs_stream_info_list.html [new file with mode: 0644]
doc/html/structjs_stream_info_list.js [new file with mode: 0644]
doc/html/structjs_stream_names_list-members.html [new file with mode: 0644]
doc/html/structjs_stream_names_list.html [new file with mode: 0644]
doc/html/structjs_stream_names_list.js [new file with mode: 0644]
doc/html/structjs_stream_source-members.html [new file with mode: 0644]
doc/html/structjs_stream_source.html [new file with mode: 0644]
doc/html/structjs_stream_source.js [new file with mode: 0644]
doc/html/structjs_stream_source_info-members.html [new file with mode: 0644]
doc/html/structjs_stream_source_info.html [new file with mode: 0644]
doc/html/structjs_stream_source_info.js [new file with mode: 0644]
doc/html/structjs_stream_state-members.html [new file with mode: 0644]
doc/html/structjs_stream_state.html [new file with mode: 0644]
doc/html/structjs_stream_state.js [new file with mode: 0644]
doc/html/structjs_stream_state_subject-members.html [new file with mode: 0644]
doc/html/structjs_stream_state_subject.html [new file with mode: 0644]
doc/html/structjs_stream_state_subject.js [new file with mode: 0644]
doc/html/structjs_stream_state_subjects-members.html [new file with mode: 0644]
doc/html/structjs_stream_state_subjects.html [new file with mode: 0644]
doc/html/structjs_stream_state_subjects.js [new file with mode: 0644]
doc/html/structjs_sub_options-members.html [new file with mode: 0644]
doc/html/structjs_sub_options.html [new file with mode: 0644]
doc/html/structjs_sub_options.js [new file with mode: 0644]
doc/html/structjs_tier-members.html [new file with mode: 0644]
doc/html/structjs_tier.html [new file with mode: 0644]
doc/html/structjs_tier.js [new file with mode: 0644]
doc/html/structkv_config-members.html [new file with mode: 0644]
doc/html/structkv_config.html [new file with mode: 0644]
doc/html/structkv_config.js [new file with mode: 0644]
doc/html/structkv_entry_list-members.html [new file with mode: 0644]
doc/html/structkv_entry_list.html [new file with mode: 0644]
doc/html/structkv_entry_list.js [new file with mode: 0644]
doc/html/structkv_keys_list-members.html [new file with mode: 0644]
doc/html/structkv_keys_list.html [new file with mode: 0644]
doc/html/structkv_keys_list.js [new file with mode: 0644]
doc/html/structkv_purge_options-members.html [new file with mode: 0644]
doc/html/structkv_purge_options.html [new file with mode: 0644]
doc/html/structkv_purge_options.js [new file with mode: 0644]
doc/html/structkv_watch_options-members.html [new file with mode: 0644]
doc/html/structkv_watch_options.html [new file with mode: 0644]
doc/html/structkv_watch_options.js [new file with mode: 0644]
doc/html/structnats_msg_list-members.html [new file with mode: 0644]
doc/html/structnats_msg_list.html [new file with mode: 0644]
doc/html/structnats_msg_list.js [new file with mode: 0644]
doc/html/sync_off.png [new file with mode: 0644]
doc/html/sync_on.png [new file with mode: 0644]
doc/html/tab_a.png [new file with mode: 0644]
doc/html/tab_ad.png [new file with mode: 0644]
doc/html/tab_b.png [new file with mode: 0644]
doc/html/tab_bd.png [new file with mode: 0644]
doc/html/tab_h.png [new file with mode: 0644]
doc/html/tab_hd.png [new file with mode: 0644]
doc/html/tab_s.png [new file with mode: 0644]
doc/html/tab_sd.png [new file with mode: 0644]
doc/html/tabs.css [new file with mode: 0644]
examples/CMakeLists.txt [new file with mode: 0644]
examples/asynctimeout.c [new file with mode: 0644]
examples/connect.c [new file with mode: 0644]
examples/examples.h [new file with mode: 0644]
examples/getstarted/CMakeLists.txt [new file with mode: 0644]
examples/getstarted/asyncsub.c [new file with mode: 0644]
examples/getstarted/headers.c [new file with mode: 0644]
examples/getstarted/pubbytes.c [new file with mode: 0644]
examples/getstarted/pubmsg.c [new file with mode: 0644]
examples/getstarted/pubstr.c [new file with mode: 0644]
examples/getstarted/replier.c [new file with mode: 0644]
examples/getstarted/requestor.c [new file with mode: 0644]
examples/getstarted/syncsub.c [new file with mode: 0644]
examples/js-pub.c [new file with mode: 0644]
examples/js-sub.c [new file with mode: 0644]
examples/libevent-pub.c [new file with mode: 0644]
examples/libevent-sub.c [new file with mode: 0644]
examples/libuv-pub.c [new file with mode: 0644]
examples/libuv-sub.c [new file with mode: 0644]
examples/publisher.c [new file with mode: 0644]
examples/queuegroup.c [new file with mode: 0644]
examples/replier.c [new file with mode: 0644]
examples/requestor.c [new file with mode: 0644]
examples/stan/CMakeLists.txt [new file with mode: 0644]
examples/stan/pub-async.c [new file with mode: 0644]
examples/stan/pub.c [new file with mode: 0644]
examples/stan/sub.c [new file with mode: 0644]
examples/subscriber.c [new file with mode: 0644]
install_deps.sh [new file with mode: 0755]
src/CMakeLists.txt [new file with mode: 0644]
src/adapters/libevent.h [new file with mode: 0644]
src/adapters/libuv.h [new file with mode: 0644]
src/asynccb.c [new file with mode: 0644]
src/asynccb.h [new file with mode: 0644]
src/buf.c [new file with mode: 0644]
src/buf.h [new file with mode: 0644]
src/comsock.c [new file with mode: 0644]
src/comsock.h [new file with mode: 0644]
src/conn.c [new file with mode: 0644]
src/conn.h [new file with mode: 0644]
src/crypto.c [new file with mode: 0644]
src/crypto.h [new file with mode: 0644]
src/deprnats.h [new file with mode: 0644]
src/err.h [new file with mode: 0644]
src/gc.h [new file with mode: 0644]
src/hash.c [new file with mode: 0644]
src/hash.h [new file with mode: 0644]
src/include/n-unix.h [new file with mode: 0644]
src/include/n-win.h [new file with mode: 0644]
src/js.c [new file with mode: 0644]
src/js.h [new file with mode: 0644]
src/jsm.c [new file with mode: 0644]
src/kv.c [new file with mode: 0644]
src/kv.h [new file with mode: 0644]
src/libnats.pc.in [new file with mode: 0644]
src/mem.h [new file with mode: 0644]
src/msg.c [new file with mode: 0644]
src/msg.h [new file with mode: 0644]
src/nats.c [new file with mode: 0644]
src/nats.h [new file with mode: 0644]
src/natsp.h [new file with mode: 0644]
src/natstime.c [new file with mode: 0644]
src/natstime.h [new file with mode: 0644]
src/nkeys.c [new file with mode: 0644]
src/nkeys.h [new file with mode: 0644]
src/nuid.c [new file with mode: 0644]
src/nuid.h [new file with mode: 0644]
src/opts.c [new file with mode: 0644]
src/opts.h [new file with mode: 0644]
src/parser.c [new file with mode: 0644]
src/parser.h [new file with mode: 0644]
src/pub.c [new file with mode: 0644]
src/srvpool.c [new file with mode: 0644]
src/srvpool.h [new file with mode: 0644]
src/stan/conn.c [new file with mode: 0644]
src/stan/conn.h [new file with mode: 0644]
src/stan/copts.c [new file with mode: 0644]
src/stan/copts.h [new file with mode: 0644]
src/stan/msg.c [new file with mode: 0644]
src/stan/msg.h [new file with mode: 0644]
src/stan/protocol.pb-c.c [new file with mode: 0644]
src/stan/protocol.pb-c.h [new file with mode: 0644]
src/stan/pub.c [new file with mode: 0644]
src/stan/pub.h [new file with mode: 0644]
src/stan/sopts.c [new file with mode: 0644]
src/stan/sopts.h [new file with mode: 0644]
src/stan/stanp.h [new file with mode: 0644]
src/stan/sub.c [new file with mode: 0644]
src/stan/sub.h [new file with mode: 0644]
src/stats.c [new file with mode: 0644]
src/stats.h [new file with mode: 0644]
src/status.c [new file with mode: 0644]
src/status.h [new file with mode: 0644]
src/sub.c [new file with mode: 0644]
src/sub.h [new file with mode: 0644]
src/timer.c [new file with mode: 0644]
src/timer.h [new file with mode: 0644]
src/unix/cond.c [new file with mode: 0644]
src/unix/mutex.c [new file with mode: 0644]
src/unix/sock.c [new file with mode: 0644]
src/unix/thread.c [new file with mode: 0644]
src/url.c [new file with mode: 0644]
src/url.h [new file with mode: 0644]
src/util.c [new file with mode: 0644]
src/util.h [new file with mode: 0644]
src/version.h [new file with mode: 0644]
src/version.h.in [new file with mode: 0644]
src/win/cond.c [new file with mode: 0644]
src/win/mutex.c [new file with mode: 0644]
src/win/sock.c [new file with mode: 0644]
src/win/strings.c [new file with mode: 0644]
src/win/thread.c [new file with mode: 0644]
test/CMakeLists.txt [new file with mode: 0644]
test/certs/ca.pem [new file with mode: 0644]
test/certs/client-cert.pem [new file with mode: 0644]
test/certs/client-key.pem [new file with mode: 0644]
test/certs/server-cert.pem [new file with mode: 0644]
test/certs/server-key.pem [new file with mode: 0644]
test/dylib/CMakeLists.txt [new file with mode: 0644]
test/dylib/nonats.c [new file with mode: 0644]
test/list.txt [new file with mode: 0644]
test/permissions.conf [new file with mode: 0644]
test/test.c [new file with mode: 0644]
test/tls.conf [new file with mode: 0644]
test/tls_default_port.conf [new file with mode: 0644]
test/tlsverify.conf [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..f452f0d
--- /dev/null
@@ -0,0 +1,29 @@
+Compiled Object files, Static and Dynamic libs (Shared Objects)
+*.o
+*.a
+*.so
+*.dylib
+
+# Folders
+build*/
+cmake-build*/
+install/
+html/
+!doc/html/
+
+# Emacs
+*~
+\#*\#
+.\#*
+
+# Eclipse
+.cproject
+.project
+.settings/
+
+.vscode/
+.idea/
+
+# Mac
+.DS_Store
+
diff --git a/.gitmodules b/.gitmodules
new file mode 100644 (file)
index 0000000..ed0d164
--- /dev/null
@@ -0,0 +1,3 @@
+[submodule "coveralls-cmake"]
+       path = coveralls-cmake
+       url = https://github.com/JoakimSoderberg/coveralls-cmake
diff --git a/.travis.yml b/.travis.yml
new file mode 100644 (file)
index 0000000..0c5991d
--- /dev/null
@@ -0,0 +1,148 @@
+language: cpp
+dist: bionic
+os: linux
+
+cache:
+  directories:
+  - $HOME/deps
+
+compiler:
+  - gcc
+  - clang
+
+before_install:
+  - bash install_deps.sh
+  - eval "${MATRIX_EVAL}"
+
+before_script:
+  - export PATH=$HOME/deps/cmake-install:$HOME/deps/cmake-install/bin:$HOME/deps/nats-server:$HOME/deps/nats-streaming-server:$PATH
+  - mkdir build && cd build
+  - export COVERALLS_SERVICE_NAME=travis-ci
+
+env:
+  - DO_COVERAGE="coverage" BUILD_OPT="-DNATS_COVERAGE=ON -DNATS_BUILD_ARCH=64 -DCMAKE_BUILD_TYPE=Debug -DNATS_COVERAGE_UPLOAD=ON -DNATS_BUILD_TLS_USE_OPENSSL_1_1_API=ON"
+
+jobs:
+  include:
+
+    - name: "gcc-9 - TLS OFF"
+      compiler: gcc
+      addons:
+        apt:
+          sources:
+            - ubuntu-toolchain-r-test
+            - sourceline: ppa:ubuntu-toolchain-r/test
+          packages:
+            - g++-9
+      env:
+        - MATRIX_EVAL="CC=gcc-9"
+        - BUILD_OPT="-DNATS_BUILD_WITH_TLS=OFF -DNATS_BUILD_ARCH=64 -DCMAKE_BUILD_TYPE=Release" DO_COVERAGE="no"
+
+    - name: "gcc-9 - Streaming OFF"
+      compiler: gcc
+      addons:
+        apt:
+          sources:
+            - ubuntu-toolchain-r-test
+            - sourceline: ppa:ubuntu-toolchain-r/test
+          packages:
+            - g++-9
+      env:
+        - MATRIX_EVAL="CC=gcc-9"
+        - BUILD_OPT="-DNATS_BUILD_STREAMING=OFF -DNATS_BUILD_ARCH=64 -DCMAKE_BUILD_TYPE=Release" DO_COVERAGE="no" CTEST_OPT="-I 1,1"
+
+    - name: "gcc-9 - Default - sanitize address"
+      compiler: gcc
+      addons:
+        apt:
+          sources:
+            - ubuntu-toolchain-r-test
+            - sourceline: ppa:ubuntu-toolchain-r/test
+          packages:
+            - g++-9
+      env:
+        - MATRIX_EVAL="CC=gcc-9"
+        - BUILD_OPT="-DNATS_BUILD_ARCH=64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS=-fsanitize=address" NATS_TEST_VALGRIND=yes DO_COVERAGE="no"
+
+    - name: "gcc-9 - Lib msg delivery - sanitize address"
+      compiler: gcc
+      addons:
+        apt:
+          sources:
+            - ubuntu-toolchain-r-test
+            - sourceline: ppa:ubuntu-toolchain-r/test
+          packages:
+            - g++-9
+      env:
+        - MATRIX_EVAL="CC=gcc-9"
+        - NATS_DEFAULT_TO_LIB_MSG_DELIVERY=yes BUILD_OPT="-DNATS_BUILD_ARCH=64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS=-fsanitize=address" NATS_TEST_VALGRIND=yes DO_COVERAGE="no"
+
+    - name: "gcc-9 - Write deadline - sanitize address"
+      compiler: gcc
+      addons:
+        apt:
+          sources:
+            - ubuntu-toolchain-r-test
+            - sourceline: ppa:ubuntu-toolchain-r/test
+          packages:
+            - g++-9
+      env:
+        - MATRIX_EVAL="CC=gcc-9"
+        - NATS_DEFAULT_LIB_WRITE_DEADLINE=2000 BUILD_OPT="-DNATS_BUILD_ARCH=64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS=-fsanitize=address" NATS_TEST_VALGRIND=yes DO_COVERAGE="no"
+
+    - name: "gcc-9 - Default - sanitize thread"
+      compiler: gcc
+      addons:
+        apt:
+          sources:
+            - ubuntu-toolchain-r-test
+            - sourceline: ppa:ubuntu-toolchain-r/test
+          packages:
+            - g++-9
+      env:
+        - MATRIX_EVAL="CC=gcc-9"
+        - BUILD_OPT="-DNATS_BUILD_ARCH=64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS=-fsanitize=thread" DO_COVERAGE="no"
+
+    - name: "clang-8 - TLS OFF"
+      compiler: clang
+      addons:
+        apt:
+          sources:
+            - llvm-toolchain-xenial-8
+          packages:
+            - clang-8
+      env:
+        - MATRIX_EVAL="CC=clang-8"
+        # Run only one test, this matrix is just to make sure that we compile ok.
+        - BUILD_OPT="-DNATS_BUILD_WITH_TLS=OFF -DNATS_BUILD_ARCH=64 -DCMAKE_BUILD_TYPE=Release" DO_COVERAGE="no" CTEST_OPT="-I 1,1"
+
+    - name: "clang-8 - Default - sanitize address"
+      compiler: clang
+      addons:
+        apt:
+          sources:
+            - llvm-toolchain-xenial-8
+          packages:
+            - clang-8
+      env:
+        - MATRIX_EVAL="CC=clang-8"
+        - BUILD_OPT="-DNATS_BUILD_ARCH=64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS=-fsanitize=address" NATS_TEST_VALGRIND=yes DO_COVERAGE="no"
+
+    - name: "clang-8 - Default - sanitize thread"
+      compiler: clang
+      addons:
+        apt:
+          sources:
+            - llvm-toolchain-xenial-8
+          packages:
+            - clang-8
+      env:
+        - MATRIX_EVAL="CC=clang-8"
+        - BUILD_OPT="-DNATS_BUILD_ARCH=64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS=-fsanitize=thread" NATS_TEST_VALGRIND=yes DO_COVERAGE="no"
+
+script:
+  - $TRAVIS_BUILD_DIR/buildOnTravis.sh "$CC" "$DO_COVERAGE" "$BUILD_OPT -DNATS_SANITIZE=ON -DNATS_BUILD_TLS_USE_OPENSSL_1_1_API=ON -DNATS_PROTOBUF_DIR=$HOME/deps/pbuf -DNATS_BUILD_USE_SODIUM=ON -DNATS_SODIUM_DIR=$HOME/deps/sodium" "$CTEST_OPT"
+
+notifications:
+  email: false
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644 (file)
index 0000000..221746e
--- /dev/null
@@ -0,0 +1,290 @@
+cmake_minimum_required(VERSION 3.13)
+
+project(cnats)
+include(CTest)
+include(FindPackageHandleStandardArgs)
+
+# Uncomment to have the build process verbose
+#set(CMAKE_VERBOSE_MAKEFILE TRUE)
+
+# Uncomment to have the executable moved to 'build' instead of their respective 'build/xxx' directories
+#set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
+
+# Set a default build type if none was specified
+set(default_build_type "Release")
+
+if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
+  message(STATUS "Setting build type to '${default_build_type}' as none was specified.")
+  set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE
+      STRING "Choose the type of build." FORCE)
+  # Set the possible values of build type for cmake-gui
+  set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
+    "Release" "Debug" "MinSizeRel" "RelWithDebInfo")
+endif()
+
+option(NATS_UPDATE_VERSION "Update the version file" OFF)
+option(NATS_UPDATE_DOC "Update the doc template file" OFF)
+option(NATS_COVERAGE "Code coverage" OFF)
+option(NATS_COVERAGE_UPLOAD "Upload the generated coveralls json" OFF)
+option(NATS_BUILD_NO_SPIN "Enable if spin code does not compile on your arch" OFF)
+option(NATS_BUILD_WITH_TLS "Build with TLS support" ON)
+option(NATS_BUILD_TLS_FORCE_HOST_VERIFY "Forces hostname verification" ON)
+option(NATS_BUILD_TLS_USE_OPENSSL_1_1_API "Build for OpenSSL 1.1+" OFF)
+option(NATS_BUILD_USE_SODIUM "Build using libsodium library" OFF)
+option(NATS_BUILD_EXAMPLES "Build examples" ON)
+option(NATS_BUILD_LIBUV_EXAMPLE "Build libuv examples" OFF)
+option(NATS_BUILD_LIBEVENT_EXAMPLE "Build libevent examples" OFF)
+option(NATS_BUILD_STATIC_EXAMPLES "Statically link examples" OFF)
+option(NATS_BUILD_STREAMING "Build NATS Streaming" ON)
+option(NATS_BUILD_NO_PREFIX_CONNSTS "No prefix for connection status enum" OFF)
+option(NATS_BUILD_LIB_STATIC "Build static library" ON)
+option(NATS_BUILD_LIB_SHARED "Build shared library" ON)
+option(NATS_COMPILER_HARDENING "Compiler hardening flags" OFF)
+if(UNIX AND APPLE)
+  option(CMAKE_MACOSX_RPATH "Build with macOS RPath" ON)
+endif()
+
+if(DEFINED ENV{NATS_SANITIZE})
+  set(NATS_STANITIZE "$ENV{NATS_SANITIZE}")
+  mark_as_advanced(NATS_SANITIZE)
+endif()
+
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_BINARY_DIR})
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/coveralls-cmake/cmake)
+
+if(NATS_COVERAGE)
+  include(Coveralls)
+  coveralls_turn_on_coverage()
+endif(NATS_COVERAGE)
+
+if(NATS_BUILD_WITH_TLS)
+  set(OPENSSL_USE_STATIC_LIBS ${NATS_BUILD_OPENSSL_STATIC_LIBS})
+  find_package(OpenSSL REQUIRED)
+endif(NATS_BUILD_WITH_TLS)
+
+# Convert deprecated option
+if(NATS_BUILD_WITH_TLS_CLIENT_METHOD)
+  set(NATS_BUILD_TLS_USE_OPENSSL_1_1_API ON)
+endif(NATS_BUILD_WITH_TLS_CLIENT_METHOD)
+
+set(LIBUV_DIR "" CACHE PATH "Libuv install directory")
+set(LIBEVENT_DIR "" CACHE PATH "Libevent install directory")
+
+set(NATS_DOC_PROJECT_NAME "NATS C Client with JetStream support")
+if(NATS_BUILD_STREAMING)
+  IF(DEFINED ENV{NATS_PROTOBUF_DIR})
+    SET(NATS_PROTOBUF_DIR "$ENV{NATS_PROTOBUF_DIR}")
+  ENDIF()
+  FIND_PATH(
+    NATS_PROTOBUF_INCLUDE_DIR
+      protobuf-c/protobuf-c.h
+    HINTS
+      ${NATS_PROTOBUF_DIR}
+  )
+  FIND_LIBRARY(NATS_PROTOBUF_LIBRARY
+    NAMES libprotobuf-c.so libprotobuf-c.dylib libprotobuf-c.a protobuf-c.lib protobuf-c.dll
+    HINTS ${NATS_PROTOBUF_DIR}
+  )
+  FIND_PACKAGE_HANDLE_STANDARD_ARGS(libprotobuf-c DEFAULT_MSG
+    NATS_PROTOBUF_INCLUDE_DIR
+    NATS_PROTOBUF_LIBRARY
+  )
+  IF(libprotobuf-c_FOUND)
+    SET(NATS_PROTOBUF_INCLUDE_DIRS ${NATS_PROTOBUF_INCLUDE_DIR})
+    SET(NATS_PROTOBUF_LIBRARIES ${NATS_PROTOBUF_LIBRARY})
+    MARK_AS_ADVANCED(
+      NATS_PROTOBUF_LIBRARY
+      NATS_PROTOBUF_INCLUDE_DIR
+      NATS_PROTOBUF_DIR
+    )
+  ELSE()
+    SET(NATS_PROTOBUF_DIR "" CACHE STRING
+      "An optional hint to a directory for finding `libprotobuf-c`"
+    )
+    MESSAGE(FATAL_ERROR
+      "Could not find libprotobuf-c package. Check build instructions: https://github.com/nats-io/nats.c#building-with-streaming")
+  ENDIF()
+  add_definitions(-DNATS_HAS_STREAMING)
+  set(NATS_DOC_INCLUDE_STREAMING "NATS_HAS_STREAMING")
+  set(NATS_DOC_PROJECT_NAME "NATS C Client with JetStream and Streaming support")
+endif(NATS_BUILD_STREAMING)
+
+if(NATS_BUILD_USE_SODIUM)
+  IF(DEFINED ENV{NATS_SODIUM_DIR})
+    SET(NATS_SODIUM_DIR "$ENV{NATS_SODIUM_DIR}")
+  ENDIF()
+  FIND_PATH(
+    NATS_SODIUM_INCLUDE_DIR
+      sodium.h
+    HINTS
+      ${NATS_SODIUM_DIR}
+  )
+  FIND_LIBRARY(NATS_SODIUM_LIBRARY
+    NAMES libsodium.so libsodium.dylib libsodium.a libsodium.lib libsodium.dll
+    HINTS ${NATS_SODIUM_DIR}
+  )
+  FIND_PACKAGE_HANDLE_STANDARD_ARGS(libsodium DEFAULT_MSG
+    NATS_SODIUM_INCLUDE_DIR
+    NATS_SODIUM_LIBRARY
+  )
+  IF(libsodium_FOUND)
+    SET(NATS_SODIUM_INCLUDE_DIRS ${NATS_SODIUM_INCLUDE_DIR})
+    SET(NATS_SODIUM_LIBRARIES ${NATS_SODIUM_LIBRARY})
+    MARK_AS_ADVANCED(
+      NATS_SODIUM_LIBRARY
+      NATS_SODIUM_INCLUDE_DIR
+      NATS_SODIUM_DIR
+    )
+  ELSE()
+    SET(NATS_SODIUM_DIR "" CACHE STRING
+      "An optional hint to a directory for finding `libsodium`"
+    )
+    MESSAGE(FATAL_ERROR
+      "Could not find libsodium package. Check build instructions: https://github.com/nats-io/nats.c#building-with-libsodium")
+  ENDIF()
+  add_definitions(-DNATS_USE_LIBSODIUM)
+endif(NATS_BUILD_USE_SODIUM)
+
+if(NATS_BUILD_NO_PREFIX_CONNSTS)
+  add_definitions(-DNATS_CONN_STATUS_NO_PREFIX)
+endif(NATS_BUILD_NO_PREFIX_CONNSTS)
+
+# Platform specific settings
+if(UNIX)
+  #---------------------------------------------------------------------------
+  # Define NATS cache variables that override the CMAKE and MEMCHECK variables
+  #---------------------------------------------------------------------------
+  include(GNUInstallDirs)
+
+  set(NATS_LIBDIR ${CMAKE_INSTALL_LIBDIR})
+  set(NATS_INCLUDE_DIR ${CMAKE_INSTALL_INCLUDEDIR})
+
+  set(NATS_BUILD_ARCH "64" CACHE STRING "32 for 32bits builds")
+
+  find_program(MEMORYCHECK_COMMAND valgrind)
+  set(NATS_MEMCHECK_CMD_OPTS "--leak-check=full --track-fds=yes --show-reachable=yes --num-callers=50" CACHE STRING "Memcheck options")
+  set(MEMORYCHECK_COMMAND_OPTIONS ${NATS_MEMCHECK_CMD_OPTS} CACHE INTERNAL "")
+
+  set(NATS_COMMON_C_FLAGS "-std=c99 -pedantic")
+
+  # Some compiler hardening flags.
+  if(NATS_COMPILER_HARDENING)
+     set(NATS_COMMON_C_FLAGS "${NATS_COMMON_C_FLAGS} -fPIE -fstack-protector-all -D_FORTIFY_SOURCE=2 -O1")
+     # Works only with GCC.
+     if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+       set(NATS_COMMON_C_FLAGS "${NATS_COMMON_C_FLAGS} -Wl,-z,relro,-z,now -pie")
+     endif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+  endif(NATS_COMPILER_HARDENING)
+
+  set(NATS_WARNINGS "-fstrict-aliasing -Wall -W -Wno-unused-parameter -Wno-unused-function -Wstrict-prototypes -Wwrite-strings")
+  set(NATS_PLATFORM_INCLUDE "unix")
+
+  if(APPLE)
+    set(NATS_OS "DARWIN")
+  else(APPLE)
+    set(NATS_OS "LINUX")
+    set(NATS_USE_PTHREAD "-pthread")
+    set(NATS_EXTRA_LIB "rt")
+  endif(APPLE)
+  if (${NATS_BUILD_ARCH} MATCHES "32")
+    if(NOT APPLE)
+      message("-----------------------------------------------------------")
+      message("If build fails, you probably need to install libc6-dev-i386")
+      message("apt-get install libc6-dev-i386")
+      message("-----------------------------------------------------------")
+    endif(NOT APPLE)
+
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
+    set(CMAKE_C_LINKER_FLAGS "${CMAKE_C_LINKER_FLAGS} -m32")
+  endif(${NATS_BUILD_ARCH} MATCHES "32")
+
+elseif(WIN32)
+  set(NATS_LIBDIR "lib")
+  set(NATS_INCLUDE_DIR "include")
+  set(NATS_EXTRA_LIB "Ws2_32")
+  set(NATS_OS "_WIN32")
+  set(NATS_PLATFORM_INCLUDE "win")
+  if(sodium_USE_STATIC_LIBS)
+    add_definitions(
+      -DSODIUM_STATIC
+      -DSODIUM_EXPORT=
+    )
+  endif(sodium_USE_STATIC_LIBS)
+endif(UNIX)
+
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${NATS_COMMON_C_FLAGS} ${NATS_USE_PTHREAD} ${NATS_WARNINGS}")
+if(NATS_SANITIZE)
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-omit-frame-pointer -fno-optimize-sibling-calls")
+endif(NATS_SANITIZE)
+
+if(UNIX)
+  if(APPLE)
+  else(APPLE)
+    add_definitions(-D_GNU_SOURCE)
+    if(NATS_BUILD_NO_SPIN)
+      add_definitions(-DNATS_NO_SPIN)
+    endif(NATS_BUILD_NO_SPIN)
+  endif(APPLE)
+endif(UNIX)
+add_definitions(-D${NATS_OS})
+add_definitions(-D_REENTRANT)
+if(NATS_BUILD_WITH_TLS)
+  add_definitions(-DNATS_HAS_TLS)
+  if(NATS_BUILD_TLS_USE_OPENSSL_1_1_API)
+    add_definitions(-DNATS_USE_OPENSSL_1_1)
+  endif(NATS_BUILD_TLS_USE_OPENSSL_1_1_API)
+  if(NATS_BUILD_TLS_FORCE_HOST_VERIFY)
+    add_definitions(-DNATS_FORCE_HOST_VERIFICATION)
+  endif(NATS_BUILD_TLS_FORCE_HOST_VERIFY)
+endif(NATS_BUILD_WITH_TLS)
+
+
+#------------
+# Versionning and Doc
+
+set(NATS_VERSION_MAJOR  3)
+set(NATS_VERSION_MINOR  4)
+set(NATS_VERSION_PATCH  1)
+set(NATS_VERSION_SUFFIX "")
+
+set(NATS_VERSION_REQUIRED_NUMBER 0x030400)
+
+if(NATS_UPDATE_VERSION OR NATS_UPDATE_DOC)
+configure_file(
+       ${CMAKE_CURRENT_SOURCE_DIR}/src/version.h.in
+       ${CMAKE_CURRENT_SOURCE_DIR}/src/version.h
+       @ONLY)
+
+configure_file(
+       ${CMAKE_SOURCE_DIR}/doc/DoxyFile.NATS.Client.in
+       ${CMAKE_SOURCE_DIR}/doc/DoxyFile.NATS.Client
+       @ONLY)
+endif(NATS_UPDATE_VERSION OR NATS_UPDATE_DOC)
+#------------
+
+#------------
+# pkg-config
+if(UNIX)
+  configure_file(
+    ${PROJECT_SOURCE_DIR}/src/libnats.pc.in
+    ${PROJECT_BINARY_DIR}/libnats.pc
+    @ONLY
+  )
+  install (
+    FILES "${PROJECT_BINARY_DIR}/libnats.pc"
+    DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
+endif(UNIX)
+#------------
+
+#----------------------------
+# Add the project directories
+
+add_subdirectory(src)
+add_subdirectory(examples)
+add_subdirectory(examples/getstarted)
+if(NATS_BUILD_STREAMING)
+  add_subdirectory(examples/stan)
+endif()
+add_subdirectory(test)
+add_subdirectory(test/dylib)
+#----------------------------
diff --git a/CODE-OF-CONDUCT.md b/CODE-OF-CONDUCT.md
new file mode 100644 (file)
index 0000000..b850d49
--- /dev/null
@@ -0,0 +1,3 @@
+## Community Code of Conduct
+
+NATS follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).
diff --git a/GOVERNANCE.md b/GOVERNANCE.md
new file mode 100644 (file)
index 0000000..3052ff7
--- /dev/null
@@ -0,0 +1,3 @@
+# NATS C Client Governance
+
+NATS C Client (nats.c) is part of the NATS project and is subject to the [NATS Governance](https://github.com/nats-io/nats-general/blob/master/GOVERNANCE.md).
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
new file mode 100644 (file)
index 0000000..f49a4e1
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
\ No newline at end of file
diff --git a/MAINTAINERS.md b/MAINTAINERS.md
new file mode 100644 (file)
index 0000000..5274a58
--- /dev/null
@@ -0,0 +1,7 @@
+# Maintainers
+
+Maintainership is on a per project basis.
+
+### Maintainers
+  - Derek Collison <derek@nats.io> [@derekcollison](https://github.com/derekcollison)
+  - Ivan Kozlovic <ivan@nats.io> [@kozlovic](https://github.com/kozlovic)
diff --git a/README.md b/README.md
new file mode 100644 (file)
index 0000000..b0f95ff
--- /dev/null
+++ b/README.md
@@ -0,0 +1,1945 @@
+# NATS & NATS Streaming - C Client
+A C client for the [NATS messaging system](https://nats.io).
+
+Go [here](http://nats-io.github.io/nats.c) for the online documentation,
+and check the [frequently asked questions](https://github.com/nats-io/nats.c#faq).
+
+This NATS Client implementation is heavily based on the [NATS GO Client](https://github.com/nats-io/nats.go). There is support for Mac OS/X, Linux and Windows (although we don't have specific platform support matrix).
+
+[![License Apache 2](https://img.shields.io/badge/License-Apache2-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
+[![Build Status](https://travis-ci.com/nats-io/nats.c.svg?branch=main)](https://travis-ci.com/github/nats-io/nats.c)
+[![Coverage Status](https://coveralls.io/repos/github/nats-io/nats.c/badge.svg?branch=main)](https://coveralls.io/github/nats-io/nats.c?branch=main)
+[![Release](https://img.shields.io/badge/release-v3.4.1-blue.svg?style=flat)](https://github.com/nats-io/nats.c/releases/tag/v3.4.1)
+[![Documentation](https://img.shields.io/badge/doc-Doxygen-brightgreen.svg?style=flat)](http://nats-io.github.io/nats.c)
+[![Total alerts](https://img.shields.io/lgtm/alerts/g/nats-io/nats.c.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/nats-io/nats.c/alerts/)
+[![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/nats-io/nats.c.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/nats-io/nats.c/context:cpp)
+
+# Table of Contents
+
+- [Installing](#installing)
+- [Building](#building)
+       * [TLS Support](#tls-support)
+        * [Link statically](#link-statically)
+    * [Building with Streaming](#building-with-streaming)
+    * [Building with Libsodium](#building-with-libsodium)
+    * [Testing](#testing)
+- [Documentation](#documentation)
+- [NATS Client](#nats-client)
+    * [Important Changes](#important-changes)
+    * [JetStream](#jetstream)
+        * [JetStream Basic Usage](#jetstream-basic-usage)
+        * [JetStream Basic Management](#jetstream-basic-usage)
+    * [KeyValue](#keyvalue)
+        * [KeyValue Management](#keyvalue-management)
+        * [KeyValue APIs](#keyvalue-apis)
+       * [Getting Started](#getting-started)
+       * [Basic Usage](#basic-usage)
+    * [Headers](#headers)
+       * [Wildcard Subscriptions](#wildcard-subscriptions)
+       * [Queue Groups](#queue-groups)
+       * [TLS](#tls)
+       * [New Authentication (Nkeys and User Credentials)](#new-authentication-nkeys-and-user-credentials)
+       * [Advanced Usage](#advanced-usage)
+       * [Clustered Usage](#clustered-usage)
+       * [Using an Event Loop Library](#using-an-event-loop-library)
+       * [FAQ](#faq)
+- [NATS Streaming Client](#nats-streaming-client)
+       * [Streaming Basic Usage](#streaming-basic-usage)
+               * [Streaming Subscriptions](#streaming-subscriptions)
+               * [Streaming Durable Subscriptions](#streaming-durable-subscriptions)
+               * [Streaming Queue Groups](#streaming-queue-groups)
+                       * [Creating a Queue Group](#creating-a-queue-group)
+                       * [Start Position](#start-position)
+                       * [Leaving the Group](#leaving-the-group)
+                       * [Closing a Queue Group](#closing-a-queue-group)
+               * [Streaming Durable Queue Groups](#streaming-durable-queue-groups)
+                       * [Creating a Durable Queue Group](#creating-a-durable-queue-group)
+                       * [Start Position of the Durable Queue Group](#start-position-of-the-durable-queue-group)
+                       * [Leaving the Durable Queue Group](#leaving-the-durable-queue-group)
+                       * [Closing the Durable Queue Group](#closing-the-durable-queue-group)
+               * [Streaming Wildcard Subscriptions](#streaming-wildcard-subscriptions)
+       * [Streaming Advanced Usage](#streaming-advanced-usage)
+               * [Connection Status](#connection-status)
+               * [Asynchronous Publishing](#asynchronous-publishing)
+               * [Message Acknowledgments and Redelivery](#message-acknowledgments-and-redelivery)
+               * [Rate limiting/matching](#rate-limitingmatching)
+                       * [Publisher Rate Limiting](#publisher-rate-limiting)
+                       * [Subscriber Rate Limiting](#subscriber-rate-limiting)
+- [License](#license)
+
+## Installing
+
+There are several package managers with NATS C client library available. If you know one that is not in this list, please submit a PR to add it!
+
+- [Homebrew](https://github.com/Homebrew/homebrew-core) The "cnats" formula is [here](https://github.com/Homebrew/homebrew-core/blob/master/Formula/cnats.rb)
+- [vcpkg](https://vcpkg.io) The "cnats" port is [here](https://github.com/microsoft/vcpkg/tree/master/ports/cnats)
+
+## Building
+
+First, download the source code:
+```
+git clone git@github.com:nats-io/nats.c.git .
+```
+
+To build the library, use [CMake](https://cmake.org/download/). Note that by default the NATS Streaming API will be built and included in the NATS library.
+See below if you do not want to build the Streaming related APIs.
+
+Make sure that CMake is added to your path. If building on Windows, open a command shell from the Visual Studio Tools menu, and select the appropriate command shell (x64 or x86 for 64 or 32 bit builds respectively). You will also probably need to run this with administrator privileges.
+
+Create a `build` directory (any name would work) from the root source tree, and `cd` into it. Then issue this command for the first time:
+
+```
+cmake ..
+```
+
+In some architectures, you may experience a compilation error for `mutex.c.o` because there is no support
+for the assembler instruction that we use to yield when spinning trying to acquire a lock.
+
+You may get this sort of build error:
+```
+/tmp/cc1Yp7sD.s: Assembler messages:
+/tmp/cc1Yp7sD.s:302: Error: selected processor does not support ARM mode `yield'
+src/CMakeFiles/nats_static.dir/build.make:542: recipe for target 'src/CMakeFiles/nats_static.dir/unix/mutex.c.o' failed
+```
+If that's the case, you can solve this by enabling the `NATS_BUILD_NO_SPIN` flag (or use `-DNATS_NO_SPIN` if you compile without CMake):
+```
+cmake .. -DNATS_BUILD_NO_SPIN=ON
+```
+
+If you had previously built the library, you may need to do a `make clean`, or simply delete and re-create the build directory before executing the cmake command.
+
+To build on Windows, you would need to select the build generator. For instance, to select `nmake`, you would run:
+
+```
+cmake .. -G "NMake Makefiles"
+```
+
+Running `cmake -h` would give you the list of possible options and all the generator names.
+
+Alternatively, you can run the GUI version. From that same *build* command shell, start the GUI:
+
+```
+c:\program files (x86)\CMake\bin\cmake-gui.exe
+```
+
+If you started with an empty build directory, you would need to select the source and build directory, then click `Configure`. Here, you will be able to select from the drop-down box the name of the build generator. When done, click `Generate`. Then you can go back to your command shell, or Visual Studio and build.
+
+To modify some of the build options, you need to edit the cache and rebuild.
+
+```
+make edit_cache
+```
+
+Note that if you build on Windows and have selected "NMake Makefiles", replace all following references to `make` with `nmake`.
+
+Editing the cache allows you to select the build type (Debug, Release, etc), the architecture (64 or 32bit), and so on.
+
+The default target will build everything, that is, the static and shared NATS libraries and also the examples and the test program. Each are located in their respective directories under your build directory: `src`, `examples` and `test`.
+
+```
+make install
+```
+Will copy both the static and shared libraries in the folder `install/lib` and the public headers in `install/include`.
+
+## TLS Support
+
+By default, the library is built with TLS support. You can disable this from the cmake gui `make edit_cache` and switch the `NATS_BUILD_WITH_TLS` option to `OFF`, or pass the option directly to the `cmake` command:
+
+```
+cmake .. -DNATS_BUILD_WITH_TLS=OFF
+```
+
+Starting `2.0.0`, when building with TLS/SSL support, the server certificate's expected hostname is always verified. It means that the hostname provided in the URL(s) or through the option `natsOptions_SetExpectedHostname()` will be used to check the hostname present in the certificate. Prior to `2.0.0`, the hostname would be verified *only* if the option `natsOptions_SetExpectedHostname()` was invoked.
+
+Although we recommend leaving the new default behavior, you can restore the previous behavior by building the library with this option off:
+
+```
+cmake .. -DNATS_BUILD_TLS_FORCE_HOST_VERIFY=OFF
+```
+
+The NATS C client is built using APIs from the [OpenSSL](https://github.com/openssl/openssl) library. By default we use `1.0.2` APIs. You can compile the NATS C client with OpenSSL API version `1.1+`. To do that, you need to enable the `NATS_BUILD_TLS_USE_OPENSSL_1_1_API` option:
+
+```
+cmake .. -DNATS_BUILD_TLS_USE_OPENSSL_1_1_API=ON
+```
+
+Since the NATS C client dynamically links to the OpenSSL library, you need to make sure that you are then running your application against an OpenSSL 1.1+ library.
+
+Note that the option `NATS_BUILD_WITH_TLS_CLIENT_METHOD` is deprecated. Its purpose was to make the NATS C client use a method that was introduced in OpenSSL `1.1+`. The new option `NATS_BUILD_TLS_USE_OPENSSL_1_1_API` is more generic and replaces `NATS_BUILD_WITH_TLS_CLIENT_METHOD`. If you are using scripts to automate your build process that makes use of `NATS_BUILD_WITH_TLS_CLIENT_METHOD`, they will still work and using this deprecated option will have the same effect than setting `NATS_BUILD_TLS_USE_OPENSSL_1_1_API` to `ON`.
+
+### Link statically
+
+If you want to link to the static OpenSSL library, you need to delete the `CMakeCache.txt` and regenerate it with the additional option:
+```
+rm CMakeCache.txt
+cmake .. <build options that you may already use> -DNATS_BUILD_OPENSSL_STATIC_LIBS=ON
+```
+Then call `make` (or equivalent depending on your platform) and this should ensure that the library (and examples and/or test suite executable) are linked against the OpenSSL library, if it was found by CMake.
+
+## Building with Streaming
+
+When building the library with Streaming support, the NATS library uses the [libprotobuf-c](https://github.com/protobuf-c/protobuf-c) library.
+When cmake runs for the first time (or after removing `CMakeCache.txt` and calling `cmake ..` again), it is looking for the libprotobuf-c library. If it does not find it, a message is printed and the build process fails.
+CMake searches for the library in directories where libraries are usually found. However, if you want to specify a specific directory where the library is located, you need to do this:
+```
+cmake .. -DNATS_PROTOBUF_DIR=<my libprotobuf-c directory>
+```
+The static library will be used by default. If you want to change that, or if the library has not the expected name, you need to do this:
+```
+# Use the library named mylibproto.so located at /my/location
+cmake .. -DNATS_PROTOBUF_LIBRARY=/my/location/mylibproto.so
+```
+The two could be combined if the include header is located in a different directory
+```
+# Use the library named mylibproto.so located at /my/location and the directory protobuf-c/ containing protobuf-c.h located at /my/other/location
+cmake .. -DNATS_PROTOBUF_LIBRARY=/my/location/mylibproto.so -DNATS_PROTOBUF_DIR=/my/other/location
+```
+
+If you don't want to build the NATS Streaming APIs to be included in the NATS library:
+```
+cmake .. -DNATS_BUILD_STREAMING=OFF
+```
+
+## Building with Libsodium
+
+When using the new NATS 2.0 security features, the library needs to sign some "nonce" sent by the server during a connect or reconnect.
+We use [Ed25519](https://ed25519.cr.yp.to/) public-key signature. The library comes with some code to perform the signature.
+In most case, it will be fine, but if performance is an issue (especially if you plan to use the `natsConnection_Sign()` function a lot), you will have the option to build with the [Libsodium](https://github.com/jedisct1/libsodium) library.
+
+Follow instructions on how to install the libsodium library [here](https://download.libsodium.org/doc/).
+
+On macOS, you could use `brew`:
+```
+brew install libsodium
+```
+On Linux, you could use `apt-get`
+```
+apt-get install libsodium-dev
+```
+Once installed, you can rebuild the NATS C client by first enabling the use of the libsodium library:
+```
+cmake .. -DNATS_BUILD_USE_SODIUM=ON
+```
+If you have the libsodium library installed in a non standard location that CMake cannot find, you can specify the location of this directory:
+```
+cmake .. -DNATS_BUILD_USE_SODIUM=ON -DNATS_SODIUM_DIR=/my/path/to/libsodium
+```
+
+## Testing
+
+On platforms where `valgrind` is available, you can run the tests with memory checks.
+Here is an example:
+
+```
+make test ARGS="-T memcheck"
+```
+
+Or, you can invoke directly the `ctest` program:
+
+```
+ctest -T memcheck -V -I 1,4
+```
+The above command would run the tests with `valgrind` (`-T memcheck`), with verbose output (`-V`), and run the tests from 1 to 4 (`-I 1,4`).
+
+If you add a test to `test/test.c`, you need to add it into the `allTests` array. Each entry contains a name, and the test function. You can add it anywhere into this array.
+Build you changes:
+
+```
+make
+[ 44%] Built target nats
+[ 88%] Built target nats_static
+[ 90%] Built target nats-publisher
+[ 92%] Built target nats-queuegroup
+[ 94%] Built target nats-replier
+[ 96%] Built target nats-requestor
+[ 98%] Built target nats-subscriber
+Scanning dependencies of target testsuite
+[100%] Building C object test/CMakeFiles/testsuite.dir/test.c.o
+Linking C executable testsuite
+[100%] Built target testsuite
+```
+
+Now regenerate the list by invoking the test suite without any argument:
+
+```
+./test/testsuite
+Number of tests: 77
+```
+
+This list the number of tests added to the file `list.txt`. Move this file to the source's test directory.
+
+```
+mv list.txt ../test/
+```
+
+Then, refresh the build:
+
+```
+cmake ..
+-- Configuring done
+-- Generating done
+-- Build files have been written to: /home/ivan/nats.c/build
+```
+
+You can use the following environment variables to influence the testsuite behavior.
+
+When running with memory check, timing changes and overall performance is slower. The following variable allows the testsuite to adjust some of values used during the test:
+
+```
+export NATS_TEST_VALGRIND=yes
+```
+
+On Windows, it would be `set` instead of `export`.
+
+When running the tests in verbose mode, the following environment variable allows you to see the server output from within the test itself. Without this option, the server output is silenced:
+
+```
+export NATS_TEST_KEEP_SERVER_OUTPUT=yes
+```
+
+If you want to change the default server executable name (`nats-server.exe`) or specify a specific location, use this environment variable:
+
+```
+set NATS_TEST_SERVER_EXE=c:\test\nats-server.exe
+```
+
+
+# Documentation
+
+The public API has been documented using [Doxygen](http://www.stack.nl/~dimitri/doxygen/).
+
+To generate the documentation, go to the `doc` directory and type the following command:
+
+```
+doxygen DoxyFile.NATS.Client
+```
+
+If you toggle the build of the Streaming APIs, and the documentation is no longer matching
+what is being built, you can update the documentation by switching the `NATS_UPDATE_DOC` build flag and rebuild the documentation.
+
+From the build directory:
+```
+cmake .. -DNATS_UPDATE_DOC=ON
+make
+cd <nats.c root dir>/doc
+doxygen DoxyFile.NATS.Client
+```
+
+The generated documentation will be located in the `html` directory. To see the documentation, point your browser to the file `index.html` in that directory.
+
+Go [here](http://nats-io.github.io/nats.c) for the online documentation.
+
+The source code is also quite documented.
+
+# NATS Client
+
+## Important Changes
+
+This section lists important changes such as deprecation notices, etc...
+
+### Version `2.0.0`
+
+This version introduces the security concepts used by NATS Server `2.0.0` and therefore aligns with the server version. There have been new APIs introduced, but the most important change is the new default behavior with TLS connections:
+
+* When establishing a secure connection, the server certificate's hostname is now always verified, regardless if the user has invoked `natsOptions_SetExpectedHostname()`. This may break applications that were for instance using an IP to connect to a server that had only the hostname in the certificate. This can be solved by changing your application to use the hostname in the URL or make use of `natsOptions_SetExpectedHostname()`. If this is not possible, you can restore the old behavior by building the library with the new behavior disabled. See #tls-support for more information.
+
+* This repository used to include precompiled libraries of [libprotobuf-c](https://github.com/protobuf-c/protobuf-c) for macOS, Linux and Windows along with the header files (in the `/pbuf` directory).
+We have now removed this directory and require that the user installs the libprotobuf-c library separately. See the [building instructions](#building) to specify the library location if CMake cannot find it directly.
+
+### Version `1.8.0`
+
+* The `natsConnStatus` enum values have been prefixed with `NATS_CONN_STATUS_`. If your application is
+not using referencing any original value, such as `CONNECTED` or `CLOSED`, etc.. then there is nothing
+that you need to do. If you do, you have two options:
+       * Replace all references from the orignal values to the new value (adding the prefix)
+       * Compile the library with the option to use the original values (no prefix). Edit the CMake cache
+and turn on the option `NATS_BUILD_NO_PREFIX_CONNSTS`. This can be done this way from the build directory:
+`cmake .. -DNATS_BUILD_NO_PREFIX_CONNSTS=ON`
+
+## Getting Started
+
+The `examples/getstarted` directory has a set of simple examples that are fully functional, yet very simple.
+The goal is to demonstrate how easy to use the API is.
+
+A more complex set of examples are in `examples/` directory and can also be used to benchmark the client library.
+
+## Basic Usage
+
+Note that for simplicity, error checking is not performed here.
+```c
+natsConnection      *nc  = NULL;
+natsSubscription    *sub = NULL;
+natsMsg             *msg = NULL;
+
+// Connects to the default NATS Server running locally
+natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+
+// Connects to a server with username and password
+natsConnection_ConnectTo(&nc, "nats://ivan:secret@localhost:4222");
+
+// Connects to a server with token authentication
+natsConnection_ConnectTo(&nc, "nats://myTopSecretAuthenticationToken@localhost:4222");
+
+// Simple publisher, sending the given string to subject "foo"
+natsConnection_PublishString(nc, "foo", "hello world");
+
+// Publish binary data. Content is not interpreted as a string.
+char data[] = {1, 2, 0, 4, 5};
+natsConnection_Publish(nc, "foo", (const void*) data, 5);
+
+// Simple asynchronous subscriber on subject foo, invoking message
+// handler 'onMsg' when messages are received, and not providing a closure.
+natsConnection_Subscribe(&sub, nc, "foo", onMsg, NULL);
+
+// Simple synchronous subscriber
+natsConnection_SubscribeSync(&sub, nc, "foo");
+
+// Using a synchronous subscriber, gets the first message available, waiting
+// up to 1000 milliseconds (1 second)
+natsSubscription_NextMsg(&msg, sub, 1000);
+
+// Destroy any message received (asynchronously or synchronously) or created
+// by your application. Note that if 'msg' is NULL, the call has no effect.
+natsMsg_Destroy(msg);
+
+// Unsubscribing
+natsSubscription_Unsubscribe(sub);
+
+// Destroying the subscription (this will release the object, which may
+// result in freeing the memory). After this call, the object must no
+// longer be used.
+natsSubscription_Destroy(sub);
+
+// Publish requests to the given reply subject:
+natsConnection_PublishRequestString(nc, "foo", "bar", "help!");
+
+// Sends a request (internally creates an inbox) and Auto-Unsubscribe the
+// internal subscriber, which means that the subscriber is unsubscribed
+// when receiving the first response from potentially many repliers.
+// This call will wait for the reply for up to 1000 milliseconds (1 second).
+natsConnection_RequestString(&reply, nc, "foo", "help", 1000);
+
+// Closing a connection (but not releasing the connection object)
+natsConnection_Close(nc);
+
+// When done with the object, free the memory. Note that this call
+// closes the connection first, in other words, you could have simply
+// this call instead of natsConnection_Close() followed by the destroy
+// call.
+natsConnection_Destroy(nc);
+
+// Message handler
+void
+onMsg(natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure)
+{
+    // Prints the message, using the message getters:
+    printf("Received msg: %s - %.*s\n",
+        natsMsg_GetSubject(msg),
+        natsMsg_GetDataLength(msg),
+        natsMsg_GetData(msg));
+
+    // Don't forget to destroy the message!
+    natsMsg_Destroy(msg);
+}
+```
+
+## JetStream
+
+Support for JetStream starts with the version `v3.0.0` of the library and NATS Server `v2.2.0+`, although getting JetStream
+specific error codes requires the server at version `v2.3.0+`. Some of the configuration options are only available starting `v2.3.3`,
+so we recommend that you use the latest NATS Server release to have a better experience.
+
+Look at examples named `js-xxx.c` in the `examples` directory for examples on how to use the API.
+The new objects and APIs are full documented in the online [documentation](http://nats-io.github.io/nats.c/group__js_group.html).
+
+### JetStream Basic Usage
+
+```c
+// Connect to NATS
+natsConnection_Connect(&conn, opts);
+
+// Initialize and set some JetStream options
+jsOptions jsOpts;
+jsOptions_Init(&jsOpts);
+jsOpts.PublishAsync.MaxPending = 256;
+
+// Create JetStream Context
+natsConnection_JetStream(&js, conn, &jsOpts);
+
+// Simple Stream Publisher
+js_Publish(&pa, js, "ORDERS.scratch", (const void*) "hello", 5, NULL, &jerr);
+
+// Simple Async Stream Publisher
+for (i=0; i < 500; i++)
+{
+    js_PublishAsync(js, "ORDERS.scratch", (const void*) "hello", 5, NULL);
+}
+
+// Wait for up to 5 seconds to receive all publish acknowledgments.
+jsPubOptions_Init(&jsPubOpts);
+jsPubOpts.MaxWait = 5000;
+js_PublishAsyncComplete(js, &jsPubOpts);
+
+// One can get the list of all pending publish async messages,
+// to either resend them or simply destroy them.
+natsMsgList pending;
+s = js_PublishAsyncGetPendingList(&pending, js);
+if (s == NATS_OK)
+{
+    int i;
+
+    for (i=0; i<pending.Count; i++)
+    {
+
+        // There could be a decision to resend these messages or not.
+        if (your_decision_to_resend(pending.Msgs[i]))
+        {
+
+            // If the call is successful, pending.Msgs[i] will be set
+            // to NULL so destroying the pending list will not destroy
+            // this message since the library has taken ownership back.
+            js_PublishMsgAsync(js, &(pending.Msgs[i]), NULL);
+        }
+    }
+
+    // Destroy the pending list object and all messages still in that list.
+    natsMsgList_Destroy(&pending);
+}
+
+// To create an asynchronous ephemeral consumer
+js_Subscribe(&sub, js, "foo", myMsgHandler, myClosure, &jsOpts, NULL, &jerr);
+
+// Same but use a subscription option to ask the callback to not do auto-ack.
+jsSubOptions so;
+jsSubOptions_Init(&so);
+so.ManualAck = true;
+js_Subscribe(&sub, js, "foo", myMsgHandler, myClosure, &jsOpts, &so, &jerr);
+
+// Or to bind to an existing specific stream/durable:
+jsSubOptions_Init(&so);
+so.Stream = "MY_STREAM";
+so.Consumer = "my_durable";
+js_Subscribe(&sub, js, "foo", myMsgHandler, myClosure, &jsOpts, &so, &jerr);
+
+// Synchronous subscription:
+js_SubscribeSync(&sub, js, "foo", &jsOpts, &so, &jerr);
+```
+
+### JetStream Basic Management
+
+```c
+jsStreamConfig  cfg;
+
+// Connect to NATS
+natsConnection_Connect(&conn, opts);
+
+// Create JetStream Context
+natsConnection_JetStream(&js, conn, NULL);
+
+// Initialize the configuration structure.
+jsStreamConfig_Init(&cfg);
+// Provide a name
+cfg.Name = "ORDERS";
+// Array of subjects and its size
+cfg.Subjects = (const char*[1]){"ORDERS.*"};
+cfg.SubjectsLen = 1;
+
+// Create a Stream. If you are not interested in the returned jsStreamInfo object,
+// you can pass NULL.
+js_AddStream(NULL, js, &cfg, NULL, &jerr);
+
+// Update a Stream
+cfg.MaxBytes = 8;
+js_UpdateStream(NULL, js, &cfg, NULL, &jerr);
+
+// Delete a Stream
+js_DeleteStream(js, "ORDERS", NULL, &jerr);
+```
+
+## KeyValue
+
+**EXPERIMENTAL FEATURE! We reserve the right to change the API without necessarily bumping the major version of the library.**
+
+A KeyValue store is a materialized view based on JetStream. A bucket is a stream and keys are subjects within that stream.
+
+Some features require NATS Server `v2.6.2`, so we recommend that you use the latest NATS Server release to have a better experience.
+
+The new objects and APIs are full documented in the online [documentation](http://nats-io.github.io/nats.c/group__kv_group.html).
+
+### KeyValue Management
+
+Example of how to create a KeyValue store:
+```c
+jsCtx       *js = NULL;
+kvStore     *kv = NULL;
+kvConfig    kvc;
+
+// Assume we got a JetStream context in `js`...
+
+kvConfig_Init(&kvc);
+kvc.Bucket = "KVS";
+kvc.History = 10;
+s = js_CreateKeyValue(&kv, js, &kvc);
+
+// Do some stuff...
+
+// This is to free the memory used by `kv` object,
+// not delete the KeyValue store in the server
+kvStore_Destroy(kv);
+```
+
+This shows how to "bind" to an existing one:
+```c
+jsCtx       *js = NULL;
+kvStore     *kv = NULL;
+
+// Assume we got a JetStream context in `js`...
+
+s = js_KeyValue(&kv, ks, "KVS");
+
+// Do some stuff...
+
+// This is to free the memory used by `kv` object,
+// not delete the KeyValue store in the server
+kvStore_Destroy(kv);
+```
+
+This is how to delete a KeyValue store in the server:
+```c
+jsCtx       *js = NULL;
+
+// Assume we got a JetStream context in `js`...
+
+s = js_DeleteKeyValue(js, "KVS");
+```
+
+### KeyValue APIs
+
+This is how to put a value for a given key:
+```c
+kvStore     *kv = NULL;
+uint64_t    rev = 0;
+
+// Assume we got a kvStore...
+
+s = kvStore_PutString(&rev, kv, "MY_KEY", "my value");
+
+// If the one does not care about getting the revision, pass NULL:
+s = kvStore_PutString(NULL, kv, "MY_KEY", "my value");
+```
+
+The above places a value for a given key, but if instead one wants to make sure that the value is placed for the key only if it never existed before, one would call:
+```c
+// Same note than before: if "rev" is not needed, pass NULL:
+s = kvStore_CreateString(&rev, kv, "MY_KEY", "my value");
+```
+
+One can update a key if and only if the last revision in the server matches the one passed to this API:
+```c
+// This would update the key "MY_KEY" with the value "my updated value" only if the current revision (sequence number) for this key is 10.
+s = kvStore_UpdateString(&rev, kv, "MY_KEY", "my updated value", 10);
+```
+
+This is how to get a key:
+```c
+kvStore *kv = NULL;
+kvEntry *e  = NULL;
+
+// Assume we got a kvStore...
+
+s = kvStore_Get(&e, kv, "MY_KEY");
+
+// Then we can get some fields from the entry:
+printf("Key value: %s\n", kvEntry_ValueString(e));
+
+// Once done with the entry, we need to destroy it to release memory.
+// This is NOT deleting the key from the server.
+kvEntry_Destroy(e);
+```
+
+This is how to purge a key:
+```c
+kvStore *kv = NULL;
+
+// Assume we got a kvStore...
+
+s = kvStore_Purge(kv, "MY_KEY");
+```
+
+This will delete the key in the server:
+```c
+kvStore *kv = NULL;
+
+// Assume we got a kvStore...
+
+s = kvStore_Delete(kv, "MY_KEY");
+```
+
+To create a "watcher" for a given key:
+```c
+kvWatcher       *w = NULL;
+kvWatchOptions  o;
+
+// Assume we got a kvStore...
+
+// Say that we are not interested in getting the
+// delete markers...
+
+// Initialize a kvWatchOptions object:
+kvWatchOptions_Init(&o);
+o.IgnoreDeletes = true;
+// Create the watcher
+s = kvStore_Watch(&w, kv, "foo.*", &o);
+// Check for error..
+
+// Now get updates:
+while (some_condition)
+{
+    kvEntry *e = NULL;
+
+    // Wait for the next update for up to 5 seconds
+    s = kvWatcher_Next(&e, w, 5000);
+
+    // Do something with the entry...
+
+    // Destroy to release memory
+    kvEntry_Destroy(e);
+}
+
+// When done with the watcher, it needs to be destroyed to release memory:
+kvWatcher_Destroy(w);
+```
+
+To get the history of a key:
+```c
+kvEntryList l;
+int         i;
+
+// The list is defined on the stack and will be initilized/updated by this call:
+s = kvStore_History(&l, kv, "MY_KEY", NULL);
+
+for (i=0; i<l.Count; i++)
+{
+    kvEntry *e = l.Entries[i];
+
+    // Do something with the entry...
+}
+// When done with the list, call this to free entries and the content of the list.
+kvEntryList_Destroy(&l);
+
+// In order to set a timeout to get the history, we need to do so through options:
+kvWatchOptions o;
+
+kvWatchOptions_Init(&o);
+o.Timeout = 5000; // 5 seconds.
+s = kvStore_History(&l, kv, "MY_KEY", &o);
+```
+
+This is how you would get the keys of a bucket:
+```c
+kvKeysList  l;
+int         i;
+
+// If no option is required, pass NULL as the last argument.
+s = kvStore_Keys(&l, kv, NULL);
+// Check error..
+
+// Go over all keys:
+for (i=0; i<l.Count; i++)
+    printf("Key: %s\n", l.Keys[i]);
+
+// When done, list need to be destroyed.
+kvKeysList_Destroy(&l);
+
+// If option need to be specified:
+
+kvWatchOptions o;
+
+kvWatchOptions_Init(&o);
+o.Timeout = 5000; // 5 seconds.
+s = kvStore_Keys(&l, kv, &o);
+```
+
+## Headers
+
+Headers are available when connecting to servers at version 2.2.0+.
+
+They closely resemble http headers. They are a map of key/value pairs, the value being an array of strings.
+
+Headers allow users to add meta information about a message without interfering with the message payload.
+
+Note that if an application attempts to send a message with a header when connected to a server that does not understand them, the publish call will return the error `NATS_NO_SERVER_SUPPORT`.
+
+There is an API to know if the server currently connected to supports headers:
+```c
+natsStatus s = natsConnection_HasHeaderSupport(conn);
+if (s == NATS_NO_SERVER_SUPPORT)
+    // deal with server not supporting this feature.
+```
+
+If the server understands headers but is about to deliver the message to a client that doesn't, the headers are stripped off so that the older clients can still receive the messsage.
+It is important to have all client and servers to a version that support headers if applications rely on headers.
+
+For more details on the headers API, please get the example: `examples/getstarted/headers.c`.
+
+## Wildcard Subscriptions
+
+The `*` wildcard matches any token, at any level of the subject:
+
+```c
+natsConnection_Subscribe(&sub, nc, "foo.*.baz", onMsg, NULL);
+```
+This subscriber would receive messages sent to:
+
+* foo.bar.baz
+* foo.a.baz
+* etc...
+
+It would not, however, receive messages on:
+
+* foo.baz
+* foo.baz.bar
+* etc...
+
+The `>` wildcard matches any length of the fail of a subject, and can only be the last token.
+
+```c
+natsConnection_Subscribe(&sub, nc, "foo.>", onMsg, NULL);
+```
+This subscriber would receive any message sent to:
+
+* foo.bar
+* foo.bar.baz
+* foo.foo.bar.bax.22
+* etc...
+
+However, it would not receive messages sent on:
+
+* foo
+* bar.foo.baz
+* etc...
+
+Publishing on this subject would cause the two above subscriber to receive the message:
+```c
+natsConnection_PublishString(nc, "foo.bar.baz", "got it?");
+```
+
+## Queue Groups
+
+All subscriptions with the same queue name will form a queue group. Each message will be delivered to only one subscriber per queue group, using queue sematics. You can have as many queue groups as you wish. Normal subscribers will continue to work as expected.
+
+```c
+natsConnection_QueueSubscribe(&sub, nc, "foo", "job_workers", onMsg, NULL);
+```
+
+## TLS
+
+(Note that the library needs to be built with TLS support - which is by default - for these APIs to work. See the Build chapter on how to build with or without TLS for more details).
+
+An SSL/TLS connection is configured through the use of `natsOptions`. Depending on the level of security you desire, it can be as simple as setting the secure boolean to true on the `natsOptions_SetSecure()` call.
+
+Even with full security (client verifying server certificate, and server requiring client certificates), the setup involves only a few calls.
+
+```c
+// Here is the minimum to create a TLS/SSL connection:
+
+// Create an options object.
+natsOptions_Create(&opts);
+
+// Set the secure flag.
+natsOptions_SetSecure(opts, true);
+
+// You may not need this, but suppose that the server certificate
+// is self-signed and you would normally provide the root CA, but
+// don't want to. You can disable the server certificate verification
+// like this:
+natsOptions_SkipServerVerification(opts, true);
+
+// Connect now...
+natsConnection_Connect(&nc, opts);
+
+// That's it! On success you will have a secure connection with the server!
+
+(...)
+
+// This example shows what it takes to have a full SSL configuration,
+// including server expected's hostname, root CA, client certificates
+// and specific ciphers to use.
+
+// Create an options object.
+natsOptions_Create(&opts);
+
+// Set the secure flag.
+natsOptions_SetSecure(opts, true);
+
+// For a server with a trusted chain built into the client host,
+// simply designate the server name that is expected. Without this
+// call, the server certificate is still verified, but not the
+// hostname.
+natsOptions_SetExpectedHostname(opts, "localhost");
+
+// Instead, if you are using a self-signed cert and need to load in the CA.
+natsOptions_LoadCATrustedCertificates(opts, caCertFileName);
+
+// If the server requires client certificates, provide them along with the
+// private key, all in one call.
+natsOptions_LoadCertificatesChain(opts, certChainFileName, privateKeyFileName);
+
+// You can also specify preferred ciphers if you want.
+natsOptions_SetCiphers(opts, "-ALL:HIGH");
+
+// Then simply pass the options object to the connect call:
+natsConnection_Connect(&nc, opts);
+
+// That's it! On success you will have a secure connection with the server!
+```
+
+## New Authentication (Nkeys and User Credentials)
+
+This requires server with version >= 2.0.0
+
+NATS servers have a new security and authentication mechanism to authenticate with user credentials and Nkeys. The simplest form is to use the helper option `natsOptions_SetUserCredentialsFromFiles()`.
+
+```c
+// Retrieve both user JWT and NKey seed from single file `user.creds`.
+s = natsOptions_SetUserCredentialsFromFiles(opts, "user.creds", NULL);
+if (s == NATS_OK)
+    s = natsConnection_Connect(&nc, opts);
+```
+
+With this option, the library will load the user JWT and NKey seed from a single file. Note that the library wipes the buffers used to read the files.
+
+If you prefer to store the JWT and seed in two distinct files, use this form instead:
+
+```c
+// Retrieve the user JWT from the file `user.jwt` and the seed from the file `user.nk`.
+s = natsOptions_SetUserCredentialsFromFiles(opts, "user.jwt", "user.nk");
+if (s == NATS_OK)
+    s = natsConnection_Connect(&nc, opts);
+```
+
+You can also set the callback handlers and manage challenge signing directly.
+
+```c
+/*
+ * myUserJWTCb is a callback that is supposed to return the user JWT.
+ * An optional closure can be specified.
+ * mySignatureCB is a callback that is presented with a nonce and is
+ * responsible for returning the signature for this nonce.
+ * An optional closure can be specified.
+ */
+s = natsOptions_SetUserCredentialsCallbacks(opts, myUserJWTCb, NULL, mySignatureCb, NULL);
+if (s == NATS_OK)
+    s = natsConnection_Connect(&nc, opts);
+```
+
+For NKey authentication, it is possible to specify the public NKey and the file containing the corresponding NKey seed. On connect, the library will load this file to look for the NKey seed and use it to sign the nonce sent by the server. The library takes care of clearing the memory where the seed is copied as soon
+as the nonce is signed.
+
+```c
+s = natsOptions_SetNKeyFromSeed(opts, "UDXU4RCSJNZOIQHZNWXHXORDPRTGNJAHAHFRGZNEEJCPQTT2M7NLCNF4", "seed.nk");
+if (s == NATS_OK)
+    s = natsConnection_Connect(&nc, opts);
+```
+The "seed.nk" file contains the NKey seed (private key). Here is an example:
+```
+$ more seed.nk
+SUACSSL3UAHUDXKFSNVUZRF5UHPMWZ6BFDTJ7M6USDXIEDNPPQYYYCU3VY
+```
+
+Finally, it is possible to specify the public NKey and the signature callback. The public key will be sent to the server and the provided callback is responsible for signing the server's nonce. When the server receives the signed nonce, it can check that it was signed poperly using the provided public key.
+
+```c
+/*
+ * myPublicKey is the user's public key, which will be sent to the server.
+ * mySignatureCB is a callback that is presented with a nonce and is
+ * responsible for returning the signature for this nonce.
+ * An optional closure can be specified.
+ */
+s = natsOptions_SetNKey(opts, myPublicKey, mySignatureCb, NULL);
+if (s == NATS_OK)
+    s = natsConnection_Connect(&nc, opts);
+```
+The signature callback can use any crypto library to sign the nonce, but also the provided `nats_Sign()` function.
+```c
+natsStatus
+mySignatureCb(
+    char            **customErrTxt,
+    unsigned char   **signature,
+    int             *signatureLength,
+    const char      *nonce,
+    void            *closure)
+{
+    // This approach requires to provide the seed (private key).
+    // Hardcoding it in the application (like in this example) may not be really safe.
+    return nats_Sign(
+        "SUACSSL3UAHUDXKFSNVUZRF5UHPMWZ6BFDTJ7M6USDXIEDNPPQYYYCU3VY",
+        nonce, signature, signatureLength);
+}
+```
+
+You can sign any content and get the signature in return. The connection must have been created with the `natsOptions_SetUserCredentialsFromFiles()` option for that to work.
+```c
+    s = natsOptions_Create(&opts);
+    if (s == NATS_OK)
+        s = natsOptions_SetUserCredentialsFromFiles(opts, "user.creds", NULL);
+    if (s == NATS_OK)
+        s = natsConnection_Connect(&nc, opts);
+
+    // Sign some arbitrary content
+    const unsigned char *content   = (const unsigned char*) "hello";
+    int                 contentLen = 5;
+    unsigned char       sig[64];
+
+    s = natsConnection_Sign(nc, content, contentLen, sig);
+    if (s == NATS_OK)
+    {
+        // Do something with signature...
+    }
+```
+
+## Advanced Usage
+
+Flushing a connection ensures that any data buffered is flushed (sent to) the NATS Server.
+
+```c
+// Flush connection to server, returns when all messages have been processed.
+natsConnection_Flush(nc);
+printf("All clear!\n");
+
+// Same as above but with a timeout value, expressed in milliseconds.
+s = natsConnection_FlushTimeout(nc, 1000);
+if (s == NATS_OK)
+    printf("All clear!\n");
+else if (s == NATS_TIMEOUT)
+    printf("Flushed timed out!\n");
+else
+    printf("Error during flush: %d - %s\n", s, natsStatus_GetText(s));
+```
+
+Auto-unsubscribe allows a subscription to be automatically removed when the subscriber has received a given number of messages. This is used internally by the `natsConnection_Request()` call.
+
+```c
+// Auto-unsubscribe after 100 messages received
+natsConnection_Subscribe(&sub, nc, "foo", onMsg, NULL);
+natsSubscription_AutoUnsubscribe(sub, 100);
+```
+
+Subscriptions can be drained. This ensures that the interest is removed from the server but that all messages that were internally queued are processed.
+
+```c
+// This call does not block.
+natsSubscription_Drain(sub);
+
+// If you want to wait for the drain to complete, call this
+// and specify a timeout. Zero or negative to wait for ever.
+natsSubscription_WaitForDrainCompletion(sub, 0);
+```
+
+Connections can be drained. This process will first put all registered subscriptions in drain mode and prevent any new subscription from being created. When all subscriptions are drained, the publish calls are drained (by the mean of a connection flush) and new publish calls will fail at this point. Then the connection is closed.
+
+```c
+// Use default timeout of 30 seconds.
+// But this call does not block. Use natsOptions_SetClosedCB() to be notified
+// that the connection is closed.
+natsConnection_Drain(nc);
+
+// To specify a timeout for the operation to complete, after which the connection
+// is forcefully closed. Here is an exampel of a timeout of 10 seconds (10,000 ms).
+natsConnection_DrainTimeout(nc, 10000);
+```
+
+You can have multiple connections in your application, mixing subscribers and publishers.
+```c
+// Create a connection 'nc1' to host1
+natsConnection_ConnectTo(&nc1, "nats://host1:4222");
+
+// Create a connection 'nc2' to host2
+natsConnection_ConnectTo(&nc2, "nats://host2:4222");
+
+// Create a subscription on 'foo' from connection 'nc1'
+natsConnection_Subscribe(&sub, nc1, "foo", onMsg, NULL);
+
+// Uses connection 'nc2' to publish a message on subject 'foo'. The subscriber
+// created previously will receive it through connection 'nc1'.
+natsConnection_PublishString(nc2, "foo", "hello");
+```
+
+The use of `natsOptions` allows you to specify options used by the `natsConnection_Connect()` call. Note that the `natsOptions` object that is  passed to this call is cloned, whhich means that any modification done to the options object will not have any effect on the connected connection.
+
+```c
+natsOptions *opts = NULL;
+
+// Create an options object
+natsOptions_Create(&opts);
+
+// Set some properties, starting with the URL to connect to:
+natsOptions_SetURL(opts, "nats://host1:4222");
+
+// Set a callback for asynchronous errors. This is useful when having an asynchronous
+// subscriber, which would otherwise have no other way of reporting an error.
+natsOptions_SetErrorHandler(opts, asyncCb, NULL);
+
+// Connect using those options:
+natsConnection_Connect(&nc, opts);
+
+// Destroy the options object to free memory. The object was cloned by the connection,
+// so the options can be safely destroyed.
+natsOptions_Destroy(opts);
+```
+
+As we have seen, all callbacks have a `void *closure` parameter. This is useful when the callback needs to perform some work and need a reference to some object. When setting up the callback, you can specify a pointer to that object.
+```c
+// Our object definition
+typedef struct __Errors
+{
+    int count;
+
+} Errors;
+
+(...)
+
+int
+main(int argc, char **argv)
+{
+    // Declare an 'Errors' object on the stack.
+    Errors asyncErrors;
+
+    // Initialize this object
+    memset(&asyncErrors, 0, sizeof(asyncErrors);
+
+    // Create a natsOptions object.
+    (...)
+
+    // Set the error callback, and pass the address of our Errors object.
+    natsOptions_SetErrorHandler(opts, asyncCb, (void*) &asyncErrors);
+
+    // Create the connection and subscriber.
+    (...)
+
+    // Say that we are done subscribing, we could check the number of errors:
+    if (asyncErrors.count > 1000)
+    {
+        printf("That's a lot of errors!\n");
+    }
+
+    (...)
+}
+```
+
+The callback would use the closure this way:
+```c
+static void
+asyncCb(natsConnection *nc, natsSubscription *sub, natsStatus err, void *closure)
+{
+    Errors *errors = (Errors*) closure;
+
+    printf("Async error: %d - %s\n", err, natsStatus_GetText(err));
+
+    errors->count++;
+}
+```
+This is the same for all other callbacks used in the C NATS library.
+
+The library can automaticall reconnect to a NATS Server if the connection breaks.
+However, the initial connect itself would fail if no server is available at the
+time of the connect. An option has been added to make the connect behaves as
+the reconnect, using the reconnect attempts and wait:
+```c
+    s = natsOptions_SetMaxReconnect(opts, 5);
+    if (s == NATS_OK)
+        s = natsOptions_SetReconnectWait(opts, 1000);
+
+    // Instruct the library to block the connect call for that
+    // long until it can get a connection or fails.
+    if (s == NATS_OK)
+        s = natsOptions_SetRetryOnFailedConnect(opts, true, NULL, NULL);
+
+    // If the server is not running, this will block for about 5 seconds.
+    s = natsConnection_Connect(&conn, opts);
+```
+
+You can make the connect asynchronous (if it can't connect immediately) by
+passing a connection handler:
+```c
+    s = natsOptions_SetMaxReconnect(opts, 5);
+    if (s == NATS_OK)
+        s = natsOptions_SetReconnectWait(opts, 1000);
+    if (s == NATS_OK)
+        s = natsOptions_SetRetryOnFailedConnect(opts, true, connectedCB, NULL);
+
+    // Start the connect. If no server is running, it should return NATS_NOT_YET_CONNECTED.
+    s = natsConnection_Connect(&conn, opts);
+    printf("natsConnection_Connect call returned: %s\n", natsStatus_GetText(s));
+
+    // Connection can be used to create subscription and publish messages (as
+    // long as the reconnect buffer is not full).
+```
+Check the example `examples/connect.c` for more use cases.
+
+You can also specify a write deadline which means that when the library is trying to
+send bytes to the NATS Server, if the connection if unhealthy but as not been reported
+as closed, calls will fail with a `NATS_TIMEOUT` error. The socket will be closed and
+the library will attempt to reconnect (unless disabled). Note that this could also
+happen in the event the server is not consuming fast enough.
+```c
+    // Sets a write deadline of 2 seconds (value is in milliseconds).
+    s = natsOptions_SetWriteDeadline(opts, 2000);
+```
+
+## Clustered Usage
+
+```c
+static char *servers[] = { "nats://localhost:1222",
+                           "nats://localhost:1223",
+                           "nats://localhost:1224"};
+
+// Setup options to include all servers in the cluster.
+// We first created an options object, and pass the list of servers, specifying
+// the number of servers on that list.
+natsOptions_SetServers(opts, servers, 3);
+
+// We could also set the amount to sleep between each reconnect attempt (expressed in
+// milliseconds), and the number of reconnect attempts.
+natsOptions_SetMaxReconnect(opts, 5);
+natsOptions_SetReconnectWait(opts, 2000);
+
+// We could also disable the randomization of the server pool
+natsOptions_SetNoRandomize(opts, true);
+
+// Setup a callback to be notified on disconnects...
+natsOptions_SetDisconnectedCB(opts, disconnectedCb, NULL);
+
+// And on reconncet
+natsOptions_SetReconnectedCB(opts, reconnectedCb, NULL);
+
+// This callback could be used to see who we are connected to on reconnect
+static void
+reconnectedCb(natsConnection *nc, void *closure)
+{
+    // Define a buffer to receive the url
+    char buffer[64];
+
+    buffer[0] = '\0';
+
+    natsConnection_GetConnectedUrl(nc, buffer, sizeof(buffer));
+    printf("Got reconnected to: %s\n", buffer);
+}
+```
+
+## Using an Event Loop Library
+
+For each connection, the `NATS` library creates a thread reading data from the socket. Publishing data results in the data being appended to a buffer, which is 'flushed' from a timer callback or in place when the buffer reaches a certain size. Flushing means that we write to the socket (and the socket is in blocking-mode).
+
+If you have multiple connections running in your process, the number of threads will increase (because each connection uses a thread for receiving data from the socket). If this becomes an issue, or if you are already using an event notification library, you can instruct the `NATS` library to use that event library instead of using a thread to do the reads, and directly writing to the socket when data is published.
+
+This works by setting the event loop and various callbacks through the `natsOptions_SetEventLoop()` API. Depending of the event loop you are using, you then have extra API calls to make. The API is in the `adapters` directory and is documented.
+
+We provide adapters for two event notification libraries: [libevent](https://github.com/libevent/libevent), and [libuv](https://github.com/libuv/libuv).
+
+```c
+// Create an event loop object
+uv_loop_t *uvLoop = uv_default_loop();
+
+// Set it into an options object
+natsOptions_SetEventLoop(opts,
+                         (void*) uvLoop,
+                         natsLibuv_Attach,
+                         natsLibuv_Read,
+                         natsLibuv_Write,
+                         natsLibuv_Detach);
+
+// Connect (as usual)
+natsConnection_Connect(&conn, opts);
+
+// Subscribe (as usual)
+natsConnection_Subscribe(&sub, conn, subj, onMsg, NULL);
+
+// Run the event loop
+uv_run(uvLoop, UV_RUN_DEFAULT);
+```
+
+The callback `onMsg` that you have registered will be triggered as usual when data becomes available.
+
+Where it becomes tricky is when publishing data. Indeed, publishing is merely putting data in a buffer, and it is the event library that will notify a callback that write to the socket should be performed. For that, the event loop needs to be 'running'.
+
+So if you publish from the thread where the event loop is running, you need to 'run' the loop after each (or a number) of publish calls in order for data to actually be sent out. Alternatively, you can publish from a different thread than the thread running the event loop.
+
+The above is important to keep in mind regarding calls that are doing request-reply. They should not be made from the thread running the event loop. Here is an example of such calls:
+
+```
+natsConnection_Request()
+natsConnection_Flush()
+natsConnection_FlushTimeout()
+...
+```
+
+Indeed, since these calls publish data and wait for a 'response', if you execute then in the event loop thread (or while the loop is not 'running'), then data will not be sent out. Calls will fail to get a response and timeout.
+
+For `natsConnection_Request()`, use the `natsConnection_PublishRequest()` instead, and have a subscriber for the response registered.
+
+For others, asynchronous version of these calls should be made available.
+
+See examples in the `examples` directory for complete usage.
+
+## FAQ
+
+Here are some of the frequently asked questions:
+
+<b>Where do I start?</b>
+
+There are several resources that will help you get started using the NATS C Client library.
+<br>
+The `examples/getstarted` directory contains very basic programs that use
+the library for simple functions such as sending a message or setting up a subscription.
+<br>
+The `examples` directory itself contains more elaborated examples that include error
+handling and more advanced APIs. You will also find examples to that show the use
+of the NATS C Client library and external event loops.
+
+<b>What about support for platform XYZ?</b>
+
+We support platforms that are available to us for development and testing. This is currently
+limited to Linux, macOS and Windows. Even then, there may be OS versions that you may have
+problem building with and we will gladly accept PRs to fix the build process as long as it
+does not break the ones we support!
+
+<b>How do I build?</b>
+
+We use cmake since it allows cross-platforms builds. This works for us. You are free to
+create your own makefile or Windows solution. If you want to use cmake, follow these
+[instructions](https://github.com/nats-io/nats.c#build).
+
+<b>I have found a bug in your library, what do I do?</b>
+
+Please report an issue [here](https://github.com/nats-io/nats.c/issues/new). Give us as much
+as possible information on how you can reproduce this. If you have a fix for it, you can
+also open a PR.
+
+<b>Is the library thread-safe?</b>
+
+All calls use internal locking where needed. As a user, you would need to do your own locking
+if you were to share the same callback with different subscribers (since the callback would
+be invoked from different threads for each subscriber).<br>
+Note that this is true for any kind of callback that exist in the NATS C library, such as
+connection or error handlers, etc.. if you specify the same callback you take the risk that
+the code in that callback may be executed from different internal threads.
+
+<b>What is the threading model of the library?</b>
+
+The library uses some threads to handle internal timers or dispatch asynchronous errors
+for instance. Here is a list of threads created as a result of the user creating NATS
+objects:
+
+- Each connection has a thread to read data from the socket. If you use an external
+event loop, this thread is not created.
+
+- Each connection has a thread responsible for flushing its outgoing buffer. If you create
+the connection with the `natsOptions_SetSendAsap()` option, this thread is not created since
+any outgoing data is flushed right away.
+
+- Each asynchronous subscription has a thread used to dispatch messages to the user callback.
+If you use `nats_SetMessageDeliveryPoolSize()`, a global thread pool (of the
+size given as a parameter to that function) is used instead of a per-async-subscription thread.
+
+<b>How do I send binary data?</b>
+
+NATS is a text protocol with message payload being a byte array. The server never interprets
+the content of a message.
+
+The natsConnection_Publish() API accepts a pointer to memory and the user provides how many
+bytes from that location need to be sent. The natsConnection_PublishString() is added for
+convenience if you want to send strings, but it is really equivalent to calling natsConnection_Publish()
+with `strlen` for the number of bytes.
+
+<b>Is the data sent in place or from a different thread?</b>
+
+For throughput reasons (and to mimic the Go client this library is based on), the client library
+uses a buffer for all socket writes. This buffer is flushed in the thread where the publish occurs
+if the buffer is full. The buffer size can be configured with natsOptions_SetIOBufSize(). You can query how
+much data is in that buffer using the natsConnection_Buffered() function.
+
+When a publish call does not fill the buffer, the call returns without any data actually sent
+to the server. A dedicated thread (the flusher thread) will flush this buffer automatically. This
+helps with throughput since the number of system calls are reduced and the number of bytes
+sent at once is higher, however, it can add latency for request/reply situations where one
+wants to send one message at a time. To that effect, natsConnection_Request() call does flush
+the buffer in place and does not rely on the flusher thread.
+
+The option natsOptions_SetSendAsap() can be used to force all publish calls from the connection
+created with this option to flush the socket buffer at every call and not add delay by relying
+on the flusher thread.
+
+<b>The publish call did not return an error, is the message guaranteed to be sent to a subscriber?</b>
+
+No! It is not even guaranteed that the server got that message. As described above, the message
+could simply be in connection's buffer, even if each publish call is flushing the socket buffer,
+after that, the call returns. There is no feedback from the server that it has actually processed
+that message. The server could have crashed after reading from the socket.
+
+Regardless if the server has gotten the message or not, there is a total decoupling between
+publishing and subscribing. If the publisher needs to know that its message has bee received
+and processed by the subscribing application, request/reply pattern should be used. Check
+natsConnection_Request() and natsConnection_PublishRequest() for more details.
+
+<b>Do I need to call natsConnection_Flush() everywhere?</b>
+
+This function is not merely flushing the socket buffer, instead it sends a `PING` protocol
+message to the server and gets a `PONG` back in a synchronous way.
+
+As previously described, if you want to flush the socket buffer to reduce latency in all
+publish calls, you should create the connection with the "send asap" option.
+
+The natsConnection_Flush() API is often used to ensure that the server has processed one of the
+protocol messages.
+
+For instance, creating a subscription is asynchronous. When the call returns, you may
+get an error if the connection was previously closed, but you would not get an error if your
+connection user has no permission to create this subscription for instance.
+
+Instead, the server sends an error message that is asynchronously received by the client library.
+Calling natsConnection_Flush() on the same connection that created the subscription ensures
+that the server has processed the subscription and if there was an error has sent that error back
+before the `PONG`. It is then possible to check the natsConnection_GetLastError()
+to figure out if the subscription was successfully registered or not.
+
+<b>How is data and protocols received from the server?</b>
+
+When you create a connection, a library thread is created to read protocols (including messages)
+from the socket. You do not have to do anything in that regard. When data is read from the socket
+it will be turned into protocols or messages and distributed to appropriate callbacks.
+
+<b>Lot of things are asynchronous, how do I know if there is an error?</b>
+
+You should set error callbacks to be notified when asynchronous errors occur. These can be
+set through the use of natsOptions. Check natsOptions_SetErrorHandler() for instance. If you
+register an error callback for a connection, should an error occurs, your registered error handler
+will be invoked.
+
+<b>Are messages from an asynchronous subscription dispatched in parallel?</b>
+
+When you create an asynchronous subscription, the library will create a thread that is responsible
+to dispatch messages for that subscription. Messages for a given subscription are dispatched
+sequentially. That is, your callback is invoked with one message at a time, and only after the
+callback returns that the library invokes it again with the next pending message.
+
+So there is a thread per connection draining data from the socket, and then messages are passed
+to the matching subscription thread that is then responsible to dispatch them.
+
+If you plan to have many subscriptions and to reduce the number of threads used by the library,
+you should look at using a library level thread pool that will take care of messages dispatching.
+See nats_SetMessageDeliveryPoolSize(). A subscription will make use of the library pool if the
+connection it was created from had the natsOptions_UseGlobalMessageDelivery() option set to true.
+
+Even when using the global pool, messages from a given subscription are always dispatched
+sequentially and from the same thread.
+
+<b>What is the SLOW CONSUMER error that I see in the server?</b>
+
+The server when sending data to a client (or route) connection sets a write deadline. That is,
+if the socket write blocks for that amount of time, it will simply close the connection.
+
+This error occurs when the client (or other server) is not reading data fast enough from the
+socket. As we have seen earlier, a client connection creates a thread whose job is to read
+data from the socket, parse it and move protocol or messages to appropriate handlers.
+
+So this is not really symptomatic of a message handler  processing messages too slowly,
+instead it is probably the result of resources issues (not enough CPU cycles to read from the
+socket, or not reading fast enough) or internal locking contention that prevents the thread
+reading from the socket to read data fast enough because it is blocked trying to acquire some
+lock.
+
+<b>What is the SLOW CONSUMER error in the client then?</b>
+
+This error, in contrast with the error reported by the server, has to do with the disptaching
+of messages to the user callback. As explained, messages are moved from the connection's
+thread reading from the socket to the subscription's thread responsible for dispatching.
+
+The subscription's internal queue as a default limited size. When the connection's thread
+cannot add a message to that queue because it is full, it will drop the message and if
+an error handler has been set, a message will be posted there.
+
+For instance, having a message handler that takes too much time processing a message is
+likely to cause a slow consumer client error if the incoming message rate is high and/or
+the subscription pending limits are not big enough.
+
+The natsSubscription_SetPendingLimits() API can be used to set the subscription's internal
+queue limits. Values of `-1` for count and/or size means that the corresponding metric will
+not be checked. Setting both to `-1` mean that the client library will queued all incoming
+messages, regardless at which speed they are dispatched, which could cause your application
+to use lots of memory.
+
+<b>What happens if the server is restarted or there is a disconnect?</b>
+
+By default, the library will try to reconnect. Reconnection options can be set to either
+disable reconnect logic entirely, or set the number of attempts and delay between attempts.
+See natsOptions_SetAllowReconnect(), natsOptions_SetMaxReconnect(), etc... for more information.
+
+If you have not set natsOptions_SetNoRadomize() to true, then the list of given URLs are randomized
+when the connection is created. When a disconnect occurs, the next URL is tried. If that fails,
+the library moves to the next. When all have been tried, the loop restart from the first until
+they have all been tried the max reconnect attempts defined through options. The library
+will pause for as long as defined in the options when trying to reconnect to a server it was
+previously connected to.
+
+If you connect to a server that has the connect URL advertise enabled (default for servers 0.9.2+),
+when servers are added to the cluster of NATS Servers, the server will send URLs of this
+new server to its clients. This augments the "pool" or URLs that the connection may have been
+created with and allows the library to reconnect to servers that have been added to the cluster.
+
+While the library is disconnected from the server, all publish or new subscription calls are
+buffered in memory. This buffer as a default size but can be configured. When this buffer is
+full, further publish or new subscription calls will report failures.<br>
+When the client library has reconnected to the server, the pending buffer will
+be flushed to the server.
+
+If your application needs to know if a disconnect occurs, or when the library has reconnected,
+you should again set some callbacks to be notified of such events. Use natsOptions_SetDisconnectedCB(),
+natsOptions_SetReconnectedCB() and natsOptions_SetClosedCB(). Note that the later is a final
+event for a connection. When this callback is invoked, the connection is no longer valid, that
+is, you will no longer receive or be able to send data with this connection.
+
+<b>Do I need to free NATS objects?</b>
+
+All objects that you create and that have a `_Destroy()` API should indeed be destroyed
+if you want to not leak memory.One that is important and often missed is `natsMsg_Destroy()` that
+needs to be called in the message handler once you are done processing the message. The
+message has been created by the library and given to you in the message handler, but you are
+responsible for calling `natsMsg_Destroy()`.
+
+<b>What is nats_ReleaseThreadMemory() doing?</b>
+
+The NATS C library may store objects using local thread storage. Threads that are created and
+handled by the library are automatically cleaned-up, however, if the user creates a thread
+and invokes some NATS APIs, there is a possibility that the library stored something in that
+thread local storage. When the thread exits, the user should call this function so that
+the library can destroy objects that it may have stored.
+
+# NATS Streaming Client
+
+## Streaming Basic Usage
+
+Note that error checking is being ignored for clarity. Check the `examples/stan` directory
+for complete usage.
+
+```
+// Connect without options
+stanConnection_Connect(&sc, cluster, clientID, NULL);
+
+// Simple Synchronous Publisher.
+// This does not return until an ack has been received from NATS Streaming
+stanConnection_Publish(sc, "foo", (const void*) "hello", 5);
+
+// Simple Async Subscriber
+stanConnection_PublishAsync(sc, "foo", (const void*) "hello", 5, _pubAckHandler, NULL);
+
+// Simple Subscription without options (default to non durable, receive new only)
+stanConnection_Subscribe(&sub, sc, "foo", onMsg, NULL, NULL);
+
+// Unsubscribe (note that for non durable subscriptions, Unsubscribe() and Close() are the same
+stanSubscription_Unsubscribe(sub);
+
+// Close connection
+stanConnection_Close(sc);
+```
+
+### Streaming Subscriptions
+
+NATS Streaming subscriptions are similar to NATS subscriptions, but clients may start their subscription at an earlier point in the message stream, allowing them to receive messages that were published before this client registered interest.
+
+The options are described with examples below:
+
+```
+// Create a Subscription Options:
+stanSubOptions *subOpts = NULL;
+
+stanSubOptions_Create(&subOpts);
+
+// Subscribe starting with most recently published value
+stanSubOptions_StartWithLastReceived(subOpts);
+
+// OR: Receive all stored messages
+stanSubOptions_DeliverAllAvailable(subOpts);
+
+// OR: Receive messages starting at a specific sequence number
+stanSubOptions_StartAtSequence(subOpts, 22);
+
+// OR: Start at messages that were stored 30 seconds ago. Value is expressed in milliseconds.
+stanSubOptions_StartAtTimeDelta(subOpts, 30000);
+
+// Create the subscription with options
+stanConnection_Subscribe(&sub, sc, "foo", onMsg, NULL, subOpts);
+```
+
+### Streaming Durable Subscriptions
+
+Replay of messages offers great flexibility for clients wishing to begin processing at some earlier point in the data stream.
+However, some clients just need to pick up where they left off from an earlier session, without having to manually track their position in the stream of messages.
+Durable subscriptions allow clients to assign a durable name to a subscription when it is created.
+Doing this causes the NATS Streaming server to track the last acknowledged message for that clientID + durable name, so that only messages since the last acknowledged message will be delivered to the client.
+
+```
+stanConnection_Connect(&sc, "test-cluster", "client-123", NULL);
+
+// Create subscription options
+stanSubOptions_Create(&subOpts);
+
+// Set a durable name
+stanSubOptions_SetDurableName(subOpts, "my-durable");
+
+// Subscribe
+stanConnection_Subscribe(&sub, sc, "foo", onMsg, NULL, subOpts);
+...
+// client receives message sequence 1-40
+...
+// client disconnects for an hour
+...
+// client reconnects with same clientID "client-123"
+stanConnection_Connect(&sc, "test-cluster", "client-123", NULL);
+
+// client re-subscribes to "foo" with same durable name "my-durable"
+stanSubOptions_Create(&subOpts);
+stanSubOptions_SetDurableName(subOpts, "my-durable");
+stanConnection_Subscribe(&sub, sc, "foo", onMsg, NULL, subOpts);
+...
+// client receives messages 41-current
+```
+
+### Streaming Queue Groups
+
+All subscriptions with the same queue name (regardless of the connection
+they originate from) will form a queue group.
+Each message will be delivered to only one subscriber per queue group,
+using queuing semantics. You can have as many queue groups as you wish.
+
+Normal subscribers will continue to work as expected.
+
+#### Creating a Queue Group
+
+A queue group is automatically created when the first queue subscriber is
+created. If the group already exists, the member is added to the group.
+
+```
+stanConnection_Connect(&sc, "test-cluster", "clientid", NULL);
+
+// Create a queue subscriber on "foo" for group "bar"
+stanConnection_QueueSubscribe(&qsub1, "foo", "bar", onMsg, NULL, NULL);
+
+// Add a second member
+stanConnection_QueueSubscribe(&qsub2, "foo", "bar", onMsg, NULL, NULL);
+
+// Notice that you can have a regular subscriber on that subject
+stanConnection_Subscribe(&sub, sc, "foo", onMsg, NULL, NULL);
+
+// A message on "foo" will be received by sub and qsub1 or qsub2.
+```
+
+#### Start Position
+
+Note that once a queue group is formed, a member's start position is ignored
+when added to the group. It will start receive messages from the last
+position in the group.
+
+Suppose the channel `foo` exists and there are `500` messages stored, the group
+`bar` is already created, there are two members and the last
+message sequence sent is `100`. A new member is added. Note its start position:
+
+```
+stanSubOptions_Create(&subOpts);
+stanSubOptions_StartAtSequence(subOpts, 200);
+
+stanConnection_QueueSubscribe(&qsub, "foo", "bar", onMsg, NULL, subOpts);
+```
+
+This will not produce an error, but the start position will be ignored. Assuming
+this member would be the one receiving the next message, it would receive message
+sequence `101`.
+
+#### Leaving the Group
+
+There are two ways of leaving the group: closing the subscriber's connection or
+calling `Unsubscribe`:
+
+```
+// Have qsub leave the queue group
+stanSubscription_Unsubscribe(qsub);
+```
+
+If the leaving member had un-acknowledged messages, those messages are reassigned
+to the remaining members.
+
+#### Closing a Queue Group
+
+There is no special API for that. Once all members have left (either calling `Unsubscribe`,
+or their connections are closed), the group is removed from the server.
+
+The next call to `QueueSubscribe` with the same group name will create a brand new group,
+that is, the start position will take effect and delivery will start from there.
+
+### Streaming Durable Queue Groups
+
+As described above, for non durable queue subscribers, when the last member leaves the group,
+that group is removed. A durable queue group allows you to have all members leave but still
+maintain state. When a member re-joins, it starts at the last position in that group.
+
+#### Creating a Durable Queue Group
+
+A durable queue group is created in a similar manner as that of a standard queue group,
+except the `DurableName` option must be used to specify durability.
+
+```
+stanSubOptions_Create(&subOpts);
+stanSubOptions_SetDurableName(subOpts, "dur");
+
+stanConnection_QueueSubscribe(&qsub, "foo", "bar", onMsg, NULL, subOpts);
+```
+A group called `dur:bar` (the concatenation of durable name and group name) is created in
+the server. This means two things:
+
+- The character `:` is not allowed for a queue subscriber's durable name.
+- Durable and non-durable queue groups with the same name can coexist.
+
+```
+// Non durable queue subscriber on group "bar"
+stanConnection_QueueSubscribe(&qsub, "foo", "bar", onMsg, NULL, NULL);
+
+// Durable queue subscriber on group "bar"
+stanSubOptions_Create(&subOpts);
+stanSubOptions_SetDurableName(subOpts, "mydurablegroup");
+stanConnection_QueueSubscribe(&qsub, "foo", "bar", onMsg, NULL, subOpts);
+
+// The same message produced on "foo" would be received by both queue subscribers.
+```
+
+#### Start Position of the Durable Queue Group
+
+The rules for non-durable queue subscribers apply to durable subscribers.
+
+#### Leaving the Durable Queue Group
+
+As for non-durable queue subscribers, if a member's connection is closed, or if
+`Unsubscribe` its called, the member leaves the group. Any unacknowledged message
+is transferred to remaining members. See *Closing the Group* for important difference
+with non-durable queue subscribers.
+
+#### Closing the Durable Queue Group
+
+The *last* member calling `Unsubscribe` will close (that is destroy) the
+group. So if you want to maintain durability of the group, you should not be
+calling `Unsubscribe`.
+
+So unlike for non-durable queue subscribers, it is possible to maintain a queue group
+with no member in the server. When a new member re-joins the durable queue group,
+it will resume from where the group left of, actually first receiving all unacknowledged
+messages that may have been left when the last member previously left.
+
+
+### Streaming Wildcard Subscriptions
+
+NATS Streaming subscriptions **do not** support wildcards.
+
+
+## Streaming Advanced Usage
+
+### Connection Status
+
+The fact that the NATS Streaming server and clients are not directly connected poses a challenge when it comes to know if a client is still valid.
+When a client disconnects, the streaming server is not notified, hence the importance of calling `stanConnection_Close()`. The server sends heartbeats
+to the client's private inbox and if it misses a certain number of responses, it will consider the client's connection lost and remove it
+from its state.
+
+Why do we need PINGs? Picture the case where a client connects to a NATS Server which has a route to a NATS Streaming server (either connecting
+to a standalone NATS Server or the server it embeds). If the connection between the streaming server and the client's NATS Server is broken,
+the client's NATS connection would still be ok, yet, no communication with the streaming server is possible.
+
+Starting with NATS Streaming Server `0.10.2`, the client library will send PINGs at regular intervals (default is 5 seconds)
+and will close the streaming connection after a certain number of PINGs have been sent without any response (default is 3). When that
+happens, a callback - if one is registered - will be invoked to notify the user that the connection is permanently lost, and the reason
+for the failure.
+
+Here is how you would specify your own PING values and the callback:
+
+```
+stanConnOptions_Create(&connOpts);
+
+// Send PINGs every 10 seconds, and fail after 5 PINGs without any response.
+stanConnOptions_SetPings(connOpts, 10, 5);
+
+// Add a callback to be notified if the STAN connection is lost for good.
+stanConnOptions_SetConnectionLostHandler(connOpts, connectionLostCB, NULL);
+
+// Here is an example of the `connectionLostCB`:
+connectionLostCB(stanConnection *sc, const char *errTxt, void *closure)
+{
+    printf("Connection lost: %s\n", errTxt);
+}
+```
+
+Note that the only way to be notified in your application is to set the callback. If the callback is not set, PINGs are still sent and the connection
+will be closed if needed, but the application won't know if it has only subscriptions. A default callback is used to simply
+print to standard error the clusterID, the clientID and the error that caused the connection to be lost:
+```
+Connection permanently lost: clusterID=test-cluster clientID=client error=connection lost due to PING failure
+```
+
+When the connection is lost, your application would have to re-create it and all subscriptions if any.
+
+The library creates its own NATS connection and sets set the reconnect attempts to "infinite". It should therefore be possible
+for the library to always reconnect, but this does not mean that the streaming connection will not be closed, even if you set
+a very high threshold for the PINGs max out value. Keep in mind that while the client is disconnected, the server is sending
+heartbeats to the clients too, and when not getting any response, it will remove that client from its state. When the
+communication is restored, the PINGs sent to the server will allow to detect this condition and report to the client that
+the connection is now closed.
+
+Also, while a client is "disconnected" from the server, another application with connectivity to the streaming server may
+connect and uses the same client ID. The server, when detecting the duplicate client ID, will try to contact the first client
+to know if it should reject the connect request of the second client. Since the communication between the server and the
+first client is broken, the server will not get a response and therefore will replace the first client with the second one.
+
+Prior to NATS Streaming Server `0.10.2`, if the communication between the first client and server were to be restored,
+and the application would send messages, the server would accept those because the published messages client ID would be
+valid, although the client is not. With a server `0.10.2+`, additional information is sent with each message to allow
+the server to reject messages from a client that has been replaced by another client.
+
+### Asynchronous Publishing
+
+The basic publish API (`stanConnection_Publish()`) is synchronous; it does not return control to the caller until the
+NATS Streaming server has acknowledged receipt of the message. To accomplish this, a unique identifier (GUID) is generated for
+the message on creation, and the client library waits for a publish acknowledgment from the server with a matching GUID before
+it returns control to the caller, possibly with an error indicating that the operation was not successful due to some server
+problem or authorization error.
+
+Advanced users may wish to process these publish acknowledgments manually to achieve higher publish throughput by not
+waiting on individual acknowledgments during the publish operation. An asynchronous publish API is provided for this purpose:
+
+```
+static void
+_pubAckHandler(const char *guid, const char *error, void *closure)
+{
+    // Note: this callback can be invoked by different threads
+    if (error != NULL)
+        printf("pub ack for guid:%s error:%s\n", guid, error);
+    else
+        printf("Received ack for msg id %s\n", guid);
+}
+
+(...)
+
+s = stanConnection_PublishAsync(sc, "foo", (const void*) "hello", 5, _pubAckHandler, NULL);
+if (s != NULL)
+{
+    printf("Error on publish: %d - %s\n", s, natsStatus_GetText(s));
+    nats_PrintLastErrorStack(stderr);
+}
+```
+If you want to correlate the published message with the guid in the acknowledgment handler, you should pass
+a unique closure as the last argument of the `stanConnection_PublishAsync()` call. Check the `examples/stan/pub-async.c`
+file for an example on how to do so.
+
+### Message Acknowledgments and Redelivery
+
+NATS Streaming offers At-Least-Once delivery semantics, meaning that once a message has been delivered to an eligible subscriber,
+if an acknowledgment is not received within the configured timeout interval, NATS Streaming will attempt redelivery of the message.
+This timeout interval is specified by the subscription option `stanSubOptions_SetAckWait()`, which defaults to 30 seconds.
+
+By default, messages are automatically acknowledged by the NATS Streaming client library after the subscriber's message handler
+is invoked. However, there may be cases in which the subscribing client wishes to accelerate or defer acknowledgment of the message.
+To do this, the client must set manual acknowledgment mode on the subscription, and invoke `stanSubscription_AckMsg()`. ex:
+
+```
+// Subscribe with manual ack mode, and set AckWait to 60 seconds
+stanSubOptions_Create(&subOpts);
+stanSubOptions_SetManualAckMode(subOpts, true);
+stanSubOptions_SetAckWait(subOpts, 60000);
+stanConnection_Subscribe(&sub, sc, "foo", onMsg, NULL, subOpts);
+
+// In the callback
+void
+onMsg(stanConnection *sc, stanSubscription *sub, const char *channel, stanMsg *msg, void *closure)
+{
+       // ack message before performing I/O intensive operation
+    stanSubscription_AckMsg(sub, msg);
+
+       printf("Received a message on %s: %.*s\n",
+        channel,
+        stanMsg_GetDataLength(msg),
+        stanMsg_GetData(msg));
+}
+```
+
+## Rate limiting/matching
+
+A classic problem of publish-subscribe messaging is matching the rate of message producers with the rate of message consumers.
+Message producers can often outpace the speed of the subscribers that are consuming their messages.
+This mismatch is commonly called a "fast producer/slow consumer" problem, and may result in dramatic resource utilization spikes
+in the underlying messaging system as it tries to buffer messages until the slow consumer(s) can catch up.
+
+### Publisher rate limiting
+
+NATS Streaming provides a connection option called `stanConnOptions_SetMaxPubAcksInflight()` that effectively limits the number
+of unacknowledged messages that a publisher may have in-flight at any given time. When this maximum is reached, further publish
+calls will block until the number of unacknowledged messages falls below the specified limit. ex:
+
+```
+stanConnOptions_Create(&connOpts);
+stanConnOptions_SetMaxPubAcksInflight(connOpts, 25, 1.0);
+stanConnection_Connect(&sc, cluster, clientID, connOpts);
+
+(...)
+static void
+_pubAckHandler(const char *guid, const char *error, void *closure)
+{
+    // process the ack
+    ...
+}
+
+(...)
+
+for (i = 1; i < 1000; i++)
+{
+    // If the server is unable to keep up with the publisher, the number of outstanding acks will eventually
+    // reach the max and this call will block
+    stanConnection_PublishAsync(sc, "foo", (const void*) "hello", 5, _pubAckHandler, NULL);
+}
+```
+
+Note the last parameter of `stanConnOptions_SetMaxPubAcksInflight()`. This is a float indicating the percentage
+of outstanding ACKs to fall below before being allowed to send more messages. For instance, if the maximum is
+1000 and percentage is 50% (0.5), the it means that if the publish calls were to be blocked because the
+library has sent 1000 messages and not received an ACK yet from the server, the publish calls would be unblocked
+only when the library has received 500 ACKs from the server. This prevents the connection from being blocked and
+unblocked for each message when the limit has been reached.
+
+### Subscriber rate limiting
+
+Rate limiting may also be accomplished on the subscriber side, on a per-subscription basis, using a subscription
+option called `stanSubOptions_SetMaxInflight()`. This option specifies the maximum number of outstanding acknowledgments
+(messages that have been delivered but not acknowledged) that NATS Streaming will allow for a given subscription.
+When this limit is reached, NATS Streaming will suspend delivery of messages to this subscription until the number
+of unacknowledged messages falls below the specified limit. ex:
+
+```
+// Subscribe with manual ack mode and a max in-flight limit of 25
+stanSubOptions_Create(&subOpts);
+stanSubOptions_SetManualAckMode(subOpts, true);
+stanSubOptions_SetMaxInflight(subOpts, 25);
+stanConnection_Subscribe(&sub, "foo", onMsg, NULL, subOpts);
+
+// In the callback
+void
+onMsg(stanConnection *sc, stanSubscription *sub, const char *channel, stanMsg *msg, void *closure)
+{
+    printf("Received a message\n");
+    ...
+    // Does not ack, or takes a very long time to ack
+    ...
+    // Message delivery will suspend when the number of unacknowledged messages reaches 25
+}
+```
+However, the server will redeliver messages for which it did not receive an acknowledgment for more than the
+value passed in `stanSubOptions_SetAckWait()` (or 30 seconds by default).
+
+# License
+
+Unless otherwise noted, the NATS source files are distributed
+under the Apache Version 2.0 license found in the LICENSE file.
diff --git a/buildOnTravis.sh b/buildOnTravis.sh
new file mode 100755 (executable)
index 0000000..82516f6
--- /dev/null
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+# $1 is compiler (gcc, clang)
+# $2 is "coverage" for coverage
+# $3 is build options to pass to cmake
+# $4 is test options to pass to ctest
+
+echo "compiler   = " $1
+echo "coverage   = " $2
+echo "build opts = " $3
+echo "test opts  = " $4
+
+if [ "$1" != "gcc" ]; then
+  if [ "$2" = "coverage" ]; then
+    # only coverage for gcc compiler
+    exit 0
+  fi
+fi
+
+cmake .. $3
+res=$?
+if [ $res -ne 0 ]; then
+  exit $res
+fi
+
+make rebuild_cache && make
+res=$?
+if [ $res -ne 0 ]; then
+  exit $res
+fi
+
+echo "Test app using dynamic library does not crash if no NATS call is made"
+test/dylib/nonats
+res=$?
+if [ $res -ne 0 ]; then
+  exit $res
+fi
+export NATS_TEST_SERVER_VERSION="$(nats-server -v)"
+export NATS_TEST_TRAVIS=yes
+if [ "$2" = "coverage" ]; then
+  make coveralls
+else
+  ctest --timeout 60 --output-on-failure $4
+fi
+res=$?
+if [ $res -ne 0 ]; then
+  exit $res
+fi
diff --git a/dependencies.md b/dependencies.md
new file mode 100644 (file)
index 0000000..1f7ca8e
--- /dev/null
@@ -0,0 +1,8 @@
+# External Dependencies
+
+This file lists the dependencies used in this repository.
+
+| Dependency | License |
+|-|-|
+| github.com/nats-io/nats.c | Apache License 2.0 |
+| github.com/JoakimSoderberg/coveralls-cmake | MIT |
diff --git a/doc/DoxyFile.NATS.Client b/doc/DoxyFile.NATS.Client
new file mode 100644 (file)
index 0000000..e4a5a27
--- /dev/null
@@ -0,0 +1,2685 @@
+# Doxyfile 1.9.5
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project.
+#
+# All text after a double hash (##) is considered a comment and is placed in
+# front of the TAG it is preceding.
+#
+# All text after a single hash (#) is considered a comment and will be ignored.
+# The format is:
+# TAG = value [value, ...]
+# For lists, items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (\" \").
+#
+# Note:
+#
+# Use doxygen to compare the used configuration file with the template
+# configuration file:
+# doxygen -x [configFile]
+# Use doxygen to compare the used configuration file with the template
+# configuration file without replacing the environment variables or CMake type
+# replacement variables:
+# doxygen -x_noenv [configFile]
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the configuration
+# file that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
+# https://www.gnu.org/software/libiconv/ for the list of possible encodings.
+# The default value is: UTF-8.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
+# double-quotes, unless you are using Doxywizard) that should identify the
+# project for which the documentation is generated. This name is used in the
+# title of most generated pages and in a few other places.
+# The default value is: My Project.
+
+PROJECT_NAME           = "NATS C Client with JetStream and Streaming support"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
+# could be handy for archiving the generated documentation or if some version
+# control system is used.
+
+PROJECT_NUMBER         = 3.4.1
+
+# Using the PROJECT_BRIEF tag one can provide an optional one line description
+# for a project that appears at the top of each page and should give viewer a
+# quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF          = "The nats.io C Client, Supported by Synadia Communications Inc."
+
+# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
+# in the documentation. The maximum height of the logo should not exceed 55
+# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
+# the logo to the output directory.
+
+PROJECT_LOGO           =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
+# into which the generated documentation will be written. If a relative path is
+# entered, it will be relative to the location where doxygen was started. If
+# left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = .
+
+# If the CREATE_SUBDIRS tag is set to YES then doxygen will create up to 4096
+# sub-directories (in 2 levels) under the output directory of each output format
+# and will distribute the generated files over these directories. Enabling this
+# option can be useful when feeding doxygen a huge amount of source files, where
+# putting all generated files in the same directory would otherwise causes
+# performance problems for the file system. Adapt CREATE_SUBDIRS_LEVEL to
+# control the number of sub-directories.
+# The default value is: NO.
+
+CREATE_SUBDIRS         = NO
+
+# Controls the number of sub-directories that will be created when
+# CREATE_SUBDIRS tag is set to YES. Level 0 represents 16 directories, and every
+# level increment doubles the number of directories, resulting in 4096
+# directories at level 8 which is the default and also the maximum value. The
+# sub-directories are organized in 2 levels, the first level always has a fixed
+# numer of 16 directories.
+# Minimum value: 0, maximum value: 8, default value: 8.
+# This tag requires that the tag CREATE_SUBDIRS is set to YES.
+
+CREATE_SUBDIRS_LEVEL   = 8
+
+# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
+# characters to appear in the names of generated files. If set to NO, non-ASCII
+# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
+# U+3044.
+# The default value is: NO.
+
+ALLOW_UNICODE_NAMES    = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Bulgarian,
+# Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, English
+# (United States), Esperanto, Farsi (Persian), Finnish, French, German, Greek,
+# Hindi, Hungarian, Indonesian, Italian, Japanese, Japanese-en (Japanese with
+# English messages), Korean, Korean-en (Korean with English messages), Latvian,
+# Lithuanian, Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese,
+# Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish,
+# Swedish, Turkish, Ukrainian and Vietnamese.
+# The default value is: English.
+
+OUTPUT_LANGUAGE        = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
+# descriptions after the members that are listed in the file and class
+# documentation (similar to Javadoc). Set to NO to disable this.
+# The default value is: YES.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief
+# description of a member or function before the detailed description
+#
+# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+# The default value is: YES.
+
+REPEAT_BRIEF           = NO
+
+# This tag implements a quasi-intelligent brief description abbreviator that is
+# used to form the text in various listings. Each string in this list, if found
+# as the leading text of the brief description, will be stripped from the text
+# and the result, after processing the whole list, is used as the annotated
+# text. Otherwise, the brief description is used as-is. If left blank, the
+# following values are used ($name is automatically replaced with the name of
+# the entity):The $name class, The $name widget, The $name file, is, provides,
+# specifies, contains, represents, a, an and the.
+
+ABBREVIATE_BRIEF       = "The $name class" \
+                         "The $name widget" \
+                         "The $name file" \
+                         is \
+                         provides \
+                         specifies \
+                         contains \
+                         represents \
+                         a \
+                         an \
+                         the
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# doxygen will generate a detailed section even if there is only a brief
+# description.
+# The default value is: NO.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+# The default value is: NO.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path
+# before files name in the file list and in the header files. If set to NO the
+# shortest path that makes the file name unique will be used
+# The default value is: YES.
+
+FULL_PATH_NAMES        = NO
+
+# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
+# Stripping is only done if one of the specified strings matches the left-hand
+# part of the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the path to
+# strip.
+#
+# Note that you can specify absolute paths here, but also relative paths, which
+# will be relative from the directory where doxygen is started.
+# This tag requires that the tag FULL_PATH_NAMES is set to YES.
+
+STRIP_FROM_PATH        =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
+# path mentioned in the documentation of a class, which tells the reader which
+# header file to include in order to use a class. If left blank only the name of
+# the header file containing the class definition is used. Otherwise one should
+# specify the list of include paths that are normally passed to the compiler
+# using the -I flag.
+
+STRIP_FROM_INC_PATH    =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
+# less readable) file names. This can be useful is your file systems doesn't
+# support long names like on DOS, Mac, or CD-ROM.
+# The default value is: NO.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
+# first line (until the first dot) of a Javadoc-style comment as the brief
+# description. If set to NO, the Javadoc-style will behave just like regular Qt-
+# style comments (thus requiring an explicit @brief command for a brief
+# description.)
+# The default value is: NO.
+
+JAVADOC_AUTOBRIEF      = NO
+
+# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line
+# such as
+# /***************
+# as being the beginning of a Javadoc-style comment "banner". If set to NO, the
+# Javadoc-style will behave just like regular comments and it will not be
+# interpreted by doxygen.
+# The default value is: NO.
+
+JAVADOC_BANNER         = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
+# line (until the first dot) of a Qt-style comment as the brief description. If
+# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
+# requiring an explicit \brief command for a brief description.)
+# The default value is: NO.
+
+QT_AUTOBRIEF           = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
+# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
+# a brief description. This used to be the default behavior. The new default is
+# to treat a multi-line C++ comment block as a detailed description. Set this
+# tag to YES if you prefer the old behavior instead.
+#
+# Note that setting this tag to YES also means that rational rose comments are
+# not recognized any more.
+# The default value is: NO.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# By default Python docstrings are displayed as preformatted text and doxygen's
+# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the
+# doxygen's special commands can be used and the contents of the docstring
+# documentation blocks is shown as doxygen documentation.
+# The default value is: YES.
+
+PYTHON_DOCSTRING       = YES
+
+# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
+# documentation from any documented member that it re-implements.
+# The default value is: YES.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new
+# page for each member. If set to NO, the documentation of a member will be part
+# of the file/class/namespace that contains it.
+# The default value is: NO.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
+# uses this value to replace tabs by spaces in code fragments.
+# Minimum value: 1, maximum value: 16, default value: 4.
+
+TAB_SIZE               = 4
+
+# This tag can be used to specify a number of aliases that act as commands in
+# the documentation. An alias has the form:
+# name=value
+# For example adding
+# "sideeffect=@par Side Effects:^^"
+# will allow you to put the command \sideeffect (or @sideeffect) in the
+# documentation, which will result in a user-defined paragraph with heading
+# "Side Effects:". Note that you cannot put \n's in the value part of an alias
+# to insert newlines (in the resulting output). You can put ^^ in the value part
+# of an alias to insert a newline as if a physical newline was in the original
+# file. When you need a literal { or } or , in the value part of an alias you
+# have to escape them by means of a backslash (\), this can lead to conflicts
+# with the commands \{ and \} for these it is advised to use the version @{ and
+# @} or use a double escape (\\{ and \\})
+
+ALIASES                =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C. For
+# instance, some of the names that are used will be different. The list of all
+# members will be omitted, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_FOR_C  = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
+# Python sources only. Doxygen will then generate output that is more tailored
+# for that language. For instance, namespaces will be presented as packages,
+# qualified scopes will look different, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_JAVA   = YES
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources. Doxygen will then generate output that is tailored for Fortran.
+# The default value is: NO.
+
+OPTIMIZE_FOR_FORTRAN   = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for VHDL.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_VHDL   = NO
+
+# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice
+# sources only. Doxygen will then generate output that is more tailored for that
+# language. For instance, namespaces will be presented as modules, types will be
+# separated into more groups, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_SLICE  = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given
+# extension. Doxygen has a built-in mapping, but you can override or extend it
+# using this tag. The format is ext=language, where ext is a file extension, and
+# language is one of the parsers supported by doxygen: IDL, Java, JavaScript,
+# Csharp (C#), C, C++, Lex, D, PHP, md (Markdown), Objective-C, Python, Slice,
+# VHDL, Fortran (fixed format Fortran: FortranFixed, free formatted Fortran:
+# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser
+# tries to guess whether the code is fixed or free formatted code, this is the
+# default for Fortran type files). For instance to make doxygen treat .inc files
+# as Fortran files (default is PHP), and .f files as C (default is Fortran),
+# use: inc=Fortran f=C.
+#
+# Note: For files without extension you can use no_extension as a placeholder.
+#
+# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
+# the files are not read by doxygen. When specifying no_extension you should add
+# * to the FILE_PATTERNS.
+#
+# Note see also the list of default file extension mappings.
+
+EXTENSION_MAPPING      =
+
+# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
+# according to the Markdown format, which allows for more readable
+# documentation. See https://daringfireball.net/projects/markdown/ for details.
+# The output of markdown processing is further processed by doxygen, so you can
+# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
+# case of backward compatibilities issues.
+# The default value is: YES.
+
+MARKDOWN_SUPPORT       = YES
+
+# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up
+# to that level are automatically included in the table of contents, even if
+# they do not have an id attribute.
+# Note: This feature currently applies only to Markdown headings.
+# Minimum value: 0, maximum value: 99, default value: 5.
+# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
+
+TOC_INCLUDE_HEADINGS   = 5
+
+# When enabled doxygen tries to link words that correspond to documented
+# classes, or namespaces to their corresponding documentation. Such a link can
+# be prevented in individual cases by putting a % sign in front of the word or
+# globally by setting AUTOLINK_SUPPORT to NO.
+# The default value is: YES.
+
+AUTOLINK_SUPPORT       = YES
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should set this
+# tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string);
+# versus func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+# The default value is: NO.
+
+BUILTIN_STL_SUPPORT    = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+# The default value is: NO.
+
+CPP_CLI_SUPPORT        = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
+# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen
+# will parse them like normal C++ but will assume all classes use public instead
+# of private inheritance when no explicit protection keyword is present.
+# The default value is: NO.
+
+SIP_SUPPORT            = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate
+# getter and setter methods for a property. Setting this option to YES will make
+# doxygen to replace the get and set methods by a property in the documentation.
+# This will only work if the methods are indeed getting or setting a simple
+# type. If this is not the case, or you want to show the methods anyway, you
+# should set this option to NO.
+# The default value is: YES.
+
+IDL_PROPERTY_SUPPORT   = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+# The default value is: NO.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# If one adds a struct or class to a group and this option is enabled, then also
+# any nested class or struct is added to the same group. By default this option
+# is disabled and one has to add nested compounds explicitly via \ingroup.
+# The default value is: NO.
+
+GROUP_NESTED_COMPOUNDS = NO
+
+# Set the SUBGROUPING tag to YES to allow class member groups of the same type
+# (for instance a group of public functions) to be put as a subgroup of that
+# type (e.g. under the Public Functions section). Set it to NO to prevent
+# subgrouping. Alternatively, this can be done per class using the
+# \nosubgrouping command.
+# The default value is: YES.
+
+SUBGROUPING            = NO
+
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
+# are shown inside the group in which they are included (e.g. using \ingroup)
+# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
+# and RTF).
+#
+# Note that this feature does not work in combination with
+# SEPARATE_MEMBER_PAGES.
+# The default value is: NO.
+
+INLINE_GROUPED_CLASSES = NO
+
+# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
+# with only public data fields or simple typedef fields will be shown inline in
+# the documentation of the scope in which they are defined (i.e. file,
+# namespace, or group documentation), provided this scope is documented. If set
+# to NO, structs, classes, and unions are shown on a separate page (for HTML and
+# Man pages) or section (for LaTeX and RTF).
+# The default value is: NO.
+
+INLINE_SIMPLE_STRUCTS  = NO
+
+# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
+# enum is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically be
+# useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+# The default value is: NO.
+
+TYPEDEF_HIDES_STRUCT   = NO
+
+# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
+# cache is used to resolve symbols given their name and scope. Since this can be
+# an expensive process and often the same symbol appears multiple times in the
+# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
+# doxygen will become slower. If the cache is too large, memory is wasted. The
+# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
+# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
+# symbols. At the end of a run doxygen will report the cache usage and suggest
+# the optimal cache size from a speed point of view.
+# Minimum value: 0, maximum value: 9, default value: 0.
+
+LOOKUP_CACHE_SIZE      = 0
+
+# The NUM_PROC_THREADS specifies the number of threads doxygen is allowed to use
+# during processing. When set to 0 doxygen will based this on the number of
+# cores available in the system. You can set it explicitly to a value larger
+# than 0 to get more control over the balance between CPU load and processing
+# speed. At this moment only the input processing can be done using multiple
+# threads. Since this is still an experimental feature the default is set to 1,
+# which effectively disables parallel processing. Please report any issues you
+# encounter. Generating dot graphs in parallel is controlled by the
+# DOT_NUM_THREADS setting.
+# Minimum value: 0, maximum value: 32, default value: 1.
+
+NUM_PROC_THREADS       = 1
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in
+# documentation are documented, even if no documentation was available. Private
+# class members and static file members will be hidden unless the
+# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
+# Note: This will also disable the warnings about undocumented members that are
+# normally produced when WARNINGS is set to YES.
+# The default value is: NO.
+
+EXTRACT_ALL            = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
+# be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual
+# methods of a class will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PRIV_VIRTUAL   = NO
+
+# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
+# scope will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PACKAGE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be
+# included in the documentation.
+# The default value is: NO.
+
+EXTRACT_STATIC         = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
+# locally in source files will be included in the documentation. If set to NO,
+# only classes defined in header files are included. Does not have any effect
+# for Java sources.
+# The default value is: YES.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. If set to YES, local methods,
+# which are defined in the implementation section but not in the interface are
+# included in the documentation. If set to NO, only methods in the interface are
+# included.
+# The default value is: NO.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base name of
+# the file that contains the anonymous namespace. By default anonymous namespace
+# are hidden.
+# The default value is: NO.
+
+EXTRACT_ANON_NSPACES   = NO
+
+# If this flag is set to YES, the name of an unnamed parameter in a declaration
+# will be determined by the corresponding definition. By default unnamed
+# parameters remain unnamed in the output.
+# The default value is: YES.
+
+RESOLVE_UNNAMED_PARAMS = YES
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
+# undocumented members inside documented classes or files. If set to NO these
+# members will be included in the various overviews, but no documentation
+# section is generated. This option has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_MEMBERS     = YES
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy. If set
+# to NO, these classes will be included in the various overviews. This option
+# has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_CLASSES     = YES
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
+# declarations. If set to NO, these declarations will be included in the
+# documentation.
+# The default value is: NO.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
+# documentation blocks found inside the body of a function. If set to NO, these
+# blocks will be appended to the function's detailed documentation block.
+# The default value is: NO.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation that is typed after a
+# \internal command is included. If the tag is set to NO then the documentation
+# will be excluded. Set it to YES to include the internal documentation.
+# The default value is: NO.
+
+INTERNAL_DOCS          = NO
+
+# With the correct setting of option CASE_SENSE_NAMES doxygen will better be
+# able to match the capabilities of the underlying filesystem. In case the
+# filesystem is case sensitive (i.e. it supports files in the same directory
+# whose names only differ in casing), the option must be set to YES to properly
+# deal with such files in case they appear in the input. For filesystems that
+# are not case sensitive the option should be set to NO to properly deal with
+# output files written for symbols that only differ in casing, such as for two
+# classes, one named CLASS and the other named Class, and to also support
+# references to files without having to specify the exact matching casing. On
+# Windows (including Cygwin) and MacOS, users should typically set this option
+# to NO, whereas on Linux or other Unix flavors it should typically be set to
+# YES.
+# Possible values are: SYSTEM, NO and YES.
+# The default value is: SYSTEM.
+
+CASE_SENSE_NAMES       = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
+# their full class and namespace scopes in the documentation. If set to YES, the
+# scope will be hidden.
+# The default value is: NO.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
+# append additional text to a page's title, such as Class Reference. If set to
+# YES the compound reference will be hidden.
+# The default value is: NO.
+
+HIDE_COMPOUND_REFERENCE= NO
+
+# If the SHOW_HEADERFILE tag is set to YES then the documentation for a class
+# will show which file needs to be included to use the class.
+# The default value is: YES.
+
+SHOW_HEADERFILE        = YES
+
+# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
+# the files that are included by a file in the documentation of that file.
+# The default value is: YES.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
+# grouped member an include statement to the documentation, telling the reader
+# which file to include in order to use the member.
+# The default value is: NO.
+
+SHOW_GROUPED_MEMB_INC  = NO
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
+# files with double quotes in the documentation rather than with sharp brackets.
+# The default value is: NO.
+
+FORCE_LOCAL_INCLUDES   = NO
+
+# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
+# documentation for inline members.
+# The default value is: YES.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
+# (detailed) documentation of file and class members alphabetically by member
+# name. If set to NO, the members will appear in declaration order.
+# The default value is: YES.
+
+SORT_MEMBER_DOCS       = NO
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
+# descriptions of file, namespace and class members alphabetically by member
+# name. If set to NO, the members will appear in declaration order. Note that
+# this will also influence the order of the classes in the class list.
+# The default value is: NO.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
+# (brief and detailed) documentation of class members so that constructors and
+# destructors are listed first. If set to NO the constructors will appear in the
+# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
+# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
+# member documentation.
+# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
+# detailed member documentation.
+# The default value is: NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
+# of group names into alphabetical order. If set to NO the group names will
+# appear in their defined order.
+# The default value is: NO.
+
+SORT_GROUP_NAMES       = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
+# fully-qualified names, including namespaces. If set to NO, the class list will
+# be sorted only by class name, not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the alphabetical
+# list.
+# The default value is: NO.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
+# type resolution of all parameters of a function it will reject a match between
+# the prototype and the implementation of a member function even if there is
+# only one candidate or it is obvious which candidate to choose by doing a
+# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
+# accept a match between prototype and implementation in such cases.
+# The default value is: NO.
+
+STRICT_PROTO_MATCHING  = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo
+# list. This list is created by putting \todo commands in the documentation.
+# The default value is: YES.
+
+GENERATE_TODOLIST      = NO
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test
+# list. This list is created by putting \test commands in the documentation.
+# The default value is: YES.
+
+GENERATE_TESTLIST      = NO
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug
+# list. This list is created by putting \bug commands in the documentation.
+# The default value is: YES.
+
+GENERATE_BUGLIST       = NO
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)
+# the deprecated list. This list is created by putting \deprecated commands in
+# the documentation.
+# The default value is: YES.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional documentation
+# sections, marked by \if <section_label> ... \endif and \cond <section_label>
+# ... \endcond blocks.
+
+ENABLED_SECTIONS       =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
+# initial value of a variable or macro / define can have for it to appear in the
+# documentation. If the initializer consists of more lines than specified here
+# it will be hidden. Use a value of 0 to hide initializers completely. The
+# appearance of the value of individual variables and macros / defines can be
+# controlled using \showinitializer or \hideinitializer command in the
+# documentation regardless of this setting.
+# Minimum value: 0, maximum value: 10000, default value: 30.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
+# the bottom of the documentation of classes and structs. If set to YES, the
+# list will mention the files that were used to generate the documentation.
+# The default value is: YES.
+
+SHOW_USED_FILES        = YES
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
+# will remove the Files entry from the Quick Index and from the Folder Tree View
+# (if specified).
+# The default value is: YES.
+
+SHOW_FILES             = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
+# page. This will remove the Namespaces entry from the Quick Index and from the
+# Folder Tree View (if specified).
+# The default value is: YES.
+
+SHOW_NAMESPACES        = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command command input-file, where command is the value of the
+# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
+# by doxygen. Whatever the program writes to standard output is used as the file
+# version. For an example see the documentation.
+
+FILE_VERSION_FILTER    =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. To create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option. You can
+# optionally specify a file name after the option, if omitted DoxygenLayout.xml
+# will be used as the name of the layout file. See also section "Changing the
+# layout of pages" for information.
+#
+# Note that if you run doxygen from a directory containing a file called
+# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
+# tag is left empty.
+
+LAYOUT_FILE            =
+
+# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
+# the reference definitions. This must be a list of .bib files. The .bib
+# extension is automatically appended if omitted. This requires the bibtex tool
+# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info.
+# For LaTeX the style of the bibliography can be controlled using
+# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
+# search path. See also \cite for info how to create references.
+
+CITE_BIB_FILES         =
+
+#---------------------------------------------------------------------------
+# Configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated to
+# standard output by doxygen. If QUIET is set to YES this implies that the
+# messages are off.
+# The default value is: NO.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
+# this implies that the warnings are on.
+#
+# Tip: Turn warnings on while writing the documentation.
+# The default value is: YES.
+
+WARNINGS               = YES
+
+# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
+# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
+# will automatically be disabled.
+# The default value is: YES.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as documenting some parameters in
+# a documented function twice, or documenting parameters that don't exist or
+# using markup commands wrongly.
+# The default value is: YES.
+
+WARN_IF_DOC_ERROR      = YES
+
+# If WARN_IF_INCOMPLETE_DOC is set to YES, doxygen will warn about incomplete
+# function parameter documentation. If set to NO, doxygen will accept that some
+# parameters have no documentation without warning.
+# The default value is: YES.
+
+WARN_IF_INCOMPLETE_DOC = YES
+
+# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
+# are documented, but have no documentation for their parameters or return
+# value. If set to NO, doxygen will only warn about wrong parameter
+# documentation, but not about the absence of documentation. If EXTRACT_ALL is
+# set to YES then this flag will automatically be disabled. See also
+# WARN_IF_INCOMPLETE_DOC
+# The default value is: NO.
+
+WARN_NO_PARAMDOC       = NO
+
+# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when
+# a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS
+# then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but
+# at the end of the doxygen process doxygen will return with a non-zero status.
+# Possible values are: NO, YES and FAIL_ON_WARNINGS.
+# The default value is: NO.
+
+WARN_AS_ERROR          = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that doxygen
+# can produce. The string should contain the $file, $line, and $text tags, which
+# will be replaced by the file and line number from which the warning originated
+# and the warning text. Optionally the format may contain $version, which will
+# be replaced by the version of the file (if it could be obtained via
+# FILE_VERSION_FILTER)
+# See also: WARN_LINE_FORMAT
+# The default value is: $file:$line: $text.
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# In the $text part of the WARN_FORMAT command it is possible that a reference
+# to a more specific place is given. To make it easier to jump to this place
+# (outside of doxygen) the user can define a custom "cut" / "paste" string.
+# Example:
+# WARN_LINE_FORMAT = "'vi $file +$line'"
+# See also: WARN_FORMAT
+# The default value is: at line $line of file $file.
+
+WARN_LINE_FORMAT       = "at line $line of file $file"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning and error
+# messages should be written. If left blank the output is written to standard
+# error (stderr). In case the file specified cannot be opened for writing the
+# warning and error messages are written to standard error. When as file - is
+# specified the warning and error messages are written to standard output
+# (stdout).
+
+WARN_LOGFILE           =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag is used to specify the files and/or directories that contain
+# documented source files. You may enter file names like myfile.cpp or
+# directories like /usr/src/myproject. Separate the files or directories with
+# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
+# Note: If this tag is empty the current directory is searched.
+
+INPUT                  = ../src \
+                         ../src/adapters
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
+# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
+# documentation (see:
+# https://www.gnu.org/software/libiconv/) for the list of possible encodings.
+# See also: INPUT_FILE_ENCODING
+# The default value is: UTF-8.
+
+INPUT_ENCODING         = UTF-8
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses The INPUT_FILE_ENCODING tag can be used to specify
+# character encoding on a per file pattern basis. Doxygen will compare the file
+# name with each pattern and apply the encoding instead of the default
+# INPUT_ENCODING) if there is a match. The character encodings are a list of the
+# form: pattern=encoding (like *.php=ISO-8859-1). See cfg_input_encoding
+# "INPUT_ENCODING" for further information on supported encodings.
+
+INPUT_FILE_ENCODING    =
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
+# *.h) to filter out the source-files in the directories.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# read by doxygen.
+#
+# Note the list of default checked file patterns might differ from the list of
+# default file extension mappings.
+#
+# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
+# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
+# *.hh, *.hxx, *.hpp, *.h++, *.l, *.cs, *.d, *.php, *.php4, *.php5, *.phtml,
+# *.inc, *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C
+# comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd,
+# *.vhdl, *.ucf, *.qsf and *.ice.
+
+FILE_PATTERNS          = nats.h \
+                         status.h \
+                         libevent.h \
+                         libuv.h
+
+# The RECURSIVE tag can be used to specify whether or not subdirectories should
+# be searched for input files as well.
+# The default value is: NO.
+
+RECURSIVE              = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should be
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+#
+# Note that relative paths are relative to the directory from which doxygen is
+# run.
+
+EXCLUDE                =
+
+# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
+# directories that are symbolic links (a Unix file system feature) are excluded
+# from the input.
+# The default value is: NO.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       =
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# ANamespace::AClass, ANamespace::*Test
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories use the pattern */test/*
+
+EXCLUDE_SYMBOLS        =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or directories
+# that contain example code fragments that are included (see the \include
+# command).
+
+EXAMPLE_PATH           =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank all
+# files are included.
+
+EXAMPLE_PATTERNS       = *
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude commands
+# irrespective of the value of the RECURSIVE tag.
+# The default value is: NO.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or directories
+# that contain images that are to be included in the documentation (see the
+# \image command).
+
+IMAGE_PATH             =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command:
+#
+# <filter> <input-file>
+#
+# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
+# name of an input file. Doxygen will then use the output that the filter
+# program writes to standard output. If FILTER_PATTERNS is specified, this tag
+# will be ignored.
+#
+# Note that the filter must not add or remove lines; it is applied before the
+# code is scanned, but not when the output code is generated. If lines are added
+# or removed, the anchors will not be placed correctly.
+#
+# Note that doxygen will use the data processed and written to standard output
+# for further processing, therefore nothing else, like debug statements or used
+# commands (so in case of a Windows batch file always use @echo OFF), should be
+# written to standard output.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# properly processed by doxygen.
+
+INPUT_FILTER           =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form: pattern=filter
+# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
+# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
+# patterns match the file name, INPUT_FILTER is applied.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# properly processed by doxygen.
+
+FILTER_PATTERNS        =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will also be used to filter the input files that are used for
+# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
+# The default value is: NO.
+
+FILTER_SOURCE_FILES    = NO
+
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
+# it is also possible to disable source filtering for a specific pattern using
+# *.ext= (so without naming a filter).
+# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
+
+FILTER_SOURCE_PATTERNS =
+
+# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
+# is part of the input, its contents will be placed on the main page
+# (index.html). This can be useful if you have a project on for instance GitHub
+# and want to reuse the introduction page also for the doxygen output.
+
+USE_MDFILE_AS_MAINPAGE =
+
+# The Fortran standard specifies that for fixed formatted Fortran code all
+# characters from position 72 are to be considered as comment. A common
+# extension is to allow longer lines before the automatic comment starts. The
+# setting FORTRAN_COMMENT_AFTER will also make it possible that longer lines can
+# be processed before the automatic comment starts.
+# Minimum value: 7, maximum value: 10000, default value: 72.
+
+FORTRAN_COMMENT_AFTER  = 72
+
+#---------------------------------------------------------------------------
+# Configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
+# generated. Documented entities will be cross-referenced with these sources.
+#
+# Note: To get rid of all source code in the generated output, make sure that
+# also VERBATIM_HEADERS is set to NO.
+# The default value is: NO.
+
+SOURCE_BROWSER         = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body of functions,
+# classes and enums directly into the documentation.
+# The default value is: NO.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
+# special comment blocks from generated source code fragments. Normal C, C++ and
+# Fortran comments will always remain visible.
+# The default value is: YES.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
+# entity all documented functions referencing it will be listed.
+# The default value is: NO.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES then for each documented function
+# all documented entities called/used by that function will be listed.
+# The default value is: NO.
+
+REFERENCES_RELATION    = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
+# to YES then the hyperlinks from functions in REFERENCES_RELATION and
+# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
+# link to the documentation.
+# The default value is: YES.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
+# source code will show a tooltip with additional information such as prototype,
+# brief description and links to the definition and documentation. Since this
+# will make the HTML file larger and loading of large files a bit slower, you
+# can opt to disable this feature.
+# The default value is: YES.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+SOURCE_TOOLTIPS        = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code will
+# point to the HTML generated by the htags(1) tool instead of doxygen built-in
+# source browser. The htags tool is part of GNU's global source tagging system
+# (see https://www.gnu.org/software/global/global.html). You will need version
+# 4.8.6 or higher.
+#
+# To use it do the following:
+# - Install the latest version of global
+# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file
+# - Make sure the INPUT points to the root of the source tree
+# - Run doxygen as normal
+#
+# Doxygen will invoke htags (and that will in turn invoke gtags), so these
+# tools must be available from the command line (i.e. in the search path).
+#
+# The result: instead of the source browser generated by doxygen, the links to
+# source code will now point to the output of htags.
+# The default value is: NO.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
+# verbatim copy of the header file for each class for which an include is
+# specified. Set to NO to disable this.
+# See also: Section \class.
+# The default value is: YES.
+
+VERBATIM_HEADERS       = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
+# compounds will be generated. Enable this if the project contains a lot of
+# classes, structs, unions or interfaces.
+# The default value is: YES.
+
+ALPHABETICAL_INDEX     = YES
+
+# In case all classes in a project start with a common prefix, all classes will
+# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
+# can be used to specify a prefix (or a list of prefixes) that should be ignored
+# while generating the index headers.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+IGNORE_PREFIX          =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
+# The default value is: YES.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
+# generated HTML page (for example: .htm, .php, .asp).
+# The default value is: .html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
+# each generated HTML page. If the tag is left blank doxygen will generate a
+# standard header.
+#
+# To get valid HTML the header file that includes any scripts and style sheets
+# that doxygen needs, which is dependent on the configuration options used (e.g.
+# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
+# default header using
+# doxygen -w html new_header.html new_footer.html new_stylesheet.css
+# YourConfigFile
+# and then modify the file new_header.html. See also section "Doxygen usage"
+# for information on how to generate the default header that doxygen normally
+# uses.
+# Note: The header is subject to change so you typically have to regenerate the
+# default header when upgrading to a newer version of doxygen. For a description
+# of the possible markers and block names see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_HEADER            = header.html
+
+# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
+# generated HTML page. If the tag is left blank doxygen will generate a standard
+# footer. See HTML_HEADER for more information on how to generate a default
+# footer and what special commands can be used inside the footer. See also
+# section "Doxygen usage" for information on how to generate the default footer
+# that doxygen normally uses.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FOOTER            = footer.html
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
+# sheet that is used by each HTML page. It can be used to fine-tune the look of
+# the HTML output. If left blank doxygen will generate a default style sheet.
+# See also section "Doxygen usage" for information on how to generate the style
+# sheet that doxygen normally uses.
+# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
+# it is more robust and this tag (HTML_STYLESHEET) will in the future become
+# obsolete.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_STYLESHEET        = customdoxygen.css
+
+# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# cascading style sheets that are included after the standard style sheets
+# created by doxygen. Using this option one can overrule certain style aspects.
+# This is preferred over using HTML_STYLESHEET since it does not replace the
+# standard style sheet and is therefore more robust against future updates.
+# Doxygen will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list). For an example see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_STYLESHEET  =
+
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the HTML output directory. Note
+# that these files will be copied to the base HTML output directory. Use the
+# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
+# files will be copied as-is; there are no commands or markers available.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_FILES       =
+
+# The HTML_COLORSTYLE tag can be used to specify if the generated HTML output
+# should be rendered with a dark or light theme. Default setting AUTO_LIGHT
+# enables light output unless the user preference is dark output. Other options
+# are DARK to always use dark mode, LIGHT to always use light mode, AUTO_DARK to
+# default to dark mode unless the user prefers light mode, and TOGGLE to let the
+# user toggle between dark and light mode via a button.
+# Possible values are: LIGHT Always generate light output., DARK Always generate
+# dark output., AUTO_LIGHT Automatically set the mode according to the user
+# preference, use light mode if no preference is set (the default)., AUTO_DARK
+# Automatically set the mode according to the user preference, use dark mode if
+# no preference is set. and TOGGLE Allow to user to switch between light and
+# dark mode via a button..
+# The default value is: AUTO_LIGHT.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE        = AUTO_LIGHT
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
+# will adjust the colors in the style sheet and background images according to
+# this color. Hue is specified as an angle on a color-wheel, see
+# https://en.wikipedia.org/wiki/Hue for more information. For instance the value
+# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
+# purple, and 360 is red again.
+# Minimum value: 0, maximum value: 359, default value: 220.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_HUE    = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
+# in the HTML output. For a value of 0 the output will use gray-scales only. A
+# value of 255 will produce the most vivid colors.
+# Minimum value: 0, maximum value: 255, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_SAT    = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
+# luminance component of the colors in the HTML output. Values below 100
+# gradually make the output lighter, whereas values above 100 make the output
+# darker. The value divided by 100 is the actual gamma applied, so 80 represents
+# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
+# change the gamma.
+# Minimum value: 40, maximum value: 240, default value: 80.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_GAMMA  = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting this
+# to YES can help to show when doxygen was last run and thus if the
+# documentation is up to date.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_TIMESTAMP         = NO
+
+# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML
+# documentation will contain a main index with vertical navigation menus that
+# are dynamically created via JavaScript. If disabled, the navigation index will
+# consists of multiple levels of tabs that are statically embedded in every HTML
+# page. Disable this option to support browsers that do not have JavaScript,
+# like the Qt help browser.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_DYNAMIC_MENUS     = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_DYNAMIC_SECTIONS  = NO
+
+# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
+# shown in the various tree structured indices initially; the user can expand
+# and collapse entries dynamically later on. Doxygen will expand the tree to
+# such a level that at most the specified number of entries are visible (unless
+# a fully collapsed tree already exceeds this amount). So setting the number of
+# entries 1 will produce a full collapsed tree by default. 0 is a special value
+# representing an infinite number of entries and will result in a full expanded
+# tree by default.
+# Minimum value: 0, maximum value: 9999, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_INDEX_NUM_ENTRIES = 100
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files will be
+# generated that can be used as input for Apple's Xcode 3 integrated development
+# environment (see:
+# https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To
+# create a documentation set, doxygen will generate a Makefile in the HTML
+# output directory. Running make will produce the docset in that directory and
+# running make install will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
+# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy
+# genXcode/_index.html for more information.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_DOCSET        = NO
+
+# This tag determines the name of the docset feed. A documentation feed provides
+# an umbrella under which multiple documentation sets from a single provider
+# (such as a company or product suite) can be grouped.
+# The default value is: Doxygen generated docs.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_FEEDNAME        = "Doxygen generated docs"
+
+# This tag determines the URL of the docset feed. A documentation feed provides
+# an umbrella under which multiple documentation sets from a single provider
+# (such as a company or product suite) can be grouped.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_FEEDURL         =
+
+# This tag specifies a string that should uniquely identify the documentation
+# set bundle. This should be a reverse domain-name style string, e.g.
+# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_BUNDLE_ID       = org.doxygen.Project
+
+# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+# The default value is: org.doxygen.Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
+
+# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
+# The default value is: Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_NAME  = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
+# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
+# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
+# on Windows. In the beginning of 2021 Microsoft took the original page, with
+# a.o. the download links, offline the HTML help workshop was already many years
+# in maintenance mode). You can download the HTML help workshop from the web
+# archives at Installation executable (see:
+# http://web.archive.org/web/20160201063255/http://download.microsoft.com/downlo
+# ad/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe).
+#
+# The HTML Help Workshop contains a compiler that can convert all HTML output
+# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
+# files are now used as the Windows 98 help format, and will replace the old
+# Windows help format (.hlp) on all Windows platforms in the future. Compressed
+# HTML files also contain an index, a table of contents, and you can search for
+# words in the documentation. The HTML workshop also contains a viewer for
+# compressed HTML files.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_HTMLHELP      = NO
+
+# The CHM_FILE tag can be used to specify the file name of the resulting .chm
+# file. You can add a path in front of the file if the result should not be
+# written to the html output directory.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_FILE               =
+
+# The HHC_LOCATION tag can be used to specify the location (absolute path
+# including file name) of the HTML help compiler (hhc.exe). If non-empty,
+# doxygen will try to run the HTML help compiler on the generated index.hhp.
+# The file has to be specified with full path.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+HHC_LOCATION           =
+
+# The GENERATE_CHI flag controls if a separate .chi index file is generated
+# (YES) or that it should be included in the main .chm file (NO).
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+GENERATE_CHI           = NO
+
+# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)
+# and project file content.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_INDEX_ENCODING     =
+
+# The BINARY_TOC flag controls whether a binary table of contents is generated
+# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it
+# enables the Previous and Next buttons.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members to
+# the table of contents of the HTML help documentation and to the tree view.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+TOC_EXPAND             = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
+# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
+# (.qch) of the generated HTML documentation.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_QHP           = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
+# the file name of the resulting .qch file. The path specified is relative to
+# the HTML output folder.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QCH_FILE               =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
+# Project output. For more information please see Qt Help Project / Namespace
+# (see:
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace).
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_NAMESPACE          = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
+# Help Project output. For more information please see Qt Help Project / Virtual
+# Folders (see:
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders).
+# The default value is: doc.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_VIRTUAL_FOLDER     = doc
+
+# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
+# filter to add. For more information please see Qt Help Project / Custom
+# Filters (see:
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_NAME   =
+
+# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see Qt Help Project / Custom
+# Filters (see:
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_ATTRS  =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's filter section matches. Qt Help Project / Filter Attributes (see:
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_SECT_FILTER_ATTRS  =
+
+# The QHG_LOCATION tag can be used to specify the location (absolute path
+# including file name) of Qt's qhelpgenerator. If non-empty doxygen will try to
+# run qhelpgenerator on the generated .qhp file.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHG_LOCATION           =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
+# generated, together with the HTML files, they form an Eclipse help plugin. To
+# install this plugin and make it available under the help contents menu in
+# Eclipse, the contents of the directory containing the HTML and XML files needs
+# to be copied into the plugins directory of eclipse. The name of the directory
+# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
+# After copying Eclipse needs to be restarted before the help appears.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_ECLIPSEHELP   = NO
+
+# A unique identifier for the Eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have this
+# name. Each documentation set should have its own identifier.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
+
+ECLIPSE_DOC_ID         = org.doxygen.Project
+
+# If you want full control over the layout of the generated HTML pages it might
+# be necessary to disable the index and replace it with your own. The
+# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
+# of each HTML page. A value of NO enables the index and the value YES disables
+# it. Since the tabs in the index contain the same information as the navigation
+# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+DISABLE_INDEX          = NO
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information. If the tag
+# value is set to YES, a side panel will be generated containing a tree-like
+# index structure (just like the one that is generated for HTML Help). For this
+# to work a browser that supports JavaScript, DHTML, CSS and frames is required
+# (i.e. any modern browser). Windows users are probably better off using the
+# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can
+# further fine tune the look of the index (see "Fine-tuning the output"). As an
+# example, the default style sheet generated by doxygen has an example that
+# shows how to put an image at the root of the tree instead of the PROJECT_NAME.
+# Since the tree basically has the same information as the tab index, you could
+# consider setting DISABLE_INDEX to YES when enabling this option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_TREEVIEW      = YES
+
+# When both GENERATE_TREEVIEW and DISABLE_INDEX are set to YES, then the
+# FULL_SIDEBAR option determines if the side bar is limited to only the treeview
+# area (value NO) or if it should extend to the full height of the window (value
+# YES). Setting this to YES gives a layout similar to
+# https://docs.readthedocs.io with more room for contents, but less room for the
+# project logo, title, and description. If either GENERATE_TREEVIEW or
+# DISABLE_INDEX is set to NO, this option has no effect.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FULL_SIDEBAR           = NO
+
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
+# doxygen will group on one line in the generated HTML documentation.
+#
+# Note that a value of 0 will completely suppress the enum values from appearing
+# in the overview section.
+# Minimum value: 0, maximum value: 20, default value: 4.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
+# to set the initial width (in pixels) of the frame in which the tree is shown.
+# Minimum value: 0, maximum value: 1500, default value: 250.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+TREEVIEW_WIDTH         = 250
+
+# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to
+# external symbols imported via tag files in a separate window.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+EXT_LINKS_IN_WINDOW    = NO
+
+# If the OBFUSCATE_EMAILS tag is set to YES, doxygen will obfuscate email
+# addresses.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+OBFUSCATE_EMAILS       = YES
+
+# If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg
+# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see
+# https://inkscape.org) to generate formulas as SVG images instead of PNGs for
+# the HTML output. These images will generally look nicer at scaled resolutions.
+# Possible values are: png (the default) and svg (looks nicer but requires the
+# pdf2svg or inkscape tool).
+# The default value is: png.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FORMULA_FORMAT    = png
+
+# Use this tag to change the font size of LaTeX formulas included as images in
+# the HTML documentation. When you change the font size after a successful
+# doxygen run you need to manually remove any form_*.png images from the HTML
+# output directory to force them to be regenerated.
+# Minimum value: 8, maximum value: 50, default value: 10.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_FONTSIZE       = 10
+
+# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands
+# to create new LaTeX commands to be used in formulas as building blocks. See
+# the section "Including formulas" for details.
+
+FORMULA_MACROFILE      =
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
+# https://www.mathjax.org) which uses client side JavaScript for the rendering
+# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
+# installed or if you want to formulas look prettier in the HTML output. When
+# enabled you may also need to install MathJax separately and configure the path
+# to it using the MATHJAX_RELPATH option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+USE_MATHJAX            = NO
+
+# With MATHJAX_VERSION it is possible to specify the MathJax version to be used.
+# Note that the different versions of MathJax have different requirements with
+# regards to the different settings, so it is possible that also other MathJax
+# settings have to be changed when switching between the different MathJax
+# versions.
+# Possible values are: MathJax_2 and MathJax_3.
+# The default value is: MathJax_2.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_VERSION        = MathJax_2
+
+# When MathJax is enabled you can set the default output format to be used for
+# the MathJax output. For more details about the output format see MathJax
+# version 2 (see:
+# http://docs.mathjax.org/en/v2.7-latest/output.html) and MathJax version 3
+# (see:
+# http://docs.mathjax.org/en/latest/web/components/output.html).
+# Possible values are: HTML-CSS (which is slower, but has the best
+# compatibility. This is the name for Mathjax version 2, for MathJax version 3
+# this will be translated into chtml), NativeMML (i.e. MathML. Only supported
+# for NathJax 2. For MathJax version 3 chtml will be used instead.), chtml (This
+# is the name for Mathjax version 3, for MathJax version 2 this will be
+# translated into HTML-CSS) and SVG.
+# The default value is: HTML-CSS.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_FORMAT         = HTML-CSS
+
+# When MathJax is enabled you need to specify the location relative to the HTML
+# output directory using the MATHJAX_RELPATH option. The destination directory
+# should contain the MathJax.js script. For instance, if the mathjax directory
+# is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
+# Content Delivery Network so you can quickly see the result without installing
+# MathJax. However, it is strongly recommended to install a local copy of
+# MathJax from https://www.mathjax.org before deployment. The default value is:
+# - in case of MathJax version 2: https://cdn.jsdelivr.net/npm/mathjax@2
+# - in case of MathJax version 3: https://cdn.jsdelivr.net/npm/mathjax@3
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest
+
+# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
+# extension names that should be enabled during MathJax rendering. For example
+# for MathJax version 2 (see
+# https://docs.mathjax.org/en/v2.7-latest/tex.html#tex-and-latex-extensions):
+# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
+# For example for MathJax version 3 (see
+# http://docs.mathjax.org/en/latest/input/tex/extensions/index.html):
+# MATHJAX_EXTENSIONS = ams
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_EXTENSIONS     =
+
+# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
+# of code that will be used on startup of the MathJax code. See the MathJax site
+# (see:
+# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an
+# example see the documentation.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_CODEFILE       =
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
+# the HTML output. The underlying search engine uses javascript and DHTML and
+# should work on any modern browser. Note that when using HTML help
+# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
+# there is already a search function so this one should typically be disabled.
+# For large projects the javascript based search engine can be slow, then
+# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
+# search using the keyboard; to jump to the search box use <access key> + S
+# (what the <access key> is depends on the OS and browser, but it is typically
+# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
+# key> to jump into the search results window, the results can be navigated
+# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
+# the search. The filter options can be selected when the cursor is inside the
+# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
+# to select a filter and <Enter> or <escape> to activate or cancel the filter
+# option.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+SEARCHENGINE           = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a web server instead of a web client using JavaScript. There
+# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
+# setting. When disabled, doxygen will generate a PHP script for searching and
+# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
+# and searching needs to be provided by external tools. See the section
+# "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SERVER_BASED_SEARCH    = NO
+
+# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
+# script for searching. Instead the search results are written to an XML file
+# which needs to be processed by an external indexer. Doxygen will invoke an
+# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
+# search results.
+#
+# Doxygen ships with an example indexer (doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see:
+# https://xapian.org/).
+#
+# See the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH        = NO
+
+# The SEARCHENGINE_URL should point to a search engine hosted by a web server
+# which will return the search results when EXTERNAL_SEARCH is enabled.
+#
+# Doxygen ships with an example indexer (doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see:
+# https://xapian.org/). See the section "External Indexing and Searching" for
+# details.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHENGINE_URL       =
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
+# search data is written to a file for indexing by an external tool. With the
+# SEARCHDATA_FILE tag the name of this file can be specified.
+# The default file is: searchdata.xml.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHDATA_FILE        = searchdata.xml
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
+# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
+# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
+# projects and redirect the results back to the right project.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH_ID     =
+
+# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
+# projects other than the one defined by this configuration file, but that are
+# all added to the same external search index. Each project needs to have a
+# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
+# to a relative location where the documentation can be found. The format is:
+# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTRA_SEARCH_MAPPINGS  =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
+# The default value is: YES.
+
+GENERATE_LATEX         = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_OUTPUT           =
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked.
+#
+# Note that when not enabling USE_PDFLATEX the default is latex when enabling
+# USE_PDFLATEX the default is pdflatex and when in the later case latex is
+# chosen this is overwritten by pdflatex. For specific output languages the
+# default can have been set differently, this depends on the implementation of
+# the output language.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
+# index for LaTeX.
+# Note: This tag is used in the Makefile / make.bat.
+# See also: LATEX_MAKEINDEX_CMD for the part in the generated output file
+# (.tex).
+# The default file is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# The LATEX_MAKEINDEX_CMD tag can be used to specify the command name to
+# generate index for LaTeX. In case there is no backslash (\) as first character
+# it will be automatically added in the LaTeX code.
+# Note: This tag is used in the generated output file (.tex).
+# See also: MAKEINDEX_CMD_NAME for the part in the Makefile / make.bat.
+# The default value is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_MAKEINDEX_CMD    = makeindex
+
+# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used by the
+# printer.
+# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
+# 14 inches) and executive (7.25 x 10.5 inches).
+# The default value is: a4.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PAPER_TYPE             = a4
+
+# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
+# that should be included in the LaTeX output. The package can be specified just
+# by its name or with the correct syntax as to be used with the LaTeX
+# \usepackage command. To get the times font for instance you can specify :
+# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times}
+# To use the option intlimits with the amsmath package you can specify:
+# EXTRA_PACKAGES=[intlimits]{amsmath}
+# If left blank no extra packages will be included.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+EXTRA_PACKAGES         =
+
+# The LATEX_HEADER tag can be used to specify a user-defined LaTeX header for
+# the generated LaTeX document. The header should contain everything until the
+# first chapter. If it is left blank doxygen will generate a standard header. It
+# is highly recommended to start with a default header using
+# doxygen -w latex new_header.tex new_footer.tex new_stylesheet.sty
+# and then modify the file new_header.tex. See also section "Doxygen usage" for
+# information on how to generate the default header that doxygen normally uses.
+#
+# Note: Only use a user-defined header if you know what you are doing!
+# Note: The header is subject to change so you typically have to regenerate the
+# default header when upgrading to a newer version of doxygen. The following
+# commands have a special meaning inside the header (and footer): For a
+# description of the possible markers and block names see the documentation.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HEADER           =
+
+# The LATEX_FOOTER tag can be used to specify a user-defined LaTeX footer for
+# the generated LaTeX document. The footer should contain everything after the
+# last chapter. If it is left blank doxygen will generate a standard footer. See
+# LATEX_HEADER for more information on how to generate a default footer and what
+# special commands can be used inside the footer. See also section "Doxygen
+# usage" for information on how to generate the default footer that doxygen
+# normally uses. Note: Only use a user-defined footer if you know what you are
+# doing!
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_FOOTER           =
+
+# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# LaTeX style sheets that are included after the standard style sheets created
+# by doxygen. Using this option one can overrule certain style aspects. Doxygen
+# will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list).
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_STYLESHEET =
+
+# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the LATEX_OUTPUT output
+# directory. Note that the files will be copied as-is; there are no commands or
+# markers available.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_FILES      =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
+# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
+# contain links (just like the HTML output) instead of page references. This
+# makes the output suitable for online browsing using a PDF viewer.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PDF_HYPERLINKS         = YES
+
+# If the USE_PDFLATEX tag is set to YES, doxygen will use the engine as
+# specified with LATEX_CMD_NAME to generate the PDF file directly from the LaTeX
+# files. Set this option to YES, to get a higher quality PDF documentation.
+#
+# See also section LATEX_CMD_NAME for selecting the engine.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
+# command to the generated LaTeX files. This will instruct LaTeX to keep running
+# if errors occur, instead of asking the user for help.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BATCHMODE        = NO
+
+# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
+# index chapters (such as File Index, Compound Index, etc.) in the output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HIDE_INDICES     = NO
+
+# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
+# bibliography, e.g. plainnat, or ieeetr. See
+# https://en.wikipedia.org/wiki/BibTeX and \cite for more info.
+# The default value is: plain.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BIB_STYLE        = plain
+
+# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated
+# page will contain the date and time when the page was generated. Setting this
+# to NO can help when comparing the output of multiple runs.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_TIMESTAMP        = NO
+
+# The LATEX_EMOJI_DIRECTORY tag is used to specify the (relative or absolute)
+# path from which the emoji images will be read. If a relative path is entered,
+# it will be relative to the LATEX_OUTPUT directory. If left blank the
+# LATEX_OUTPUT directory will be used.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EMOJI_DIRECTORY  =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The
+# RTF output is optimized for Word 97 and may not look too pretty with other RTF
+# readers/editors.
+# The default value is: NO.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: rtf.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
+# contain hyperlink fields. The RTF file will contain links (just like the HTML
+# output) instead of page references. This makes the output suitable for online
+# browsing using Word or some other Word compatible readers that support those
+# fields.
+#
+# Note: WordPad (write) and others do not support links.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# configuration file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
+#
+# See also section "Doxygen usage" for information on how to generate the
+# default style sheet that doxygen normally uses.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_STYLESHEET_FILE    =
+
+# Set optional variables used in the generation of an RTF document. Syntax is
+# similar to doxygen's configuration file. A template extensions file can be
+# generated using doxygen -e rtf extensionFile.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_EXTENSIONS_FILE    =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for
+# classes and files.
+# The default value is: NO.
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it. A directory man3 will be created inside the directory specified by
+# MAN_OUTPUT.
+# The default directory is: man.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to the generated
+# man pages. In case the manual section does not start with a number, the number
+# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
+# optional.
+# The default value is: .3.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_EXTENSION          = .3
+
+# The MAN_SUBDIR tag determines the name of the directory created within
+# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by
+# MAN_EXTENSION with the initial . removed.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_SUBDIR             =
+
+# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
+# will generate one additional man file for each entity documented in the real
+# man page(s). These additional files only source the real man page, but without
+# them the man command would be unable to find the correct page.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that
+# captures the structure of the code including all documentation.
+# The default value is: NO.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: xml.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_OUTPUT             = xml
+
+# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program
+# listings (including syntax highlighting and cross-referencing information) to
+# the XML output. Note that enabling this will significantly increase the size
+# of the XML output.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_PROGRAMLISTING     = YES
+
+# If the XML_NS_MEMB_FILE_SCOPE tag is set to YES, doxygen will include
+# namespace members in file scope as well, matching the HTML output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_NS_MEMB_FILE_SCOPE = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the DOCBOOK output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files
+# that can be used to generate PDF.
+# The default value is: NO.
+
+GENERATE_DOCBOOK       = NO
+
+# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
+# front of it.
+# The default directory is: docbook.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_OUTPUT         = docbook
+
+#---------------------------------------------------------------------------
+# Configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
+# AutoGen Definitions (see http://autogen.sourceforge.net/) file that captures
+# the structure of the code including all documentation. Note that this feature
+# is still experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module
+# file that captures the structure of the code including all documentation.
+#
+# Note that this feature is still experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary
+# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
+# output from the Perl module output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely
+# formatted so it can be parsed by a human reader. This is useful if you want to
+# understand what is going on. On the other hand, if this tag is set to NO, the
+# size of the Perl module output will be much smaller and Perl will parse it
+# just the same.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file are
+# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
+# so different doxyrules.make files included by the same Makefile don't
+# overwrite each other's variables.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all
+# C-preprocessor directives found in the sources and include files.
+# The default value is: YES.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names
+# in the source code. If set to NO, only conditional compilation will be
+# performed. Macro expansion can be done in a controlled way by setting
+# EXPAND_ONLY_PREDEF to YES.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
+# the macro expansion is limited to the macros specified with the PREDEFINED and
+# EXPAND_AS_DEFINED tags.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES, the include files in the
+# INCLUDE_PATH will be searched if a #include is found.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by the
+# preprocessor. Note that the INCLUDE_PATH is not recursive, so the setting of
+# RECURSIVE has no effect here.
+# This tag requires that the tag SEARCH_INCLUDES is set to YES.
+
+INCLUDE_PATH           =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will be
+# used.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+INCLUDE_FILE_PATTERNS  =
+
+# The PREDEFINED tag can be used to specify one or more macro names that are
+# defined before the preprocessor is started (similar to the -D option of e.g.
+# gcc). The argument of the tag is a list of macros of the form: name or
+# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
+# is assumed. To prevent a macro definition from being undefined via #undef or
+# recursively expanded use the := operator instead of the = operator.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+PREDEFINED             = BUILD_IN_DOXYGEN \
+                         NATS_HAS_STREAMING
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
+# tag can be used to specify a list of macro names that should be expanded. The
+# macro definition that is found in the sources will be used. Use the PREDEFINED
+# tag if you want to use a different macro definition that overrules the
+# definition found in the source code.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_AS_DEFINED      =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
+# remove all references to function-like macros that are alone on a line, have
+# an all uppercase name, and do not end with a semicolon. Such function macros
+# are typically used for boiler-plate code, and will confuse the parser if not
+# removed.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES tag can be used to specify one or more tag files. For each tag
+# file the location of the external documentation should be added. The format of
+# a tag file without this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where loc1 and loc2 can be relative or absolute paths or URLs. See the
+# section "Linking to external documentation" for more information about the use
+# of tag files.
+# Note: Each tag file must have a unique name (where the name does NOT include
+# the path). If a tag file is not located in the directory in which doxygen is
+# run, you must also specify the path to the tagfile here.
+
+TAGFILES               =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
+# tag file that is based on the input files it reads. See section "Linking to
+# external documentation" for more information about the usage of tag files.
+
+GENERATE_TAGFILE       =
+
+# If the ALLEXTERNALS tag is set to YES, all external class will be listed in
+# the class index. If set to NO, only the inherited external classes will be
+# listed.
+# The default value is: NO.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will be
+# listed.
+# The default value is: YES.
+
+EXTERNAL_GROUPS        = YES
+
+# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in
+# the related pages index. If set to NO, only the current project's pages will
+# be listed.
+# The default value is: YES.
+
+EXTERNAL_PAGES         = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# You can include diagrams made with dia in doxygen documentation. Doxygen will
+# then run dia to produce the diagram and insert it in the documentation. The
+# DIA_PATH tag allows you to specify the directory where the dia binary resides.
+# If left empty dia is assumed to be found in the default search path.
+
+DIA_PATH               =
+
+# If set to YES the inheritance and collaboration graphs will hide inheritance
+# and usage relations if the target is undocumented or is not a class.
+# The default value is: YES.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz (see:
+# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
+# Bell Labs. The other options in this section have no effect if this option is
+# set to NO
+# The default value is: NO.
+
+HAVE_DOT               = NO
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
+# to run in parallel. When set to 0 doxygen will base this on the number of
+# processors available in the system. You can set it explicitly to a value
+# larger than 0 to get control over the balance between CPU load and processing
+# speed.
+# Minimum value: 0, maximum value: 32, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_NUM_THREADS        = 0
+
+# DOT_COMMON_ATTR is common attributes for nodes, edges and labels of
+# subgraphs. When you want a differently looking font in the dot files that
+# doxygen generates you can specify fontname, fontcolor and fontsize attributes.
+# For details please see <a href=https://graphviz.org/doc/info/attrs.html>Node,
+# Edge and Graph Attributes specification</a> You need to make sure dot is able
+# to find the font, which can be done by putting it in a standard location or by
+# setting the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the
+# directory containing the font. Default graphviz fontsize is 14.
+# The default value is: fontname=Helvetica,fontsize=10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_COMMON_ATTR        = "fontname=Helvetica,fontsize=10"
+
+# DOT_EDGE_ATTR is concatenated with DOT_COMMON_ATTR. For elegant style you can
+# add 'arrowhead=open, arrowtail=open, arrowsize=0.5'. <a
+# href=https://graphviz.org/doc/info/arrows.html>Complete documentation about
+# arrows shapes.</a>
+# The default value is: labelfontname=Helvetica,labelfontsize=10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_EDGE_ATTR          = "labelfontname=Helvetica,labelfontsize=10"
+
+# DOT_NODE_ATTR is concatenated with DOT_COMMON_ATTR. For view without boxes
+# around nodes set 'shape=plain' or 'shape=plaintext' <a
+# href=https://www.graphviz.org/doc/info/shapes.html>Shapes specification</a>
+# The default value is: shape=box,height=0.2,width=0.4.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_NODE_ATTR          = "shape=box,height=0.2,width=0.4"
+
+# You can set the path where dot can find font specified with fontname in
+# DOT_COMMON_ATTR and others dot attributes.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTPATH           =
+
+# If the CLASS_GRAPH tag is set to YES (or GRAPH) then doxygen will generate a
+# graph for each documented class showing the direct and indirect inheritance
+# relations. In case HAVE_DOT is set as well dot will be used to draw the graph,
+# otherwise the built-in generator will be used. If the CLASS_GRAPH tag is set
+# to TEXT the direct and indirect inheritance relations will be shown as texts /
+# links.
+# Possible values are: NO, YES, TEXT and GRAPH.
+# The default value is: YES.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
+# graph for each documented class showing the direct and indirect implementation
+# dependencies (inheritance, containment, and class references variables) of the
+# class with other documented classes.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
+# groups, showing the direct groups dependencies. See also the chapter Grouping
+# in the manual.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LOOK               = NO
+
+# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
+# class node. If there are many fields or methods and many nodes the graph may
+# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
+# number of items for each type to make the size more manageable. Set this to 0
+# for no limit. Note that the threshold may be exceeded by 50% before the limit
+# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
+# but if the number exceeds 15, the total amount of fields shown is limited to
+# 10.
+# Minimum value: 0, maximum value: 100, default value: 10.
+# This tag requires that the tag UML_LOOK is set to YES.
+
+UML_LIMIT_NUM_FIELDS   = 10
+
+# If the DOT_UML_DETAILS tag is set to NO, doxygen will show attributes and
+# methods without types and arguments in the UML graphs. If the DOT_UML_DETAILS
+# tag is set to YES, doxygen will add type and arguments for attributes and
+# methods in the UML graphs. If the DOT_UML_DETAILS tag is set to NONE, doxygen
+# will not generate fields with class member information in the UML graphs. The
+# class diagrams will look similar to the default class diagrams but using UML
+# notation for the relationships.
+# Possible values are: NO, YES and NONE.
+# The default value is: NO.
+# This tag requires that the tag UML_LOOK is set to YES.
+
+DOT_UML_DETAILS        = NO
+
+# The DOT_WRAP_THRESHOLD tag can be used to set the maximum number of characters
+# to display on a single line. If the actual line length exceeds this threshold
+# significantly it will wrapped across multiple lines. Some heuristics are apply
+# to avoid ugly line breaks.
+# Minimum value: 0, maximum value: 1000, default value: 17.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_WRAP_THRESHOLD     = 17
+
+# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
+# collaboration graphs will show the relations between templates and their
+# instances.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+TEMPLATE_RELATIONS     = NO
+
+# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
+# YES then doxygen will generate a graph for each documented file showing the
+# direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDE_GRAPH          = YES
+
+# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
+# set to YES then doxygen will generate a graph for each documented file showing
+# the direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
+# functions only using the \callgraph command. Disabling a call graph can be
+# accomplished by means of the command \hidecallgraph.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALL_GRAPH             = NO
+
+# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable caller graphs for selected
+# functions only using the \callergraph command. Disabling a caller graph can be
+# accomplished by means of the command \hidecallergraph.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALLER_GRAPH           = NO
+
+# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
+# hierarchy of all classes instead of a textual one.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
+# dependencies a directory has on other directories in a graphical way. The
+# dependency relations are determined by the #include relations between the
+# files in the directories.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DIRECTORY_GRAPH        = YES
+
+# The DIR_GRAPH_MAX_DEPTH tag can be used to limit the maximum number of levels
+# of child directories generated in directory dependency graphs by dot.
+# Minimum value: 1, maximum value: 25, default value: 1.
+# This tag requires that the tag DIRECTORY_GRAPH is set to YES.
+
+DIR_GRAPH_MAX_DEPTH    = 1
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. For an explanation of the image formats see the section
+# output formats in the documentation of the dot tool (Graphviz (see:
+# http://www.graphviz.org/)).
+# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
+# to make the SVG files visible in IE 9+ (other browsers do not have this
+# requirement).
+# Possible values are: png, jpg, gif, svg, png:gd, png:gd:gd, png:cairo,
+# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and
+# png:gdiplus:gdiplus.
+# The default value is: png.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_IMAGE_FORMAT       = png
+
+# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
+# enable generation of interactive SVG images that allow zooming and panning.
+#
+# Note that this requires a modern browser other than Internet Explorer. Tested
+# and working are Firefox, Chrome, Safari, and Opera.
+# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
+# the SVG files visible. Older versions of IE do not have SVG support.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INTERACTIVE_SVG        = NO
+
+# The DOT_PATH tag can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_PATH               =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the \dotfile
+# command).
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOTFILE_DIRS           =
+
+# The MSCFILE_DIRS tag can be used to specify one or more directories that
+# contain msc files that are included in the documentation (see the \mscfile
+# command).
+
+MSCFILE_DIRS           =
+
+# The DIAFILE_DIRS tag can be used to specify one or more directories that
+# contain dia files that are included in the documentation (see the \diafile
+# command).
+
+DIAFILE_DIRS           =
+
+# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the
+# path where java can find the plantuml.jar file or to the filename of jar file
+# to be used. If left blank, it is assumed PlantUML is not used or called during
+# a preprocessing step. Doxygen will generate a warning when it encounters a
+# \startuml command in this case and will not generate output for the diagram.
+
+PLANTUML_JAR_PATH      =
+
+# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
+# configuration file for plantuml.
+
+PLANTUML_CFG_FILE      =
+
+# When using plantuml, the specified paths are searched for files specified by
+# the !include statement in a plantuml block.
+
+PLANTUML_INCLUDE_PATH  =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
+# that will be shown in the graph. If the number of nodes in a graph becomes
+# larger than this value, doxygen will truncate the graph, which is visualized
+# by representing a node as a red box. Note that doxygen if the number of direct
+# children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
+# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+# Minimum value: 0, maximum value: 10000, default value: 50.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
+# generated by dot. A depth value of 3 means that only nodes reachable from the
+# root by following a path via at most 3 edges will be shown. Nodes that lay
+# further from the root node will be omitted. Note that setting this option to 1
+# or 2 may greatly reduce the computation time needed for large code bases. Also
+# note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+# Minimum value: 0, maximum value: 1000, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+MAX_DOT_GRAPH_DEPTH    = 0
+
+# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10) support
+# this, this feature is disabled by default.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_MULTI_TARGETS      = NO
+
+# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
+# explaining the meaning of the various boxes and arrows in the dot generated
+# graphs.
+# Note: This tag requires that UML_LOOK isn't set, i.e. the doxygen internal
+# graphical representation for inheritance and collaboration diagrams is used.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate
+# files that are used to generate the various graphs.
+#
+# Note: This setting is not only used for dot files but also for msc temporary
+# files.
+# The default value is: YES.
+
+DOT_CLEANUP            = YES
diff --git a/doc/DoxyFile.NATS.Client.bak b/doc/DoxyFile.NATS.Client.bak
new file mode 100644 (file)
index 0000000..d13d75b
--- /dev/null
@@ -0,0 +1,2413 @@
+# Doxyfile 1.8.10
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project.
+#
+# All text after a double hash (##) is considered a comment and is placed in
+# front of the TAG it is preceding.
+#
+# All text after a single hash (#) is considered a comment and will be ignored.
+# The format is:
+# TAG = value [value, ...]
+# For lists, items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (\" \").
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all text
+# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
+# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
+# for the list of possible encodings.
+# The default value is: UTF-8.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
+# double-quotes, unless you are using Doxywizard) that should identify the
+# project for which the documentation is generated. This name is used in the
+# title of most generated pages and in a few other places.
+# The default value is: My Project.
+
+PROJECT_NAME           = "NATS C Client with JetStream and Streaming support"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
+# could be handy for archiving the generated documentation or if some version
+# control system is used.
+
+PROJECT_NUMBER         = 3.4.1
+
+# Using the PROJECT_BRIEF tag one can provide an optional one line description
+# for a project that appears at the top of each page and should give viewer a
+# quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF          = "The nats.io C Client, Supported by Synadia Communications Inc."
+
+# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
+# in the documentation. The maximum height of the logo should not exceed 55
+# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
+# the logo to the output directory.
+
+PROJECT_LOGO           = 
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
+# into which the generated documentation will be written. If a relative path is
+# entered, it will be relative to the location where doxygen was started. If
+# left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = .
+
+# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
+# directories (in 2 levels) under the output directory of each output format and
+# will distribute the generated files over these directories. Enabling this
+# option can be useful when feeding doxygen a huge amount of source files, where
+# putting all generated files in the same directory would otherwise causes
+# performance problems for the file system.
+# The default value is: NO.
+
+CREATE_SUBDIRS         = NO
+
+# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
+# characters to appear in the names of generated files. If set to NO, non-ASCII
+# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
+# U+3044.
+# The default value is: NO.
+
+ALLOW_UNICODE_NAMES    = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
+# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
+# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
+# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
+# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
+# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
+# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
+# Ukrainian and Vietnamese.
+# The default value is: English.
+
+OUTPUT_LANGUAGE        = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
+# descriptions after the members that are listed in the file and class
+# documentation (similar to Javadoc). Set to NO to disable this.
+# The default value is: YES.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief
+# description of a member or function before the detailed description
+#
+# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+# The default value is: YES.
+
+REPEAT_BRIEF           = NO
+
+# This tag implements a quasi-intelligent brief description abbreviator that is
+# used to form the text in various listings. Each string in this list, if found
+# as the leading text of the brief description, will be stripped from the text
+# and the result, after processing the whole list, is used as the annotated
+# text. Otherwise, the brief description is used as-is. If left blank, the
+# following values are used ($name is automatically replaced with the name of
+# the entity):The $name class, The $name widget, The $name file, is, provides,
+# specifies, contains, represents, a, an and the.
+
+ABBREVIATE_BRIEF       = "The $name class" \
+                         "The $name widget" \
+                         "The $name file" \
+                         is \
+                         provides \
+                         specifies \
+                         contains \
+                         represents \
+                         a \
+                         an \
+                         the
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# doxygen will generate a detailed section even if there is only a brief
+# description.
+# The default value is: NO.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+# The default value is: NO.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path
+# before files name in the file list and in the header files. If set to NO the
+# shortest path that makes the file name unique will be used
+# The default value is: YES.
+
+FULL_PATH_NAMES        = NO
+
+# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
+# Stripping is only done if one of the specified strings matches the left-hand
+# part of the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the path to
+# strip.
+#
+# Note that you can specify absolute paths here, but also relative paths, which
+# will be relative from the directory where doxygen is started.
+# This tag requires that the tag FULL_PATH_NAMES is set to YES.
+
+STRIP_FROM_PATH        = 
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
+# path mentioned in the documentation of a class, which tells the reader which
+# header file to include in order to use a class. If left blank only the name of
+# the header file containing the class definition is used. Otherwise one should
+# specify the list of include paths that are normally passed to the compiler
+# using the -I flag.
+
+STRIP_FROM_INC_PATH    = 
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
+# less readable) file names. This can be useful is your file systems doesn't
+# support long names like on DOS, Mac, or CD-ROM.
+# The default value is: NO.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
+# first line (until the first dot) of a Javadoc-style comment as the brief
+# description. If set to NO, the Javadoc-style will behave just like regular Qt-
+# style comments (thus requiring an explicit @brief command for a brief
+# description.)
+# The default value is: NO.
+
+JAVADOC_AUTOBRIEF      = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
+# line (until the first dot) of a Qt-style comment as the brief description. If
+# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
+# requiring an explicit \brief command for a brief description.)
+# The default value is: NO.
+
+QT_AUTOBRIEF           = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
+# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
+# a brief description. This used to be the default behavior. The new default is
+# to treat a multi-line C++ comment block as a detailed description. Set this
+# tag to YES if you prefer the old behavior instead.
+#
+# Note that setting this tag to YES also means that rational rose comments are
+# not recognized any more.
+# The default value is: NO.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
+# documentation from any documented member that it re-implements.
+# The default value is: YES.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new
+# page for each member. If set to NO, the documentation of a member will be part
+# of the file/class/namespace that contains it.
+# The default value is: NO.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
+# uses this value to replace tabs by spaces in code fragments.
+# Minimum value: 1, maximum value: 16, default value: 4.
+
+TAB_SIZE               = 4
+
+# This tag can be used to specify a number of aliases that act as commands in
+# the documentation. An alias has the form:
+# name=value
+# For example adding
+# "sideeffect=@par Side Effects:\n"
+# will allow you to put the command \sideeffect (or @sideeffect) in the
+# documentation, which will result in a user-defined paragraph with heading
+# "Side Effects:". You can put \n's in the value part of an alias to insert
+# newlines.
+
+ALIASES                = 
+
+# This tag can be used to specify a number of word-keyword mappings (TCL only).
+# A mapping has the form "name=value". For example adding "class=itcl::class"
+# will allow you to use the command class in the itcl::class meaning.
+
+TCL_SUBST              = 
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C. For
+# instance, some of the names that are used will be different. The list of all
+# members will be omitted, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_FOR_C  = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
+# Python sources only. Doxygen will then generate output that is more tailored
+# for that language. For instance, namespaces will be presented as packages,
+# qualified scopes will look different, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_JAVA   = YES
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources. Doxygen will then generate output that is tailored for Fortran.
+# The default value is: NO.
+
+OPTIMIZE_FOR_FORTRAN   = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for VHDL.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_VHDL   = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given
+# extension. Doxygen has a built-in mapping, but you can override or extend it
+# using this tag. The format is ext=language, where ext is a file extension, and
+# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
+# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
+# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
+# Fortran. In the later case the parser tries to guess whether the code is fixed
+# or free formatted code, this is the default for Fortran type files), VHDL. For
+# instance to make doxygen treat .inc files as Fortran files (default is PHP),
+# and .f files as C (default is Fortran), use: inc=Fortran f=C.
+#
+# Note: For files without extension you can use no_extension as a placeholder.
+#
+# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
+# the files are not read by doxygen.
+
+EXTENSION_MAPPING      = 
+
+# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
+# according to the Markdown format, which allows for more readable
+# documentation. See http://daringfireball.net/projects/markdown/ for details.
+# The output of markdown processing is further processed by doxygen, so you can
+# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
+# case of backward compatibilities issues.
+# The default value is: YES.
+
+MARKDOWN_SUPPORT       = YES
+
+# When enabled doxygen tries to link words that correspond to documented
+# classes, or namespaces to their corresponding documentation. Such a link can
+# be prevented in individual cases by putting a % sign in front of the word or
+# globally by setting AUTOLINK_SUPPORT to NO.
+# The default value is: YES.
+
+AUTOLINK_SUPPORT       = YES
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should set this
+# tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string);
+# versus func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+# The default value is: NO.
+
+BUILTIN_STL_SUPPORT    = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+# The default value is: NO.
+
+CPP_CLI_SUPPORT        = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
+# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
+# will parse them like normal C++ but will assume all classes use public instead
+# of private inheritance when no explicit protection keyword is present.
+# The default value is: NO.
+
+SIP_SUPPORT            = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate
+# getter and setter methods for a property. Setting this option to YES will make
+# doxygen to replace the get and set methods by a property in the documentation.
+# This will only work if the methods are indeed getting or setting a simple
+# type. If this is not the case, or you want to show the methods anyway, you
+# should set this option to NO.
+# The default value is: YES.
+
+IDL_PROPERTY_SUPPORT   = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+# The default value is: NO.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# If one adds a struct or class to a group and this option is enabled, then also
+# any nested class or struct is added to the same group. By default this option
+# is disabled and one has to add nested compounds explicitly via \ingroup.
+# The default value is: NO.
+
+GROUP_NESTED_COMPOUNDS = NO
+
+# Set the SUBGROUPING tag to YES to allow class member groups of the same type
+# (for instance a group of public functions) to be put as a subgroup of that
+# type (e.g. under the Public Functions section). Set it to NO to prevent
+# subgrouping. Alternatively, this can be done per class using the
+# \nosubgrouping command.
+# The default value is: YES.
+
+SUBGROUPING            = NO
+
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
+# are shown inside the group in which they are included (e.g. using \ingroup)
+# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
+# and RTF).
+#
+# Note that this feature does not work in combination with
+# SEPARATE_MEMBER_PAGES.
+# The default value is: NO.
+
+INLINE_GROUPED_CLASSES = NO
+
+# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
+# with only public data fields or simple typedef fields will be shown inline in
+# the documentation of the scope in which they are defined (i.e. file,
+# namespace, or group documentation), provided this scope is documented. If set
+# to NO, structs, classes, and unions are shown on a separate page (for HTML and
+# Man pages) or section (for LaTeX and RTF).
+# The default value is: NO.
+
+INLINE_SIMPLE_STRUCTS  = NO
+
+# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
+# enum is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically be
+# useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+# The default value is: NO.
+
+TYPEDEF_HIDES_STRUCT   = NO
+
+# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
+# cache is used to resolve symbols given their name and scope. Since this can be
+# an expensive process and often the same symbol appears multiple times in the
+# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
+# doxygen will become slower. If the cache is too large, memory is wasted. The
+# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
+# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
+# symbols. At the end of a run doxygen will report the cache usage and suggest
+# the optimal cache size from a speed point of view.
+# Minimum value: 0, maximum value: 9, default value: 0.
+
+LOOKUP_CACHE_SIZE      = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in
+# documentation are documented, even if no documentation was available. Private
+# class members and static file members will be hidden unless the
+# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
+# Note: This will also disable the warnings about undocumented members that are
+# normally produced when WARNINGS is set to YES.
+# The default value is: NO.
+
+EXTRACT_ALL            = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
+# be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
+# scope will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PACKAGE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be
+# included in the documentation.
+# The default value is: NO.
+
+EXTRACT_STATIC         = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
+# locally in source files will be included in the documentation. If set to NO,
+# only classes defined in header files are included. Does not have any effect
+# for Java sources.
+# The default value is: YES.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. If set to YES, local methods,
+# which are defined in the implementation section but not in the interface are
+# included in the documentation. If set to NO, only methods in the interface are
+# included.
+# The default value is: NO.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base name of
+# the file that contains the anonymous namespace. By default anonymous namespace
+# are hidden.
+# The default value is: NO.
+
+EXTRACT_ANON_NSPACES   = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
+# undocumented members inside documented classes or files. If set to NO these
+# members will be included in the various overviews, but no documentation
+# section is generated. This option has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_MEMBERS     = YES
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy. If set
+# to NO, these classes will be included in the various overviews. This option
+# has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_CLASSES     = YES
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
+# (class|struct|union) declarations. If set to NO, these declarations will be
+# included in the documentation.
+# The default value is: NO.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
+# documentation blocks found inside the body of a function. If set to NO, these
+# blocks will be appended to the function's detailed documentation block.
+# The default value is: NO.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation that is typed after a
+# \internal command is included. If the tag is set to NO then the documentation
+# will be excluded. Set it to YES to include the internal documentation.
+# The default value is: NO.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
+# names in lower-case letters. If set to YES, upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+# The default value is: system dependent.
+
+CASE_SENSE_NAMES       = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
+# their full class and namespace scopes in the documentation. If set to YES, the
+# scope will be hidden.
+# The default value is: NO.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
+# append additional text to a page's title, such as Class Reference. If set to
+# YES the compound reference will be hidden.
+# The default value is: NO.
+
+HIDE_COMPOUND_REFERENCE= NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
+# the files that are included by a file in the documentation of that file.
+# The default value is: YES.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
+# grouped member an include statement to the documentation, telling the reader
+# which file to include in order to use the member.
+# The default value is: NO.
+
+SHOW_GROUPED_MEMB_INC  = NO
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
+# files with double quotes in the documentation rather than with sharp brackets.
+# The default value is: NO.
+
+FORCE_LOCAL_INCLUDES   = NO
+
+# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
+# documentation for inline members.
+# The default value is: YES.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
+# (detailed) documentation of file and class members alphabetically by member
+# name. If set to NO, the members will appear in declaration order.
+# The default value is: YES.
+
+SORT_MEMBER_DOCS       = NO
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
+# descriptions of file, namespace and class members alphabetically by member
+# name. If set to NO, the members will appear in declaration order. Note that
+# this will also influence the order of the classes in the class list.
+# The default value is: NO.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
+# (brief and detailed) documentation of class members so that constructors and
+# destructors are listed first. If set to NO the constructors will appear in the
+# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
+# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
+# member documentation.
+# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
+# detailed member documentation.
+# The default value is: NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
+# of group names into alphabetical order. If set to NO the group names will
+# appear in their defined order.
+# The default value is: NO.
+
+SORT_GROUP_NAMES       = NO 
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
+# fully-qualified names, including namespaces. If set to NO, the class list will
+# be sorted only by class name, not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the alphabetical
+# list.
+# The default value is: NO.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
+# type resolution of all parameters of a function it will reject a match between
+# the prototype and the implementation of a member function even if there is
+# only one candidate or it is obvious which candidate to choose by doing a
+# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
+# accept a match between prototype and implementation in such cases.
+# The default value is: NO.
+
+STRICT_PROTO_MATCHING  = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo
+# list. This list is created by putting \todo commands in the documentation.
+# The default value is: YES.
+
+GENERATE_TODOLIST      = NO
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test
+# list. This list is created by putting \test commands in the documentation.
+# The default value is: YES.
+
+GENERATE_TESTLIST      = NO
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug
+# list. This list is created by putting \bug commands in the documentation.
+# The default value is: YES.
+
+GENERATE_BUGLIST       = NO
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)
+# the deprecated list. This list is created by putting \deprecated commands in
+# the documentation.
+# The default value is: YES.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional documentation
+# sections, marked by \if <section_label> ... \endif and \cond <section_label>
+# ... \endcond blocks.
+
+ENABLED_SECTIONS       = 
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
+# initial value of a variable or macro / define can have for it to appear in the
+# documentation. If the initializer consists of more lines than specified here
+# it will be hidden. Use a value of 0 to hide initializers completely. The
+# appearance of the value of individual variables and macros / defines can be
+# controlled using \showinitializer or \hideinitializer command in the
+# documentation regardless of this setting.
+# Minimum value: 0, maximum value: 10000, default value: 30.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
+# the bottom of the documentation of classes and structs. If set to YES, the
+# list will mention the files that were used to generate the documentation.
+# The default value is: YES.
+
+SHOW_USED_FILES        = YES
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
+# will remove the Files entry from the Quick Index and from the Folder Tree View
+# (if specified).
+# The default value is: YES.
+
+SHOW_FILES             = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
+# page. This will remove the Namespaces entry from the Quick Index and from the
+# Folder Tree View (if specified).
+# The default value is: YES.
+
+SHOW_NAMESPACES        = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command command input-file, where command is the value of the
+# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
+# by doxygen. Whatever the program writes to standard output is used as the file
+# version. For an example see the documentation.
+
+FILE_VERSION_FILTER    = 
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. To create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option. You can
+# optionally specify a file name after the option, if omitted DoxygenLayout.xml
+# will be used as the name of the layout file.
+#
+# Note that if you run doxygen from a directory containing a file called
+# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
+# tag is left empty.
+
+LAYOUT_FILE            = 
+
+# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
+# the reference definitions. This must be a list of .bib files. The .bib
+# extension is automatically appended if omitted. This requires the bibtex tool
+# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
+# For LaTeX the style of the bibliography can be controlled using
+# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
+# search path. See also \cite for info how to create references.
+
+CITE_BIB_FILES         = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated to
+# standard output by doxygen. If QUIET is set to YES this implies that the
+# messages are off.
+# The default value is: NO.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
+# this implies that the warnings are on.
+#
+# Tip: Turn warnings on while writing the documentation.
+# The default value is: YES.
+
+WARNINGS               = YES
+
+# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
+# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
+# will automatically be disabled.
+# The default value is: YES.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some parameters
+# in a documented function, or documenting parameters that don't exist or using
+# markup commands wrongly.
+# The default value is: YES.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
+# are documented, but have no documentation for their parameters or return
+# value. If set to NO, doxygen will only warn about wrong or incomplete
+# parameter documentation, but not about the absence of documentation.
+# The default value is: NO.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that doxygen
+# can produce. The string should contain the $file, $line, and $text tags, which
+# will be replaced by the file and line number from which the warning originated
+# and the warning text. Optionally the format may contain $version, which will
+# be replaced by the version of the file (if it could be obtained via
+# FILE_VERSION_FILTER)
+# The default value is: $file:$line: $text.
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning and error
+# messages should be written. If left blank the output is written to standard
+# error (stderr).
+
+WARN_LOGFILE           = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag is used to specify the files and/or directories that contain
+# documented source files. You may enter file names like myfile.cpp or
+# directories like /usr/src/myproject. Separate the files or directories with
+# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
+# Note: If this tag is empty the current directory is searched.
+
+INPUT                  = ../src ../src/adapters
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
+# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
+# documentation (see: http://www.gnu.org/software/libiconv) for the list of
+# possible encodings.
+# The default value is: UTF-8.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
+# *.h) to filter out the source-files in the directories.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# read by doxygen.
+#
+# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
+# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
+# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,
+# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd,
+# *.vhdl, *.ucf, *.qsf, *.as and *.js.
+
+FILE_PATTERNS          = nats.h status.h libevent.h libuv.h
+
+# The RECURSIVE tag can be used to specify whether or not subdirectories should
+# be searched for input files as well.
+# The default value is: NO.
+
+RECURSIVE              = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should be
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+#
+# Note that relative paths are relative to the directory from which doxygen is
+# run.
+
+EXCLUDE                = 
+
+# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
+# directories that are symbolic links (a Unix file system feature) are excluded
+# from the input.
+# The default value is: NO.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       = 
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories use the pattern */test/*
+
+EXCLUDE_SYMBOLS        = 
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or directories
+# that contain example code fragments that are included (see the \include
+# command).
+
+EXAMPLE_PATH           = 
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank all
+# files are included.
+
+EXAMPLE_PATTERNS       = *
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude commands
+# irrespective of the value of the RECURSIVE tag.
+# The default value is: NO.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or directories
+# that contain images that are to be included in the documentation (see the
+# \image command).
+
+IMAGE_PATH             = 
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command:
+#
+# <filter> <input-file>
+#
+# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
+# name of an input file. Doxygen will then use the output that the filter
+# program writes to standard output. If FILTER_PATTERNS is specified, this tag
+# will be ignored.
+#
+# Note that the filter must not add or remove lines; it is applied before the
+# code is scanned, but not when the output code is generated. If lines are added
+# or removed, the anchors will not be placed correctly.
+
+INPUT_FILTER           = 
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form: pattern=filter
+# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
+# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
+# patterns match the file name, INPUT_FILTER is applied.
+
+FILTER_PATTERNS        = 
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will also be used to filter the input files that are used for
+# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
+# The default value is: NO.
+
+FILTER_SOURCE_FILES    = NO
+
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
+# it is also possible to disable source filtering for a specific pattern using
+# *.ext= (so without naming a filter).
+# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
+
+FILTER_SOURCE_PATTERNS = 
+
+# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
+# is part of the input, its contents will be placed on the main page
+# (index.html). This can be useful if you have a project on for instance GitHub
+# and want to reuse the introduction page also for the doxygen output.
+
+USE_MDFILE_AS_MAINPAGE = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
+# generated. Documented entities will be cross-referenced with these sources.
+#
+# Note: To get rid of all source code in the generated output, make sure that
+# also VERBATIM_HEADERS is set to NO.
+# The default value is: NO.
+
+SOURCE_BROWSER         = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body of functions,
+# classes and enums directly into the documentation.
+# The default value is: NO.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
+# special comment blocks from generated source code fragments. Normal C, C++ and
+# Fortran comments will always remain visible.
+# The default value is: YES.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
+# function all documented functions referencing it will be listed.
+# The default value is: NO.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES then for each documented function
+# all documented entities called/used by that function will be listed.
+# The default value is: NO.
+
+REFERENCES_RELATION    = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
+# to YES then the hyperlinks from functions in REFERENCES_RELATION and
+# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
+# link to the documentation.
+# The default value is: YES.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
+# source code will show a tooltip with additional information such as prototype,
+# brief description and links to the definition and documentation. Since this
+# will make the HTML file larger and loading of large files a bit slower, you
+# can opt to disable this feature.
+# The default value is: YES.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+SOURCE_TOOLTIPS        = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code will
+# point to the HTML generated by the htags(1) tool instead of doxygen built-in
+# source browser. The htags tool is part of GNU's global source tagging system
+# (see http://www.gnu.org/software/global/global.html). You will need version
+# 4.8.6 or higher.
+#
+# To use it do the following:
+# - Install the latest version of global
+# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
+# - Make sure the INPUT points to the root of the source tree
+# - Run doxygen as normal
+#
+# Doxygen will invoke htags (and that will in turn invoke gtags), so these
+# tools must be available from the command line (i.e. in the search path).
+#
+# The result: instead of the source browser generated by doxygen, the links to
+# source code will now point to the output of htags.
+# The default value is: NO.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
+# verbatim copy of the header file for each class for which an include is
+# specified. Set to NO to disable this.
+# See also: Section \class.
+# The default value is: YES.
+
+VERBATIM_HEADERS       = YES
+
+# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
+# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the
+# cost of reduced performance. This can be particularly helpful with template
+# rich C++ code for which doxygen's built-in parser lacks the necessary type
+# information.
+# Note: The availability of this option depends on whether or not doxygen was
+# compiled with the --with-libclang option.
+# The default value is: NO.
+
+#CLANG_ASSISTED_PARSING = NO
+
+# If clang assisted parsing is enabled you can provide the compiler with command
+# line options that you would normally use when invoking the compiler. Note that
+# the include paths will already be set by doxygen for the files and directories
+# specified with INPUT and INCLUDE_PATH.
+# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
+
+#CLANG_OPTIONS          = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
+# compounds will be generated. Enable this if the project contains a lot of
+# classes, structs, unions or interfaces.
+# The default value is: YES.
+
+ALPHABETICAL_INDEX     = YES
+
+# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
+# which the alphabetical index list will be split.
+# Minimum value: 1, maximum value: 20, default value: 5.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all classes will
+# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
+# can be used to specify a prefix (or a list of prefixes) that should be ignored
+# while generating the index headers.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+IGNORE_PREFIX          =  
+
+#---------------------------------------------------------------------------
+# Configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
+# The default value is: YES.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
+# generated HTML page (for example: .htm, .php, .asp).
+# The default value is: .html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
+# each generated HTML page. If the tag is left blank doxygen will generate a
+# standard header.
+#
+# To get valid HTML the header file that includes any scripts and style sheets
+# that doxygen needs, which is dependent on the configuration options used (e.g.
+# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
+# default header using
+# doxygen -w html new_header.html new_footer.html new_stylesheet.css
+# YourConfigFile
+# and then modify the file new_header.html. See also section "Doxygen usage"
+# for information on how to generate the default header that doxygen normally
+# uses.
+# Note: The header is subject to change so you typically have to regenerate the
+# default header when upgrading to a newer version of doxygen. For a description
+# of the possible markers and block names see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_HEADER            = header.html
+
+# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
+# generated HTML page. If the tag is left blank doxygen will generate a standard
+# footer. See HTML_HEADER for more information on how to generate a default
+# footer and what special commands can be used inside the footer. See also
+# section "Doxygen usage" for information on how to generate the default footer
+# that doxygen normally uses.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FOOTER            = footer.html
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
+# sheet that is used by each HTML page. It can be used to fine-tune the look of
+# the HTML output. If left blank doxygen will generate a default style sheet.
+# See also section "Doxygen usage" for information on how to generate the style
+# sheet that doxygen normally uses.
+# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
+# it is more robust and this tag (HTML_STYLESHEET) will in the future become
+# obsolete.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_STYLESHEET        = customdoxygen.css
+
+# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# cascading style sheets that are included after the standard style sheets
+# created by doxygen. Using this option one can overrule certain style aspects.
+# This is preferred over using HTML_STYLESHEET since it does not replace the
+# standard style sheet and is therefore more robust against future updates.
+# Doxygen will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list). For an example see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_STYLESHEET  = 
+
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the HTML output directory. Note
+# that these files will be copied to the base HTML output directory. Use the
+# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
+# files will be copied as-is; there are no commands or markers available.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_FILES       = 
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
+# will adjust the colors in the style sheet and background images according to
+# this color. Hue is specified as an angle on a colorwheel, see
+# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
+# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
+# purple, and 360 is red again.
+# Minimum value: 0, maximum value: 359, default value: 220.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_HUE    = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
+# in the HTML output. For a value of 0 the output will use grayscales only. A
+# value of 255 will produce the most vivid colors.
+# Minimum value: 0, maximum value: 255, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_SAT    = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
+# luminance component of the colors in the HTML output. Values below 100
+# gradually make the output lighter, whereas values above 100 make the output
+# darker. The value divided by 100 is the actual gamma applied, so 80 represents
+# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
+# change the gamma.
+# Minimum value: 40, maximum value: 240, default value: 80.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_GAMMA  = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting this
+# to YES can help to show when doxygen was last run and thus if the
+# documentation is up to date.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_TIMESTAMP         = NO
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_DYNAMIC_SECTIONS  = NO
+
+# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
+# shown in the various tree structured indices initially; the user can expand
+# and collapse entries dynamically later on. Doxygen will expand the tree to
+# such a level that at most the specified number of entries are visible (unless
+# a fully collapsed tree already exceeds this amount). So setting the number of
+# entries 1 will produce a full collapsed tree by default. 0 is a special value
+# representing an infinite number of entries and will result in a full expanded
+# tree by default.
+# Minimum value: 0, maximum value: 9999, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_INDEX_NUM_ENTRIES = 100
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files will be
+# generated that can be used as input for Apple's Xcode 3 integrated development
+# environment (see: http://developer.apple.com/tools/xcode/), introduced with
+# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
+# Makefile in the HTML output directory. Running make will produce the docset in
+# that directory and running make install will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
+# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+# for more information.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_DOCSET        = NO
+
+# This tag determines the name of the docset feed. A documentation feed provides
+# an umbrella under which multiple documentation sets from a single provider
+# (such as a company or product suite) can be grouped.
+# The default value is: Doxygen generated docs.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_FEEDNAME        = "Doxygen generated docs"
+
+# This tag specifies a string that should uniquely identify the documentation
+# set bundle. This should be a reverse domain-name style string, e.g.
+# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_BUNDLE_ID       = org.doxygen.Project
+
+# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+# The default value is: org.doxygen.Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
+
+# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
+# The default value is: Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_NAME  = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
+# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
+# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
+# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
+# Windows.
+#
+# The HTML Help Workshop contains a compiler that can convert all HTML output
+# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
+# files are now used as the Windows 98 help format, and will replace the old
+# Windows help format (.hlp) on all Windows platforms in the future. Compressed
+# HTML files also contain an index, a table of contents, and you can search for
+# words in the documentation. The HTML workshop also contains a viewer for
+# compressed HTML files.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_HTMLHELP      = NO
+
+# The CHM_FILE tag can be used to specify the file name of the resulting .chm
+# file. You can add a path in front of the file if the result should not be
+# written to the html output directory.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_FILE               = 
+
+# The HHC_LOCATION tag can be used to specify the location (absolute path
+# including file name) of the HTML help compiler (hhc.exe). If non-empty,
+# doxygen will try to run the HTML help compiler on the generated index.hhp.
+# The file has to be specified with full path.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+HHC_LOCATION           = 
+
+# The GENERATE_CHI flag controls if a separate .chi index file is generated
+# (YES) or that it should be included in the master .chm file (NO).
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+GENERATE_CHI           = NO
+
+# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)
+# and project file content.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_INDEX_ENCODING     = 
+
+# The BINARY_TOC flag controls whether a binary table of contents is generated
+# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it
+# enables the Previous and Next buttons.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members to
+# the table of contents of the HTML help documentation and to the tree view.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+TOC_EXPAND             = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
+# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
+# (.qch) of the generated HTML documentation.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_QHP           = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
+# the file name of the resulting .qch file. The path specified is relative to
+# the HTML output folder.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QCH_FILE               = 
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
+# Project output. For more information please see Qt Help Project / Namespace
+# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_NAMESPACE          = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
+# Help Project output. For more information please see Qt Help Project / Virtual
+# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
+# folders).
+# The default value is: doc.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_VIRTUAL_FOLDER     = doc
+
+# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
+# filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_NAME   = 
+
+# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_ATTRS  = 
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's filter section matches. Qt Help Project / Filter Attributes (see:
+# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_SECT_FILTER_ATTRS  = 
+
+# The QHG_LOCATION tag can be used to specify the location of Qt's
+# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
+# generated .qhp file.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHG_LOCATION           = 
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
+# generated, together with the HTML files, they form an Eclipse help plugin. To
+# install this plugin and make it available under the help contents menu in
+# Eclipse, the contents of the directory containing the HTML and XML files needs
+# to be copied into the plugins directory of eclipse. The name of the directory
+# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
+# After copying Eclipse needs to be restarted before the help appears.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_ECLIPSEHELP   = NO
+
+# A unique identifier for the Eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have this
+# name. Each documentation set should have its own identifier.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
+
+ECLIPSE_DOC_ID         = org.doxygen.Project
+
+# If you want full control over the layout of the generated HTML pages it might
+# be necessary to disable the index and replace it with your own. The
+# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
+# of each HTML page. A value of NO enables the index and the value YES disables
+# it. Since the tabs in the index contain the same information as the navigation
+# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+DISABLE_INDEX          = NO
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information. If the tag
+# value is set to YES, a side panel will be generated containing a tree-like
+# index structure (just like the one that is generated for HTML Help). For this
+# to work a browser that supports JavaScript, DHTML, CSS and frames is required
+# (i.e. any modern browser). Windows users are probably better off using the
+# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can
+# further fine-tune the look of the index. As an example, the default style
+# sheet generated by doxygen has an example that shows how to put an image at
+# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
+# the same information as the tab index, you could consider setting
+# DISABLE_INDEX to YES when enabling this option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_TREEVIEW      = YES
+
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
+# doxygen will group on one line in the generated HTML documentation.
+#
+# Note that a value of 0 will completely suppress the enum values from appearing
+# in the overview section.
+# Minimum value: 0, maximum value: 20, default value: 4.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
+# to set the initial width (in pixels) of the frame in which the tree is shown.
+# Minimum value: 0, maximum value: 1500, default value: 250.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+TREEVIEW_WIDTH         = 250
+
+# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to
+# external symbols imported via tag files in a separate window.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+EXT_LINKS_IN_WINDOW    = NO
+
+# Use this tag to change the font size of LaTeX formulas included as images in
+# the HTML documentation. When you change the font size after a successful
+# doxygen run you need to manually remove any form_*.png images from the HTML
+# output directory to force them to be regenerated.
+# Minimum value: 8, maximum value: 50, default value: 10.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_FONTSIZE       = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# generated for formulas are transparent PNGs. Transparent PNGs are not
+# supported properly for IE 6.0, but are supported on all modern browsers.
+#
+# Note that when changing this option you need to delete any form_*.png files in
+# the HTML output directory before the changes have effect.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_TRANSPARENT    = YES
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
+# http://www.mathjax.org) which uses client side Javascript for the rendering
+# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
+# installed or if you want to formulas look prettier in the HTML output. When
+# enabled you may also need to install MathJax separately and configure the path
+# to it using the MATHJAX_RELPATH option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+USE_MATHJAX            = NO
+
+# When MathJax is enabled you can set the default output format to be used for
+# the MathJax output. See the MathJax site (see:
+# http://docs.mathjax.org/en/latest/output.html) for more details.
+# Possible values are: HTML-CSS (which is slower, but has the best
+# compatibility), NativeMML (i.e. MathML) and SVG.
+# The default value is: HTML-CSS.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_FORMAT         = HTML-CSS
+
+# When MathJax is enabled you need to specify the location relative to the HTML
+# output directory using the MATHJAX_RELPATH option. The destination directory
+# should contain the MathJax.js script. For instance, if the mathjax directory
+# is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
+# Content Delivery Network so you can quickly see the result without installing
+# MathJax. However, it is strongly recommended to install a local copy of
+# MathJax from http://www.mathjax.org before deployment.
+# The default value is: http://cdn.mathjax.org/mathjax/latest.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest
+
+# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
+# extension names that should be enabled during MathJax rendering. For example
+# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_EXTENSIONS     = 
+
+# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
+# of code that will be used on startup of the MathJax code. See the MathJax site
+# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
+# example see the documentation.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_CODEFILE       = 
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
+# the HTML output. The underlying search engine uses javascript and DHTML and
+# should work on any modern browser. Note that when using HTML help
+# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
+# there is already a search function so this one should typically be disabled.
+# For large projects the javascript based search engine can be slow, then
+# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
+# search using the keyboard; to jump to the search box use <access key> + S
+# (what the <access key> is depends on the OS and browser, but it is typically
+# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
+# key> to jump into the search results window, the results can be navigated
+# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
+# the search. The filter options can be selected when the cursor is inside the
+# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
+# to select a filter and <Enter> or <escape> to activate or cancel the filter
+# option.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+SEARCHENGINE           = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a web server instead of a web client using Javascript. There
+# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
+# setting. When disabled, doxygen will generate a PHP script for searching and
+# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
+# and searching needs to be provided by external tools. See the section
+# "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SERVER_BASED_SEARCH    = NO
+
+# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
+# script for searching. Instead the search results are written to an XML file
+# which needs to be processed by an external indexer. Doxygen will invoke an
+# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
+# search results.
+#
+# Doxygen ships with an example indexer (doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/).
+#
+# See the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH        = NO
+
+# The SEARCHENGINE_URL should point to a search engine hosted by a web server
+# which will return the search results when EXTERNAL_SEARCH is enabled.
+#
+# Doxygen ships with an example indexer (doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/). See the section "External Indexing and
+# Searching" for details.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHENGINE_URL       = 
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
+# search data is written to a file for indexing by an external tool. With the
+# SEARCHDATA_FILE tag the name of this file can be specified.
+# The default file is: searchdata.xml.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHDATA_FILE        = searchdata.xml
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
+# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
+# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
+# projects and redirect the results back to the right project.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH_ID     = 
+
+# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
+# projects other than the one defined by this configuration file, but that are
+# all added to the same external search index. Each project needs to have a
+# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
+# to a relative location where the documentation can be found. The format is:
+# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTRA_SEARCH_MAPPINGS  = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
+# The default value is: YES.
+
+GENERATE_LATEX         = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_OUTPUT           = 
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked.
+#
+# Note that when enabling USE_PDFLATEX this option is only used for generating
+# bitmaps for formulas in the HTML output, but not in the Makefile that is
+# written to the output directory.
+# The default file is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
+# index for LaTeX.
+# The default file is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used by the
+# printer.
+# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
+# 14 inches) and executive (7.25 x 10.5 inches).
+# The default value is: a4.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PAPER_TYPE             = a4
+
+# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
+# that should be included in the LaTeX output. The package can be specified just
+# by its name or with the correct syntax as to be used with the LaTeX
+# \usepackage command. To get the times font for instance you can specify :
+# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times}
+# To use the option intlimits with the amsmath package you can specify:
+# EXTRA_PACKAGES=[intlimits]{amsmath}
+# If left blank no extra packages will be included.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
+# generated LaTeX document. The header should contain everything until the first
+# chapter. If it is left blank doxygen will generate a standard header. See
+# section "Doxygen usage" for information on how to let doxygen write the
+# default header to a separate file.
+#
+# Note: Only use a user-defined header if you know what you are doing! The
+# following commands have a special meaning inside the header: $title,
+# $datetime, $date, $doxygenversion, $projectname, $projectnumber,
+# $projectbrief, $projectlogo. Doxygen will replace $title with the empty
+# string, for the replacement values of the other commands the user is referred
+# to HTML_HEADER.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HEADER           = 
+
+# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
+# generated LaTeX document. The footer should contain everything after the last
+# chapter. If it is left blank doxygen will generate a standard footer. See
+# LATEX_HEADER for more information on how to generate a default footer and what
+# special commands can be used inside the footer.
+#
+# Note: Only use a user-defined footer if you know what you are doing!
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_FOOTER           = 
+
+# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# LaTeX style sheets that are included after the standard style sheets created
+# by doxygen. Using this option one can overrule certain style aspects. Doxygen
+# will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list).
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_STYLESHEET = 
+
+# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the LATEX_OUTPUT output
+# directory. Note that the files will be copied as-is; there are no commands or
+# markers available.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_FILES      = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
+# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
+# contain links (just like the HTML output) instead of page references. This
+# makes the output suitable for online browsing using a PDF viewer.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PDF_HYPERLINKS         = YES
+
+# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
+# the PDF file directly from the LaTeX files. Set this option to YES, to get a
+# higher quality PDF documentation.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
+# command to the generated LaTeX files. This will instruct LaTeX to keep running
+# if errors occur, instead of asking the user for help. This option is also used
+# when generating formulas in HTML.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BATCHMODE        = NO
+
+# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
+# index chapters (such as File Index, Compound Index, etc.) in the output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HIDE_INDICES     = NO
+
+# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
+# code with syntax highlighting in the LaTeX output.
+#
+# Note that which sources are shown also depends on other settings such as
+# SOURCE_BROWSER.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_SOURCE_CODE      = NO
+
+# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
+# bibliography, e.g. plainnat, or ieeetr. See
+# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
+# The default value is: plain.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BIB_STYLE        = plain
+
+#---------------------------------------------------------------------------
+# Configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The
+# RTF output is optimized for Word 97 and may not look too pretty with other RTF
+# readers/editors.
+# The default value is: NO.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: rtf.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
+# contain hyperlink fields. The RTF file will contain links (just like the HTML
+# output) instead of page references. This makes the output suitable for online
+# browsing using Word or some other Word compatible readers that support those
+# fields.
+#
+# Note: WordPad (write) and others do not support links.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's config
+# file, i.e. a series of assignments. You only have to provide replacements,
+# missing definitions are set to their default value.
+#
+# See also section "Doxygen usage" for information on how to generate the
+# default style sheet that doxygen normally uses.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an RTF document. Syntax is
+# similar to doxygen's config file. A template extensions file can be generated
+# using doxygen -e rtf extensionFile.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_EXTENSIONS_FILE    = 
+
+# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code
+# with syntax highlighting in the RTF output.
+#
+# Note that which sources are shown also depends on other settings such as
+# SOURCE_BROWSER.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_SOURCE_CODE        = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for
+# classes and files.
+# The default value is: NO.
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it. A directory man3 will be created inside the directory specified by
+# MAN_OUTPUT.
+# The default directory is: man.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to the generated
+# man pages. In case the manual section does not start with a number, the number
+# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
+# optional.
+# The default value is: .3.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_EXTENSION          = .3
+
+# The MAN_SUBDIR tag determines the name of the directory created within
+# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by
+# MAN_EXTENSION with the initial . removed.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_SUBDIR             = 
+
+# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
+# will generate one additional man file for each entity documented in the real
+# man page(s). These additional files only source the real man page, but without
+# them the man command would be unable to find the correct page.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that
+# captures the structure of the code including all documentation.
+# The default value is: NO.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: xml.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_OUTPUT             = xml
+
+# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program
+# listings (including syntax highlighting and cross-referencing information) to
+# the XML output. Note that enabling this will significantly increase the size
+# of the XML output.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the DOCBOOK output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files
+# that can be used to generate PDF.
+# The default value is: NO.
+
+GENERATE_DOCBOOK       = NO
+
+# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
+# front of it.
+# The default directory is: docbook.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_OUTPUT         = docbook
+
+# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the
+# program listings (including syntax highlighting and cross-referencing
+# information) to the DOCBOOK output. Note that enabling this will significantly
+# increase the size of the DOCBOOK output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_PROGRAMLISTING = NO
+
+#---------------------------------------------------------------------------
+# Configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
+# AutoGen Definitions (see http://autogen.sf.net) file that captures the
+# structure of the code including all documentation. Note that this feature is
+# still experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module
+# file that captures the structure of the code including all documentation.
+#
+# Note that this feature is still experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary
+# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
+# output from the Perl module output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely
+# formatted so it can be parsed by a human reader. This is useful if you want to
+# understand what is going on. On the other hand, if this tag is set to NO, the
+# size of the Perl module output will be much smaller and Perl will parse it
+# just the same.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file are
+# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
+# so different doxyrules.make files included by the same Makefile don't
+# overwrite each other's variables.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_MAKEVAR_PREFIX = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all
+# C-preprocessor directives found in the sources and include files.
+# The default value is: YES.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names
+# in the source code. If set to NO, only conditional compilation will be
+# performed. Macro expansion can be done in a controlled way by setting
+# EXPAND_ONLY_PREDEF to YES.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
+# the macro expansion is limited to the macros specified with the PREDEFINED and
+# EXPAND_AS_DEFINED tags.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES, the include files in the
+# INCLUDE_PATH will be searched if a #include is found.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by the
+# preprocessor.
+# This tag requires that the tag SEARCH_INCLUDES is set to YES.
+
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will be
+# used.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that are
+# defined before the preprocessor is started (similar to the -D option of e.g.
+# gcc). The argument of the tag is a list of macros of the form: name or
+# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
+# is assumed. To prevent a macro definition from being undefined via #undef or
+# recursively expanded use the := operator instead of the = operator.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+PREDEFINED             = BUILD_IN_DOXYGEN NATS_HAS_STREAMING
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
+# tag can be used to specify a list of macro names that should be expanded. The
+# macro definition that is found in the sources will be used. Use the PREDEFINED
+# tag if you want to use a different macro definition that overrules the
+# definition found in the source code.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
+# remove all references to function-like macros that are alone on a line, have
+# an all uppercase name, and do not end with a semicolon. Such function macros
+# are typically used for boiler-plate code, and will confuse the parser if not
+# removed.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES tag can be used to specify one or more tag files. For each tag
+# file the location of the external documentation should be added. The format of
+# a tag file without this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where loc1 and loc2 can be relative or absolute paths or URLs. See the
+# section "Linking to external documentation" for more information about the use
+# of tag files.
+# Note: Each tag file must have a unique name (where the name does NOT include
+# the path). If a tag file is not located in the directory in which doxygen is
+# run, you must also specify the path to the tagfile here.
+
+TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
+# tag file that is based on the input files it reads. See section "Linking to
+# external documentation" for more information about the usage of tag files.
+
+GENERATE_TAGFILE       = 
+
+# If the ALLEXTERNALS tag is set to YES, all external class will be listed in
+# the class index. If set to NO, only the inherited external classes will be
+# listed.
+# The default value is: NO.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will be
+# listed.
+# The default value is: YES.
+
+EXTERNAL_GROUPS        = YES
+
+# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in
+# the related pages index. If set to NO, only the current project's pages will
+# be listed.
+# The default value is: YES.
+
+EXTERNAL_PAGES         = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of 'which perl').
+# The default file (with absolute path) is: /usr/bin/perl.
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram
+# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
+# NO turns the diagrams off. Note that this option also works with HAVE_DOT
+# disabled, but it is recommended to install and use dot, since it yields more
+# powerful graphs.
+# The default value is: YES.
+
+CLASS_DIAGRAMS         = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see:
+# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH            = 
+
+# You can include diagrams made with dia in doxygen documentation. Doxygen will
+# then run dia to produce the diagram and insert it in the documentation. The
+# DIA_PATH tag allows you to specify the directory where the dia binary resides.
+# If left empty dia is assumed to be found in the default search path.
+
+DIA_PATH               = 
+
+# If set to YES the inheritance and collaboration graphs will hide inheritance
+# and usage relations if the target is undocumented or is not a class.
+# The default value is: YES.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz (see:
+# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
+# Bell Labs. The other options in this section have no effect if this option is
+# set to NO
+# The default value is: NO.
+
+HAVE_DOT               = NO
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
+# to run in parallel. When set to 0 doxygen will base this on the number of
+# processors available in the system. You can set it explicitly to a value
+# larger than 0 to get control over the balance between CPU load and processing
+# speed.
+# Minimum value: 0, maximum value: 32, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_NUM_THREADS        = 0
+
+# When you want a differently looking font in the dot files that doxygen
+# generates you can specify the font name using DOT_FONTNAME. You need to make
+# sure dot is able to find the font, which can be done by putting it in a
+# standard location or by setting the DOTFONTPATH environment variable or by
+# setting DOT_FONTPATH to the directory containing the font.
+# The default value is: Helvetica.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTNAME           = Helvetica
+
+# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
+# dot graphs.
+# Minimum value: 4, maximum value: 24, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTSIZE           = 10
+
+# By default doxygen will tell dot to use the default font as specified with
+# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
+# the path where dot can find it using this tag.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTPATH           = 
+
+# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
+# each documented class showing the direct and indirect inheritance relations.
+# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
+# graph for each documented class showing the direct and indirect implementation
+# dependencies (inheritance, containment, and class references variables) of the
+# class with other documented classes.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
+# groups, showing the direct groups dependencies.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LOOK               = NO
+
+# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
+# class node. If there are many fields or methods and many nodes the graph may
+# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
+# number of items for each type to make the size more manageable. Set this to 0
+# for no limit. Note that the threshold may be exceeded by 50% before the limit
+# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
+# but if the number exceeds 15, the total amount of fields shown is limited to
+# 10.
+# Minimum value: 0, maximum value: 100, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LIMIT_NUM_FIELDS   = 10
+
+# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
+# collaboration graphs will show the relations between templates and their
+# instances.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+TEMPLATE_RELATIONS     = NO
+
+# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
+# YES then doxygen will generate a graph for each documented file showing the
+# direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDE_GRAPH          = YES
+
+# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
+# set to YES then doxygen will generate a graph for each documented file showing
+# the direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
+# functions only using the \callgraph command. Disabling a call graph can be
+# accomplished by means of the command \hidecallgraph.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALL_GRAPH             = NO
+
+# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable caller graphs for selected
+# functions only using the \callergraph command. Disabling a caller graph can be
+# accomplished by means of the command \hidecallergraph.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALLER_GRAPH           = NO
+
+# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
+# hierarchy of all classes instead of a textual one.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
+# dependencies a directory has on other directories in a graphical way. The
+# dependency relations are determined by the #include relations between the
+# files in the directories.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. For an explanation of the image formats see the section
+# output formats in the documentation of the dot tool (Graphviz (see:
+# http://www.graphviz.org/)).
+# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
+# to make the SVG files visible in IE 9+ (other browsers do not have this
+# requirement).
+# Possible values are: png, jpg, gif, svg, png:gd, png:gd:gd, png:cairo,
+# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and
+# png:gdiplus:gdiplus.
+# The default value is: png.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_IMAGE_FORMAT       = png
+
+# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
+# enable generation of interactive SVG images that allow zooming and panning.
+#
+# Note that this requires a modern browser other than Internet Explorer. Tested
+# and working are Firefox, Chrome, Safari, and Opera.
+# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
+# the SVG files visible. Older versions of IE do not have SVG support.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INTERACTIVE_SVG        = NO
+
+# The DOT_PATH tag can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_PATH               = 
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the \dotfile
+# command).
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOTFILE_DIRS           = 
+
+# The MSCFILE_DIRS tag can be used to specify one or more directories that
+# contain msc files that are included in the documentation (see the \mscfile
+# command).
+
+MSCFILE_DIRS           = 
+
+# The DIAFILE_DIRS tag can be used to specify one or more directories that
+# contain dia files that are included in the documentation (see the \diafile
+# command).
+
+DIAFILE_DIRS           = 
+
+# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the
+# path where java can find the plantuml.jar file. If left blank, it is assumed
+# PlantUML is not used or called during a preprocessing step. Doxygen will
+# generate a warning when it encounters a \startuml command in this case and
+# will not generate output for the diagram.
+
+PLANTUML_JAR_PATH      = 
+
+# When using plantuml, the specified paths are searched for files specified by
+# the !include statement in a plantuml block.
+
+PLANTUML_INCLUDE_PATH  = 
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
+# that will be shown in the graph. If the number of nodes in a graph becomes
+# larger than this value, doxygen will truncate the graph, which is visualized
+# by representing a node as a red box. Note that doxygen if the number of direct
+# children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
+# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+# Minimum value: 0, maximum value: 10000, default value: 50.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
+# generated by dot. A depth value of 3 means that only nodes reachable from the
+# root by following a path via at most 3 edges will be shown. Nodes that lay
+# further from the root node will be omitted. Note that setting this option to 1
+# or 2 may greatly reduce the computation time needed for large code bases. Also
+# note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+# Minimum value: 0, maximum value: 1000, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+MAX_DOT_GRAPH_DEPTH    = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not seem
+# to support this out of the box.
+#
+# Warning: Depending on the platform used, enabling this option may lead to
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
+# read).
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10) support
+# this, this feature is disabled by default.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_MULTI_TARGETS      = NO
+
+# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
+# explaining the meaning of the various boxes and arrows in the dot generated
+# graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot
+# files that are used to generate the various graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_CLEANUP            = YES
diff --git a/doc/DoxyFile.NATS.Client.in b/doc/DoxyFile.NATS.Client.in
new file mode 100644 (file)
index 0000000..9ec0288
--- /dev/null
@@ -0,0 +1,2413 @@
+# Doxyfile 1.8.10
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project.
+#
+# All text after a double hash (##) is considered a comment and is placed in
+# front of the TAG it is preceding.
+#
+# All text after a single hash (#) is considered a comment and will be ignored.
+# The format is:
+# TAG = value [value, ...]
+# For lists, items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (\" \").
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all text
+# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
+# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
+# for the list of possible encodings.
+# The default value is: UTF-8.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
+# double-quotes, unless you are using Doxywizard) that should identify the
+# project for which the documentation is generated. This name is used in the
+# title of most generated pages and in a few other places.
+# The default value is: My Project.
+
+PROJECT_NAME           = "@NATS_DOC_PROJECT_NAME@"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
+# could be handy for archiving the generated documentation or if some version
+# control system is used.
+
+PROJECT_NUMBER         = @NATS_VERSION_MAJOR@.@NATS_VERSION_MINOR@.@NATS_VERSION_PATCH@@NATS_VERSION_SUFFIX@
+
+# Using the PROJECT_BRIEF tag one can provide an optional one line description
+# for a project that appears at the top of each page and should give viewer a
+# quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF          = "The nats.io C Client, Supported by Synadia Communications Inc."
+
+# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
+# in the documentation. The maximum height of the logo should not exceed 55
+# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
+# the logo to the output directory.
+
+PROJECT_LOGO           = 
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
+# into which the generated documentation will be written. If a relative path is
+# entered, it will be relative to the location where doxygen was started. If
+# left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = .
+
+# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
+# directories (in 2 levels) under the output directory of each output format and
+# will distribute the generated files over these directories. Enabling this
+# option can be useful when feeding doxygen a huge amount of source files, where
+# putting all generated files in the same directory would otherwise causes
+# performance problems for the file system.
+# The default value is: NO.
+
+CREATE_SUBDIRS         = NO
+
+# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
+# characters to appear in the names of generated files. If set to NO, non-ASCII
+# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
+# U+3044.
+# The default value is: NO.
+
+ALLOW_UNICODE_NAMES    = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
+# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
+# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
+# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
+# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
+# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
+# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
+# Ukrainian and Vietnamese.
+# The default value is: English.
+
+OUTPUT_LANGUAGE        = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
+# descriptions after the members that are listed in the file and class
+# documentation (similar to Javadoc). Set to NO to disable this.
+# The default value is: YES.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief
+# description of a member or function before the detailed description
+#
+# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+# The default value is: YES.
+
+REPEAT_BRIEF           = NO
+
+# This tag implements a quasi-intelligent brief description abbreviator that is
+# used to form the text in various listings. Each string in this list, if found
+# as the leading text of the brief description, will be stripped from the text
+# and the result, after processing the whole list, is used as the annotated
+# text. Otherwise, the brief description is used as-is. If left blank, the
+# following values are used ($name is automatically replaced with the name of
+# the entity):The $name class, The $name widget, The $name file, is, provides,
+# specifies, contains, represents, a, an and the.
+
+ABBREVIATE_BRIEF       = "The $name class" \
+                         "The $name widget" \
+                         "The $name file" \
+                         is \
+                         provides \
+                         specifies \
+                         contains \
+                         represents \
+                         a \
+                         an \
+                         the
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# doxygen will generate a detailed section even if there is only a brief
+# description.
+# The default value is: NO.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+# The default value is: NO.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path
+# before files name in the file list and in the header files. If set to NO the
+# shortest path that makes the file name unique will be used
+# The default value is: YES.
+
+FULL_PATH_NAMES        = NO
+
+# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
+# Stripping is only done if one of the specified strings matches the left-hand
+# part of the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the path to
+# strip.
+#
+# Note that you can specify absolute paths here, but also relative paths, which
+# will be relative from the directory where doxygen is started.
+# This tag requires that the tag FULL_PATH_NAMES is set to YES.
+
+STRIP_FROM_PATH        = 
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
+# path mentioned in the documentation of a class, which tells the reader which
+# header file to include in order to use a class. If left blank only the name of
+# the header file containing the class definition is used. Otherwise one should
+# specify the list of include paths that are normally passed to the compiler
+# using the -I flag.
+
+STRIP_FROM_INC_PATH    = 
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
+# less readable) file names. This can be useful is your file systems doesn't
+# support long names like on DOS, Mac, or CD-ROM.
+# The default value is: NO.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
+# first line (until the first dot) of a Javadoc-style comment as the brief
+# description. If set to NO, the Javadoc-style will behave just like regular Qt-
+# style comments (thus requiring an explicit @brief command for a brief
+# description.)
+# The default value is: NO.
+
+JAVADOC_AUTOBRIEF      = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
+# line (until the first dot) of a Qt-style comment as the brief description. If
+# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
+# requiring an explicit \brief command for a brief description.)
+# The default value is: NO.
+
+QT_AUTOBRIEF           = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
+# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
+# a brief description. This used to be the default behavior. The new default is
+# to treat a multi-line C++ comment block as a detailed description. Set this
+# tag to YES if you prefer the old behavior instead.
+#
+# Note that setting this tag to YES also means that rational rose comments are
+# not recognized any more.
+# The default value is: NO.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
+# documentation from any documented member that it re-implements.
+# The default value is: YES.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new
+# page for each member. If set to NO, the documentation of a member will be part
+# of the file/class/namespace that contains it.
+# The default value is: NO.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
+# uses this value to replace tabs by spaces in code fragments.
+# Minimum value: 1, maximum value: 16, default value: 4.
+
+TAB_SIZE               = 4
+
+# This tag can be used to specify a number of aliases that act as commands in
+# the documentation. An alias has the form:
+# name=value
+# For example adding
+# "sideeffect=@par Side Effects:\n"
+# will allow you to put the command \sideeffect (or @sideeffect) in the
+# documentation, which will result in a user-defined paragraph with heading
+# "Side Effects:". You can put \n's in the value part of an alias to insert
+# newlines.
+
+ALIASES                = 
+
+# This tag can be used to specify a number of word-keyword mappings (TCL only).
+# A mapping has the form "name=value". For example adding "class=itcl::class"
+# will allow you to use the command class in the itcl::class meaning.
+
+TCL_SUBST              = 
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C. For
+# instance, some of the names that are used will be different. The list of all
+# members will be omitted, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_FOR_C  = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
+# Python sources only. Doxygen will then generate output that is more tailored
+# for that language. For instance, namespaces will be presented as packages,
+# qualified scopes will look different, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_JAVA   = YES
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources. Doxygen will then generate output that is tailored for Fortran.
+# The default value is: NO.
+
+OPTIMIZE_FOR_FORTRAN   = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for VHDL.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_VHDL   = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given
+# extension. Doxygen has a built-in mapping, but you can override or extend it
+# using this tag. The format is ext=language, where ext is a file extension, and
+# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
+# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
+# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
+# Fortran. In the later case the parser tries to guess whether the code is fixed
+# or free formatted code, this is the default for Fortran type files), VHDL. For
+# instance to make doxygen treat .inc files as Fortran files (default is PHP),
+# and .f files as C (default is Fortran), use: inc=Fortran f=C.
+#
+# Note: For files without extension you can use no_extension as a placeholder.
+#
+# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
+# the files are not read by doxygen.
+
+EXTENSION_MAPPING      = 
+
+# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
+# according to the Markdown format, which allows for more readable
+# documentation. See http://daringfireball.net/projects/markdown/ for details.
+# The output of markdown processing is further processed by doxygen, so you can
+# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
+# case of backward compatibilities issues.
+# The default value is: YES.
+
+MARKDOWN_SUPPORT       = YES
+
+# When enabled doxygen tries to link words that correspond to documented
+# classes, or namespaces to their corresponding documentation. Such a link can
+# be prevented in individual cases by putting a % sign in front of the word or
+# globally by setting AUTOLINK_SUPPORT to NO.
+# The default value is: YES.
+
+AUTOLINK_SUPPORT       = YES
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should set this
+# tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string);
+# versus func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+# The default value is: NO.
+
+BUILTIN_STL_SUPPORT    = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+# The default value is: NO.
+
+CPP_CLI_SUPPORT        = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
+# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
+# will parse them like normal C++ but will assume all classes use public instead
+# of private inheritance when no explicit protection keyword is present.
+# The default value is: NO.
+
+SIP_SUPPORT            = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate
+# getter and setter methods for a property. Setting this option to YES will make
+# doxygen to replace the get and set methods by a property in the documentation.
+# This will only work if the methods are indeed getting or setting a simple
+# type. If this is not the case, or you want to show the methods anyway, you
+# should set this option to NO.
+# The default value is: YES.
+
+IDL_PROPERTY_SUPPORT   = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+# The default value is: NO.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# If one adds a struct or class to a group and this option is enabled, then also
+# any nested class or struct is added to the same group. By default this option
+# is disabled and one has to add nested compounds explicitly via \ingroup.
+# The default value is: NO.
+
+GROUP_NESTED_COMPOUNDS = NO
+
+# Set the SUBGROUPING tag to YES to allow class member groups of the same type
+# (for instance a group of public functions) to be put as a subgroup of that
+# type (e.g. under the Public Functions section). Set it to NO to prevent
+# subgrouping. Alternatively, this can be done per class using the
+# \nosubgrouping command.
+# The default value is: YES.
+
+SUBGROUPING            = NO
+
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
+# are shown inside the group in which they are included (e.g. using \ingroup)
+# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
+# and RTF).
+#
+# Note that this feature does not work in combination with
+# SEPARATE_MEMBER_PAGES.
+# The default value is: NO.
+
+INLINE_GROUPED_CLASSES = NO
+
+# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
+# with only public data fields or simple typedef fields will be shown inline in
+# the documentation of the scope in which they are defined (i.e. file,
+# namespace, or group documentation), provided this scope is documented. If set
+# to NO, structs, classes, and unions are shown on a separate page (for HTML and
+# Man pages) or section (for LaTeX and RTF).
+# The default value is: NO.
+
+INLINE_SIMPLE_STRUCTS  = NO
+
+# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
+# enum is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically be
+# useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+# The default value is: NO.
+
+TYPEDEF_HIDES_STRUCT   = NO
+
+# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
+# cache is used to resolve symbols given their name and scope. Since this can be
+# an expensive process and often the same symbol appears multiple times in the
+# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
+# doxygen will become slower. If the cache is too large, memory is wasted. The
+# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
+# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
+# symbols. At the end of a run doxygen will report the cache usage and suggest
+# the optimal cache size from a speed point of view.
+# Minimum value: 0, maximum value: 9, default value: 0.
+
+LOOKUP_CACHE_SIZE      = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in
+# documentation are documented, even if no documentation was available. Private
+# class members and static file members will be hidden unless the
+# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
+# Note: This will also disable the warnings about undocumented members that are
+# normally produced when WARNINGS is set to YES.
+# The default value is: NO.
+
+EXTRACT_ALL            = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
+# be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
+# scope will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PACKAGE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be
+# included in the documentation.
+# The default value is: NO.
+
+EXTRACT_STATIC         = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
+# locally in source files will be included in the documentation. If set to NO,
+# only classes defined in header files are included. Does not have any effect
+# for Java sources.
+# The default value is: YES.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. If set to YES, local methods,
+# which are defined in the implementation section but not in the interface are
+# included in the documentation. If set to NO, only methods in the interface are
+# included.
+# The default value is: NO.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base name of
+# the file that contains the anonymous namespace. By default anonymous namespace
+# are hidden.
+# The default value is: NO.
+
+EXTRACT_ANON_NSPACES   = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
+# undocumented members inside documented classes or files. If set to NO these
+# members will be included in the various overviews, but no documentation
+# section is generated. This option has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_MEMBERS     = YES
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy. If set
+# to NO, these classes will be included in the various overviews. This option
+# has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_CLASSES     = YES
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
+# (class|struct|union) declarations. If set to NO, these declarations will be
+# included in the documentation.
+# The default value is: NO.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
+# documentation blocks found inside the body of a function. If set to NO, these
+# blocks will be appended to the function's detailed documentation block.
+# The default value is: NO.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation that is typed after a
+# \internal command is included. If the tag is set to NO then the documentation
+# will be excluded. Set it to YES to include the internal documentation.
+# The default value is: NO.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
+# names in lower-case letters. If set to YES, upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+# The default value is: system dependent.
+
+CASE_SENSE_NAMES       = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
+# their full class and namespace scopes in the documentation. If set to YES, the
+# scope will be hidden.
+# The default value is: NO.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
+# append additional text to a page's title, such as Class Reference. If set to
+# YES the compound reference will be hidden.
+# The default value is: NO.
+
+HIDE_COMPOUND_REFERENCE= NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
+# the files that are included by a file in the documentation of that file.
+# The default value is: YES.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
+# grouped member an include statement to the documentation, telling the reader
+# which file to include in order to use the member.
+# The default value is: NO.
+
+SHOW_GROUPED_MEMB_INC  = NO
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
+# files with double quotes in the documentation rather than with sharp brackets.
+# The default value is: NO.
+
+FORCE_LOCAL_INCLUDES   = NO
+
+# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
+# documentation for inline members.
+# The default value is: YES.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
+# (detailed) documentation of file and class members alphabetically by member
+# name. If set to NO, the members will appear in declaration order.
+# The default value is: YES.
+
+SORT_MEMBER_DOCS       = NO
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
+# descriptions of file, namespace and class members alphabetically by member
+# name. If set to NO, the members will appear in declaration order. Note that
+# this will also influence the order of the classes in the class list.
+# The default value is: NO.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
+# (brief and detailed) documentation of class members so that constructors and
+# destructors are listed first. If set to NO the constructors will appear in the
+# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
+# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
+# member documentation.
+# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
+# detailed member documentation.
+# The default value is: NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
+# of group names into alphabetical order. If set to NO the group names will
+# appear in their defined order.
+# The default value is: NO.
+
+SORT_GROUP_NAMES       = NO 
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
+# fully-qualified names, including namespaces. If set to NO, the class list will
+# be sorted only by class name, not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the alphabetical
+# list.
+# The default value is: NO.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
+# type resolution of all parameters of a function it will reject a match between
+# the prototype and the implementation of a member function even if there is
+# only one candidate or it is obvious which candidate to choose by doing a
+# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
+# accept a match between prototype and implementation in such cases.
+# The default value is: NO.
+
+STRICT_PROTO_MATCHING  = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo
+# list. This list is created by putting \todo commands in the documentation.
+# The default value is: YES.
+
+GENERATE_TODOLIST      = NO
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test
+# list. This list is created by putting \test commands in the documentation.
+# The default value is: YES.
+
+GENERATE_TESTLIST      = NO
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug
+# list. This list is created by putting \bug commands in the documentation.
+# The default value is: YES.
+
+GENERATE_BUGLIST       = NO
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)
+# the deprecated list. This list is created by putting \deprecated commands in
+# the documentation.
+# The default value is: YES.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional documentation
+# sections, marked by \if <section_label> ... \endif and \cond <section_label>
+# ... \endcond blocks.
+
+ENABLED_SECTIONS       = 
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
+# initial value of a variable or macro / define can have for it to appear in the
+# documentation. If the initializer consists of more lines than specified here
+# it will be hidden. Use a value of 0 to hide initializers completely. The
+# appearance of the value of individual variables and macros / defines can be
+# controlled using \showinitializer or \hideinitializer command in the
+# documentation regardless of this setting.
+# Minimum value: 0, maximum value: 10000, default value: 30.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
+# the bottom of the documentation of classes and structs. If set to YES, the
+# list will mention the files that were used to generate the documentation.
+# The default value is: YES.
+
+SHOW_USED_FILES        = YES
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
+# will remove the Files entry from the Quick Index and from the Folder Tree View
+# (if specified).
+# The default value is: YES.
+
+SHOW_FILES             = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
+# page. This will remove the Namespaces entry from the Quick Index and from the
+# Folder Tree View (if specified).
+# The default value is: YES.
+
+SHOW_NAMESPACES        = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command command input-file, where command is the value of the
+# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
+# by doxygen. Whatever the program writes to standard output is used as the file
+# version. For an example see the documentation.
+
+FILE_VERSION_FILTER    = 
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. To create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option. You can
+# optionally specify a file name after the option, if omitted DoxygenLayout.xml
+# will be used as the name of the layout file.
+#
+# Note that if you run doxygen from a directory containing a file called
+# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
+# tag is left empty.
+
+LAYOUT_FILE            = 
+
+# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
+# the reference definitions. This must be a list of .bib files. The .bib
+# extension is automatically appended if omitted. This requires the bibtex tool
+# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
+# For LaTeX the style of the bibliography can be controlled using
+# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
+# search path. See also \cite for info how to create references.
+
+CITE_BIB_FILES         = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated to
+# standard output by doxygen. If QUIET is set to YES this implies that the
+# messages are off.
+# The default value is: NO.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
+# this implies that the warnings are on.
+#
+# Tip: Turn warnings on while writing the documentation.
+# The default value is: YES.
+
+WARNINGS               = YES
+
+# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
+# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
+# will automatically be disabled.
+# The default value is: YES.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some parameters
+# in a documented function, or documenting parameters that don't exist or using
+# markup commands wrongly.
+# The default value is: YES.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
+# are documented, but have no documentation for their parameters or return
+# value. If set to NO, doxygen will only warn about wrong or incomplete
+# parameter documentation, but not about the absence of documentation.
+# The default value is: NO.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that doxygen
+# can produce. The string should contain the $file, $line, and $text tags, which
+# will be replaced by the file and line number from which the warning originated
+# and the warning text. Optionally the format may contain $version, which will
+# be replaced by the version of the file (if it could be obtained via
+# FILE_VERSION_FILTER)
+# The default value is: $file:$line: $text.
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning and error
+# messages should be written. If left blank the output is written to standard
+# error (stderr).
+
+WARN_LOGFILE           = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag is used to specify the files and/or directories that contain
+# documented source files. You may enter file names like myfile.cpp or
+# directories like /usr/src/myproject. Separate the files or directories with
+# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
+# Note: If this tag is empty the current directory is searched.
+
+INPUT                  = ../src ../src/adapters
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
+# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
+# documentation (see: http://www.gnu.org/software/libiconv) for the list of
+# possible encodings.
+# The default value is: UTF-8.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
+# *.h) to filter out the source-files in the directories.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# read by doxygen.
+#
+# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
+# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
+# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,
+# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd,
+# *.vhdl, *.ucf, *.qsf, *.as and *.js.
+
+FILE_PATTERNS          = nats.h status.h libevent.h libuv.h
+
+# The RECURSIVE tag can be used to specify whether or not subdirectories should
+# be searched for input files as well.
+# The default value is: NO.
+
+RECURSIVE              = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should be
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+#
+# Note that relative paths are relative to the directory from which doxygen is
+# run.
+
+EXCLUDE                = 
+
+# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
+# directories that are symbolic links (a Unix file system feature) are excluded
+# from the input.
+# The default value is: NO.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       = 
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories use the pattern */test/*
+
+EXCLUDE_SYMBOLS        = 
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or directories
+# that contain example code fragments that are included (see the \include
+# command).
+
+EXAMPLE_PATH           = 
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank all
+# files are included.
+
+EXAMPLE_PATTERNS       = *
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude commands
+# irrespective of the value of the RECURSIVE tag.
+# The default value is: NO.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or directories
+# that contain images that are to be included in the documentation (see the
+# \image command).
+
+IMAGE_PATH             = 
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command:
+#
+# <filter> <input-file>
+#
+# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
+# name of an input file. Doxygen will then use the output that the filter
+# program writes to standard output. If FILTER_PATTERNS is specified, this tag
+# will be ignored.
+#
+# Note that the filter must not add or remove lines; it is applied before the
+# code is scanned, but not when the output code is generated. If lines are added
+# or removed, the anchors will not be placed correctly.
+
+INPUT_FILTER           = 
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form: pattern=filter
+# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
+# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
+# patterns match the file name, INPUT_FILTER is applied.
+
+FILTER_PATTERNS        = 
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will also be used to filter the input files that are used for
+# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
+# The default value is: NO.
+
+FILTER_SOURCE_FILES    = NO
+
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
+# it is also possible to disable source filtering for a specific pattern using
+# *.ext= (so without naming a filter).
+# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
+
+FILTER_SOURCE_PATTERNS = 
+
+# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
+# is part of the input, its contents will be placed on the main page
+# (index.html). This can be useful if you have a project on for instance GitHub
+# and want to reuse the introduction page also for the doxygen output.
+
+USE_MDFILE_AS_MAINPAGE = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
+# generated. Documented entities will be cross-referenced with these sources.
+#
+# Note: To get rid of all source code in the generated output, make sure that
+# also VERBATIM_HEADERS is set to NO.
+# The default value is: NO.
+
+SOURCE_BROWSER         = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body of functions,
+# classes and enums directly into the documentation.
+# The default value is: NO.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
+# special comment blocks from generated source code fragments. Normal C, C++ and
+# Fortran comments will always remain visible.
+# The default value is: YES.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
+# function all documented functions referencing it will be listed.
+# The default value is: NO.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES then for each documented function
+# all documented entities called/used by that function will be listed.
+# The default value is: NO.
+
+REFERENCES_RELATION    = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
+# to YES then the hyperlinks from functions in REFERENCES_RELATION and
+# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
+# link to the documentation.
+# The default value is: YES.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
+# source code will show a tooltip with additional information such as prototype,
+# brief description and links to the definition and documentation. Since this
+# will make the HTML file larger and loading of large files a bit slower, you
+# can opt to disable this feature.
+# The default value is: YES.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+SOURCE_TOOLTIPS        = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code will
+# point to the HTML generated by the htags(1) tool instead of doxygen built-in
+# source browser. The htags tool is part of GNU's global source tagging system
+# (see http://www.gnu.org/software/global/global.html). You will need version
+# 4.8.6 or higher.
+#
+# To use it do the following:
+# - Install the latest version of global
+# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
+# - Make sure the INPUT points to the root of the source tree
+# - Run doxygen as normal
+#
+# Doxygen will invoke htags (and that will in turn invoke gtags), so these
+# tools must be available from the command line (i.e. in the search path).
+#
+# The result: instead of the source browser generated by doxygen, the links to
+# source code will now point to the output of htags.
+# The default value is: NO.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
+# verbatim copy of the header file for each class for which an include is
+# specified. Set to NO to disable this.
+# See also: Section \class.
+# The default value is: YES.
+
+VERBATIM_HEADERS       = YES
+
+# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
+# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the
+# cost of reduced performance. This can be particularly helpful with template
+# rich C++ code for which doxygen's built-in parser lacks the necessary type
+# information.
+# Note: The availability of this option depends on whether or not doxygen was
+# compiled with the --with-libclang option.
+# The default value is: NO.
+
+#CLANG_ASSISTED_PARSING = NO
+
+# If clang assisted parsing is enabled you can provide the compiler with command
+# line options that you would normally use when invoking the compiler. Note that
+# the include paths will already be set by doxygen for the files and directories
+# specified with INPUT and INCLUDE_PATH.
+# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
+
+#CLANG_OPTIONS          = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
+# compounds will be generated. Enable this if the project contains a lot of
+# classes, structs, unions or interfaces.
+# The default value is: YES.
+
+ALPHABETICAL_INDEX     = YES
+
+# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
+# which the alphabetical index list will be split.
+# Minimum value: 1, maximum value: 20, default value: 5.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all classes will
+# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
+# can be used to specify a prefix (or a list of prefixes) that should be ignored
+# while generating the index headers.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+IGNORE_PREFIX          =  
+
+#---------------------------------------------------------------------------
+# Configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
+# The default value is: YES.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
+# generated HTML page (for example: .htm, .php, .asp).
+# The default value is: .html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
+# each generated HTML page. If the tag is left blank doxygen will generate a
+# standard header.
+#
+# To get valid HTML the header file that includes any scripts and style sheets
+# that doxygen needs, which is dependent on the configuration options used (e.g.
+# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
+# default header using
+# doxygen -w html new_header.html new_footer.html new_stylesheet.css
+# YourConfigFile
+# and then modify the file new_header.html. See also section "Doxygen usage"
+# for information on how to generate the default header that doxygen normally
+# uses.
+# Note: The header is subject to change so you typically have to regenerate the
+# default header when upgrading to a newer version of doxygen. For a description
+# of the possible markers and block names see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_HEADER            = header.html
+
+# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
+# generated HTML page. If the tag is left blank doxygen will generate a standard
+# footer. See HTML_HEADER for more information on how to generate a default
+# footer and what special commands can be used inside the footer. See also
+# section "Doxygen usage" for information on how to generate the default footer
+# that doxygen normally uses.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FOOTER            = footer.html
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
+# sheet that is used by each HTML page. It can be used to fine-tune the look of
+# the HTML output. If left blank doxygen will generate a default style sheet.
+# See also section "Doxygen usage" for information on how to generate the style
+# sheet that doxygen normally uses.
+# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
+# it is more robust and this tag (HTML_STYLESHEET) will in the future become
+# obsolete.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_STYLESHEET        = customdoxygen.css
+
+# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# cascading style sheets that are included after the standard style sheets
+# created by doxygen. Using this option one can overrule certain style aspects.
+# This is preferred over using HTML_STYLESHEET since it does not replace the
+# standard style sheet and is therefore more robust against future updates.
+# Doxygen will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list). For an example see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_STYLESHEET  = 
+
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the HTML output directory. Note
+# that these files will be copied to the base HTML output directory. Use the
+# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
+# files will be copied as-is; there are no commands or markers available.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_FILES       = 
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
+# will adjust the colors in the style sheet and background images according to
+# this color. Hue is specified as an angle on a colorwheel, see
+# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
+# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
+# purple, and 360 is red again.
+# Minimum value: 0, maximum value: 359, default value: 220.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_HUE    = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
+# in the HTML output. For a value of 0 the output will use grayscales only. A
+# value of 255 will produce the most vivid colors.
+# Minimum value: 0, maximum value: 255, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_SAT    = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
+# luminance component of the colors in the HTML output. Values below 100
+# gradually make the output lighter, whereas values above 100 make the output
+# darker. The value divided by 100 is the actual gamma applied, so 80 represents
+# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
+# change the gamma.
+# Minimum value: 40, maximum value: 240, default value: 80.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_GAMMA  = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting this
+# to YES can help to show when doxygen was last run and thus if the
+# documentation is up to date.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_TIMESTAMP         = NO
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_DYNAMIC_SECTIONS  = NO
+
+# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
+# shown in the various tree structured indices initially; the user can expand
+# and collapse entries dynamically later on. Doxygen will expand the tree to
+# such a level that at most the specified number of entries are visible (unless
+# a fully collapsed tree already exceeds this amount). So setting the number of
+# entries 1 will produce a full collapsed tree by default. 0 is a special value
+# representing an infinite number of entries and will result in a full expanded
+# tree by default.
+# Minimum value: 0, maximum value: 9999, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_INDEX_NUM_ENTRIES = 100
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files will be
+# generated that can be used as input for Apple's Xcode 3 integrated development
+# environment (see: http://developer.apple.com/tools/xcode/), introduced with
+# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
+# Makefile in the HTML output directory. Running make will produce the docset in
+# that directory and running make install will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
+# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+# for more information.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_DOCSET        = NO
+
+# This tag determines the name of the docset feed. A documentation feed provides
+# an umbrella under which multiple documentation sets from a single provider
+# (such as a company or product suite) can be grouped.
+# The default value is: Doxygen generated docs.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_FEEDNAME        = "Doxygen generated docs"
+
+# This tag specifies a string that should uniquely identify the documentation
+# set bundle. This should be a reverse domain-name style string, e.g.
+# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_BUNDLE_ID       = org.doxygen.Project
+
+# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+# The default value is: org.doxygen.Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
+
+# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
+# The default value is: Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_NAME  = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
+# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
+# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
+# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
+# Windows.
+#
+# The HTML Help Workshop contains a compiler that can convert all HTML output
+# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
+# files are now used as the Windows 98 help format, and will replace the old
+# Windows help format (.hlp) on all Windows platforms in the future. Compressed
+# HTML files also contain an index, a table of contents, and you can search for
+# words in the documentation. The HTML workshop also contains a viewer for
+# compressed HTML files.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_HTMLHELP      = NO
+
+# The CHM_FILE tag can be used to specify the file name of the resulting .chm
+# file. You can add a path in front of the file if the result should not be
+# written to the html output directory.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_FILE               = 
+
+# The HHC_LOCATION tag can be used to specify the location (absolute path
+# including file name) of the HTML help compiler (hhc.exe). If non-empty,
+# doxygen will try to run the HTML help compiler on the generated index.hhp.
+# The file has to be specified with full path.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+HHC_LOCATION           = 
+
+# The GENERATE_CHI flag controls if a separate .chi index file is generated
+# (YES) or that it should be included in the master .chm file (NO).
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+GENERATE_CHI           = NO
+
+# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)
+# and project file content.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_INDEX_ENCODING     = 
+
+# The BINARY_TOC flag controls whether a binary table of contents is generated
+# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it
+# enables the Previous and Next buttons.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members to
+# the table of contents of the HTML help documentation and to the tree view.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+TOC_EXPAND             = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
+# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
+# (.qch) of the generated HTML documentation.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_QHP           = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
+# the file name of the resulting .qch file. The path specified is relative to
+# the HTML output folder.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QCH_FILE               = 
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
+# Project output. For more information please see Qt Help Project / Namespace
+# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_NAMESPACE          = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
+# Help Project output. For more information please see Qt Help Project / Virtual
+# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
+# folders).
+# The default value is: doc.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_VIRTUAL_FOLDER     = doc
+
+# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
+# filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_NAME   = 
+
+# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_ATTRS  = 
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's filter section matches. Qt Help Project / Filter Attributes (see:
+# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_SECT_FILTER_ATTRS  = 
+
+# The QHG_LOCATION tag can be used to specify the location of Qt's
+# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
+# generated .qhp file.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHG_LOCATION           = 
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
+# generated, together with the HTML files, they form an Eclipse help plugin. To
+# install this plugin and make it available under the help contents menu in
+# Eclipse, the contents of the directory containing the HTML and XML files needs
+# to be copied into the plugins directory of eclipse. The name of the directory
+# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
+# After copying Eclipse needs to be restarted before the help appears.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_ECLIPSEHELP   = NO
+
+# A unique identifier for the Eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have this
+# name. Each documentation set should have its own identifier.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
+
+ECLIPSE_DOC_ID         = org.doxygen.Project
+
+# If you want full control over the layout of the generated HTML pages it might
+# be necessary to disable the index and replace it with your own. The
+# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
+# of each HTML page. A value of NO enables the index and the value YES disables
+# it. Since the tabs in the index contain the same information as the navigation
+# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+DISABLE_INDEX          = NO
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information. If the tag
+# value is set to YES, a side panel will be generated containing a tree-like
+# index structure (just like the one that is generated for HTML Help). For this
+# to work a browser that supports JavaScript, DHTML, CSS and frames is required
+# (i.e. any modern browser). Windows users are probably better off using the
+# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can
+# further fine-tune the look of the index. As an example, the default style
+# sheet generated by doxygen has an example that shows how to put an image at
+# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
+# the same information as the tab index, you could consider setting
+# DISABLE_INDEX to YES when enabling this option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_TREEVIEW      = YES
+
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
+# doxygen will group on one line in the generated HTML documentation.
+#
+# Note that a value of 0 will completely suppress the enum values from appearing
+# in the overview section.
+# Minimum value: 0, maximum value: 20, default value: 4.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
+# to set the initial width (in pixels) of the frame in which the tree is shown.
+# Minimum value: 0, maximum value: 1500, default value: 250.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+TREEVIEW_WIDTH         = 250
+
+# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to
+# external symbols imported via tag files in a separate window.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+EXT_LINKS_IN_WINDOW    = NO
+
+# Use this tag to change the font size of LaTeX formulas included as images in
+# the HTML documentation. When you change the font size after a successful
+# doxygen run you need to manually remove any form_*.png images from the HTML
+# output directory to force them to be regenerated.
+# Minimum value: 8, maximum value: 50, default value: 10.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_FONTSIZE       = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# generated for formulas are transparent PNGs. Transparent PNGs are not
+# supported properly for IE 6.0, but are supported on all modern browsers.
+#
+# Note that when changing this option you need to delete any form_*.png files in
+# the HTML output directory before the changes have effect.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_TRANSPARENT    = YES
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
+# http://www.mathjax.org) which uses client side Javascript for the rendering
+# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
+# installed or if you want to formulas look prettier in the HTML output. When
+# enabled you may also need to install MathJax separately and configure the path
+# to it using the MATHJAX_RELPATH option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+USE_MATHJAX            = NO
+
+# When MathJax is enabled you can set the default output format to be used for
+# the MathJax output. See the MathJax site (see:
+# http://docs.mathjax.org/en/latest/output.html) for more details.
+# Possible values are: HTML-CSS (which is slower, but has the best
+# compatibility), NativeMML (i.e. MathML) and SVG.
+# The default value is: HTML-CSS.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_FORMAT         = HTML-CSS
+
+# When MathJax is enabled you need to specify the location relative to the HTML
+# output directory using the MATHJAX_RELPATH option. The destination directory
+# should contain the MathJax.js script. For instance, if the mathjax directory
+# is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
+# Content Delivery Network so you can quickly see the result without installing
+# MathJax. However, it is strongly recommended to install a local copy of
+# MathJax from http://www.mathjax.org before deployment.
+# The default value is: http://cdn.mathjax.org/mathjax/latest.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest
+
+# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
+# extension names that should be enabled during MathJax rendering. For example
+# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_EXTENSIONS     = 
+
+# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
+# of code that will be used on startup of the MathJax code. See the MathJax site
+# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
+# example see the documentation.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_CODEFILE       = 
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
+# the HTML output. The underlying search engine uses javascript and DHTML and
+# should work on any modern browser. Note that when using HTML help
+# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
+# there is already a search function so this one should typically be disabled.
+# For large projects the javascript based search engine can be slow, then
+# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
+# search using the keyboard; to jump to the search box use <access key> + S
+# (what the <access key> is depends on the OS and browser, but it is typically
+# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
+# key> to jump into the search results window, the results can be navigated
+# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
+# the search. The filter options can be selected when the cursor is inside the
+# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
+# to select a filter and <Enter> or <escape> to activate or cancel the filter
+# option.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+SEARCHENGINE           = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a web server instead of a web client using Javascript. There
+# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
+# setting. When disabled, doxygen will generate a PHP script for searching and
+# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
+# and searching needs to be provided by external tools. See the section
+# "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SERVER_BASED_SEARCH    = NO
+
+# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
+# script for searching. Instead the search results are written to an XML file
+# which needs to be processed by an external indexer. Doxygen will invoke an
+# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
+# search results.
+#
+# Doxygen ships with an example indexer (doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/).
+#
+# See the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH        = NO
+
+# The SEARCHENGINE_URL should point to a search engine hosted by a web server
+# which will return the search results when EXTERNAL_SEARCH is enabled.
+#
+# Doxygen ships with an example indexer (doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/). See the section "External Indexing and
+# Searching" for details.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHENGINE_URL       = 
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
+# search data is written to a file for indexing by an external tool. With the
+# SEARCHDATA_FILE tag the name of this file can be specified.
+# The default file is: searchdata.xml.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHDATA_FILE        = searchdata.xml
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
+# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
+# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
+# projects and redirect the results back to the right project.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH_ID     = 
+
+# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
+# projects other than the one defined by this configuration file, but that are
+# all added to the same external search index. Each project needs to have a
+# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
+# to a relative location where the documentation can be found. The format is:
+# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTRA_SEARCH_MAPPINGS  = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
+# The default value is: YES.
+
+GENERATE_LATEX         = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_OUTPUT           = 
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked.
+#
+# Note that when enabling USE_PDFLATEX this option is only used for generating
+# bitmaps for formulas in the HTML output, but not in the Makefile that is
+# written to the output directory.
+# The default file is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
+# index for LaTeX.
+# The default file is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used by the
+# printer.
+# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
+# 14 inches) and executive (7.25 x 10.5 inches).
+# The default value is: a4.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PAPER_TYPE             = a4
+
+# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
+# that should be included in the LaTeX output. The package can be specified just
+# by its name or with the correct syntax as to be used with the LaTeX
+# \usepackage command. To get the times font for instance you can specify :
+# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times}
+# To use the option intlimits with the amsmath package you can specify:
+# EXTRA_PACKAGES=[intlimits]{amsmath}
+# If left blank no extra packages will be included.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
+# generated LaTeX document. The header should contain everything until the first
+# chapter. If it is left blank doxygen will generate a standard header. See
+# section "Doxygen usage" for information on how to let doxygen write the
+# default header to a separate file.
+#
+# Note: Only use a user-defined header if you know what you are doing! The
+# following commands have a special meaning inside the header: $title,
+# $datetime, $date, $doxygenversion, $projectname, $projectnumber,
+# $projectbrief, $projectlogo. Doxygen will replace $title with the empty
+# string, for the replacement values of the other commands the user is referred
+# to HTML_HEADER.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HEADER           = 
+
+# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
+# generated LaTeX document. The footer should contain everything after the last
+# chapter. If it is left blank doxygen will generate a standard footer. See
+# LATEX_HEADER for more information on how to generate a default footer and what
+# special commands can be used inside the footer.
+#
+# Note: Only use a user-defined footer if you know what you are doing!
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_FOOTER           = 
+
+# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# LaTeX style sheets that are included after the standard style sheets created
+# by doxygen. Using this option one can overrule certain style aspects. Doxygen
+# will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list).
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_STYLESHEET = 
+
+# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the LATEX_OUTPUT output
+# directory. Note that the files will be copied as-is; there are no commands or
+# markers available.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_FILES      = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
+# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
+# contain links (just like the HTML output) instead of page references. This
+# makes the output suitable for online browsing using a PDF viewer.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PDF_HYPERLINKS         = YES
+
+# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
+# the PDF file directly from the LaTeX files. Set this option to YES, to get a
+# higher quality PDF documentation.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
+# command to the generated LaTeX files. This will instruct LaTeX to keep running
+# if errors occur, instead of asking the user for help. This option is also used
+# when generating formulas in HTML.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BATCHMODE        = NO
+
+# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
+# index chapters (such as File Index, Compound Index, etc.) in the output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HIDE_INDICES     = NO
+
+# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
+# code with syntax highlighting in the LaTeX output.
+#
+# Note that which sources are shown also depends on other settings such as
+# SOURCE_BROWSER.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_SOURCE_CODE      = NO
+
+# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
+# bibliography, e.g. plainnat, or ieeetr. See
+# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
+# The default value is: plain.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BIB_STYLE        = plain
+
+#---------------------------------------------------------------------------
+# Configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The
+# RTF output is optimized for Word 97 and may not look too pretty with other RTF
+# readers/editors.
+# The default value is: NO.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: rtf.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
+# contain hyperlink fields. The RTF file will contain links (just like the HTML
+# output) instead of page references. This makes the output suitable for online
+# browsing using Word or some other Word compatible readers that support those
+# fields.
+#
+# Note: WordPad (write) and others do not support links.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's config
+# file, i.e. a series of assignments. You only have to provide replacements,
+# missing definitions are set to their default value.
+#
+# See also section "Doxygen usage" for information on how to generate the
+# default style sheet that doxygen normally uses.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an RTF document. Syntax is
+# similar to doxygen's config file. A template extensions file can be generated
+# using doxygen -e rtf extensionFile.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_EXTENSIONS_FILE    = 
+
+# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code
+# with syntax highlighting in the RTF output.
+#
+# Note that which sources are shown also depends on other settings such as
+# SOURCE_BROWSER.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_SOURCE_CODE        = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for
+# classes and files.
+# The default value is: NO.
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it. A directory man3 will be created inside the directory specified by
+# MAN_OUTPUT.
+# The default directory is: man.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to the generated
+# man pages. In case the manual section does not start with a number, the number
+# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
+# optional.
+# The default value is: .3.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_EXTENSION          = .3
+
+# The MAN_SUBDIR tag determines the name of the directory created within
+# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by
+# MAN_EXTENSION with the initial . removed.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_SUBDIR             = 
+
+# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
+# will generate one additional man file for each entity documented in the real
+# man page(s). These additional files only source the real man page, but without
+# them the man command would be unable to find the correct page.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that
+# captures the structure of the code including all documentation.
+# The default value is: NO.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: xml.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_OUTPUT             = xml
+
+# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program
+# listings (including syntax highlighting and cross-referencing information) to
+# the XML output. Note that enabling this will significantly increase the size
+# of the XML output.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the DOCBOOK output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files
+# that can be used to generate PDF.
+# The default value is: NO.
+
+GENERATE_DOCBOOK       = NO
+
+# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
+# front of it.
+# The default directory is: docbook.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_OUTPUT         = docbook
+
+# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the
+# program listings (including syntax highlighting and cross-referencing
+# information) to the DOCBOOK output. Note that enabling this will significantly
+# increase the size of the DOCBOOK output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_PROGRAMLISTING = NO
+
+#---------------------------------------------------------------------------
+# Configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
+# AutoGen Definitions (see http://autogen.sf.net) file that captures the
+# structure of the code including all documentation. Note that this feature is
+# still experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module
+# file that captures the structure of the code including all documentation.
+#
+# Note that this feature is still experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary
+# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
+# output from the Perl module output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely
+# formatted so it can be parsed by a human reader. This is useful if you want to
+# understand what is going on. On the other hand, if this tag is set to NO, the
+# size of the Perl module output will be much smaller and Perl will parse it
+# just the same.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file are
+# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
+# so different doxyrules.make files included by the same Makefile don't
+# overwrite each other's variables.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_MAKEVAR_PREFIX = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all
+# C-preprocessor directives found in the sources and include files.
+# The default value is: YES.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names
+# in the source code. If set to NO, only conditional compilation will be
+# performed. Macro expansion can be done in a controlled way by setting
+# EXPAND_ONLY_PREDEF to YES.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
+# the macro expansion is limited to the macros specified with the PREDEFINED and
+# EXPAND_AS_DEFINED tags.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES, the include files in the
+# INCLUDE_PATH will be searched if a #include is found.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by the
+# preprocessor.
+# This tag requires that the tag SEARCH_INCLUDES is set to YES.
+
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will be
+# used.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that are
+# defined before the preprocessor is started (similar to the -D option of e.g.
+# gcc). The argument of the tag is a list of macros of the form: name or
+# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
+# is assumed. To prevent a macro definition from being undefined via #undef or
+# recursively expanded use the := operator instead of the = operator.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+PREDEFINED             = BUILD_IN_DOXYGEN @NATS_DOC_INCLUDE_STREAMING@
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
+# tag can be used to specify a list of macro names that should be expanded. The
+# macro definition that is found in the sources will be used. Use the PREDEFINED
+# tag if you want to use a different macro definition that overrules the
+# definition found in the source code.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
+# remove all references to function-like macros that are alone on a line, have
+# an all uppercase name, and do not end with a semicolon. Such function macros
+# are typically used for boiler-plate code, and will confuse the parser if not
+# removed.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES tag can be used to specify one or more tag files. For each tag
+# file the location of the external documentation should be added. The format of
+# a tag file without this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where loc1 and loc2 can be relative or absolute paths or URLs. See the
+# section "Linking to external documentation" for more information about the use
+# of tag files.
+# Note: Each tag file must have a unique name (where the name does NOT include
+# the path). If a tag file is not located in the directory in which doxygen is
+# run, you must also specify the path to the tagfile here.
+
+TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
+# tag file that is based on the input files it reads. See section "Linking to
+# external documentation" for more information about the usage of tag files.
+
+GENERATE_TAGFILE       = 
+
+# If the ALLEXTERNALS tag is set to YES, all external class will be listed in
+# the class index. If set to NO, only the inherited external classes will be
+# listed.
+# The default value is: NO.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will be
+# listed.
+# The default value is: YES.
+
+EXTERNAL_GROUPS        = YES
+
+# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in
+# the related pages index. If set to NO, only the current project's pages will
+# be listed.
+# The default value is: YES.
+
+EXTERNAL_PAGES         = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of 'which perl').
+# The default file (with absolute path) is: /usr/bin/perl.
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram
+# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
+# NO turns the diagrams off. Note that this option also works with HAVE_DOT
+# disabled, but it is recommended to install and use dot, since it yields more
+# powerful graphs.
+# The default value is: YES.
+
+CLASS_DIAGRAMS         = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see:
+# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH            = 
+
+# You can include diagrams made with dia in doxygen documentation. Doxygen will
+# then run dia to produce the diagram and insert it in the documentation. The
+# DIA_PATH tag allows you to specify the directory where the dia binary resides.
+# If left empty dia is assumed to be found in the default search path.
+
+DIA_PATH               = 
+
+# If set to YES the inheritance and collaboration graphs will hide inheritance
+# and usage relations if the target is undocumented or is not a class.
+# The default value is: YES.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz (see:
+# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
+# Bell Labs. The other options in this section have no effect if this option is
+# set to NO
+# The default value is: NO.
+
+HAVE_DOT               = NO
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
+# to run in parallel. When set to 0 doxygen will base this on the number of
+# processors available in the system. You can set it explicitly to a value
+# larger than 0 to get control over the balance between CPU load and processing
+# speed.
+# Minimum value: 0, maximum value: 32, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_NUM_THREADS        = 0
+
+# When you want a differently looking font in the dot files that doxygen
+# generates you can specify the font name using DOT_FONTNAME. You need to make
+# sure dot is able to find the font, which can be done by putting it in a
+# standard location or by setting the DOTFONTPATH environment variable or by
+# setting DOT_FONTPATH to the directory containing the font.
+# The default value is: Helvetica.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTNAME           = Helvetica
+
+# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
+# dot graphs.
+# Minimum value: 4, maximum value: 24, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTSIZE           = 10
+
+# By default doxygen will tell dot to use the default font as specified with
+# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
+# the path where dot can find it using this tag.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTPATH           = 
+
+# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
+# each documented class showing the direct and indirect inheritance relations.
+# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
+# graph for each documented class showing the direct and indirect implementation
+# dependencies (inheritance, containment, and class references variables) of the
+# class with other documented classes.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
+# groups, showing the direct groups dependencies.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LOOK               = NO
+
+# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
+# class node. If there are many fields or methods and many nodes the graph may
+# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
+# number of items for each type to make the size more manageable. Set this to 0
+# for no limit. Note that the threshold may be exceeded by 50% before the limit
+# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
+# but if the number exceeds 15, the total amount of fields shown is limited to
+# 10.
+# Minimum value: 0, maximum value: 100, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LIMIT_NUM_FIELDS   = 10
+
+# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
+# collaboration graphs will show the relations between templates and their
+# instances.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+TEMPLATE_RELATIONS     = NO
+
+# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
+# YES then doxygen will generate a graph for each documented file showing the
+# direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDE_GRAPH          = YES
+
+# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
+# set to YES then doxygen will generate a graph for each documented file showing
+# the direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
+# functions only using the \callgraph command. Disabling a call graph can be
+# accomplished by means of the command \hidecallgraph.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALL_GRAPH             = NO
+
+# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable caller graphs for selected
+# functions only using the \callergraph command. Disabling a caller graph can be
+# accomplished by means of the command \hidecallergraph.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALLER_GRAPH           = NO
+
+# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
+# hierarchy of all classes instead of a textual one.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
+# dependencies a directory has on other directories in a graphical way. The
+# dependency relations are determined by the #include relations between the
+# files in the directories.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. For an explanation of the image formats see the section
+# output formats in the documentation of the dot tool (Graphviz (see:
+# http://www.graphviz.org/)).
+# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
+# to make the SVG files visible in IE 9+ (other browsers do not have this
+# requirement).
+# Possible values are: png, jpg, gif, svg, png:gd, png:gd:gd, png:cairo,
+# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and
+# png:gdiplus:gdiplus.
+# The default value is: png.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_IMAGE_FORMAT       = png
+
+# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
+# enable generation of interactive SVG images that allow zooming and panning.
+#
+# Note that this requires a modern browser other than Internet Explorer. Tested
+# and working are Firefox, Chrome, Safari, and Opera.
+# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
+# the SVG files visible. Older versions of IE do not have SVG support.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INTERACTIVE_SVG        = NO
+
+# The DOT_PATH tag can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_PATH               = 
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the \dotfile
+# command).
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOTFILE_DIRS           = 
+
+# The MSCFILE_DIRS tag can be used to specify one or more directories that
+# contain msc files that are included in the documentation (see the \mscfile
+# command).
+
+MSCFILE_DIRS           = 
+
+# The DIAFILE_DIRS tag can be used to specify one or more directories that
+# contain dia files that are included in the documentation (see the \diafile
+# command).
+
+DIAFILE_DIRS           = 
+
+# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the
+# path where java can find the plantuml.jar file. If left blank, it is assumed
+# PlantUML is not used or called during a preprocessing step. Doxygen will
+# generate a warning when it encounters a \startuml command in this case and
+# will not generate output for the diagram.
+
+PLANTUML_JAR_PATH      = 
+
+# When using plantuml, the specified paths are searched for files specified by
+# the !include statement in a plantuml block.
+
+PLANTUML_INCLUDE_PATH  = 
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
+# that will be shown in the graph. If the number of nodes in a graph becomes
+# larger than this value, doxygen will truncate the graph, which is visualized
+# by representing a node as a red box. Note that doxygen if the number of direct
+# children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
+# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+# Minimum value: 0, maximum value: 10000, default value: 50.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
+# generated by dot. A depth value of 3 means that only nodes reachable from the
+# root by following a path via at most 3 edges will be shown. Nodes that lay
+# further from the root node will be omitted. Note that setting this option to 1
+# or 2 may greatly reduce the computation time needed for large code bases. Also
+# note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+# Minimum value: 0, maximum value: 1000, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+MAX_DOT_GRAPH_DEPTH    = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not seem
+# to support this out of the box.
+#
+# Warning: Depending on the platform used, enabling this option may lead to
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
+# read).
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10) support
+# this, this feature is disabled by default.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_MULTI_TARGETS      = NO
+
+# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
+# explaining the meaning of the various boxes and arrows in the dot generated
+# graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot
+# files that are used to generate the various graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_CLEANUP            = YES
diff --git a/doc/customdoxygen.css b/doc/customdoxygen.css
new file mode 100755 (executable)
index 0000000..a3290a0
--- /dev/null
@@ -0,0 +1,1454 @@
+/* The standard CSS for doxygen 1.8.10 */\r
+\r
+body, table, div, p, dl {\r
+       font: 400 14px/22px Roboto,sans-serif;\r
+}\r
+\r
+/* @group Heading Levels */\r
+\r
+h1.groupheader {\r
+       font-size: 150%;\r
+}\r
+\r
+.title {\r
+       font: 400 14px/28px Roboto,sans-serif;\r
+       font-size: 150%;\r
+       font-weight: bold;\r
+       margin: 10px 2px;\r
+}\r
+\r
+h2.groupheader {\r
+       border-bottom: 1px solid #879ECB;\r
+       color: #354C7B;\r
+       font-size: 150%;\r
+       font-weight: normal;\r
+       margin-top: 1.75em;\r
+       padding-top: 8px;\r
+       padding-bottom: 4px;\r
+       width: 100%;\r
+}\r
+\r
+h3.groupheader {\r
+       font-size: 100%;\r
+}\r
+\r
+h1, h2, h3, h4, h5, h6 {\r
+       -webkit-transition: text-shadow 0.5s linear;\r
+       -moz-transition: text-shadow 0.5s linear;\r
+       -ms-transition: text-shadow 0.5s linear;\r
+       -o-transition: text-shadow 0.5s linear;\r
+       transition: text-shadow 0.5s linear;\r
+       margin-right: 15px;\r
+}\r
+\r
+h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow {\r
+       text-shadow: 0 0 15px cyan;\r
+}\r
+\r
+dt {\r
+       font-weight: bold;\r
+}\r
+\r
+div.multicol {\r
+       -moz-column-gap: 1em;\r
+       -webkit-column-gap: 1em;\r
+       -moz-column-count: 3;\r
+       -webkit-column-count: 3;\r
+}\r
+\r
+p.startli, p.startdd {\r
+       margin-top: 2px;\r
+}\r
+\r
+p.starttd {\r
+       margin-top: 0px;\r
+}\r
+\r
+p.endli {\r
+       margin-bottom: 0px;\r
+}\r
+\r
+p.enddd {\r
+       margin-bottom: 4px;\r
+}\r
+\r
+p.endtd {\r
+       margin-bottom: 2px;\r
+}\r
+\r
+/* @end */\r
+\r
+caption {\r
+       font-weight: bold;\r
+}\r
+\r
+span.legend {\r
+        font-size: 70%;\r
+        text-align: center;\r
+}\r
+\r
+h3.version {\r
+        font-size: 90%;\r
+        text-align: center;\r
+}\r
+\r
+div.qindex, div.navtab{\r
+       background-color: #EBEFF6;\r
+       border: 1px solid #A3B4D7;\r
+       text-align: center;\r
+}\r
+\r
+div.qindex, div.navpath {\r
+       width: 100%;\r
+       line-height: 140%;\r
+}\r
+\r
+div.navtab {\r
+       margin-right: 15px;\r
+}\r
+\r
+/* @group Link Styling */\r
+\r
+a {\r
+       color: #3D578C;\r
+       font-weight: normal;\r
+       text-decoration: none;\r
+}\r
+\r
+.contents a:visited {\r
+       color: #4665A2;\r
+}\r
+\r
+a:hover {\r
+       text-decoration: underline;\r
+}\r
+\r
+a.qindex {\r
+       font-weight: bold;\r
+}\r
+\r
+a.qindexHL {\r
+       font-weight: bold;\r
+       background-color: #9CAFD4;\r
+       color: #ffffff;\r
+       border: 1px double #869DCA;\r
+}\r
+\r
+.contents a.qindexHL:visited {\r
+        color: #ffffff;\r
+}\r
+\r
+a.el {\r
+       font-weight: bold;\r
+}\r
+\r
+a.elRef {\r
+}\r
+\r
+a.code, a.code:visited, a.line, a.line:visited {\r
+       color: #4665A2; \r
+}\r
+\r
+a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited {\r
+       color: #4665A2; \r
+}\r
+\r
+/* @end */\r
+\r
+dl.el {\r
+       margin-left: -1cm;\r
+}\r
+\r
+pre.fragment {\r
+        border: 1px solid #C4CFE5;\r
+        background-color: #FBFCFD;\r
+        padding: 4px 6px;\r
+        margin: 4px 8px 4px 2px;\r
+        overflow: auto;\r
+        word-wrap: break-word;\r
+        font-size:  9pt;\r
+        line-height: 125%;\r
+        font-family: monospace, fixed;\r
+        font-size: 105%;\r
+}\r
+\r
+div.fragment {\r
+        padding: 4px 6px;\r
+        margin: 4px 8px 4px 2px;\r
+       background-color: #FBFCFD;\r
+       border: 1px solid #C4CFE5;\r
+}\r
+\r
+div.line {\r
+       font-family: monospace, fixed;\r
+        font-size: 13px;\r
+       min-height: 13px;\r
+       line-height: 1.0;\r
+       text-wrap: unrestricted;\r
+       white-space: -moz-pre-wrap; /* Moz */\r
+       white-space: -pre-wrap;     /* Opera 4-6 */\r
+       white-space: -o-pre-wrap;   /* Opera 7 */\r
+       white-space: pre-wrap;      /* CSS3  */\r
+       word-wrap: break-word;      /* IE 5.5+ */\r
+       text-indent: -53px;\r
+       padding-left: 53px;\r
+       padding-bottom: 0px;\r
+       margin: 0px;\r
+       -webkit-transition-property: background-color, box-shadow;\r
+       -webkit-transition-duration: 0.5s;\r
+       -moz-transition-property: background-color, box-shadow;\r
+       -moz-transition-duration: 0.5s;\r
+       -ms-transition-property: background-color, box-shadow;\r
+       -ms-transition-duration: 0.5s;\r
+       -o-transition-property: background-color, box-shadow;\r
+       -o-transition-duration: 0.5s;\r
+       transition-property: background-color, box-shadow;\r
+       transition-duration: 0.5s;\r
+}\r
+\r
+div.line.glow {\r
+       background-color: cyan;\r
+       box-shadow: 0 0 10px cyan;\r
+}\r
+\r
+\r
+span.lineno {\r
+       padding-right: 4px;\r
+       text-align: right;\r
+       border-right: 2px solid #0F0;\r
+       background-color: #E8E8E8;\r
+        white-space: pre;\r
+}\r
+span.lineno a {\r
+       background-color: #D8D8D8;\r
+}\r
+\r
+span.lineno a:hover {\r
+       background-color: #C8C8C8;\r
+}\r
+\r
+div.ah, span.ah {\r
+       background-color: black;\r
+       font-weight: bold;\r
+       color: #ffffff;\r
+       margin-bottom: 3px;\r
+       margin-top: 3px;\r
+       padding: 0.2em;\r
+       border: solid thin #333;\r
+       border-radius: 0.5em;\r
+       -webkit-border-radius: .5em;\r
+       -moz-border-radius: .5em;\r
+       box-shadow: 2px 2px 3px #999;\r
+       -webkit-box-shadow: 2px 2px 3px #999;\r
+       -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;\r
+       background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444));\r
+       background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000);\r
+}\r
+\r
+div.classindex ul {\r
+        list-style: none;\r
+        padding-left: 0;\r
+}\r
+\r
+div.classindex span.ai {\r
+        display: inline-block;\r
+}\r
+\r
+div.groupHeader {\r
+       margin-left: 16px;\r
+       margin-top: 12px;\r
+       font-weight: bold;\r
+}\r
+\r
+div.groupText {\r
+       margin-left: 16px;\r
+       font-style: italic;\r
+}\r
+\r
+body {\r
+       background-color: white;\r
+       color: black;\r
+        margin: 0;\r
+}\r
+\r
+div.contents {\r
+       margin-top: 10px;\r
+       margin-left: 12px;\r
+       margin-right: 8px;\r
+}\r
+\r
+td.indexkey {\r
+       background-color: #EBEFF6;\r
+       font-weight: bold;\r
+       border: 1px solid #C4CFE5;\r
+       margin: 2px 0px 2px 0;\r
+       padding: 2px 10px;\r
+        white-space: nowrap;\r
+        vertical-align: top;\r
+}\r
+\r
+td.indexvalue {\r
+       background-color: #EBEFF6;\r
+       border: 1px solid #C4CFE5;\r
+       padding: 2px 10px;\r
+       margin: 2px 0px;\r
+}\r
+\r
+tr.memlist {\r
+       background-color: #EEF1F7;\r
+}\r
+\r
+p.formulaDsp {\r
+       text-align: center;\r
+}\r
+\r
+img.formulaDsp {\r
+       \r
+}\r
+\r
+img.formulaInl {\r
+       vertical-align: middle;\r
+}\r
+\r
+div.center {\r
+       text-align: center;\r
+        margin-top: 0px;\r
+        margin-bottom: 0px;\r
+        padding: 0px;\r
+}\r
+\r
+div.center img {\r
+       border: 0px;\r
+}\r
+\r
+address.footer {\r
+       text-align: right;\r
+       padding-right: 12px;\r
+}\r
+\r
+img.footer {\r
+       border: 0px;\r
+       vertical-align: middle;\r
+}\r
+\r
+/* @group Code Colorization */\r
+\r
+span.keyword {\r
+       color: #008000\r
+}\r
+\r
+span.keywordtype {\r
+       color: #604020\r
+}\r
+\r
+span.keywordflow {\r
+       color: #e08000\r
+}\r
+\r
+span.comment {\r
+       color: #800000\r
+}\r
+\r
+span.preprocessor {\r
+       color: #806020\r
+}\r
+\r
+span.stringliteral {\r
+       color: #002080\r
+}\r
+\r
+span.charliteral {\r
+       color: #008080\r
+}\r
+\r
+span.vhdldigit { \r
+       color: #ff00ff \r
+}\r
+\r
+span.vhdlchar { \r
+       color: #000000 \r
+}\r
+\r
+span.vhdlkeyword { \r
+       color: #700070 \r
+}\r
+\r
+span.vhdllogic { \r
+       color: #ff0000 \r
+}\r
+\r
+blockquote {\r
+        background-color: #F7F8FB;\r
+        border-left: 2px solid #9CAFD4;\r
+        margin: 0 24px 0 4px;\r
+        padding: 0 12px 0 16px;\r
+}\r
+\r
+/* @end */\r
+\r
+/*\r
+.search {\r
+       color: #003399;\r
+       font-weight: bold;\r
+}\r
+\r
+form.search {\r
+       margin-bottom: 0px;\r
+       margin-top: 0px;\r
+}\r
+\r
+input.search {\r
+       font-size: 75%;\r
+       color: #000080;\r
+       font-weight: normal;\r
+       background-color: #e8eef2;\r
+}\r
+*/\r
+\r
+td.tiny {\r
+       font-size: 75%;\r
+}\r
+\r
+.dirtab {\r
+       padding: 4px;\r
+       border-collapse: collapse;\r
+       border: 1px solid #A3B4D7;\r
+}\r
+\r
+th.dirtab {\r
+       background: #EBEFF6;\r
+       font-weight: bold;\r
+}\r
+\r
+hr {\r
+       height: 0px;\r
+       border: none;\r
+       border-top: 1px solid #4A6AAA;\r
+}\r
+\r
+hr.footer {\r
+       height: 1px;\r
+}\r
+\r
+/* @group Member Descriptions */\r
+\r
+table.memberdecls {\r
+       border-spacing: 0px;\r
+       padding: 0px;\r
+}\r
+\r
+.memberdecls td, .fieldtable tr {\r
+       -webkit-transition-property: background-color, box-shadow;\r
+       -webkit-transition-duration: 0.5s;\r
+       -moz-transition-property: background-color, box-shadow;\r
+       -moz-transition-duration: 0.5s;\r
+       -ms-transition-property: background-color, box-shadow;\r
+       -ms-transition-duration: 0.5s;\r
+       -o-transition-property: background-color, box-shadow;\r
+       -o-transition-duration: 0.5s;\r
+       transition-property: background-color, box-shadow;\r
+       transition-duration: 0.5s;\r
+}\r
+\r
+.memberdecls td.glow, .fieldtable tr.glow {\r
+       background-color: cyan;\r
+       box-shadow: 0 0 15px cyan;\r
+}\r
+\r
+.mdescLeft, .mdescRight,\r
+.memItemLeft, .memItemRight,\r
+.memTemplItemLeft, .memTemplItemRight, .memTemplParams {\r
+       background-color: #F9FAFC;\r
+       border: none;\r
+       margin: 4px;\r
+       padding: 1px 0 0 8px;\r
+}\r
+\r
+.mdescLeft, .mdescRight {\r
+       padding: 0px 8px 4px 8px;\r
+       color: #555;\r
+}\r
+\r
+.memSeparator {\r
+        border-bottom: 1px solid #DEE4F0;\r
+        line-height: 1px;\r
+        margin: 0px;\r
+        padding: 0px;\r
+}\r
+\r
+.memItemLeft, .memTemplItemLeft {\r
+        white-space: nowrap;\r
+}\r
+\r
+.memItemRight {\r
+       width: 100%;\r
+}\r
+\r
+.memTemplParams {\r
+       color: #4665A2;\r
+        white-space: nowrap;\r
+       font-size: 80%;\r
+}\r
+\r
+/* @end */\r
+\r
+/* @group Member Details */\r
+\r
+/* Styles for detailed member documentation */\r
+\r
+.memtemplate {\r
+       font-size: 80%;\r
+       color: #4665A2;\r
+       font-weight: normal;\r
+       margin-left: 9px;\r
+}\r
+\r
+.memnav {\r
+       background-color: #EBEFF6;\r
+       border: 1px solid #A3B4D7;\r
+       text-align: center;\r
+       margin: 2px;\r
+       margin-right: 15px;\r
+       padding: 2px;\r
+}\r
+\r
+.mempage {\r
+       width: 100%;\r
+}\r
+\r
+.memitem {\r
+       padding: 0;\r
+       margin-bottom: 10px;\r
+       margin-right: 5px;\r
+        -webkit-transition: box-shadow 0.5s linear;\r
+        -moz-transition: box-shadow 0.5s linear;\r
+        -ms-transition: box-shadow 0.5s linear;\r
+        -o-transition: box-shadow 0.5s linear;\r
+        transition: box-shadow 0.5s linear;\r
+        display: table !important;\r
+        width: 100%;\r
+}\r
+\r
+.memitem.glow {\r
+         box-shadow: 0 0 15px cyan;\r
+}\r
+\r
+.memname {\r
+        font-weight: bold;\r
+        margin-left: 6px;\r
+}\r
+\r
+.memname td {\r
+       vertical-align: bottom;\r
+}\r
+\r
+.memproto, dl.reflist dt {\r
+        border-top: 1px solid #A8B8D9;\r
+        border-left: 1px solid #A8B8D9;\r
+        border-right: 1px solid #A8B8D9;\r
+        padding: 6px 0px 6px 0px;\r
+        color: #253555;\r
+        font-weight: bold;\r
+        text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);\r
+        background-image:url('nav_f.png');\r
+        background-repeat:repeat-x;\r
+        background-color: #E2E8F2;\r
+        /* opera specific markup */\r
+        box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);\r
+        border-top-right-radius: 4px;\r
+        border-top-left-radius: 4px;\r
+        /* firefox specific markup */\r
+        -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;\r
+        -moz-border-radius-topright: 4px;\r
+        -moz-border-radius-topleft: 4px;\r
+        /* webkit specific markup */\r
+        -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);\r
+        -webkit-border-top-right-radius: 4px;\r
+        -webkit-border-top-left-radius: 4px;\r
+\r
+}\r
+\r
+.memdoc, dl.reflist dd {\r
+        border-bottom: 1px solid #A8B8D9;      \r
+        border-left: 1px solid #A8B8D9;      \r
+        border-right: 1px solid #A8B8D9; \r
+        padding: 6px 10px 2px 10px;\r
+        background-color: #FBFCFD;\r
+        border-top-width: 0;\r
+        background-image:url('nav_g.png');\r
+        background-repeat:repeat-x;\r
+        background-color: #FFFFFF;\r
+        /* opera specific markup */\r
+        border-bottom-left-radius: 4px;\r
+        border-bottom-right-radius: 4px;\r
+        box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);\r
+        /* firefox specific markup */\r
+        -moz-border-radius-bottomleft: 4px;\r
+        -moz-border-radius-bottomright: 4px;\r
+        -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;\r
+        /* webkit specific markup */\r
+        -webkit-border-bottom-left-radius: 4px;\r
+        -webkit-border-bottom-right-radius: 4px;\r
+        -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);\r
+}\r
+\r
+dl.reflist dt {\r
+        padding: 5px;\r
+}\r
+\r
+dl.reflist dd {\r
+        margin: 0px 0px 10px 0px;\r
+        padding: 5px;\r
+}\r
+\r
+.paramkey {\r
+       text-align: right;\r
+}\r
+\r
+.paramtype {\r
+       white-space: nowrap;\r
+}\r
+\r
+.paramname {\r
+       color: #602020;\r
+       white-space: nowrap;\r
+}\r
+.paramname em {\r
+       font-style: normal;\r
+}\r
+.paramname code {\r
+        line-height: 14px;\r
+}\r
+\r
+.params, .retval, .exception, .tparams {\r
+        margin-left: 0px;\r
+        padding-left: 0px;\r
+}       \r
+\r
+.params .paramname, .retval .paramname {\r
+        font-weight: bold;\r
+        vertical-align: top;\r
+}\r
+        \r
+.params .paramtype {\r
+        font-style: italic;\r
+        vertical-align: top;\r
+}       \r
+        \r
+.params .paramdir {\r
+        font-family: "courier new",courier,monospace;\r
+        vertical-align: top;\r
+}\r
+\r
+table.mlabels {\r
+       border-spacing: 0px;\r
+}\r
+\r
+td.mlabels-left {\r
+       width: 100%;\r
+       padding: 0px;\r
+}\r
+\r
+td.mlabels-right {\r
+       vertical-align: bottom;\r
+       padding: 0px;\r
+       white-space: nowrap;\r
+}\r
+\r
+span.mlabels {\r
+        margin-left: 8px;\r
+}\r
+\r
+span.mlabel {\r
+        background-color: #728DC1;\r
+        border-top:1px solid #5373B4;\r
+        border-left:1px solid #5373B4;\r
+        border-right:1px solid #C4CFE5;\r
+        border-bottom:1px solid #C4CFE5;\r
+       text-shadow: none;\r
+       color: white;\r
+       margin-right: 4px;\r
+       padding: 2px 3px;\r
+       border-radius: 3px;\r
+       font-size: 7pt;\r
+       white-space: nowrap;\r
+       vertical-align: middle;\r
+}\r
+\r
+\r
+\r
+/* @end */\r
+\r
+/* these are for tree view inside a (index) page */\r
+\r
+div.directory {\r
+        margin: 10px 0px;\r
+        border-top: 1px solid #9CAFD4;\r
+        border-bottom: 1px solid #9CAFD4;\r
+        width: 100%;\r
+}\r
+\r
+.directory table {\r
+        border-collapse:collapse;\r
+}\r
+\r
+.directory td {\r
+        margin: 0px;\r
+        padding: 0px;\r
+       vertical-align: top;\r
+}\r
+\r
+.directory td.entry {\r
+        white-space: nowrap;\r
+        padding-right: 6px;\r
+       padding-top: 3px;\r
+}\r
+\r
+.directory td.entry a {\r
+        outline:none;\r
+}\r
+\r
+.directory td.entry a img {\r
+        border: none;\r
+}\r
+\r
+.directory td.desc {\r
+        width: 100%;\r
+        padding-left: 6px;\r
+       padding-right: 6px;\r
+       padding-top: 3px;\r
+       border-left: 1px solid rgba(0,0,0,0.05);\r
+}\r
+\r
+.directory tr.even {\r
+       padding-left: 6px;\r
+       background-color: #F7F8FB;\r
+}\r
+\r
+.directory img {\r
+       vertical-align: -30%;\r
+}\r
+\r
+.directory .levels {\r
+        white-space: nowrap;\r
+        width: 100%;\r
+        text-align: right;\r
+        font-size: 9pt;\r
+}\r
+\r
+.directory .levels span {\r
+        cursor: pointer;\r
+        padding-left: 2px;\r
+        padding-right: 2px;\r
+       color: #3D578C;\r
+}\r
+\r
+.arrow {\r
+    color: #9CAFD4;\r
+    -webkit-user-select: none;\r
+    -khtml-user-select: none;\r
+    -moz-user-select: none;\r
+    -ms-user-select: none;\r
+    user-select: none;\r
+    cursor: pointer;\r
+    font-size: 80%;\r
+    display: inline-block;\r
+    width: 16px;\r
+    height: 22px;\r
+}\r
+\r
+.icon {\r
+    font-family: Arial, Helvetica;\r
+    font-weight: bold;\r
+    font-size: 12px;\r
+    height: 14px;\r
+    width: 16px;\r
+    display: inline-block;\r
+    background-color: #728DC1;\r
+    color: white;\r
+    text-align: center;\r
+    border-radius: 4px;\r
+    margin-left: 2px;\r
+    margin-right: 2px;\r
+}\r
+\r
+.icona {\r
+    width: 24px;\r
+    height: 22px;\r
+    display: inline-block;\r
+}\r
+\r
+.iconfopen {\r
+    width: 24px;\r
+    height: 18px;\r
+    margin-bottom: 4px;\r
+    background-image:url('folderopen.png');\r
+    background-position: 0px -4px;\r
+    background-repeat: repeat-y;\r
+    vertical-align:top;\r
+    display: inline-block;\r
+}\r
+\r
+.iconfclosed {\r
+    width: 24px;\r
+    height: 18px;\r
+    margin-bottom: 4px;\r
+    background-image:url('folderclosed.png');\r
+    background-position: 0px -4px;\r
+    background-repeat: repeat-y;\r
+    vertical-align:top;\r
+    display: inline-block;\r
+}\r
+\r
+.icondoc {\r
+    width: 24px;\r
+    height: 18px;\r
+    margin-bottom: 4px;\r
+    background-image:url('doc.png');\r
+    background-position: 0px -4px;\r
+    background-repeat: repeat-y;\r
+    vertical-align:top;\r
+    display: inline-block;\r
+}\r
+\r
+table.directory {\r
+    font: 400 14px Roboto,sans-serif;\r
+}\r
+\r
+/* @end */\r
+\r
+div.dynheader {\r
+        margin-top: 8px;\r
+       -webkit-touch-callout: none;\r
+       -webkit-user-select: none;\r
+       -khtml-user-select: none;\r
+       -moz-user-select: none;\r
+       -ms-user-select: none;\r
+       user-select: none;\r
+}\r
+\r
+address {\r
+       font-style: normal;\r
+       color: #2A3D61;\r
+}\r
+\r
+table.doxtable {\r
+       border-collapse:collapse;\r
+        margin-top: 4px;\r
+        margin-bottom: 4px;\r
+}\r
+\r
+table.doxtable td, table.doxtable th {\r
+       border: 1px solid #2D4068;\r
+       padding: 3px 7px 2px;\r
+}\r
+\r
+table.doxtable th {\r
+       background-color: #374F7F;\r
+       color: #FFFFFF;\r
+       font-size: 110%;\r
+       padding-bottom: 4px;\r
+       padding-top: 5px;\r
+}\r
+\r
+table.fieldtable {\r
+        /*width: 100%;*/\r
+        margin-bottom: 10px;\r
+        border: 1px solid #A8B8D9;\r
+        border-spacing: 0px;\r
+        -moz-border-radius: 4px;\r
+        -webkit-border-radius: 4px;\r
+        border-radius: 4px;\r
+        -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;\r
+        -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);\r
+        box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);\r
+}\r
+\r
+.fieldtable td, .fieldtable th {\r
+        padding: 3px 7px 2px;\r
+}\r
+\r
+.fieldtable td.fieldtype, .fieldtable td.fieldname {\r
+        white-space: nowrap;\r
+        border-right: 1px solid #A8B8D9;\r
+        border-bottom: 1px solid #A8B8D9;\r
+        vertical-align: top;\r
+}\r
+\r
+.fieldtable td.fieldname {\r
+        padding-top: 3px;\r
+}\r
+\r
+.fieldtable td.fielddoc {\r
+        border-bottom: 1px solid #A8B8D9;\r
+        /*width: 100%;*/\r
+}\r
+\r
+.fieldtable td.fielddoc p:first-child {\r
+        margin-top: 0px;\r
+}       \r
+        \r
+.fieldtable td.fielddoc p:last-child {\r
+        margin-bottom: 2px;\r
+}\r
+\r
+.fieldtable tr:last-child td {\r
+        border-bottom: none;\r
+}\r
+\r
+.fieldtable th {\r
+        background-image:url('nav_f.png');\r
+        background-repeat:repeat-x;\r
+        background-color: #E2E8F2;\r
+        font-size: 90%;\r
+        color: #253555;\r
+        padding-bottom: 4px;\r
+        padding-top: 5px;\r
+        text-align:left;\r
+        -moz-border-radius-topleft: 4px;\r
+        -moz-border-radius-topright: 4px;\r
+        -webkit-border-top-left-radius: 4px;\r
+        -webkit-border-top-right-radius: 4px;\r
+        border-top-left-radius: 4px;\r
+        border-top-right-radius: 4px;\r
+        border-bottom: 1px solid #A8B8D9;\r
+}\r
+\r
+\r
+.tabsearch {\r
+       top: 0px;\r
+       left: 10px;\r
+       height: 36px;\r
+       background-image: url('tab_b.png');\r
+       z-index: 101;\r
+       overflow: hidden;\r
+       font-size: 13px;\r
+}\r
+\r
+.navpath ul\r
+{\r
+       font-size: 11px;\r
+       background-image:url('tab_b.png');\r
+       background-repeat:repeat-x;\r
+       background-position: 0 -5px;\r
+       height:30px;\r
+       line-height:30px;\r
+       color:#8AA0CC;\r
+       border:solid 1px #C2CDE4;\r
+       overflow:hidden;\r
+       margin:0px;\r
+       padding:0px;\r
+}\r
+\r
+.navpath li\r
+{\r
+       list-style-type:none;\r
+       float:left;\r
+       padding-left:10px;\r
+       padding-right:15px;\r
+       background-image:url('bc_s.png');\r
+       background-repeat:no-repeat;\r
+       background-position:right;\r
+       color:#364D7C;\r
+}\r
+\r
+.navpath li.navelem a\r
+{\r
+       height:32px;\r
+       display:block;\r
+       text-decoration: none;\r
+       outline: none;\r
+       color: #283A5D;\r
+       font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;\r
+       text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);\r
+       text-decoration: none;        \r
+}\r
+\r
+.navpath li.navelem a:hover\r
+{\r
+       color:#6884BD;\r
+}\r
+\r
+.navpath li.footer\r
+{\r
+        list-style-type:none;\r
+        float:right;\r
+        padding-left:10px;\r
+        padding-right:15px;\r
+        background-image:none;\r
+        background-repeat:no-repeat;\r
+        background-position:right;\r
+        color:#364D7C;\r
+        font-size: 8pt;\r
+}\r
+\r
+\r
+div.summary\r
+{\r
+       float: right;\r
+       font-size: 8pt;\r
+       padding-right: 5px;\r
+       width: 50%;\r
+       text-align: right;\r
+}       \r
+\r
+div.summary a\r
+{\r
+       white-space: nowrap;\r
+}\r
+\r
+div.ingroups\r
+{\r
+       font-size: 8pt;\r
+       width: 50%;\r
+       text-align: left;\r
+}\r
+\r
+div.ingroups a\r
+{\r
+       white-space: nowrap;\r
+}\r
+\r
+div.header\r
+{\r
+        background-image:url('nav_h.png');\r
+        background-repeat:repeat-x;\r
+       background-color: #F9FAFC;\r
+       margin:  0px;\r
+       border-bottom: 1px solid #C4CFE5;\r
+}\r
+\r
+div.headertitle\r
+{\r
+       padding: 5px 5px 5px 10px;\r
+}\r
+\r
+dl\r
+{\r
+        padding: 0 0 0 10px;\r
+}\r
+\r
+/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */\r
+dl.section\r
+{\r
+       margin-left: 0px;\r
+       padding-left: 0px;\r
+}\r
+\r
+dl.note\r
+{\r
+        margin-left:-7px;\r
+        padding-left: 3px;\r
+        border-left:4px solid;\r
+        border-color: #D0C000;\r
+}\r
+\r
+dl.warning, dl.attention\r
+{\r
+        margin-left:-7px;\r
+        padding-left: 3px;\r
+        border-left:4px solid;\r
+        border-color: #FF0000;\r
+}\r
+\r
+dl.pre, dl.post, dl.invariant\r
+{\r
+        margin-left:-7px;\r
+        padding-left: 3px;\r
+        border-left:4px solid;\r
+        border-color: #00D000;\r
+}\r
+\r
+dl.deprecated\r
+{\r
+        margin-left:-7px;\r
+        padding-left: 3px;\r
+        border-left:4px solid;\r
+        border-color: #505050;\r
+}\r
+\r
+dl.todo\r
+{\r
+        margin-left:-7px;\r
+        padding-left: 3px;\r
+        border-left:4px solid;\r
+        border-color: #00C0E0;\r
+}\r
+\r
+dl.test\r
+{\r
+        margin-left:-7px;\r
+        padding-left: 3px;\r
+        border-left:4px solid;\r
+        border-color: #3030E0;\r
+}\r
+\r
+dl.bug\r
+{\r
+        margin-left:-7px;\r
+        padding-left: 3px;\r
+        border-left:4px solid;\r
+        border-color: #C08050;\r
+}\r
+\r
+dl.section dd {\r
+       margin-bottom: 6px;\r
+}\r
+\r
+\r
+#projectlogo\r
+{\r
+       text-align: center;\r
+       vertical-align: bottom;\r
+       border-collapse: separate;\r
+}\r
\r
+#projectlogo img\r
+{ \r
+       border: 0px none;\r
+}\r
\r
+#projectalign\r
+{\r
+        vertical-align: middle;\r
+}\r
+\r
+#projectname\r
+{\r
+       font: 300% Tahoma, Arial,sans-serif;\r
+       margin: 0px;\r
+       padding: 2px 0px;\r
+}\r
+    \r
+#projectbrief\r
+{\r
+       font: 120% Tahoma, Arial,sans-serif;\r
+       margin: 0px;\r
+       padding: 0px;\r
+}\r
+\r
+#projectnumber\r
+{\r
+       font: 50% Tahoma, Arial,sans-serif;\r
+       margin: 0px;\r
+       padding: 0px;\r
+}\r
+\r
+#titlearea\r
+{\r
+       padding: 0px;\r
+       margin: 0px;\r
+       width: 100%;\r
+       border-bottom: 1px solid #5373B4;\r
+}\r
+\r
+.image\r
+{\r
+        text-align: center;\r
+}\r
+\r
+.dotgraph\r
+{\r
+        text-align: center;\r
+}\r
+\r
+.mscgraph\r
+{\r
+        text-align: center;\r
+}\r
+\r
+.diagraph\r
+{\r
+        text-align: center;\r
+}\r
+\r
+.caption\r
+{\r
+       font-weight: bold;\r
+}\r
+\r
+div.zoom\r
+{\r
+       border: 1px solid #90A5CE;\r
+}\r
+\r
+dl.citelist {\r
+        margin-bottom:50px;\r
+}\r
+\r
+dl.citelist dt {\r
+        color:#334975;\r
+        float:left;\r
+        font-weight:bold;\r
+        margin-right:10px;\r
+        padding:5px;\r
+}\r
+\r
+dl.citelist dd {\r
+        margin:2px 0;\r
+        padding:5px 0;\r
+}\r
+\r
+div.toc {\r
+        padding: 14px 25px;\r
+        background-color: #F4F6FA;\r
+        border: 1px solid #D8DFEE;\r
+        border-radius: 7px 7px 7px 7px;\r
+        float: right;\r
+        height: auto;\r
+        margin: 0 20px 10px 10px;\r
+        width: 200px;\r
+}\r
+\r
+div.toc li {\r
+        background: url("bdwn.png") no-repeat scroll 0 5px transparent;\r
+        font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif;\r
+        margin-top: 5px;\r
+        padding-left: 10px;\r
+        padding-top: 2px;\r
+}\r
+\r
+div.toc h3 {\r
+        font: bold 12px/1.2 Arial,FreeSans,sans-serif;\r
+       color: #4665A2;\r
+        border-bottom: 0 none;\r
+        margin: 0;\r
+}\r
+\r
+div.toc ul {\r
+        list-style: none outside none;\r
+        border: medium none;\r
+        padding: 0px;\r
+}       \r
+\r
+div.toc li.level1 {\r
+        margin-left: 0px;\r
+}\r
+\r
+div.toc li.level2 {\r
+        margin-left: 15px;\r
+}\r
+\r
+div.toc li.level3 {\r
+        margin-left: 30px;\r
+}\r
+\r
+div.toc li.level4 {\r
+        margin-left: 45px;\r
+}\r
+\r
+.inherit_header {\r
+        font-weight: bold;\r
+        color: gray;\r
+        cursor: pointer;\r
+       -webkit-touch-callout: none;\r
+       -webkit-user-select: none;\r
+       -khtml-user-select: none;\r
+       -moz-user-select: none;\r
+       -ms-user-select: none;\r
+       user-select: none;\r
+}\r
+\r
+.inherit_header td {\r
+        padding: 6px 0px 2px 5px;\r
+}\r
+\r
+.inherit {\r
+        display: none;\r
+}\r
+\r
+tr.heading h2 {\r
+        margin-top: 12px;\r
+        margin-bottom: 4px;\r
+}\r
+\r
+/* tooltip related style info */\r
+\r
+.ttc {\r
+        position: absolute;\r
+        display: none;\r
+}\r
+\r
+#powerTip {\r
+       cursor: default;\r
+       white-space: nowrap;\r
+       background-color: white;\r
+       border: 1px solid gray;\r
+       border-radius: 4px 4px 4px 4px;\r
+       box-shadow: 1px 1px 7px gray;\r
+       display: none;\r
+       font-size: smaller;\r
+       max-width: 80%;\r
+       opacity: 0.9;\r
+       padding: 1ex 1em 1em;\r
+       position: absolute;\r
+       z-index: 2147483647;\r
+}\r
+\r
+#powerTip div.ttdoc {\r
+        color: grey;\r
+       font-style: italic;\r
+}\r
+\r
+#powerTip div.ttname a {\r
+        font-weight: bold;\r
+}\r
+\r
+#powerTip div.ttname {\r
+        font-weight: bold;\r
+}\r
+\r
+#powerTip div.ttdeci {\r
+        color: #006318;\r
+}\r
+\r
+#powerTip div {\r
+        margin: 0px;\r
+        padding: 0px;\r
+        font: 12px/16px Roboto,sans-serif;\r
+}\r
+\r
+#powerTip:before, #powerTip:after {\r
+       content: "";\r
+       position: absolute;\r
+       margin: 0px;\r
+}\r
+\r
+#powerTip.n:after,  #powerTip.n:before,\r
+#powerTip.s:after,  #powerTip.s:before,\r
+#powerTip.w:after,  #powerTip.w:before,\r
+#powerTip.e:after,  #powerTip.e:before,\r
+#powerTip.ne:after, #powerTip.ne:before,\r
+#powerTip.se:after, #powerTip.se:before,\r
+#powerTip.nw:after, #powerTip.nw:before,\r
+#powerTip.sw:after, #powerTip.sw:before {\r
+       border: solid transparent;\r
+       content: " ";\r
+       height: 0;\r
+       width: 0;\r
+       position: absolute;\r
+}\r
+\r
+#powerTip.n:after,  #powerTip.s:after,\r
+#powerTip.w:after,  #powerTip.e:after,\r
+#powerTip.nw:after, #powerTip.ne:after,\r
+#powerTip.sw:after, #powerTip.se:after {\r
+       border-color: rgba(255, 255, 255, 0);\r
+}\r
+\r
+#powerTip.n:before,  #powerTip.s:before,\r
+#powerTip.w:before,  #powerTip.e:before,\r
+#powerTip.nw:before, #powerTip.ne:before,\r
+#powerTip.sw:before, #powerTip.se:before {\r
+       border-color: rgba(128, 128, 128, 0);\r
+}\r
+\r
+#powerTip.n:after,  #powerTip.n:before,\r
+#powerTip.ne:after, #powerTip.ne:before,\r
+#powerTip.nw:after, #powerTip.nw:before {\r
+       top: 100%;\r
+}\r
+\r
+#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after {\r
+       border-top-color: #ffffff;\r
+       border-width: 10px;\r
+       margin: 0px -10px;\r
+}\r
+#powerTip.n:before {\r
+       border-top-color: #808080;\r
+       border-width: 11px;\r
+       margin: 0px -11px;\r
+}\r
+#powerTip.n:after, #powerTip.n:before {\r
+       left: 50%;\r
+}\r
+\r
+#powerTip.nw:after, #powerTip.nw:before {\r
+       right: 14px;\r
+}\r
+\r
+#powerTip.ne:after, #powerTip.ne:before {\r
+       left: 14px;\r
+}\r
+\r
+#powerTip.s:after,  #powerTip.s:before,\r
+#powerTip.se:after, #powerTip.se:before,\r
+#powerTip.sw:after, #powerTip.sw:before {\r
+       bottom: 100%;\r
+}\r
+\r
+#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after {\r
+       border-bottom-color: #ffffff;\r
+       border-width: 10px;\r
+       margin: 0px -10px;\r
+}\r
+\r
+#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before {\r
+       border-bottom-color: #808080;\r
+       border-width: 11px;\r
+       margin: 0px -11px;\r
+}\r
+\r
+#powerTip.s:after, #powerTip.s:before {\r
+       left: 50%;\r
+}\r
+\r
+#powerTip.sw:after, #powerTip.sw:before {\r
+       right: 14px;\r
+}\r
+\r
+#powerTip.se:after, #powerTip.se:before {\r
+       left: 14px;\r
+}\r
+\r
+#powerTip.e:after, #powerTip.e:before {\r
+       left: 100%;\r
+}\r
+#powerTip.e:after {\r
+       border-left-color: #ffffff;\r
+       border-width: 10px;\r
+       top: 50%;\r
+       margin-top: -10px;\r
+}\r
+#powerTip.e:before {\r
+       border-left-color: #808080;\r
+       border-width: 11px;\r
+       top: 50%;\r
+       margin-top: -11px;\r
+}\r
+\r
+#powerTip.w:after, #powerTip.w:before {\r
+       right: 100%;\r
+}\r
+#powerTip.w:after {\r
+       border-right-color: #ffffff;\r
+       border-width: 10px;\r
+       top: 50%;\r
+       margin-top: -10px;\r
+}\r
+#powerTip.w:before {\r
+       border-right-color: #808080;\r
+       border-width: 11px;\r
+       top: 50%;\r
+       margin-top: -11px;\r
+}\r
+\r
+@media print\r
+{\r
+  #top { display: none; }\r
+  #side-nav { display: none; }\r
+  #nav-path { display: none; }\r
+  body { overflow:visible; }\r
+  h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }\r
+  .summary { display: none; }\r
+  .memitem { page-break-inside: avoid; }\r
+  #doc-content\r
+  {\r
+    margin-left:0 !important;\r
+    height:auto !important;\r
+    width:auto !important;\r
+    overflow:inherit;\r
+    display:inline;\r
+  }\r
+}\r
+\r
diff --git a/doc/footer.html b/doc/footer.html
new file mode 100755 (executable)
index 0000000..c39a88d
--- /dev/null
@@ -0,0 +1,21 @@
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<!--BEGIN GENERATE_TREEVIEW-->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    $navpath
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+<!--END GENERATE_TREEVIEW-->
+<!--BEGIN !GENERATE_TREEVIEW-->
+<hr class="footer"/><address class="footer"><small>
+$generatedby &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="$relpath^doxygen.png" alt="doxygen"/>
+</a> $doxygenversion
+</small></address>
+<!--END !GENERATE_TREEVIEW-->
+</body>
+</html>
diff --git a/doc/header.html b/doc/header.html
new file mode 100755 (executable)
index 0000000..d4a3518
--- /dev/null
@@ -0,0 +1,55 @@
+<!-- HTML header for doxygen 1.8.10-->\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml">\r
+<head>\r
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>\r
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>\r
+<meta name="generator" content="Doxygen $doxygenversion"/>\r
+<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->\r
+<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->\r
+<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/>\r
+<script type="text/javascript" src="$relpath^jquery.js"></script>\r
+<script type="text/javascript" src="$relpath^dynsections.js"></script>\r
+$treeview\r
+$search\r
+$mathjax\r
+<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />\r
+$extrastylesheet\r
+</head>\r
+<body>\r
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->\r
+\r
+<!--BEGIN TITLEAREA-->\r
+<div id="titlearea">\r
+<table cellspacing="0" cellpadding="0">\r
+ <tbody>\r
+ <tr style="height: 56px;">\r
+  <!--BEGIN PROJECT_LOGO-->\r
+  <td id="projectlogo"><img alt="Logo" src="$relpath^$projectlogo"/></td>\r
+  <!--END PROJECT_LOGO-->\r
+  <!--BEGIN PROJECT_NAME-->\r
+  <td id="projectalign" style="padding-left: 0.5em;" >\r
+   <div id="projectname">$projectname\r
+   <!--BEGIN PROJECT_NUMBER-->&#160;<span id="projectnumber">$projectnumber</span><!--END PROJECT_NUMBER-->\r
+   </div>\r
+   <!--BEGIN PROJECT_BRIEF--><div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF-->\r
+  </td>\r
+  <!--END PROJECT_NAME-->\r
+  <!--BEGIN !PROJECT_NAME-->\r
+   <!--BEGIN PROJECT_BRIEF-->\r
+    <td style="padding-left: 0.5em;">\r
+    <div id="projectbrief">$projectbrief</div>\r
+    </td>\r
+   <!--END PROJECT_BRIEF-->\r
+  <!--END !PROJECT_NAME-->\r
+  <!--BEGIN DISABLE_INDEX-->\r
+   <!--BEGIN SEARCHENGINE-->\r
+   <td>$searchbox</td>\r
+   <!--END SEARCHENGINE-->\r
+  <!--END DISABLE_INDEX-->\r
+ </tr>\r
+ </tbody>\r
+</table>\r
+</div>\r
+<!--END TITLEAREA-->\r
+<!-- end header part -->\r
diff --git a/doc/html/annotated.html b/doc/html/annotated.html
new file mode 100644 (file)
index 0000000..a540a92
--- /dev/null
@@ -0,0 +1,157 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('annotated.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">Class List</div></div>
+</div><!--header-->
+<div class="contents">
+<div class="textblock">Here are the classes, structs, unions and interfaces with brief descriptions:</div><div class="directory">
+<div class="levels">[detail level <span onclick="javascript:toggleLevel(1);">1</span><span onclick="javascript:toggleLevel(2);">2</span><span onclick="javascript:toggleLevel(3);">3</span>]</div><table class="directory">
+<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_account_info.html" target="_self">jsAccountInfo</a></td><td class="desc"></td></tr>
+<tr id="row_1_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_account_limits.html" target="_self">jsAccountLimits</a></td><td class="desc"></td></tr>
+<tr id="row_2_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_a_p_i_stats.html" target="_self">jsAPIStats</a></td><td class="desc"></td></tr>
+<tr id="row_3_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_cluster_info.html" target="_self">jsClusterInfo</a></td><td class="desc"></td></tr>
+<tr id="row_4_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_consumer_config.html" target="_self">jsConsumerConfig</a></td><td class="desc"></td></tr>
+<tr id="row_5_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_consumer_info.html" target="_self">jsConsumerInfo</a></td><td class="desc"></td></tr>
+<tr id="row_6_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_consumer_info_list.html" target="_self">jsConsumerInfoList</a></td><td class="desc"></td></tr>
+<tr id="row_7_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_consumer_names_list.html" target="_self">jsConsumerNamesList</a></td><td class="desc"></td></tr>
+<tr id="row_8_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_consumer_sequence_mismatch.html" target="_self">jsConsumerSequenceMismatch</a></td><td class="desc"></td></tr>
+<tr id="row_9_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_direct_get_msg_options.html" target="_self">jsDirectGetMsgOptions</a></td><td class="desc"></td></tr>
+<tr id="row_10_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_external_stream.html" target="_self">jsExternalStream</a></td><td class="desc"></td></tr>
+<tr id="row_11_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_fetch_request.html" target="_self">jsFetchRequest</a></td><td class="desc"></td></tr>
+<tr id="row_12_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_lost_stream_data.html" target="_self">jsLostStreamData</a></td><td class="desc"></td></tr>
+<tr id="row_13_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_msg_meta_data.html" target="_self">jsMsgMetaData</a></td><td class="desc"></td></tr>
+<tr id="row_14_" class="even"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_14_" class="arrow" onclick="toggleFolder('14_')">&#9660;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_options.html" target="_self">jsOptions</a></td><td class="desc"></td></tr>
+<tr id="row_14_0_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_options_1_1js_options_publish_async.html" target="_self">jsOptionsPublishAsync</a></td><td class="desc"></td></tr>
+<tr id="row_14_1_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_14_1_" class="arrow" onclick="toggleFolder('14_1_')">&#9660;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_options_1_1js_options_stream.html" target="_self">jsOptionsStream</a></td><td class="desc"></td></tr>
+<tr id="row_14_1_0_" class="odd"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_info.html" target="_self">jsOptionsStreamInfo</a></td><td class="desc"></td></tr>
+<tr id="row_14_1_1_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html" target="_self">jsOptionsStreamPurge</a></td><td class="desc"></td></tr>
+<tr id="row_15_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_peer_info.html" target="_self">jsPeerInfo</a></td><td class="desc"></td></tr>
+<tr id="row_16_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_placement.html" target="_self">jsPlacement</a></td><td class="desc"></td></tr>
+<tr id="row_17_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_pub_ack.html" target="_self">jsPubAck</a></td><td class="desc"></td></tr>
+<tr id="row_18_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_pub_ack_err.html" target="_self">jsPubAckErr</a></td><td class="desc"></td></tr>
+<tr id="row_19_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_pub_options.html" target="_self">jsPubOptions</a></td><td class="desc"></td></tr>
+<tr id="row_20_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_re_publish.html" target="_self">jsRePublish</a></td><td class="desc"></td></tr>
+<tr id="row_21_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_sequence_info.html" target="_self">jsSequenceInfo</a></td><td class="desc"></td></tr>
+<tr id="row_22_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_sequence_pair.html" target="_self">jsSequencePair</a></td><td class="desc"></td></tr>
+<tr id="row_23_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_stream_config.html" target="_self">jsStreamConfig</a></td><td class="desc"></td></tr>
+<tr id="row_24_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_stream_info.html" target="_self">jsStreamInfo</a></td><td class="desc"></td></tr>
+<tr id="row_25_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_stream_info_list.html" target="_self">jsStreamInfoList</a></td><td class="desc"></td></tr>
+<tr id="row_26_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_stream_names_list.html" target="_self">jsStreamNamesList</a></td><td class="desc"></td></tr>
+<tr id="row_27_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_stream_source.html" target="_self">jsStreamSource</a></td><td class="desc"></td></tr>
+<tr id="row_28_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_stream_source_info.html" target="_self">jsStreamSourceInfo</a></td><td class="desc"></td></tr>
+<tr id="row_29_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_stream_state.html" target="_self">jsStreamState</a></td><td class="desc"></td></tr>
+<tr id="row_30_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_stream_state_subject.html" target="_self">jsStreamStateSubject</a></td><td class="desc"></td></tr>
+<tr id="row_31_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_stream_state_subjects.html" target="_self">jsStreamStateSubjects</a></td><td class="desc"></td></tr>
+<tr id="row_32_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_sub_options.html" target="_self">jsSubOptions</a></td><td class="desc"></td></tr>
+<tr id="row_33_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structjs_tier.html" target="_self">jsTier</a></td><td class="desc"></td></tr>
+<tr id="row_34_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structkv_config.html" target="_self">kvConfig</a></td><td class="desc"></td></tr>
+<tr id="row_35_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structkv_entry_list.html" target="_self">kvEntryList</a></td><td class="desc">A list of KeyValue store entries </td></tr>
+<tr id="row_36_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structkv_keys_list.html" target="_self">kvKeysList</a></td><td class="desc">A list of KeyValue store keys </td></tr>
+<tr id="row_37_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structkv_purge_options.html" target="_self">kvPurgeOptions</a></td><td class="desc"></td></tr>
+<tr id="row_38_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structkv_watch_options.html" target="_self">kvWatchOptions</a></td><td class="desc"></td></tr>
+<tr id="row_39_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structnats_msg_list.html" target="_self">natsMsgList</a></td><td class="desc">A list of NATS messages </td></tr>
+</table>
+</div><!-- directory -->
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/annotated_dup.js b/doc/html/annotated_dup.js
new file mode 100644 (file)
index 0000000..cb56f37
--- /dev/null
@@ -0,0 +1,43 @@
+var annotated_dup =
+[
+    [ "jsAccountInfo", "structjs_account_info.html", "structjs_account_info" ],
+    [ "jsAccountLimits", "structjs_account_limits.html", "structjs_account_limits" ],
+    [ "jsAPIStats", "structjs_a_p_i_stats.html", "structjs_a_p_i_stats" ],
+    [ "jsClusterInfo", "structjs_cluster_info.html", "structjs_cluster_info" ],
+    [ "jsConsumerConfig", "structjs_consumer_config.html", "structjs_consumer_config" ],
+    [ "jsConsumerInfo", "structjs_consumer_info.html", "structjs_consumer_info" ],
+    [ "jsConsumerInfoList", "structjs_consumer_info_list.html", "structjs_consumer_info_list" ],
+    [ "jsConsumerNamesList", "structjs_consumer_names_list.html", "structjs_consumer_names_list" ],
+    [ "jsConsumerSequenceMismatch", "structjs_consumer_sequence_mismatch.html", "structjs_consumer_sequence_mismatch" ],
+    [ "jsDirectGetMsgOptions", "structjs_direct_get_msg_options.html", "structjs_direct_get_msg_options" ],
+    [ "jsExternalStream", "structjs_external_stream.html", "structjs_external_stream" ],
+    [ "jsFetchRequest", "structjs_fetch_request.html", "structjs_fetch_request" ],
+    [ "jsLostStreamData", "structjs_lost_stream_data.html", "structjs_lost_stream_data" ],
+    [ "jsMsgMetaData", "structjs_msg_meta_data.html", "structjs_msg_meta_data" ],
+    [ "jsOptions", "structjs_options.html", "structjs_options" ],
+    [ "jsPeerInfo", "structjs_peer_info.html", "structjs_peer_info" ],
+    [ "jsPlacement", "structjs_placement.html", "structjs_placement" ],
+    [ "jsPubAck", "structjs_pub_ack.html", "structjs_pub_ack" ],
+    [ "jsPubAckErr", "structjs_pub_ack_err.html", "structjs_pub_ack_err" ],
+    [ "jsPubOptions", "structjs_pub_options.html", "structjs_pub_options" ],
+    [ "jsRePublish", "structjs_re_publish.html", "structjs_re_publish" ],
+    [ "jsSequenceInfo", "structjs_sequence_info.html", "structjs_sequence_info" ],
+    [ "jsSequencePair", "structjs_sequence_pair.html", "structjs_sequence_pair" ],
+    [ "jsStreamConfig", "structjs_stream_config.html", "structjs_stream_config" ],
+    [ "jsStreamInfo", "structjs_stream_info.html", "structjs_stream_info" ],
+    [ "jsStreamInfoList", "structjs_stream_info_list.html", "structjs_stream_info_list" ],
+    [ "jsStreamNamesList", "structjs_stream_names_list.html", "structjs_stream_names_list" ],
+    [ "jsStreamSource", "structjs_stream_source.html", "structjs_stream_source" ],
+    [ "jsStreamSourceInfo", "structjs_stream_source_info.html", "structjs_stream_source_info" ],
+    [ "jsStreamState", "structjs_stream_state.html", "structjs_stream_state" ],
+    [ "jsStreamStateSubject", "structjs_stream_state_subject.html", "structjs_stream_state_subject" ],
+    [ "jsStreamStateSubjects", "structjs_stream_state_subjects.html", "structjs_stream_state_subjects" ],
+    [ "jsSubOptions", "structjs_sub_options.html", "structjs_sub_options" ],
+    [ "jsTier", "structjs_tier.html", "structjs_tier" ],
+    [ "kvConfig", "structkv_config.html", "structkv_config" ],
+    [ "kvEntryList", "structkv_entry_list.html", "structkv_entry_list" ],
+    [ "kvKeysList", "structkv_keys_list.html", "structkv_keys_list" ],
+    [ "kvPurgeOptions", "structkv_purge_options.html", "structkv_purge_options" ],
+    [ "kvWatchOptions", "structkv_watch_options.html", "structkv_watch_options" ],
+    [ "natsMsgList", "structnats_msg_list.html", "structnats_msg_list" ]
+];
\ No newline at end of file
diff --git a/doc/html/arrowdown.png b/doc/html/arrowdown.png
new file mode 100644 (file)
index 0000000..0b63f6d
Binary files /dev/null and b/doc/html/arrowdown.png differ
diff --git a/doc/html/arrowright.png b/doc/html/arrowright.png
new file mode 100644 (file)
index 0000000..c6ee22f
Binary files /dev/null and b/doc/html/arrowright.png differ
diff --git a/doc/html/bc_s.png b/doc/html/bc_s.png
new file mode 100644 (file)
index 0000000..224b29a
Binary files /dev/null and b/doc/html/bc_s.png differ
diff --git a/doc/html/bc_sd.png b/doc/html/bc_sd.png
new file mode 100644 (file)
index 0000000..31ca888
Binary files /dev/null and b/doc/html/bc_sd.png differ
diff --git a/doc/html/bdwn.png b/doc/html/bdwn.png
new file mode 100644 (file)
index 0000000..940a0b9
Binary files /dev/null and b/doc/html/bdwn.png differ
diff --git a/doc/html/classes.html b/doc/html/classes.html
new file mode 100644 (file)
index 0000000..0ec9131
--- /dev/null
@@ -0,0 +1,121 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Index</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('classes.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">Class Index</div></div>
+</div><!--header-->
+<div class="contents">
+<div class="qindex"><a class="qindex" href="#letter_J">J</a>&#160;|&#160;<a class="qindex" href="#letter_K">K</a>&#160;|&#160;<a class="qindex" href="#letter_N">N</a></div>
+<div class="classindex">
+<dl class="classindex even">
+<dt class="alphachar"><a id="letter_J" name="letter_J">J</a></dt>
+<dd><a class="el" href="structjs_account_info.html">jsAccountInfo</a></dd><dd><a class="el" href="structjs_account_limits.html">jsAccountLimits</a></dd><dd><a class="el" href="structjs_a_p_i_stats.html">jsAPIStats</a></dd><dd><a class="el" href="structjs_cluster_info.html">jsClusterInfo</a></dd><dd><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a></dd><dd><a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a></dd><dd><a class="el" href="structjs_consumer_info_list.html">jsConsumerInfoList</a></dd><dd><a class="el" href="structjs_consumer_names_list.html">jsConsumerNamesList</a></dd><dd><a class="el" href="structjs_consumer_sequence_mismatch.html">jsConsumerSequenceMismatch</a></dd><dd><a class="el" href="structjs_direct_get_msg_options.html">jsDirectGetMsgOptions</a></dd><dd><a class="el" href="structjs_external_stream.html">jsExternalStream</a></dd><dd><a class="el" href="structjs_fetch_request.html">jsFetchRequest</a></dd><dd><a class="el" href="structjs_lost_stream_data.html">jsLostStreamData</a></dd><dd><a class="el" href="structjs_msg_meta_data.html">jsMsgMetaData</a></dd><dd><a class="el" href="structjs_options.html">jsOptions</a></dd><dd><a class="el" href="structjs_options_1_1js_options_publish_async.html">jsOptions::jsOptionsPublishAsync</a></dd><dd><a class="el" href="structjs_options_1_1js_options_stream.html">jsOptions::jsOptionsStream</a></dd><dd><a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_info.html">jsOptions::jsOptionsStream::jsOptionsStreamInfo</a></dd><dd><a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html">jsOptions::jsOptionsStream::jsOptionsStreamPurge</a></dd><dd><a class="el" href="structjs_peer_info.html">jsPeerInfo</a></dd><dd><a class="el" href="structjs_placement.html">jsPlacement</a></dd><dd><a class="el" href="structjs_pub_ack.html">jsPubAck</a></dd><dd><a class="el" href="structjs_pub_ack_err.html">jsPubAckErr</a></dd><dd><a class="el" href="structjs_pub_options.html">jsPubOptions</a></dd><dd><a class="el" href="structjs_re_publish.html">jsRePublish</a></dd><dd><a class="el" href="structjs_sequence_info.html">jsSequenceInfo</a></dd><dd><a class="el" href="structjs_sequence_pair.html">jsSequencePair</a></dd><dd><a class="el" href="structjs_stream_config.html">jsStreamConfig</a></dd><dd><a class="el" href="structjs_stream_info.html">jsStreamInfo</a></dd><dd><a class="el" href="structjs_stream_info_list.html">jsStreamInfoList</a></dd><dd><a class="el" href="structjs_stream_names_list.html">jsStreamNamesList</a></dd><dd><a class="el" href="structjs_stream_source.html">jsStreamSource</a></dd><dd><a class="el" href="structjs_stream_source_info.html">jsStreamSourceInfo</a></dd><dd><a class="el" href="structjs_stream_state.html">jsStreamState</a></dd><dd><a class="el" href="structjs_stream_state_subject.html">jsStreamStateSubject</a></dd><dd><a class="el" href="structjs_stream_state_subjects.html">jsStreamStateSubjects</a></dd><dd><a class="el" href="structjs_sub_options.html">jsSubOptions</a></dd><dd><a class="el" href="structjs_tier.html">jsTier</a></dd></dl>
+<dl class="classindex odd">
+<dt class="alphachar"><a id="letter_K" name="letter_K">K</a></dt>
+<dd><a class="el" href="structkv_config.html">kvConfig</a></dd><dd><a class="el" href="structkv_entry_list.html">kvEntryList</a></dd><dd><a class="el" href="structkv_keys_list.html">kvKeysList</a></dd><dd><a class="el" href="structkv_purge_options.html">kvPurgeOptions</a></dd><dd><a class="el" href="structkv_watch_options.html">kvWatchOptions</a></dd></dl>
+<dl class="classindex even">
+<dt class="alphachar"><a id="letter_N" name="letter_N">N</a></dt>
+<dd><a class="el" href="structnats_msg_list.html">natsMsgList</a></dd></dl>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/closed.png b/doc/html/closed.png
new file mode 100644 (file)
index 0000000..98cc2c9
Binary files /dev/null and b/doc/html/closed.png differ
diff --git a/doc/html/customdoxygen.css b/doc/html/customdoxygen.css
new file mode 100644 (file)
index 0000000..a3290a0
--- /dev/null
@@ -0,0 +1,1454 @@
+/* The standard CSS for doxygen 1.8.10 */\r
+\r
+body, table, div, p, dl {\r
+       font: 400 14px/22px Roboto,sans-serif;\r
+}\r
+\r
+/* @group Heading Levels */\r
+\r
+h1.groupheader {\r
+       font-size: 150%;\r
+}\r
+\r
+.title {\r
+       font: 400 14px/28px Roboto,sans-serif;\r
+       font-size: 150%;\r
+       font-weight: bold;\r
+       margin: 10px 2px;\r
+}\r
+\r
+h2.groupheader {\r
+       border-bottom: 1px solid #879ECB;\r
+       color: #354C7B;\r
+       font-size: 150%;\r
+       font-weight: normal;\r
+       margin-top: 1.75em;\r
+       padding-top: 8px;\r
+       padding-bottom: 4px;\r
+       width: 100%;\r
+}\r
+\r
+h3.groupheader {\r
+       font-size: 100%;\r
+}\r
+\r
+h1, h2, h3, h4, h5, h6 {\r
+       -webkit-transition: text-shadow 0.5s linear;\r
+       -moz-transition: text-shadow 0.5s linear;\r
+       -ms-transition: text-shadow 0.5s linear;\r
+       -o-transition: text-shadow 0.5s linear;\r
+       transition: text-shadow 0.5s linear;\r
+       margin-right: 15px;\r
+}\r
+\r
+h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow {\r
+       text-shadow: 0 0 15px cyan;\r
+}\r
+\r
+dt {\r
+       font-weight: bold;\r
+}\r
+\r
+div.multicol {\r
+       -moz-column-gap: 1em;\r
+       -webkit-column-gap: 1em;\r
+       -moz-column-count: 3;\r
+       -webkit-column-count: 3;\r
+}\r
+\r
+p.startli, p.startdd {\r
+       margin-top: 2px;\r
+}\r
+\r
+p.starttd {\r
+       margin-top: 0px;\r
+}\r
+\r
+p.endli {\r
+       margin-bottom: 0px;\r
+}\r
+\r
+p.enddd {\r
+       margin-bottom: 4px;\r
+}\r
+\r
+p.endtd {\r
+       margin-bottom: 2px;\r
+}\r
+\r
+/* @end */\r
+\r
+caption {\r
+       font-weight: bold;\r
+}\r
+\r
+span.legend {\r
+        font-size: 70%;\r
+        text-align: center;\r
+}\r
+\r
+h3.version {\r
+        font-size: 90%;\r
+        text-align: center;\r
+}\r
+\r
+div.qindex, div.navtab{\r
+       background-color: #EBEFF6;\r
+       border: 1px solid #A3B4D7;\r
+       text-align: center;\r
+}\r
+\r
+div.qindex, div.navpath {\r
+       width: 100%;\r
+       line-height: 140%;\r
+}\r
+\r
+div.navtab {\r
+       margin-right: 15px;\r
+}\r
+\r
+/* @group Link Styling */\r
+\r
+a {\r
+       color: #3D578C;\r
+       font-weight: normal;\r
+       text-decoration: none;\r
+}\r
+\r
+.contents a:visited {\r
+       color: #4665A2;\r
+}\r
+\r
+a:hover {\r
+       text-decoration: underline;\r
+}\r
+\r
+a.qindex {\r
+       font-weight: bold;\r
+}\r
+\r
+a.qindexHL {\r
+       font-weight: bold;\r
+       background-color: #9CAFD4;\r
+       color: #ffffff;\r
+       border: 1px double #869DCA;\r
+}\r
+\r
+.contents a.qindexHL:visited {\r
+        color: #ffffff;\r
+}\r
+\r
+a.el {\r
+       font-weight: bold;\r
+}\r
+\r
+a.elRef {\r
+}\r
+\r
+a.code, a.code:visited, a.line, a.line:visited {\r
+       color: #4665A2; \r
+}\r
+\r
+a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited {\r
+       color: #4665A2; \r
+}\r
+\r
+/* @end */\r
+\r
+dl.el {\r
+       margin-left: -1cm;\r
+}\r
+\r
+pre.fragment {\r
+        border: 1px solid #C4CFE5;\r
+        background-color: #FBFCFD;\r
+        padding: 4px 6px;\r
+        margin: 4px 8px 4px 2px;\r
+        overflow: auto;\r
+        word-wrap: break-word;\r
+        font-size:  9pt;\r
+        line-height: 125%;\r
+        font-family: monospace, fixed;\r
+        font-size: 105%;\r
+}\r
+\r
+div.fragment {\r
+        padding: 4px 6px;\r
+        margin: 4px 8px 4px 2px;\r
+       background-color: #FBFCFD;\r
+       border: 1px solid #C4CFE5;\r
+}\r
+\r
+div.line {\r
+       font-family: monospace, fixed;\r
+        font-size: 13px;\r
+       min-height: 13px;\r
+       line-height: 1.0;\r
+       text-wrap: unrestricted;\r
+       white-space: -moz-pre-wrap; /* Moz */\r
+       white-space: -pre-wrap;     /* Opera 4-6 */\r
+       white-space: -o-pre-wrap;   /* Opera 7 */\r
+       white-space: pre-wrap;      /* CSS3  */\r
+       word-wrap: break-word;      /* IE 5.5+ */\r
+       text-indent: -53px;\r
+       padding-left: 53px;\r
+       padding-bottom: 0px;\r
+       margin: 0px;\r
+       -webkit-transition-property: background-color, box-shadow;\r
+       -webkit-transition-duration: 0.5s;\r
+       -moz-transition-property: background-color, box-shadow;\r
+       -moz-transition-duration: 0.5s;\r
+       -ms-transition-property: background-color, box-shadow;\r
+       -ms-transition-duration: 0.5s;\r
+       -o-transition-property: background-color, box-shadow;\r
+       -o-transition-duration: 0.5s;\r
+       transition-property: background-color, box-shadow;\r
+       transition-duration: 0.5s;\r
+}\r
+\r
+div.line.glow {\r
+       background-color: cyan;\r
+       box-shadow: 0 0 10px cyan;\r
+}\r
+\r
+\r
+span.lineno {\r
+       padding-right: 4px;\r
+       text-align: right;\r
+       border-right: 2px solid #0F0;\r
+       background-color: #E8E8E8;\r
+        white-space: pre;\r
+}\r
+span.lineno a {\r
+       background-color: #D8D8D8;\r
+}\r
+\r
+span.lineno a:hover {\r
+       background-color: #C8C8C8;\r
+}\r
+\r
+div.ah, span.ah {\r
+       background-color: black;\r
+       font-weight: bold;\r
+       color: #ffffff;\r
+       margin-bottom: 3px;\r
+       margin-top: 3px;\r
+       padding: 0.2em;\r
+       border: solid thin #333;\r
+       border-radius: 0.5em;\r
+       -webkit-border-radius: .5em;\r
+       -moz-border-radius: .5em;\r
+       box-shadow: 2px 2px 3px #999;\r
+       -webkit-box-shadow: 2px 2px 3px #999;\r
+       -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;\r
+       background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444));\r
+       background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000);\r
+}\r
+\r
+div.classindex ul {\r
+        list-style: none;\r
+        padding-left: 0;\r
+}\r
+\r
+div.classindex span.ai {\r
+        display: inline-block;\r
+}\r
+\r
+div.groupHeader {\r
+       margin-left: 16px;\r
+       margin-top: 12px;\r
+       font-weight: bold;\r
+}\r
+\r
+div.groupText {\r
+       margin-left: 16px;\r
+       font-style: italic;\r
+}\r
+\r
+body {\r
+       background-color: white;\r
+       color: black;\r
+        margin: 0;\r
+}\r
+\r
+div.contents {\r
+       margin-top: 10px;\r
+       margin-left: 12px;\r
+       margin-right: 8px;\r
+}\r
+\r
+td.indexkey {\r
+       background-color: #EBEFF6;\r
+       font-weight: bold;\r
+       border: 1px solid #C4CFE5;\r
+       margin: 2px 0px 2px 0;\r
+       padding: 2px 10px;\r
+        white-space: nowrap;\r
+        vertical-align: top;\r
+}\r
+\r
+td.indexvalue {\r
+       background-color: #EBEFF6;\r
+       border: 1px solid #C4CFE5;\r
+       padding: 2px 10px;\r
+       margin: 2px 0px;\r
+}\r
+\r
+tr.memlist {\r
+       background-color: #EEF1F7;\r
+}\r
+\r
+p.formulaDsp {\r
+       text-align: center;\r
+}\r
+\r
+img.formulaDsp {\r
+       \r
+}\r
+\r
+img.formulaInl {\r
+       vertical-align: middle;\r
+}\r
+\r
+div.center {\r
+       text-align: center;\r
+        margin-top: 0px;\r
+        margin-bottom: 0px;\r
+        padding: 0px;\r
+}\r
+\r
+div.center img {\r
+       border: 0px;\r
+}\r
+\r
+address.footer {\r
+       text-align: right;\r
+       padding-right: 12px;\r
+}\r
+\r
+img.footer {\r
+       border: 0px;\r
+       vertical-align: middle;\r
+}\r
+\r
+/* @group Code Colorization */\r
+\r
+span.keyword {\r
+       color: #008000\r
+}\r
+\r
+span.keywordtype {\r
+       color: #604020\r
+}\r
+\r
+span.keywordflow {\r
+       color: #e08000\r
+}\r
+\r
+span.comment {\r
+       color: #800000\r
+}\r
+\r
+span.preprocessor {\r
+       color: #806020\r
+}\r
+\r
+span.stringliteral {\r
+       color: #002080\r
+}\r
+\r
+span.charliteral {\r
+       color: #008080\r
+}\r
+\r
+span.vhdldigit { \r
+       color: #ff00ff \r
+}\r
+\r
+span.vhdlchar { \r
+       color: #000000 \r
+}\r
+\r
+span.vhdlkeyword { \r
+       color: #700070 \r
+}\r
+\r
+span.vhdllogic { \r
+       color: #ff0000 \r
+}\r
+\r
+blockquote {\r
+        background-color: #F7F8FB;\r
+        border-left: 2px solid #9CAFD4;\r
+        margin: 0 24px 0 4px;\r
+        padding: 0 12px 0 16px;\r
+}\r
+\r
+/* @end */\r
+\r
+/*\r
+.search {\r
+       color: #003399;\r
+       font-weight: bold;\r
+}\r
+\r
+form.search {\r
+       margin-bottom: 0px;\r
+       margin-top: 0px;\r
+}\r
+\r
+input.search {\r
+       font-size: 75%;\r
+       color: #000080;\r
+       font-weight: normal;\r
+       background-color: #e8eef2;\r
+}\r
+*/\r
+\r
+td.tiny {\r
+       font-size: 75%;\r
+}\r
+\r
+.dirtab {\r
+       padding: 4px;\r
+       border-collapse: collapse;\r
+       border: 1px solid #A3B4D7;\r
+}\r
+\r
+th.dirtab {\r
+       background: #EBEFF6;\r
+       font-weight: bold;\r
+}\r
+\r
+hr {\r
+       height: 0px;\r
+       border: none;\r
+       border-top: 1px solid #4A6AAA;\r
+}\r
+\r
+hr.footer {\r
+       height: 1px;\r
+}\r
+\r
+/* @group Member Descriptions */\r
+\r
+table.memberdecls {\r
+       border-spacing: 0px;\r
+       padding: 0px;\r
+}\r
+\r
+.memberdecls td, .fieldtable tr {\r
+       -webkit-transition-property: background-color, box-shadow;\r
+       -webkit-transition-duration: 0.5s;\r
+       -moz-transition-property: background-color, box-shadow;\r
+       -moz-transition-duration: 0.5s;\r
+       -ms-transition-property: background-color, box-shadow;\r
+       -ms-transition-duration: 0.5s;\r
+       -o-transition-property: background-color, box-shadow;\r
+       -o-transition-duration: 0.5s;\r
+       transition-property: background-color, box-shadow;\r
+       transition-duration: 0.5s;\r
+}\r
+\r
+.memberdecls td.glow, .fieldtable tr.glow {\r
+       background-color: cyan;\r
+       box-shadow: 0 0 15px cyan;\r
+}\r
+\r
+.mdescLeft, .mdescRight,\r
+.memItemLeft, .memItemRight,\r
+.memTemplItemLeft, .memTemplItemRight, .memTemplParams {\r
+       background-color: #F9FAFC;\r
+       border: none;\r
+       margin: 4px;\r
+       padding: 1px 0 0 8px;\r
+}\r
+\r
+.mdescLeft, .mdescRight {\r
+       padding: 0px 8px 4px 8px;\r
+       color: #555;\r
+}\r
+\r
+.memSeparator {\r
+        border-bottom: 1px solid #DEE4F0;\r
+        line-height: 1px;\r
+        margin: 0px;\r
+        padding: 0px;\r
+}\r
+\r
+.memItemLeft, .memTemplItemLeft {\r
+        white-space: nowrap;\r
+}\r
+\r
+.memItemRight {\r
+       width: 100%;\r
+}\r
+\r
+.memTemplParams {\r
+       color: #4665A2;\r
+        white-space: nowrap;\r
+       font-size: 80%;\r
+}\r
+\r
+/* @end */\r
+\r
+/* @group Member Details */\r
+\r
+/* Styles for detailed member documentation */\r
+\r
+.memtemplate {\r
+       font-size: 80%;\r
+       color: #4665A2;\r
+       font-weight: normal;\r
+       margin-left: 9px;\r
+}\r
+\r
+.memnav {\r
+       background-color: #EBEFF6;\r
+       border: 1px solid #A3B4D7;\r
+       text-align: center;\r
+       margin: 2px;\r
+       margin-right: 15px;\r
+       padding: 2px;\r
+}\r
+\r
+.mempage {\r
+       width: 100%;\r
+}\r
+\r
+.memitem {\r
+       padding: 0;\r
+       margin-bottom: 10px;\r
+       margin-right: 5px;\r
+        -webkit-transition: box-shadow 0.5s linear;\r
+        -moz-transition: box-shadow 0.5s linear;\r
+        -ms-transition: box-shadow 0.5s linear;\r
+        -o-transition: box-shadow 0.5s linear;\r
+        transition: box-shadow 0.5s linear;\r
+        display: table !important;\r
+        width: 100%;\r
+}\r
+\r
+.memitem.glow {\r
+         box-shadow: 0 0 15px cyan;\r
+}\r
+\r
+.memname {\r
+        font-weight: bold;\r
+        margin-left: 6px;\r
+}\r
+\r
+.memname td {\r
+       vertical-align: bottom;\r
+}\r
+\r
+.memproto, dl.reflist dt {\r
+        border-top: 1px solid #A8B8D9;\r
+        border-left: 1px solid #A8B8D9;\r
+        border-right: 1px solid #A8B8D9;\r
+        padding: 6px 0px 6px 0px;\r
+        color: #253555;\r
+        font-weight: bold;\r
+        text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);\r
+        background-image:url('nav_f.png');\r
+        background-repeat:repeat-x;\r
+        background-color: #E2E8F2;\r
+        /* opera specific markup */\r
+        box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);\r
+        border-top-right-radius: 4px;\r
+        border-top-left-radius: 4px;\r
+        /* firefox specific markup */\r
+        -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;\r
+        -moz-border-radius-topright: 4px;\r
+        -moz-border-radius-topleft: 4px;\r
+        /* webkit specific markup */\r
+        -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);\r
+        -webkit-border-top-right-radius: 4px;\r
+        -webkit-border-top-left-radius: 4px;\r
+\r
+}\r
+\r
+.memdoc, dl.reflist dd {\r
+        border-bottom: 1px solid #A8B8D9;      \r
+        border-left: 1px solid #A8B8D9;      \r
+        border-right: 1px solid #A8B8D9; \r
+        padding: 6px 10px 2px 10px;\r
+        background-color: #FBFCFD;\r
+        border-top-width: 0;\r
+        background-image:url('nav_g.png');\r
+        background-repeat:repeat-x;\r
+        background-color: #FFFFFF;\r
+        /* opera specific markup */\r
+        border-bottom-left-radius: 4px;\r
+        border-bottom-right-radius: 4px;\r
+        box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);\r
+        /* firefox specific markup */\r
+        -moz-border-radius-bottomleft: 4px;\r
+        -moz-border-radius-bottomright: 4px;\r
+        -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;\r
+        /* webkit specific markup */\r
+        -webkit-border-bottom-left-radius: 4px;\r
+        -webkit-border-bottom-right-radius: 4px;\r
+        -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);\r
+}\r
+\r
+dl.reflist dt {\r
+        padding: 5px;\r
+}\r
+\r
+dl.reflist dd {\r
+        margin: 0px 0px 10px 0px;\r
+        padding: 5px;\r
+}\r
+\r
+.paramkey {\r
+       text-align: right;\r
+}\r
+\r
+.paramtype {\r
+       white-space: nowrap;\r
+}\r
+\r
+.paramname {\r
+       color: #602020;\r
+       white-space: nowrap;\r
+}\r
+.paramname em {\r
+       font-style: normal;\r
+}\r
+.paramname code {\r
+        line-height: 14px;\r
+}\r
+\r
+.params, .retval, .exception, .tparams {\r
+        margin-left: 0px;\r
+        padding-left: 0px;\r
+}       \r
+\r
+.params .paramname, .retval .paramname {\r
+        font-weight: bold;\r
+        vertical-align: top;\r
+}\r
+        \r
+.params .paramtype {\r
+        font-style: italic;\r
+        vertical-align: top;\r
+}       \r
+        \r
+.params .paramdir {\r
+        font-family: "courier new",courier,monospace;\r
+        vertical-align: top;\r
+}\r
+\r
+table.mlabels {\r
+       border-spacing: 0px;\r
+}\r
+\r
+td.mlabels-left {\r
+       width: 100%;\r
+       padding: 0px;\r
+}\r
+\r
+td.mlabels-right {\r
+       vertical-align: bottom;\r
+       padding: 0px;\r
+       white-space: nowrap;\r
+}\r
+\r
+span.mlabels {\r
+        margin-left: 8px;\r
+}\r
+\r
+span.mlabel {\r
+        background-color: #728DC1;\r
+        border-top:1px solid #5373B4;\r
+        border-left:1px solid #5373B4;\r
+        border-right:1px solid #C4CFE5;\r
+        border-bottom:1px solid #C4CFE5;\r
+       text-shadow: none;\r
+       color: white;\r
+       margin-right: 4px;\r
+       padding: 2px 3px;\r
+       border-radius: 3px;\r
+       font-size: 7pt;\r
+       white-space: nowrap;\r
+       vertical-align: middle;\r
+}\r
+\r
+\r
+\r
+/* @end */\r
+\r
+/* these are for tree view inside a (index) page */\r
+\r
+div.directory {\r
+        margin: 10px 0px;\r
+        border-top: 1px solid #9CAFD4;\r
+        border-bottom: 1px solid #9CAFD4;\r
+        width: 100%;\r
+}\r
+\r
+.directory table {\r
+        border-collapse:collapse;\r
+}\r
+\r
+.directory td {\r
+        margin: 0px;\r
+        padding: 0px;\r
+       vertical-align: top;\r
+}\r
+\r
+.directory td.entry {\r
+        white-space: nowrap;\r
+        padding-right: 6px;\r
+       padding-top: 3px;\r
+}\r
+\r
+.directory td.entry a {\r
+        outline:none;\r
+}\r
+\r
+.directory td.entry a img {\r
+        border: none;\r
+}\r
+\r
+.directory td.desc {\r
+        width: 100%;\r
+        padding-left: 6px;\r
+       padding-right: 6px;\r
+       padding-top: 3px;\r
+       border-left: 1px solid rgba(0,0,0,0.05);\r
+}\r
+\r
+.directory tr.even {\r
+       padding-left: 6px;\r
+       background-color: #F7F8FB;\r
+}\r
+\r
+.directory img {\r
+       vertical-align: -30%;\r
+}\r
+\r
+.directory .levels {\r
+        white-space: nowrap;\r
+        width: 100%;\r
+        text-align: right;\r
+        font-size: 9pt;\r
+}\r
+\r
+.directory .levels span {\r
+        cursor: pointer;\r
+        padding-left: 2px;\r
+        padding-right: 2px;\r
+       color: #3D578C;\r
+}\r
+\r
+.arrow {\r
+    color: #9CAFD4;\r
+    -webkit-user-select: none;\r
+    -khtml-user-select: none;\r
+    -moz-user-select: none;\r
+    -ms-user-select: none;\r
+    user-select: none;\r
+    cursor: pointer;\r
+    font-size: 80%;\r
+    display: inline-block;\r
+    width: 16px;\r
+    height: 22px;\r
+}\r
+\r
+.icon {\r
+    font-family: Arial, Helvetica;\r
+    font-weight: bold;\r
+    font-size: 12px;\r
+    height: 14px;\r
+    width: 16px;\r
+    display: inline-block;\r
+    background-color: #728DC1;\r
+    color: white;\r
+    text-align: center;\r
+    border-radius: 4px;\r
+    margin-left: 2px;\r
+    margin-right: 2px;\r
+}\r
+\r
+.icona {\r
+    width: 24px;\r
+    height: 22px;\r
+    display: inline-block;\r
+}\r
+\r
+.iconfopen {\r
+    width: 24px;\r
+    height: 18px;\r
+    margin-bottom: 4px;\r
+    background-image:url('folderopen.png');\r
+    background-position: 0px -4px;\r
+    background-repeat: repeat-y;\r
+    vertical-align:top;\r
+    display: inline-block;\r
+}\r
+\r
+.iconfclosed {\r
+    width: 24px;\r
+    height: 18px;\r
+    margin-bottom: 4px;\r
+    background-image:url('folderclosed.png');\r
+    background-position: 0px -4px;\r
+    background-repeat: repeat-y;\r
+    vertical-align:top;\r
+    display: inline-block;\r
+}\r
+\r
+.icondoc {\r
+    width: 24px;\r
+    height: 18px;\r
+    margin-bottom: 4px;\r
+    background-image:url('doc.png');\r
+    background-position: 0px -4px;\r
+    background-repeat: repeat-y;\r
+    vertical-align:top;\r
+    display: inline-block;\r
+}\r
+\r
+table.directory {\r
+    font: 400 14px Roboto,sans-serif;\r
+}\r
+\r
+/* @end */\r
+\r
+div.dynheader {\r
+        margin-top: 8px;\r
+       -webkit-touch-callout: none;\r
+       -webkit-user-select: none;\r
+       -khtml-user-select: none;\r
+       -moz-user-select: none;\r
+       -ms-user-select: none;\r
+       user-select: none;\r
+}\r
+\r
+address {\r
+       font-style: normal;\r
+       color: #2A3D61;\r
+}\r
+\r
+table.doxtable {\r
+       border-collapse:collapse;\r
+        margin-top: 4px;\r
+        margin-bottom: 4px;\r
+}\r
+\r
+table.doxtable td, table.doxtable th {\r
+       border: 1px solid #2D4068;\r
+       padding: 3px 7px 2px;\r
+}\r
+\r
+table.doxtable th {\r
+       background-color: #374F7F;\r
+       color: #FFFFFF;\r
+       font-size: 110%;\r
+       padding-bottom: 4px;\r
+       padding-top: 5px;\r
+}\r
+\r
+table.fieldtable {\r
+        /*width: 100%;*/\r
+        margin-bottom: 10px;\r
+        border: 1px solid #A8B8D9;\r
+        border-spacing: 0px;\r
+        -moz-border-radius: 4px;\r
+        -webkit-border-radius: 4px;\r
+        border-radius: 4px;\r
+        -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;\r
+        -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);\r
+        box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);\r
+}\r
+\r
+.fieldtable td, .fieldtable th {\r
+        padding: 3px 7px 2px;\r
+}\r
+\r
+.fieldtable td.fieldtype, .fieldtable td.fieldname {\r
+        white-space: nowrap;\r
+        border-right: 1px solid #A8B8D9;\r
+        border-bottom: 1px solid #A8B8D9;\r
+        vertical-align: top;\r
+}\r
+\r
+.fieldtable td.fieldname {\r
+        padding-top: 3px;\r
+}\r
+\r
+.fieldtable td.fielddoc {\r
+        border-bottom: 1px solid #A8B8D9;\r
+        /*width: 100%;*/\r
+}\r
+\r
+.fieldtable td.fielddoc p:first-child {\r
+        margin-top: 0px;\r
+}       \r
+        \r
+.fieldtable td.fielddoc p:last-child {\r
+        margin-bottom: 2px;\r
+}\r
+\r
+.fieldtable tr:last-child td {\r
+        border-bottom: none;\r
+}\r
+\r
+.fieldtable th {\r
+        background-image:url('nav_f.png');\r
+        background-repeat:repeat-x;\r
+        background-color: #E2E8F2;\r
+        font-size: 90%;\r
+        color: #253555;\r
+        padding-bottom: 4px;\r
+        padding-top: 5px;\r
+        text-align:left;\r
+        -moz-border-radius-topleft: 4px;\r
+        -moz-border-radius-topright: 4px;\r
+        -webkit-border-top-left-radius: 4px;\r
+        -webkit-border-top-right-radius: 4px;\r
+        border-top-left-radius: 4px;\r
+        border-top-right-radius: 4px;\r
+        border-bottom: 1px solid #A8B8D9;\r
+}\r
+\r
+\r
+.tabsearch {\r
+       top: 0px;\r
+       left: 10px;\r
+       height: 36px;\r
+       background-image: url('tab_b.png');\r
+       z-index: 101;\r
+       overflow: hidden;\r
+       font-size: 13px;\r
+}\r
+\r
+.navpath ul\r
+{\r
+       font-size: 11px;\r
+       background-image:url('tab_b.png');\r
+       background-repeat:repeat-x;\r
+       background-position: 0 -5px;\r
+       height:30px;\r
+       line-height:30px;\r
+       color:#8AA0CC;\r
+       border:solid 1px #C2CDE4;\r
+       overflow:hidden;\r
+       margin:0px;\r
+       padding:0px;\r
+}\r
+\r
+.navpath li\r
+{\r
+       list-style-type:none;\r
+       float:left;\r
+       padding-left:10px;\r
+       padding-right:15px;\r
+       background-image:url('bc_s.png');\r
+       background-repeat:no-repeat;\r
+       background-position:right;\r
+       color:#364D7C;\r
+}\r
+\r
+.navpath li.navelem a\r
+{\r
+       height:32px;\r
+       display:block;\r
+       text-decoration: none;\r
+       outline: none;\r
+       color: #283A5D;\r
+       font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;\r
+       text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);\r
+       text-decoration: none;        \r
+}\r
+\r
+.navpath li.navelem a:hover\r
+{\r
+       color:#6884BD;\r
+}\r
+\r
+.navpath li.footer\r
+{\r
+        list-style-type:none;\r
+        float:right;\r
+        padding-left:10px;\r
+        padding-right:15px;\r
+        background-image:none;\r
+        background-repeat:no-repeat;\r
+        background-position:right;\r
+        color:#364D7C;\r
+        font-size: 8pt;\r
+}\r
+\r
+\r
+div.summary\r
+{\r
+       float: right;\r
+       font-size: 8pt;\r
+       padding-right: 5px;\r
+       width: 50%;\r
+       text-align: right;\r
+}       \r
+\r
+div.summary a\r
+{\r
+       white-space: nowrap;\r
+}\r
+\r
+div.ingroups\r
+{\r
+       font-size: 8pt;\r
+       width: 50%;\r
+       text-align: left;\r
+}\r
+\r
+div.ingroups a\r
+{\r
+       white-space: nowrap;\r
+}\r
+\r
+div.header\r
+{\r
+        background-image:url('nav_h.png');\r
+        background-repeat:repeat-x;\r
+       background-color: #F9FAFC;\r
+       margin:  0px;\r
+       border-bottom: 1px solid #C4CFE5;\r
+}\r
+\r
+div.headertitle\r
+{\r
+       padding: 5px 5px 5px 10px;\r
+}\r
+\r
+dl\r
+{\r
+        padding: 0 0 0 10px;\r
+}\r
+\r
+/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */\r
+dl.section\r
+{\r
+       margin-left: 0px;\r
+       padding-left: 0px;\r
+}\r
+\r
+dl.note\r
+{\r
+        margin-left:-7px;\r
+        padding-left: 3px;\r
+        border-left:4px solid;\r
+        border-color: #D0C000;\r
+}\r
+\r
+dl.warning, dl.attention\r
+{\r
+        margin-left:-7px;\r
+        padding-left: 3px;\r
+        border-left:4px solid;\r
+        border-color: #FF0000;\r
+}\r
+\r
+dl.pre, dl.post, dl.invariant\r
+{\r
+        margin-left:-7px;\r
+        padding-left: 3px;\r
+        border-left:4px solid;\r
+        border-color: #00D000;\r
+}\r
+\r
+dl.deprecated\r
+{\r
+        margin-left:-7px;\r
+        padding-left: 3px;\r
+        border-left:4px solid;\r
+        border-color: #505050;\r
+}\r
+\r
+dl.todo\r
+{\r
+        margin-left:-7px;\r
+        padding-left: 3px;\r
+        border-left:4px solid;\r
+        border-color: #00C0E0;\r
+}\r
+\r
+dl.test\r
+{\r
+        margin-left:-7px;\r
+        padding-left: 3px;\r
+        border-left:4px solid;\r
+        border-color: #3030E0;\r
+}\r
+\r
+dl.bug\r
+{\r
+        margin-left:-7px;\r
+        padding-left: 3px;\r
+        border-left:4px solid;\r
+        border-color: #C08050;\r
+}\r
+\r
+dl.section dd {\r
+       margin-bottom: 6px;\r
+}\r
+\r
+\r
+#projectlogo\r
+{\r
+       text-align: center;\r
+       vertical-align: bottom;\r
+       border-collapse: separate;\r
+}\r
\r
+#projectlogo img\r
+{ \r
+       border: 0px none;\r
+}\r
\r
+#projectalign\r
+{\r
+        vertical-align: middle;\r
+}\r
+\r
+#projectname\r
+{\r
+       font: 300% Tahoma, Arial,sans-serif;\r
+       margin: 0px;\r
+       padding: 2px 0px;\r
+}\r
+    \r
+#projectbrief\r
+{\r
+       font: 120% Tahoma, Arial,sans-serif;\r
+       margin: 0px;\r
+       padding: 0px;\r
+}\r
+\r
+#projectnumber\r
+{\r
+       font: 50% Tahoma, Arial,sans-serif;\r
+       margin: 0px;\r
+       padding: 0px;\r
+}\r
+\r
+#titlearea\r
+{\r
+       padding: 0px;\r
+       margin: 0px;\r
+       width: 100%;\r
+       border-bottom: 1px solid #5373B4;\r
+}\r
+\r
+.image\r
+{\r
+        text-align: center;\r
+}\r
+\r
+.dotgraph\r
+{\r
+        text-align: center;\r
+}\r
+\r
+.mscgraph\r
+{\r
+        text-align: center;\r
+}\r
+\r
+.diagraph\r
+{\r
+        text-align: center;\r
+}\r
+\r
+.caption\r
+{\r
+       font-weight: bold;\r
+}\r
+\r
+div.zoom\r
+{\r
+       border: 1px solid #90A5CE;\r
+}\r
+\r
+dl.citelist {\r
+        margin-bottom:50px;\r
+}\r
+\r
+dl.citelist dt {\r
+        color:#334975;\r
+        float:left;\r
+        font-weight:bold;\r
+        margin-right:10px;\r
+        padding:5px;\r
+}\r
+\r
+dl.citelist dd {\r
+        margin:2px 0;\r
+        padding:5px 0;\r
+}\r
+\r
+div.toc {\r
+        padding: 14px 25px;\r
+        background-color: #F4F6FA;\r
+        border: 1px solid #D8DFEE;\r
+        border-radius: 7px 7px 7px 7px;\r
+        float: right;\r
+        height: auto;\r
+        margin: 0 20px 10px 10px;\r
+        width: 200px;\r
+}\r
+\r
+div.toc li {\r
+        background: url("bdwn.png") no-repeat scroll 0 5px transparent;\r
+        font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif;\r
+        margin-top: 5px;\r
+        padding-left: 10px;\r
+        padding-top: 2px;\r
+}\r
+\r
+div.toc h3 {\r
+        font: bold 12px/1.2 Arial,FreeSans,sans-serif;\r
+       color: #4665A2;\r
+        border-bottom: 0 none;\r
+        margin: 0;\r
+}\r
+\r
+div.toc ul {\r
+        list-style: none outside none;\r
+        border: medium none;\r
+        padding: 0px;\r
+}       \r
+\r
+div.toc li.level1 {\r
+        margin-left: 0px;\r
+}\r
+\r
+div.toc li.level2 {\r
+        margin-left: 15px;\r
+}\r
+\r
+div.toc li.level3 {\r
+        margin-left: 30px;\r
+}\r
+\r
+div.toc li.level4 {\r
+        margin-left: 45px;\r
+}\r
+\r
+.inherit_header {\r
+        font-weight: bold;\r
+        color: gray;\r
+        cursor: pointer;\r
+       -webkit-touch-callout: none;\r
+       -webkit-user-select: none;\r
+       -khtml-user-select: none;\r
+       -moz-user-select: none;\r
+       -ms-user-select: none;\r
+       user-select: none;\r
+}\r
+\r
+.inherit_header td {\r
+        padding: 6px 0px 2px 5px;\r
+}\r
+\r
+.inherit {\r
+        display: none;\r
+}\r
+\r
+tr.heading h2 {\r
+        margin-top: 12px;\r
+        margin-bottom: 4px;\r
+}\r
+\r
+/* tooltip related style info */\r
+\r
+.ttc {\r
+        position: absolute;\r
+        display: none;\r
+}\r
+\r
+#powerTip {\r
+       cursor: default;\r
+       white-space: nowrap;\r
+       background-color: white;\r
+       border: 1px solid gray;\r
+       border-radius: 4px 4px 4px 4px;\r
+       box-shadow: 1px 1px 7px gray;\r
+       display: none;\r
+       font-size: smaller;\r
+       max-width: 80%;\r
+       opacity: 0.9;\r
+       padding: 1ex 1em 1em;\r
+       position: absolute;\r
+       z-index: 2147483647;\r
+}\r
+\r
+#powerTip div.ttdoc {\r
+        color: grey;\r
+       font-style: italic;\r
+}\r
+\r
+#powerTip div.ttname a {\r
+        font-weight: bold;\r
+}\r
+\r
+#powerTip div.ttname {\r
+        font-weight: bold;\r
+}\r
+\r
+#powerTip div.ttdeci {\r
+        color: #006318;\r
+}\r
+\r
+#powerTip div {\r
+        margin: 0px;\r
+        padding: 0px;\r
+        font: 12px/16px Roboto,sans-serif;\r
+}\r
+\r
+#powerTip:before, #powerTip:after {\r
+       content: "";\r
+       position: absolute;\r
+       margin: 0px;\r
+}\r
+\r
+#powerTip.n:after,  #powerTip.n:before,\r
+#powerTip.s:after,  #powerTip.s:before,\r
+#powerTip.w:after,  #powerTip.w:before,\r
+#powerTip.e:after,  #powerTip.e:before,\r
+#powerTip.ne:after, #powerTip.ne:before,\r
+#powerTip.se:after, #powerTip.se:before,\r
+#powerTip.nw:after, #powerTip.nw:before,\r
+#powerTip.sw:after, #powerTip.sw:before {\r
+       border: solid transparent;\r
+       content: " ";\r
+       height: 0;\r
+       width: 0;\r
+       position: absolute;\r
+}\r
+\r
+#powerTip.n:after,  #powerTip.s:after,\r
+#powerTip.w:after,  #powerTip.e:after,\r
+#powerTip.nw:after, #powerTip.ne:after,\r
+#powerTip.sw:after, #powerTip.se:after {\r
+       border-color: rgba(255, 255, 255, 0);\r
+}\r
+\r
+#powerTip.n:before,  #powerTip.s:before,\r
+#powerTip.w:before,  #powerTip.e:before,\r
+#powerTip.nw:before, #powerTip.ne:before,\r
+#powerTip.sw:before, #powerTip.se:before {\r
+       border-color: rgba(128, 128, 128, 0);\r
+}\r
+\r
+#powerTip.n:after,  #powerTip.n:before,\r
+#powerTip.ne:after, #powerTip.ne:before,\r
+#powerTip.nw:after, #powerTip.nw:before {\r
+       top: 100%;\r
+}\r
+\r
+#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after {\r
+       border-top-color: #ffffff;\r
+       border-width: 10px;\r
+       margin: 0px -10px;\r
+}\r
+#powerTip.n:before {\r
+       border-top-color: #808080;\r
+       border-width: 11px;\r
+       margin: 0px -11px;\r
+}\r
+#powerTip.n:after, #powerTip.n:before {\r
+       left: 50%;\r
+}\r
+\r
+#powerTip.nw:after, #powerTip.nw:before {\r
+       right: 14px;\r
+}\r
+\r
+#powerTip.ne:after, #powerTip.ne:before {\r
+       left: 14px;\r
+}\r
+\r
+#powerTip.s:after,  #powerTip.s:before,\r
+#powerTip.se:after, #powerTip.se:before,\r
+#powerTip.sw:after, #powerTip.sw:before {\r
+       bottom: 100%;\r
+}\r
+\r
+#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after {\r
+       border-bottom-color: #ffffff;\r
+       border-width: 10px;\r
+       margin: 0px -10px;\r
+}\r
+\r
+#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before {\r
+       border-bottom-color: #808080;\r
+       border-width: 11px;\r
+       margin: 0px -11px;\r
+}\r
+\r
+#powerTip.s:after, #powerTip.s:before {\r
+       left: 50%;\r
+}\r
+\r
+#powerTip.sw:after, #powerTip.sw:before {\r
+       right: 14px;\r
+}\r
+\r
+#powerTip.se:after, #powerTip.se:before {\r
+       left: 14px;\r
+}\r
+\r
+#powerTip.e:after, #powerTip.e:before {\r
+       left: 100%;\r
+}\r
+#powerTip.e:after {\r
+       border-left-color: #ffffff;\r
+       border-width: 10px;\r
+       top: 50%;\r
+       margin-top: -10px;\r
+}\r
+#powerTip.e:before {\r
+       border-left-color: #808080;\r
+       border-width: 11px;\r
+       top: 50%;\r
+       margin-top: -11px;\r
+}\r
+\r
+#powerTip.w:after, #powerTip.w:before {\r
+       right: 100%;\r
+}\r
+#powerTip.w:after {\r
+       border-right-color: #ffffff;\r
+       border-width: 10px;\r
+       top: 50%;\r
+       margin-top: -10px;\r
+}\r
+#powerTip.w:before {\r
+       border-right-color: #808080;\r
+       border-width: 11px;\r
+       top: 50%;\r
+       margin-top: -11px;\r
+}\r
+\r
+@media print\r
+{\r
+  #top { display: none; }\r
+  #side-nav { display: none; }\r
+  #nav-path { display: none; }\r
+  body { overflow:visible; }\r
+  h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }\r
+  .summary { display: none; }\r
+  .memitem { page-break-inside: avoid; }\r
+  #doc-content\r
+  {\r
+    margin-left:0 !important;\r
+    height:auto !important;\r
+    width:auto !important;\r
+    overflow:inherit;\r
+    display:inline;\r
+  }\r
+}\r
+\r
diff --git a/doc/html/deprecated.html b/doc/html/deprecated.html
new file mode 100644 (file)
index 0000000..21c995a
--- /dev/null
@@ -0,0 +1,116 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Deprecated List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('deprecated.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div><div class="header">
+  <div class="headertitle"><div class="title">Deprecated List </div></div>
+</div><!--header-->
+<div class="contents">
+<div class="textblock"><dl class="reflist">
+<dt>Member <a class="el" href="group__sub_group.html#ga38f1e41fc7619101fc4aa52014dd5428">natsSubscription_NoDeliveryDelay</a>  (natsSubscription *sub)</dt>
+<dd><a class="anchor" id="_deprecated000001"></a>No longer needed. Will be removed in the future.  </dd>
+<dt>Member <a class="el" href="group__sub_group.html#ga8a37b2d5290da3aecc05483d79e7e254">natsSubscription_QueuedMsgs</a>  (natsSubscription *sub, uint64_t *queuedMsgs)</dt>
+<dd><a class="anchor" id="_deprecated000002"></a>Use <a class="el" href="group__sub_group.html#gaca6262e2ef842caa701a9f233db72707" title="Returns the number of pending messages and bytes.">natsSubscription_GetPending</a> instead.</dd>
+</dl>
+</div></div><!-- contents -->
+</div><!-- PageDoc -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/dir_085924db4bed469054a9264cf96b0d5e.html b/doc/html/dir_085924db4bed469054a9264cf96b0d5e.html
new file mode 100644 (file)
index 0000000..d53c4cd
--- /dev/null
@@ -0,0 +1,118 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: adapters Directory Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('dir_085924db4bed469054a9264cf96b0d5e.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">adapters Directory Reference</div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="files" name="files"></a>
+Files</h2></td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libevent_8h.html">libevent.h</a> <a href="libevent_8h_source.html">[code]</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="libuv_8h.html">libuv.h</a> <a href="libuv_8h_source.html">[code]</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_085924db4bed469054a9264cf96b0d5e.html">adapters</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/dir_085924db4bed469054a9264cf96b0d5e.js b/doc/html/dir_085924db4bed469054a9264cf96b0d5e.js
new file mode 100644 (file)
index 0000000..1ab2d7a
--- /dev/null
@@ -0,0 +1,5 @@
+var dir_085924db4bed469054a9264cf96b0d5e =
+[
+    [ "libevent.h", "libevent_8h.html", "libevent_8h" ],
+    [ "libuv.h", "libuv_8h.html", "libuv_8h" ]
+];
\ No newline at end of file
diff --git a/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html
new file mode 100644 (file)
index 0000000..86a36be
--- /dev/null
@@ -0,0 +1,123 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: src Directory Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('dir_68267d1309a1af8e8297ef4c3efbcdba.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">src Directory Reference</div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="subdirs" name="subdirs"></a>
+Directories</h2></td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">directory &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dir_085924db4bed469054a9264cf96b0d5e.html">adapters</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="files" name="files"></a>
+Files</h2></td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nats_8h.html">nats.h</a> <a href="nats_8h_source.html">[code]</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="status_8h.html">status.h</a> <a href="status_8h_source.html">[code]</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.js b/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.js
new file mode 100644 (file)
index 0000000..43cc432
--- /dev/null
@@ -0,0 +1,6 @@
+var dir_68267d1309a1af8e8297ef4c3efbcdba =
+[
+    [ "adapters", "dir_085924db4bed469054a9264cf96b0d5e.html", "dir_085924db4bed469054a9264cf96b0d5e" ],
+    [ "nats.h", "nats_8h.html", "nats_8h" ],
+    [ "status.h", "status_8h.html", "status_8h" ]
+];
\ No newline at end of file
diff --git a/doc/html/doc.png b/doc/html/doc.png
new file mode 100644 (file)
index 0000000..17edabf
Binary files /dev/null and b/doc/html/doc.png differ
diff --git a/doc/html/docd.png b/doc/html/docd.png
new file mode 100644 (file)
index 0000000..d7c94fd
Binary files /dev/null and b/doc/html/docd.png differ
diff --git a/doc/html/doxygen.png b/doc/html/doxygen.png
new file mode 100644 (file)
index 0000000..3ff17d8
Binary files /dev/null and b/doc/html/doxygen.png differ
diff --git a/doc/html/doxygen.svg b/doc/html/doxygen.svg
new file mode 100644 (file)
index 0000000..d42dad5
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.1" viewBox="0 0 104 31" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <defs>
+  <linearGradient id="a">
+   <stop stop-color="#5373B4" offset="0"/>
+   <stop stop-color="#7C95C6" offset="1"/>
+  </linearGradient>
+  <linearGradient id="d" x1="31.474" x2="31.474" y1="24.821" y2="26.773" gradientUnits="userSpaceOnUse" xlink:href="#a"/>
+  <linearGradient id="c" x1="31.474" x2="31.474" y1="24.821" y2="26.773" gradientTransform="matrix(.6816 0 0 1.0248 72.391 -.91809)" gradientUnits="userSpaceOnUse" xlink:href="#a"/>
+  <linearGradient id="b" x1="56.295" x2="56.295" y1="24.622" y2="26.574" gradientUnits="userSpaceOnUse" xlink:href="#a"/>
+  <linearGradient id="e" x1="49.067" x2="48.956" y1="19.719" y2="9.5227" gradientTransform="matrix(.97968 0 0 1.0207 -.25579 -.25579)" gradientUnits="userSpaceOnUse">
+   <stop stop-color="#C0CCE3" offset="0"/>
+   <stop stop-color="#EEF1F7" offset="1"/>
+  </linearGradient>
+  <filter id="f" x="-.010676" y="-.045304" width="1.0214" height="1.0906" color-interpolation-filters="sRGB">
+   <feGaussianBlur stdDeviation="0.45293203"/>
+  </filter>
+ </defs>
+ <g>
+  <path transform="translate(-2.5759 -27.848)" d="m13.609 32.203v6.8633h-0.05078c-0.40533-0.66867-0.96254-1.1715-1.6719-1.5059-0.69244-0.35193-1.4282-0.52734-2.2051-0.52734-0.96267 0-1.807 0.2027-2.5332 0.60742-0.72622 0.38713-1.3344 0.90556-1.8242 1.5566-0.47289 0.65108-0.83456 1.4092-1.0879 2.2715-0.23644 0.84464-0.35547 1.7236-0.35547 2.6387 0 0.95022 0.11902 1.8643 0.35547 2.7441 0.25333 0.87983 0.615 1.6633 1.0879 2.3496 0.48978 0.66867 1.1065 1.2066 1.8496 1.6113 0.74311 0.38713 1.6044 0.58008 2.584 0.58008 0.86133 0 1.6311-0.15787 2.3066-0.47461 0.69244-0.33434 1.2497-0.87227 1.6719-1.6113h0.05078v1.7422h3.4199v-18.846zm12.875 4.8301c-1.0302 0-1.9596 0.17541-2.7871 0.52734-0.82756 0.33434-1.5358 0.81965-2.127 1.4531-0.59111 0.61588-1.0483 1.3721-1.3691 2.2695-0.32089 0.87983-0.48047 1.866-0.48047 2.957s0.15958 2.0752 0.48047 2.9551c0.32089 0.87983 0.77803 1.6361 1.3691 2.2695 0.59111 0.61588 1.2994 1.0914 2.127 1.4258 0.82756 0.33434 1.7569 0.50195 2.7871 0.50195 1.0302 0 1.9596-0.16762 2.7871-0.50195 0.84444-0.33434 1.5612-0.8099 2.1523-1.4258 0.59111-0.63348 1.0483-1.3897 1.3691-2.2695 0.32089-0.87983 0.48047-1.8641 0.48047-2.9551s-0.15958-2.0772-0.48047-2.957c-0.32089-0.89743-0.77803-1.6536-1.3691-2.2695-0.59111-0.63348-1.3079-1.1188-2.1523-1.4531-0.82756-0.35193-1.7569-0.52734-2.7871-0.52734zm41.715 0c-0.912 0-1.7223 0.18516-2.4316 0.55469-0.69244 0.36953-1.2752 0.87043-1.748 1.5039-0.47289 0.61588-0.83651 1.337-1.0898 2.1641-0.23645 0.80944-0.35352 1.6553-0.35352 2.5352 0 0.93262 0.10007 1.8214 0.30273 2.666 0.21956 0.82704 0.55767 1.556 1.0137 2.1895 0.456 0.61588 1.0387 1.109 1.748 1.4785 0.70933 0.35193 1.5536 0.5293 2.5332 0.5293 0.79378 0 1.5446-0.16762 2.2539-0.50195 0.72622-0.35193 1.2834-0.88986 1.6719-1.6113h0.05078v1.7949c0.01689 0.96782-0.21071 1.7689-0.68359 2.4023-0.456 0.63348-1.1898 0.95117-2.2031 0.95117-0.64178 0-1.2075-0.14228-1.6973-0.42383-0.48978-0.26395-0.81939-0.74731-0.98828-1.4512h-3.5723c0.05067 0.77425 0.25276 1.435 0.60742 1.9805 0.37156 0.56309 0.8287 1.0192 1.3691 1.3711 0.55733 0.35193 1.1656 0.60726 1.8242 0.76562 0.67556 0.17597 1.3328 0.26562 1.9746 0.26562 1.5031 0 2.7025-0.21245 3.5977-0.63477 0.89511-0.42232 1.5798-0.94076 2.0527-1.5566 0.47289-0.59829 0.777-1.2493 0.91211-1.9531 0.152-0.70386 0.22656-1.3295 0.22656-1.875v-12.775h-3.4199v1.8223h-0.05078c-0.43911-0.79185-0.98782-1.3551-1.6465-1.6895-0.64178-0.33434-1.3926-0.50195-2.2539-0.50195zm16.523 0c-0.99644 0-1.9088 0.18516-2.7363 0.55469-0.81067 0.36953-1.5124 0.88018-2.1035 1.5312-0.59111 0.63348-1.0463 1.3897-1.3672 2.2695s-0.48047 1.831-0.48047 2.8516c0 1.0558 0.15108 2.0225 0.45508 2.9023 0.32089 0.87983 0.76758 1.6361 1.3418 2.2695 0.57422 0.63348 1.276 1.1266 2.1035 1.4785 0.82756 0.33434 1.7569 0.50195 2.7871 0.50195 1.4862 0 2.7517-0.35277 3.7988-1.0566 1.0471-0.70387 1.8254-1.8733 2.332-3.5098h-3.168c-0.11822 0.42232-0.43934 0.82772-0.96289 1.2148-0.52355 0.36953-1.1468 0.55274-1.873 0.55273-1.0133 0-1.7916-0.27286-2.332-0.81836-0.54044-0.5455-0.83605-1.4245-0.88672-2.6387h9.4492c0.06756-1.0558-0.01551-2.0673-0.25195-3.0352-0.23644-0.96782-0.62557-1.8293-1.166-2.5859-0.52356-0.75666-1.1998-1.355-2.0273-1.7949-0.82756-0.45751-1.7974-0.6875-2.9121-0.6875zm16.189 0c-0.76 0-1.5023 0.18516-2.2285 0.55469-0.72622 0.35193-1.3174 0.92299-1.7734 1.7148h-0.07617v-1.9004h-3.4199v13.646h3.5977v-7.1523c0-1.3901 0.21909-2.3841 0.6582-2.9824 0.43911-0.61588 1.1494-0.92383 2.1289-0.92383 0.86133 0 1.4611 0.28066 1.7988 0.84375 0.33777 0.5455 0.50586 1.3816 0.50586 2.5078v7.707h3.5976v-8.3926c0-0.84464-0.0765-1.6106-0.22851-2.2969-0.13511-0.70387-0.37971-1.2925-0.73438-1.7676-0.35466-0.49271-0.84386-0.87277-1.4688-1.1367-0.608-0.28155-1.3948-0.42188-2.3574-0.42188zm-66.063 0.36914 4.3066 6.4668-4.7129 7.1797h4.0293l2.7363-4.3027 2.7344 4.3027h4.1055l-4.8398-7.2578 4.3066-6.3887h-3.9766l-2.2793 3.5645-2.3066-3.5645zm13.275 0 4.584 12.803c0.10133 0.26395 0.15234 0.54461 0.15234 0.84375 0 0.40472-0.11707 0.77504-0.35352 1.1094-0.21956 0.33434-0.56617 0.52729-1.0391 0.58008-0.35467 0.0176-0.70979 0.0098-1.0645-0.02539-0.35467-0.03519-0.70128-0.07028-1.0391-0.10547v3.0879c0.37156 0.03519 0.73518 0.06051 1.0898 0.07813 0.37156 0.03519 0.74368 0.05273 1.1152 0.05273 1.2329 0 2.1943-0.23778 2.8867-0.71289 0.69244-0.47511 1.2326-1.2664 1.6211-2.375l5.4727-15.336h-3.7246l-2.8613 9.3438h-0.05078l-2.9648-9.3438zm-37.48 2.4551c0.59111 0 1.0823 0.12279 1.4707 0.36914 0.38844 0.24635 0.6991 0.57184 0.93555 0.97656 0.25333 0.38713 0.43187 0.84515 0.5332 1.373 0.10133 0.5103 0.15234 1.0482 0.15234 1.6113 0 0.56309-0.05101 1.1069-0.15234 1.6348-0.10133 0.5279-0.27137 1.0035-0.50781 1.4258-0.23644 0.40472-0.5556 0.73021-0.96094 0.97656-0.38844 0.24635-0.87959 0.36914-1.4707 0.36914-0.55733 0-1.038-0.12279-1.4434-0.36914-0.38844-0.26395-0.71806-0.59723-0.98828-1.002-0.25333-0.42232-0.43842-0.89788-0.55664-1.4258s-0.17773-1.0561-0.17773-1.584c-1e-7 -0.56309 0.05101-1.0991 0.15234-1.6094 0.11822-0.5279 0.29481-0.99567 0.53125-1.4004 0.25333-0.40472 0.58295-0.73021 0.98828-0.97656 0.40533-0.24635 0.90303-0.36914 1.4941-0.36914zm15.84 0c0.608 0 1.1142 0.13253 1.5195 0.39648 0.42222 0.24635 0.75184 0.57184 0.98828 0.97656 0.25333 0.40472 0.42992 0.87054 0.53125 1.3984 0.10133 0.5279 0.15234 1.0658 0.15234 1.6113 0 0.5455-0.05101 1.0815-0.15234 1.6094-0.10134 0.5103-0.27792 0.97612-0.53125 1.3984-0.23644 0.40472-0.56606 0.73021-0.98828 0.97656-0.40533 0.24635-0.91153 0.36914-1.5195 0.36914-0.608 0-1.1142-0.12279-1.5195-0.36914s-0.73495-0.57184-0.98828-0.97656c-0.23644-0.42232-0.40648-0.88814-0.50781-1.3984-0.10133-0.5279-0.15234-1.0639-0.15234-1.6094 0-0.5455 0.05101-1.0834 0.15234-1.6113 0.10133-0.5279 0.27137-0.99371 0.50781-1.3984 0.25333-0.40472 0.58295-0.73021 0.98828-0.97656 0.40533-0.26395 0.91153-0.39648 1.5195-0.39648zm42.602 0c0.59111 0 1.0803 0.11499 1.4688 0.34375 0.38844 0.22876 0.70105 0.5367 0.9375 0.92383 0.23644 0.38713 0.40648 0.8354 0.50781 1.3457 0.10133 0.49271 0.15039 1.0209 0.15039 1.584 0 0.4927-0.06606 0.96827-0.20117 1.4258-0.11822 0.43992-0.30526 0.83557-0.55859 1.1875-0.25333 0.35193-0.57445 0.63259-0.96289 0.84375-0.38844 0.21116-0.83513 0.31836-1.3418 0.31836-0.55733 0-1.021-0.12474-1.3926-0.37109-0.37156-0.24635-0.67566-0.56209-0.91211-0.94922-0.21956-0.38713-0.38109-0.81786-0.48242-1.293-0.08444-0.49271-0.12695-0.98581-0.12695-1.4785 0-0.5103 0.05101-0.99366 0.15234-1.4512 0.11822-0.47511 0.29676-0.89025 0.5332-1.2422 0.25333-0.36953 0.55744-0.65993 0.91211-0.87109 0.37156-0.21116 0.80974-0.31641 1.3164-0.31641zm15.535 0c0.87822 0 1.529 0.24753 1.9512 0.74023 0.43911 0.49271 0.74322 1.2138 0.91211 2.1641h-5.8535c0.01689-0.26395 0.0679-0.5641 0.15234-0.89844 0.10133-0.33434 0.26287-0.65008 0.48242-0.94922 0.23644-0.29914 0.54055-0.54667 0.91211-0.74023 0.38845-0.21116 0.86914-0.31641 1.4434-0.31641z" filter="url(#f)" opacity=".3" stroke="#969696" xlink:href="#path141"/>
+  <path d="m0.97202 24.161 43.605-0.0019 0.0508 3.3061-43.6 0.04174z" fill="url(#d)" stroke="#000" stroke-width=".5"/>
+  <path d="m10.283 3.5547v6.8633h-0.05078c-0.40533-0.66867-0.96254-1.1715-1.6719-1.5059-0.69244-0.35193-1.4282-0.52734-2.2051-0.52734-0.96267 0-1.807 0.2027-2.5332 0.60742-0.72622 0.38713-1.3344 0.90556-1.8242 1.5566-0.47289 0.65108-0.83456 1.4092-1.0879 2.2715-0.23644 0.84464-0.35547 1.7236-0.35547 2.6387 0 0.95022 0.11902 1.8643 0.35547 2.7441 0.25333 0.87983 0.615 1.6633 1.0879 2.3496 0.48978 0.66867 1.1065 1.2066 1.8496 1.6113 0.74311 0.38713 1.6044 0.58008 2.584 0.58008 0.86133 0 1.6311-0.15787 2.3066-0.47461 0.69244-0.33434 1.2497-0.87227 1.6719-1.6113h0.05078v1.7422h3.4199v-18.846zm12.875 4.8301c-1.0302 0-1.9596 0.17541-2.7871 0.52734-0.82756 0.33434-1.5358 0.81965-2.127 1.4531-0.59111 0.61588-1.0483 1.3721-1.3691 2.2695-0.32089 0.87983-0.48047 1.866-0.48047 2.957s0.15958 2.0752 0.48047 2.9551c0.32089 0.87983 0.77803 1.6361 1.3691 2.2695 0.59111 0.61588 1.2994 1.0914 2.127 1.4258 0.82756 0.33434 1.7569 0.50195 2.7871 0.50195 1.0302 0 1.9596-0.16762 2.7871-0.50195 0.84444-0.33434 1.5612-0.8099 2.1523-1.4258 0.59111-0.63348 1.0483-1.3897 1.3691-2.2695 0.32089-0.87983 0.48047-1.8641 0.48047-2.9551s-0.15958-2.0772-0.48047-2.957c-0.32089-0.89743-0.77803-1.6536-1.3691-2.2695-0.59111-0.63348-1.3079-1.1188-2.1523-1.4531-0.82756-0.35193-1.7569-0.52734-2.7871-0.52734zm41.715 0c-0.912 0-1.7223 0.18516-2.4316 0.55469-0.69244 0.36953-1.2752 0.87043-1.748 1.5039-0.47289 0.61588-0.83651 1.337-1.0898 2.1641-0.23644 0.80944-0.35352 1.6553-0.35352 2.5352 0 0.93262 0.10007 1.8214 0.30273 2.666 0.21956 0.82704 0.55767 1.556 1.0137 2.1895 0.456 0.61588 1.0387 1.109 1.748 1.4785 0.70933 0.35193 1.5536 0.5293 2.5332 0.5293 0.79378 0 1.5446-0.16762 2.2539-0.50195 0.72622-0.35193 1.2834-0.88986 1.6719-1.6113h0.05078v1.7949c0.01689 0.96782-0.21071 1.7689-0.68359 2.4023-0.456 0.63348-1.1898 0.95117-2.2031 0.95117-0.64178 0-1.2075-0.14228-1.6973-0.42383-0.48978-0.26395-0.81939-0.74731-0.98828-1.4512h-3.5723c0.05067 0.77425 0.25276 1.435 0.60742 1.9805 0.37156 0.56309 0.8287 1.0192 1.3691 1.3711 0.55733 0.35193 1.1656 0.60726 1.8242 0.76562 0.67556 0.17597 1.3328 0.26562 1.9746 0.26562 1.5031 0 2.7025-0.21245 3.5977-0.63477 0.89511-0.42232 1.5798-0.94076 2.0527-1.5566 0.47289-0.59829 0.777-1.2493 0.91211-1.9531 0.152-0.70386 0.22656-1.3295 0.22656-1.875v-12.775h-3.4199v1.8223h-0.05078c-0.43911-0.79185-0.98782-1.3551-1.6465-1.6895-0.64178-0.33434-1.3926-0.50195-2.2539-0.50195zm16.523 0c-0.99644 0-1.9088 0.18516-2.7363 0.55469-0.81067 0.36953-1.5124 0.88017-2.1035 1.5312-0.59111 0.63348-1.0463 1.3897-1.3672 2.2695s-0.48047 1.831-0.48047 2.8516c0 1.0558 0.15108 2.0225 0.45508 2.9023 0.32089 0.87983 0.76758 1.6361 1.3418 2.2695 0.57422 0.63348 1.276 1.1266 2.1035 1.4785 0.82756 0.33434 1.7569 0.50195 2.7871 0.50195 1.4862 0 2.7517-0.35278 3.7988-1.0566 1.0471-0.70386 1.8254-1.8733 2.332-3.5098h-3.168c-0.11822 0.42232-0.43934 0.82772-0.96289 1.2148-0.52355 0.36953-1.1468 0.55274-1.873 0.55273-1.0133 0-1.7916-0.27286-2.332-0.81836-0.54044-0.5455-0.83605-1.4245-0.88672-2.6387h9.4492c0.06756-1.0558-0.01551-2.0673-0.25195-3.0352-0.23644-0.96782-0.62557-1.8293-1.166-2.5859-0.52356-0.75666-1.1998-1.355-2.0273-1.7949-0.82756-0.45751-1.7974-0.6875-2.9121-0.6875zm16.189 0c-0.76 0-1.5023 0.18516-2.2285 0.55469-0.72622 0.35193-1.3174 0.923-1.7734 1.7148h-0.07617v-1.9004h-3.4199v13.646h3.5977v-7.1523c0-1.3901 0.21909-2.3841 0.6582-2.9824 0.43911-0.61588 1.1494-0.92383 2.1289-0.92383 0.86133 0 1.461 0.28066 1.7988 0.84375 0.33778 0.5455 0.50586 1.3816 0.50586 2.5078v7.707h3.5977v-8.3926c0-0.84464-0.0765-1.6106-0.22852-2.2969-0.13511-0.70387-0.3797-1.2925-0.73437-1.7676-0.35466-0.49271-0.84386-0.87277-1.4688-1.1367-0.608-0.28155-1.3948-0.42188-2.3574-0.42188zm-66.062 0.36914 4.3066 6.4668-4.7129 7.1797h4.0293l2.7363-4.3027 2.7344 4.3027h4.1055l-4.8398-7.2578 4.3066-6.3887h-3.9766l-2.2793 3.5645-2.3066-3.5645zm13.275 0 4.584 12.803c0.10133 0.26395 0.15234 0.54461 0.15234 0.84375 0 0.40472-0.11707 0.77504-0.35352 1.1094-0.21956 0.33434-0.56617 0.52729-1.0391 0.58008-0.35467 0.0176-0.70979 0.0098-1.0645-0.02539-0.35467-0.03519-0.70128-0.07027-1.0391-0.10547v3.0879c0.37156 0.03519 0.73518 0.06052 1.0898 0.07813 0.37156 0.03519 0.74368 0.05273 1.1152 0.05273 1.2329 0 2.1943-0.23778 2.8867-0.71289 0.69244-0.47511 1.2326-1.2664 1.6211-2.375l5.4727-15.336h-3.7246l-2.8613 9.3437h-0.05078l-2.9648-9.3437zm-37.48 2.4551c0.59111 0 1.0823 0.12279 1.4707 0.36914s0.6991 0.57184 0.93555 0.97656c0.25333 0.38713 0.43187 0.84515 0.5332 1.373 0.10133 0.5103 0.15234 1.0482 0.15234 1.6113 0 0.56309-0.05101 1.1069-0.15234 1.6348-0.10133 0.5279-0.27137 1.0035-0.50781 1.4258-0.23644 0.40472-0.5556 0.73021-0.96094 0.97656-0.38844 0.24635-0.87959 0.36914-1.4707 0.36914-0.55733 0-1.038-0.12279-1.4434-0.36914-0.38844-0.26395-0.71806-0.59723-0.98828-1.002-0.25333-0.42232-0.43842-0.89788-0.55664-1.4258s-0.17773-1.0561-0.17773-1.584c-1e-7 -0.56309 0.05101-1.0991 0.15234-1.6094 0.11822-0.5279 0.29481-0.99567 0.53125-1.4004 0.25333-0.40472 0.58295-0.73021 0.98828-0.97656 0.40533-0.24635 0.90303-0.36914 1.4941-0.36914zm15.84 0c0.608 0 1.1142 0.13254 1.5195 0.39648 0.42222 0.24635 0.75184 0.57184 0.98828 0.97656 0.25333 0.40472 0.42992 0.87054 0.53125 1.3984 0.10133 0.5279 0.15234 1.0658 0.15234 1.6113 0 0.5455-0.05101 1.0815-0.15234 1.6094-0.10133 0.5103-0.27792 0.97612-0.53125 1.3984-0.23644 0.40472-0.56606 0.73021-0.98828 0.97656-0.40533 0.24635-0.91153 0.36914-1.5195 0.36914-0.608 0-1.1142-0.12279-1.5195-0.36914s-0.73495-0.57184-0.98828-0.97656c-0.23644-0.42232-0.40648-0.88813-0.50781-1.3984-0.10133-0.5279-0.15234-1.0639-0.15234-1.6094 0-0.5455 0.05101-1.0834 0.15234-1.6113 0.10133-0.5279 0.27137-0.99371 0.50781-1.3984 0.25333-0.40472 0.58295-0.73021 0.98828-0.97656 0.40533-0.26395 0.91153-0.39648 1.5195-0.39648zm42.602 0c0.59111 0 1.0803 0.11499 1.4688 0.34375 0.38844 0.22876 0.70106 0.5367 0.9375 0.92383 0.23644 0.38713 0.40648 0.8354 0.50781 1.3457 0.10133 0.49271 0.15039 1.0209 0.15039 1.584 0 0.49271-0.06606 0.96827-0.20117 1.4258-0.11822 0.43992-0.30526 0.83557-0.55859 1.1875-0.25333 0.35193-0.57445 0.63259-0.96289 0.84375-0.38844 0.21116-0.83513 0.31836-1.3418 0.31836-0.55733 0-1.021-0.12474-1.3926-0.37109-0.37156-0.24635-0.67566-0.56209-0.91211-0.94922-0.21956-0.38713-0.38109-0.81786-0.48242-1.293-0.08444-0.49271-0.12695-0.98581-0.12695-1.4785 0-0.5103 0.05101-0.99366 0.15234-1.4512 0.11822-0.47511 0.29676-0.89026 0.5332-1.2422 0.25333-0.36953 0.55744-0.65993 0.91211-0.87109 0.37156-0.21116 0.80974-0.31641 1.3164-0.31641zm15.535 0c0.87822 0 1.529 0.24753 1.9512 0.74024 0.43911 0.49271 0.74322 1.2138 0.91211 2.1641h-5.8535c0.01689-0.26395 0.0679-0.5641 0.15234-0.89844 0.10133-0.33434 0.26287-0.65008 0.48242-0.94922 0.23644-0.29914 0.54055-0.54667 0.91211-0.74023 0.38845-0.21116 0.86914-0.31641 1.4434-0.31641z" fill="url(#e)" stroke="#4665A2" stroke-width=".7"/>
+  <path d="m52.988 27.291c0.99602-1.0359 1.3944-1.8725 1.7928-3.1076l3.8247-0.03984c0.3113 1.6096 0.82413 2.5137 1.6335 3.1474z" fill="url(#b)" stroke="#000" stroke-width=".5"/>
+  <path d="m73.89 24.04 28.885-0.2011-0.12476 3.3879-31.033 0.16229c1.2621-1.0234 1.9665-2.2859 2.2724-3.3491z" fill="url(#c)" stroke="#000" stroke-width=".41788"/>
+ </g>
+</svg>
diff --git a/doc/html/dynsections.js b/doc/html/dynsections.js
new file mode 100644 (file)
index 0000000..f579fbf
--- /dev/null
@@ -0,0 +1,123 @@
+/*
+ @licstart  The following is the entire license notice for the JavaScript code in this file.
+
+ The MIT License (MIT)
+
+ Copyright (C) 1997-2020 by Dimitri van Heesch
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+ and associated documentation files (the "Software"), to deal in the Software without restriction,
+ including without limitation the rights to use, copy, modify, merge, publish, distribute,
+ sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all copies or
+ substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+ BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ @licend  The above is the entire license notice for the JavaScript code in this file
+ */
+function toggleVisibility(linkObj)
+{
+ var base = $(linkObj).attr('id');
+ var summary = $('#'+base+'-summary');
+ var content = $('#'+base+'-content');
+ var trigger = $('#'+base+'-trigger');
+ var src=$(trigger).attr('src');
+ if (content.is(':visible')===true) {
+   content.hide();
+   summary.show();
+   $(linkObj).addClass('closed').removeClass('opened');
+   $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png');
+ } else {
+   content.show();
+   summary.hide();
+   $(linkObj).removeClass('closed').addClass('opened');
+   $(trigger).attr('src',src.substring(0,src.length-10)+'open.png');
+ }
+ return false;
+}
+
+function updateStripes()
+{
+  $('table.directory tr').
+       removeClass('even').filter(':visible:even').addClass('even');
+  $('table.directory tr').
+       removeClass('odd').filter(':visible:odd').addClass('odd');
+}
+
+function toggleLevel(level)
+{
+  $('table.directory tr').each(function() {
+    var l = this.id.split('_').length-1;
+    var i = $('#img'+this.id.substring(3));
+    var a = $('#arr'+this.id.substring(3));
+    if (l<level+1) {
+      i.removeClass('iconfopen iconfclosed').addClass('iconfopen');
+      a.html('&#9660;');
+      $(this).show();
+    } else if (l==level+1) {
+      i.removeClass('iconfclosed iconfopen').addClass('iconfclosed');
+      a.html('&#9658;');
+      $(this).show();
+    } else {
+      $(this).hide();
+    }
+  });
+  updateStripes();
+}
+
+function toggleFolder(id)
+{
+  // the clicked row
+  var currentRow = $('#row_'+id);
+
+  // all rows after the clicked row
+  var rows = currentRow.nextAll("tr");
+
+  var re = new RegExp('^row_'+id+'\\d+_$', "i"); //only one sub
+
+  // only match elements AFTER this one (can't hide elements before)
+  var childRows = rows.filter(function() { return this.id.match(re); });
+
+  // first row is visible we are HIDING
+  if (childRows.filter(':first').is(':visible')===true) {
+    // replace down arrow by right arrow for current row
+    var currentRowSpans = currentRow.find("span");
+    currentRowSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
+    currentRowSpans.filter(".arrow").html('&#9658;');
+    rows.filter("[id^=row_"+id+"]").hide(); // hide all children
+  } else { // we are SHOWING
+    // replace right arrow by down arrow for current row
+    var currentRowSpans = currentRow.find("span");
+    currentRowSpans.filter(".iconfclosed").removeClass("iconfclosed").addClass("iconfopen");
+    currentRowSpans.filter(".arrow").html('&#9660;');
+    // replace down arrows by right arrows for child rows
+    var childRowsSpans = childRows.find("span");
+    childRowsSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
+    childRowsSpans.filter(".arrow").html('&#9658;');
+    childRows.show(); //show all children
+  }
+  updateStripes();
+}
+
+
+function toggleInherit(id)
+{
+  var rows = $('tr.inherit.'+id);
+  var img = $('tr.inherit_header.'+id+' img');
+  var src = $(img).attr('src');
+  if (rows.filter(':first').is(':visible')===true) {
+    rows.css('display','none');
+    $(img).attr('src',src.substring(0,src.length-8)+'closed.png');
+  } else {
+    rows.css('display','table-row'); // using show() causes jump in firefox
+    $(img).attr('src',src.substring(0,src.length-10)+'open.png');
+  }
+}
+/* @license-end */
diff --git a/doc/html/files.html b/doc/html/files.html
new file mode 100644 (file)
index 0000000..603b731
--- /dev/null
@@ -0,0 +1,119 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: File List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('files.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">File List</div></div>
+</div><!--header-->
+<div class="contents">
+<div class="textblock">Here is a list of all files with brief descriptions:</div><div class="directory">
+<div class="levels">[detail level <span onclick="javascript:toggleLevel(1);">1</span><span onclick="javascript:toggleLevel(2);">2</span><span onclick="javascript:toggleLevel(3);">3</span>]</div><table class="directory">
+<tr id="row_0_" class="even"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_0_" class="arrow" onclick="toggleFolder('0_')">&#9660;</span><span id="img_0_" class="iconfopen" onclick="toggleFolder('0_')">&#160;</span><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html" target="_self">src</a></td><td class="desc"></td></tr>
+<tr id="row_0_0_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_0_0_" class="arrow" onclick="toggleFolder('0_0_')">&#9660;</span><span id="img_0_0_" class="iconfopen" onclick="toggleFolder('0_0_')">&#160;</span><a class="el" href="dir_085924db4bed469054a9264cf96b0d5e.html" target="_self">adapters</a></td><td class="desc"></td></tr>
+<tr id="row_0_0_0_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><a href="libevent_8h_source.html"><span class="icondoc"></span></a><a class="el" href="libevent_8h.html" target="_self">libevent.h</a></td><td class="desc"></td></tr>
+<tr id="row_0_0_1_" class="odd"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><a href="libuv_8h_source.html"><span class="icondoc"></span></a><a class="el" href="libuv_8h.html" target="_self">libuv.h</a></td><td class="desc"></td></tr>
+<tr id="row_0_1_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="nats_8h_source.html"><span class="icondoc"></span></a><a class="el" href="nats_8h.html" target="_self">nats.h</a></td><td class="desc"></td></tr>
+<tr id="row_0_2_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a href="status_8h_source.html"><span class="icondoc"></span></a><a class="el" href="status_8h.html" target="_self">status.h</a></td><td class="desc"></td></tr>
+</table>
+</div><!-- directory -->
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/files.js b/doc/html/files.js
new file mode 100644 (file)
index 0000000..7b2f68f
--- /dev/null
@@ -0,0 +1,7 @@
+var files =
+[
+    [ "libevent.h", "libevent_8h.html", "libevent_8h" ],
+    [ "libuv.h", "libuv_8h.html", "libuv_8h" ],
+    [ "nats.h", "nats_8h.html", "nats_8h" ],
+    [ "status.h", "status_8h.html", "status_8h" ]
+];
\ No newline at end of file
diff --git a/doc/html/files_dup.js b/doc/html/files_dup.js
new file mode 100644 (file)
index 0000000..c3b39c4
--- /dev/null
@@ -0,0 +1,4 @@
+var files_dup =
+[
+    [ "src", "dir_68267d1309a1af8e8297ef4c3efbcdba.html", "dir_68267d1309a1af8e8297ef4c3efbcdba" ]
+];
\ No newline at end of file
diff --git a/doc/html/folderclosed.png b/doc/html/folderclosed.png
new file mode 100644 (file)
index 0000000..bb8ab35
Binary files /dev/null and b/doc/html/folderclosed.png differ
diff --git a/doc/html/folderopen.png b/doc/html/folderopen.png
new file mode 100644 (file)
index 0000000..d6c7f67
Binary files /dev/null and b/doc/html/folderopen.png differ
diff --git a/doc/html/functions.html b/doc/html/functions.html
new file mode 100644 (file)
index 0000000..3c2890e
--- /dev/null
@@ -0,0 +1,120 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+<div class="textblock">Here is a list of all class members with links to the classes they belong to:</div>
+
+<h3><a id="index_a" name="index_a"></a>- a -</h3><ul>
+<li>AckFloor&#160;:&#160;<a class="el" href="structjs_consumer_info.html#ab69c36ae092df9b0663b675a5abbab55">jsConsumerInfo</a></li>
+<li>AckHandler&#160;:&#160;<a class="el" href="structjs_options_1_1js_options_publish_async.html#a508140119f40a2c056d4ee8c0cd55df9">jsOptions::jsOptionsPublishAsync</a></li>
+<li>AckHandlerClosure&#160;:&#160;<a class="el" href="structjs_options_1_1js_options_publish_async.html#a60c95f10797c04ea2e625759c6936ec9">jsOptions::jsOptionsPublishAsync</a></li>
+<li>AckPolicy&#160;:&#160;<a class="el" href="structjs_consumer_config.html#a8a311af614dfae1b0f4e4af7db467aab">jsConsumerConfig</a></li>
+<li>AckWait&#160;:&#160;<a class="el" href="structjs_consumer_config.html#a651a94b9b78668dde830dc7869610e67">jsConsumerConfig</a></li>
+<li>Active&#160;:&#160;<a class="el" href="structjs_peer_info.html#a8441d023932c388953197f7ea39402fe">jsPeerInfo</a>, <a class="el" href="structjs_stream_source_info.html#a28b8cc0a9d487672955d3a3fa03de247">jsStreamSourceInfo</a></li>
+<li>AllowDirect&#160;:&#160;<a class="el" href="structjs_stream_config.html#a28630f6f07ca02553c5d5718d7c29721">jsStreamConfig</a></li>
+<li>AllowRollup&#160;:&#160;<a class="el" href="structjs_stream_config.html#aba71cdb342181f52bb9f7ff5f770a1fa">jsStreamConfig</a></li>
+<li>API&#160;:&#160;<a class="el" href="structjs_account_info.html#a94ab71c69b7883c2731ae8741ddc1e94">jsAccountInfo</a></li>
+<li>APIPrefix&#160;:&#160;<a class="el" href="structjs_external_stream.html#a2eaf2c0c3e77c269f44e254af8b24e96">jsExternalStream</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_b.html b/doc/html/functions_b.html
new file mode 100644 (file)
index 0000000..4620338
--- /dev/null
@@ -0,0 +1,115 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_b.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+<div class="textblock">Here is a list of all class members with links to the classes they belong to:</div>
+
+<h3><a id="index_b" name="index_b"></a>- b -</h3><ul>
+<li>BackOff&#160;:&#160;<a class="el" href="structjs_consumer_config.html#aa2d0aff64a2c46122d0f0fe89e8ae011">jsConsumerConfig</a></li>
+<li>BackOffLen&#160;:&#160;<a class="el" href="structjs_consumer_config.html#ad2f6ca3f2d0f977aedb8687c462c1cfc">jsConsumerConfig</a></li>
+<li>Batch&#160;:&#160;<a class="el" href="structjs_fetch_request.html#a84f06b60e25decb2674996f0cb315f63">jsFetchRequest</a></li>
+<li>Bucket&#160;:&#160;<a class="el" href="structkv_config.html#a11b636da727c17566d5ab1274f69fee5">kvConfig</a></li>
+<li>Bytes&#160;:&#160;<a class="el" href="structjs_lost_stream_data.html#a841fcadca3f66e9170a51080dc1acf30">jsLostStreamData</a>, <a class="el" href="structjs_stream_state.html#ae603fa6ecfb63c93b61272b7d1b8fb4d">jsStreamState</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_c.html b/doc/html/functions_c.html
new file mode 100644 (file)
index 0000000..1ac5bcf
--- /dev/null
@@ -0,0 +1,119 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_c.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+<div class="textblock">Here is a list of all class members with links to the classes they belong to:</div>
+
+<h3><a id="index_c" name="index_c"></a>- c -</h3><ul>
+<li>Cluster&#160;:&#160;<a class="el" href="structjs_consumer_info.html#a6f4401563a9fd102226d82cdc6136e32">jsConsumerInfo</a>, <a class="el" href="structjs_placement.html#ad8c83588d57f0e30959cfb6f3d5d61bf">jsPlacement</a>, <a class="el" href="structjs_stream_info.html#a8d10d6fdc3f713ac726c72cae06a209a">jsStreamInfo</a></li>
+<li>Config&#160;:&#160;<a class="el" href="structjs_consumer_info.html#a2f63940ca1f024ad3840418c2f6a1ae1">jsConsumerInfo</a>, <a class="el" href="structjs_stream_info.html#adcc402d28e0ee443419e9b549da233c6">jsStreamInfo</a>, <a class="el" href="structjs_sub_options.html#acab25d71a2efe26bb3b084071435c2b5">jsSubOptions</a></li>
+<li>Consumer&#160;:&#160;<a class="el" href="structjs_msg_meta_data.html#a6dcc2a442984b0ca070b3d8077192127">jsMsgMetaData</a>, <a class="el" href="structjs_sequence_info.html#ae4416a5d766e07db207e563668edd06f">jsSequenceInfo</a>, <a class="el" href="structjs_sequence_pair.html#a6d205effd29f8994f0028bfaf2e8d816">jsSequencePair</a>, <a class="el" href="structjs_sub_options.html#a7aa5b8439ed288b858943f28c291cb36">jsSubOptions</a></li>
+<li>ConsumerClient&#160;:&#160;<a class="el" href="structjs_consumer_sequence_mismatch.html#adb383429dadb1ab0e1f7d013bc546a28">jsConsumerSequenceMismatch</a></li>
+<li>Consumers&#160;:&#160;<a class="el" href="structjs_account_info.html#a1237c3f19a42a3203825971b429312e9">jsAccountInfo</a>, <a class="el" href="structjs_stream_state.html#a27f4cfb85c0f1b0c5c7ad5275bd25d85">jsStreamState</a>, <a class="el" href="structjs_tier.html#ac33ce862c041572d10184e7fa0dd0bfe">jsTier</a></li>
+<li>ConsumerServer&#160;:&#160;<a class="el" href="structjs_consumer_sequence_mismatch.html#ac1df353001d853c8a56cef9f82fb831c">jsConsumerSequenceMismatch</a></li>
+<li>Count&#160;:&#160;<a class="el" href="structjs_consumer_info_list.html#a813c908362a6426a929133f7c0d3395f">jsConsumerInfoList</a>, <a class="el" href="structjs_consumer_names_list.html#a0bccbad8ac5d335a0ed89970a58900fb">jsConsumerNamesList</a>, <a class="el" href="structjs_stream_info_list.html#a8bc8490af12bb4f7a245605aecde62c2">jsStreamInfoList</a>, <a class="el" href="structjs_stream_names_list.html#ab1385b6333537306d0462946c26cde4f">jsStreamNamesList</a>, <a class="el" href="structjs_stream_state_subjects.html#ab88e2026f518b6cdffd3901b5e5cd374">jsStreamStateSubjects</a>, <a class="el" href="structkv_entry_list.html#a82da55d42e1a6862d3b0034dfc6f321f">kvEntryList</a>, <a class="el" href="structkv_keys_list.html#a625f7b34784e024a538359efd9a97265">kvKeysList</a>, <a class="el" href="structnats_msg_list.html#a5c48bf6b9e7f1d889d7ad31694911750">natsMsgList</a></li>
+<li>Created&#160;:&#160;<a class="el" href="structjs_consumer_info.html#a670d38f2e9ba5c354ca3560a8064d00c">jsConsumerInfo</a>, <a class="el" href="structjs_stream_info.html#a578ce52a275c690dd4627c1d119c7838">jsStreamInfo</a></li>
+<li>Current&#160;:&#160;<a class="el" href="structjs_peer_info.html#ad8cecd039a8ad1c68daba89007b055d4">jsPeerInfo</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_d.html b/doc/html/functions_d.html
new file mode 100644 (file)
index 0000000..4861f4d
--- /dev/null
@@ -0,0 +1,129 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_d.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+<div class="textblock">Here is a list of all class members with links to the classes they belong to:</div>
+
+<h3><a id="index_d" name="index_d"></a>- d -</h3><ul>
+<li>Deleted&#160;:&#160;<a class="el" href="structjs_stream_state.html#abcf4d3c581c06d820f1ad21d640bef3f">jsStreamState</a></li>
+<li>DeletedDetails&#160;:&#160;<a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_info.html#a73f847afe18f56eaaf6788900270bef7">jsOptions::jsOptionsStream::jsOptionsStreamInfo</a></li>
+<li>DeletedLen&#160;:&#160;<a class="el" href="structjs_stream_state.html#a34a08a64c97269165630bf2e0c78c2c0">jsStreamState</a></li>
+<li>DeleteMarkersOlderThan&#160;:&#160;<a class="el" href="structkv_purge_options.html#a47fed1e95073666cbe441aba7c149da6">kvPurgeOptions</a></li>
+<li>Delivered&#160;:&#160;<a class="el" href="structjs_consumer_info.html#a15f2d68fbf126acc1907ba9462ad9ee9">jsConsumerInfo</a></li>
+<li>DeliverGroup&#160;:&#160;<a class="el" href="structjs_consumer_config.html#ae0765f3b5effe365187d3cf809c6ed3c">jsConsumerConfig</a></li>
+<li>DeliverPolicy&#160;:&#160;<a class="el" href="structjs_consumer_config.html#a364127e68bf0d3bf13efdc0b416667f4">jsConsumerConfig</a></li>
+<li>DeliverPrefix&#160;:&#160;<a class="el" href="structjs_external_stream.html#a26ca427f3c5be1cae579ddccc16432d3">jsExternalStream</a></li>
+<li>DeliverSubject&#160;:&#160;<a class="el" href="structjs_consumer_config.html#a95aa4184ed77f69b7674756572da1ded">jsConsumerConfig</a></li>
+<li>DenyDelete&#160;:&#160;<a class="el" href="structjs_stream_config.html#af2d42dd29b9a35257937aeeb53c9f287">jsStreamConfig</a></li>
+<li>DenyPurge&#160;:&#160;<a class="el" href="structjs_stream_config.html#a575ffbaa85b0300032963296b090583a">jsStreamConfig</a></li>
+<li>Description&#160;:&#160;<a class="el" href="structjs_consumer_config.html#a36a14d666d99bdade87a5e21a25491d6">jsConsumerConfig</a>, <a class="el" href="structjs_stream_config.html#a4f9f422d2e9e7389860291ab19bd7f10">jsStreamConfig</a>, <a class="el" href="structkv_config.html#a941e9cad2bab67f093bf4d9567b4749a">kvConfig</a></li>
+<li>Destination&#160;:&#160;<a class="el" href="structjs_re_publish.html#a662b2e57d237b171b2b61509f7e1023a">jsRePublish</a></li>
+<li>Discard&#160;:&#160;<a class="el" href="structjs_stream_config.html#a0b44ea5251ef20bf5b5658bcfbea832d">jsStreamConfig</a></li>
+<li>DiscardNewPerSubject&#160;:&#160;<a class="el" href="structjs_stream_config.html#a3fb7d5e1a09829fe742749da880afe4a">jsStreamConfig</a></li>
+<li>Domain&#160;:&#160;<a class="el" href="structjs_account_info.html#ab6ba03298e1863132550b9b08d06048c">jsAccountInfo</a>, <a class="el" href="structjs_msg_meta_data.html#a388e38ccea591181436d199dc7c2f8ea">jsMsgMetaData</a>, <a class="el" href="structjs_options.html#ae4df6c9c01c0ea9ab0e6d5a6ec8af74e">jsOptions</a>, <a class="el" href="structjs_pub_ack.html#a0b73200c0b035db3c9c96421706d51b0">jsPubAck</a></li>
+<li>Duplicate&#160;:&#160;<a class="el" href="structjs_pub_ack.html#a0381a49ff62e8fac7a52cad6a5eb7243">jsPubAck</a></li>
+<li>Duplicates&#160;:&#160;<a class="el" href="structjs_stream_config.html#a9e0ff10273d0182f885615b4f7d1cc20">jsStreamConfig</a></li>
+<li>Durable&#160;:&#160;<a class="el" href="structjs_consumer_config.html#a36cf121162cf0b40edf051991d851ee0">jsConsumerConfig</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_dup.js b/doc/html/functions_dup.js
new file mode 100644 (file)
index 0000000..f25b23b
--- /dev/null
@@ -0,0 +1,22 @@
+var functions_dup =
+[
+    [ "a", "functions.html", null ],
+    [ "b", "functions_b.html", null ],
+    [ "c", "functions_c.html", null ],
+    [ "d", "functions_d.html", null ],
+    [ "e", "functions_e.html", null ],
+    [ "f", "functions_f.html", null ],
+    [ "h", "functions_h.html", null ],
+    [ "i", "functions_i.html", null ],
+    [ "k", "functions_k.html", null ],
+    [ "l", "functions_l.html", null ],
+    [ "m", "functions_m.html", null ],
+    [ "n", "functions_n.html", null ],
+    [ "o", "functions_o.html", null ],
+    [ "p", "functions_p.html", null ],
+    [ "q", "functions_q.html", null ],
+    [ "r", "functions_r.html", null ],
+    [ "s", "functions_s.html", null ],
+    [ "t", "functions_t.html", null ],
+    [ "w", "functions_w.html", null ]
+];
\ No newline at end of file
diff --git a/doc/html/functions_e.html b/doc/html/functions_e.html
new file mode 100644 (file)
index 0000000..3586980
--- /dev/null
@@ -0,0 +1,124 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_e.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+<div class="textblock">Here is a list of all class members with links to the classes they belong to:</div>
+
+<h3><a id="index_e" name="index_e"></a>- e -</h3><ul>
+<li>Entries&#160;:&#160;<a class="el" href="structkv_entry_list.html#a179d4d3e5844d005be1ed9134b969a50">kvEntryList</a></li>
+<li>Err&#160;:&#160;<a class="el" href="structjs_pub_ack_err.html#a406e39e818f93bc59ac18cbdf035baf5">jsPubAckErr</a></li>
+<li>ErrCode&#160;:&#160;<a class="el" href="structjs_pub_ack_err.html#aa558fd192cc6d6c02ad891445ec5aa8a">jsPubAckErr</a></li>
+<li>ErrHandler&#160;:&#160;<a class="el" href="structjs_options_1_1js_options_publish_async.html#a0a180995c49990ca277e449b7d43616b">jsOptions::jsOptionsPublishAsync</a></li>
+<li>ErrHandlerClosure&#160;:&#160;<a class="el" href="structjs_options_1_1js_options_publish_async.html#a784a0029c30e82ff37c39ae6c276bc81">jsOptions::jsOptionsPublishAsync</a></li>
+<li>Errors&#160;:&#160;<a class="el" href="structjs_a_p_i_stats.html#a84e85ad9d94dbe9afd1101388574255d">jsAPIStats</a></li>
+<li>ErrText&#160;:&#160;<a class="el" href="structjs_pub_ack_err.html#ad1a85e6ff4046d7df33c1e24323ddc87">jsPubAckErr</a></li>
+<li>ExpectLastMsgId&#160;:&#160;<a class="el" href="structjs_pub_options.html#a095391b33a261586fc02eaf013b65e61">jsPubOptions</a></li>
+<li>ExpectLastSeq&#160;:&#160;<a class="el" href="structjs_pub_options.html#a3b02b60b05caa6d242079a4c26b181bf">jsPubOptions</a></li>
+<li>ExpectLastSubjectSeq&#160;:&#160;<a class="el" href="structjs_pub_options.html#aeefec1d2c7644562d23b87e55bf2e253">jsPubOptions</a></li>
+<li>ExpectNoMessage&#160;:&#160;<a class="el" href="structjs_pub_options.html#a740a7edee8c832a75b75fded6046ba90">jsPubOptions</a></li>
+<li>ExpectStream&#160;:&#160;<a class="el" href="structjs_pub_options.html#ac7ac74d2557d772c3092288dacf3711f">jsPubOptions</a></li>
+<li>Expires&#160;:&#160;<a class="el" href="structjs_fetch_request.html#ac3351138ce8ac3b321ac1eb78887116e">jsFetchRequest</a></li>
+<li>External&#160;:&#160;<a class="el" href="structjs_stream_source.html#a295458d156af5373bb3f5ab06612a888">jsStreamSource</a>, <a class="el" href="structjs_stream_source_info.html#a7eb19dd2637079fd1e970a2b38d33e05">jsStreamSourceInfo</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_f.html b/doc/html/functions_f.html
new file mode 100644 (file)
index 0000000..7d7a16a
--- /dev/null
@@ -0,0 +1,114 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_f.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+<div class="textblock">Here is a list of all class members with links to the classes they belong to:</div>
+
+<h3><a id="index_f" name="index_f"></a>- f -</h3><ul>
+<li>FilterSubject&#160;:&#160;<a class="el" href="structjs_consumer_config.html#af56ab7708b11e85e0b9115d152d281ca">jsConsumerConfig</a>, <a class="el" href="structjs_stream_source.html#af787b51dde9d77626f33860564eb08c3">jsStreamSource</a></li>
+<li>FirstSeq&#160;:&#160;<a class="el" href="structjs_stream_state.html#a55bb6719163acef7fdb6d0bc3ae8d5da">jsStreamState</a></li>
+<li>FirstTime&#160;:&#160;<a class="el" href="structjs_stream_state.html#afb7a708022faff518c060b33e99b04b0">jsStreamState</a></li>
+<li>FlowControl&#160;:&#160;<a class="el" href="structjs_consumer_config.html#a484c64b6c54f6f758f54315470ed20d0">jsConsumerConfig</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_h.html b/doc/html/functions_h.html
new file mode 100644 (file)
index 0000000..c96b874
--- /dev/null
@@ -0,0 +1,113 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_h.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+<div class="textblock">Here is a list of all class members with links to the classes they belong to:</div>
+
+<h3><a id="index_h" name="index_h"></a>- h -</h3><ul>
+<li>HeadersOnly&#160;:&#160;<a class="el" href="structjs_consumer_config.html#a30d4142bac47ab6dc583c5ee193704e6">jsConsumerConfig</a>, <a class="el" href="structjs_re_publish.html#a16ebc4cdae4a407cf4e32aad212888db">jsRePublish</a></li>
+<li>Heartbeat&#160;:&#160;<a class="el" href="structjs_consumer_config.html#ac439828c3bedb8826a1e92de13280d53">jsConsumerConfig</a>, <a class="el" href="structjs_fetch_request.html#ae8e73c7cc2e2a2d2502407c9b1522496">jsFetchRequest</a></li>
+<li>History&#160;:&#160;<a class="el" href="structkv_config.html#a0ec6b3afbfdaa33436e2ae748e986e98">kvConfig</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_i.html b/doc/html/functions_i.html
new file mode 100644 (file)
index 0000000..f8f6e1b
--- /dev/null
@@ -0,0 +1,114 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_i.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+<div class="textblock">Here is a list of all class members with links to the classes they belong to:</div>
+
+<h3><a id="index_i" name="index_i"></a>- i -</h3><ul>
+<li>IgnoreDeletes&#160;:&#160;<a class="el" href="structkv_watch_options.html#a0535edd21b26affc0057575bafc21a07">kvWatchOptions</a></li>
+<li>InactiveThreshold&#160;:&#160;<a class="el" href="structjs_consumer_config.html#af6376a6009124c25d7016bc548f3855d">jsConsumerConfig</a></li>
+<li>IncludeHistory&#160;:&#160;<a class="el" href="structkv_watch_options.html#a08274f08ae96e14d9ded326e4e665649">kvWatchOptions</a></li>
+<li>Info&#160;:&#160;<a class="el" href="structjs_options_1_1js_options_stream.html#a2ca89c298b4df1f5e3e0a44e205c789c">jsOptions::jsOptionsStream</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_k.html b/doc/html/functions_k.html
new file mode 100644 (file)
index 0000000..dbe120a
--- /dev/null
@@ -0,0 +1,112 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_k.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+<div class="textblock">Here is a list of all class members with links to the classes they belong to:</div>
+
+<h3><a id="index_k" name="index_k"></a>- k -</h3><ul>
+<li>Keep&#160;:&#160;<a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#a882c1ce1e636817450893caa72aa4eda">jsOptions::jsOptionsStream::jsOptionsStreamPurge</a></li>
+<li>Keys&#160;:&#160;<a class="el" href="structkv_keys_list.html#aa5cb40820a1a927375215e0a94ecfc18">kvKeysList</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_l.html b/doc/html/functions_l.html
new file mode 100644 (file)
index 0000000..980096d
--- /dev/null
@@ -0,0 +1,119 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_l.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+<div class="textblock">Here is a list of all class members with links to the classes they belong to:</div>
+
+<h3><a id="index_l" name="index_l"></a>- l -</h3><ul>
+<li>Lag&#160;:&#160;<a class="el" href="structjs_peer_info.html#a49a2623963dad653a6d7996c750056c9">jsPeerInfo</a>, <a class="el" href="structjs_stream_source_info.html#ab2ee0ca3ecd98c2df6d4e9bd88686863">jsStreamSourceInfo</a></li>
+<li>Last&#160;:&#160;<a class="el" href="structjs_sequence_info.html#a4e94c91650b7db253645515fee4c3b05">jsSequenceInfo</a></li>
+<li>LastBySubject&#160;:&#160;<a class="el" href="structjs_direct_get_msg_options.html#aae968f31cdda96fa3c5e9374a36b9630">jsDirectGetMsgOptions</a></li>
+<li>LastSeq&#160;:&#160;<a class="el" href="structjs_stream_state.html#a22da809fe7a1ec3101841e86d6708827">jsStreamState</a></li>
+<li>LastTime&#160;:&#160;<a class="el" href="structjs_stream_state.html#a67cbd0d8b43d8c05c8b4cd6b0e44dab0">jsStreamState</a></li>
+<li>Leader&#160;:&#160;<a class="el" href="structjs_cluster_info.html#af7d85652b52f56fa1eedce8f45fe6a19">jsClusterInfo</a></li>
+<li>Limits&#160;:&#160;<a class="el" href="structjs_account_info.html#aad93cf4bb6c1fbb09ae8545c03f315a9">jsAccountInfo</a>, <a class="el" href="structjs_tier.html#af2edbabd5e078b1e31dd73d44fd507d3">jsTier</a></li>
+<li>List&#160;:&#160;<a class="el" href="structjs_consumer_info_list.html#a75354882af5e11959b198a70bde14db8">jsConsumerInfoList</a>, <a class="el" href="structjs_consumer_names_list.html#aa4b3cf17902a2d580cc3a230bfa5d309">jsConsumerNamesList</a>, <a class="el" href="structjs_stream_info_list.html#a7b096ee7a25363f231f56419a244daef">jsStreamInfoList</a>, <a class="el" href="structjs_stream_names_list.html#a1875a7e449759dfc2a40b0eb74de0acf">jsStreamNamesList</a>, <a class="el" href="structjs_stream_state_subjects.html#aef3d1e886b16961daa84c43650fa80c0">jsStreamStateSubjects</a></li>
+<li>Lost&#160;:&#160;<a class="el" href="structjs_stream_state.html#a1adf8991f31fc4db9d6907a0316f8eec">jsStreamState</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_m.html b/doc/html/functions_m.html
new file mode 100644 (file)
index 0000000..9758174
--- /dev/null
@@ -0,0 +1,140 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_m.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+<div class="textblock">Here is a list of all class members with links to the classes they belong to:</div>
+
+<h3><a id="index_m" name="index_m"></a>- m -</h3><ul>
+<li>ManualAck&#160;:&#160;<a class="el" href="structjs_sub_options.html#a21a905c49dfab61729d8674702d196b2">jsSubOptions</a></li>
+<li>MaxAckPending&#160;:&#160;<a class="el" href="structjs_account_limits.html#a4abf1972690c20d73bd314f2059e8013">jsAccountLimits</a>, <a class="el" href="structjs_consumer_config.html#aeb2336d480e3885385d1b08410e89892">jsConsumerConfig</a></li>
+<li>MaxAge&#160;:&#160;<a class="el" href="structjs_stream_config.html#aa538765ad97d343d60212ebd9894661e">jsStreamConfig</a></li>
+<li>MaxBytes&#160;:&#160;<a class="el" href="structjs_fetch_request.html#a3298db691c2ecb9725cc029e2c35d6d1">jsFetchRequest</a>, <a class="el" href="structjs_stream_config.html#ad75e47d4293441bd5ddbc5eaf01e0451">jsStreamConfig</a>, <a class="el" href="structkv_config.html#a1bc37777aa91b8b57a70e7647670cd12">kvConfig</a></li>
+<li>MaxBytesRequired&#160;:&#160;<a class="el" href="structjs_account_limits.html#a858edf99ee1c60354bdba4e59293fb6a">jsAccountLimits</a></li>
+<li>MaxConsumers&#160;:&#160;<a class="el" href="structjs_account_limits.html#a6169f29101d51d48eed0803b719e6338">jsAccountLimits</a>, <a class="el" href="structjs_stream_config.html#a7338c82c8cbfcd5f4bfb7ad34b1d8395">jsStreamConfig</a></li>
+<li>MaxDeliver&#160;:&#160;<a class="el" href="structjs_consumer_config.html#ad47e15e1d6a4a8b0b155f9d3d5873c95">jsConsumerConfig</a></li>
+<li>MaxMemory&#160;:&#160;<a class="el" href="structjs_account_limits.html#a7bfc63e6f49ce724663ee534c5efdfa4">jsAccountLimits</a></li>
+<li>MaxMsgs&#160;:&#160;<a class="el" href="structjs_stream_config.html#a60a5184d1d97b056dbb31ac6a5b3d82d">jsStreamConfig</a></li>
+<li>MaxMsgSize&#160;:&#160;<a class="el" href="structjs_stream_config.html#a93a2336a57b6bfb792d530fd13a90641">jsStreamConfig</a></li>
+<li>MaxMsgsPerSubject&#160;:&#160;<a class="el" href="structjs_stream_config.html#aa167c7547d13bf2a01510a375ad38340">jsStreamConfig</a></li>
+<li>MaxPending&#160;:&#160;<a class="el" href="structjs_options_1_1js_options_publish_async.html#add8dd21cbab2d5df19688c26365fe4d1">jsOptions::jsOptionsPublishAsync</a></li>
+<li>MaxRequestBatch&#160;:&#160;<a class="el" href="structjs_consumer_config.html#a4e86deefe08854b9a82b4908397aad32">jsConsumerConfig</a></li>
+<li>MaxRequestExpires&#160;:&#160;<a class="el" href="structjs_consumer_config.html#aa71aa3dfe5826466be301097b1bae04d">jsConsumerConfig</a></li>
+<li>MaxRequestMaxBytes&#160;:&#160;<a class="el" href="structjs_consumer_config.html#a74a026cdd92c538bcf84297f4468bb21">jsConsumerConfig</a></li>
+<li>MaxStore&#160;:&#160;<a class="el" href="structjs_account_limits.html#a6fff014c46739410ecf298b0cf643b30">jsAccountLimits</a></li>
+<li>MaxStreams&#160;:&#160;<a class="el" href="structjs_account_limits.html#a4710a10950857a322c2a3ad6f946ded2">jsAccountLimits</a></li>
+<li>MaxValueSize&#160;:&#160;<a class="el" href="structkv_config.html#a281156a9df0130abad7f3b2728ac35a5">kvConfig</a></li>
+<li>MaxWait&#160;:&#160;<a class="el" href="structjs_pub_options.html#a1b242c9311b904a2e5337417b5c6d143">jsPubOptions</a></li>
+<li>MaxWaiting&#160;:&#160;<a class="el" href="structjs_consumer_config.html#a8472d49fae908ab0291b4d62c8411b76">jsConsumerConfig</a></li>
+<li>Memory&#160;:&#160;<a class="el" href="structjs_account_info.html#a448578d621e878267ad5f1792002a665">jsAccountInfo</a>, <a class="el" href="structjs_tier.html#aeff4a4cb86e10d8d7749d6ff69f97ed1">jsTier</a></li>
+<li>MemoryMaxStreamBytes&#160;:&#160;<a class="el" href="structjs_account_limits.html#a38875d969274b0f0fcefc6b04ce56eb8">jsAccountLimits</a></li>
+<li>MemoryStorage&#160;:&#160;<a class="el" href="structjs_consumer_config.html#a046177256938d6a601c629f9fd82f888">jsConsumerConfig</a></li>
+<li>MetaOnly&#160;:&#160;<a class="el" href="structkv_watch_options.html#ac9094bce4f3c6513431ba32fb49e5605">kvWatchOptions</a></li>
+<li>Mirror&#160;:&#160;<a class="el" href="structjs_stream_config.html#acdba5b22e4e60fd81a54769a7d09bc51">jsStreamConfig</a>, <a class="el" href="structjs_stream_info.html#ab71aae7e4f6c62e2a09a3a52c9e4fa2a">jsStreamInfo</a></li>
+<li>MirrorDirect&#160;:&#160;<a class="el" href="structjs_stream_config.html#a9d67ddcc7c54c345dd60ed5e59234f1e">jsStreamConfig</a></li>
+<li>Msg&#160;:&#160;<a class="el" href="structjs_pub_ack_err.html#a156ca2f779d132ffa8c519124cf9739b">jsPubAckErr</a></li>
+<li>MsgId&#160;:&#160;<a class="el" href="structjs_pub_options.html#ac8708487360b784f7dd5d7a21e5617c0">jsPubOptions</a></li>
+<li>Msgs&#160;:&#160;<a class="el" href="structjs_lost_stream_data.html#a5d2e87697526033c842a7f955776dfda">jsLostStreamData</a>, <a class="el" href="structjs_stream_state.html#a495269fe83c6bbf2023cca94add0a888">jsStreamState</a>, <a class="el" href="structjs_stream_state_subject.html#a8b9b2edc5afe82b7b3bc7dbdd67a4384">jsStreamStateSubject</a>, <a class="el" href="structnats_msg_list.html#aa123668879f1c9c11c9be7bd81a205c5">natsMsgList</a></li>
+<li>MsgsLen&#160;:&#160;<a class="el" href="structjs_lost_stream_data.html#abdc373ed7fc9b7cf161c13da1913fc9a">jsLostStreamData</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_n.html b/doc/html/functions_n.html
new file mode 100644 (file)
index 0000000..a25bda1
--- /dev/null
@@ -0,0 +1,121 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_n.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+<div class="textblock">Here is a list of all class members with links to the classes they belong to:</div>
+
+<h3><a id="index_n" name="index_n"></a>- n -</h3><ul>
+<li>Name&#160;:&#160;<a class="el" href="structjs_cluster_info.html#a2e13d7ec417574100c938c4df78e5484">jsClusterInfo</a>, <a class="el" href="structjs_consumer_config.html#a201217d93cfed17eb4d3e2d9579b826a">jsConsumerConfig</a>, <a class="el" href="structjs_consumer_info.html#a9359aea7cd05a27b2a15f8a35cdb1008">jsConsumerInfo</a>, <a class="el" href="structjs_peer_info.html#abf29230ce03a1c14d50227663e07de6a">jsPeerInfo</a>, <a class="el" href="structjs_stream_config.html#a7fe3d5086f1c660a6999ae40ecd370e5">jsStreamConfig</a>, <a class="el" href="structjs_stream_source.html#a7d9e5c064866b3f0b5601193c5885ec3">jsStreamSource</a>, <a class="el" href="structjs_stream_source_info.html#a6db3c6ff8a465a45f8bd5c7bdf5f6c04">jsStreamSourceInfo</a>, <a class="el" href="structjs_tier.html#a1ed542b9acccbe7761839f33c43053a6">jsTier</a></li>
+<li>NextBySubject&#160;:&#160;<a class="el" href="structjs_direct_get_msg_options.html#a16ce7908a3d1690b8ae8bc22350ac238">jsDirectGetMsgOptions</a></li>
+<li>NoAck&#160;:&#160;<a class="el" href="structjs_stream_config.html#a8e358fbc569a1c6d49c704e6dbdf8609">jsStreamConfig</a></li>
+<li>NoWait&#160;:&#160;<a class="el" href="structjs_fetch_request.html#ae251eebb1998a39fe3b898302b58293d">jsFetchRequest</a></li>
+<li>NumAckPending&#160;:&#160;<a class="el" href="structjs_consumer_info.html#a882bebeb7af80fcce088afdf2c98de50">jsConsumerInfo</a></li>
+<li>NumDeleted&#160;:&#160;<a class="el" href="structjs_stream_state.html#acbec2f01830b56cb4c0bf54ae5170e51">jsStreamState</a></li>
+<li>NumDelivered&#160;:&#160;<a class="el" href="structjs_msg_meta_data.html#a9a50965fac061a9728b160702d3f56ff">jsMsgMetaData</a></li>
+<li>NumPending&#160;:&#160;<a class="el" href="structjs_consumer_info.html#aeaefd5a500996013b1ce13d8872e869b">jsConsumerInfo</a>, <a class="el" href="structjs_msg_meta_data.html#a02f1bbd37e9650ed6bfda0210f038e30">jsMsgMetaData</a></li>
+<li>NumRedelivered&#160;:&#160;<a class="el" href="structjs_consumer_info.html#a932bf14ebb9ce167af8975e3b1f8d001">jsConsumerInfo</a></li>
+<li>NumSubjects&#160;:&#160;<a class="el" href="structjs_stream_state.html#aaa43db17641826e7c6ecc1954f641960">jsStreamState</a></li>
+<li>NumWaiting&#160;:&#160;<a class="el" href="structjs_consumer_info.html#a57e4a4139310c50a1f3d51af67197af0">jsConsumerInfo</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_o.html b/doc/html/functions_o.html
new file mode 100644 (file)
index 0000000..2fb528e
--- /dev/null
@@ -0,0 +1,114 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_o.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+<div class="textblock">Here is a list of all class members with links to the classes they belong to:</div>
+
+<h3><a id="index_o" name="index_o"></a>- o -</h3><ul>
+<li>Offline&#160;:&#160;<a class="el" href="structjs_peer_info.html#a3f3e09c5996858ec5faca2dc7fa5224e">jsPeerInfo</a></li>
+<li>OptStartSeq&#160;:&#160;<a class="el" href="structjs_consumer_config.html#a2f0243899885dc97f304f48ca52b5356">jsConsumerConfig</a>, <a class="el" href="structjs_stream_source.html#ad6948b7a34c202f324b6d2beb32fe5ed">jsStreamSource</a></li>
+<li>OptStartTime&#160;:&#160;<a class="el" href="structjs_consumer_config.html#a802ea3bf0669395bee28611f4ecede80">jsConsumerConfig</a>, <a class="el" href="structjs_stream_source.html#a67eb1dac41b2d826a923cfb23baa24a5">jsStreamSource</a></li>
+<li>Ordered&#160;:&#160;<a class="el" href="structjs_sub_options.html#a95c5d2db8ca97d644042d436de119be4">jsSubOptions</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_p.html b/doc/html/functions_p.html
new file mode 100644 (file)
index 0000000..5ed388a
--- /dev/null
@@ -0,0 +1,115 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_p.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+<div class="textblock">Here is a list of all class members with links to the classes they belong to:</div>
+
+<h3><a id="index_p" name="index_p"></a>- p -</h3><ul>
+<li>Placement&#160;:&#160;<a class="el" href="structjs_stream_config.html#acee6c66afc78d79c2f518eed89177efb">jsStreamConfig</a></li>
+<li>Prefix&#160;:&#160;<a class="el" href="structjs_options.html#ab06e45296fccf0fe6152e083e38d916f">jsOptions</a></li>
+<li>PublishAsync&#160;:&#160;<a class="el" href="structjs_options.html#a5ce5c11cc9b9df2b6bc47cd77d7b1dc4">jsOptions</a></li>
+<li>Purge&#160;:&#160;<a class="el" href="structjs_options_1_1js_options_stream.html#afe680264223b434ca6959f9e122af029">jsOptions::jsOptionsStream</a></li>
+<li>PushBound&#160;:&#160;<a class="el" href="structjs_consumer_info.html#a31282cdc72000a91af03f89899740bfa">jsConsumerInfo</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_q.html b/doc/html/functions_q.html
new file mode 100644 (file)
index 0000000..fecf340
--- /dev/null
@@ -0,0 +1,111 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_q.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+<div class="textblock">Here is a list of all class members with links to the classes they belong to:</div>
+
+<h3><a id="index_q" name="index_q"></a>- q -</h3><ul>
+<li>Queue&#160;:&#160;<a class="el" href="structjs_sub_options.html#aaf4b620d112a31f51a20389c5405805d">jsSubOptions</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_r.html b/doc/html/functions_r.html
new file mode 100644 (file)
index 0000000..4403afd
--- /dev/null
@@ -0,0 +1,116 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_r.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+<div class="textblock">Here is a list of all class members with links to the classes they belong to:</div>
+
+<h3><a id="index_r" name="index_r"></a>- r -</h3><ul>
+<li>RateLimit&#160;:&#160;<a class="el" href="structjs_consumer_config.html#a351b388a36ccb7978e6e85a6f4fc0816">jsConsumerConfig</a></li>
+<li>ReplayPolicy&#160;:&#160;<a class="el" href="structjs_consumer_config.html#ade510daf7c5d67553d2cd20b64ab9939">jsConsumerConfig</a></li>
+<li>Replicas&#160;:&#160;<a class="el" href="structjs_cluster_info.html#a8dfcae3bc348a5b595b509e3f3d3500b">jsClusterInfo</a>, <a class="el" href="structjs_consumer_config.html#acfba6d6ecb6323fd8ffe6c0bb4fbffae">jsConsumerConfig</a>, <a class="el" href="structjs_stream_config.html#adbf2c948cf8091b149603b918ef49ffc">jsStreamConfig</a>, <a class="el" href="structkv_config.html#a48f0f70383eff868321f9c94ae1a87cd">kvConfig</a></li>
+<li>ReplicasLen&#160;:&#160;<a class="el" href="structjs_cluster_info.html#a237a639579def1345e02f1490a510ed5">jsClusterInfo</a></li>
+<li>RePublish&#160;:&#160;<a class="el" href="structjs_stream_config.html#a95ab0061b6e935b129a4a9c133e6b11c">jsStreamConfig</a>, <a class="el" href="structkv_config.html#ae172d3e442eef1a57cd7cf266d9e8951">kvConfig</a></li>
+<li>Retention&#160;:&#160;<a class="el" href="structjs_stream_config.html#a5ebc95b76afafa5e7a129953ba1bb3c7">jsStreamConfig</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_s.html b/doc/html/functions_s.html
new file mode 100644 (file)
index 0000000..48f16a8
--- /dev/null
@@ -0,0 +1,128 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_s.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+<div class="textblock">Here is a list of all class members with links to the classes they belong to:</div>
+
+<h3><a id="index_s" name="index_s"></a>- s -</h3><ul>
+<li>SampleFrequency&#160;:&#160;<a class="el" href="structjs_consumer_config.html#a43f40b8eef0074b4146fb945b4645584">jsConsumerConfig</a></li>
+<li>Sealed&#160;:&#160;<a class="el" href="structjs_stream_config.html#aede3fd2ab13d230eda14c96f9997e1b7">jsStreamConfig</a></li>
+<li>Sequence&#160;:&#160;<a class="el" href="structjs_direct_get_msg_options.html#a60211d7499cfecdd6e61e6c73af1a2f5">jsDirectGetMsgOptions</a>, <a class="el" href="structjs_msg_meta_data.html#a23d5fd1992033164c73d5c2a16a4e321">jsMsgMetaData</a>, <a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#a0d61e5d3c9c518f455549086ababe7f6">jsOptions::jsOptionsStream::jsOptionsStreamPurge</a>, <a class="el" href="structjs_pub_ack.html#a01d302d5e1a2e71487a8c74c3fed1691">jsPubAck</a></li>
+<li>Source&#160;:&#160;<a class="el" href="structjs_re_publish.html#a1acb593929fd69bbe0f4dc8300dfaeb2">jsRePublish</a></li>
+<li>Sources&#160;:&#160;<a class="el" href="structjs_stream_config.html#a8f0ee08922e5b2108082b5b9e4a6284b">jsStreamConfig</a>, <a class="el" href="structjs_stream_info.html#a2e7ca48a93fe57265609e7e0cd3fa386">jsStreamInfo</a></li>
+<li>SourcesLen&#160;:&#160;<a class="el" href="structjs_stream_config.html#a34960d6acc710c2f32b563f4bb7c9c0a">jsStreamConfig</a>, <a class="el" href="structjs_stream_info.html#af14110cb1f8e16e3dade8d9f7c2fd672">jsStreamInfo</a></li>
+<li>StallWait&#160;:&#160;<a class="el" href="structjs_options_1_1js_options_publish_async.html#ada58fefe0ed40157b5f5d44b9dd175f9">jsOptions::jsOptionsPublishAsync</a></li>
+<li>State&#160;:&#160;<a class="el" href="structjs_stream_info.html#a766ac56dec3bd19fa5b9861fb5f64397">jsStreamInfo</a></li>
+<li>Storage&#160;:&#160;<a class="el" href="structjs_stream_config.html#a59c34091f336eafa77da2991c852c0d8">jsStreamConfig</a></li>
+<li>StorageType&#160;:&#160;<a class="el" href="structkv_config.html#ad5db9a58224d93ab86b4cfc4c46f1897">kvConfig</a></li>
+<li>Store&#160;:&#160;<a class="el" href="structjs_account_info.html#ad1c254c5b8f11f57062a4e2d5fb10ae3">jsAccountInfo</a>, <a class="el" href="structjs_tier.html#ab16c426e1c35d8c0fd6c460c43580a39">jsTier</a></li>
+<li>StoreMaxStreamBytes&#160;:&#160;<a class="el" href="structjs_account_limits.html#a8cca06ab72b715c02a6a2c72b59f6a52">jsAccountLimits</a></li>
+<li>Stream&#160;:&#160;<a class="el" href="structjs_consumer_info.html#a8f21939613163a7c0ebfb521aa471260">jsConsumerInfo</a>, <a class="el" href="structjs_consumer_sequence_mismatch.html#aad6a17af1719c023c38a6fd254b73f8e">jsConsumerSequenceMismatch</a>, <a class="el" href="structjs_msg_meta_data.html#a32e2a9438d2dc769f7f64d2f8897abc4">jsMsgMetaData</a>, <a class="el" href="structjs_options.html#ae50544ee0ef8dd7d02ef9802805807ae">jsOptions</a>, <a class="el" href="structjs_pub_ack.html#a4fd5e6cdb7217d72c553afcc75358893">jsPubAck</a>, <a class="el" href="structjs_sequence_info.html#ab52c55c1d0edd20e064870b490b4b990">jsSequenceInfo</a>, <a class="el" href="structjs_sequence_pair.html#ab051e0815302c48ba6122bd18d9d76f7">jsSequencePair</a>, <a class="el" href="structjs_sub_options.html#a856a6af4a7ff5aa2e736338091e69484">jsSubOptions</a></li>
+<li>Streams&#160;:&#160;<a class="el" href="structjs_account_info.html#a17317abf03effdcdedc2003fca8adc71">jsAccountInfo</a>, <a class="el" href="structjs_tier.html#a3f9234fde387faf3775d841aa797a6ea">jsTier</a></li>
+<li>Subject&#160;:&#160;<a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#aa99e6ee3bef1c22243f01544181315fe">jsOptions::jsOptionsStream::jsOptionsStreamPurge</a>, <a class="el" href="structjs_stream_state_subject.html#aa766824a7f8b69db592971af3262640e">jsStreamStateSubject</a></li>
+<li>Subjects&#160;:&#160;<a class="el" href="structjs_stream_config.html#a0c5f3354073dbe72650e3db7f59a47af">jsStreamConfig</a>, <a class="el" href="structjs_stream_state.html#a4af56e8bee7262ab050f2a25114c5909">jsStreamState</a></li>
+<li>SubjectsFilter&#160;:&#160;<a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_info.html#af874e0f5aa15fb2a41504631ed786e6d">jsOptions::jsOptionsStream::jsOptionsStreamInfo</a></li>
+<li>SubjectsLen&#160;:&#160;<a class="el" href="structjs_stream_config.html#ab2186aae798df6c222b3fa69e31597e1">jsStreamConfig</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_t.html b/doc/html/functions_t.html
new file mode 100644 (file)
index 0000000..040e8f4
--- /dev/null
@@ -0,0 +1,119 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_t.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+<div class="textblock">Here is a list of all class members with links to the classes they belong to:</div>
+
+<h3><a id="index_t" name="index_t"></a>- t -</h3><ul>
+<li>Tags&#160;:&#160;<a class="el" href="structjs_placement.html#af078a85b744b9ff3771bb2da6005b90d">jsPlacement</a></li>
+<li>TagsLen&#160;:&#160;<a class="el" href="structjs_placement.html#a35644f07531409518521b1b4fa28c9e3">jsPlacement</a></li>
+<li>Template&#160;:&#160;<a class="el" href="structjs_stream_config.html#a50f866f0e73c4ff0a5f43b354a059fa9">jsStreamConfig</a></li>
+<li>Tiers&#160;:&#160;<a class="el" href="structjs_account_info.html#ab654d5c7456bb62df1808deb32a620fc">jsAccountInfo</a></li>
+<li>TiersLen&#160;:&#160;<a class="el" href="structjs_account_info.html#a21c14ca283400c684b18e61a534b6724">jsAccountInfo</a></li>
+<li>Timeout&#160;:&#160;<a class="el" href="structkv_purge_options.html#a245c2def0f3aabe617219772cf7680a8">kvPurgeOptions</a>, <a class="el" href="structkv_watch_options.html#a56183d56585697d058c7eeb20bdddb66">kvWatchOptions</a></li>
+<li>Timestamp&#160;:&#160;<a class="el" href="structjs_msg_meta_data.html#abab9ed5600a3629ea6d6c78170d7d5e9">jsMsgMetaData</a></li>
+<li>Total&#160;:&#160;<a class="el" href="structjs_a_p_i_stats.html#a1545170bebb347d0ea1254f51c3027cf">jsAPIStats</a></li>
+<li>TTL&#160;:&#160;<a class="el" href="structkv_config.html#ad2f5503e2f2522cb52e0ba1b86983dba">kvConfig</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_vars.html b/doc/html/functions_vars.html
new file mode 100644 (file)
index 0000000..5055fe1
--- /dev/null
@@ -0,0 +1,120 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members - Variables</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_vars.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+&#160;
+
+<h3><a id="index_a" name="index_a"></a>- a -</h3><ul>
+<li>AckFloor&#160;:&#160;<a class="el" href="structjs_consumer_info.html#ab69c36ae092df9b0663b675a5abbab55">jsConsumerInfo</a></li>
+<li>AckHandler&#160;:&#160;<a class="el" href="structjs_options_1_1js_options_publish_async.html#a508140119f40a2c056d4ee8c0cd55df9">jsOptions::jsOptionsPublishAsync</a></li>
+<li>AckHandlerClosure&#160;:&#160;<a class="el" href="structjs_options_1_1js_options_publish_async.html#a60c95f10797c04ea2e625759c6936ec9">jsOptions::jsOptionsPublishAsync</a></li>
+<li>AckPolicy&#160;:&#160;<a class="el" href="structjs_consumer_config.html#a8a311af614dfae1b0f4e4af7db467aab">jsConsumerConfig</a></li>
+<li>AckWait&#160;:&#160;<a class="el" href="structjs_consumer_config.html#a651a94b9b78668dde830dc7869610e67">jsConsumerConfig</a></li>
+<li>Active&#160;:&#160;<a class="el" href="structjs_peer_info.html#a8441d023932c388953197f7ea39402fe">jsPeerInfo</a>, <a class="el" href="structjs_stream_source_info.html#a28b8cc0a9d487672955d3a3fa03de247">jsStreamSourceInfo</a></li>
+<li>AllowDirect&#160;:&#160;<a class="el" href="structjs_stream_config.html#a28630f6f07ca02553c5d5718d7c29721">jsStreamConfig</a></li>
+<li>AllowRollup&#160;:&#160;<a class="el" href="structjs_stream_config.html#aba71cdb342181f52bb9f7ff5f770a1fa">jsStreamConfig</a></li>
+<li>API&#160;:&#160;<a class="el" href="structjs_account_info.html#a94ab71c69b7883c2731ae8741ddc1e94">jsAccountInfo</a></li>
+<li>APIPrefix&#160;:&#160;<a class="el" href="structjs_external_stream.html#a2eaf2c0c3e77c269f44e254af8b24e96">jsExternalStream</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_vars.js b/doc/html/functions_vars.js
new file mode 100644 (file)
index 0000000..7af8cc2
--- /dev/null
@@ -0,0 +1,22 @@
+var functions_vars =
+[
+    [ "a", "functions_vars.html", null ],
+    [ "b", "functions_vars_b.html", null ],
+    [ "c", "functions_vars_c.html", null ],
+    [ "d", "functions_vars_d.html", null ],
+    [ "e", "functions_vars_e.html", null ],
+    [ "f", "functions_vars_f.html", null ],
+    [ "h", "functions_vars_h.html", null ],
+    [ "i", "functions_vars_i.html", null ],
+    [ "k", "functions_vars_k.html", null ],
+    [ "l", "functions_vars_l.html", null ],
+    [ "m", "functions_vars_m.html", null ],
+    [ "n", "functions_vars_n.html", null ],
+    [ "o", "functions_vars_o.html", null ],
+    [ "p", "functions_vars_p.html", null ],
+    [ "q", "functions_vars_q.html", null ],
+    [ "r", "functions_vars_r.html", null ],
+    [ "s", "functions_vars_s.html", null ],
+    [ "t", "functions_vars_t.html", null ],
+    [ "w", "functions_vars_w.html", null ]
+];
\ No newline at end of file
diff --git a/doc/html/functions_vars_b.html b/doc/html/functions_vars_b.html
new file mode 100644 (file)
index 0000000..aebbb67
--- /dev/null
@@ -0,0 +1,115 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members - Variables</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_vars_b.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+&#160;
+
+<h3><a id="index_b" name="index_b"></a>- b -</h3><ul>
+<li>BackOff&#160;:&#160;<a class="el" href="structjs_consumer_config.html#aa2d0aff64a2c46122d0f0fe89e8ae011">jsConsumerConfig</a></li>
+<li>BackOffLen&#160;:&#160;<a class="el" href="structjs_consumer_config.html#ad2f6ca3f2d0f977aedb8687c462c1cfc">jsConsumerConfig</a></li>
+<li>Batch&#160;:&#160;<a class="el" href="structjs_fetch_request.html#a84f06b60e25decb2674996f0cb315f63">jsFetchRequest</a></li>
+<li>Bucket&#160;:&#160;<a class="el" href="structkv_config.html#a11b636da727c17566d5ab1274f69fee5">kvConfig</a></li>
+<li>Bytes&#160;:&#160;<a class="el" href="structjs_lost_stream_data.html#a841fcadca3f66e9170a51080dc1acf30">jsLostStreamData</a>, <a class="el" href="structjs_stream_state.html#ae603fa6ecfb63c93b61272b7d1b8fb4d">jsStreamState</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_vars_c.html b/doc/html/functions_vars_c.html
new file mode 100644 (file)
index 0000000..50386a0
--- /dev/null
@@ -0,0 +1,119 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members - Variables</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_vars_c.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+&#160;
+
+<h3><a id="index_c" name="index_c"></a>- c -</h3><ul>
+<li>Cluster&#160;:&#160;<a class="el" href="structjs_consumer_info.html#a6f4401563a9fd102226d82cdc6136e32">jsConsumerInfo</a>, <a class="el" href="structjs_placement.html#ad8c83588d57f0e30959cfb6f3d5d61bf">jsPlacement</a>, <a class="el" href="structjs_stream_info.html#a8d10d6fdc3f713ac726c72cae06a209a">jsStreamInfo</a></li>
+<li>Config&#160;:&#160;<a class="el" href="structjs_consumer_info.html#a2f63940ca1f024ad3840418c2f6a1ae1">jsConsumerInfo</a>, <a class="el" href="structjs_stream_info.html#adcc402d28e0ee443419e9b549da233c6">jsStreamInfo</a>, <a class="el" href="structjs_sub_options.html#acab25d71a2efe26bb3b084071435c2b5">jsSubOptions</a></li>
+<li>Consumer&#160;:&#160;<a class="el" href="structjs_msg_meta_data.html#a6dcc2a442984b0ca070b3d8077192127">jsMsgMetaData</a>, <a class="el" href="structjs_sequence_info.html#ae4416a5d766e07db207e563668edd06f">jsSequenceInfo</a>, <a class="el" href="structjs_sequence_pair.html#a6d205effd29f8994f0028bfaf2e8d816">jsSequencePair</a>, <a class="el" href="structjs_sub_options.html#a7aa5b8439ed288b858943f28c291cb36">jsSubOptions</a></li>
+<li>ConsumerClient&#160;:&#160;<a class="el" href="structjs_consumer_sequence_mismatch.html#adb383429dadb1ab0e1f7d013bc546a28">jsConsumerSequenceMismatch</a></li>
+<li>Consumers&#160;:&#160;<a class="el" href="structjs_account_info.html#a1237c3f19a42a3203825971b429312e9">jsAccountInfo</a>, <a class="el" href="structjs_stream_state.html#a27f4cfb85c0f1b0c5c7ad5275bd25d85">jsStreamState</a>, <a class="el" href="structjs_tier.html#ac33ce862c041572d10184e7fa0dd0bfe">jsTier</a></li>
+<li>ConsumerServer&#160;:&#160;<a class="el" href="structjs_consumer_sequence_mismatch.html#ac1df353001d853c8a56cef9f82fb831c">jsConsumerSequenceMismatch</a></li>
+<li>Count&#160;:&#160;<a class="el" href="structjs_consumer_info_list.html#a813c908362a6426a929133f7c0d3395f">jsConsumerInfoList</a>, <a class="el" href="structjs_consumer_names_list.html#a0bccbad8ac5d335a0ed89970a58900fb">jsConsumerNamesList</a>, <a class="el" href="structjs_stream_info_list.html#a8bc8490af12bb4f7a245605aecde62c2">jsStreamInfoList</a>, <a class="el" href="structjs_stream_names_list.html#ab1385b6333537306d0462946c26cde4f">jsStreamNamesList</a>, <a class="el" href="structjs_stream_state_subjects.html#ab88e2026f518b6cdffd3901b5e5cd374">jsStreamStateSubjects</a>, <a class="el" href="structkv_entry_list.html#a82da55d42e1a6862d3b0034dfc6f321f">kvEntryList</a>, <a class="el" href="structkv_keys_list.html#a625f7b34784e024a538359efd9a97265">kvKeysList</a>, <a class="el" href="structnats_msg_list.html#a5c48bf6b9e7f1d889d7ad31694911750">natsMsgList</a></li>
+<li>Created&#160;:&#160;<a class="el" href="structjs_consumer_info.html#a670d38f2e9ba5c354ca3560a8064d00c">jsConsumerInfo</a>, <a class="el" href="structjs_stream_info.html#a578ce52a275c690dd4627c1d119c7838">jsStreamInfo</a></li>
+<li>Current&#160;:&#160;<a class="el" href="structjs_peer_info.html#ad8cecd039a8ad1c68daba89007b055d4">jsPeerInfo</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_vars_d.html b/doc/html/functions_vars_d.html
new file mode 100644 (file)
index 0000000..a04d9e6
--- /dev/null
@@ -0,0 +1,129 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members - Variables</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_vars_d.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+&#160;
+
+<h3><a id="index_d" name="index_d"></a>- d -</h3><ul>
+<li>Deleted&#160;:&#160;<a class="el" href="structjs_stream_state.html#abcf4d3c581c06d820f1ad21d640bef3f">jsStreamState</a></li>
+<li>DeletedDetails&#160;:&#160;<a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_info.html#a73f847afe18f56eaaf6788900270bef7">jsOptions::jsOptionsStream::jsOptionsStreamInfo</a></li>
+<li>DeletedLen&#160;:&#160;<a class="el" href="structjs_stream_state.html#a34a08a64c97269165630bf2e0c78c2c0">jsStreamState</a></li>
+<li>DeleteMarkersOlderThan&#160;:&#160;<a class="el" href="structkv_purge_options.html#a47fed1e95073666cbe441aba7c149da6">kvPurgeOptions</a></li>
+<li>Delivered&#160;:&#160;<a class="el" href="structjs_consumer_info.html#a15f2d68fbf126acc1907ba9462ad9ee9">jsConsumerInfo</a></li>
+<li>DeliverGroup&#160;:&#160;<a class="el" href="structjs_consumer_config.html#ae0765f3b5effe365187d3cf809c6ed3c">jsConsumerConfig</a></li>
+<li>DeliverPolicy&#160;:&#160;<a class="el" href="structjs_consumer_config.html#a364127e68bf0d3bf13efdc0b416667f4">jsConsumerConfig</a></li>
+<li>DeliverPrefix&#160;:&#160;<a class="el" href="structjs_external_stream.html#a26ca427f3c5be1cae579ddccc16432d3">jsExternalStream</a></li>
+<li>DeliverSubject&#160;:&#160;<a class="el" href="structjs_consumer_config.html#a95aa4184ed77f69b7674756572da1ded">jsConsumerConfig</a></li>
+<li>DenyDelete&#160;:&#160;<a class="el" href="structjs_stream_config.html#af2d42dd29b9a35257937aeeb53c9f287">jsStreamConfig</a></li>
+<li>DenyPurge&#160;:&#160;<a class="el" href="structjs_stream_config.html#a575ffbaa85b0300032963296b090583a">jsStreamConfig</a></li>
+<li>Description&#160;:&#160;<a class="el" href="structjs_consumer_config.html#a36a14d666d99bdade87a5e21a25491d6">jsConsumerConfig</a>, <a class="el" href="structjs_stream_config.html#a4f9f422d2e9e7389860291ab19bd7f10">jsStreamConfig</a>, <a class="el" href="structkv_config.html#a941e9cad2bab67f093bf4d9567b4749a">kvConfig</a></li>
+<li>Destination&#160;:&#160;<a class="el" href="structjs_re_publish.html#a662b2e57d237b171b2b61509f7e1023a">jsRePublish</a></li>
+<li>Discard&#160;:&#160;<a class="el" href="structjs_stream_config.html#a0b44ea5251ef20bf5b5658bcfbea832d">jsStreamConfig</a></li>
+<li>DiscardNewPerSubject&#160;:&#160;<a class="el" href="structjs_stream_config.html#a3fb7d5e1a09829fe742749da880afe4a">jsStreamConfig</a></li>
+<li>Domain&#160;:&#160;<a class="el" href="structjs_account_info.html#ab6ba03298e1863132550b9b08d06048c">jsAccountInfo</a>, <a class="el" href="structjs_msg_meta_data.html#a388e38ccea591181436d199dc7c2f8ea">jsMsgMetaData</a>, <a class="el" href="structjs_options.html#ae4df6c9c01c0ea9ab0e6d5a6ec8af74e">jsOptions</a>, <a class="el" href="structjs_pub_ack.html#a0b73200c0b035db3c9c96421706d51b0">jsPubAck</a></li>
+<li>Duplicate&#160;:&#160;<a class="el" href="structjs_pub_ack.html#a0381a49ff62e8fac7a52cad6a5eb7243">jsPubAck</a></li>
+<li>Duplicates&#160;:&#160;<a class="el" href="structjs_stream_config.html#a9e0ff10273d0182f885615b4f7d1cc20">jsStreamConfig</a></li>
+<li>Durable&#160;:&#160;<a class="el" href="structjs_consumer_config.html#a36cf121162cf0b40edf051991d851ee0">jsConsumerConfig</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_vars_e.html b/doc/html/functions_vars_e.html
new file mode 100644 (file)
index 0000000..264b7b6
--- /dev/null
@@ -0,0 +1,124 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members - Variables</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_vars_e.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+&#160;
+
+<h3><a id="index_e" name="index_e"></a>- e -</h3><ul>
+<li>Entries&#160;:&#160;<a class="el" href="structkv_entry_list.html#a179d4d3e5844d005be1ed9134b969a50">kvEntryList</a></li>
+<li>Err&#160;:&#160;<a class="el" href="structjs_pub_ack_err.html#a406e39e818f93bc59ac18cbdf035baf5">jsPubAckErr</a></li>
+<li>ErrCode&#160;:&#160;<a class="el" href="structjs_pub_ack_err.html#aa558fd192cc6d6c02ad891445ec5aa8a">jsPubAckErr</a></li>
+<li>ErrHandler&#160;:&#160;<a class="el" href="structjs_options_1_1js_options_publish_async.html#a0a180995c49990ca277e449b7d43616b">jsOptions::jsOptionsPublishAsync</a></li>
+<li>ErrHandlerClosure&#160;:&#160;<a class="el" href="structjs_options_1_1js_options_publish_async.html#a784a0029c30e82ff37c39ae6c276bc81">jsOptions::jsOptionsPublishAsync</a></li>
+<li>Errors&#160;:&#160;<a class="el" href="structjs_a_p_i_stats.html#a84e85ad9d94dbe9afd1101388574255d">jsAPIStats</a></li>
+<li>ErrText&#160;:&#160;<a class="el" href="structjs_pub_ack_err.html#ad1a85e6ff4046d7df33c1e24323ddc87">jsPubAckErr</a></li>
+<li>ExpectLastMsgId&#160;:&#160;<a class="el" href="structjs_pub_options.html#a095391b33a261586fc02eaf013b65e61">jsPubOptions</a></li>
+<li>ExpectLastSeq&#160;:&#160;<a class="el" href="structjs_pub_options.html#a3b02b60b05caa6d242079a4c26b181bf">jsPubOptions</a></li>
+<li>ExpectLastSubjectSeq&#160;:&#160;<a class="el" href="structjs_pub_options.html#aeefec1d2c7644562d23b87e55bf2e253">jsPubOptions</a></li>
+<li>ExpectNoMessage&#160;:&#160;<a class="el" href="structjs_pub_options.html#a740a7edee8c832a75b75fded6046ba90">jsPubOptions</a></li>
+<li>ExpectStream&#160;:&#160;<a class="el" href="structjs_pub_options.html#ac7ac74d2557d772c3092288dacf3711f">jsPubOptions</a></li>
+<li>Expires&#160;:&#160;<a class="el" href="structjs_fetch_request.html#ac3351138ce8ac3b321ac1eb78887116e">jsFetchRequest</a></li>
+<li>External&#160;:&#160;<a class="el" href="structjs_stream_source.html#a295458d156af5373bb3f5ab06612a888">jsStreamSource</a>, <a class="el" href="structjs_stream_source_info.html#a7eb19dd2637079fd1e970a2b38d33e05">jsStreamSourceInfo</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_vars_f.html b/doc/html/functions_vars_f.html
new file mode 100644 (file)
index 0000000..e045c1a
--- /dev/null
@@ -0,0 +1,114 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members - Variables</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_vars_f.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+&#160;
+
+<h3><a id="index_f" name="index_f"></a>- f -</h3><ul>
+<li>FilterSubject&#160;:&#160;<a class="el" href="structjs_consumer_config.html#af56ab7708b11e85e0b9115d152d281ca">jsConsumerConfig</a>, <a class="el" href="structjs_stream_source.html#af787b51dde9d77626f33860564eb08c3">jsStreamSource</a></li>
+<li>FirstSeq&#160;:&#160;<a class="el" href="structjs_stream_state.html#a55bb6719163acef7fdb6d0bc3ae8d5da">jsStreamState</a></li>
+<li>FirstTime&#160;:&#160;<a class="el" href="structjs_stream_state.html#afb7a708022faff518c060b33e99b04b0">jsStreamState</a></li>
+<li>FlowControl&#160;:&#160;<a class="el" href="structjs_consumer_config.html#a484c64b6c54f6f758f54315470ed20d0">jsConsumerConfig</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_vars_h.html b/doc/html/functions_vars_h.html
new file mode 100644 (file)
index 0000000..5741781
--- /dev/null
@@ -0,0 +1,113 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members - Variables</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_vars_h.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+&#160;
+
+<h3><a id="index_h" name="index_h"></a>- h -</h3><ul>
+<li>HeadersOnly&#160;:&#160;<a class="el" href="structjs_consumer_config.html#a30d4142bac47ab6dc583c5ee193704e6">jsConsumerConfig</a>, <a class="el" href="structjs_re_publish.html#a16ebc4cdae4a407cf4e32aad212888db">jsRePublish</a></li>
+<li>Heartbeat&#160;:&#160;<a class="el" href="structjs_consumer_config.html#ac439828c3bedb8826a1e92de13280d53">jsConsumerConfig</a>, <a class="el" href="structjs_fetch_request.html#ae8e73c7cc2e2a2d2502407c9b1522496">jsFetchRequest</a></li>
+<li>History&#160;:&#160;<a class="el" href="structkv_config.html#a0ec6b3afbfdaa33436e2ae748e986e98">kvConfig</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_vars_i.html b/doc/html/functions_vars_i.html
new file mode 100644 (file)
index 0000000..331aac0
--- /dev/null
@@ -0,0 +1,114 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members - Variables</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_vars_i.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+&#160;
+
+<h3><a id="index_i" name="index_i"></a>- i -</h3><ul>
+<li>IgnoreDeletes&#160;:&#160;<a class="el" href="structkv_watch_options.html#a0535edd21b26affc0057575bafc21a07">kvWatchOptions</a></li>
+<li>InactiveThreshold&#160;:&#160;<a class="el" href="structjs_consumer_config.html#af6376a6009124c25d7016bc548f3855d">jsConsumerConfig</a></li>
+<li>IncludeHistory&#160;:&#160;<a class="el" href="structkv_watch_options.html#a08274f08ae96e14d9ded326e4e665649">kvWatchOptions</a></li>
+<li>Info&#160;:&#160;<a class="el" href="structjs_options_1_1js_options_stream.html#a2ca89c298b4df1f5e3e0a44e205c789c">jsOptions::jsOptionsStream</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_vars_k.html b/doc/html/functions_vars_k.html
new file mode 100644 (file)
index 0000000..950ff55
--- /dev/null
@@ -0,0 +1,112 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members - Variables</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_vars_k.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+&#160;
+
+<h3><a id="index_k" name="index_k"></a>- k -</h3><ul>
+<li>Keep&#160;:&#160;<a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#a882c1ce1e636817450893caa72aa4eda">jsOptions::jsOptionsStream::jsOptionsStreamPurge</a></li>
+<li>Keys&#160;:&#160;<a class="el" href="structkv_keys_list.html#aa5cb40820a1a927375215e0a94ecfc18">kvKeysList</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_vars_l.html b/doc/html/functions_vars_l.html
new file mode 100644 (file)
index 0000000..fd9bece
--- /dev/null
@@ -0,0 +1,119 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members - Variables</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_vars_l.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+&#160;
+
+<h3><a id="index_l" name="index_l"></a>- l -</h3><ul>
+<li>Lag&#160;:&#160;<a class="el" href="structjs_peer_info.html#a49a2623963dad653a6d7996c750056c9">jsPeerInfo</a>, <a class="el" href="structjs_stream_source_info.html#ab2ee0ca3ecd98c2df6d4e9bd88686863">jsStreamSourceInfo</a></li>
+<li>Last&#160;:&#160;<a class="el" href="structjs_sequence_info.html#a4e94c91650b7db253645515fee4c3b05">jsSequenceInfo</a></li>
+<li>LastBySubject&#160;:&#160;<a class="el" href="structjs_direct_get_msg_options.html#aae968f31cdda96fa3c5e9374a36b9630">jsDirectGetMsgOptions</a></li>
+<li>LastSeq&#160;:&#160;<a class="el" href="structjs_stream_state.html#a22da809fe7a1ec3101841e86d6708827">jsStreamState</a></li>
+<li>LastTime&#160;:&#160;<a class="el" href="structjs_stream_state.html#a67cbd0d8b43d8c05c8b4cd6b0e44dab0">jsStreamState</a></li>
+<li>Leader&#160;:&#160;<a class="el" href="structjs_cluster_info.html#af7d85652b52f56fa1eedce8f45fe6a19">jsClusterInfo</a></li>
+<li>Limits&#160;:&#160;<a class="el" href="structjs_account_info.html#aad93cf4bb6c1fbb09ae8545c03f315a9">jsAccountInfo</a>, <a class="el" href="structjs_tier.html#af2edbabd5e078b1e31dd73d44fd507d3">jsTier</a></li>
+<li>List&#160;:&#160;<a class="el" href="structjs_consumer_info_list.html#a75354882af5e11959b198a70bde14db8">jsConsumerInfoList</a>, <a class="el" href="structjs_consumer_names_list.html#aa4b3cf17902a2d580cc3a230bfa5d309">jsConsumerNamesList</a>, <a class="el" href="structjs_stream_info_list.html#a7b096ee7a25363f231f56419a244daef">jsStreamInfoList</a>, <a class="el" href="structjs_stream_names_list.html#a1875a7e449759dfc2a40b0eb74de0acf">jsStreamNamesList</a>, <a class="el" href="structjs_stream_state_subjects.html#aef3d1e886b16961daa84c43650fa80c0">jsStreamStateSubjects</a></li>
+<li>Lost&#160;:&#160;<a class="el" href="structjs_stream_state.html#a1adf8991f31fc4db9d6907a0316f8eec">jsStreamState</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_vars_m.html b/doc/html/functions_vars_m.html
new file mode 100644 (file)
index 0000000..29711d8
--- /dev/null
@@ -0,0 +1,140 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members - Variables</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_vars_m.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+&#160;
+
+<h3><a id="index_m" name="index_m"></a>- m -</h3><ul>
+<li>ManualAck&#160;:&#160;<a class="el" href="structjs_sub_options.html#a21a905c49dfab61729d8674702d196b2">jsSubOptions</a></li>
+<li>MaxAckPending&#160;:&#160;<a class="el" href="structjs_account_limits.html#a4abf1972690c20d73bd314f2059e8013">jsAccountLimits</a>, <a class="el" href="structjs_consumer_config.html#aeb2336d480e3885385d1b08410e89892">jsConsumerConfig</a></li>
+<li>MaxAge&#160;:&#160;<a class="el" href="structjs_stream_config.html#aa538765ad97d343d60212ebd9894661e">jsStreamConfig</a></li>
+<li>MaxBytes&#160;:&#160;<a class="el" href="structjs_fetch_request.html#a3298db691c2ecb9725cc029e2c35d6d1">jsFetchRequest</a>, <a class="el" href="structjs_stream_config.html#ad75e47d4293441bd5ddbc5eaf01e0451">jsStreamConfig</a>, <a class="el" href="structkv_config.html#a1bc37777aa91b8b57a70e7647670cd12">kvConfig</a></li>
+<li>MaxBytesRequired&#160;:&#160;<a class="el" href="structjs_account_limits.html#a858edf99ee1c60354bdba4e59293fb6a">jsAccountLimits</a></li>
+<li>MaxConsumers&#160;:&#160;<a class="el" href="structjs_account_limits.html#a6169f29101d51d48eed0803b719e6338">jsAccountLimits</a>, <a class="el" href="structjs_stream_config.html#a7338c82c8cbfcd5f4bfb7ad34b1d8395">jsStreamConfig</a></li>
+<li>MaxDeliver&#160;:&#160;<a class="el" href="structjs_consumer_config.html#ad47e15e1d6a4a8b0b155f9d3d5873c95">jsConsumerConfig</a></li>
+<li>MaxMemory&#160;:&#160;<a class="el" href="structjs_account_limits.html#a7bfc63e6f49ce724663ee534c5efdfa4">jsAccountLimits</a></li>
+<li>MaxMsgs&#160;:&#160;<a class="el" href="structjs_stream_config.html#a60a5184d1d97b056dbb31ac6a5b3d82d">jsStreamConfig</a></li>
+<li>MaxMsgSize&#160;:&#160;<a class="el" href="structjs_stream_config.html#a93a2336a57b6bfb792d530fd13a90641">jsStreamConfig</a></li>
+<li>MaxMsgsPerSubject&#160;:&#160;<a class="el" href="structjs_stream_config.html#aa167c7547d13bf2a01510a375ad38340">jsStreamConfig</a></li>
+<li>MaxPending&#160;:&#160;<a class="el" href="structjs_options_1_1js_options_publish_async.html#add8dd21cbab2d5df19688c26365fe4d1">jsOptions::jsOptionsPublishAsync</a></li>
+<li>MaxRequestBatch&#160;:&#160;<a class="el" href="structjs_consumer_config.html#a4e86deefe08854b9a82b4908397aad32">jsConsumerConfig</a></li>
+<li>MaxRequestExpires&#160;:&#160;<a class="el" href="structjs_consumer_config.html#aa71aa3dfe5826466be301097b1bae04d">jsConsumerConfig</a></li>
+<li>MaxRequestMaxBytes&#160;:&#160;<a class="el" href="structjs_consumer_config.html#a74a026cdd92c538bcf84297f4468bb21">jsConsumerConfig</a></li>
+<li>MaxStore&#160;:&#160;<a class="el" href="structjs_account_limits.html#a6fff014c46739410ecf298b0cf643b30">jsAccountLimits</a></li>
+<li>MaxStreams&#160;:&#160;<a class="el" href="structjs_account_limits.html#a4710a10950857a322c2a3ad6f946ded2">jsAccountLimits</a></li>
+<li>MaxValueSize&#160;:&#160;<a class="el" href="structkv_config.html#a281156a9df0130abad7f3b2728ac35a5">kvConfig</a></li>
+<li>MaxWait&#160;:&#160;<a class="el" href="structjs_pub_options.html#a1b242c9311b904a2e5337417b5c6d143">jsPubOptions</a></li>
+<li>MaxWaiting&#160;:&#160;<a class="el" href="structjs_consumer_config.html#a8472d49fae908ab0291b4d62c8411b76">jsConsumerConfig</a></li>
+<li>Memory&#160;:&#160;<a class="el" href="structjs_account_info.html#a448578d621e878267ad5f1792002a665">jsAccountInfo</a>, <a class="el" href="structjs_tier.html#aeff4a4cb86e10d8d7749d6ff69f97ed1">jsTier</a></li>
+<li>MemoryMaxStreamBytes&#160;:&#160;<a class="el" href="structjs_account_limits.html#a38875d969274b0f0fcefc6b04ce56eb8">jsAccountLimits</a></li>
+<li>MemoryStorage&#160;:&#160;<a class="el" href="structjs_consumer_config.html#a046177256938d6a601c629f9fd82f888">jsConsumerConfig</a></li>
+<li>MetaOnly&#160;:&#160;<a class="el" href="structkv_watch_options.html#ac9094bce4f3c6513431ba32fb49e5605">kvWatchOptions</a></li>
+<li>Mirror&#160;:&#160;<a class="el" href="structjs_stream_config.html#acdba5b22e4e60fd81a54769a7d09bc51">jsStreamConfig</a>, <a class="el" href="structjs_stream_info.html#ab71aae7e4f6c62e2a09a3a52c9e4fa2a">jsStreamInfo</a></li>
+<li>MirrorDirect&#160;:&#160;<a class="el" href="structjs_stream_config.html#a9d67ddcc7c54c345dd60ed5e59234f1e">jsStreamConfig</a></li>
+<li>Msg&#160;:&#160;<a class="el" href="structjs_pub_ack_err.html#a156ca2f779d132ffa8c519124cf9739b">jsPubAckErr</a></li>
+<li>MsgId&#160;:&#160;<a class="el" href="structjs_pub_options.html#ac8708487360b784f7dd5d7a21e5617c0">jsPubOptions</a></li>
+<li>Msgs&#160;:&#160;<a class="el" href="structjs_lost_stream_data.html#a5d2e87697526033c842a7f955776dfda">jsLostStreamData</a>, <a class="el" href="structjs_stream_state.html#a495269fe83c6bbf2023cca94add0a888">jsStreamState</a>, <a class="el" href="structjs_stream_state_subject.html#a8b9b2edc5afe82b7b3bc7dbdd67a4384">jsStreamStateSubject</a>, <a class="el" href="structnats_msg_list.html#aa123668879f1c9c11c9be7bd81a205c5">natsMsgList</a></li>
+<li>MsgsLen&#160;:&#160;<a class="el" href="structjs_lost_stream_data.html#abdc373ed7fc9b7cf161c13da1913fc9a">jsLostStreamData</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_vars_n.html b/doc/html/functions_vars_n.html
new file mode 100644 (file)
index 0000000..201daf0
--- /dev/null
@@ -0,0 +1,121 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members - Variables</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_vars_n.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+&#160;
+
+<h3><a id="index_n" name="index_n"></a>- n -</h3><ul>
+<li>Name&#160;:&#160;<a class="el" href="structjs_cluster_info.html#a2e13d7ec417574100c938c4df78e5484">jsClusterInfo</a>, <a class="el" href="structjs_consumer_config.html#a201217d93cfed17eb4d3e2d9579b826a">jsConsumerConfig</a>, <a class="el" href="structjs_consumer_info.html#a9359aea7cd05a27b2a15f8a35cdb1008">jsConsumerInfo</a>, <a class="el" href="structjs_peer_info.html#abf29230ce03a1c14d50227663e07de6a">jsPeerInfo</a>, <a class="el" href="structjs_stream_config.html#a7fe3d5086f1c660a6999ae40ecd370e5">jsStreamConfig</a>, <a class="el" href="structjs_stream_source.html#a7d9e5c064866b3f0b5601193c5885ec3">jsStreamSource</a>, <a class="el" href="structjs_stream_source_info.html#a6db3c6ff8a465a45f8bd5c7bdf5f6c04">jsStreamSourceInfo</a>, <a class="el" href="structjs_tier.html#a1ed542b9acccbe7761839f33c43053a6">jsTier</a></li>
+<li>NextBySubject&#160;:&#160;<a class="el" href="structjs_direct_get_msg_options.html#a16ce7908a3d1690b8ae8bc22350ac238">jsDirectGetMsgOptions</a></li>
+<li>NoAck&#160;:&#160;<a class="el" href="structjs_stream_config.html#a8e358fbc569a1c6d49c704e6dbdf8609">jsStreamConfig</a></li>
+<li>NoWait&#160;:&#160;<a class="el" href="structjs_fetch_request.html#ae251eebb1998a39fe3b898302b58293d">jsFetchRequest</a></li>
+<li>NumAckPending&#160;:&#160;<a class="el" href="structjs_consumer_info.html#a882bebeb7af80fcce088afdf2c98de50">jsConsumerInfo</a></li>
+<li>NumDeleted&#160;:&#160;<a class="el" href="structjs_stream_state.html#acbec2f01830b56cb4c0bf54ae5170e51">jsStreamState</a></li>
+<li>NumDelivered&#160;:&#160;<a class="el" href="structjs_msg_meta_data.html#a9a50965fac061a9728b160702d3f56ff">jsMsgMetaData</a></li>
+<li>NumPending&#160;:&#160;<a class="el" href="structjs_consumer_info.html#aeaefd5a500996013b1ce13d8872e869b">jsConsumerInfo</a>, <a class="el" href="structjs_msg_meta_data.html#a02f1bbd37e9650ed6bfda0210f038e30">jsMsgMetaData</a></li>
+<li>NumRedelivered&#160;:&#160;<a class="el" href="structjs_consumer_info.html#a932bf14ebb9ce167af8975e3b1f8d001">jsConsumerInfo</a></li>
+<li>NumSubjects&#160;:&#160;<a class="el" href="structjs_stream_state.html#aaa43db17641826e7c6ecc1954f641960">jsStreamState</a></li>
+<li>NumWaiting&#160;:&#160;<a class="el" href="structjs_consumer_info.html#a57e4a4139310c50a1f3d51af67197af0">jsConsumerInfo</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_vars_o.html b/doc/html/functions_vars_o.html
new file mode 100644 (file)
index 0000000..30d18f8
--- /dev/null
@@ -0,0 +1,114 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members - Variables</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_vars_o.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+&#160;
+
+<h3><a id="index_o" name="index_o"></a>- o -</h3><ul>
+<li>Offline&#160;:&#160;<a class="el" href="structjs_peer_info.html#a3f3e09c5996858ec5faca2dc7fa5224e">jsPeerInfo</a></li>
+<li>OptStartSeq&#160;:&#160;<a class="el" href="structjs_consumer_config.html#a2f0243899885dc97f304f48ca52b5356">jsConsumerConfig</a>, <a class="el" href="structjs_stream_source.html#ad6948b7a34c202f324b6d2beb32fe5ed">jsStreamSource</a></li>
+<li>OptStartTime&#160;:&#160;<a class="el" href="structjs_consumer_config.html#a802ea3bf0669395bee28611f4ecede80">jsConsumerConfig</a>, <a class="el" href="structjs_stream_source.html#a67eb1dac41b2d826a923cfb23baa24a5">jsStreamSource</a></li>
+<li>Ordered&#160;:&#160;<a class="el" href="structjs_sub_options.html#a95c5d2db8ca97d644042d436de119be4">jsSubOptions</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_vars_p.html b/doc/html/functions_vars_p.html
new file mode 100644 (file)
index 0000000..2c9bd19
--- /dev/null
@@ -0,0 +1,115 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members - Variables</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_vars_p.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+&#160;
+
+<h3><a id="index_p" name="index_p"></a>- p -</h3><ul>
+<li>Placement&#160;:&#160;<a class="el" href="structjs_stream_config.html#acee6c66afc78d79c2f518eed89177efb">jsStreamConfig</a></li>
+<li>Prefix&#160;:&#160;<a class="el" href="structjs_options.html#ab06e45296fccf0fe6152e083e38d916f">jsOptions</a></li>
+<li>PublishAsync&#160;:&#160;<a class="el" href="structjs_options.html#a5ce5c11cc9b9df2b6bc47cd77d7b1dc4">jsOptions</a></li>
+<li>Purge&#160;:&#160;<a class="el" href="structjs_options_1_1js_options_stream.html#afe680264223b434ca6959f9e122af029">jsOptions::jsOptionsStream</a></li>
+<li>PushBound&#160;:&#160;<a class="el" href="structjs_consumer_info.html#a31282cdc72000a91af03f89899740bfa">jsConsumerInfo</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_vars_q.html b/doc/html/functions_vars_q.html
new file mode 100644 (file)
index 0000000..ffb431d
--- /dev/null
@@ -0,0 +1,111 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members - Variables</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_vars_q.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+&#160;
+
+<h3><a id="index_q" name="index_q"></a>- q -</h3><ul>
+<li>Queue&#160;:&#160;<a class="el" href="structjs_sub_options.html#aaf4b620d112a31f51a20389c5405805d">jsSubOptions</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_vars_r.html b/doc/html/functions_vars_r.html
new file mode 100644 (file)
index 0000000..b857617
--- /dev/null
@@ -0,0 +1,116 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members - Variables</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_vars_r.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+&#160;
+
+<h3><a id="index_r" name="index_r"></a>- r -</h3><ul>
+<li>RateLimit&#160;:&#160;<a class="el" href="structjs_consumer_config.html#a351b388a36ccb7978e6e85a6f4fc0816">jsConsumerConfig</a></li>
+<li>ReplayPolicy&#160;:&#160;<a class="el" href="structjs_consumer_config.html#ade510daf7c5d67553d2cd20b64ab9939">jsConsumerConfig</a></li>
+<li>Replicas&#160;:&#160;<a class="el" href="structjs_cluster_info.html#a8dfcae3bc348a5b595b509e3f3d3500b">jsClusterInfo</a>, <a class="el" href="structjs_consumer_config.html#acfba6d6ecb6323fd8ffe6c0bb4fbffae">jsConsumerConfig</a>, <a class="el" href="structjs_stream_config.html#adbf2c948cf8091b149603b918ef49ffc">jsStreamConfig</a>, <a class="el" href="structkv_config.html#a48f0f70383eff868321f9c94ae1a87cd">kvConfig</a></li>
+<li>ReplicasLen&#160;:&#160;<a class="el" href="structjs_cluster_info.html#a237a639579def1345e02f1490a510ed5">jsClusterInfo</a></li>
+<li>RePublish&#160;:&#160;<a class="el" href="structjs_stream_config.html#a95ab0061b6e935b129a4a9c133e6b11c">jsStreamConfig</a>, <a class="el" href="structkv_config.html#ae172d3e442eef1a57cd7cf266d9e8951">kvConfig</a></li>
+<li>Retention&#160;:&#160;<a class="el" href="structjs_stream_config.html#a5ebc95b76afafa5e7a129953ba1bb3c7">jsStreamConfig</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_vars_s.html b/doc/html/functions_vars_s.html
new file mode 100644 (file)
index 0000000..8e8c6d1
--- /dev/null
@@ -0,0 +1,128 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members - Variables</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_vars_s.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+&#160;
+
+<h3><a id="index_s" name="index_s"></a>- s -</h3><ul>
+<li>SampleFrequency&#160;:&#160;<a class="el" href="structjs_consumer_config.html#a43f40b8eef0074b4146fb945b4645584">jsConsumerConfig</a></li>
+<li>Sealed&#160;:&#160;<a class="el" href="structjs_stream_config.html#aede3fd2ab13d230eda14c96f9997e1b7">jsStreamConfig</a></li>
+<li>Sequence&#160;:&#160;<a class="el" href="structjs_direct_get_msg_options.html#a60211d7499cfecdd6e61e6c73af1a2f5">jsDirectGetMsgOptions</a>, <a class="el" href="structjs_msg_meta_data.html#a23d5fd1992033164c73d5c2a16a4e321">jsMsgMetaData</a>, <a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#a0d61e5d3c9c518f455549086ababe7f6">jsOptions::jsOptionsStream::jsOptionsStreamPurge</a>, <a class="el" href="structjs_pub_ack.html#a01d302d5e1a2e71487a8c74c3fed1691">jsPubAck</a></li>
+<li>Source&#160;:&#160;<a class="el" href="structjs_re_publish.html#a1acb593929fd69bbe0f4dc8300dfaeb2">jsRePublish</a></li>
+<li>Sources&#160;:&#160;<a class="el" href="structjs_stream_config.html#a8f0ee08922e5b2108082b5b9e4a6284b">jsStreamConfig</a>, <a class="el" href="structjs_stream_info.html#a2e7ca48a93fe57265609e7e0cd3fa386">jsStreamInfo</a></li>
+<li>SourcesLen&#160;:&#160;<a class="el" href="structjs_stream_config.html#a34960d6acc710c2f32b563f4bb7c9c0a">jsStreamConfig</a>, <a class="el" href="structjs_stream_info.html#af14110cb1f8e16e3dade8d9f7c2fd672">jsStreamInfo</a></li>
+<li>StallWait&#160;:&#160;<a class="el" href="structjs_options_1_1js_options_publish_async.html#ada58fefe0ed40157b5f5d44b9dd175f9">jsOptions::jsOptionsPublishAsync</a></li>
+<li>State&#160;:&#160;<a class="el" href="structjs_stream_info.html#a766ac56dec3bd19fa5b9861fb5f64397">jsStreamInfo</a></li>
+<li>Storage&#160;:&#160;<a class="el" href="structjs_stream_config.html#a59c34091f336eafa77da2991c852c0d8">jsStreamConfig</a></li>
+<li>StorageType&#160;:&#160;<a class="el" href="structkv_config.html#ad5db9a58224d93ab86b4cfc4c46f1897">kvConfig</a></li>
+<li>Store&#160;:&#160;<a class="el" href="structjs_account_info.html#ad1c254c5b8f11f57062a4e2d5fb10ae3">jsAccountInfo</a>, <a class="el" href="structjs_tier.html#ab16c426e1c35d8c0fd6c460c43580a39">jsTier</a></li>
+<li>StoreMaxStreamBytes&#160;:&#160;<a class="el" href="structjs_account_limits.html#a8cca06ab72b715c02a6a2c72b59f6a52">jsAccountLimits</a></li>
+<li>Stream&#160;:&#160;<a class="el" href="structjs_consumer_info.html#a8f21939613163a7c0ebfb521aa471260">jsConsumerInfo</a>, <a class="el" href="structjs_consumer_sequence_mismatch.html#aad6a17af1719c023c38a6fd254b73f8e">jsConsumerSequenceMismatch</a>, <a class="el" href="structjs_msg_meta_data.html#a32e2a9438d2dc769f7f64d2f8897abc4">jsMsgMetaData</a>, <a class="el" href="structjs_options.html#ae50544ee0ef8dd7d02ef9802805807ae">jsOptions</a>, <a class="el" href="structjs_pub_ack.html#a4fd5e6cdb7217d72c553afcc75358893">jsPubAck</a>, <a class="el" href="structjs_sequence_info.html#ab52c55c1d0edd20e064870b490b4b990">jsSequenceInfo</a>, <a class="el" href="structjs_sequence_pair.html#ab051e0815302c48ba6122bd18d9d76f7">jsSequencePair</a>, <a class="el" href="structjs_sub_options.html#a856a6af4a7ff5aa2e736338091e69484">jsSubOptions</a></li>
+<li>Streams&#160;:&#160;<a class="el" href="structjs_account_info.html#a17317abf03effdcdedc2003fca8adc71">jsAccountInfo</a>, <a class="el" href="structjs_tier.html#a3f9234fde387faf3775d841aa797a6ea">jsTier</a></li>
+<li>Subject&#160;:&#160;<a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#aa99e6ee3bef1c22243f01544181315fe">jsOptions::jsOptionsStream::jsOptionsStreamPurge</a>, <a class="el" href="structjs_stream_state_subject.html#aa766824a7f8b69db592971af3262640e">jsStreamStateSubject</a></li>
+<li>Subjects&#160;:&#160;<a class="el" href="structjs_stream_config.html#a0c5f3354073dbe72650e3db7f59a47af">jsStreamConfig</a>, <a class="el" href="structjs_stream_state.html#a4af56e8bee7262ab050f2a25114c5909">jsStreamState</a></li>
+<li>SubjectsFilter&#160;:&#160;<a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_info.html#af874e0f5aa15fb2a41504631ed786e6d">jsOptions::jsOptionsStream::jsOptionsStreamInfo</a></li>
+<li>SubjectsLen&#160;:&#160;<a class="el" href="structjs_stream_config.html#ab2186aae798df6c222b3fa69e31597e1">jsStreamConfig</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_vars_t.html b/doc/html/functions_vars_t.html
new file mode 100644 (file)
index 0000000..7c999e9
--- /dev/null
@@ -0,0 +1,119 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members - Variables</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_vars_t.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+&#160;
+
+<h3><a id="index_t" name="index_t"></a>- t -</h3><ul>
+<li>Tags&#160;:&#160;<a class="el" href="structjs_placement.html#af078a85b744b9ff3771bb2da6005b90d">jsPlacement</a></li>
+<li>TagsLen&#160;:&#160;<a class="el" href="structjs_placement.html#a35644f07531409518521b1b4fa28c9e3">jsPlacement</a></li>
+<li>Template&#160;:&#160;<a class="el" href="structjs_stream_config.html#a50f866f0e73c4ff0a5f43b354a059fa9">jsStreamConfig</a></li>
+<li>Tiers&#160;:&#160;<a class="el" href="structjs_account_info.html#ab654d5c7456bb62df1808deb32a620fc">jsAccountInfo</a></li>
+<li>TiersLen&#160;:&#160;<a class="el" href="structjs_account_info.html#a21c14ca283400c684b18e61a534b6724">jsAccountInfo</a></li>
+<li>Timeout&#160;:&#160;<a class="el" href="structkv_purge_options.html#a245c2def0f3aabe617219772cf7680a8">kvPurgeOptions</a>, <a class="el" href="structkv_watch_options.html#a56183d56585697d058c7eeb20bdddb66">kvWatchOptions</a></li>
+<li>Timestamp&#160;:&#160;<a class="el" href="structjs_msg_meta_data.html#abab9ed5600a3629ea6d6c78170d7d5e9">jsMsgMetaData</a></li>
+<li>Total&#160;:&#160;<a class="el" href="structjs_a_p_i_stats.html#a1545170bebb347d0ea1254f51c3027cf">jsAPIStats</a></li>
+<li>TTL&#160;:&#160;<a class="el" href="structkv_config.html#ad2f5503e2f2522cb52e0ba1b86983dba">kvConfig</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_vars_w.html b/doc/html/functions_vars_w.html
new file mode 100644 (file)
index 0000000..8386617
--- /dev/null
@@ -0,0 +1,111 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members - Variables</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_vars_w.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+&#160;
+
+<h3><a id="index_w" name="index_w"></a>- w -</h3><ul>
+<li>Wait&#160;:&#160;<a class="el" href="structjs_options.html#a7fd42e1f83da5861e716137c16f8b72f">jsOptions</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/functions_w.html b/doc/html/functions_w.html
new file mode 100644 (file)
index 0000000..5ace07d
--- /dev/null
@@ -0,0 +1,111 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Class Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('functions_w.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+<div class="textblock">Here is a list of all class members with links to the classes they belong to:</div>
+
+<h3><a id="index_w" name="index_w"></a>- w -</h3><ul>
+<li>Wait&#160;:&#160;<a class="el" href="structjs_options.html#a7fd42e1f83da5861e716137c16f8b72f">jsOptions</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/globals.html b/doc/html/globals.html
new file mode 100644 (file)
index 0000000..d7f86b3
--- /dev/null
@@ -0,0 +1,357 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: File Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('globals.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+<div class="textblock">Here is a list of all file members with links to the files they belong to:</div>
+
+<h3><a id="index_j" name="index_j"></a>- j -</h3><ul>
+<li>js_AckAll&#160;:&#160;<a class="el" href="group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873a1232af28bf4e4b82e962174f1432ed4a">nats.h</a></li>
+<li>js_AckExplicit&#160;:&#160;<a class="el" href="group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873a02d46a6395933c55c95ee5194bb6b80e">nats.h</a></li>
+<li>js_AckNone&#160;:&#160;<a class="el" href="group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873afd91fe31cf57c68863ca3090b07c296c">nats.h</a></li>
+<li>js_AddConsumer()&#160;:&#160;<a class="el" href="group__js_assets_group.html#gaf2efb63db150e782d9007090b49d4115">nats.h</a></li>
+<li>js_AddStream()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga5efc5136d33ba52161e6732f88f1ee75">nats.h</a></li>
+<li>js_ConsumerNames()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga690d19af55d12b82c8523d1861cef8d0">nats.h</a></li>
+<li>js_Consumers()&#160;:&#160;<a class="el" href="group__js_assets_group.html#gaf28097ede3e9ba9926fb00856e63ffd9">nats.h</a></li>
+<li>js_CreateKeyValue()&#160;:&#160;<a class="el" href="group__kv_group_mgt.html#gabc445bfe87112e56a6c73872fec6893e">nats.h</a></li>
+<li>js_DeleteConsumer()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga52fbc61759b11494db91f348a733c490">nats.h</a></li>
+<li>js_DeleteKeyValue()&#160;:&#160;<a class="el" href="group__kv_group_mgt.html#ga6bc715319560bc28359679fcdcead937">nats.h</a></li>
+<li>js_DeleteMsg()&#160;:&#160;<a class="el" href="group__js_assets_group.html#gaeba5d45abbe811c0e40830c5f26c78fd">nats.h</a></li>
+<li>js_DeleteStream()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga397e55a0b3b6d36c9bf746eee3842172">nats.h</a></li>
+<li>js_DeliverAll&#160;:&#160;<a class="el" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818ac692ba1363103768ac4bb58695549758">nats.h</a></li>
+<li>js_DeliverByStartSequence&#160;:&#160;<a class="el" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a06299d9c8262a16306ba6cc16d293c5e">nats.h</a></li>
+<li>js_DeliverByStartTime&#160;:&#160;<a class="el" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a33317133d42f21bf5919827a691543f6">nats.h</a></li>
+<li>js_DeliverLast&#160;:&#160;<a class="el" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818abbd81d6c4e0f17f30e2186f1335e991d">nats.h</a></li>
+<li>js_DeliverLastPerSubject&#160;:&#160;<a class="el" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818abb50ebcd2fbafe27038c966121b9407b">nats.h</a></li>
+<li>js_DeliverNew&#160;:&#160;<a class="el" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a82b8d36e17391212398984f92db9c381">nats.h</a></li>
+<li>js_DirectGetMsg()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga62c250cecc650b1eed0fa1691893e2ae">nats.h</a></li>
+<li>js_DiscardNew&#160;:&#160;<a class="el" href="group__types_group.html#gga7f88b7d482488398074f9d1419a9b8c2a99d7f2d740af26c340c0a4e2b72fb6ab">nats.h</a></li>
+<li>js_DiscardOld&#160;:&#160;<a class="el" href="group__types_group.html#gga7f88b7d482488398074f9d1419a9b8c2abb31b828421634f1e6a1ef9359bc91f6">nats.h</a></li>
+<li>js_EraseMsg()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga7158f73e183462e9a15e9802e1746ff0">nats.h</a></li>
+<li>js_FileStorage&#160;:&#160;<a class="el" href="group__types_group.html#gga1802a53c79e667f093bba033b16adc98a1d9dad1854cf374b22e3688b98284dec">nats.h</a></li>
+<li>js_GetAccountInfo()&#160;:&#160;<a class="el" href="group__js_assets_group.html#gac8965dcfc6b465fbc323aa552c606c46">nats.h</a></li>
+<li>js_GetConsumerInfo()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga2dda04757b4ab27a794b64f8d727fe23">nats.h</a></li>
+<li>js_GetLastMsg()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga6835b53da27d5721eddb3698e582cf0c">nats.h</a></li>
+<li>js_GetMsg()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga9fe289ae172f83e53ca1b1b747744c1f">nats.h</a></li>
+<li>js_GetStreamInfo()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga94cb23a35516b7779de28fcbb263180a">nats.h</a></li>
+<li>js_InterestPolicy&#160;:&#160;<a class="el" href="group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6dae874de4a787cfbec4c6d0eb1a3f05ebd">nats.h</a></li>
+<li>js_KeyValue()&#160;:&#160;<a class="el" href="group__kv_group_mgt.html#ga54e6c109a7c633e431b3eded286e00f6">nats.h</a></li>
+<li>js_LimitsPolicy&#160;:&#160;<a class="el" href="group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6da6a2aa02f32acec6526d81f6e974e690f">nats.h</a></li>
+<li>js_MemoryStorage&#160;:&#160;<a class="el" href="group__types_group.html#gga1802a53c79e667f093bba033b16adc98a428ed10448726ad01c1db77a7f748314">nats.h</a></li>
+<li>js_Publish()&#160;:&#160;<a class="el" href="group__js_pub_group.html#gac6ba005531c82d9f0efa88dd6b458477">nats.h</a></li>
+<li>js_PublishAsync()&#160;:&#160;<a class="el" href="group__js_pub_group.html#ga069dfd6f0f3d96f1ff8bf2372e59900c">nats.h</a></li>
+<li>js_PublishAsyncComplete()&#160;:&#160;<a class="el" href="group__js_pub_group.html#ga24813ee9a58f00c0f21d10ab9c93b81d">nats.h</a></li>
+<li>js_PublishAsyncGetPendingList()&#160;:&#160;<a class="el" href="group__js_pub_group.html#ga2ac95a3450f77f8074fae3f2fbe7e54c">nats.h</a></li>
+<li>js_PublishMsg()&#160;:&#160;<a class="el" href="group__js_pub_group.html#ga2aceeb82fac3621aea843dd246732bdd">nats.h</a></li>
+<li>js_PublishMsgAsync()&#160;:&#160;<a class="el" href="group__js_pub_group.html#gab7e4139a48c5ee4d2155cbb43142e873">nats.h</a></li>
+<li>js_PullSubscribe()&#160;:&#160;<a class="el" href="group__js_sub_group.html#gaaeaddb73857aa4eb4901eec945ed27cd">nats.h</a></li>
+<li>js_PurgeStream()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga5a6a886c18a79caa403908bf7f7ef125">nats.h</a></li>
+<li>js_ReplayInstant&#160;:&#160;<a class="el" href="group__types_group.html#gga8650faf52b0b6b23df376eebeb9d0354a2c4a1e2b75f31dd69a89b541d75afa44">nats.h</a></li>
+<li>js_ReplayOriginal&#160;:&#160;<a class="el" href="group__types_group.html#gga8650faf52b0b6b23df376eebeb9d0354a6ee3851dac5c90a61492193dd55931f5">nats.h</a></li>
+<li>js_StreamNames()&#160;:&#160;<a class="el" href="group__js_assets_group.html#gac3dfc87863dbbb3c959ecde4bce905bc">nats.h</a></li>
+<li>js_Streams()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga531d91de372f0dffb8d64abecf88b0c0">nats.h</a></li>
+<li>js_Subscribe()&#160;:&#160;<a class="el" href="group__js_sub_group.html#gaa686c6efd84ef963de1925108e896515">nats.h</a></li>
+<li>js_SubscribeSync()&#160;:&#160;<a class="el" href="group__js_sub_group.html#gabacb010031e535f9fb6e2167337e8adf">nats.h</a></li>
+<li>js_UpdateConsumer()&#160;:&#160;<a class="el" href="group__js_assets_group.html#gad13ec256e24710bb237995814871e554">nats.h</a></li>
+<li>js_UpdateStream()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga75a5c44304e24481c67e17fbccc15c31">nats.h</a></li>
+<li>js_WorkQueuePolicy&#160;:&#160;<a class="el" href="group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6daf7e6581e69572691b01d1294a3c3a478">nats.h</a></li>
+<li>jsAccountInfo&#160;:&#160;<a class="el" href="group__types_group.html#ga57cdc53b29a4fedb5a4140b6e64a4fab">nats.h</a></li>
+<li>jsAccountInfo_Destroy()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga7c8664b38fcce8497746367d35e5f60b">nats.h</a></li>
+<li>jsAccountLimits&#160;:&#160;<a class="el" href="group__types_group.html#gaa889f706cce285adb9cea8aba0b76866">nats.h</a></li>
+<li>JSAccountResourcesExceededErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a26a33a6e2296eb0ac0370176fb08ed9a">status.h</a></li>
+<li>jsAckPolicy&#160;:&#160;<a class="el" href="group__types_group.html#ga8fcb50e6e7312834791f9e237d28e873">nats.h</a></li>
+<li>jsAPIStats&#160;:&#160;<a class="el" href="group__types_group.html#gad057a0107367ce5727975f3daf63ff75">nats.h</a></li>
+<li>JSBadRequestErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70acedca75c7ec69c5573da7013f69ede13">status.h</a></li>
+<li>JSClusterIncompleteErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aea64a5a017836108cf3da113ad57b6f9">status.h</a></li>
+<li>jsClusterInfo&#160;:&#160;<a class="el" href="group__types_group.html#gaaf92318ce94a1ae3547c9a7af5a3f4f6">nats.h</a></li>
+<li>JSClusterNoPeersErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae9b8b81043fea45985f8c29f108594fb">status.h</a></li>
+<li>JSClusterNotActiveErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af1efbfa8ad648bf47b4304ea58b0df8c">status.h</a></li>
+<li>JSClusterNotAssignedErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a99265bcfa283741c3711337dac6718f0">status.h</a></li>
+<li>JSClusterNotAvailErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4ae7ffdfb53fb238a76ebe19c7482696">status.h</a></li>
+<li>JSClusterNotLeaderErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a32546264d1f24fc9dafe490212bfd893">status.h</a></li>
+<li>JSClusterPeerNotMemberErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae7479c265d0e8cace4ab19a59cfcbbbb">status.h</a></li>
+<li>JSClusterRequiredErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a46321fc22a103908324b72259832af60">status.h</a></li>
+<li>JSClusterServerNotMemberErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aafa71c9cafc975d1a69889f6bf166e93">status.h</a></li>
+<li>JSClusterTagsErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a66240027007033c67fec04f4298311c4">status.h</a></li>
+<li>JSClusterUnSupportFeatureErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a84864e4bba24ee7354e5bae293c93d00">status.h</a></li>
+<li>JSConsumerBadDurableNameErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa0ca5a2e539cec9d33f433f28f2780fe">status.h</a></li>
+<li>jsConsumerConfig&#160;:&#160;<a class="el" href="group__types_group.html#ga0483b2197c0ddd9082b48c2dd3fe7cee">nats.h</a></li>
+<li>jsConsumerConfig_Init()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga3381bb05c05bf4a8979adde68d37dd66">nats.h</a></li>
+<li>JSConsumerConfigRequiredErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4a95591dfc0e2ccb1d3ac1b3a04f618f">status.h</a></li>
+<li>JSConsumerCreateErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af86c9c188aaa34a76eee96de9bf6e989">status.h</a></li>
+<li>JSConsumerDeliverCycleErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70afc70c6a72061d9c26017a5cf5dec729b">status.h</a></li>
+<li>JSConsumerDeliverToWildcardsErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4712c1322585d712cef9b67cd03a3e00">status.h</a></li>
+<li>JSConsumerDescriptionTooLongErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab1b6c048b0326e3f705b470e5a7f11f5">status.h</a></li>
+<li>JSConsumerDirectRequiresEphemeralErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6181f797cb27c92473585893b92b95b0">status.h</a></li>
+<li>JSConsumerDirectRequiresPushErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a968eff1142ca2f39f3da3da175aeda92">status.h</a></li>
+<li>JSConsumerDurableNameNotInSubjectErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aff9a4fe19078ac3e814989442beaa3a6">status.h</a></li>
+<li>JSConsumerDurableNameNotMatchSubjectErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a17c212f9409e4bd9db060bd2796905e4">status.h</a></li>
+<li>JSConsumerDurableNameNotSetErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9d9319d172e0a8147949bf40f1b29f28">status.h</a></li>
+<li>JSConsumerEphemeralWithDurableInSubjectErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4ef7a2042b48d5e0916e7e90fe691ab3">status.h</a></li>
+<li>JSConsumerEphemeralWithDurableNameErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1381bb653998c6ca8b88002d0fe0c829">status.h</a></li>
+<li>JSConsumerExistingActiveErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a86407070c2bbe04d97a25f2ceda4ea58">status.h</a></li>
+<li>JSConsumerFCRequiresPushErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a557d48b0334c5ceec0f0ee7cc74d8e79">status.h</a></li>
+<li>JSConsumerFilterNotSubsetErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a0f2007fc94103909ece328bbd77b0cdb">status.h</a></li>
+<li>JSConsumerHBRequiresPushErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6d4bed940055aa46a188a2419a531c63">status.h</a></li>
+<li>jsConsumerInfo&#160;:&#160;<a class="el" href="group__types_group.html#ga2f21bb79884e56a5613d7fe76b11b1e5">nats.h</a></li>
+<li>jsConsumerInfo_Destroy()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga9c1d5ed2f24ba836c10e415231f80088">nats.h</a></li>
+<li>jsConsumerInfoList&#160;:&#160;<a class="el" href="group__types_group.html#gadad3bf72baae970662248d82d9b05d0a">nats.h</a></li>
+<li>jsConsumerInfoList_Destroy()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga421de40d8e91658353111c3f2ea90ec8">nats.h</a></li>
+<li>JSConsumerInvalidDeliverSubjectErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa1242d9e6509f08c01c3373d0e66dc96">status.h</a></li>
+<li>JSConsumerInvalidPolicyErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a801182af5b4a6b9547d81ec45864b1f3">status.h</a></li>
+<li>JSConsumerInvalidSamplingErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab19f95018dff644423d6f34b682d365e">status.h</a></li>
+<li>JSConsumerMaxDeliverBackoffErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af7c1cf2c692140c4b28ebfc47acb0c41">status.h</a></li>
+<li>JSConsumerMaxPendingAckExcessErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ac4afe1d580083bd55c36b3e55a5ef479">status.h</a></li>
+<li>JSConsumerMaxPendingAckPolicyRequiredErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a429a21189134500589ed67ac3701aff4">status.h</a></li>
+<li>JSConsumerMaxRequestBatchExceededErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a597c98a0637cec454b724b049098cee8">status.h</a></li>
+<li>JSConsumerMaxRequestBatchNegativeErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abca8571110c4244d218c2dc1779d8786">status.h</a></li>
+<li>JSConsumerMaxRequestExpiresToSmallErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9c1c31813a713fcee44ec06728cc6382">status.h</a></li>
+<li>JSConsumerMaxWaitingNegativeErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a27579bca64e6f40f9590ef51ac03a219">status.h</a></li>
+<li>JSConsumerNameExistErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4f59c55a24136405b6767e0bf21182c8">status.h</a></li>
+<li>jsConsumerNamesList&#160;:&#160;<a class="el" href="group__types_group.html#gad00ab4381eec504ada3272aa9ff8adb2">nats.h</a></li>
+<li>jsConsumerNamesList_Destroy()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga2ced0d190131460bf4608ab893dffc50">nats.h</a></li>
+<li>JSConsumerNameTooLongErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3b1ce6536b249952dc3fb6fe5448140f">status.h</a></li>
+<li>JSConsumerNotFoundErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9eef13e3281a879f36a30e246fb6021b">status.h</a></li>
+<li>JSConsumerOfflineErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa0eb191886a17e917f2fa0eaa81d4b61">status.h</a></li>
+<li>JSConsumerOnMappedErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6b6aaaa23b1af2caf959529287b2a847">status.h</a></li>
+<li>JSConsumerPullNotDurableErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a407efbf6c688cb93fcded08acd2a08ed">status.h</a></li>
+<li>JSConsumerPullRequiresAckErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abd3f17c5d6ea86c38c3d8ade18b8445a">status.h</a></li>
+<li>JSConsumerPullWithRateLimitErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2a8844e5d20c55d753ec64bbde4561c8">status.h</a></li>
+<li>JSConsumerPushMaxWaitingErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a914926025dffa9c9b9604646b9e5675e">status.h</a></li>
+<li>JSConsumerReplacementWithDifferentNameErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a051bfd5e3bb9ba2b2398e6501426bc63">status.h</a></li>
+<li>JSConsumerReplicasExceedsStreamErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1d159f128cd9b261b5270f7e36ed22d1">status.h</a></li>
+<li>jsConsumerSequenceMismatch&#160;:&#160;<a class="el" href="group__types_group.html#gace471cd2cef1df797b2a1c6b485049bd">nats.h</a></li>
+<li>JSConsumerSmallHeartbeatErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9422b53061166a064e39d360d21827fd">status.h</a></li>
+<li>JSConsumerStoreFailedErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2984e6b8850b6cfed9506a25bcbe0608">status.h</a></li>
+<li>JSConsumerWithFlowControlNeedsHeartbeatsErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abc25cc794fce2ab7b9757ff506de51c3">status.h</a></li>
+<li>JSConsumerWQConsumerNotDeliverAllErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a00b4ce854e473bb8f49d91c0f982c6f9">status.h</a></li>
+<li>JSConsumerWQConsumerNotUniqueErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a5f7b670b9202311da41e6e5026e810d2">status.h</a></li>
+<li>JSConsumerWQMultipleUnfilteredErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7adbc8c115996a6f0dfc98fcaac8f09d">status.h</a></li>
+<li>JSConsumerWQRequiresExplicitAckErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a76dad06168a8d57e829876c2fcd3af56">status.h</a></li>
+<li>jsCtx&#160;:&#160;<a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">nats.h</a></li>
+<li>jsCtx_Destroy()&#160;:&#160;<a class="el" href="group__js_group.html#gacfa6ce3e60ea540e3331a09a7f3dc856">nats.h</a></li>
+<li>jsDeliverPolicy&#160;:&#160;<a class="el" href="group__types_group.html#ga117ed2c35f89ef3144540ed9cbadc818">nats.h</a></li>
+<li>jsDirectGetMsgOptions&#160;:&#160;<a class="el" href="group__types_group.html#ga85123afa00d522a249a5b2a8abd7e063">nats.h</a></li>
+<li>jsDirectGetMsgOptions_Init()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga8d835d47aed9c84ce3b8dcfea469f4cb">nats.h</a></li>
+<li>jsDiscardPolicy&#160;:&#160;<a class="el" href="group__types_group.html#ga7f88b7d482488398074f9d1419a9b8c2">nats.h</a></li>
+<li>jsErrCode&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">status.h</a></li>
+<li>jsExternalStream&#160;:&#160;<a class="el" href="group__types_group.html#gaef6601477f6456bebc229f7f38982a6c">nats.h</a></li>
+<li>jsExternalStream_Init()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga81aebebcd79922104720da51e95020d4">nats.h</a></li>
+<li>jsFetchRequest&#160;:&#160;<a class="el" href="group__types_group.html#gaf11e6664c1f335a5287af71c703935fa">nats.h</a></li>
+<li>jsFetchRequest_Init()&#160;:&#160;<a class="el" href="group__js_sub_group.html#ga1c3a62de8cd4855ae61ea4f67417a43b">nats.h</a></li>
+<li>JSInsufficientResourcesErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ad1ec102705e46b5343c2680162f58f49">status.h</a></li>
+<li>JSInvalidJSONErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a50c0beab390506fc6d3495325c0230c1">status.h</a></li>
+<li>JSLastSequence&#160;:&#160;<a class="el" href="nats_8h.html#ae18fb15ea8130a650e904e5153eb30d5">nats.h</a></li>
+<li>jsLostStreamData&#160;:&#160;<a class="el" href="group__types_group.html#gaf80828510450faf84bbf456e94f5b784">nats.h</a></li>
+<li>JSMaximumConsumersLimitErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa1b904de1494d20f540c8075f502af24">status.h</a></li>
+<li>JSMaximumStreamsLimitErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a739799359c3988ea18fe861eaff6f1f5">status.h</a></li>
+<li>JSMemoryResourcesExceededErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae3ac6ea1656f4fcc750ba2ab1649fb57">status.h</a></li>
+<li>JSMirrorConsumerSetupFailedErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a94a9b10d712ed764de27a007ac7f04eb">status.h</a></li>
+<li>JSMirrorMaxMessageSizeTooBigErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a91020cf9692a06637bdfedd847b259f1">status.h</a></li>
+<li>JSMirrorWithSourcesErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aaad93c7c34cd3283df7369479d4cdb7c">status.h</a></li>
+<li>JSMirrorWithStartSeqAndTimeErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a600ddc1915d8bb928fd37f1539440eb3">status.h</a></li>
+<li>JSMirrorWithSubjectFiltersErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70afcfb372eb2a607f821ad110815acf9d7">status.h</a></li>
+<li>JSMirrorWithSubjectsErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a0dc0fcc88a8b39f03924d50ccf731043">status.h</a></li>
+<li>jsMsgMetaData&#160;:&#160;<a class="el" href="group__types_group.html#gace9595b1a5ce3f7a13670367fd293b4a">nats.h</a></li>
+<li>jsMsgMetaData_Destroy()&#160;:&#160;<a class="el" href="group__js_msg.html#gaf9bf92294342bcb27053de7038606d12">nats.h</a></li>
+<li>JSMsgRollup&#160;:&#160;<a class="el" href="nats_8h.html#a3938efee417dc67ff2bcf62f913f9054">nats.h</a></li>
+<li>JSMsgRollupAll&#160;:&#160;<a class="el" href="nats_8h.html#acc62d11b7e67fe3feb74acdfa4a6e8ac">nats.h</a></li>
+<li>JSMsgRollupSubject&#160;:&#160;<a class="el" href="nats_8h.html#ad22dce8f66bae9b3e1027790d9c95c09">nats.h</a></li>
+<li>JSMsgSize&#160;:&#160;<a class="el" href="nats_8h.html#a5ce9005964bd9cf0604a9ef1afa87ea4">nats.h</a></li>
+<li>JSNoAccountErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a91773a41522fe9a464a0fb28a96b497b">status.h</a></li>
+<li>JSNoLimitsErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70acfa2c06f8baef07cd96a3627ddea641b">status.h</a></li>
+<li>JSNoMessageFoundErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a02a521ae52b716a669a3556d63a21410">status.h</a></li>
+<li>JSNotEmptyRequestErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab23b8553efea2ee0008098fcb109f690">status.h</a></li>
+<li>JSNotEnabledErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70afe9c20cdb1e88744d9a5f52977e95d1c">status.h</a></li>
+<li>JSNotEnabledForAccountErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa88122abfaf173f0411a3642803aac04">status.h</a></li>
+<li>jsOptions&#160;:&#160;<a class="el" href="group__types_group.html#ga0e3a3b7cf89e7dfa955f0f8f3f1eb6e5">nats.h</a></li>
+<li>jsOptions_Init()&#160;:&#160;<a class="el" href="group__js_group.html#ga855ff9a04888d696785cc5ede96112e4">nats.h</a></li>
+<li>jsPeerInfo&#160;:&#160;<a class="el" href="group__types_group.html#ga1e938dab794089f9329d7b7ece8f3e9b">nats.h</a></li>
+<li>JSPeerRemapErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4d68fa855750f16fdf38c9ed93acacda">status.h</a></li>
+<li>jsPlacement&#160;:&#160;<a class="el" href="group__types_group.html#ga49d1138fac9da8b85d00a367081e91c9">nats.h</a></li>
+<li>jsPlacement_Init()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga223691e6831072a0b8f8103a778293b0">nats.h</a></li>
+<li>jsPubAck&#160;:&#160;<a class="el" href="group__types_group.html#gaf1d5e436c5d41c5b9b96d84e3d2bc86f">nats.h</a></li>
+<li>jsPubAck_Destroy()&#160;:&#160;<a class="el" href="group__js_pub_group.html#gaac130840b6db9109e72cf6ad9186dfc4">nats.h</a></li>
+<li>jsPubAckErr&#160;:&#160;<a class="el" href="group__types_group.html#gadb7c287bc86b92765fbe45a066b96f40">nats.h</a></li>
+<li>jsPubAckErrHandler&#160;:&#160;<a class="el" href="group__callbacks_group.html#ga954768cc1d3388bb6ab723e777647992">nats.h</a></li>
+<li>jsPubAckHandler&#160;:&#160;<a class="el" href="group__callbacks_group.html#ga4f66e065bd918f02510d4c53d8a5b729">nats.h</a></li>
+<li>jsPubOptions&#160;:&#160;<a class="el" href="group__types_group.html#ga7bbea3575d35dcdbfc9b766b04269eb7">nats.h</a></li>
+<li>jsPubOptions_Init()&#160;:&#160;<a class="el" href="group__js_pub_group.html#gaf09f333a8675a8060c5ede07a6bdeef9">nats.h</a></li>
+<li>JSRaftGeneralErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa023de74e8bedf88c2f5e4b21e62ea4b">status.h</a></li>
+<li>jsReplayPolicy&#160;:&#160;<a class="el" href="group__types_group.html#ga8650faf52b0b6b23df376eebeb9d0354">nats.h</a></li>
+<li>jsRePublish&#160;:&#160;<a class="el" href="group__types_group.html#gab991313d33ce270a882e4d0756c138f6">nats.h</a></li>
+<li>jsRePublish_Init()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga388bfeaa5a78ebf6ce7c15c6e3a7156b">nats.h</a></li>
+<li>JSRestoreSubscribeFailedErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4963c5ecd065d3e336daf80a7cd1aa57">status.h</a></li>
+<li>jsRetentionPolicy&#160;:&#160;<a class="el" href="group__types_group.html#ga410f8fb053efa02b2ca1de0c02fa4b6d">nats.h</a></li>
+<li>JSSequence&#160;:&#160;<a class="el" href="nats_8h.html#a1c0a11996b44abc16a4f444ee4c1cb94">nats.h</a></li>
+<li>jsSequenceInfo&#160;:&#160;<a class="el" href="group__types_group.html#ga27e1a5d5b513f9eb7d61a17db71f8003">nats.h</a></li>
+<li>JSSequenceNotFoundErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1eaa16332bbe6cb041adbb60383f944c">status.h</a></li>
+<li>jsSequencePair&#160;:&#160;<a class="el" href="group__types_group.html#ga39011d30b295759b7f6ca0a7539dff8f">nats.h</a></li>
+<li>JSSnapshotDeliverSubjectInvalidErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae4eaa258a64f5c12d7fe50ce4c9c6de5">status.h</a></li>
+<li>JSSourceConsumerSetupFailedErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aeaeb1f487667a8d7643cc97bf7b3892a">status.h</a></li>
+<li>JSSourceMaxMessageSizeTooBigErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ac75e39643f73b184b22330939c4a564e">status.h</a></li>
+<li>JSStorageResourcesExceededErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2f4ee662c9cbaa0355c52de1c2463160">status.h</a></li>
+<li>jsStorageType&#160;:&#160;<a class="el" href="group__types_group.html#ga1802a53c79e667f093bba033b16adc98">nats.h</a></li>
+<li>JSStream&#160;:&#160;<a class="el" href="nats_8h.html#aa2f2c14de864839a2ff7ea34415d37e0">nats.h</a></li>
+<li>JSStreamAssignmentErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2107facbac830a905217916c7d24297a">status.h</a></li>
+<li>jsStreamConfig&#160;:&#160;<a class="el" href="group__types_group.html#ga26fd6a73df327ca3c271e46ddefc8acf">nats.h</a></li>
+<li>jsStreamConfig_Init()&#160;:&#160;<a class="el" href="group__js_assets_group.html#gac230f71dbdc4d10bc7471d01763881d6">nats.h</a></li>
+<li>JSStreamCreateErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a866a56223b3e4119184cee9523f98008">status.h</a></li>
+<li>JSStreamDeleteErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a85f7eee9cccd626e7b99d46c6f076322">status.h</a></li>
+<li>JSStreamExternalApiOverlapErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3799b98b675eeca3403a1728bd0cd5f8">status.h</a></li>
+<li>JSStreamExternalDelPrefixOverlapsErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aea055a7802194f8f1e802a8fc461f83a">status.h</a></li>
+<li>JSStreamGeneralError&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abc4bf9a7703ef8d3fbf2b1ad2ece3717">status.h</a></li>
+<li>jsStreamInfo&#160;:&#160;<a class="el" href="group__types_group.html#ga2629c9454996edf7914be36a9e44921b">nats.h</a></li>
+<li>jsStreamInfo_Destroy()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga8ee87ef86e94be42685941abe9638bbd">nats.h</a></li>
+<li>jsStreamInfoList&#160;:&#160;<a class="el" href="group__types_group.html#ga1e54c2a1bc94834d1670875fc151f565">nats.h</a></li>
+<li>jsStreamInfoList_Destroy()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga38cdcc339eb8976d23296b99aa37d629">nats.h</a></li>
+<li>JSStreamInfoMaxSubjectsErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7b5cebb5aaebd7b3bfa43f5457e97553">status.h</a></li>
+<li>JSStreamInvalidConfig&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a0c34c56b62e4246560efabd5c762aa03">status.h</a></li>
+<li>JSStreamInvalidErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af0506e3abc3846721ae15755c2a1eb47">status.h</a></li>
+<li>JSStreamInvalidExternalDeliverySubjErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7a89433d532a863561087229b19a525f">status.h</a></li>
+<li>JSStreamLimitsErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4f192c39f1d7244ceb639053fad86393">status.h</a></li>
+<li>JSStreamMaxBytesRequiredErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a61cd7aa9b9e02f410465a61a085fa209">status.h</a></li>
+<li>JSStreamMaxStreamBytesExceededErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a60fd558fc8d0f31b895c7b579ba0c8b7">status.h</a></li>
+<li>JSStreamMessageExceedsMaximumErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a519d32e9718662347753ebffaf731889">status.h</a></li>
+<li>JSStreamMirrorNotUpdatableErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a54084c4f82593cf516cd604b34c0dce8">status.h</a></li>
+<li>JSStreamMismatchErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a80d0a9f218207a11b4cc19b9c2aec83f">status.h</a></li>
+<li>JSStreamMoveAndScaleErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a584d0bf058191cf2257d934f0bc5935c">status.h</a></li>
+<li>JSStreamMoveInProgressErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abf7739c7a0569149ed24ae8b9fbaf889">status.h</a></li>
+<li>JSStreamMsgDeleteFailed&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab379e2a2038276dc1eb539bda2e60b68">status.h</a></li>
+<li>JSStreamNameExistErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af68cc43ff7ed51f5557329c35fba949c">status.h</a></li>
+<li>jsStreamNamesList&#160;:&#160;<a class="el" href="group__types_group.html#gaf4d31a4dc83b2805422beafb1f8fa000">nats.h</a></li>
+<li>jsStreamNamesList_Destroy()&#160;:&#160;<a class="el" href="group__js_assets_group.html#gaf8644f281d4e24893a6a170b4f7faa65">nats.h</a></li>
+<li>JSStreamNotFoundErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6a2a1cbd9c2e2dc6dff4fb84be741e0f">status.h</a></li>
+<li>JSStreamNotMatchErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6b4c22a03ad4769d09599ac9a75e6435">status.h</a></li>
+<li>JSStreamOfflineErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7c88e5ccabcb2debe1ce0c1a05bbe18b">status.h</a></li>
+<li>JSStreamPurgeFailedErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a33f2e301313339eded6163982a680186">status.h</a></li>
+<li>JSStreamReplicasNotSupportedErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a8f7f888318e9107bb361d4946197c4c1">status.h</a></li>
+<li>JSStreamReplicasNotUpdatableErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a58db02b3e72f3b20300344f97c5c7b34">status.h</a></li>
+<li>JSStreamRestoreErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab5213fbb08e833e1c69b8c93c8114506">status.h</a></li>
+<li>JSStreamRollupFailedErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70affa3c8139019a077fac6d403d7ed0522">status.h</a></li>
+<li>JSStreamSealedErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9bd3f4f7a2eca1f1ed49cc0499cb9c78">status.h</a></li>
+<li>JSStreamSequenceNotMatchErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a64dbcba923d50e6f258db59b85eb8b17">status.h</a></li>
+<li>JSStreamSnapshotErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ac3d700ce84bc5df96c383079b093cc45">status.h</a></li>
+<li>jsStreamSource&#160;:&#160;<a class="el" href="group__types_group.html#gab4c43c87d81917aab748a50eee028449">nats.h</a></li>
+<li>jsStreamSource_Init()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga7fe8e0bf98a38eb59372e7cd78aaaf56">nats.h</a></li>
+<li>jsStreamSourceInfo&#160;:&#160;<a class="el" href="group__types_group.html#gab2f33f57188a550f2f747d4f27bc24bd">nats.h</a></li>
+<li>jsStreamState&#160;:&#160;<a class="el" href="group__types_group.html#ga2bfd6de6ffc84d767482b3dd57cb9271">nats.h</a></li>
+<li>jsStreamStateSubject&#160;:&#160;<a class="el" href="group__types_group.html#ga55dce2fa9ecd215716cc9ceece7dfefa">nats.h</a></li>
+<li>jsStreamStateSubjects&#160;:&#160;<a class="el" href="group__types_group.html#gae8b57d9c40364f97a705f3e61a1156b0">nats.h</a></li>
+<li>JSStreamStoreFailedErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab7df189a360a1d483f9eca4869abdca8">status.h</a></li>
+<li>JSStreamSubjectOverlapErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3e55a221685d96d96c514d6d5c652570">status.h</a></li>
+<li>JSStreamTemplateCreateErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1efc26df606f855cfb9993cbe95c0f46">status.h</a></li>
+<li>JSStreamTemplateDeleteErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a514184778ad2fa5cf2deaffc0c406272">status.h</a></li>
+<li>JSStreamTemplateNotFoundErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3552ffc73e39c13d14ae35f52cd3ead7">status.h</a></li>
+<li>JSStreamUpdateErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a475581c5dfbabb52334ce28013382b58">status.h</a></li>
+<li>JSStreamWrongLastMsgIDErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70adc58d142e277166a57672812df6f2c3e">status.h</a></li>
+<li>JSStreamWrongLastSequenceErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aaa5d8be08323568b5f7295feb10d73b4">status.h</a></li>
+<li>JSSubject&#160;:&#160;<a class="el" href="nats_8h.html#a3776aa9985557f0c6e382b01d2e3f602">nats.h</a></li>
+<li>jsSubOptions&#160;:&#160;<a class="el" href="group__types_group.html#gaccfaac2079656ffd40d003e4de5d2280">nats.h</a></li>
+<li>jsSubOptions_Init()&#160;:&#160;<a class="el" href="group__js_sub_group.html#ga472adb949d1af9d8f07bda99f5d7f3f8">nats.h</a></li>
+<li>JSTemplateNameNotMatchSubjectErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab9e493c8837af5f62c6110493c6a70ac">status.h</a></li>
+<li>JSTempStorageFailedErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ad07006ca41165d13442df8e62ef3f398">status.h</a></li>
+<li>jsTier&#160;:&#160;<a class="el" href="group__types_group.html#ga1d48d3eb36b50c9ab6d8477dccf247d8">nats.h</a></li>
+<li>JSTimeStamp&#160;:&#160;<a class="el" href="nats_8h.html#a5525cb01f8b0aec73cb13f3276449e0e">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/globals_d.html b/doc/html/globals_d.html
new file mode 100644 (file)
index 0000000..2e5990c
--- /dev/null
@@ -0,0 +1,153 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<title>NATS C Client with Streaming support: File Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<script type="text/javascript">
+  $(document).ready(initResizable);
+  $(window).load(resizeHeight);
+</script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<script type="text/javascript">
+  $(document).ready(function() { init_search(); });
+</script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with Streaming support
+   &#160;<span id="projectnumber">1.8.0-beta</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.11 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+  <div id="navrow1" class="tabs">
+    <ul class="tablist">
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
+      <li><a href="modules.html"><span>Modules</span></a></li>
+      <li class="current"><a href="files.html"><span>Files</span></a></li>
+      <li>
+        <div id="MSearchBox" class="MSearchBoxInactive">
+        <span class="left">
+          <img id="MSearchSelect" src="search/mag_sel.png"
+               onmouseover="return searchBox.OnSearchSelectShow()"
+               onmouseout="return searchBox.OnSearchSelectHide()"
+               alt=""/>
+          <input type="text" id="MSearchField" value="Search" accesskey="S"
+               onfocus="searchBox.OnSearchFieldFocus(true)" 
+               onblur="searchBox.OnSearchFieldFocus(false)" 
+               onkeyup="searchBox.OnSearchFieldChange(event)"/>
+          </span><span class="right">
+            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
+          </span>
+        </div>
+      </li>
+    </ul>
+  </div>
+  <div id="navrow2" class="tabs2">
+    <ul class="tablist">
+      <li><a href="files.html"><span>File&#160;List</span></a></li>
+      <li class="current"><a href="globals.html"><span>File&#160;Members</span></a></li>
+    </ul>
+  </div>
+  <div id="navrow3" class="tabs2">
+    <ul class="tablist">
+      <li class="current"><a href="globals.html"><span>All</span></a></li>
+      <li><a href="globals_func.html"><span>Functions</span></a></li>
+      <li><a href="globals_type.html"><span>Typedefs</span></a></li>
+      <li><a href="globals_enum.html"><span>Enumerations</span></a></li>
+      <li><a href="globals_eval.html"><span>Enumerator</span></a></li>
+      <li><a href="globals_defs.html"><span>Macros</span></a></li>
+    </ul>
+  </div>
+  <div id="navrow4" class="tabs3">
+    <ul class="tablist">
+      <li><a href="globals.html#index_c"><span>c</span></a></li>
+      <li class="current"><a href="globals_d.html#index_d"><span>d</span></a></li>
+      <li><a href="globals_n.html#index_n"><span>n</span></a></li>
+      <li><a href="globals_r.html#index_r"><span>r</span></a></li>
+      <li><a href="globals_s.html#index_s"><span>s</span></a></li>
+    </ul>
+  </div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+$(document).ready(function(){initNavTree('globals_d.html','');});
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0" 
+        name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="contents">
+<div class="textblock">Here is a list of all file members with links to the files they belong to:</div>
+
+<h3><a class="anchor" id="index_d"></a>- d -</h3><ul>
+<li>DISCONNECTED
+: <a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51acdaad1112073e3e2ea032424c38c34e1">status.h</a>
+</li>
+<li>DRAINING_PUBS
+: <a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51a4695d39612939404418c91ce1fb1ef35">status.h</a>
+</li>
+<li>DRAINING_SUBS
+: <a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51a99eeb21948b2d1fb98bcad33a87fc322">status.h</a>
+</li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/globals_defs.html b/doc/html/globals_defs.html
new file mode 100644 (file)
index 0000000..4064136
--- /dev/null
@@ -0,0 +1,119 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: File Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('globals_defs.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+&#160;<ul>
+<li>JSLastSequence&#160;:&#160;<a class="el" href="nats_8h.html#ae18fb15ea8130a650e904e5153eb30d5">nats.h</a></li>
+<li>JSMsgRollup&#160;:&#160;<a class="el" href="nats_8h.html#a3938efee417dc67ff2bcf62f913f9054">nats.h</a></li>
+<li>JSMsgRollupAll&#160;:&#160;<a class="el" href="nats_8h.html#acc62d11b7e67fe3feb74acdfa4a6e8ac">nats.h</a></li>
+<li>JSMsgRollupSubject&#160;:&#160;<a class="el" href="nats_8h.html#ad22dce8f66bae9b3e1027790d9c95c09">nats.h</a></li>
+<li>JSMsgSize&#160;:&#160;<a class="el" href="nats_8h.html#a5ce9005964bd9cf0604a9ef1afa87ea4">nats.h</a></li>
+<li>JSSequence&#160;:&#160;<a class="el" href="nats_8h.html#a1c0a11996b44abc16a4f444ee4c1cb94">nats.h</a></li>
+<li>JSStream&#160;:&#160;<a class="el" href="nats_8h.html#aa2f2c14de864839a2ff7ea34415d37e0">nats.h</a></li>
+<li>JSSubject&#160;:&#160;<a class="el" href="nats_8h.html#a3776aa9985557f0c6e382b01d2e3f602">nats.h</a></li>
+<li>JSTimeStamp&#160;:&#160;<a class="el" href="nats_8h.html#a5525cb01f8b0aec73cb13f3276449e0e">nats.h</a></li>
+<li>NATS_DEFAULT_URL&#160;:&#160;<a class="el" href="nats_8h.html#a911c54900b46b968205871cd9f68d36c">nats.h</a></li>
+<li>NATS_EXTERN&#160;:&#160;<a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/globals_dup.js b/doc/html/globals_dup.js
new file mode 100644 (file)
index 0000000..e8fa338
--- /dev/null
@@ -0,0 +1,7 @@
+var globals_dup =
+[
+    [ "j", "globals.html", null ],
+    [ "k", "globals_k.html", null ],
+    [ "n", "globals_n.html", null ],
+    [ "s", "globals_s.html", null ]
+];
\ No newline at end of file
diff --git a/doc/html/globals_enum.html b/doc/html/globals_enum.html
new file mode 100644 (file)
index 0000000..65be453
--- /dev/null
@@ -0,0 +1,118 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: File Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('globals_enum.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+&#160;<ul>
+<li>jsAckPolicy&#160;:&#160;<a class="el" href="group__types_group.html#ga8fcb50e6e7312834791f9e237d28e873">nats.h</a></li>
+<li>jsDeliverPolicy&#160;:&#160;<a class="el" href="group__types_group.html#ga117ed2c35f89ef3144540ed9cbadc818">nats.h</a></li>
+<li>jsDiscardPolicy&#160;:&#160;<a class="el" href="group__types_group.html#ga7f88b7d482488398074f9d1419a9b8c2">nats.h</a></li>
+<li>jsErrCode&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">status.h</a></li>
+<li>jsReplayPolicy&#160;:&#160;<a class="el" href="group__types_group.html#ga8650faf52b0b6b23df376eebeb9d0354">nats.h</a></li>
+<li>jsRetentionPolicy&#160;:&#160;<a class="el" href="group__types_group.html#ga410f8fb053efa02b2ca1de0c02fa4b6d">nats.h</a></li>
+<li>jsStorageType&#160;:&#160;<a class="el" href="group__types_group.html#ga1802a53c79e667f093bba033b16adc98">nats.h</a></li>
+<li>kvOperation&#160;:&#160;<a class="el" href="group__types_group.html#ga89db3bd6bf11af3ac5eb3ab560d16332">nats.h</a></li>
+<li>natsConnStatus&#160;:&#160;<a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51">status.h</a></li>
+<li>natsStatus&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">status.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/globals_eval.html b/doc/html/globals_eval.html
new file mode 100644 (file)
index 0000000..986cac9
--- /dev/null
@@ -0,0 +1,308 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: File Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('globals_eval.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+&#160;
+
+<h3><a id="index_j" name="index_j"></a>- j -</h3><ul>
+<li>js_AckAll&#160;:&#160;<a class="el" href="group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873a1232af28bf4e4b82e962174f1432ed4a">nats.h</a></li>
+<li>js_AckExplicit&#160;:&#160;<a class="el" href="group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873a02d46a6395933c55c95ee5194bb6b80e">nats.h</a></li>
+<li>js_AckNone&#160;:&#160;<a class="el" href="group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873afd91fe31cf57c68863ca3090b07c296c">nats.h</a></li>
+<li>js_DeliverAll&#160;:&#160;<a class="el" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818ac692ba1363103768ac4bb58695549758">nats.h</a></li>
+<li>js_DeliverByStartSequence&#160;:&#160;<a class="el" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a06299d9c8262a16306ba6cc16d293c5e">nats.h</a></li>
+<li>js_DeliverByStartTime&#160;:&#160;<a class="el" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a33317133d42f21bf5919827a691543f6">nats.h</a></li>
+<li>js_DeliverLast&#160;:&#160;<a class="el" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818abbd81d6c4e0f17f30e2186f1335e991d">nats.h</a></li>
+<li>js_DeliverLastPerSubject&#160;:&#160;<a class="el" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818abb50ebcd2fbafe27038c966121b9407b">nats.h</a></li>
+<li>js_DeliverNew&#160;:&#160;<a class="el" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a82b8d36e17391212398984f92db9c381">nats.h</a></li>
+<li>js_DiscardNew&#160;:&#160;<a class="el" href="group__types_group.html#gga7f88b7d482488398074f9d1419a9b8c2a99d7f2d740af26c340c0a4e2b72fb6ab">nats.h</a></li>
+<li>js_DiscardOld&#160;:&#160;<a class="el" href="group__types_group.html#gga7f88b7d482488398074f9d1419a9b8c2abb31b828421634f1e6a1ef9359bc91f6">nats.h</a></li>
+<li>js_FileStorage&#160;:&#160;<a class="el" href="group__types_group.html#gga1802a53c79e667f093bba033b16adc98a1d9dad1854cf374b22e3688b98284dec">nats.h</a></li>
+<li>js_InterestPolicy&#160;:&#160;<a class="el" href="group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6dae874de4a787cfbec4c6d0eb1a3f05ebd">nats.h</a></li>
+<li>js_LimitsPolicy&#160;:&#160;<a class="el" href="group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6da6a2aa02f32acec6526d81f6e974e690f">nats.h</a></li>
+<li>js_MemoryStorage&#160;:&#160;<a class="el" href="group__types_group.html#gga1802a53c79e667f093bba033b16adc98a428ed10448726ad01c1db77a7f748314">nats.h</a></li>
+<li>js_ReplayInstant&#160;:&#160;<a class="el" href="group__types_group.html#gga8650faf52b0b6b23df376eebeb9d0354a2c4a1e2b75f31dd69a89b541d75afa44">nats.h</a></li>
+<li>js_ReplayOriginal&#160;:&#160;<a class="el" href="group__types_group.html#gga8650faf52b0b6b23df376eebeb9d0354a6ee3851dac5c90a61492193dd55931f5">nats.h</a></li>
+<li>js_WorkQueuePolicy&#160;:&#160;<a class="el" href="group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6daf7e6581e69572691b01d1294a3c3a478">nats.h</a></li>
+<li>JSAccountResourcesExceededErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a26a33a6e2296eb0ac0370176fb08ed9a">status.h</a></li>
+<li>JSBadRequestErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70acedca75c7ec69c5573da7013f69ede13">status.h</a></li>
+<li>JSClusterIncompleteErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aea64a5a017836108cf3da113ad57b6f9">status.h</a></li>
+<li>JSClusterNoPeersErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae9b8b81043fea45985f8c29f108594fb">status.h</a></li>
+<li>JSClusterNotActiveErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af1efbfa8ad648bf47b4304ea58b0df8c">status.h</a></li>
+<li>JSClusterNotAssignedErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a99265bcfa283741c3711337dac6718f0">status.h</a></li>
+<li>JSClusterNotAvailErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4ae7ffdfb53fb238a76ebe19c7482696">status.h</a></li>
+<li>JSClusterNotLeaderErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a32546264d1f24fc9dafe490212bfd893">status.h</a></li>
+<li>JSClusterPeerNotMemberErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae7479c265d0e8cace4ab19a59cfcbbbb">status.h</a></li>
+<li>JSClusterRequiredErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a46321fc22a103908324b72259832af60">status.h</a></li>
+<li>JSClusterServerNotMemberErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aafa71c9cafc975d1a69889f6bf166e93">status.h</a></li>
+<li>JSClusterTagsErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a66240027007033c67fec04f4298311c4">status.h</a></li>
+<li>JSClusterUnSupportFeatureErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a84864e4bba24ee7354e5bae293c93d00">status.h</a></li>
+<li>JSConsumerBadDurableNameErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa0ca5a2e539cec9d33f433f28f2780fe">status.h</a></li>
+<li>JSConsumerConfigRequiredErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4a95591dfc0e2ccb1d3ac1b3a04f618f">status.h</a></li>
+<li>JSConsumerCreateErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af86c9c188aaa34a76eee96de9bf6e989">status.h</a></li>
+<li>JSConsumerDeliverCycleErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70afc70c6a72061d9c26017a5cf5dec729b">status.h</a></li>
+<li>JSConsumerDeliverToWildcardsErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4712c1322585d712cef9b67cd03a3e00">status.h</a></li>
+<li>JSConsumerDescriptionTooLongErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab1b6c048b0326e3f705b470e5a7f11f5">status.h</a></li>
+<li>JSConsumerDirectRequiresEphemeralErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6181f797cb27c92473585893b92b95b0">status.h</a></li>
+<li>JSConsumerDirectRequiresPushErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a968eff1142ca2f39f3da3da175aeda92">status.h</a></li>
+<li>JSConsumerDurableNameNotInSubjectErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aff9a4fe19078ac3e814989442beaa3a6">status.h</a></li>
+<li>JSConsumerDurableNameNotMatchSubjectErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a17c212f9409e4bd9db060bd2796905e4">status.h</a></li>
+<li>JSConsumerDurableNameNotSetErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9d9319d172e0a8147949bf40f1b29f28">status.h</a></li>
+<li>JSConsumerEphemeralWithDurableInSubjectErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4ef7a2042b48d5e0916e7e90fe691ab3">status.h</a></li>
+<li>JSConsumerEphemeralWithDurableNameErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1381bb653998c6ca8b88002d0fe0c829">status.h</a></li>
+<li>JSConsumerExistingActiveErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a86407070c2bbe04d97a25f2ceda4ea58">status.h</a></li>
+<li>JSConsumerFCRequiresPushErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a557d48b0334c5ceec0f0ee7cc74d8e79">status.h</a></li>
+<li>JSConsumerFilterNotSubsetErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a0f2007fc94103909ece328bbd77b0cdb">status.h</a></li>
+<li>JSConsumerHBRequiresPushErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6d4bed940055aa46a188a2419a531c63">status.h</a></li>
+<li>JSConsumerInvalidDeliverSubjectErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa1242d9e6509f08c01c3373d0e66dc96">status.h</a></li>
+<li>JSConsumerInvalidPolicyErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a801182af5b4a6b9547d81ec45864b1f3">status.h</a></li>
+<li>JSConsumerInvalidSamplingErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab19f95018dff644423d6f34b682d365e">status.h</a></li>
+<li>JSConsumerMaxDeliverBackoffErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af7c1cf2c692140c4b28ebfc47acb0c41">status.h</a></li>
+<li>JSConsumerMaxPendingAckExcessErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ac4afe1d580083bd55c36b3e55a5ef479">status.h</a></li>
+<li>JSConsumerMaxPendingAckPolicyRequiredErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a429a21189134500589ed67ac3701aff4">status.h</a></li>
+<li>JSConsumerMaxRequestBatchExceededErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a597c98a0637cec454b724b049098cee8">status.h</a></li>
+<li>JSConsumerMaxRequestBatchNegativeErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abca8571110c4244d218c2dc1779d8786">status.h</a></li>
+<li>JSConsumerMaxRequestExpiresToSmallErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9c1c31813a713fcee44ec06728cc6382">status.h</a></li>
+<li>JSConsumerMaxWaitingNegativeErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a27579bca64e6f40f9590ef51ac03a219">status.h</a></li>
+<li>JSConsumerNameExistErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4f59c55a24136405b6767e0bf21182c8">status.h</a></li>
+<li>JSConsumerNameTooLongErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3b1ce6536b249952dc3fb6fe5448140f">status.h</a></li>
+<li>JSConsumerNotFoundErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9eef13e3281a879f36a30e246fb6021b">status.h</a></li>
+<li>JSConsumerOfflineErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa0eb191886a17e917f2fa0eaa81d4b61">status.h</a></li>
+<li>JSConsumerOnMappedErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6b6aaaa23b1af2caf959529287b2a847">status.h</a></li>
+<li>JSConsumerPullNotDurableErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a407efbf6c688cb93fcded08acd2a08ed">status.h</a></li>
+<li>JSConsumerPullRequiresAckErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abd3f17c5d6ea86c38c3d8ade18b8445a">status.h</a></li>
+<li>JSConsumerPullWithRateLimitErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2a8844e5d20c55d753ec64bbde4561c8">status.h</a></li>
+<li>JSConsumerPushMaxWaitingErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a914926025dffa9c9b9604646b9e5675e">status.h</a></li>
+<li>JSConsumerReplacementWithDifferentNameErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a051bfd5e3bb9ba2b2398e6501426bc63">status.h</a></li>
+<li>JSConsumerReplicasExceedsStreamErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1d159f128cd9b261b5270f7e36ed22d1">status.h</a></li>
+<li>JSConsumerSmallHeartbeatErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9422b53061166a064e39d360d21827fd">status.h</a></li>
+<li>JSConsumerStoreFailedErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2984e6b8850b6cfed9506a25bcbe0608">status.h</a></li>
+<li>JSConsumerWithFlowControlNeedsHeartbeatsErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abc25cc794fce2ab7b9757ff506de51c3">status.h</a></li>
+<li>JSConsumerWQConsumerNotDeliverAllErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a00b4ce854e473bb8f49d91c0f982c6f9">status.h</a></li>
+<li>JSConsumerWQConsumerNotUniqueErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a5f7b670b9202311da41e6e5026e810d2">status.h</a></li>
+<li>JSConsumerWQMultipleUnfilteredErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7adbc8c115996a6f0dfc98fcaac8f09d">status.h</a></li>
+<li>JSConsumerWQRequiresExplicitAckErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a76dad06168a8d57e829876c2fcd3af56">status.h</a></li>
+<li>JSInsufficientResourcesErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ad1ec102705e46b5343c2680162f58f49">status.h</a></li>
+<li>JSInvalidJSONErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a50c0beab390506fc6d3495325c0230c1">status.h</a></li>
+<li>JSMaximumConsumersLimitErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa1b904de1494d20f540c8075f502af24">status.h</a></li>
+<li>JSMaximumStreamsLimitErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a739799359c3988ea18fe861eaff6f1f5">status.h</a></li>
+<li>JSMemoryResourcesExceededErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae3ac6ea1656f4fcc750ba2ab1649fb57">status.h</a></li>
+<li>JSMirrorConsumerSetupFailedErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a94a9b10d712ed764de27a007ac7f04eb">status.h</a></li>
+<li>JSMirrorMaxMessageSizeTooBigErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a91020cf9692a06637bdfedd847b259f1">status.h</a></li>
+<li>JSMirrorWithSourcesErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aaad93c7c34cd3283df7369479d4cdb7c">status.h</a></li>
+<li>JSMirrorWithStartSeqAndTimeErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a600ddc1915d8bb928fd37f1539440eb3">status.h</a></li>
+<li>JSMirrorWithSubjectFiltersErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70afcfb372eb2a607f821ad110815acf9d7">status.h</a></li>
+<li>JSMirrorWithSubjectsErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a0dc0fcc88a8b39f03924d50ccf731043">status.h</a></li>
+<li>JSNoAccountErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a91773a41522fe9a464a0fb28a96b497b">status.h</a></li>
+<li>JSNoLimitsErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70acfa2c06f8baef07cd96a3627ddea641b">status.h</a></li>
+<li>JSNoMessageFoundErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a02a521ae52b716a669a3556d63a21410">status.h</a></li>
+<li>JSNotEmptyRequestErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab23b8553efea2ee0008098fcb109f690">status.h</a></li>
+<li>JSNotEnabledErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70afe9c20cdb1e88744d9a5f52977e95d1c">status.h</a></li>
+<li>JSNotEnabledForAccountErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa88122abfaf173f0411a3642803aac04">status.h</a></li>
+<li>JSPeerRemapErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4d68fa855750f16fdf38c9ed93acacda">status.h</a></li>
+<li>JSRaftGeneralErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa023de74e8bedf88c2f5e4b21e62ea4b">status.h</a></li>
+<li>JSRestoreSubscribeFailedErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4963c5ecd065d3e336daf80a7cd1aa57">status.h</a></li>
+<li>JSSequenceNotFoundErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1eaa16332bbe6cb041adbb60383f944c">status.h</a></li>
+<li>JSSnapshotDeliverSubjectInvalidErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae4eaa258a64f5c12d7fe50ce4c9c6de5">status.h</a></li>
+<li>JSSourceConsumerSetupFailedErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aeaeb1f487667a8d7643cc97bf7b3892a">status.h</a></li>
+<li>JSSourceMaxMessageSizeTooBigErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ac75e39643f73b184b22330939c4a564e">status.h</a></li>
+<li>JSStorageResourcesExceededErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2f4ee662c9cbaa0355c52de1c2463160">status.h</a></li>
+<li>JSStreamAssignmentErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2107facbac830a905217916c7d24297a">status.h</a></li>
+<li>JSStreamCreateErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a866a56223b3e4119184cee9523f98008">status.h</a></li>
+<li>JSStreamDeleteErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a85f7eee9cccd626e7b99d46c6f076322">status.h</a></li>
+<li>JSStreamExternalApiOverlapErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3799b98b675eeca3403a1728bd0cd5f8">status.h</a></li>
+<li>JSStreamExternalDelPrefixOverlapsErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aea055a7802194f8f1e802a8fc461f83a">status.h</a></li>
+<li>JSStreamGeneralError&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abc4bf9a7703ef8d3fbf2b1ad2ece3717">status.h</a></li>
+<li>JSStreamInfoMaxSubjectsErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7b5cebb5aaebd7b3bfa43f5457e97553">status.h</a></li>
+<li>JSStreamInvalidConfig&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a0c34c56b62e4246560efabd5c762aa03">status.h</a></li>
+<li>JSStreamInvalidErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af0506e3abc3846721ae15755c2a1eb47">status.h</a></li>
+<li>JSStreamInvalidExternalDeliverySubjErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7a89433d532a863561087229b19a525f">status.h</a></li>
+<li>JSStreamLimitsErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4f192c39f1d7244ceb639053fad86393">status.h</a></li>
+<li>JSStreamMaxBytesRequiredErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a61cd7aa9b9e02f410465a61a085fa209">status.h</a></li>
+<li>JSStreamMaxStreamBytesExceededErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a60fd558fc8d0f31b895c7b579ba0c8b7">status.h</a></li>
+<li>JSStreamMessageExceedsMaximumErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a519d32e9718662347753ebffaf731889">status.h</a></li>
+<li>JSStreamMirrorNotUpdatableErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a54084c4f82593cf516cd604b34c0dce8">status.h</a></li>
+<li>JSStreamMismatchErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a80d0a9f218207a11b4cc19b9c2aec83f">status.h</a></li>
+<li>JSStreamMoveAndScaleErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a584d0bf058191cf2257d934f0bc5935c">status.h</a></li>
+<li>JSStreamMoveInProgressErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abf7739c7a0569149ed24ae8b9fbaf889">status.h</a></li>
+<li>JSStreamMsgDeleteFailed&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab379e2a2038276dc1eb539bda2e60b68">status.h</a></li>
+<li>JSStreamNameExistErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af68cc43ff7ed51f5557329c35fba949c">status.h</a></li>
+<li>JSStreamNotFoundErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6a2a1cbd9c2e2dc6dff4fb84be741e0f">status.h</a></li>
+<li>JSStreamNotMatchErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6b4c22a03ad4769d09599ac9a75e6435">status.h</a></li>
+<li>JSStreamOfflineErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7c88e5ccabcb2debe1ce0c1a05bbe18b">status.h</a></li>
+<li>JSStreamPurgeFailedErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a33f2e301313339eded6163982a680186">status.h</a></li>
+<li>JSStreamReplicasNotSupportedErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a8f7f888318e9107bb361d4946197c4c1">status.h</a></li>
+<li>JSStreamReplicasNotUpdatableErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a58db02b3e72f3b20300344f97c5c7b34">status.h</a></li>
+<li>JSStreamRestoreErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab5213fbb08e833e1c69b8c93c8114506">status.h</a></li>
+<li>JSStreamRollupFailedErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70affa3c8139019a077fac6d403d7ed0522">status.h</a></li>
+<li>JSStreamSealedErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9bd3f4f7a2eca1f1ed49cc0499cb9c78">status.h</a></li>
+<li>JSStreamSequenceNotMatchErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a64dbcba923d50e6f258db59b85eb8b17">status.h</a></li>
+<li>JSStreamSnapshotErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ac3d700ce84bc5df96c383079b093cc45">status.h</a></li>
+<li>JSStreamStoreFailedErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab7df189a360a1d483f9eca4869abdca8">status.h</a></li>
+<li>JSStreamSubjectOverlapErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3e55a221685d96d96c514d6d5c652570">status.h</a></li>
+<li>JSStreamTemplateCreateErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1efc26df606f855cfb9993cbe95c0f46">status.h</a></li>
+<li>JSStreamTemplateDeleteErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a514184778ad2fa5cf2deaffc0c406272">status.h</a></li>
+<li>JSStreamTemplateNotFoundErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3552ffc73e39c13d14ae35f52cd3ead7">status.h</a></li>
+<li>JSStreamUpdateErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a475581c5dfbabb52334ce28013382b58">status.h</a></li>
+<li>JSStreamWrongLastMsgIDErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70adc58d142e277166a57672812df6f2c3e">status.h</a></li>
+<li>JSStreamWrongLastSequenceErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aaa5d8be08323568b5f7295feb10d73b4">status.h</a></li>
+<li>JSTemplateNameNotMatchSubjectErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab9e493c8837af5f62c6110493c6a70ac">status.h</a></li>
+<li>JSTempStorageFailedErr&#160;:&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ad07006ca41165d13442df8e62ef3f398">status.h</a></li>
+</ul>
+
+
+<h3><a id="index_k" name="index_k"></a>- k -</h3><ul>
+<li>kvOp_Delete&#160;:&#160;<a class="el" href="group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332a4efb91331f3307128c75af5b23362f83">nats.h</a></li>
+<li>kvOp_Purge&#160;:&#160;<a class="el" href="group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332aee19ab8144bf518e251ea2004309b657">nats.h</a></li>
+<li>kvOp_Put&#160;:&#160;<a class="el" href="group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332acc0e1da3c292cb7eb19d909c9dfd788a">nats.h</a></li>
+<li>kvOp_Unknown&#160;:&#160;<a class="el" href="group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332a0b7a6bef67e4220f5f0c4075f2ed16b6">nats.h</a></li>
+</ul>
+
+
+<h3><a id="index_n" name="index_n"></a>- n -</h3><ul>
+<li>NATS_ADDRESS_MISSING&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ae1d2c1366dbed428f6589f057acc507d">status.h</a></li>
+<li>NATS_CONN_STATUS_CLOSED&#160;:&#160;<a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51aa78753a4de2d0379078bb09cdc1acdb2">status.h</a></li>
+<li>NATS_CONN_STATUS_CONNECTED&#160;:&#160;<a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51a0dafab74b55f98cfc1d00e4d1ef38725">status.h</a></li>
+<li>NATS_CONN_STATUS_CONNECTING&#160;:&#160;<a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51a7e4d95cb29122f06e17ca4aff55cc736">status.h</a></li>
+<li>NATS_CONN_STATUS_DISCONNECTED&#160;:&#160;<a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51a08f92960811d1ff05b91a0870b4ecb92">status.h</a></li>
+<li>NATS_CONN_STATUS_DRAINING_PUBS&#160;:&#160;<a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51ac6b8b7f138f6ca285fe1f4da707b2100">status.h</a></li>
+<li>NATS_CONN_STATUS_DRAINING_SUBS&#160;:&#160;<a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51ab6f9d121707673a61cbe2c591f64fbf1">status.h</a></li>
+<li>NATS_CONN_STATUS_RECONNECTING&#160;:&#160;<a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51acfdc4826e08ce4b59f901952038e9206">status.h</a></li>
+<li>NATS_CONNECTION_AUTH_FAILED&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a473ea6cfa03490838fafee8730b48a2a">status.h</a></li>
+<li>NATS_CONNECTION_CLOSED&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a476d7bcf9a593b749e435f20a9156eff">status.h</a></li>
+<li>NATS_CONNECTION_DISCONNECTED&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80abef517217119e8446a8e3382e1f37eb3">status.h</a></li>
+<li>NATS_DRAINING&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a07fdbda44f43cef9866a75b25053c2ae">status.h</a></li>
+<li>NATS_ERR&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a40a08ae6ae17deaf390b1d0d7550791c">status.h</a></li>
+<li>NATS_FAILED_TO_INITIALIZE&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a7cb64f52c8d91d6ade3db6bc82a96c42">status.h</a></li>
+<li>NATS_ILLEGAL_STATE&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9bb78b4f245d2870040d25c450febd4b">status.h</a></li>
+<li>NATS_INSUFFICIENT_BUFFER&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a317fb9be1a80f6b1877f96a9a2db16ad">status.h</a></li>
+<li>NATS_INVALID_ARG&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a71b57630aebf5c20eecdab832c2a9235">status.h</a></li>
+<li>NATS_INVALID_QUEUE_NAME&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a8a0d239cfdfa30fe730afea65941779b">status.h</a></li>
+<li>NATS_INVALID_SUBJECT&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a790c08a7d33e3aefce07c04120c4c19e">status.h</a></li>
+<li>NATS_INVALID_SUBSCRIPTION&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a273e92a0ff3b7eaf946b4b7fa6cc6c6c">status.h</a></li>
+<li>NATS_INVALID_TIMEOUT&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a827072fc245a99a60691e1e4b173ca86">status.h</a></li>
+<li>NATS_IO_ERROR&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a44e8b2590369fb01a1479719c97c2b6f">status.h</a></li>
+<li>NATS_LINE_TOO_LONG&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a85c29dbfa6b06ffef3418cc9947ffff7">status.h</a></li>
+<li>NATS_MAX_DELIVERED_MSGS&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9a6f40b7803639ac18bdf532e93e5ad5">status.h</a></li>
+<li>NATS_MAX_PAYLOAD&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80af820300473609092a3e97a71b5af9ff9">status.h</a></li>
+<li>NATS_MISMATCH&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a22fa4802a34bac497f23e269a20a52f2">status.h</a></li>
+<li>NATS_MISSED_HEARTBEAT&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a37d80c8232775339a32805fe93e0ea7f">status.h</a></li>
+<li>NATS_NO_MEMORY&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a62ff6f5cc64399631defc0119731b514">status.h</a></li>
+<li>NATS_NO_RESPONDERS&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80aab97324e40ccfe1360080c651c330e62">status.h</a></li>
+<li>NATS_NO_SERVER&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a47034d8889521bbd300f45fdc19e1127">status.h</a></li>
+<li>NATS_NO_SERVER_SUPPORT&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a8a4e298931ba0698a72e397b1b57c885">status.h</a></li>
+<li>NATS_NOT_FOUND&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ad0229a12b17d3d12a28efed6213720d8">status.h</a></li>
+<li>NATS_NOT_INITIALIZED&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ae47047f2fac5f2f2a434fc501e5c3d4e">status.h</a></li>
+<li>NATS_NOT_PERMITTED&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ac3abc147873fe999c86431f9222eebf5">status.h</a></li>
+<li>NATS_NOT_YET_CONNECTED&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a49a1ea653ce112b3c53eedebcd60811d">status.h</a></li>
+<li>NATS_OK&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">status.h</a></li>
+<li>NATS_PROTOCOL_ERROR&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a113ffbe9a1f243582c38ebd876cb736d">status.h</a></li>
+<li>NATS_SECURE_CONNECTION_REQUIRED&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80abc76f1b31fdac4525583cc19588240dc">status.h</a></li>
+<li>NATS_SECURE_CONNECTION_WANTED&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a0aa3d1e18a2a217149fa8b1a306c9b08">status.h</a></li>
+<li>NATS_SLOW_CONSUMER&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ae93ff5b7fe31f8570308385d92d317b0">status.h</a></li>
+<li>NATS_SSL_ERROR&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a892183c32b4929388bb75dc62230ddf3">status.h</a></li>
+<li>NATS_STALE_CONNECTION&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80aa76d5e3ce051bc7510be90e73663c93d">status.h</a></li>
+<li>NATS_SYS_ERROR&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a984189ec4cfe3e7647268c99f7e49ec9">status.h</a></li>
+<li>NATS_TIMEOUT&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ab88994c9ea9889ac4d9d656d62f550ed">status.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/globals_func.html b/doc/html/globals_func.html
new file mode 100644 (file)
index 0000000..26a9587
--- /dev/null
@@ -0,0 +1,162 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: File Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('globals_func.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+&#160;
+
+<h3><a id="index_j" name="index_j"></a>- j -</h3><ul>
+<li>js_AddConsumer()&#160;:&#160;<a class="el" href="group__js_assets_group.html#gaf2efb63db150e782d9007090b49d4115">nats.h</a></li>
+<li>js_AddStream()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga5efc5136d33ba52161e6732f88f1ee75">nats.h</a></li>
+<li>js_ConsumerNames()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga690d19af55d12b82c8523d1861cef8d0">nats.h</a></li>
+<li>js_Consumers()&#160;:&#160;<a class="el" href="group__js_assets_group.html#gaf28097ede3e9ba9926fb00856e63ffd9">nats.h</a></li>
+<li>js_CreateKeyValue()&#160;:&#160;<a class="el" href="group__kv_group_mgt.html#gabc445bfe87112e56a6c73872fec6893e">nats.h</a></li>
+<li>js_DeleteConsumer()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga52fbc61759b11494db91f348a733c490">nats.h</a></li>
+<li>js_DeleteKeyValue()&#160;:&#160;<a class="el" href="group__kv_group_mgt.html#ga6bc715319560bc28359679fcdcead937">nats.h</a></li>
+<li>js_DeleteMsg()&#160;:&#160;<a class="el" href="group__js_assets_group.html#gaeba5d45abbe811c0e40830c5f26c78fd">nats.h</a></li>
+<li>js_DeleteStream()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga397e55a0b3b6d36c9bf746eee3842172">nats.h</a></li>
+<li>js_DirectGetMsg()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga62c250cecc650b1eed0fa1691893e2ae">nats.h</a></li>
+<li>js_EraseMsg()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga7158f73e183462e9a15e9802e1746ff0">nats.h</a></li>
+<li>js_GetAccountInfo()&#160;:&#160;<a class="el" href="group__js_assets_group.html#gac8965dcfc6b465fbc323aa552c606c46">nats.h</a></li>
+<li>js_GetConsumerInfo()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga2dda04757b4ab27a794b64f8d727fe23">nats.h</a></li>
+<li>js_GetLastMsg()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga6835b53da27d5721eddb3698e582cf0c">nats.h</a></li>
+<li>js_GetMsg()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga9fe289ae172f83e53ca1b1b747744c1f">nats.h</a></li>
+<li>js_GetStreamInfo()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga94cb23a35516b7779de28fcbb263180a">nats.h</a></li>
+<li>js_KeyValue()&#160;:&#160;<a class="el" href="group__kv_group_mgt.html#ga54e6c109a7c633e431b3eded286e00f6">nats.h</a></li>
+<li>js_Publish()&#160;:&#160;<a class="el" href="group__js_pub_group.html#gac6ba005531c82d9f0efa88dd6b458477">nats.h</a></li>
+<li>js_PublishAsync()&#160;:&#160;<a class="el" href="group__js_pub_group.html#ga069dfd6f0f3d96f1ff8bf2372e59900c">nats.h</a></li>
+<li>js_PublishAsyncComplete()&#160;:&#160;<a class="el" href="group__js_pub_group.html#ga24813ee9a58f00c0f21d10ab9c93b81d">nats.h</a></li>
+<li>js_PublishAsyncGetPendingList()&#160;:&#160;<a class="el" href="group__js_pub_group.html#ga2ac95a3450f77f8074fae3f2fbe7e54c">nats.h</a></li>
+<li>js_PublishMsg()&#160;:&#160;<a class="el" href="group__js_pub_group.html#ga2aceeb82fac3621aea843dd246732bdd">nats.h</a></li>
+<li>js_PublishMsgAsync()&#160;:&#160;<a class="el" href="group__js_pub_group.html#gab7e4139a48c5ee4d2155cbb43142e873">nats.h</a></li>
+<li>js_PullSubscribe()&#160;:&#160;<a class="el" href="group__js_sub_group.html#gaaeaddb73857aa4eb4901eec945ed27cd">nats.h</a></li>
+<li>js_PurgeStream()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga5a6a886c18a79caa403908bf7f7ef125">nats.h</a></li>
+<li>js_StreamNames()&#160;:&#160;<a class="el" href="group__js_assets_group.html#gac3dfc87863dbbb3c959ecde4bce905bc">nats.h</a></li>
+<li>js_Streams()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga531d91de372f0dffb8d64abecf88b0c0">nats.h</a></li>
+<li>js_Subscribe()&#160;:&#160;<a class="el" href="group__js_sub_group.html#gaa686c6efd84ef963de1925108e896515">nats.h</a></li>
+<li>js_SubscribeSync()&#160;:&#160;<a class="el" href="group__js_sub_group.html#gabacb010031e535f9fb6e2167337e8adf">nats.h</a></li>
+<li>js_UpdateConsumer()&#160;:&#160;<a class="el" href="group__js_assets_group.html#gad13ec256e24710bb237995814871e554">nats.h</a></li>
+<li>js_UpdateStream()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga75a5c44304e24481c67e17fbccc15c31">nats.h</a></li>
+<li>jsAccountInfo_Destroy()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga7c8664b38fcce8497746367d35e5f60b">nats.h</a></li>
+<li>jsConsumerConfig_Init()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga3381bb05c05bf4a8979adde68d37dd66">nats.h</a></li>
+<li>jsConsumerInfo_Destroy()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga9c1d5ed2f24ba836c10e415231f80088">nats.h</a></li>
+<li>jsConsumerInfoList_Destroy()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga421de40d8e91658353111c3f2ea90ec8">nats.h</a></li>
+<li>jsConsumerNamesList_Destroy()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga2ced0d190131460bf4608ab893dffc50">nats.h</a></li>
+<li>jsCtx_Destroy()&#160;:&#160;<a class="el" href="group__js_group.html#gacfa6ce3e60ea540e3331a09a7f3dc856">nats.h</a></li>
+<li>jsDirectGetMsgOptions_Init()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga8d835d47aed9c84ce3b8dcfea469f4cb">nats.h</a></li>
+<li>jsExternalStream_Init()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga81aebebcd79922104720da51e95020d4">nats.h</a></li>
+<li>jsFetchRequest_Init()&#160;:&#160;<a class="el" href="group__js_sub_group.html#ga1c3a62de8cd4855ae61ea4f67417a43b">nats.h</a></li>
+<li>jsMsgMetaData_Destroy()&#160;:&#160;<a class="el" href="group__js_msg.html#gaf9bf92294342bcb27053de7038606d12">nats.h</a></li>
+<li>jsOptions_Init()&#160;:&#160;<a class="el" href="group__js_group.html#ga855ff9a04888d696785cc5ede96112e4">nats.h</a></li>
+<li>jsPlacement_Init()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga223691e6831072a0b8f8103a778293b0">nats.h</a></li>
+<li>jsPubAck_Destroy()&#160;:&#160;<a class="el" href="group__js_pub_group.html#gaac130840b6db9109e72cf6ad9186dfc4">nats.h</a></li>
+<li>jsPubOptions_Init()&#160;:&#160;<a class="el" href="group__js_pub_group.html#gaf09f333a8675a8060c5ede07a6bdeef9">nats.h</a></li>
+<li>jsRePublish_Init()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga388bfeaa5a78ebf6ce7c15c6e3a7156b">nats.h</a></li>
+<li>jsStreamConfig_Init()&#160;:&#160;<a class="el" href="group__js_assets_group.html#gac230f71dbdc4d10bc7471d01763881d6">nats.h</a></li>
+<li>jsStreamInfo_Destroy()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga8ee87ef86e94be42685941abe9638bbd">nats.h</a></li>
+<li>jsStreamInfoList_Destroy()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga38cdcc339eb8976d23296b99aa37d629">nats.h</a></li>
+<li>jsStreamNamesList_Destroy()&#160;:&#160;<a class="el" href="group__js_assets_group.html#gaf8644f281d4e24893a6a170b4f7faa65">nats.h</a></li>
+<li>jsStreamSource_Init()&#160;:&#160;<a class="el" href="group__js_assets_group.html#ga7fe8e0bf98a38eb59372e7cd78aaaf56">nats.h</a></li>
+<li>jsSubOptions_Init()&#160;:&#160;<a class="el" href="group__js_sub_group.html#ga472adb949d1af9d8f07bda99f5d7f3f8">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/globals_func.js b/doc/html/globals_func.js
new file mode 100644 (file)
index 0000000..6b74400
--- /dev/null
@@ -0,0 +1,7 @@
+var globals_func =
+[
+    [ "j", "globals_func.html", null ],
+    [ "k", "globals_func_k.html", null ],
+    [ "n", "globals_func_n.html", null ],
+    [ "s", "globals_func_s.html", null ]
+];
\ No newline at end of file
diff --git a/doc/html/globals_func_k.html b/doc/html/globals_func_k.html
new file mode 100644 (file)
index 0000000..22416f0
--- /dev/null
@@ -0,0 +1,152 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: File Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('globals_func_k.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+&#160;
+
+<h3><a id="index_k" name="index_k"></a>- k -</h3><ul>
+<li>kvConfig_Init()&#160;:&#160;<a class="el" href="group__kv_group_mgt.html#ga16d4c27d8ac62bb86ba601bc40f53172">nats.h</a></li>
+<li>kvEntry_Bucket()&#160;:&#160;<a class="el" href="group__kv_entry.html#gadedbb410cce499afb535eb6641c32ca7">nats.h</a></li>
+<li>kvEntry_Created()&#160;:&#160;<a class="el" href="group__kv_entry.html#ga31ef3a2e3a7df6cf4dbb0a762737800a">nats.h</a></li>
+<li>kvEntry_Delta()&#160;:&#160;<a class="el" href="group__kv_entry.html#ga233a2d75895cfd0140cf77757592cf47">nats.h</a></li>
+<li>kvEntry_Destroy()&#160;:&#160;<a class="el" href="group__kv_entry.html#ga8359ffcdeefb9c5821e6442d0d5ee388">nats.h</a></li>
+<li>kvEntry_Key()&#160;:&#160;<a class="el" href="group__kv_entry.html#gab455f32b0abfb1361dab4b5e7d98042a">nats.h</a></li>
+<li>kvEntry_Operation()&#160;:&#160;<a class="el" href="group__kv_entry.html#ga088fd67d3d384ad7a7ddfc82535becea">nats.h</a></li>
+<li>kvEntry_Revision()&#160;:&#160;<a class="el" href="group__kv_entry.html#ga2d58abf81cb577e21a76f9c77568409f">nats.h</a></li>
+<li>kvEntry_Value()&#160;:&#160;<a class="el" href="group__kv_entry.html#ga28077f81d71a30cbce2dc81e5c9574fc">nats.h</a></li>
+<li>kvEntry_ValueLen()&#160;:&#160;<a class="el" href="group__kv_entry.html#gaf7ccc866865903f231e0431754ed2415">nats.h</a></li>
+<li>kvEntry_ValueString()&#160;:&#160;<a class="el" href="group__kv_entry.html#ga7ff6220915726600545357e31226fb65">nats.h</a></li>
+<li>kvEntryList_Destroy()&#160;:&#160;<a class="el" href="group__kv_group.html#gae783352ab81e22aa3173057d117518e6">nats.h</a></li>
+<li>kvKeysList_Destroy()&#160;:&#160;<a class="el" href="group__kv_group.html#ga02ccd58bc5062f6ce6f94bf05e3dfe45">nats.h</a></li>
+<li>kvPurgeOptions_Init()&#160;:&#160;<a class="el" href="group__kv_group.html#ga243113fd7df34ce104850ab888f04021">nats.h</a></li>
+<li>kvStatus_Bucket()&#160;:&#160;<a class="el" href="group__kv_status.html#ga1acec36db32207f21e15afc26bb5af1c">nats.h</a></li>
+<li>kvStatus_Destroy()&#160;:&#160;<a class="el" href="group__kv_status.html#ga5eb3d824c1873af705beee4798246a08">nats.h</a></li>
+<li>kvStatus_History()&#160;:&#160;<a class="el" href="group__kv_status.html#gada6f22b5659b184762cea4f45d369ee5">nats.h</a></li>
+<li>kvStatus_Replicas()&#160;:&#160;<a class="el" href="group__kv_status.html#ga86b114f4dac9f06df86101f84bd497b2">nats.h</a></li>
+<li>kvStatus_TTL()&#160;:&#160;<a class="el" href="group__kv_status.html#gaa747ad0a6182ec7a47fb47018c33d1c1">nats.h</a></li>
+<li>kvStatus_Values()&#160;:&#160;<a class="el" href="group__kv_status.html#ga2016af3c73841d8b226361e764dce158">nats.h</a></li>
+<li>kvStore_Bucket()&#160;:&#160;<a class="el" href="group__kv_group.html#gad28fdf9aae16bba308cda799fca13281">nats.h</a></li>
+<li>kvStore_Create()&#160;:&#160;<a class="el" href="group__kv_group.html#ga5289f7cd3999cfb46fb1fcb83178aec6">nats.h</a></li>
+<li>kvStore_CreateString()&#160;:&#160;<a class="el" href="group__kv_group.html#ga5726ad2e6205d2f6749be013138218ca">nats.h</a></li>
+<li>kvStore_Delete()&#160;:&#160;<a class="el" href="group__kv_group.html#ga68101d46739ca894fd7c56c8661c08d8">nats.h</a></li>
+<li>kvStore_Destroy()&#160;:&#160;<a class="el" href="group__kv_group_mgt.html#gab0d6bdbfabd27af67eaeb36cec0787da">nats.h</a></li>
+<li>kvStore_Get()&#160;:&#160;<a class="el" href="group__kv_group.html#ga2db86f80d6bfce1bdbedf1b9da22913c">nats.h</a></li>
+<li>kvStore_GetRevision()&#160;:&#160;<a class="el" href="group__kv_group.html#ga9bf43431bb8264a3ea1f0df401afbe1a">nats.h</a></li>
+<li>kvStore_History()&#160;:&#160;<a class="el" href="group__kv_group.html#ga5aa57345313cee85b020e50c22023fb5">nats.h</a></li>
+<li>kvStore_Keys()&#160;:&#160;<a class="el" href="group__kv_group.html#ga6030fc2a672ae868f7603587245b9d5a">nats.h</a></li>
+<li>kvStore_Purge()&#160;:&#160;<a class="el" href="group__kv_group.html#ga3d5fa3d895d0d3041440105b244e9ca9">nats.h</a></li>
+<li>kvStore_PurgeDeletes()&#160;:&#160;<a class="el" href="group__kv_group.html#ga34ab74b229ff88e64301ea53a274da69">nats.h</a></li>
+<li>kvStore_Put()&#160;:&#160;<a class="el" href="group__kv_group.html#ga1fdf7a1d3acf96e475184790589a401e">nats.h</a></li>
+<li>kvStore_PutString()&#160;:&#160;<a class="el" href="group__kv_group.html#ga84ebd66a95ce857765d4a16ec35daba9">nats.h</a></li>
+<li>kvStore_Status()&#160;:&#160;<a class="el" href="group__kv_group.html#gadf75e99cc28bc9c2d6eac7c9f7398c27">nats.h</a></li>
+<li>kvStore_Update()&#160;:&#160;<a class="el" href="group__kv_group.html#gae0c593bb2ef94ae60e775617c9423038">nats.h</a></li>
+<li>kvStore_UpdateString()&#160;:&#160;<a class="el" href="group__kv_group.html#ga13ed70f15cd1485cd15f96bcc4b7ad1c">nats.h</a></li>
+<li>kvStore_Watch()&#160;:&#160;<a class="el" href="group__kv_group.html#ga30feca870f580c7b9d2ad07a740505b2">nats.h</a></li>
+<li>kvStore_WatchAll()&#160;:&#160;<a class="el" href="group__kv_group.html#gaf011f1dd6813391c65664e982747602e">nats.h</a></li>
+<li>kvWatcher_Destroy()&#160;:&#160;<a class="el" href="group__kv_watcher.html#ga21bc39fa795f7c4f392bd6d4e66ea1d9">nats.h</a></li>
+<li>kvWatcher_Next()&#160;:&#160;<a class="el" href="group__kv_watcher.html#ga562c216a0199c30455af4c2da46000e5">nats.h</a></li>
+<li>kvWatcher_Stop()&#160;:&#160;<a class="el" href="group__kv_watcher.html#ga73adf44114fedd62ef75ebd81839b65e">nats.h</a></li>
+<li>kvWatchOptions_Init()&#160;:&#160;<a class="el" href="group__kv_group.html#ga762fd5de8cde683e46a6736a51e575f5">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/globals_func_n.html b/doc/html/globals_func_n.html
new file mode 100644 (file)
index 0000000..aa6e563
--- /dev/null
@@ -0,0 +1,287 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: File Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('globals_func_n.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+&#160;
+
+<h3><a id="index_n" name="index_n"></a>- n -</h3><ul>
+<li>nats_CheckCompatibility()&#160;:&#160;<a class="el" href="group__library_group.html#ga8c2ad4df801bd9d11564587ed3a7081e">nats.h</a></li>
+<li>nats_Close()&#160;:&#160;<a class="el" href="group__library_group.html#gae75131e0ce4e5b89d0f82ea7892f112e">nats.h</a></li>
+<li>nats_CloseAndWait()&#160;:&#160;<a class="el" href="group__library_group.html#gaf75bb5b38bf32e6a8f43e54068625903">nats.h</a></li>
+<li>nats_GetLastError()&#160;:&#160;<a class="el" href="group__library_group.html#gadecfd49a58b581dbba40da77b195fd85">nats.h</a></li>
+<li>nats_GetLastErrorStack()&#160;:&#160;<a class="el" href="group__library_group.html#gaca24172e1b97ca01cee29ca437f5702e">nats.h</a></li>
+<li>nats_GetVersion()&#160;:&#160;<a class="el" href="group__library_group.html#ga0d8c3df1c0c4a3d340d8ff81355fb1e8">nats.h</a></li>
+<li>nats_GetVersionNumber()&#160;:&#160;<a class="el" href="group__library_group.html#ga5fbbaa19b0290b654d2669a05bd512e8">nats.h</a></li>
+<li>nats_Now()&#160;:&#160;<a class="el" href="group__library_group.html#gaa3c10ba3ae001595007ad0dc5dccc15e">nats.h</a></li>
+<li>nats_NowInNanoSeconds()&#160;:&#160;<a class="el" href="group__library_group.html#gacf5e423920d6a647df3bbf7de39d5223">nats.h</a></li>
+<li>nats_Open()&#160;:&#160;<a class="el" href="group__library_group.html#ga4a26d4caecb23348f6eee862c95fee7d">nats.h</a></li>
+<li>nats_PrintLastErrorStack()&#160;:&#160;<a class="el" href="group__library_group.html#ga5fab3b18c4fe3630254483575f6066f4">nats.h</a></li>
+<li>nats_ReleaseThreadMemory()&#160;:&#160;<a class="el" href="group__library_group.html#gafe171baefa00a85b77205116e9f3e48a">nats.h</a></li>
+<li>nats_SetMessageDeliveryPoolSize()&#160;:&#160;<a class="el" href="group__library_group.html#gab21e94ce7a7d226611ea2c05914cf19d">nats.h</a></li>
+<li>nats_Sign()&#160;:&#160;<a class="el" href="group__library_group.html#gaf781f246e2e0ab24623ca667c48dc3ba">nats.h</a></li>
+<li>nats_Sleep()&#160;:&#160;<a class="el" href="group__library_group.html#gad5040264cd4b1404956babf3c03a4f09">nats.h</a></li>
+<li>natsConnection_Buffered()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#ga0433159e518540ff874c4026fe9cd0c5">nats.h</a></li>
+<li>natsConnection_Close()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#ga19e204d27a232e2d4334301fc002b2ed">nats.h</a></li>
+<li>natsConnection_Connect()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#ga740be1ba16a8570eb98ef6755ebf52ce">nats.h</a></li>
+<li>natsConnection_ConnectTo()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#gafb83c8d7970ba68be0e6c40c38cdfde4">nats.h</a></li>
+<li>natsConnection_Destroy()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#gafda2f702276fb0ac301efac10df09495">nats.h</a></li>
+<li>natsConnection_Drain()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#ga59bdc4ad9fea2053f5d3841f6b83f88b">nats.h</a></li>
+<li>natsConnection_DrainTimeout()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#gae06fe6f5933f216d6d93645a122a7dd4">nats.h</a></li>
+<li>natsConnection_Flush()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#ga1c98f8d89bb8e20ea8621e860a90267f">nats.h</a></li>
+<li>natsConnection_FlushTimeout()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#ga85915ef0c8b87993be1b076099d6a7c1">nats.h</a></li>
+<li>natsConnection_GetClientID()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#ga747513ba6ab63fdf9a72bfc8025a14ba">nats.h</a></li>
+<li>natsConnection_GetClientIP()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#gadafcfeeeac2733c7119981ab97b7103d">nats.h</a></li>
+<li>natsConnection_GetConnectedServerId()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#ga48cee9ea1cdc9fc2770de2f9f0fd1ccf">nats.h</a></li>
+<li>natsConnection_GetConnectedUrl()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#gaf623280407c43ade02285005f0642e6d">nats.h</a></li>
+<li>natsConnection_GetDiscoveredServers()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#gad25c77be0873495412c90a73fe450708">nats.h</a></li>
+<li>natsConnection_GetLastError()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#gab6cfa9cb6857ae10f096a94f5e244e63">nats.h</a></li>
+<li>natsConnection_GetLocalIPAndPort()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#ga761095a42374b4dafa178df7d7652dd5">nats.h</a></li>
+<li>natsConnection_GetMaxPayload()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#ga68e7149f7ff1cc4989b3f795fa7e76d9">nats.h</a></li>
+<li>natsConnection_GetRTT()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#gaa3fd27e6e7d8131e679d4f10e201c435">nats.h</a></li>
+<li>natsConnection_GetServers()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#gaf4ee7262e35e44c40ad5dfe9240db76b">nats.h</a></li>
+<li>natsConnection_GetStats()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#ga68821a8ae1176096b5afef7fdc7947ec">nats.h</a></li>
+<li>natsConnection_HasHeaderSupport()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#gad765b80ae8e1a06a7a942cccf29f042a">nats.h</a></li>
+<li>natsConnection_IsClosed()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#ga530f0f1c75c58a81aae1a59f15b46d9f">nats.h</a></li>
+<li>natsConnection_IsDraining()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#ga15a0f8aa9a6f621535d01593a4c8edd5">nats.h</a></li>
+<li>natsConnection_IsReconnecting()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#ga5aa349fc3895dde772671b324b07a688">nats.h</a></li>
+<li>natsConnection_JetStream()&#160;:&#160;<a class="el" href="group__js_group.html#ga8ed08b0fe1074b1e490291f0af2cb03f">nats.h</a></li>
+<li>natsConnection_ProcessReadEvent()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#gaa89c06e30e19ff361125bfc9114d89a8">nats.h</a></li>
+<li>natsConnection_ProcessWriteEvent()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#gad81b603b84c0180aefc6d5ebad7f2a47">nats.h</a></li>
+<li>natsConnection_Publish()&#160;:&#160;<a class="el" href="group__conn_pub_group.html#gac0b9f7759ecc39b8d77807b94254f9b4">nats.h</a></li>
+<li>natsConnection_PublishMsg()&#160;:&#160;<a class="el" href="group__conn_pub_group.html#ga74511acd87385931112c45c48c2a14ba">nats.h</a></li>
+<li>natsConnection_PublishRequest()&#160;:&#160;<a class="el" href="group__conn_pub_group.html#gaaaa3d75ffec2dcdc6bf905cdb1eee59e">nats.h</a></li>
+<li>natsConnection_PublishRequestString()&#160;:&#160;<a class="el" href="group__conn_pub_group.html#gaafca9a8294e81a5a9979e762931e56c5">nats.h</a></li>
+<li>natsConnection_PublishString()&#160;:&#160;<a class="el" href="group__conn_pub_group.html#gad09a717c20de4cf0e2a21dcfd9ce6c64">nats.h</a></li>
+<li>natsConnection_QueueSubscribe()&#160;:&#160;<a class="el" href="group__conn_sub_group.html#ga3c9fee2775130786ef62f1cbeb191a48">nats.h</a></li>
+<li>natsConnection_QueueSubscribeSync()&#160;:&#160;<a class="el" href="group__conn_sub_group.html#ga68630ea7c4bbdc7f8cd62058b41fb476">nats.h</a></li>
+<li>natsConnection_QueueSubscribeTimeout()&#160;:&#160;<a class="el" href="group__conn_sub_group.html#ga96fa115fd5b2ef7658884da80714b91c">nats.h</a></li>
+<li>natsConnection_Request()&#160;:&#160;<a class="el" href="group__conn_pub_group.html#gaf4b4a022f9c21fc269b87c000330c5a7">nats.h</a></li>
+<li>natsConnection_RequestMsg()&#160;:&#160;<a class="el" href="group__conn_pub_group.html#ga052de4b75b3b69ccd8d20eb4861b801d">nats.h</a></li>
+<li>natsConnection_RequestString()&#160;:&#160;<a class="el" href="group__conn_pub_group.html#ga4bb5105df6a3efd2088e6be0fdf6b31f">nats.h</a></li>
+<li>natsConnection_Sign()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#ga6960cfdbaac3b8759784f352d4c264f8">nats.h</a></li>
+<li>natsConnection_Status()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#ga33fa209522e5e0226b5b7c7d720a3b98">nats.h</a></li>
+<li>natsConnection_Subscribe()&#160;:&#160;<a class="el" href="group__conn_sub_group.html#gaefab965b5645798d47f9244f2b3fe3fb">nats.h</a></li>
+<li>natsConnection_SubscribeSync()&#160;:&#160;<a class="el" href="group__conn_sub_group.html#ga17574d5165f7e285462e3d3b2709edf4">nats.h</a></li>
+<li>natsConnection_SubscribeTimeout()&#160;:&#160;<a class="el" href="group__conn_sub_group.html#gacb2c83b58b7909715424cbc327fdd404">nats.h</a></li>
+<li>natsInbox_Create()&#160;:&#160;<a class="el" href="group__inbox_group.html#gaa1ec779a0b7ead54b78da05533848b6d">nats.h</a></li>
+<li>natsInbox_Destroy()&#160;:&#160;<a class="el" href="group__inbox_group.html#gabd6444fb8f28afb9c2b6645945f46cfe">nats.h</a></li>
+<li>natsLibevent_Attach()&#160;:&#160;<a class="el" href="group__libevent_functions.html#ga30c00f21a5251ee9fde09c1f2b429cd2">libevent.h</a></li>
+<li>natsLibevent_Detach()&#160;:&#160;<a class="el" href="group__libevent_functions.html#gaac76f5937329a8650f69c6bd8af36cd5">libevent.h</a></li>
+<li>natsLibevent_Init()&#160;:&#160;<a class="el" href="group__libevent_functions.html#ga195d269473332931fd0fede0bac3309e">libevent.h</a></li>
+<li>natsLibevent_Read()&#160;:&#160;<a class="el" href="group__libevent_functions.html#ga8a14ce23b4f6ba3bf63369961f9a5552">libevent.h</a></li>
+<li>natsLibevent_Write()&#160;:&#160;<a class="el" href="group__libevent_functions.html#ga7ac99f326a59e5663ff66f5023c87091">libevent.h</a></li>
+<li>natsLibuv_Attach()&#160;:&#160;<a class="el" href="group__libuv_functions.html#ga86ac71cffe752effd7397740d80c3c42">libuv.h</a></li>
+<li>natsLibuv_Detach()&#160;:&#160;<a class="el" href="group__libuv_functions.html#ga8df663525fb59b882a0f3bd563083dc7">libuv.h</a></li>
+<li>natsLibuv_Init()&#160;:&#160;<a class="el" href="group__libuv_functions.html#ga5d4b677cbe1cd132c37bc56dbfc6949e">libuv.h</a></li>
+<li>natsLibuv_Read()&#160;:&#160;<a class="el" href="group__libuv_functions.html#ga85c722b2d2699a954362b20528f0aaac">libuv.h</a></li>
+<li>natsLibuv_SetThreadLocalLoop()&#160;:&#160;<a class="el" href="group__libuv_functions.html#ga1baf4a20b138dcf00807a8b830f4e02d">libuv.h</a></li>
+<li>natsLibuv_Write()&#160;:&#160;<a class="el" href="group__libuv_functions.html#gafaa633c9067f485f330b72644277b07d">libuv.h</a></li>
+<li>natsMsg_Ack()&#160;:&#160;<a class="el" href="group__js_msg.html#gae454fb7e7097a3cd3362cb49ef8a3c84">nats.h</a></li>
+<li>natsMsg_AckSync()&#160;:&#160;<a class="el" href="group__js_msg.html#gafb899ebf8e89b3a858fe20f7853635a7">nats.h</a></li>
+<li>natsMsg_Create()&#160;:&#160;<a class="el" href="group__msg_group.html#ga098e4fec1c5a71c00a0d092fbd6d1a21">nats.h</a></li>
+<li>natsMsg_Destroy()&#160;:&#160;<a class="el" href="group__msg_group.html#ga9e9590018284939f43f60964283f33ae">nats.h</a></li>
+<li>natsMsg_GetData()&#160;:&#160;<a class="el" href="group__msg_group.html#ga523364451fd92534e754054266196e59">nats.h</a></li>
+<li>natsMsg_GetDataLength()&#160;:&#160;<a class="el" href="group__msg_group.html#ga25b69066ae50287e178aaf4f70f7d3de">nats.h</a></li>
+<li>natsMsg_GetMetaData()&#160;:&#160;<a class="el" href="group__js_msg.html#gacf48e59038fab35849e9dc6f8fcf6328">nats.h</a></li>
+<li>natsMsg_GetReply()&#160;:&#160;<a class="el" href="group__msg_group.html#ga880535362c91b3e405792aa66ff945b6">nats.h</a></li>
+<li>natsMsg_GetSequence()&#160;:&#160;<a class="el" href="group__js_msg.html#ga819be2990ec20b964aa574b5331d7f2e">nats.h</a></li>
+<li>natsMsg_GetSubject()&#160;:&#160;<a class="el" href="group__msg_group.html#gad7cad38946648e3047aa0665a3dd230a">nats.h</a></li>
+<li>natsMsg_GetTime()&#160;:&#160;<a class="el" href="group__js_msg.html#gab4850497c5481f5ec6eb1fcdb43646f5">nats.h</a></li>
+<li>natsMsg_InProgress()&#160;:&#160;<a class="el" href="group__js_msg.html#gae1e0beb19cd76e2f69e6415c41c9bb39">nats.h</a></li>
+<li>natsMsg_IsNoResponders()&#160;:&#160;<a class="el" href="group__msg_group.html#ga43aa4a8e4b93725b4876ee2677e19c7b">nats.h</a></li>
+<li>natsMsg_Nak()&#160;:&#160;<a class="el" href="group__js_msg.html#gac271b874154301da9759f9ac05768b47">nats.h</a></li>
+<li>natsMsg_NakWithDelay()&#160;:&#160;<a class="el" href="group__js_msg.html#gac0697389fa60a3c4725e53cd23ada7bd">nats.h</a></li>
+<li>natsMsg_Term()&#160;:&#160;<a class="el" href="group__js_msg.html#gae84d21e4388255e9d990e53c9f67e7c4">nats.h</a></li>
+<li>natsMsgHeader_Add()&#160;:&#160;<a class="el" href="group__msg_group.html#ga2b641ec3b1745604d7de1102e472254b">nats.h</a></li>
+<li>natsMsgHeader_Delete()&#160;:&#160;<a class="el" href="group__msg_group.html#gac78ca02dc93d05cae837ced6386408f1">nats.h</a></li>
+<li>natsMsgHeader_Get()&#160;:&#160;<a class="el" href="group__msg_group.html#gab3349f0b0ce721b340d5c0753c90ee18">nats.h</a></li>
+<li>natsMsgHeader_Keys()&#160;:&#160;<a class="el" href="group__msg_group.html#ga6ee8a007111ada293dd24ff0bab02491">nats.h</a></li>
+<li>natsMsgHeader_Set()&#160;:&#160;<a class="el" href="group__msg_group.html#gaf30b47d4217c9335919f05536e379af8">nats.h</a></li>
+<li>natsMsgHeader_Values()&#160;:&#160;<a class="el" href="group__msg_group.html#gae1ce9c9d82d151a3ea9dc03da048f66f">nats.h</a></li>
+<li>natsMsgList_Destroy()&#160;:&#160;<a class="el" href="group__msg_group.html#ga1a091d24f939d881bf04fba78b8995c2">nats.h</a></li>
+<li>natsOptions_Create()&#160;:&#160;<a class="el" href="group__opts_group.html#ga61d4a0cf2fbf7d13cc910e5a00c575be">nats.h</a></li>
+<li>natsOptions_Destroy()&#160;:&#160;<a class="el" href="group__opts_group.html#ga93d8068cd6fff53b7f8e1c403db45eb9">nats.h</a></li>
+<li>natsOptions_DisableNoResponders()&#160;:&#160;<a class="el" href="group__opts_group.html#ga192465163abb87ad48a843b45cdf9984">nats.h</a></li>
+<li>natsOptions_IPResolutionOrder()&#160;:&#160;<a class="el" href="group__opts_group.html#ga7ca713c7532eff4d41a492e95b8822cf">nats.h</a></li>
+<li>natsOptions_LoadCATrustedCertificates()&#160;:&#160;<a class="el" href="group__opts_group.html#ga2cd6563694a439b3949a31fd81103099">nats.h</a></li>
+<li>natsOptions_LoadCertificatesChain()&#160;:&#160;<a class="el" href="group__opts_group.html#ga36943e2ba53d05407cdabc4e7e96484b">nats.h</a></li>
+<li>natsOptions_SetAllowReconnect()&#160;:&#160;<a class="el" href="group__opts_group.html#ga3d1d3cb2f2a0e23d27dd60e96d1cc91b">nats.h</a></li>
+<li>natsOptions_SetCATrustedCertificates()&#160;:&#160;<a class="el" href="group__opts_group.html#gafb30794fc2ae74b9e0bd8fb609b901c8">nats.h</a></li>
+<li>natsOptions_SetCertificatesChain()&#160;:&#160;<a class="el" href="group__opts_group.html#gae98f0f9034e93941767ab1ae6eec2c0c">nats.h</a></li>
+<li>natsOptions_SetCiphers()&#160;:&#160;<a class="el" href="group__opts_group.html#ga5698f020e8eb3e7440eb073fe08ef62c">nats.h</a></li>
+<li>natsOptions_SetCipherSuites()&#160;:&#160;<a class="el" href="group__opts_group.html#ga2b7f144b011d8ce62941b608a8f324f0">nats.h</a></li>
+<li>natsOptions_SetClosedCB()&#160;:&#160;<a class="el" href="group__opts_group.html#ga44410242e73134e5bb51ef27904a9253">nats.h</a></li>
+<li>natsOptions_SetCustomInboxPrefix()&#160;:&#160;<a class="el" href="group__opts_group.html#gac5173473a731a4a36d15346fedddf91f">nats.h</a></li>
+<li>natsOptions_SetCustomReconnectDelay()&#160;:&#160;<a class="el" href="group__opts_group.html#ga3593165aa113d6736e0226ddc56b3e9d">nats.h</a></li>
+<li>natsOptions_SetDisconnectedCB()&#160;:&#160;<a class="el" href="group__opts_group.html#gadc8dc0cedd91bda71d544f3dedc4a039">nats.h</a></li>
+<li>natsOptions_SetDiscoveredServersCB()&#160;:&#160;<a class="el" href="group__opts_group.html#gab5baab507c974402ab0d8c5e8227ee65">nats.h</a></li>
+<li>natsOptions_SetErrorHandler()&#160;:&#160;<a class="el" href="group__opts_group.html#ga127ec7a8196b453947a7fa9a64096cbd">nats.h</a></li>
+<li>natsOptions_SetEventLoop()&#160;:&#160;<a class="el" href="group__opts_group.html#gab09491bad908dedcb323c780280733ff">nats.h</a></li>
+<li>natsOptions_SetExpectedHostname()&#160;:&#160;<a class="el" href="group__opts_group.html#ga0ba43ba9930df385e4781b12be9f2851">nats.h</a></li>
+<li>natsOptions_SetFailRequestsOnDisconnect()&#160;:&#160;<a class="el" href="group__opts_group.html#gadef4376a5e608cbc8c1a9e2b6335dc79">nats.h</a></li>
+<li>natsOptions_SetIgnoreDiscoveredServers()&#160;:&#160;<a class="el" href="group__opts_group.html#ga7e4172084520708b8c9f28e73174461c">nats.h</a></li>
+<li>natsOptions_SetIOBufSize()&#160;:&#160;<a class="el" href="group__opts_group.html#ga1a3e3abfd7ddd8aff247df8f332bbda3">nats.h</a></li>
+<li>natsOptions_SetLameDuckModeCB()&#160;:&#160;<a class="el" href="group__opts_group.html#ga54dea2ffeb33779771652a7a14fc4adc">nats.h</a></li>
+<li>natsOptions_SetMaxPendingMsgs()&#160;:&#160;<a class="el" href="group__opts_group.html#ga95510436eee06f9992ded96a44795c40">nats.h</a></li>
+<li>natsOptions_SetMaxPingsOut()&#160;:&#160;<a class="el" href="group__opts_group.html#gaaff89c3f41627f4b2929dbc9b82d265b">nats.h</a></li>
+<li>natsOptions_SetMaxReconnect()&#160;:&#160;<a class="el" href="group__opts_group.html#gab54cd2719c0b64eebd6c7b83dd2908a0">nats.h</a></li>
+<li>natsOptions_SetName()&#160;:&#160;<a class="el" href="group__opts_group.html#ga1c529d347be0fe2eec17c7f4698e283e">nats.h</a></li>
+<li>natsOptions_SetNKey()&#160;:&#160;<a class="el" href="group__opts_group.html#ga0290eac4665569c850468d9f00e246a0">nats.h</a></li>
+<li>natsOptions_SetNKeyFromSeed()&#160;:&#160;<a class="el" href="group__opts_group.html#ga696f02e0493c00d3c1eafff45b62b68e">nats.h</a></li>
+<li>natsOptions_SetNoEcho()&#160;:&#160;<a class="el" href="group__opts_group.html#ga4f694b87039cedaa65cd25656b14d1a3">nats.h</a></li>
+<li>natsOptions_SetNoRandomize()&#160;:&#160;<a class="el" href="group__opts_group.html#gaabf8763b931dcf389c83fd95d760a413">nats.h</a></li>
+<li>natsOptions_SetPedantic()&#160;:&#160;<a class="el" href="group__opts_group.html#ga26f166af20de98bec67bc6cc916f769e">nats.h</a></li>
+<li>natsOptions_SetPingInterval()&#160;:&#160;<a class="el" href="group__opts_group.html#gae68fb615835364c0809555e8dc93f57e">nats.h</a></li>
+<li>natsOptions_SetReconnectBufSize()&#160;:&#160;<a class="el" href="group__opts_group.html#gaa0d4b7ece8477cb9879f0dafff3456a5">nats.h</a></li>
+<li>natsOptions_SetReconnectedCB()&#160;:&#160;<a class="el" href="group__opts_group.html#ga26a48c8529fffa5f5d1a61c030979980">nats.h</a></li>
+<li>natsOptions_SetReconnectJitter()&#160;:&#160;<a class="el" href="group__opts_group.html#ga8f3df57ed8ae418d3ae6678ae5e2a5d2">nats.h</a></li>
+<li>natsOptions_SetReconnectWait()&#160;:&#160;<a class="el" href="group__opts_group.html#ga2730f4e16e318a2ef8de98dbf6ede807">nats.h</a></li>
+<li>natsOptions_SetRetryOnFailedConnect()&#160;:&#160;<a class="el" href="group__opts_group.html#ga20946800d024b7089e73d63454d1c19f">nats.h</a></li>
+<li>natsOptions_SetSecure()&#160;:&#160;<a class="el" href="group__opts_group.html#gaa1f09416d443fa7a6af6b695da563eba">nats.h</a></li>
+<li>natsOptions_SetSendAsap()&#160;:&#160;<a class="el" href="group__opts_group.html#ga8f06568cc3319a5a0eef9f80282034ca">nats.h</a></li>
+<li>natsOptions_SetServers()&#160;:&#160;<a class="el" href="group__opts_group.html#gacb7e964ae54b74d972d72e118b7b8bdf">nats.h</a></li>
+<li>natsOptions_SetTimeout()&#160;:&#160;<a class="el" href="group__opts_group.html#ga17cd7fe41176cd98aca1184fa9352ad9">nats.h</a></li>
+<li>natsOptions_SetToken()&#160;:&#160;<a class="el" href="group__opts_group.html#gad58a5b9dabadeebda30e952ff7b39193">nats.h</a></li>
+<li>natsOptions_SetTokenHandler()&#160;:&#160;<a class="el" href="group__opts_group.html#ga23a3b1f022112e98ddccb18b247b4426">nats.h</a></li>
+<li>natsOptions_SetURL()&#160;:&#160;<a class="el" href="group__opts_group.html#ga3f7e760214417c7d87541ecb9ab5bea5">nats.h</a></li>
+<li>natsOptions_SetUserCredentialsCallbacks()&#160;:&#160;<a class="el" href="group__opts_group.html#ga60117450fc1f7b6f81bab455aeed7515">nats.h</a></li>
+<li>natsOptions_SetUserCredentialsFromFiles()&#160;:&#160;<a class="el" href="group__opts_group.html#ga59b47f7b7a19085cf8eaada9bfe5606e">nats.h</a></li>
+<li>natsOptions_SetUserInfo()&#160;:&#160;<a class="el" href="group__opts_group.html#ga5b99da7dd74aac3be962f323c3863d9e">nats.h</a></li>
+<li>natsOptions_SetVerbose()&#160;:&#160;<a class="el" href="group__opts_group.html#gaa16bfd09ef318af18c27a0e199681b69">nats.h</a></li>
+<li>natsOptions_SetWriteDeadline()&#160;:&#160;<a class="el" href="group__opts_group.html#gaafda5fb8d9ee3a17bd475ceaecfac218">nats.h</a></li>
+<li>natsOptions_SkipServerVerification()&#160;:&#160;<a class="el" href="group__opts_group.html#ga6f804ec44adc299989fe623570679da3">nats.h</a></li>
+<li>natsOptions_UseGlobalMessageDelivery()&#160;:&#160;<a class="el" href="group__opts_group.html#gabf060c92648b50c069f0abe7cbb06f1c">nats.h</a></li>
+<li>natsOptions_UseOldRequestStyle()&#160;:&#160;<a class="el" href="group__opts_group.html#ga70aa85319933d78c0076cc862fa3e5a6">nats.h</a></li>
+<li>natsStatistics_Create()&#160;:&#160;<a class="el" href="group__stats_group.html#gafa923df029168f4991b77ffdd9e24877">nats.h</a></li>
+<li>natsStatistics_Destroy()&#160;:&#160;<a class="el" href="group__stats_group.html#ga26a04e77af8fc160adf7c33088dcf59c">nats.h</a></li>
+<li>natsStatistics_GetCounts()&#160;:&#160;<a class="el" href="group__stats_group.html#gad85f5ffb4272713f6cc6d988e6d4e75f">nats.h</a></li>
+<li>natsStatus_GetText()&#160;:&#160;<a class="el" href="group__status_group.html#ga4a83c4a08f1e4dd9451c1a88b6a4254e">nats.h</a></li>
+<li>natsSubscription_AutoUnsubscribe()&#160;:&#160;<a class="el" href="group__sub_group.html#ga09f285de2746a6e27fc66efd60bd3116">nats.h</a></li>
+<li>natsSubscription_ClearMaxPending()&#160;:&#160;<a class="el" href="group__sub_group.html#gafe31911d8372db401d33856465421710">nats.h</a></li>
+<li>natsSubscription_Destroy()&#160;:&#160;<a class="el" href="group__sub_group.html#ga50a95dd96e9b714201679a015d62832f">nats.h</a></li>
+<li>natsSubscription_Drain()&#160;:&#160;<a class="el" href="group__sub_group.html#ga26c9736289d326fb7d6df7e2a0df72ab">nats.h</a></li>
+<li>natsSubscription_DrainCompletionStatus()&#160;:&#160;<a class="el" href="group__sub_group.html#ga9834bd02f67a25ac084d5ad71e146019">nats.h</a></li>
+<li>natsSubscription_DrainTimeout()&#160;:&#160;<a class="el" href="group__sub_group.html#ga9c26a3f9584e7804060a48ec1b7e2a68">nats.h</a></li>
+<li>natsSubscription_Fetch()&#160;:&#160;<a class="el" href="group__js_sub_group.html#gafc5e0d2269bd23b4d5fb7f3b05278e50">nats.h</a></li>
+<li>natsSubscription_FetchRequest()&#160;:&#160;<a class="el" href="group__js_sub_group.html#ga676292505e7fde8688cfd886b79a10ed">nats.h</a></li>
+<li>natsSubscription_GetConsumerInfo()&#160;:&#160;<a class="el" href="group__js_sub_group.html#gaae716a1431db065744c079b71a9f4c2e">nats.h</a></li>
+<li>natsSubscription_GetDelivered()&#160;:&#160;<a class="el" href="group__sub_group.html#ga476b7276d0b7f9946834d2bb2423e955">nats.h</a></li>
+<li>natsSubscription_GetDropped()&#160;:&#160;<a class="el" href="group__sub_group.html#ga24f1636869e26661ce62c9c9f4d80823">nats.h</a></li>
+<li>natsSubscription_GetID()&#160;:&#160;<a class="el" href="group__sub_group.html#ga5a029a784c0a7f8b5800b48cc995db20">nats.h</a></li>
+<li>natsSubscription_GetMaxPending()&#160;:&#160;<a class="el" href="group__sub_group.html#ga0abc5d9afbc6b0c9c5adaf533904c968">nats.h</a></li>
+<li>natsSubscription_GetPending()&#160;:&#160;<a class="el" href="group__sub_group.html#gaca6262e2ef842caa701a9f233db72707">nats.h</a></li>
+<li>natsSubscription_GetPendingLimits()&#160;:&#160;<a class="el" href="group__sub_group.html#ga786bb458981274fe717f266bd3b96d96">nats.h</a></li>
+<li>natsSubscription_GetSequenceMismatch()&#160;:&#160;<a class="el" href="group__js_sub_group.html#ga0daed9f0d2d00cb14314ecc180a6fa84">nats.h</a></li>
+<li>natsSubscription_GetStats()&#160;:&#160;<a class="el" href="group__sub_group.html#ga12b60cdb3aca7329edebc480ae86bfab">nats.h</a></li>
+<li>natsSubscription_GetSubject()&#160;:&#160;<a class="el" href="group__sub_group.html#gadd4872b9fc5678a73f9ab04ce8428432">nats.h</a></li>
+<li>natsSubscription_IsValid()&#160;:&#160;<a class="el" href="group__sub_group.html#ga5e6454bbc7a90b9694112d45bd8de903">nats.h</a></li>
+<li>natsSubscription_NextMsg()&#160;:&#160;<a class="el" href="group__sub_group.html#ga6538a5d78dfb0f16514b94c8e74c11af">nats.h</a></li>
+<li>natsSubscription_NoDeliveryDelay()&#160;:&#160;<a class="el" href="group__sub_group.html#ga38f1e41fc7619101fc4aa52014dd5428">nats.h</a></li>
+<li>natsSubscription_QueuedMsgs()&#160;:&#160;<a class="el" href="group__sub_group.html#ga8a37b2d5290da3aecc05483d79e7e254">nats.h</a></li>
+<li>natsSubscription_SetOnCompleteCB()&#160;:&#160;<a class="el" href="group__sub_group.html#gaea632f845d473e7461b134c0e7bf4077">nats.h</a></li>
+<li>natsSubscription_SetPendingLimits()&#160;:&#160;<a class="el" href="group__sub_group.html#ga68a7cea89e75c529a7dd3bb77303dda4">nats.h</a></li>
+<li>natsSubscription_Unsubscribe()&#160;:&#160;<a class="el" href="group__sub_group.html#gaee87f8be0e6c2a4693ba2cea070583ba">nats.h</a></li>
+<li>natsSubscription_WaitForDrainCompletion()&#160;:&#160;<a class="el" href="group__sub_group.html#ga0408c9b6e4ad4078ac0267656ace222d">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/globals_func_s.html b/doc/html/globals_func_s.html
new file mode 100644 (file)
index 0000000..9afd45c
--- /dev/null
@@ -0,0 +1,151 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: File Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('globals_func_s.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+&#160;
+
+<h3><a id="index_s" name="index_s"></a>- s -</h3><ul>
+<li>stanConnection_Close()&#160;:&#160;<a class="el" href="group__stan_conn_mgt_group.html#ga4952a7f65a53fdb5ca1c26b1a1656f1d">nats.h</a></li>
+<li>stanConnection_Connect()&#160;:&#160;<a class="el" href="group__stan_conn_mgt_group.html#ga35e0e6e5e3b7f3818a3ac3600efb8f8f">nats.h</a></li>
+<li>stanConnection_Destroy()&#160;:&#160;<a class="el" href="group__stan_conn_mgt_group.html#gaea095eec18fdf04e06de16711f8b1a04">nats.h</a></li>
+<li>stanConnection_GetNATSConnection()&#160;:&#160;<a class="el" href="group__stan_conn_mgt_group.html#ga166ec494a55c9b1f9ebafd2294e05ff6">nats.h</a></li>
+<li>stanConnection_Publish()&#160;:&#160;<a class="el" href="group__stan_conn_pub_group.html#ga24f3f7f709b15fe53e1edaeead08fc7d">nats.h</a></li>
+<li>stanConnection_PublishAsync()&#160;:&#160;<a class="el" href="group__stan_conn_pub_group.html#ga0c4d1e4615f8ac834f0a4021f75d39f0">nats.h</a></li>
+<li>stanConnection_QueueSubscribe()&#160;:&#160;<a class="el" href="group__stan_conn_sub_group.html#ga17d42bf9a4fa39470561a1a668e6b4a2">nats.h</a></li>
+<li>stanConnection_ReleaseNATSConnection()&#160;:&#160;<a class="el" href="group__stan_conn_mgt_group.html#ga2e56a93825e1214a5ab688860e2a8ce6">nats.h</a></li>
+<li>stanConnection_Subscribe()&#160;:&#160;<a class="el" href="group__stan_conn_sub_group.html#gae545358fdc493baf6d29429a8156781f">nats.h</a></li>
+<li>stanConnOptions_Create()&#160;:&#160;<a class="el" href="group__stan_conn_opts_group.html#gaff52a1ce90253b4bdbb0005fca4f71b6">nats.h</a></li>
+<li>stanConnOptions_Destroy()&#160;:&#160;<a class="el" href="group__stan_conn_opts_group.html#ga83fd0a29b136cbfb643be642eb2fa726">nats.h</a></li>
+<li>stanConnOptions_SetConnectionLostHandler()&#160;:&#160;<a class="el" href="group__stan_conn_opts_group.html#ga19ba15c8001aa835b261eea3a309e6d3">nats.h</a></li>
+<li>stanConnOptions_SetConnectionWait()&#160;:&#160;<a class="el" href="group__stan_conn_opts_group.html#ga66c72c482696d9ceca71fced7cbb1264">nats.h</a></li>
+<li>stanConnOptions_SetDiscoveryPrefix()&#160;:&#160;<a class="el" href="group__stan_conn_opts_group.html#ga07105d1d00878bba19f47243b2c88402">nats.h</a></li>
+<li>stanConnOptions_SetMaxPubAcksInflight()&#160;:&#160;<a class="el" href="group__stan_conn_opts_group.html#ga29eee1be7eff749aeac3bab60d1b0405">nats.h</a></li>
+<li>stanConnOptions_SetNATSOptions()&#160;:&#160;<a class="el" href="group__stan_conn_opts_group.html#gae3fc9a4daa7f85367811a313857337b4">nats.h</a></li>
+<li>stanConnOptions_SetPings()&#160;:&#160;<a class="el" href="group__stan_conn_opts_group.html#gad835223f08fbeae2a3c7a34d3fa1550b">nats.h</a></li>
+<li>stanConnOptions_SetPubAckWait()&#160;:&#160;<a class="el" href="group__stan_conn_opts_group.html#ga36f2ee441562dcf619d6e020b823fc96">nats.h</a></li>
+<li>stanConnOptions_SetURL()&#160;:&#160;<a class="el" href="group__stan_conn_opts_group.html#ga3c6d511fc1e1febcdf5344960de5a0b3">nats.h</a></li>
+<li>stanMsg_Destroy()&#160;:&#160;<a class="el" href="group__stan_msg_group.html#gacd0059fb499963f5b2eae18053e5f74f">nats.h</a></li>
+<li>stanMsg_GetData()&#160;:&#160;<a class="el" href="group__stan_msg_group.html#ga2f27fbfb79a46c52e079f670c59e1260">nats.h</a></li>
+<li>stanMsg_GetDataLength()&#160;:&#160;<a class="el" href="group__stan_msg_group.html#ga7d1e394a686bc25ab7376b7f28b9e777">nats.h</a></li>
+<li>stanMsg_GetSequence()&#160;:&#160;<a class="el" href="group__stan_msg_group.html#ga98b66ff73447e1d7e329edbfcde782b5">nats.h</a></li>
+<li>stanMsg_GetTimestamp()&#160;:&#160;<a class="el" href="group__stan_msg_group.html#ga2fa524b11e9621cf46ca9b1a3ca66452">nats.h</a></li>
+<li>stanMsg_IsRedelivered()&#160;:&#160;<a class="el" href="group__stan_msg_group.html#ga8e537d014b89d9d7da7906b2ee75d5c0">nats.h</a></li>
+<li>stanSubOptions_Create()&#160;:&#160;<a class="el" href="group__stan_sub_opts_group.html#gad87a2cef4f4ddf64696f9864773c37cf">nats.h</a></li>
+<li>stanSubOptions_DeliverAllAvailable()&#160;:&#160;<a class="el" href="group__stan_sub_opts_group.html#gab09b81358e93199a4631eb06f1ec179f">nats.h</a></li>
+<li>stanSubOptions_Destroy()&#160;:&#160;<a class="el" href="group__stan_sub_opts_group.html#ga1b56877d0a6729e148c9c288e2b88e3f">nats.h</a></li>
+<li>stanSubOptions_SetAckWait()&#160;:&#160;<a class="el" href="group__stan_sub_opts_group.html#gafbb4e6c74978c4e8f30f016c20cc2bdf">nats.h</a></li>
+<li>stanSubOptions_SetDurableName()&#160;:&#160;<a class="el" href="group__stan_sub_opts_group.html#gaa018bceba99ef3726157e87c6918ab14">nats.h</a></li>
+<li>stanSubOptions_SetManualAckMode()&#160;:&#160;<a class="el" href="group__stan_sub_opts_group.html#ga6f49ae2629e49d2bfa35990cf030bf83">nats.h</a></li>
+<li>stanSubOptions_SetMaxInflight()&#160;:&#160;<a class="el" href="group__stan_sub_opts_group.html#ga35efbdea888e00440c500845064931c0">nats.h</a></li>
+<li>stanSubOptions_StartAtSequence()&#160;:&#160;<a class="el" href="group__stan_sub_opts_group.html#ga6cb7f6e1ac697d16959f9042eeb84dc1">nats.h</a></li>
+<li>stanSubOptions_StartAtTime()&#160;:&#160;<a class="el" href="group__stan_sub_opts_group.html#gaafd7a553486eea3c9d309da0744a3608">nats.h</a></li>
+<li>stanSubOptions_StartAtTimeDelta()&#160;:&#160;<a class="el" href="group__stan_sub_opts_group.html#ga27d9175901997b8468997019746599b5">nats.h</a></li>
+<li>stanSubOptions_StartWithLastReceived()&#160;:&#160;<a class="el" href="group__stan_sub_opts_group.html#ga856a74e31f3307faf988747c1f88717c">nats.h</a></li>
+<li>stanSubscription_AckMsg()&#160;:&#160;<a class="el" href="group__stan_sub_group.html#ga3a1cca9fa3ea54fcf7a43fd1335a26d3">nats.h</a></li>
+<li>stanSubscription_Close()&#160;:&#160;<a class="el" href="group__stan_sub_group.html#gacfa3a7b4fa333c84acfa7521fbbb5bcc">nats.h</a></li>
+<li>stanSubscription_Destroy()&#160;:&#160;<a class="el" href="group__stan_sub_group.html#ga3f6ce924f6a1830a55e30e9910aad4ba">nats.h</a></li>
+<li>stanSubscription_SetOnCompleteCB()&#160;:&#160;<a class="el" href="group__stan_sub_group.html#ga7b039908ec45cfc2c16ec61ba8daca9d">nats.h</a></li>
+<li>stanSubscription_Unsubscribe()&#160;:&#160;<a class="el" href="group__stan_sub_group.html#gafa428a7e0f6800216cb06fd738bd235e">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/globals_k.html b/doc/html/globals_k.html
new file mode 100644 (file)
index 0000000..09b7b1f
--- /dev/null
@@ -0,0 +1,166 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: File Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('globals_k.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+<div class="textblock">Here is a list of all file members with links to the files they belong to:</div>
+
+<h3><a id="index_k" name="index_k"></a>- k -</h3><ul>
+<li>kvConfig&#160;:&#160;<a class="el" href="group__types_group.html#ga6d594b091b4bb46192336413066a8edf">nats.h</a></li>
+<li>kvConfig_Init()&#160;:&#160;<a class="el" href="group__kv_group_mgt.html#ga16d4c27d8ac62bb86ba601bc40f53172">nats.h</a></li>
+<li>kvEntry&#160;:&#160;<a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">nats.h</a></li>
+<li>kvEntry_Bucket()&#160;:&#160;<a class="el" href="group__kv_entry.html#gadedbb410cce499afb535eb6641c32ca7">nats.h</a></li>
+<li>kvEntry_Created()&#160;:&#160;<a class="el" href="group__kv_entry.html#ga31ef3a2e3a7df6cf4dbb0a762737800a">nats.h</a></li>
+<li>kvEntry_Delta()&#160;:&#160;<a class="el" href="group__kv_entry.html#ga233a2d75895cfd0140cf77757592cf47">nats.h</a></li>
+<li>kvEntry_Destroy()&#160;:&#160;<a class="el" href="group__kv_entry.html#ga8359ffcdeefb9c5821e6442d0d5ee388">nats.h</a></li>
+<li>kvEntry_Key()&#160;:&#160;<a class="el" href="group__kv_entry.html#gab455f32b0abfb1361dab4b5e7d98042a">nats.h</a></li>
+<li>kvEntry_Operation()&#160;:&#160;<a class="el" href="group__kv_entry.html#ga088fd67d3d384ad7a7ddfc82535becea">nats.h</a></li>
+<li>kvEntry_Revision()&#160;:&#160;<a class="el" href="group__kv_entry.html#ga2d58abf81cb577e21a76f9c77568409f">nats.h</a></li>
+<li>kvEntry_Value()&#160;:&#160;<a class="el" href="group__kv_entry.html#ga28077f81d71a30cbce2dc81e5c9574fc">nats.h</a></li>
+<li>kvEntry_ValueLen()&#160;:&#160;<a class="el" href="group__kv_entry.html#gaf7ccc866865903f231e0431754ed2415">nats.h</a></li>
+<li>kvEntry_ValueString()&#160;:&#160;<a class="el" href="group__kv_entry.html#ga7ff6220915726600545357e31226fb65">nats.h</a></li>
+<li>kvEntryList&#160;:&#160;<a class="el" href="group__types_group.html#ga0125d394a3cbae2a1713eed8fab7f78e">nats.h</a></li>
+<li>kvEntryList_Destroy()&#160;:&#160;<a class="el" href="group__kv_group.html#gae783352ab81e22aa3173057d117518e6">nats.h</a></li>
+<li>kvKeysList&#160;:&#160;<a class="el" href="group__types_group.html#gab36492d9d4370337cfed80edce4144e0">nats.h</a></li>
+<li>kvKeysList_Destroy()&#160;:&#160;<a class="el" href="group__kv_group.html#ga02ccd58bc5062f6ce6f94bf05e3dfe45">nats.h</a></li>
+<li>kvOp_Delete&#160;:&#160;<a class="el" href="group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332a4efb91331f3307128c75af5b23362f83">nats.h</a></li>
+<li>kvOp_Purge&#160;:&#160;<a class="el" href="group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332aee19ab8144bf518e251ea2004309b657">nats.h</a></li>
+<li>kvOp_Put&#160;:&#160;<a class="el" href="group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332acc0e1da3c292cb7eb19d909c9dfd788a">nats.h</a></li>
+<li>kvOp_Unknown&#160;:&#160;<a class="el" href="group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332a0b7a6bef67e4220f5f0c4075f2ed16b6">nats.h</a></li>
+<li>kvOperation&#160;:&#160;<a class="el" href="group__types_group.html#ga89db3bd6bf11af3ac5eb3ab560d16332">nats.h</a></li>
+<li>kvPurgeOptions&#160;:&#160;<a class="el" href="group__types_group.html#ga90e8de23c4468005488bde690a2ffe9d">nats.h</a></li>
+<li>kvPurgeOptions_Init()&#160;:&#160;<a class="el" href="group__kv_group.html#ga243113fd7df34ce104850ab888f04021">nats.h</a></li>
+<li>kvStatus&#160;:&#160;<a class="el" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">nats.h</a></li>
+<li>kvStatus_Bucket()&#160;:&#160;<a class="el" href="group__kv_status.html#ga1acec36db32207f21e15afc26bb5af1c">nats.h</a></li>
+<li>kvStatus_Destroy()&#160;:&#160;<a class="el" href="group__kv_status.html#ga5eb3d824c1873af705beee4798246a08">nats.h</a></li>
+<li>kvStatus_History()&#160;:&#160;<a class="el" href="group__kv_status.html#gada6f22b5659b184762cea4f45d369ee5">nats.h</a></li>
+<li>kvStatus_Replicas()&#160;:&#160;<a class="el" href="group__kv_status.html#ga86b114f4dac9f06df86101f84bd497b2">nats.h</a></li>
+<li>kvStatus_TTL()&#160;:&#160;<a class="el" href="group__kv_status.html#gaa747ad0a6182ec7a47fb47018c33d1c1">nats.h</a></li>
+<li>kvStatus_Values()&#160;:&#160;<a class="el" href="group__kv_status.html#ga2016af3c73841d8b226361e764dce158">nats.h</a></li>
+<li>kvStore&#160;:&#160;<a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">nats.h</a></li>
+<li>kvStore_Bucket()&#160;:&#160;<a class="el" href="group__kv_group.html#gad28fdf9aae16bba308cda799fca13281">nats.h</a></li>
+<li>kvStore_Create()&#160;:&#160;<a class="el" href="group__kv_group.html#ga5289f7cd3999cfb46fb1fcb83178aec6">nats.h</a></li>
+<li>kvStore_CreateString()&#160;:&#160;<a class="el" href="group__kv_group.html#ga5726ad2e6205d2f6749be013138218ca">nats.h</a></li>
+<li>kvStore_Delete()&#160;:&#160;<a class="el" href="group__kv_group.html#ga68101d46739ca894fd7c56c8661c08d8">nats.h</a></li>
+<li>kvStore_Destroy()&#160;:&#160;<a class="el" href="group__kv_group_mgt.html#gab0d6bdbfabd27af67eaeb36cec0787da">nats.h</a></li>
+<li>kvStore_Get()&#160;:&#160;<a class="el" href="group__kv_group.html#ga2db86f80d6bfce1bdbedf1b9da22913c">nats.h</a></li>
+<li>kvStore_GetRevision()&#160;:&#160;<a class="el" href="group__kv_group.html#ga9bf43431bb8264a3ea1f0df401afbe1a">nats.h</a></li>
+<li>kvStore_History()&#160;:&#160;<a class="el" href="group__kv_group.html#ga5aa57345313cee85b020e50c22023fb5">nats.h</a></li>
+<li>kvStore_Keys()&#160;:&#160;<a class="el" href="group__kv_group.html#ga6030fc2a672ae868f7603587245b9d5a">nats.h</a></li>
+<li>kvStore_Purge()&#160;:&#160;<a class="el" href="group__kv_group.html#ga3d5fa3d895d0d3041440105b244e9ca9">nats.h</a></li>
+<li>kvStore_PurgeDeletes()&#160;:&#160;<a class="el" href="group__kv_group.html#ga34ab74b229ff88e64301ea53a274da69">nats.h</a></li>
+<li>kvStore_Put()&#160;:&#160;<a class="el" href="group__kv_group.html#ga1fdf7a1d3acf96e475184790589a401e">nats.h</a></li>
+<li>kvStore_PutString()&#160;:&#160;<a class="el" href="group__kv_group.html#ga84ebd66a95ce857765d4a16ec35daba9">nats.h</a></li>
+<li>kvStore_Status()&#160;:&#160;<a class="el" href="group__kv_group.html#gadf75e99cc28bc9c2d6eac7c9f7398c27">nats.h</a></li>
+<li>kvStore_Update()&#160;:&#160;<a class="el" href="group__kv_group.html#gae0c593bb2ef94ae60e775617c9423038">nats.h</a></li>
+<li>kvStore_UpdateString()&#160;:&#160;<a class="el" href="group__kv_group.html#ga13ed70f15cd1485cd15f96bcc4b7ad1c">nats.h</a></li>
+<li>kvStore_Watch()&#160;:&#160;<a class="el" href="group__kv_group.html#ga30feca870f580c7b9d2ad07a740505b2">nats.h</a></li>
+<li>kvStore_WatchAll()&#160;:&#160;<a class="el" href="group__kv_group.html#gaf011f1dd6813391c65664e982747602e">nats.h</a></li>
+<li>kvWatcher&#160;:&#160;<a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">nats.h</a></li>
+<li>kvWatcher_Destroy()&#160;:&#160;<a class="el" href="group__kv_watcher.html#ga21bc39fa795f7c4f392bd6d4e66ea1d9">nats.h</a></li>
+<li>kvWatcher_Next()&#160;:&#160;<a class="el" href="group__kv_watcher.html#ga562c216a0199c30455af4c2da46000e5">nats.h</a></li>
+<li>kvWatcher_Stop()&#160;:&#160;<a class="el" href="group__kv_watcher.html#ga73adf44114fedd62ef75ebd81839b65e">nats.h</a></li>
+<li>kvWatchOptions&#160;:&#160;<a class="el" href="group__types_group.html#gac32f992fe797a1f7befc7dc3452640b6">nats.h</a></li>
+<li>kvWatchOptions_Init()&#160;:&#160;<a class="el" href="group__kv_group.html#ga762fd5de8cde683e46a6736a51e575f5">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/globals_n.html b/doc/html/globals_n.html
new file mode 100644 (file)
index 0000000..db79cbc
--- /dev/null
@@ -0,0 +1,355 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: File Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('globals_n.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+<div class="textblock">Here is a list of all file members with links to the files they belong to:</div>
+
+<h3><a id="index_n" name="index_n"></a>- n -</h3><ul>
+<li>NATS_ADDRESS_MISSING&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ae1d2c1366dbed428f6589f057acc507d">status.h</a></li>
+<li>nats_CheckCompatibility()&#160;:&#160;<a class="el" href="group__library_group.html#ga8c2ad4df801bd9d11564587ed3a7081e">nats.h</a></li>
+<li>nats_Close()&#160;:&#160;<a class="el" href="group__library_group.html#gae75131e0ce4e5b89d0f82ea7892f112e">nats.h</a></li>
+<li>nats_CloseAndWait()&#160;:&#160;<a class="el" href="group__library_group.html#gaf75bb5b38bf32e6a8f43e54068625903">nats.h</a></li>
+<li>NATS_CONN_STATUS_CLOSED&#160;:&#160;<a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51aa78753a4de2d0379078bb09cdc1acdb2">status.h</a></li>
+<li>NATS_CONN_STATUS_CONNECTED&#160;:&#160;<a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51a0dafab74b55f98cfc1d00e4d1ef38725">status.h</a></li>
+<li>NATS_CONN_STATUS_CONNECTING&#160;:&#160;<a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51a7e4d95cb29122f06e17ca4aff55cc736">status.h</a></li>
+<li>NATS_CONN_STATUS_DISCONNECTED&#160;:&#160;<a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51a08f92960811d1ff05b91a0870b4ecb92">status.h</a></li>
+<li>NATS_CONN_STATUS_DRAINING_PUBS&#160;:&#160;<a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51ac6b8b7f138f6ca285fe1f4da707b2100">status.h</a></li>
+<li>NATS_CONN_STATUS_DRAINING_SUBS&#160;:&#160;<a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51ab6f9d121707673a61cbe2c591f64fbf1">status.h</a></li>
+<li>NATS_CONN_STATUS_RECONNECTING&#160;:&#160;<a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51acfdc4826e08ce4b59f901952038e9206">status.h</a></li>
+<li>NATS_CONNECTION_AUTH_FAILED&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a473ea6cfa03490838fafee8730b48a2a">status.h</a></li>
+<li>NATS_CONNECTION_CLOSED&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a476d7bcf9a593b749e435f20a9156eff">status.h</a></li>
+<li>NATS_CONNECTION_DISCONNECTED&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80abef517217119e8446a8e3382e1f37eb3">status.h</a></li>
+<li>NATS_DEFAULT_URL&#160;:&#160;<a class="el" href="nats_8h.html#a911c54900b46b968205871cd9f68d36c">nats.h</a></li>
+<li>NATS_DRAINING&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a07fdbda44f43cef9866a75b25053c2ae">status.h</a></li>
+<li>NATS_ERR&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a40a08ae6ae17deaf390b1d0d7550791c">status.h</a></li>
+<li>NATS_EXTERN&#160;:&#160;<a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">nats.h</a></li>
+<li>NATS_FAILED_TO_INITIALIZE&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a7cb64f52c8d91d6ade3db6bc82a96c42">status.h</a></li>
+<li>nats_GetLastError()&#160;:&#160;<a class="el" href="group__library_group.html#gadecfd49a58b581dbba40da77b195fd85">nats.h</a></li>
+<li>nats_GetLastErrorStack()&#160;:&#160;<a class="el" href="group__library_group.html#gaca24172e1b97ca01cee29ca437f5702e">nats.h</a></li>
+<li>nats_GetVersion()&#160;:&#160;<a class="el" href="group__library_group.html#ga0d8c3df1c0c4a3d340d8ff81355fb1e8">nats.h</a></li>
+<li>nats_GetVersionNumber()&#160;:&#160;<a class="el" href="group__library_group.html#ga5fbbaa19b0290b654d2669a05bd512e8">nats.h</a></li>
+<li>NATS_ILLEGAL_STATE&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9bb78b4f245d2870040d25c450febd4b">status.h</a></li>
+<li>NATS_INSUFFICIENT_BUFFER&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a317fb9be1a80f6b1877f96a9a2db16ad">status.h</a></li>
+<li>NATS_INVALID_ARG&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a71b57630aebf5c20eecdab832c2a9235">status.h</a></li>
+<li>NATS_INVALID_QUEUE_NAME&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a8a0d239cfdfa30fe730afea65941779b">status.h</a></li>
+<li>NATS_INVALID_SUBJECT&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a790c08a7d33e3aefce07c04120c4c19e">status.h</a></li>
+<li>NATS_INVALID_SUBSCRIPTION&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a273e92a0ff3b7eaf946b4b7fa6cc6c6c">status.h</a></li>
+<li>NATS_INVALID_TIMEOUT&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a827072fc245a99a60691e1e4b173ca86">status.h</a></li>
+<li>NATS_IO_ERROR&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a44e8b2590369fb01a1479719c97c2b6f">status.h</a></li>
+<li>NATS_LINE_TOO_LONG&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a85c29dbfa6b06ffef3418cc9947ffff7">status.h</a></li>
+<li>NATS_MAX_DELIVERED_MSGS&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9a6f40b7803639ac18bdf532e93e5ad5">status.h</a></li>
+<li>NATS_MAX_PAYLOAD&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80af820300473609092a3e97a71b5af9ff9">status.h</a></li>
+<li>NATS_MISMATCH&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a22fa4802a34bac497f23e269a20a52f2">status.h</a></li>
+<li>NATS_MISSED_HEARTBEAT&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a37d80c8232775339a32805fe93e0ea7f">status.h</a></li>
+<li>NATS_NO_MEMORY&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a62ff6f5cc64399631defc0119731b514">status.h</a></li>
+<li>NATS_NO_RESPONDERS&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80aab97324e40ccfe1360080c651c330e62">status.h</a></li>
+<li>NATS_NO_SERVER&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a47034d8889521bbd300f45fdc19e1127">status.h</a></li>
+<li>NATS_NO_SERVER_SUPPORT&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a8a4e298931ba0698a72e397b1b57c885">status.h</a></li>
+<li>NATS_NOT_FOUND&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ad0229a12b17d3d12a28efed6213720d8">status.h</a></li>
+<li>NATS_NOT_INITIALIZED&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ae47047f2fac5f2f2a434fc501e5c3d4e">status.h</a></li>
+<li>NATS_NOT_PERMITTED&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ac3abc147873fe999c86431f9222eebf5">status.h</a></li>
+<li>NATS_NOT_YET_CONNECTED&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a49a1ea653ce112b3c53eedebcd60811d">status.h</a></li>
+<li>nats_Now()&#160;:&#160;<a class="el" href="group__library_group.html#gaa3c10ba3ae001595007ad0dc5dccc15e">nats.h</a></li>
+<li>nats_NowInNanoSeconds()&#160;:&#160;<a class="el" href="group__library_group.html#gacf5e423920d6a647df3bbf7de39d5223">nats.h</a></li>
+<li>NATS_OK&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">status.h</a></li>
+<li>nats_Open()&#160;:&#160;<a class="el" href="group__library_group.html#ga4a26d4caecb23348f6eee862c95fee7d">nats.h</a></li>
+<li>nats_PrintLastErrorStack()&#160;:&#160;<a class="el" href="group__library_group.html#ga5fab3b18c4fe3630254483575f6066f4">nats.h</a></li>
+<li>NATS_PROTOCOL_ERROR&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a113ffbe9a1f243582c38ebd876cb736d">status.h</a></li>
+<li>nats_ReleaseThreadMemory()&#160;:&#160;<a class="el" href="group__library_group.html#gafe171baefa00a85b77205116e9f3e48a">nats.h</a></li>
+<li>NATS_SECURE_CONNECTION_REQUIRED&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80abc76f1b31fdac4525583cc19588240dc">status.h</a></li>
+<li>NATS_SECURE_CONNECTION_WANTED&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a0aa3d1e18a2a217149fa8b1a306c9b08">status.h</a></li>
+<li>nats_SetMessageDeliveryPoolSize()&#160;:&#160;<a class="el" href="group__library_group.html#gab21e94ce7a7d226611ea2c05914cf19d">nats.h</a></li>
+<li>nats_Sign()&#160;:&#160;<a class="el" href="group__library_group.html#gaf781f246e2e0ab24623ca667c48dc3ba">nats.h</a></li>
+<li>nats_Sleep()&#160;:&#160;<a class="el" href="group__library_group.html#gad5040264cd4b1404956babf3c03a4f09">nats.h</a></li>
+<li>NATS_SLOW_CONSUMER&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ae93ff5b7fe31f8570308385d92d317b0">status.h</a></li>
+<li>NATS_SSL_ERROR&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a892183c32b4929388bb75dc62230ddf3">status.h</a></li>
+<li>NATS_STALE_CONNECTION&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80aa76d5e3ce051bc7510be90e73663c93d">status.h</a></li>
+<li>NATS_SYS_ERROR&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a984189ec4cfe3e7647268c99f7e49ec9">status.h</a></li>
+<li>NATS_TIMEOUT&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ab88994c9ea9889ac4d9d656d62f550ed">status.h</a></li>
+<li>natsConnection&#160;:&#160;<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">nats.h</a></li>
+<li>natsConnection_Buffered()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#ga0433159e518540ff874c4026fe9cd0c5">nats.h</a></li>
+<li>natsConnection_Close()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#ga19e204d27a232e2d4334301fc002b2ed">nats.h</a></li>
+<li>natsConnection_Connect()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#ga740be1ba16a8570eb98ef6755ebf52ce">nats.h</a></li>
+<li>natsConnection_ConnectTo()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#gafb83c8d7970ba68be0e6c40c38cdfde4">nats.h</a></li>
+<li>natsConnection_Destroy()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#gafda2f702276fb0ac301efac10df09495">nats.h</a></li>
+<li>natsConnection_Drain()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#ga59bdc4ad9fea2053f5d3841f6b83f88b">nats.h</a></li>
+<li>natsConnection_DrainTimeout()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#gae06fe6f5933f216d6d93645a122a7dd4">nats.h</a></li>
+<li>natsConnection_Flush()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#ga1c98f8d89bb8e20ea8621e860a90267f">nats.h</a></li>
+<li>natsConnection_FlushTimeout()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#ga85915ef0c8b87993be1b076099d6a7c1">nats.h</a></li>
+<li>natsConnection_GetClientID()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#ga747513ba6ab63fdf9a72bfc8025a14ba">nats.h</a></li>
+<li>natsConnection_GetClientIP()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#gadafcfeeeac2733c7119981ab97b7103d">nats.h</a></li>
+<li>natsConnection_GetConnectedServerId()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#ga48cee9ea1cdc9fc2770de2f9f0fd1ccf">nats.h</a></li>
+<li>natsConnection_GetConnectedUrl()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#gaf623280407c43ade02285005f0642e6d">nats.h</a></li>
+<li>natsConnection_GetDiscoveredServers()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#gad25c77be0873495412c90a73fe450708">nats.h</a></li>
+<li>natsConnection_GetLastError()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#gab6cfa9cb6857ae10f096a94f5e244e63">nats.h</a></li>
+<li>natsConnection_GetLocalIPAndPort()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#ga761095a42374b4dafa178df7d7652dd5">nats.h</a></li>
+<li>natsConnection_GetMaxPayload()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#ga68e7149f7ff1cc4989b3f795fa7e76d9">nats.h</a></li>
+<li>natsConnection_GetRTT()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#gaa3fd27e6e7d8131e679d4f10e201c435">nats.h</a></li>
+<li>natsConnection_GetServers()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#gaf4ee7262e35e44c40ad5dfe9240db76b">nats.h</a></li>
+<li>natsConnection_GetStats()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#ga68821a8ae1176096b5afef7fdc7947ec">nats.h</a></li>
+<li>natsConnection_HasHeaderSupport()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#gad765b80ae8e1a06a7a942cccf29f042a">nats.h</a></li>
+<li>natsConnection_IsClosed()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#ga530f0f1c75c58a81aae1a59f15b46d9f">nats.h</a></li>
+<li>natsConnection_IsDraining()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#ga15a0f8aa9a6f621535d01593a4c8edd5">nats.h</a></li>
+<li>natsConnection_IsReconnecting()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#ga5aa349fc3895dde772671b324b07a688">nats.h</a></li>
+<li>natsConnection_JetStream()&#160;:&#160;<a class="el" href="group__js_group.html#ga8ed08b0fe1074b1e490291f0af2cb03f">nats.h</a></li>
+<li>natsConnection_ProcessReadEvent()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#gaa89c06e30e19ff361125bfc9114d89a8">nats.h</a></li>
+<li>natsConnection_ProcessWriteEvent()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#gad81b603b84c0180aefc6d5ebad7f2a47">nats.h</a></li>
+<li>natsConnection_Publish()&#160;:&#160;<a class="el" href="group__conn_pub_group.html#gac0b9f7759ecc39b8d77807b94254f9b4">nats.h</a></li>
+<li>natsConnection_PublishMsg()&#160;:&#160;<a class="el" href="group__conn_pub_group.html#ga74511acd87385931112c45c48c2a14ba">nats.h</a></li>
+<li>natsConnection_PublishRequest()&#160;:&#160;<a class="el" href="group__conn_pub_group.html#gaaaa3d75ffec2dcdc6bf905cdb1eee59e">nats.h</a></li>
+<li>natsConnection_PublishRequestString()&#160;:&#160;<a class="el" href="group__conn_pub_group.html#gaafca9a8294e81a5a9979e762931e56c5">nats.h</a></li>
+<li>natsConnection_PublishString()&#160;:&#160;<a class="el" href="group__conn_pub_group.html#gad09a717c20de4cf0e2a21dcfd9ce6c64">nats.h</a></li>
+<li>natsConnection_QueueSubscribe()&#160;:&#160;<a class="el" href="group__conn_sub_group.html#ga3c9fee2775130786ef62f1cbeb191a48">nats.h</a></li>
+<li>natsConnection_QueueSubscribeSync()&#160;:&#160;<a class="el" href="group__conn_sub_group.html#ga68630ea7c4bbdc7f8cd62058b41fb476">nats.h</a></li>
+<li>natsConnection_QueueSubscribeTimeout()&#160;:&#160;<a class="el" href="group__conn_sub_group.html#ga96fa115fd5b2ef7658884da80714b91c">nats.h</a></li>
+<li>natsConnection_Request()&#160;:&#160;<a class="el" href="group__conn_pub_group.html#gaf4b4a022f9c21fc269b87c000330c5a7">nats.h</a></li>
+<li>natsConnection_RequestMsg()&#160;:&#160;<a class="el" href="group__conn_pub_group.html#ga052de4b75b3b69ccd8d20eb4861b801d">nats.h</a></li>
+<li>natsConnection_RequestString()&#160;:&#160;<a class="el" href="group__conn_pub_group.html#ga4bb5105df6a3efd2088e6be0fdf6b31f">nats.h</a></li>
+<li>natsConnection_Sign()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#ga6960cfdbaac3b8759784f352d4c264f8">nats.h</a></li>
+<li>natsConnection_Status()&#160;:&#160;<a class="el" href="group__conn_mgt_group.html#ga33fa209522e5e0226b5b7c7d720a3b98">nats.h</a></li>
+<li>natsConnection_Subscribe()&#160;:&#160;<a class="el" href="group__conn_sub_group.html#gaefab965b5645798d47f9244f2b3fe3fb">nats.h</a></li>
+<li>natsConnection_SubscribeSync()&#160;:&#160;<a class="el" href="group__conn_sub_group.html#ga17574d5165f7e285462e3d3b2709edf4">nats.h</a></li>
+<li>natsConnection_SubscribeTimeout()&#160;:&#160;<a class="el" href="group__conn_sub_group.html#gacb2c83b58b7909715424cbc327fdd404">nats.h</a></li>
+<li>natsConnectionHandler&#160;:&#160;<a class="el" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">nats.h</a></li>
+<li>natsConnStatus&#160;:&#160;<a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51">status.h</a></li>
+<li>natsCustomReconnectDelayHandler&#160;:&#160;<a class="el" href="group__callbacks_group.html#ga3353d4b92851c52121f65aaf0684cba4">nats.h</a></li>
+<li>natsErrHandler&#160;:&#160;<a class="el" href="group__callbacks_group.html#ga9e511dffa471dfb971b7dd2b12329626">nats.h</a></li>
+<li>natsEvLoop_Attach&#160;:&#160;<a class="el" href="group__callbacks_group.html#ga245eab0a01a485e40fba267f84ec037f">nats.h</a></li>
+<li>natsEvLoop_Detach&#160;:&#160;<a class="el" href="group__callbacks_group.html#gab63dee7f7012ba11ae20b76dbc36f2d0">nats.h</a></li>
+<li>natsEvLoop_ReadAddRemove&#160;:&#160;<a class="el" href="group__callbacks_group.html#gaea4c125ecfb43eaf43da20e8444c2aaa">nats.h</a></li>
+<li>natsEvLoop_WriteAddRemove&#160;:&#160;<a class="el" href="group__callbacks_group.html#ga2bb5dd2d821ca5bbc0488f7e6aceed17">nats.h</a></li>
+<li>natsInbox&#160;:&#160;<a class="el" href="group__types_group.html#ga206c3d4d6f4f6f96fd2cae53a3df31c1">nats.h</a></li>
+<li>natsInbox_Create()&#160;:&#160;<a class="el" href="group__inbox_group.html#gaa1ec779a0b7ead54b78da05533848b6d">nats.h</a></li>
+<li>natsInbox_Destroy()&#160;:&#160;<a class="el" href="group__inbox_group.html#gabd6444fb8f28afb9c2b6645945f46cfe">nats.h</a></li>
+<li>natsLibevent_Attach()&#160;:&#160;<a class="el" href="group__libevent_functions.html#ga30c00f21a5251ee9fde09c1f2b429cd2">libevent.h</a></li>
+<li>natsLibevent_Detach()&#160;:&#160;<a class="el" href="group__libevent_functions.html#gaac76f5937329a8650f69c6bd8af36cd5">libevent.h</a></li>
+<li>natsLibevent_Init()&#160;:&#160;<a class="el" href="group__libevent_functions.html#ga195d269473332931fd0fede0bac3309e">libevent.h</a></li>
+<li>natsLibevent_Read()&#160;:&#160;<a class="el" href="group__libevent_functions.html#ga8a14ce23b4f6ba3bf63369961f9a5552">libevent.h</a></li>
+<li>natsLibevent_Write()&#160;:&#160;<a class="el" href="group__libevent_functions.html#ga7ac99f326a59e5663ff66f5023c87091">libevent.h</a></li>
+<li>natsLibuv_Attach()&#160;:&#160;<a class="el" href="group__libuv_functions.html#ga86ac71cffe752effd7397740d80c3c42">libuv.h</a></li>
+<li>natsLibuv_Detach()&#160;:&#160;<a class="el" href="group__libuv_functions.html#ga8df663525fb59b882a0f3bd563083dc7">libuv.h</a></li>
+<li>natsLibuv_Init()&#160;:&#160;<a class="el" href="group__libuv_functions.html#ga5d4b677cbe1cd132c37bc56dbfc6949e">libuv.h</a></li>
+<li>natsLibuv_Read()&#160;:&#160;<a class="el" href="group__libuv_functions.html#ga85c722b2d2699a954362b20528f0aaac">libuv.h</a></li>
+<li>natsLibuv_SetThreadLocalLoop()&#160;:&#160;<a class="el" href="group__libuv_functions.html#ga1baf4a20b138dcf00807a8b830f4e02d">libuv.h</a></li>
+<li>natsLibuv_Write()&#160;:&#160;<a class="el" href="group__libuv_functions.html#gafaa633c9067f485f330b72644277b07d">libuv.h</a></li>
+<li>natsMsg&#160;:&#160;<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">nats.h</a></li>
+<li>natsMsg_Ack()&#160;:&#160;<a class="el" href="group__js_msg.html#gae454fb7e7097a3cd3362cb49ef8a3c84">nats.h</a></li>
+<li>natsMsg_AckSync()&#160;:&#160;<a class="el" href="group__js_msg.html#gafb899ebf8e89b3a858fe20f7853635a7">nats.h</a></li>
+<li>natsMsg_Create()&#160;:&#160;<a class="el" href="group__msg_group.html#ga098e4fec1c5a71c00a0d092fbd6d1a21">nats.h</a></li>
+<li>natsMsg_Destroy()&#160;:&#160;<a class="el" href="group__msg_group.html#ga9e9590018284939f43f60964283f33ae">nats.h</a></li>
+<li>natsMsg_GetData()&#160;:&#160;<a class="el" href="group__msg_group.html#ga523364451fd92534e754054266196e59">nats.h</a></li>
+<li>natsMsg_GetDataLength()&#160;:&#160;<a class="el" href="group__msg_group.html#ga25b69066ae50287e178aaf4f70f7d3de">nats.h</a></li>
+<li>natsMsg_GetMetaData()&#160;:&#160;<a class="el" href="group__js_msg.html#gacf48e59038fab35849e9dc6f8fcf6328">nats.h</a></li>
+<li>natsMsg_GetReply()&#160;:&#160;<a class="el" href="group__msg_group.html#ga880535362c91b3e405792aa66ff945b6">nats.h</a></li>
+<li>natsMsg_GetSequence()&#160;:&#160;<a class="el" href="group__js_msg.html#ga819be2990ec20b964aa574b5331d7f2e">nats.h</a></li>
+<li>natsMsg_GetSubject()&#160;:&#160;<a class="el" href="group__msg_group.html#gad7cad38946648e3047aa0665a3dd230a">nats.h</a></li>
+<li>natsMsg_GetTime()&#160;:&#160;<a class="el" href="group__js_msg.html#gab4850497c5481f5ec6eb1fcdb43646f5">nats.h</a></li>
+<li>natsMsg_InProgress()&#160;:&#160;<a class="el" href="group__js_msg.html#gae1e0beb19cd76e2f69e6415c41c9bb39">nats.h</a></li>
+<li>natsMsg_IsNoResponders()&#160;:&#160;<a class="el" href="group__msg_group.html#ga43aa4a8e4b93725b4876ee2677e19c7b">nats.h</a></li>
+<li>natsMsg_Nak()&#160;:&#160;<a class="el" href="group__js_msg.html#gac271b874154301da9759f9ac05768b47">nats.h</a></li>
+<li>natsMsg_NakWithDelay()&#160;:&#160;<a class="el" href="group__js_msg.html#gac0697389fa60a3c4725e53cd23ada7bd">nats.h</a></li>
+<li>natsMsg_Term()&#160;:&#160;<a class="el" href="group__js_msg.html#gae84d21e4388255e9d990e53c9f67e7c4">nats.h</a></li>
+<li>natsMsgHandler&#160;:&#160;<a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe">nats.h</a></li>
+<li>natsMsgHeader_Add()&#160;:&#160;<a class="el" href="group__msg_group.html#ga2b641ec3b1745604d7de1102e472254b">nats.h</a></li>
+<li>natsMsgHeader_Delete()&#160;:&#160;<a class="el" href="group__msg_group.html#gac78ca02dc93d05cae837ced6386408f1">nats.h</a></li>
+<li>natsMsgHeader_Get()&#160;:&#160;<a class="el" href="group__msg_group.html#gab3349f0b0ce721b340d5c0753c90ee18">nats.h</a></li>
+<li>natsMsgHeader_Keys()&#160;:&#160;<a class="el" href="group__msg_group.html#ga6ee8a007111ada293dd24ff0bab02491">nats.h</a></li>
+<li>natsMsgHeader_Set()&#160;:&#160;<a class="el" href="group__msg_group.html#gaf30b47d4217c9335919f05536e379af8">nats.h</a></li>
+<li>natsMsgHeader_Values()&#160;:&#160;<a class="el" href="group__msg_group.html#gae1ce9c9d82d151a3ea9dc03da048f66f">nats.h</a></li>
+<li>natsMsgList&#160;:&#160;<a class="el" href="group__types_group.html#gafd5523161ec3783e79719cb9a9a66b5b">nats.h</a></li>
+<li>natsMsgList_Destroy()&#160;:&#160;<a class="el" href="group__msg_group.html#ga1a091d24f939d881bf04fba78b8995c2">nats.h</a></li>
+<li>natsOnCompleteCB&#160;:&#160;<a class="el" href="group__callbacks_group.html#ga245131e64f1d0dff7edc8ed874a07e9a">nats.h</a></li>
+<li>natsOptions&#160;:&#160;<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">nats.h</a></li>
+<li>natsOptions_Create()&#160;:&#160;<a class="el" href="group__opts_group.html#ga61d4a0cf2fbf7d13cc910e5a00c575be">nats.h</a></li>
+<li>natsOptions_Destroy()&#160;:&#160;<a class="el" href="group__opts_group.html#ga93d8068cd6fff53b7f8e1c403db45eb9">nats.h</a></li>
+<li>natsOptions_DisableNoResponders()&#160;:&#160;<a class="el" href="group__opts_group.html#ga192465163abb87ad48a843b45cdf9984">nats.h</a></li>
+<li>natsOptions_IPResolutionOrder()&#160;:&#160;<a class="el" href="group__opts_group.html#ga7ca713c7532eff4d41a492e95b8822cf">nats.h</a></li>
+<li>natsOptions_LoadCATrustedCertificates()&#160;:&#160;<a class="el" href="group__opts_group.html#ga2cd6563694a439b3949a31fd81103099">nats.h</a></li>
+<li>natsOptions_LoadCertificatesChain()&#160;:&#160;<a class="el" href="group__opts_group.html#ga36943e2ba53d05407cdabc4e7e96484b">nats.h</a></li>
+<li>natsOptions_SetAllowReconnect()&#160;:&#160;<a class="el" href="group__opts_group.html#ga3d1d3cb2f2a0e23d27dd60e96d1cc91b">nats.h</a></li>
+<li>natsOptions_SetCATrustedCertificates()&#160;:&#160;<a class="el" href="group__opts_group.html#gafb30794fc2ae74b9e0bd8fb609b901c8">nats.h</a></li>
+<li>natsOptions_SetCertificatesChain()&#160;:&#160;<a class="el" href="group__opts_group.html#gae98f0f9034e93941767ab1ae6eec2c0c">nats.h</a></li>
+<li>natsOptions_SetCiphers()&#160;:&#160;<a class="el" href="group__opts_group.html#ga5698f020e8eb3e7440eb073fe08ef62c">nats.h</a></li>
+<li>natsOptions_SetCipherSuites()&#160;:&#160;<a class="el" href="group__opts_group.html#ga2b7f144b011d8ce62941b608a8f324f0">nats.h</a></li>
+<li>natsOptions_SetClosedCB()&#160;:&#160;<a class="el" href="group__opts_group.html#ga44410242e73134e5bb51ef27904a9253">nats.h</a></li>
+<li>natsOptions_SetCustomInboxPrefix()&#160;:&#160;<a class="el" href="group__opts_group.html#gac5173473a731a4a36d15346fedddf91f">nats.h</a></li>
+<li>natsOptions_SetCustomReconnectDelay()&#160;:&#160;<a class="el" href="group__opts_group.html#ga3593165aa113d6736e0226ddc56b3e9d">nats.h</a></li>
+<li>natsOptions_SetDisconnectedCB()&#160;:&#160;<a class="el" href="group__opts_group.html#gadc8dc0cedd91bda71d544f3dedc4a039">nats.h</a></li>
+<li>natsOptions_SetDiscoveredServersCB()&#160;:&#160;<a class="el" href="group__opts_group.html#gab5baab507c974402ab0d8c5e8227ee65">nats.h</a></li>
+<li>natsOptions_SetErrorHandler()&#160;:&#160;<a class="el" href="group__opts_group.html#ga127ec7a8196b453947a7fa9a64096cbd">nats.h</a></li>
+<li>natsOptions_SetEventLoop()&#160;:&#160;<a class="el" href="group__opts_group.html#gab09491bad908dedcb323c780280733ff">nats.h</a></li>
+<li>natsOptions_SetExpectedHostname()&#160;:&#160;<a class="el" href="group__opts_group.html#ga0ba43ba9930df385e4781b12be9f2851">nats.h</a></li>
+<li>natsOptions_SetFailRequestsOnDisconnect()&#160;:&#160;<a class="el" href="group__opts_group.html#gadef4376a5e608cbc8c1a9e2b6335dc79">nats.h</a></li>
+<li>natsOptions_SetIgnoreDiscoveredServers()&#160;:&#160;<a class="el" href="group__opts_group.html#ga7e4172084520708b8c9f28e73174461c">nats.h</a></li>
+<li>natsOptions_SetIOBufSize()&#160;:&#160;<a class="el" href="group__opts_group.html#ga1a3e3abfd7ddd8aff247df8f332bbda3">nats.h</a></li>
+<li>natsOptions_SetLameDuckModeCB()&#160;:&#160;<a class="el" href="group__opts_group.html#ga54dea2ffeb33779771652a7a14fc4adc">nats.h</a></li>
+<li>natsOptions_SetMaxPendingMsgs()&#160;:&#160;<a class="el" href="group__opts_group.html#ga95510436eee06f9992ded96a44795c40">nats.h</a></li>
+<li>natsOptions_SetMaxPingsOut()&#160;:&#160;<a class="el" href="group__opts_group.html#gaaff89c3f41627f4b2929dbc9b82d265b">nats.h</a></li>
+<li>natsOptions_SetMaxReconnect()&#160;:&#160;<a class="el" href="group__opts_group.html#gab54cd2719c0b64eebd6c7b83dd2908a0">nats.h</a></li>
+<li>natsOptions_SetName()&#160;:&#160;<a class="el" href="group__opts_group.html#ga1c529d347be0fe2eec17c7f4698e283e">nats.h</a></li>
+<li>natsOptions_SetNKey()&#160;:&#160;<a class="el" href="group__opts_group.html#ga0290eac4665569c850468d9f00e246a0">nats.h</a></li>
+<li>natsOptions_SetNKeyFromSeed()&#160;:&#160;<a class="el" href="group__opts_group.html#ga696f02e0493c00d3c1eafff45b62b68e">nats.h</a></li>
+<li>natsOptions_SetNoEcho()&#160;:&#160;<a class="el" href="group__opts_group.html#ga4f694b87039cedaa65cd25656b14d1a3">nats.h</a></li>
+<li>natsOptions_SetNoRandomize()&#160;:&#160;<a class="el" href="group__opts_group.html#gaabf8763b931dcf389c83fd95d760a413">nats.h</a></li>
+<li>natsOptions_SetPedantic()&#160;:&#160;<a class="el" href="group__opts_group.html#ga26f166af20de98bec67bc6cc916f769e">nats.h</a></li>
+<li>natsOptions_SetPingInterval()&#160;:&#160;<a class="el" href="group__opts_group.html#gae68fb615835364c0809555e8dc93f57e">nats.h</a></li>
+<li>natsOptions_SetReconnectBufSize()&#160;:&#160;<a class="el" href="group__opts_group.html#gaa0d4b7ece8477cb9879f0dafff3456a5">nats.h</a></li>
+<li>natsOptions_SetReconnectedCB()&#160;:&#160;<a class="el" href="group__opts_group.html#ga26a48c8529fffa5f5d1a61c030979980">nats.h</a></li>
+<li>natsOptions_SetReconnectJitter()&#160;:&#160;<a class="el" href="group__opts_group.html#ga8f3df57ed8ae418d3ae6678ae5e2a5d2">nats.h</a></li>
+<li>natsOptions_SetReconnectWait()&#160;:&#160;<a class="el" href="group__opts_group.html#ga2730f4e16e318a2ef8de98dbf6ede807">nats.h</a></li>
+<li>natsOptions_SetRetryOnFailedConnect()&#160;:&#160;<a class="el" href="group__opts_group.html#ga20946800d024b7089e73d63454d1c19f">nats.h</a></li>
+<li>natsOptions_SetSecure()&#160;:&#160;<a class="el" href="group__opts_group.html#gaa1f09416d443fa7a6af6b695da563eba">nats.h</a></li>
+<li>natsOptions_SetSendAsap()&#160;:&#160;<a class="el" href="group__opts_group.html#ga8f06568cc3319a5a0eef9f80282034ca">nats.h</a></li>
+<li>natsOptions_SetServers()&#160;:&#160;<a class="el" href="group__opts_group.html#gacb7e964ae54b74d972d72e118b7b8bdf">nats.h</a></li>
+<li>natsOptions_SetTimeout()&#160;:&#160;<a class="el" href="group__opts_group.html#ga17cd7fe41176cd98aca1184fa9352ad9">nats.h</a></li>
+<li>natsOptions_SetToken()&#160;:&#160;<a class="el" href="group__opts_group.html#gad58a5b9dabadeebda30e952ff7b39193">nats.h</a></li>
+<li>natsOptions_SetTokenHandler()&#160;:&#160;<a class="el" href="group__opts_group.html#ga23a3b1f022112e98ddccb18b247b4426">nats.h</a></li>
+<li>natsOptions_SetURL()&#160;:&#160;<a class="el" href="group__opts_group.html#ga3f7e760214417c7d87541ecb9ab5bea5">nats.h</a></li>
+<li>natsOptions_SetUserCredentialsCallbacks()&#160;:&#160;<a class="el" href="group__opts_group.html#ga60117450fc1f7b6f81bab455aeed7515">nats.h</a></li>
+<li>natsOptions_SetUserCredentialsFromFiles()&#160;:&#160;<a class="el" href="group__opts_group.html#ga59b47f7b7a19085cf8eaada9bfe5606e">nats.h</a></li>
+<li>natsOptions_SetUserInfo()&#160;:&#160;<a class="el" href="group__opts_group.html#ga5b99da7dd74aac3be962f323c3863d9e">nats.h</a></li>
+<li>natsOptions_SetVerbose()&#160;:&#160;<a class="el" href="group__opts_group.html#gaa16bfd09ef318af18c27a0e199681b69">nats.h</a></li>
+<li>natsOptions_SetWriteDeadline()&#160;:&#160;<a class="el" href="group__opts_group.html#gaafda5fb8d9ee3a17bd475ceaecfac218">nats.h</a></li>
+<li>natsOptions_SkipServerVerification()&#160;:&#160;<a class="el" href="group__opts_group.html#ga6f804ec44adc299989fe623570679da3">nats.h</a></li>
+<li>natsOptions_UseGlobalMessageDelivery()&#160;:&#160;<a class="el" href="group__opts_group.html#gabf060c92648b50c069f0abe7cbb06f1c">nats.h</a></li>
+<li>natsOptions_UseOldRequestStyle()&#160;:&#160;<a class="el" href="group__opts_group.html#ga70aa85319933d78c0076cc862fa3e5a6">nats.h</a></li>
+<li>natsSignatureHandler&#160;:&#160;<a class="el" href="group__callbacks_group.html#gab786ffd670c86de0563559351305080b">nats.h</a></li>
+<li>natsSock&#160;:&#160;<a class="el" href="nats_8h.html#af798865ac824e5959987de0fe8d07383">nats.h</a></li>
+<li>natsStatistics&#160;:&#160;<a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa">nats.h</a></li>
+<li>natsStatistics_Create()&#160;:&#160;<a class="el" href="group__stats_group.html#gafa923df029168f4991b77ffdd9e24877">nats.h</a></li>
+<li>natsStatistics_Destroy()&#160;:&#160;<a class="el" href="group__stats_group.html#ga26a04e77af8fc160adf7c33088dcf59c">nats.h</a></li>
+<li>natsStatistics_GetCounts()&#160;:&#160;<a class="el" href="group__stats_group.html#gad85f5ffb4272713f6cc6d988e6d4e75f">nats.h</a></li>
+<li>natsStatus&#160;:&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">status.h</a></li>
+<li>natsStatus_GetText()&#160;:&#160;<a class="el" href="group__status_group.html#ga4a83c4a08f1e4dd9451c1a88b6a4254e">nats.h</a></li>
+<li>natsSubscription&#160;:&#160;<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">nats.h</a></li>
+<li>natsSubscription_AutoUnsubscribe()&#160;:&#160;<a class="el" href="group__sub_group.html#ga09f285de2746a6e27fc66efd60bd3116">nats.h</a></li>
+<li>natsSubscription_ClearMaxPending()&#160;:&#160;<a class="el" href="group__sub_group.html#gafe31911d8372db401d33856465421710">nats.h</a></li>
+<li>natsSubscription_Destroy()&#160;:&#160;<a class="el" href="group__sub_group.html#ga50a95dd96e9b714201679a015d62832f">nats.h</a></li>
+<li>natsSubscription_Drain()&#160;:&#160;<a class="el" href="group__sub_group.html#ga26c9736289d326fb7d6df7e2a0df72ab">nats.h</a></li>
+<li>natsSubscription_DrainCompletionStatus()&#160;:&#160;<a class="el" href="group__sub_group.html#ga9834bd02f67a25ac084d5ad71e146019">nats.h</a></li>
+<li>natsSubscription_DrainTimeout()&#160;:&#160;<a class="el" href="group__sub_group.html#ga9c26a3f9584e7804060a48ec1b7e2a68">nats.h</a></li>
+<li>natsSubscription_Fetch()&#160;:&#160;<a class="el" href="group__js_sub_group.html#gafc5e0d2269bd23b4d5fb7f3b05278e50">nats.h</a></li>
+<li>natsSubscription_FetchRequest()&#160;:&#160;<a class="el" href="group__js_sub_group.html#ga676292505e7fde8688cfd886b79a10ed">nats.h</a></li>
+<li>natsSubscription_GetConsumerInfo()&#160;:&#160;<a class="el" href="group__js_sub_group.html#gaae716a1431db065744c079b71a9f4c2e">nats.h</a></li>
+<li>natsSubscription_GetDelivered()&#160;:&#160;<a class="el" href="group__sub_group.html#ga476b7276d0b7f9946834d2bb2423e955">nats.h</a></li>
+<li>natsSubscription_GetDropped()&#160;:&#160;<a class="el" href="group__sub_group.html#ga24f1636869e26661ce62c9c9f4d80823">nats.h</a></li>
+<li>natsSubscription_GetID()&#160;:&#160;<a class="el" href="group__sub_group.html#ga5a029a784c0a7f8b5800b48cc995db20">nats.h</a></li>
+<li>natsSubscription_GetMaxPending()&#160;:&#160;<a class="el" href="group__sub_group.html#ga0abc5d9afbc6b0c9c5adaf533904c968">nats.h</a></li>
+<li>natsSubscription_GetPending()&#160;:&#160;<a class="el" href="group__sub_group.html#gaca6262e2ef842caa701a9f233db72707">nats.h</a></li>
+<li>natsSubscription_GetPendingLimits()&#160;:&#160;<a class="el" href="group__sub_group.html#ga786bb458981274fe717f266bd3b96d96">nats.h</a></li>
+<li>natsSubscription_GetSequenceMismatch()&#160;:&#160;<a class="el" href="group__js_sub_group.html#ga0daed9f0d2d00cb14314ecc180a6fa84">nats.h</a></li>
+<li>natsSubscription_GetStats()&#160;:&#160;<a class="el" href="group__sub_group.html#ga12b60cdb3aca7329edebc480ae86bfab">nats.h</a></li>
+<li>natsSubscription_GetSubject()&#160;:&#160;<a class="el" href="group__sub_group.html#gadd4872b9fc5678a73f9ab04ce8428432">nats.h</a></li>
+<li>natsSubscription_IsValid()&#160;:&#160;<a class="el" href="group__sub_group.html#ga5e6454bbc7a90b9694112d45bd8de903">nats.h</a></li>
+<li>natsSubscription_NextMsg()&#160;:&#160;<a class="el" href="group__sub_group.html#ga6538a5d78dfb0f16514b94c8e74c11af">nats.h</a></li>
+<li>natsSubscription_NoDeliveryDelay()&#160;:&#160;<a class="el" href="group__sub_group.html#ga38f1e41fc7619101fc4aa52014dd5428">nats.h</a></li>
+<li>natsSubscription_QueuedMsgs()&#160;:&#160;<a class="el" href="group__sub_group.html#ga8a37b2d5290da3aecc05483d79e7e254">nats.h</a></li>
+<li>natsSubscription_SetOnCompleteCB()&#160;:&#160;<a class="el" href="group__sub_group.html#gaea632f845d473e7461b134c0e7bf4077">nats.h</a></li>
+<li>natsSubscription_SetPendingLimits()&#160;:&#160;<a class="el" href="group__sub_group.html#ga68a7cea89e75c529a7dd3bb77303dda4">nats.h</a></li>
+<li>natsSubscription_Unsubscribe()&#160;:&#160;<a class="el" href="group__sub_group.html#gaee87f8be0e6c2a4693ba2cea070583ba">nats.h</a></li>
+<li>natsSubscription_WaitForDrainCompletion()&#160;:&#160;<a class="el" href="group__sub_group.html#ga0408c9b6e4ad4078ac0267656ace222d">nats.h</a></li>
+<li>natsTokenHandler&#160;:&#160;<a class="el" href="group__callbacks_group.html#ga4b02de70fe9380d184fd01d87527f499">nats.h</a></li>
+<li>natsUserJWTHandler&#160;:&#160;<a class="el" href="group__callbacks_group.html#ga258b30458134be90f17315c037f34b7b">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/globals_r.html b/doc/html/globals_r.html
new file mode 100644 (file)
index 0000000..6e0a34b
--- /dev/null
@@ -0,0 +1,147 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<title>NATS C Client with Streaming support: File Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<script type="text/javascript">
+  $(document).ready(initResizable);
+  $(window).load(resizeHeight);
+</script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<script type="text/javascript">
+  $(document).ready(function() { init_search(); });
+</script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with Streaming support
+   &#160;<span id="projectnumber">1.8.0-beta</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.11 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+  <div id="navrow1" class="tabs">
+    <ul class="tablist">
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
+      <li><a href="modules.html"><span>Modules</span></a></li>
+      <li class="current"><a href="files.html"><span>Files</span></a></li>
+      <li>
+        <div id="MSearchBox" class="MSearchBoxInactive">
+        <span class="left">
+          <img id="MSearchSelect" src="search/mag_sel.png"
+               onmouseover="return searchBox.OnSearchSelectShow()"
+               onmouseout="return searchBox.OnSearchSelectHide()"
+               alt=""/>
+          <input type="text" id="MSearchField" value="Search" accesskey="S"
+               onfocus="searchBox.OnSearchFieldFocus(true)" 
+               onblur="searchBox.OnSearchFieldFocus(false)" 
+               onkeyup="searchBox.OnSearchFieldChange(event)"/>
+          </span><span class="right">
+            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
+          </span>
+        </div>
+      </li>
+    </ul>
+  </div>
+  <div id="navrow2" class="tabs2">
+    <ul class="tablist">
+      <li><a href="files.html"><span>File&#160;List</span></a></li>
+      <li class="current"><a href="globals.html"><span>File&#160;Members</span></a></li>
+    </ul>
+  </div>
+  <div id="navrow3" class="tabs2">
+    <ul class="tablist">
+      <li class="current"><a href="globals.html"><span>All</span></a></li>
+      <li><a href="globals_func.html"><span>Functions</span></a></li>
+      <li><a href="globals_type.html"><span>Typedefs</span></a></li>
+      <li><a href="globals_enum.html"><span>Enumerations</span></a></li>
+      <li><a href="globals_eval.html"><span>Enumerator</span></a></li>
+      <li><a href="globals_defs.html"><span>Macros</span></a></li>
+    </ul>
+  </div>
+  <div id="navrow4" class="tabs3">
+    <ul class="tablist">
+      <li><a href="globals.html#index_c"><span>c</span></a></li>
+      <li><a href="globals_d.html#index_d"><span>d</span></a></li>
+      <li><a href="globals_n.html#index_n"><span>n</span></a></li>
+      <li class="current"><a href="globals_r.html#index_r"><span>r</span></a></li>
+      <li><a href="globals_s.html#index_s"><span>s</span></a></li>
+    </ul>
+  </div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+$(document).ready(function(){initNavTree('globals_r.html','');});
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0" 
+        name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="contents">
+<div class="textblock">Here is a list of all file members with links to the files they belong to:</div>
+
+<h3><a class="anchor" id="index_r"></a>- r -</h3><ul>
+<li>RECONNECTING
+: <a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51a1d5843fca4a8464bd4e24c90725352c0">status.h</a>
+</li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/globals_s.html b/doc/html/globals_s.html
new file mode 100644 (file)
index 0000000..34ab922
--- /dev/null
@@ -0,0 +1,159 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: File Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('globals_s.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+<div class="textblock">Here is a list of all file members with links to the files they belong to:</div>
+
+<h3><a id="index_s" name="index_s"></a>- s -</h3><ul>
+<li>stanConnection&#160;:&#160;<a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">nats.h</a></li>
+<li>stanConnection_Close()&#160;:&#160;<a class="el" href="group__stan_conn_mgt_group.html#ga4952a7f65a53fdb5ca1c26b1a1656f1d">nats.h</a></li>
+<li>stanConnection_Connect()&#160;:&#160;<a class="el" href="group__stan_conn_mgt_group.html#ga35e0e6e5e3b7f3818a3ac3600efb8f8f">nats.h</a></li>
+<li>stanConnection_Destroy()&#160;:&#160;<a class="el" href="group__stan_conn_mgt_group.html#gaea095eec18fdf04e06de16711f8b1a04">nats.h</a></li>
+<li>stanConnection_GetNATSConnection()&#160;:&#160;<a class="el" href="group__stan_conn_mgt_group.html#ga166ec494a55c9b1f9ebafd2294e05ff6">nats.h</a></li>
+<li>stanConnection_Publish()&#160;:&#160;<a class="el" href="group__stan_conn_pub_group.html#ga24f3f7f709b15fe53e1edaeead08fc7d">nats.h</a></li>
+<li>stanConnection_PublishAsync()&#160;:&#160;<a class="el" href="group__stan_conn_pub_group.html#ga0c4d1e4615f8ac834f0a4021f75d39f0">nats.h</a></li>
+<li>stanConnection_QueueSubscribe()&#160;:&#160;<a class="el" href="group__stan_conn_sub_group.html#ga17d42bf9a4fa39470561a1a668e6b4a2">nats.h</a></li>
+<li>stanConnection_ReleaseNATSConnection()&#160;:&#160;<a class="el" href="group__stan_conn_mgt_group.html#ga2e56a93825e1214a5ab688860e2a8ce6">nats.h</a></li>
+<li>stanConnection_Subscribe()&#160;:&#160;<a class="el" href="group__stan_conn_sub_group.html#gae545358fdc493baf6d29429a8156781f">nats.h</a></li>
+<li>stanConnectionLostHandler&#160;:&#160;<a class="el" href="group__callbacks_group.html#gac34092f6c698374f86ad349302bdd55c">nats.h</a></li>
+<li>stanConnOptions&#160;:&#160;<a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">nats.h</a></li>
+<li>stanConnOptions_Create()&#160;:&#160;<a class="el" href="group__stan_conn_opts_group.html#gaff52a1ce90253b4bdbb0005fca4f71b6">nats.h</a></li>
+<li>stanConnOptions_Destroy()&#160;:&#160;<a class="el" href="group__stan_conn_opts_group.html#ga83fd0a29b136cbfb643be642eb2fa726">nats.h</a></li>
+<li>stanConnOptions_SetConnectionLostHandler()&#160;:&#160;<a class="el" href="group__stan_conn_opts_group.html#ga19ba15c8001aa835b261eea3a309e6d3">nats.h</a></li>
+<li>stanConnOptions_SetConnectionWait()&#160;:&#160;<a class="el" href="group__stan_conn_opts_group.html#ga66c72c482696d9ceca71fced7cbb1264">nats.h</a></li>
+<li>stanConnOptions_SetDiscoveryPrefix()&#160;:&#160;<a class="el" href="group__stan_conn_opts_group.html#ga07105d1d00878bba19f47243b2c88402">nats.h</a></li>
+<li>stanConnOptions_SetMaxPubAcksInflight()&#160;:&#160;<a class="el" href="group__stan_conn_opts_group.html#ga29eee1be7eff749aeac3bab60d1b0405">nats.h</a></li>
+<li>stanConnOptions_SetNATSOptions()&#160;:&#160;<a class="el" href="group__stan_conn_opts_group.html#gae3fc9a4daa7f85367811a313857337b4">nats.h</a></li>
+<li>stanConnOptions_SetPings()&#160;:&#160;<a class="el" href="group__stan_conn_opts_group.html#gad835223f08fbeae2a3c7a34d3fa1550b">nats.h</a></li>
+<li>stanConnOptions_SetPubAckWait()&#160;:&#160;<a class="el" href="group__stan_conn_opts_group.html#ga36f2ee441562dcf619d6e020b823fc96">nats.h</a></li>
+<li>stanConnOptions_SetURL()&#160;:&#160;<a class="el" href="group__stan_conn_opts_group.html#ga3c6d511fc1e1febcdf5344960de5a0b3">nats.h</a></li>
+<li>stanMsg&#160;:&#160;<a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">nats.h</a></li>
+<li>stanMsg_Destroy()&#160;:&#160;<a class="el" href="group__stan_msg_group.html#gacd0059fb499963f5b2eae18053e5f74f">nats.h</a></li>
+<li>stanMsg_GetData()&#160;:&#160;<a class="el" href="group__stan_msg_group.html#ga2f27fbfb79a46c52e079f670c59e1260">nats.h</a></li>
+<li>stanMsg_GetDataLength()&#160;:&#160;<a class="el" href="group__stan_msg_group.html#ga7d1e394a686bc25ab7376b7f28b9e777">nats.h</a></li>
+<li>stanMsg_GetSequence()&#160;:&#160;<a class="el" href="group__stan_msg_group.html#ga98b66ff73447e1d7e329edbfcde782b5">nats.h</a></li>
+<li>stanMsg_GetTimestamp()&#160;:&#160;<a class="el" href="group__stan_msg_group.html#ga2fa524b11e9621cf46ca9b1a3ca66452">nats.h</a></li>
+<li>stanMsg_IsRedelivered()&#160;:&#160;<a class="el" href="group__stan_msg_group.html#ga8e537d014b89d9d7da7906b2ee75d5c0">nats.h</a></li>
+<li>stanMsgHandler&#160;:&#160;<a class="el" href="group__callbacks_group.html#gaf7456e37fa14f1834d9048d3789e9409">nats.h</a></li>
+<li>stanPubAckHandler&#160;:&#160;<a class="el" href="group__callbacks_group.html#gad5d6a685731b3bf635995b7375af4d18">nats.h</a></li>
+<li>stanSubOptions&#160;:&#160;<a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">nats.h</a></li>
+<li>stanSubOptions_Create()&#160;:&#160;<a class="el" href="group__stan_sub_opts_group.html#gad87a2cef4f4ddf64696f9864773c37cf">nats.h</a></li>
+<li>stanSubOptions_DeliverAllAvailable()&#160;:&#160;<a class="el" href="group__stan_sub_opts_group.html#gab09b81358e93199a4631eb06f1ec179f">nats.h</a></li>
+<li>stanSubOptions_Destroy()&#160;:&#160;<a class="el" href="group__stan_sub_opts_group.html#ga1b56877d0a6729e148c9c288e2b88e3f">nats.h</a></li>
+<li>stanSubOptions_SetAckWait()&#160;:&#160;<a class="el" href="group__stan_sub_opts_group.html#gafbb4e6c74978c4e8f30f016c20cc2bdf">nats.h</a></li>
+<li>stanSubOptions_SetDurableName()&#160;:&#160;<a class="el" href="group__stan_sub_opts_group.html#gaa018bceba99ef3726157e87c6918ab14">nats.h</a></li>
+<li>stanSubOptions_SetManualAckMode()&#160;:&#160;<a class="el" href="group__stan_sub_opts_group.html#ga6f49ae2629e49d2bfa35990cf030bf83">nats.h</a></li>
+<li>stanSubOptions_SetMaxInflight()&#160;:&#160;<a class="el" href="group__stan_sub_opts_group.html#ga35efbdea888e00440c500845064931c0">nats.h</a></li>
+<li>stanSubOptions_StartAtSequence()&#160;:&#160;<a class="el" href="group__stan_sub_opts_group.html#ga6cb7f6e1ac697d16959f9042eeb84dc1">nats.h</a></li>
+<li>stanSubOptions_StartAtTime()&#160;:&#160;<a class="el" href="group__stan_sub_opts_group.html#gaafd7a553486eea3c9d309da0744a3608">nats.h</a></li>
+<li>stanSubOptions_StartAtTimeDelta()&#160;:&#160;<a class="el" href="group__stan_sub_opts_group.html#ga27d9175901997b8468997019746599b5">nats.h</a></li>
+<li>stanSubOptions_StartWithLastReceived()&#160;:&#160;<a class="el" href="group__stan_sub_opts_group.html#ga856a74e31f3307faf988747c1f88717c">nats.h</a></li>
+<li>stanSubscription&#160;:&#160;<a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">nats.h</a></li>
+<li>stanSubscription_AckMsg()&#160;:&#160;<a class="el" href="group__stan_sub_group.html#ga3a1cca9fa3ea54fcf7a43fd1335a26d3">nats.h</a></li>
+<li>stanSubscription_Close()&#160;:&#160;<a class="el" href="group__stan_sub_group.html#gacfa3a7b4fa333c84acfa7521fbbb5bcc">nats.h</a></li>
+<li>stanSubscription_Destroy()&#160;:&#160;<a class="el" href="group__stan_sub_group.html#ga3f6ce924f6a1830a55e30e9910aad4ba">nats.h</a></li>
+<li>stanSubscription_SetOnCompleteCB()&#160;:&#160;<a class="el" href="group__stan_sub_group.html#ga7b039908ec45cfc2c16ec61ba8daca9d">nats.h</a></li>
+<li>stanSubscription_Unsubscribe()&#160;:&#160;<a class="el" href="group__stan_sub_group.html#gafa428a7e0f6800216cb06fd738bd235e">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/globals_type.html b/doc/html/globals_type.html
new file mode 100644 (file)
index 0000000..8b544a0
--- /dev/null
@@ -0,0 +1,196 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: File Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('globals_type.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="contents">
+&#160;
+
+<h3><a id="index_j" name="index_j"></a>- j -</h3><ul>
+<li>jsAccountInfo&#160;:&#160;<a class="el" href="group__types_group.html#ga57cdc53b29a4fedb5a4140b6e64a4fab">nats.h</a></li>
+<li>jsAccountLimits&#160;:&#160;<a class="el" href="group__types_group.html#gaa889f706cce285adb9cea8aba0b76866">nats.h</a></li>
+<li>jsAPIStats&#160;:&#160;<a class="el" href="group__types_group.html#gad057a0107367ce5727975f3daf63ff75">nats.h</a></li>
+<li>jsClusterInfo&#160;:&#160;<a class="el" href="group__types_group.html#gaaf92318ce94a1ae3547c9a7af5a3f4f6">nats.h</a></li>
+<li>jsConsumerConfig&#160;:&#160;<a class="el" href="group__types_group.html#ga0483b2197c0ddd9082b48c2dd3fe7cee">nats.h</a></li>
+<li>jsConsumerInfo&#160;:&#160;<a class="el" href="group__types_group.html#ga2f21bb79884e56a5613d7fe76b11b1e5">nats.h</a></li>
+<li>jsConsumerInfoList&#160;:&#160;<a class="el" href="group__types_group.html#gadad3bf72baae970662248d82d9b05d0a">nats.h</a></li>
+<li>jsConsumerNamesList&#160;:&#160;<a class="el" href="group__types_group.html#gad00ab4381eec504ada3272aa9ff8adb2">nats.h</a></li>
+<li>jsConsumerSequenceMismatch&#160;:&#160;<a class="el" href="group__types_group.html#gace471cd2cef1df797b2a1c6b485049bd">nats.h</a></li>
+<li>jsCtx&#160;:&#160;<a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">nats.h</a></li>
+<li>jsDirectGetMsgOptions&#160;:&#160;<a class="el" href="group__types_group.html#ga85123afa00d522a249a5b2a8abd7e063">nats.h</a></li>
+<li>jsExternalStream&#160;:&#160;<a class="el" href="group__types_group.html#gaef6601477f6456bebc229f7f38982a6c">nats.h</a></li>
+<li>jsFetchRequest&#160;:&#160;<a class="el" href="group__types_group.html#gaf11e6664c1f335a5287af71c703935fa">nats.h</a></li>
+<li>jsLostStreamData&#160;:&#160;<a class="el" href="group__types_group.html#gaf80828510450faf84bbf456e94f5b784">nats.h</a></li>
+<li>jsMsgMetaData&#160;:&#160;<a class="el" href="group__types_group.html#gace9595b1a5ce3f7a13670367fd293b4a">nats.h</a></li>
+<li>jsOptions&#160;:&#160;<a class="el" href="group__types_group.html#ga0e3a3b7cf89e7dfa955f0f8f3f1eb6e5">nats.h</a></li>
+<li>jsPeerInfo&#160;:&#160;<a class="el" href="group__types_group.html#ga1e938dab794089f9329d7b7ece8f3e9b">nats.h</a></li>
+<li>jsPlacement&#160;:&#160;<a class="el" href="group__types_group.html#ga49d1138fac9da8b85d00a367081e91c9">nats.h</a></li>
+<li>jsPubAck&#160;:&#160;<a class="el" href="group__types_group.html#gaf1d5e436c5d41c5b9b96d84e3d2bc86f">nats.h</a></li>
+<li>jsPubAckErr&#160;:&#160;<a class="el" href="group__types_group.html#gadb7c287bc86b92765fbe45a066b96f40">nats.h</a></li>
+<li>jsPubAckErrHandler&#160;:&#160;<a class="el" href="group__callbacks_group.html#ga954768cc1d3388bb6ab723e777647992">nats.h</a></li>
+<li>jsPubAckHandler&#160;:&#160;<a class="el" href="group__callbacks_group.html#ga4f66e065bd918f02510d4c53d8a5b729">nats.h</a></li>
+<li>jsPubOptions&#160;:&#160;<a class="el" href="group__types_group.html#ga7bbea3575d35dcdbfc9b766b04269eb7">nats.h</a></li>
+<li>jsRePublish&#160;:&#160;<a class="el" href="group__types_group.html#gab991313d33ce270a882e4d0756c138f6">nats.h</a></li>
+<li>jsSequenceInfo&#160;:&#160;<a class="el" href="group__types_group.html#ga27e1a5d5b513f9eb7d61a17db71f8003">nats.h</a></li>
+<li>jsSequencePair&#160;:&#160;<a class="el" href="group__types_group.html#ga39011d30b295759b7f6ca0a7539dff8f">nats.h</a></li>
+<li>jsStreamConfig&#160;:&#160;<a class="el" href="group__types_group.html#ga26fd6a73df327ca3c271e46ddefc8acf">nats.h</a></li>
+<li>jsStreamInfo&#160;:&#160;<a class="el" href="group__types_group.html#ga2629c9454996edf7914be36a9e44921b">nats.h</a></li>
+<li>jsStreamInfoList&#160;:&#160;<a class="el" href="group__types_group.html#ga1e54c2a1bc94834d1670875fc151f565">nats.h</a></li>
+<li>jsStreamNamesList&#160;:&#160;<a class="el" href="group__types_group.html#gaf4d31a4dc83b2805422beafb1f8fa000">nats.h</a></li>
+<li>jsStreamSource&#160;:&#160;<a class="el" href="group__types_group.html#gab4c43c87d81917aab748a50eee028449">nats.h</a></li>
+<li>jsStreamSourceInfo&#160;:&#160;<a class="el" href="group__types_group.html#gab2f33f57188a550f2f747d4f27bc24bd">nats.h</a></li>
+<li>jsStreamState&#160;:&#160;<a class="el" href="group__types_group.html#ga2bfd6de6ffc84d767482b3dd57cb9271">nats.h</a></li>
+<li>jsStreamStateSubject&#160;:&#160;<a class="el" href="group__types_group.html#ga55dce2fa9ecd215716cc9ceece7dfefa">nats.h</a></li>
+<li>jsStreamStateSubjects&#160;:&#160;<a class="el" href="group__types_group.html#gae8b57d9c40364f97a705f3e61a1156b0">nats.h</a></li>
+<li>jsSubOptions&#160;:&#160;<a class="el" href="group__types_group.html#gaccfaac2079656ffd40d003e4de5d2280">nats.h</a></li>
+<li>jsTier&#160;:&#160;<a class="el" href="group__types_group.html#ga1d48d3eb36b50c9ab6d8477dccf247d8">nats.h</a></li>
+</ul>
+
+
+<h3><a id="index_k" name="index_k"></a>- k -</h3><ul>
+<li>kvConfig&#160;:&#160;<a class="el" href="group__types_group.html#ga6d594b091b4bb46192336413066a8edf">nats.h</a></li>
+<li>kvEntry&#160;:&#160;<a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">nats.h</a></li>
+<li>kvEntryList&#160;:&#160;<a class="el" href="group__types_group.html#ga0125d394a3cbae2a1713eed8fab7f78e">nats.h</a></li>
+<li>kvKeysList&#160;:&#160;<a class="el" href="group__types_group.html#gab36492d9d4370337cfed80edce4144e0">nats.h</a></li>
+<li>kvPurgeOptions&#160;:&#160;<a class="el" href="group__types_group.html#ga90e8de23c4468005488bde690a2ffe9d">nats.h</a></li>
+<li>kvStatus&#160;:&#160;<a class="el" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">nats.h</a></li>
+<li>kvStore&#160;:&#160;<a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">nats.h</a></li>
+<li>kvWatcher&#160;:&#160;<a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">nats.h</a></li>
+<li>kvWatchOptions&#160;:&#160;<a class="el" href="group__types_group.html#gac32f992fe797a1f7befc7dc3452640b6">nats.h</a></li>
+</ul>
+
+
+<h3><a id="index_n" name="index_n"></a>- n -</h3><ul>
+<li>natsConnection&#160;:&#160;<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">nats.h</a></li>
+<li>natsConnectionHandler&#160;:&#160;<a class="el" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">nats.h</a></li>
+<li>natsCustomReconnectDelayHandler&#160;:&#160;<a class="el" href="group__callbacks_group.html#ga3353d4b92851c52121f65aaf0684cba4">nats.h</a></li>
+<li>natsErrHandler&#160;:&#160;<a class="el" href="group__callbacks_group.html#ga9e511dffa471dfb971b7dd2b12329626">nats.h</a></li>
+<li>natsEvLoop_Attach&#160;:&#160;<a class="el" href="group__callbacks_group.html#ga245eab0a01a485e40fba267f84ec037f">nats.h</a></li>
+<li>natsEvLoop_Detach&#160;:&#160;<a class="el" href="group__callbacks_group.html#gab63dee7f7012ba11ae20b76dbc36f2d0">nats.h</a></li>
+<li>natsEvLoop_ReadAddRemove&#160;:&#160;<a class="el" href="group__callbacks_group.html#gaea4c125ecfb43eaf43da20e8444c2aaa">nats.h</a></li>
+<li>natsEvLoop_WriteAddRemove&#160;:&#160;<a class="el" href="group__callbacks_group.html#ga2bb5dd2d821ca5bbc0488f7e6aceed17">nats.h</a></li>
+<li>natsInbox&#160;:&#160;<a class="el" href="group__types_group.html#ga206c3d4d6f4f6f96fd2cae53a3df31c1">nats.h</a></li>
+<li>natsMsg&#160;:&#160;<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">nats.h</a></li>
+<li>natsMsgHandler&#160;:&#160;<a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe">nats.h</a></li>
+<li>natsMsgList&#160;:&#160;<a class="el" href="group__types_group.html#gafd5523161ec3783e79719cb9a9a66b5b">nats.h</a></li>
+<li>natsOnCompleteCB&#160;:&#160;<a class="el" href="group__callbacks_group.html#ga245131e64f1d0dff7edc8ed874a07e9a">nats.h</a></li>
+<li>natsOptions&#160;:&#160;<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">nats.h</a></li>
+<li>natsSignatureHandler&#160;:&#160;<a class="el" href="group__callbacks_group.html#gab786ffd670c86de0563559351305080b">nats.h</a></li>
+<li>natsSock&#160;:&#160;<a class="el" href="nats_8h.html#af798865ac824e5959987de0fe8d07383">nats.h</a></li>
+<li>natsStatistics&#160;:&#160;<a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa">nats.h</a></li>
+<li>natsSubscription&#160;:&#160;<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">nats.h</a></li>
+<li>natsTokenHandler&#160;:&#160;<a class="el" href="group__callbacks_group.html#ga4b02de70fe9380d184fd01d87527f499">nats.h</a></li>
+<li>natsUserJWTHandler&#160;:&#160;<a class="el" href="group__callbacks_group.html#ga258b30458134be90f17315c037f34b7b">nats.h</a></li>
+</ul>
+
+
+<h3><a id="index_s" name="index_s"></a>- s -</h3><ul>
+<li>stanConnection&#160;:&#160;<a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">nats.h</a></li>
+<li>stanConnectionLostHandler&#160;:&#160;<a class="el" href="group__callbacks_group.html#gac34092f6c698374f86ad349302bdd55c">nats.h</a></li>
+<li>stanConnOptions&#160;:&#160;<a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">nats.h</a></li>
+<li>stanMsg&#160;:&#160;<a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">nats.h</a></li>
+<li>stanMsgHandler&#160;:&#160;<a class="el" href="group__callbacks_group.html#gaf7456e37fa14f1834d9048d3789e9409">nats.h</a></li>
+<li>stanPubAckHandler&#160;:&#160;<a class="el" href="group__callbacks_group.html#gad5d6a685731b3bf635995b7375af4d18">nats.h</a></li>
+<li>stanSubOptions&#160;:&#160;<a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">nats.h</a></li>
+<li>stanSubscription&#160;:&#160;<a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__callbacks_group.html b/doc/html/group__callbacks_group.html
new file mode 100644 (file)
index 0000000..c51bda2
--- /dev/null
@@ -0,0 +1,541 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Callbacks</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__callbacks_group.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#typedef-members">Typedefs</a>  </div>
+  <div class="headertitle"><div class="title">Callbacks</div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
+Typedefs</h2></td></tr>
+<tr class="memitem:gad1a5ac566893e13dc8c81ac0e9c87afe"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe">natsMsgHandler</a>) (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, void *closure)</td></tr>
+<tr class="memdesc:gad1a5ac566893e13dc8c81ac0e9c87afe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback used to deliver messages to the application.  <a href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe">More...</a><br /></td></tr>
+<tr class="separator:gad1a5ac566893e13dc8c81ac0e9c87afe"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gacdef6aff3e47953f19e35857ab8e274c"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a>) (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, void *closure)</td></tr>
+<tr class="memdesc:gacdef6aff3e47953f19e35857ab8e274c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback used to notify the user of asynchronous connection events.  <a href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">More...</a><br /></td></tr>
+<tr class="separator:gacdef6aff3e47953f19e35857ab8e274c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga9e511dffa471dfb971b7dd2b12329626"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__callbacks_group.html#ga9e511dffa471dfb971b7dd2b12329626">natsErrHandler</a>) (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *subscription, <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> err, void *closure)</td></tr>
+<tr class="memdesc:ga9e511dffa471dfb971b7dd2b12329626"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback used to notify the user of errors encountered while processing inbound messages.  <a href="group__callbacks_group.html#ga9e511dffa471dfb971b7dd2b12329626">More...</a><br /></td></tr>
+<tr class="separator:ga9e511dffa471dfb971b7dd2b12329626"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga245eab0a01a485e40fba267f84ec037f"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__callbacks_group.html#ga245eab0a01a485e40fba267f84ec037f">natsEvLoop_Attach</a>) (void **userData, void *loop, <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <a class="el" href="nats_8h.html#af798865ac824e5959987de0fe8d07383">natsSock</a> socket)</td></tr>
+<tr class="memdesc:ga245eab0a01a485e40fba267f84ec037f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Attach this connection to the external event loop.  <a href="group__callbacks_group.html#ga245eab0a01a485e40fba267f84ec037f">More...</a><br /></td></tr>
+<tr class="separator:ga245eab0a01a485e40fba267f84ec037f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaea4c125ecfb43eaf43da20e8444c2aaa"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__callbacks_group.html#gaea4c125ecfb43eaf43da20e8444c2aaa">natsEvLoop_ReadAddRemove</a>) (void *userData, bool add)</td></tr>
+<tr class="memdesc:gaea4c125ecfb43eaf43da20e8444c2aaa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read event needs to be added or removed.  <a href="group__callbacks_group.html#gaea4c125ecfb43eaf43da20e8444c2aaa">More...</a><br /></td></tr>
+<tr class="separator:gaea4c125ecfb43eaf43da20e8444c2aaa"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2bb5dd2d821ca5bbc0488f7e6aceed17"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__callbacks_group.html#ga2bb5dd2d821ca5bbc0488f7e6aceed17">natsEvLoop_WriteAddRemove</a>) (void *userData, bool add)</td></tr>
+<tr class="memdesc:ga2bb5dd2d821ca5bbc0488f7e6aceed17"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write event needs to be added or removed.  <a href="group__callbacks_group.html#ga2bb5dd2d821ca5bbc0488f7e6aceed17">More...</a><br /></td></tr>
+<tr class="separator:ga2bb5dd2d821ca5bbc0488f7e6aceed17"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gab63dee7f7012ba11ae20b76dbc36f2d0"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__callbacks_group.html#gab63dee7f7012ba11ae20b76dbc36f2d0">natsEvLoop_Detach</a>) (void *userData)</td></tr>
+<tr class="memdesc:gab63dee7f7012ba11ae20b76dbc36f2d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Detach from the event loop.  <a href="group__callbacks_group.html#gab63dee7f7012ba11ae20b76dbc36f2d0">More...</a><br /></td></tr>
+<tr class="separator:gab63dee7f7012ba11ae20b76dbc36f2d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga258b30458134be90f17315c037f34b7b"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__callbacks_group.html#ga258b30458134be90f17315c037f34b7b">natsUserJWTHandler</a>) (char **userJWT, char **customErrTxt, void *closure)</td></tr>
+<tr class="memdesc:ga258b30458134be90f17315c037f34b7b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback used to fetch and return account signed user JWT.  <a href="group__callbacks_group.html#ga258b30458134be90f17315c037f34b7b">More...</a><br /></td></tr>
+<tr class="separator:ga258b30458134be90f17315c037f34b7b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gab786ffd670c86de0563559351305080b"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__callbacks_group.html#gab786ffd670c86de0563559351305080b">natsSignatureHandler</a>) (char **customErrTxt, unsigned char **signature, int *signatureLength, const char *nonce, void *closure)</td></tr>
+<tr class="memdesc:gab786ffd670c86de0563559351305080b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback used to sign a nonce sent by the server.  <a href="group__callbacks_group.html#gab786ffd670c86de0563559351305080b">More...</a><br /></td></tr>
+<tr class="separator:gab786ffd670c86de0563559351305080b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga4b02de70fe9380d184fd01d87527f499"><td class="memItemLeft" align="right" valign="top">typedef const char *(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__callbacks_group.html#ga4b02de70fe9380d184fd01d87527f499">natsTokenHandler</a>) (void *closure)</td></tr>
+<tr class="memdesc:ga4b02de70fe9380d184fd01d87527f499"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback used to build a token on connections and reconnections.  <a href="group__callbacks_group.html#ga4b02de70fe9380d184fd01d87527f499">More...</a><br /></td></tr>
+<tr class="separator:ga4b02de70fe9380d184fd01d87527f499"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga245131e64f1d0dff7edc8ed874a07e9a"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__callbacks_group.html#ga245131e64f1d0dff7edc8ed874a07e9a">natsOnCompleteCB</a>) (void *closure)</td></tr>
+<tr class="memdesc:ga245131e64f1d0dff7edc8ed874a07e9a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback used to notify that an object lifecycle is complete.  <a href="group__callbacks_group.html#ga245131e64f1d0dff7edc8ed874a07e9a">More...</a><br /></td></tr>
+<tr class="separator:ga245131e64f1d0dff7edc8ed874a07e9a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga3353d4b92851c52121f65aaf0684cba4"><td class="memItemLeft" align="right" valign="top">typedef int64_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__callbacks_group.html#ga3353d4b92851c52121f65aaf0684cba4">natsCustomReconnectDelayHandler</a>) (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, int attempts, void *closure)</td></tr>
+<tr class="memdesc:ga3353d4b92851c52121f65aaf0684cba4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback used to specify how long to wait between reconnects.  <a href="group__callbacks_group.html#ga3353d4b92851c52121f65aaf0684cba4">More...</a><br /></td></tr>
+<tr class="separator:ga3353d4b92851c52121f65aaf0684cba4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga954768cc1d3388bb6ab723e777647992"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__callbacks_group.html#ga954768cc1d3388bb6ab723e777647992">jsPubAckErrHandler</a>) (<a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="el" href="structjs_pub_ack_err.html">jsPubAckErr</a> *pae, void *closure)</td></tr>
+<tr class="memdesc:ga954768cc1d3388bb6ab723e777647992"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback used to process asynchronous publish errors from JetStream.  <a href="group__callbacks_group.html#ga954768cc1d3388bb6ab723e777647992">More...</a><br /></td></tr>
+<tr class="separator:ga954768cc1d3388bb6ab723e777647992"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga4f66e065bd918f02510d4c53d8a5b729"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__callbacks_group.html#ga4f66e065bd918f02510d4c53d8a5b729">jsPubAckHandler</a>) (<a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, <a class="el" href="structjs_pub_ack.html">jsPubAck</a> *pa, <a class="el" href="structjs_pub_ack_err.html">jsPubAckErr</a> *pae, void *closure)</td></tr>
+<tr class="memdesc:ga4f66e065bd918f02510d4c53d8a5b729"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback used to process asynchronous publish responses from JetStream.  <a href="group__callbacks_group.html#ga4f66e065bd918f02510d4c53d8a5b729">More...</a><br /></td></tr>
+<tr class="separator:ga4f66e065bd918f02510d4c53d8a5b729"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gad5d6a685731b3bf635995b7375af4d18"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__callbacks_group.html#gad5d6a685731b3bf635995b7375af4d18">stanPubAckHandler</a>) (const char *guid, const char *error, void *closure)</td></tr>
+<tr class="memdesc:gad5d6a685731b3bf635995b7375af4d18"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback used to notify of an asynchronous publish result.  <a href="group__callbacks_group.html#gad5d6a685731b3bf635995b7375af4d18">More...</a><br /></td></tr>
+<tr class="separator:gad5d6a685731b3bf635995b7375af4d18"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf7456e37fa14f1834d9048d3789e9409"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__callbacks_group.html#gaf7456e37fa14f1834d9048d3789e9409">stanMsgHandler</a>) (<a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *sc, <a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a> *sub, const char *channel, <a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a> *msg, void *closure)</td></tr>
+<tr class="memdesc:gaf7456e37fa14f1834d9048d3789e9409"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback used to deliver messages to the application.  <a href="group__callbacks_group.html#gaf7456e37fa14f1834d9048d3789e9409">More...</a><br /></td></tr>
+<tr class="separator:gaf7456e37fa14f1834d9048d3789e9409"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gac34092f6c698374f86ad349302bdd55c"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__callbacks_group.html#gac34092f6c698374f86ad349302bdd55c">stanConnectionLostHandler</a>) (<a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *sc, const char *errorTxt, void *closure)</td></tr>
+<tr class="memdesc:gac34092f6c698374f86ad349302bdd55c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback used to notify the user of the permanent loss of the connection.  <a href="group__callbacks_group.html#gac34092f6c698374f86ad349302bdd55c">More...</a><br /></td></tr>
+<tr class="separator:gac34092f6c698374f86ad349302bdd55c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<p >NATS Callbacks. </p>
+<h2 class="groupheader">Typedef Documentation</h2>
+<a id="gad1a5ac566893e13dc8c81ac0e9c87afe" name="gad1a5ac566893e13dc8c81ac0e9c87afe"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gad1a5ac566893e13dc8c81ac0e9c87afe">&#9670;&#160;</a></span>natsMsgHandler</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef void(* natsMsgHandler) (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, void *closure)</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This is the callback that one provides when creating an asynchronous subscription. The library will invoke this callback for each message arriving through the subscription's connection.</p>
+<dl class="section warning"><dt>Warning</dt><dd>If this callback is setup for a subject that is used as the reply subject to <a class="el" href="group__conn_pub_group.html#gaaaa3d75ffec2dcdc6bf905cdb1eee59e" title="Publishes data on a subject expecting replies on the given reply.">natsConnection_PublishRequest</a> calls (and its variants), it is possible to get an empty message with a header "Status" with value "503" that is sent by the server when there were no responders on the request's subject. Use <a class="el" href="group__msg_group.html#ga43aa4a8e4b93725b4876ee2677e19c7b" title="Indicates if this message is a &quot;no responders&quot; message from the server.">natsMsg_IsNoResponders</a> to know if that is the case.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__conn_sub_group.html#gaefab965b5645798d47f9244f2b3fe3fb" title="Creates an asynchronous subscription.">natsConnection_Subscribe()</a> </dd>
+<dd>
+<a class="el" href="group__conn_sub_group.html#ga3c9fee2775130786ef62f1cbeb191a48" title="Creates an asynchronous queue subscriber.">natsConnection_QueueSubscribe()</a> </dd>
+<dd>
+<a class="el" href="group__msg_group.html#ga43aa4a8e4b93725b4876ee2677e19c7b" title="Indicates if this message is a &quot;no responders&quot; message from the server.">natsMsg_IsNoResponders()</a> </dd></dl>
+
+</div>
+</div>
+<a id="gacdef6aff3e47953f19e35857ab8e274c" name="gacdef6aff3e47953f19e35857ab8e274c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gacdef6aff3e47953f19e35857ab8e274c">&#9670;&#160;</a></span>natsConnectionHandler</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef void(* natsConnectionHandler) (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, void *closure)</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This callback is used for asynchronous events such as disconnected and closed connections.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#ga44410242e73134e5bb51ef27904a9253" title="Sets the callback to be invoked when a connection to a server is permanently lost.">natsOptions_SetClosedCB()</a> </dd>
+<dd>
+<a class="el" href="group__opts_group.html#gadc8dc0cedd91bda71d544f3dedc4a039" title="Sets the callback to be invoked when the connection to a server is lost.">natsOptions_SetDisconnectedCB()</a> </dd>
+<dd>
+<a class="el" href="group__opts_group.html#ga26a48c8529fffa5f5d1a61c030979980" title="Sets the callback to be invoked when the connection has reconnected.">natsOptions_SetReconnectedCB()</a></dd></dl>
+<dl class="section warning"><dt>Warning</dt><dd>Such callback is invoked from a dedicated thread and the state of the connection that triggered the event may have changed since that event was generated. </dd></dl>
+
+</div>
+</div>
+<a id="ga9e511dffa471dfb971b7dd2b12329626" name="ga9e511dffa471dfb971b7dd2b12329626"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga9e511dffa471dfb971b7dd2b12329626">&#9670;&#160;</a></span>natsErrHandler</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef void(* natsErrHandler) (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *subscription, <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> err, void *closure)</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This callback is used to process asynchronous errors encountered while processing inbound messages, such as <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ae93ff5b7fe31f8570308385d92d317b0">NATS_SLOW_CONSUMER</a>. </p>
+
+</div>
+</div>
+<a id="ga245eab0a01a485e40fba267f84ec037f" name="ga245eab0a01a485e40fba267f84ec037f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga245eab0a01a485e40fba267f84ec037f">&#9670;&#160;</a></span>natsEvLoop_Attach</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>(* natsEvLoop_Attach) (void **userData, void *loop, <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <a class="el" href="nats_8h.html#af798865ac824e5959987de0fe8d07383">natsSock</a> socket)</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >After a connection has (re)connected, this callback is invoked. It should perform the necessary work to start polling the given socket for READ events.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">userData</td><td>location where the adapter implementation will store the object it created and that will later be passed to all other callbacks. If <code>*userData</code> is not <code>NULL</code>, this means that this is a reconnect event. </td></tr>
+    <tr><td class="paramname">loop</td><td>the event loop (as a generic void*) this connection is being attached to. </td></tr>
+    <tr><td class="paramname">nc</td><td>the connection being attached to the event loop. </td></tr>
+    <tr><td class="paramname">socket</td><td>the socket to poll for read/write events. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gaea4c125ecfb43eaf43da20e8444c2aaa" name="gaea4c125ecfb43eaf43da20e8444c2aaa"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaea4c125ecfb43eaf43da20e8444c2aaa">&#9670;&#160;</a></span>natsEvLoop_ReadAddRemove</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>(* natsEvLoop_ReadAddRemove) (void *userData, bool add)</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >The <code>NATS</code> library will invoke this callback to indicate if the event loop should start (<code>add is</code>true<code>) or stop (</code>add<code>is</code>false`) polling for read events on the socket.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">userData</td><td>the pointer to an user object created in <a class="el" href="group__callbacks_group.html#ga245eab0a01a485e40fba267f84ec037f" title="Attach this connection to the external event loop.">natsEvLoop_Attach</a>. </td></tr>
+    <tr><td class="paramname">add</td><td><code>true</code> if the event library should start polling, <code>false</code> otherwise. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga2bb5dd2d821ca5bbc0488f7e6aceed17" name="ga2bb5dd2d821ca5bbc0488f7e6aceed17"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga2bb5dd2d821ca5bbc0488f7e6aceed17">&#9670;&#160;</a></span>natsEvLoop_WriteAddRemove</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>(* natsEvLoop_WriteAddRemove) (void *userData, bool add)</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >The <code>NATS</code> library will invoke this callback to indicate if the event loop should start (<code>add is</code>true<code>) or stop (</code>add<code>is</code>false`) polling for write events on the socket.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">userData</td><td>the pointer to an user object created in <a class="el" href="group__callbacks_group.html#ga245eab0a01a485e40fba267f84ec037f" title="Attach this connection to the external event loop.">natsEvLoop_Attach</a>. </td></tr>
+    <tr><td class="paramname">add</td><td><code>true</code> if the event library should start polling, <code>false</code> otherwise. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gab63dee7f7012ba11ae20b76dbc36f2d0" name="gab63dee7f7012ba11ae20b76dbc36f2d0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gab63dee7f7012ba11ae20b76dbc36f2d0">&#9670;&#160;</a></span>natsEvLoop_Detach</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>(* natsEvLoop_Detach) (void *userData)</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >The <code>NATS</code> library will invoke this callback to indicate that the connection no longer needs to be attached to the event loop. User can cleanup some state.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">userData</td><td>the pointer to an user object created in <a class="el" href="group__callbacks_group.html#ga245eab0a01a485e40fba267f84ec037f" title="Attach this connection to the external event loop.">natsEvLoop_Attach</a>. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga258b30458134be90f17315c037f34b7b" name="ga258b30458134be90f17315c037f34b7b"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga258b30458134be90f17315c037f34b7b">&#9670;&#160;</a></span>natsUserJWTHandler</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>(* natsUserJWTHandler) (char **userJWT, char **customErrTxt, void *closure)</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This handler is invoked when connecting and reconnecting. It should return the user JWT that will be sent to the server.</p>
+<p >The user JWT is returned as a string that is allocated by the user and is freed by the library after the handler is invoked.</p>
+<p >If the user is unable to return the JWT, a status other than <code>NATS_OK</code> should be returned (we recommend <code>NATS_ERR</code>). A custom error message can be returned through <code>customErrTxt</code>. The user must allocate the memory for this error message and the library will free it after the invocation of the handler.</p>
+<dl class="section warning"><dt>Warning</dt><dd>There may be repeated invocations of this handler for a given connection so it is crucial to always return a copy of the user JWT maintained by the application, since again, the library will free the memory pointed by <code>userJWT</code> after each invocation of this handler.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#ga60117450fc1f7b6f81bab455aeed7515" title="Sets the callbacks to fetch user JWT and sign server&#39;s nonce.">natsOptions_SetUserCredentialsCallbacks()</a> </dd>
+<dd>
+<a class="el" href="group__opts_group.html#ga59b47f7b7a19085cf8eaada9bfe5606e" title="Sets the file(s) to use to fetch user JWT and seed required to sign nonce.">natsOptions_SetUserCredentialsFromFiles()</a> </dd></dl>
+
+</div>
+</div>
+<a id="gab786ffd670c86de0563559351305080b" name="gab786ffd670c86de0563559351305080b"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gab786ffd670c86de0563559351305080b">&#9670;&#160;</a></span>natsSignatureHandler</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>(* natsSignatureHandler) (char **customErrTxt, unsigned char **signature, int *signatureLength, const char *nonce, void *closure)</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This handler is invoked when connecting and reconnecting. It should sign the given <code>nonce</code> and return a raw signature through <code>signature</code> and specify how many characters the signature has using <code>signatureLength</code>.</p>
+<p >The memory pointed by <code>signature</code> must be allocated by the user and will be freed by the library after each invocation of this handler.</p>
+<p >If the user is unable to sign, a status other than <code>NATS_OK</code> (we recommend <code>NATS_ERR</code>) should be returned. A custom error message can be returned through <code>customErrTxt</code>. The user must allocate the memory for this error message and the library will free it after the invocation of this handler.</p>
+<p >The library will base64 encode this raw signature and send that to the server.</p>
+<dl class="section warning"><dt>Warning</dt><dd>There may be repeated invocations of this handler for a given connection so it is crucial to always return a copy of the signature, since again, the library will free the memory pointed by <code>signature</code> after each invocation of this handler.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#ga60117450fc1f7b6f81bab455aeed7515" title="Sets the callbacks to fetch user JWT and sign server&#39;s nonce.">natsOptions_SetUserCredentialsCallbacks()</a> </dd>
+<dd>
+<a class="el" href="group__opts_group.html#ga59b47f7b7a19085cf8eaada9bfe5606e" title="Sets the file(s) to use to fetch user JWT and seed required to sign nonce.">natsOptions_SetUserCredentialsFromFiles()</a> </dd>
+<dd>
+<a class="el" href="group__opts_group.html#ga0290eac4665569c850468d9f00e246a0" title="Sets the NKey public key and signature callback.">natsOptions_SetNKey()</a> </dd></dl>
+
+</div>
+</div>
+<a id="ga4b02de70fe9380d184fd01d87527f499" name="ga4b02de70fe9380d184fd01d87527f499"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga4b02de70fe9380d184fd01d87527f499">&#9670;&#160;</a></span>natsTokenHandler</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef const char *(* natsTokenHandler) (void *closure)</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This is the function that one provides to build a different token at each reconnect.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#ga23a3b1f022112e98ddccb18b247b4426" title="Sets the tokenCb to use whenever a token is needed.">natsOptions_SetTokenHandler()</a></dd></dl>
+<dl class="section warning"><dt>Warning</dt><dd>Such callback is invoked synchronously from the connection thread. </dd></dl>
+
+</div>
+</div>
+<a id="ga245131e64f1d0dff7edc8ed874a07e9a" name="ga245131e64f1d0dff7edc8ed874a07e9a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga245131e64f1d0dff7edc8ed874a07e9a">&#9670;&#160;</a></span>natsOnCompleteCB</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef void(* natsOnCompleteCB) (void *closure)</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Currently used for asynchronous <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> objects. When set, this callback will be invoked after the subscription is closed and the message handler has returned.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__sub_group.html#gaea632f845d473e7461b134c0e7bf4077" title="Sets a completion callback.">natsSubscription_SetOnCompleteCB()</a> </dd></dl>
+
+</div>
+</div>
+<a id="ga3353d4b92851c52121f65aaf0684cba4" name="ga3353d4b92851c52121f65aaf0684cba4"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga3353d4b92851c52121f65aaf0684cba4">&#9670;&#160;</a></span>natsCustomReconnectDelayHandler</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef int64_t(* natsCustomReconnectDelayHandler) (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, int attempts, void *closure)</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This callback is used to get from the user the desired delay the library should pause before attempting to reconnect again. Note that this is invoked after the library tried the whole list of URLs and failed to reconnect.</p>
+<dl class="section note"><dt>Note</dt><dd>This callback is invoked from the connection reconnect thread and waits for user input. It should not block and instead quickly return the desired reconnect delay. The state of the connection is disconnected when this callback is invoked. Not much can be done with the passed connection, but user can call <a class="el" href="group__conn_mgt_group.html#ga19e204d27a232e2d4334301fc002b2ed" title="Closes the connection.">natsConnection_Close()</a> if desired. This will abort the reconnect attempts and close the connection.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> invoking this handler. </td></tr>
+    <tr><td class="paramname">attempts</td><td>the number of times the library tried the whole list of server URLs. </td></tr>
+    <tr><td class="paramname">closure</td><td>an optional pointer to a user defined object that was specified when registering the callback. </td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>the number of milliseconds to wait before trying to reconnect. </dd></dl>
+
+</div>
+</div>
+<a id="ga954768cc1d3388bb6ab723e777647992" name="ga954768cc1d3388bb6ab723e777647992"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga954768cc1d3388bb6ab723e777647992">&#9670;&#160;</a></span>jsPubAckErrHandler</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef void(* jsPubAckErrHandler) (<a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="el" href="structjs_pub_ack_err.html">jsPubAckErr</a> *pae, void *closure)</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Callback used to process asynchronous publish errors from JetStream <a class="el" href="group__js_pub_group.html#ga069dfd6f0f3d96f1ff8bf2372e59900c" title="Publishes data to JetStream but does not wait for a jsPubAck.">js_PublishAsync</a> and <a class="el" href="group__js_pub_group.html#gab7e4139a48c5ee4d2155cbb43142e873" title="Publishes a message to JetStream but does not wait for a jsPubAck.">js_PublishMsgAsync</a> calls. The provided <a class="el" href="structjs_pub_ack_err.html">jsPubAckErr</a> object gives the user access to the encountered error along with the original message sent to the server for possible restransmitting.</p>
+<dl class="section note"><dt>Note</dt><dd>If the message is resent, the library will not destroy the original message and once again take ownership of it. To resend the message, do the following so that the library knows not to destroy the message (since the call will clear the <code>Msg</code> field from the <a class="el" href="structjs_pub_ack_err.html">jsPubAckErr</a> object).</dd></dl>
+<div class="fragment"><div class="line">void myPAECallback(jsCtx *js, jsPubAckErr *pae, void* closure)</div>
+<div class="line">{</div>
+<div class="line">     ...</div>
+<div class="line">     // Resend the message</div>
+<div class="line">     js_PublishMsgAsync(js, &amp;(pae-&gt;Msg), NULL);</div>
+<div class="line">}</div>
+</div><!-- fragment --><dl class="section warning"><dt>Warning</dt><dd>The <a class="el" href="structjs_pub_ack_err.html">jsPubAckErr</a> object and its content will be invalid as soon as the callback returns.</dd>
+<dd>
+Unlike a NATS message callback, the user does not have to destroy the original NATS message (present in the <a class="el" href="structjs_pub_ack_err.html">jsPubAckErr</a> object), the library will do it.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">js</td><td>the pointer to the <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> object. </td></tr>
+    <tr><td class="paramname">pae</td><td>the pointer to the <a class="el" href="structjs_pub_ack_err.html">jsPubAckErr</a> object. </td></tr>
+    <tr><td class="paramname">closure</td><td>an optional pointer to a user defined object that was specified when registering the callback. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga4f66e065bd918f02510d4c53d8a5b729" name="ga4f66e065bd918f02510d4c53d8a5b729"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga4f66e065bd918f02510d4c53d8a5b729">&#9670;&#160;</a></span>jsPubAckHandler</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef void(* jsPubAckHandler) (<a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, <a class="el" href="structjs_pub_ack.html">jsPubAck</a> *pa, <a class="el" href="structjs_pub_ack_err.html">jsPubAckErr</a> *pae, void *closure)</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Callback used to process asynchronous publish responses (positive and negatives) from JetStream <a class="el" href="group__js_pub_group.html#ga069dfd6f0f3d96f1ff8bf2372e59900c" title="Publishes data to JetStream but does not wait for a jsPubAck.">js_PublishAsync</a> and <a class="el" href="group__js_pub_group.html#gab7e4139a48c5ee4d2155cbb43142e873" title="Publishes a message to JetStream but does not wait for a jsPubAck.">js_PublishMsgAsync</a> calls. The provided <a class="el" href="structjs_pub_ack.html">jsPubAck</a> or <a class="el" href="structjs_pub_ack_err.html">jsPubAckErr</a> objects give the user access to the successful acknowledgment from the server or the encountered error along with the original message sent to the server for possible restransmitting.</p>
+<dl class="section warning"><dt>Warning</dt><dd>The user is responsible for destroying the message. If the message is resent using the <a class="el" href="group__js_pub_group.html#gab7e4139a48c5ee4d2155cbb43142e873" title="Publishes a message to JetStream but does not wait for a jsPubAck.">js_PublishMsgAsync</a> call, the library is taking ownership of the message and calling <a class="el" href="group__msg_group.html#ga9e9590018284939f43f60964283f33ae" title="Destroys the message object.">natsMsg_Destroy</a> will have no effect because the pointer will have been set to <code>NULL</code>. So it is recommended to always call <a class="el" href="group__msg_group.html#ga9e9590018284939f43f60964283f33ae" title="Destroys the message object.">natsMsg_Destroy</a> at the end of the function.</dd></dl>
+<div class="fragment"><div class="line">void myAckHandler(jsCtx *js, natsMsg *msg, jsPubAck *pa, jsPubAckErr *pae, void *closure)</div>
+<div class="line">{</div>
+<div class="line">     if (pa != NULL)</div>
+<div class="line">     {</div>
+<div class="line">             // Success case...</div>
+<div class="line">     }</div>
+<div class="line">     else if (pae != NULL)</div>
+<div class="line">     {</div>
+<div class="line">             // Error case...</div>
+<div class="line">             // If the application wants to resend the message:</div>
+<div class="line">             js_PublishMsgAsync(js, &amp;msg, NULL);</div>
+<div class="line">     }</div>
+<div class="line">     natsMsg_Destroy(msg);</div>
+<div class="line">}</div>
+</div><!-- fragment --><dl class="section warning"><dt>Warning</dt><dd>The <a class="el" href="structjs_pub_ack.html">jsPubAck</a> and <a class="el" href="structjs_pub_ack_err.html">jsPubAckErr</a> objects and their content will be invalid as soon as the callback returns.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">js</td><td>the pointer to the <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> object. </td></tr>
+    <tr><td class="paramname">msg</td><td>the pointer to the original published <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a>. </td></tr>
+    <tr><td class="paramname">pa</td><td>the pointer to the <a class="el" href="structjs_pub_ack.html">jsPubAck</a> object. </td></tr>
+    <tr><td class="paramname">pae</td><td>the pointer to the <a class="el" href="structjs_pub_ack_err.html">jsPubAckErr</a> object. </td></tr>
+    <tr><td class="paramname">closure</td><td>an optional pointer to a user defined object that was specified when registering the callback. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gad5d6a685731b3bf635995b7375af4d18" name="gad5d6a685731b3bf635995b7375af4d18"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gad5d6a685731b3bf635995b7375af4d18">&#9670;&#160;</a></span>stanPubAckHandler</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef void(* stanPubAckHandler) (const char *guid, const char *error, void *closure)</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This is used for asynchronous publishing to provide status of the acknowledgment. The function will be passed the GUID and any error state. No error means the message was successfully received by NATS Streaming.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__stan_conn_pub_group.html#ga0c4d1e4615f8ac834f0a4021f75d39f0" title="Asynchronously publishes data on a channel.">stanConnection_PublishAsync()</a> </dd></dl>
+
+</div>
+</div>
+<a id="gaf7456e37fa14f1834d9048d3789e9409" name="gaf7456e37fa14f1834d9048d3789e9409"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaf7456e37fa14f1834d9048d3789e9409">&#9670;&#160;</a></span>stanMsgHandler</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef void(* stanMsgHandler) (<a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *sc, <a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a> *sub, const char *channel, <a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a> *msg, void *closure)</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This is the callback that one provides when creating an asynchronous subscription. The library will invoke this callback for each message arriving through the subscription's connection.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__stan_conn_sub_group.html#gae545358fdc493baf6d29429a8156781f" title="Creates a subscription.">stanConnection_Subscribe()</a> </dd>
+<dd>
+<a class="el" href="group__stan_conn_sub_group.html#ga17d42bf9a4fa39470561a1a668e6b4a2" title="Creates a queue subscription.">stanConnection_QueueSubscribe()</a> </dd></dl>
+
+</div>
+</div>
+<a id="gac34092f6c698374f86ad349302bdd55c" name="gac34092f6c698374f86ad349302bdd55c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gac34092f6c698374f86ad349302bdd55c">&#9670;&#160;</a></span>stanConnectionLostHandler</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef void(* stanConnectionLostHandler) (<a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *sc, const char *errorTxt, void *closure)</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This callback is used to notify the user that the connection to the Streaming server is permanently lost. </p>
+
+</div>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__callbacks_group.js b/doc/html/group__callbacks_group.js
new file mode 100644 (file)
index 0000000..2ed870a
--- /dev/null
@@ -0,0 +1,20 @@
+var group__callbacks_group =
+[
+    [ "natsMsgHandler", "group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe", null ],
+    [ "natsConnectionHandler", "group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c", null ],
+    [ "natsErrHandler", "group__callbacks_group.html#ga9e511dffa471dfb971b7dd2b12329626", null ],
+    [ "natsEvLoop_Attach", "group__callbacks_group.html#ga245eab0a01a485e40fba267f84ec037f", null ],
+    [ "natsEvLoop_ReadAddRemove", "group__callbacks_group.html#gaea4c125ecfb43eaf43da20e8444c2aaa", null ],
+    [ "natsEvLoop_WriteAddRemove", "group__callbacks_group.html#ga2bb5dd2d821ca5bbc0488f7e6aceed17", null ],
+    [ "natsEvLoop_Detach", "group__callbacks_group.html#gab63dee7f7012ba11ae20b76dbc36f2d0", null ],
+    [ "natsUserJWTHandler", "group__callbacks_group.html#ga258b30458134be90f17315c037f34b7b", null ],
+    [ "natsSignatureHandler", "group__callbacks_group.html#gab786ffd670c86de0563559351305080b", null ],
+    [ "natsTokenHandler", "group__callbacks_group.html#ga4b02de70fe9380d184fd01d87527f499", null ],
+    [ "natsOnCompleteCB", "group__callbacks_group.html#ga245131e64f1d0dff7edc8ed874a07e9a", null ],
+    [ "natsCustomReconnectDelayHandler", "group__callbacks_group.html#ga3353d4b92851c52121f65aaf0684cba4", null ],
+    [ "jsPubAckErrHandler", "group__callbacks_group.html#ga954768cc1d3388bb6ab723e777647992", null ],
+    [ "jsPubAckHandler", "group__callbacks_group.html#ga4f66e065bd918f02510d4c53d8a5b729", null ],
+    [ "stanPubAckHandler", "group__callbacks_group.html#gad5d6a685731b3bf635995b7375af4d18", null ],
+    [ "stanMsgHandler", "group__callbacks_group.html#gaf7456e37fa14f1834d9048d3789e9409", null ],
+    [ "stanConnectionLostHandler", "group__callbacks_group.html#gac34092f6c698374f86ad349302bdd55c", null ]
+];
\ No newline at end of file
diff --git a/doc/html/group__conn_group.html b/doc/html/group__conn_group.html
new file mode 100644 (file)
index 0000000..79040f1
--- /dev/null
@@ -0,0 +1,123 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Connection</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__conn_group.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#groups">Modules</a>  </div>
+  <div class="headertitle"><div class="title">Connection<div class="ingroups"><a class="el" href="group__func_group.html">Functions</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="groups" name="groups"></a>
+Modules</h2></td></tr>
+<tr class="memitem:group__conn_mgt_group"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html">Management</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:group__conn_pub_group"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_pub_group.html">Publishing</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:group__conn_sub_group"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_sub_group.html">Subscribing</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<p >NATS Connection </p>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__conn_group.js b/doc/html/group__conn_group.js
new file mode 100644 (file)
index 0000000..d11658a
--- /dev/null
@@ -0,0 +1,6 @@
+var group__conn_group =
+[
+    [ "Management", "group__conn_mgt_group.html", "group__conn_mgt_group" ],
+    [ "Publishing", "group__conn_pub_group.html", "group__conn_pub_group" ],
+    [ "Subscribing", "group__conn_sub_group.html", "group__conn_sub_group" ]
+];
\ No newline at end of file
diff --git a/doc/html/group__conn_mgt_group.html b/doc/html/group__conn_mgt_group.html
new file mode 100644 (file)
index 0000000..fc2860e
--- /dev/null
@@ -0,0 +1,1167 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Management</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__conn_mgt_group.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle"><div class="title">Management<div class="ingroups"><a class="el" href="group__func_group.html">Functions</a> &raquo; <a class="el" href="group__conn_group.html">Connection</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:ga740be1ba16a8570eb98ef6755ebf52ce"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga740be1ba16a8570eb98ef6755ebf52ce">natsConnection_Connect</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> **nc, <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *options)</td></tr>
+<tr class="memdesc:ga740be1ba16a8570eb98ef6755ebf52ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connects to a <code>NATS Server</code> using the provided options.  <a href="group__conn_mgt_group.html#ga740be1ba16a8570eb98ef6755ebf52ce">More...</a><br /></td></tr>
+<tr class="separator:ga740be1ba16a8570eb98ef6755ebf52ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaa89c06e30e19ff361125bfc9114d89a8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#gaa89c06e30e19ff361125bfc9114d89a8">natsConnection_ProcessReadEvent</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
+<tr class="memdesc:gaa89c06e30e19ff361125bfc9114d89a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process a read event when using external event loop.  <a href="group__conn_mgt_group.html#gaa89c06e30e19ff361125bfc9114d89a8">More...</a><br /></td></tr>
+<tr class="separator:gaa89c06e30e19ff361125bfc9114d89a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gad81b603b84c0180aefc6d5ebad7f2a47"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#gad81b603b84c0180aefc6d5ebad7f2a47">natsConnection_ProcessWriteEvent</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
+<tr class="memdesc:gad81b603b84c0180aefc6d5ebad7f2a47"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process a write event when using external event loop.  <a href="group__conn_mgt_group.html#gad81b603b84c0180aefc6d5ebad7f2a47">More...</a><br /></td></tr>
+<tr class="separator:gad81b603b84c0180aefc6d5ebad7f2a47"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gafb83c8d7970ba68be0e6c40c38cdfde4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#gafb83c8d7970ba68be0e6c40c38cdfde4">natsConnection_ConnectTo</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> **nc, const char *urls)</td></tr>
+<tr class="memdesc:gafb83c8d7970ba68be0e6c40c38cdfde4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connects to a <code>NATS Server</code> using any of the URL from the given list.  <a href="group__conn_mgt_group.html#gafb83c8d7970ba68be0e6c40c38cdfde4">More...</a><br /></td></tr>
+<tr class="separator:gafb83c8d7970ba68be0e6c40c38cdfde4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga530f0f1c75c58a81aae1a59f15b46d9f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga530f0f1c75c58a81aae1a59f15b46d9f">natsConnection_IsClosed</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
+<tr class="memdesc:ga530f0f1c75c58a81aae1a59f15b46d9f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test if connection has been closed.  <a href="group__conn_mgt_group.html#ga530f0f1c75c58a81aae1a59f15b46d9f">More...</a><br /></td></tr>
+<tr class="separator:ga530f0f1c75c58a81aae1a59f15b46d9f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga5aa349fc3895dde772671b324b07a688"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga5aa349fc3895dde772671b324b07a688">natsConnection_IsReconnecting</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
+<tr class="memdesc:ga5aa349fc3895dde772671b324b07a688"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test if connection is reconnecting.  <a href="group__conn_mgt_group.html#ga5aa349fc3895dde772671b324b07a688">More...</a><br /></td></tr>
+<tr class="separator:ga5aa349fc3895dde772671b324b07a688"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga15a0f8aa9a6f621535d01593a4c8edd5"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga15a0f8aa9a6f621535d01593a4c8edd5">natsConnection_IsDraining</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
+<tr class="memdesc:ga15a0f8aa9a6f621535d01593a4c8edd5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test if connection is draining.  <a href="group__conn_mgt_group.html#ga15a0f8aa9a6f621535d01593a4c8edd5">More...</a><br /></td></tr>
+<tr class="separator:ga15a0f8aa9a6f621535d01593a4c8edd5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga33fa209522e5e0226b5b7c7d720a3b98"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51">natsConnStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga33fa209522e5e0226b5b7c7d720a3b98">natsConnection_Status</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
+<tr class="memdesc:ga33fa209522e5e0226b5b7c7d720a3b98"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the current state of the connection.  <a href="group__conn_mgt_group.html#ga33fa209522e5e0226b5b7c7d720a3b98">More...</a><br /></td></tr>
+<tr class="separator:ga33fa209522e5e0226b5b7c7d720a3b98"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga0433159e518540ff874c4026fe9cd0c5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga0433159e518540ff874c4026fe9cd0c5">natsConnection_Buffered</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
+<tr class="memdesc:ga0433159e518540ff874c4026fe9cd0c5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of bytes to be sent to the server.  <a href="group__conn_mgt_group.html#ga0433159e518540ff874c4026fe9cd0c5">More...</a><br /></td></tr>
+<tr class="separator:ga0433159e518540ff874c4026fe9cd0c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga1c98f8d89bb8e20ea8621e860a90267f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga1c98f8d89bb8e20ea8621e860a90267f">natsConnection_Flush</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
+<tr class="memdesc:ga1c98f8d89bb8e20ea8621e860a90267f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Flushes the connection.  <a href="group__conn_mgt_group.html#ga1c98f8d89bb8e20ea8621e860a90267f">More...</a><br /></td></tr>
+<tr class="separator:ga1c98f8d89bb8e20ea8621e860a90267f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga85915ef0c8b87993be1b076099d6a7c1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga85915ef0c8b87993be1b076099d6a7c1">natsConnection_FlushTimeout</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, int64_t timeout)</td></tr>
+<tr class="memdesc:ga85915ef0c8b87993be1b076099d6a7c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Flushes the connection with a given timeout.  <a href="group__conn_mgt_group.html#ga85915ef0c8b87993be1b076099d6a7c1">More...</a><br /></td></tr>
+<tr class="separator:ga85915ef0c8b87993be1b076099d6a7c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga68e7149f7ff1cc4989b3f795fa7e76d9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga68e7149f7ff1cc4989b3f795fa7e76d9">natsConnection_GetMaxPayload</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
+<tr class="memdesc:ga68e7149f7ff1cc4989b3f795fa7e76d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the maximum message payload.  <a href="group__conn_mgt_group.html#ga68e7149f7ff1cc4989b3f795fa7e76d9">More...</a><br /></td></tr>
+<tr class="separator:ga68e7149f7ff1cc4989b3f795fa7e76d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga68821a8ae1176096b5afef7fdc7947ec"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga68821a8ae1176096b5afef7fdc7947ec">natsConnection_GetStats</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa">natsStatistics</a> *stats)</td></tr>
+<tr class="memdesc:ga68821a8ae1176096b5afef7fdc7947ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the connection statistics.  <a href="group__conn_mgt_group.html#ga68821a8ae1176096b5afef7fdc7947ec">More...</a><br /></td></tr>
+<tr class="separator:ga68821a8ae1176096b5afef7fdc7947ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf623280407c43ade02285005f0642e6d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#gaf623280407c43ade02285005f0642e6d">natsConnection_GetConnectedUrl</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, char *buffer, size_t bufferSize)</td></tr>
+<tr class="memdesc:gaf623280407c43ade02285005f0642e6d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the URL of the currently connected server.  <a href="group__conn_mgt_group.html#gaf623280407c43ade02285005f0642e6d">More...</a><br /></td></tr>
+<tr class="separator:gaf623280407c43ade02285005f0642e6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga48cee9ea1cdc9fc2770de2f9f0fd1ccf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga48cee9ea1cdc9fc2770de2f9f0fd1ccf">natsConnection_GetConnectedServerId</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, char *buffer, size_t bufferSize)</td></tr>
+<tr class="memdesc:ga48cee9ea1cdc9fc2770de2f9f0fd1ccf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the server Id.  <a href="group__conn_mgt_group.html#ga48cee9ea1cdc9fc2770de2f9f0fd1ccf">More...</a><br /></td></tr>
+<tr class="separator:ga48cee9ea1cdc9fc2770de2f9f0fd1ccf"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf4ee7262e35e44c40ad5dfe9240db76b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#gaf4ee7262e35e44c40ad5dfe9240db76b">natsConnection_GetServers</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, char ***servers, int *count)</td></tr>
+<tr class="memdesc:gaf4ee7262e35e44c40ad5dfe9240db76b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the list of server URLs known to this connection.  <a href="group__conn_mgt_group.html#gaf4ee7262e35e44c40ad5dfe9240db76b">More...</a><br /></td></tr>
+<tr class="separator:gaf4ee7262e35e44c40ad5dfe9240db76b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gad25c77be0873495412c90a73fe450708"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#gad25c77be0873495412c90a73fe450708">natsConnection_GetDiscoveredServers</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, char ***servers, int *count)</td></tr>
+<tr class="memdesc:gad25c77be0873495412c90a73fe450708"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the list of discovered server URLs.  <a href="group__conn_mgt_group.html#gad25c77be0873495412c90a73fe450708">More...</a><br /></td></tr>
+<tr class="separator:gad25c77be0873495412c90a73fe450708"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gab6cfa9cb6857ae10f096a94f5e244e63"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#gab6cfa9cb6857ae10f096a94f5e244e63">natsConnection_GetLastError</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, const char **lastError)</td></tr>
+<tr class="memdesc:gab6cfa9cb6857ae10f096a94f5e244e63"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the last connection error.  <a href="group__conn_mgt_group.html#gab6cfa9cb6857ae10f096a94f5e244e63">More...</a><br /></td></tr>
+<tr class="separator:gab6cfa9cb6857ae10f096a94f5e244e63"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga747513ba6ab63fdf9a72bfc8025a14ba"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga747513ba6ab63fdf9a72bfc8025a14ba">natsConnection_GetClientID</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, uint64_t *cid)</td></tr>
+<tr class="memdesc:ga747513ba6ab63fdf9a72bfc8025a14ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the current client ID assigned by the server.  <a href="group__conn_mgt_group.html#ga747513ba6ab63fdf9a72bfc8025a14ba">More...</a><br /></td></tr>
+<tr class="separator:ga747513ba6ab63fdf9a72bfc8025a14ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga59bdc4ad9fea2053f5d3841f6b83f88b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga59bdc4ad9fea2053f5d3841f6b83f88b">natsConnection_Drain</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
+<tr class="memdesc:ga59bdc4ad9fea2053f5d3841f6b83f88b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Drains the connection with default timeout.  <a href="group__conn_mgt_group.html#ga59bdc4ad9fea2053f5d3841f6b83f88b">More...</a><br /></td></tr>
+<tr class="separator:ga59bdc4ad9fea2053f5d3841f6b83f88b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gae06fe6f5933f216d6d93645a122a7dd4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#gae06fe6f5933f216d6d93645a122a7dd4">natsConnection_DrainTimeout</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, int64_t timeout)</td></tr>
+<tr class="memdesc:gae06fe6f5933f216d6d93645a122a7dd4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Drains the connection with given timeout.  <a href="group__conn_mgt_group.html#gae06fe6f5933f216d6d93645a122a7dd4">More...</a><br /></td></tr>
+<tr class="separator:gae06fe6f5933f216d6d93645a122a7dd4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga6960cfdbaac3b8759784f352d4c264f8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga6960cfdbaac3b8759784f352d4c264f8">natsConnection_Sign</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, const unsigned char *message, int messageLen, unsigned char sig[64])</td></tr>
+<tr class="memdesc:ga6960cfdbaac3b8759784f352d4c264f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Signs any 'message' using the connection's user credentials.  <a href="group__conn_mgt_group.html#ga6960cfdbaac3b8759784f352d4c264f8">More...</a><br /></td></tr>
+<tr class="separator:ga6960cfdbaac3b8759784f352d4c264f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gadafcfeeeac2733c7119981ab97b7103d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#gadafcfeeeac2733c7119981ab97b7103d">natsConnection_GetClientIP</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, char **ip)</td></tr>
+<tr class="memdesc:gadafcfeeeac2733c7119981ab97b7103d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the client's IP address as reported by the server.  <a href="group__conn_mgt_group.html#gadafcfeeeac2733c7119981ab97b7103d">More...</a><br /></td></tr>
+<tr class="separator:gadafcfeeeac2733c7119981ab97b7103d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaa3fd27e6e7d8131e679d4f10e201c435"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#gaa3fd27e6e7d8131e679d4f10e201c435">natsConnection_GetRTT</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, int64_t *rtt)</td></tr>
+<tr class="memdesc:gaa3fd27e6e7d8131e679d4f10e201c435"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the round trip time between this client and the server.  <a href="group__conn_mgt_group.html#gaa3fd27e6e7d8131e679d4f10e201c435">More...</a><br /></td></tr>
+<tr class="separator:gaa3fd27e6e7d8131e679d4f10e201c435"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gad765b80ae8e1a06a7a942cccf29f042a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#gad765b80ae8e1a06a7a942cccf29f042a">natsConnection_HasHeaderSupport</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
+<tr class="memdesc:gad765b80ae8e1a06a7a942cccf29f042a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns if the connection to current server supports headers.  <a href="group__conn_mgt_group.html#gad765b80ae8e1a06a7a942cccf29f042a">More...</a><br /></td></tr>
+<tr class="separator:gad765b80ae8e1a06a7a942cccf29f042a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga761095a42374b4dafa178df7d7652dd5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga761095a42374b4dafa178df7d7652dd5">natsConnection_GetLocalIPAndPort</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, char **ip, int *port)</td></tr>
+<tr class="memdesc:ga761095a42374b4dafa178df7d7652dd5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the connection local IP and port.  <a href="group__conn_mgt_group.html#ga761095a42374b4dafa178df7d7652dd5">More...</a><br /></td></tr>
+<tr class="separator:ga761095a42374b4dafa178df7d7652dd5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga19e204d27a232e2d4334301fc002b2ed"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga19e204d27a232e2d4334301fc002b2ed">natsConnection_Close</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
+<tr class="memdesc:ga19e204d27a232e2d4334301fc002b2ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Closes the connection.  <a href="group__conn_mgt_group.html#ga19e204d27a232e2d4334301fc002b2ed">More...</a><br /></td></tr>
+<tr class="separator:ga19e204d27a232e2d4334301fc002b2ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gafda2f702276fb0ac301efac10df09495"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#gafda2f702276fb0ac301efac10df09495">natsConnection_Destroy</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
+<tr class="memdesc:gafda2f702276fb0ac301efac10df09495"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the connection object.  <a href="group__conn_mgt_group.html#gafda2f702276fb0ac301efac10df09495">More...</a><br /></td></tr>
+<tr class="separator:gafda2f702276fb0ac301efac10df09495"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<p >Functions related to connection management. </p>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="ga740be1ba16a8570eb98ef6755ebf52ce" name="ga740be1ba16a8570eb98ef6755ebf52ce"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga740be1ba16a8570eb98ef6755ebf52ce">&#9670;&#160;</a></span>natsConnection_Connect()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_Connect </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> **&#160;</td>
+          <td class="paramname"><em>nc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>options</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Attempts to connect to a <code>NATS Server</code> with multiple options.</p>
+<p >This call is cloning the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. Once this call returns, changes made to the <code>options</code> will not have an effect to this connection. The <code>options</code> can however be changed prior to be passed to another <a class="el" href="group__conn_mgt_group.html#ga740be1ba16a8570eb98ef6755ebf52ce" title="Connects to a NATS Server using the provided options.">natsConnection_Connect()</a> call if desired.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> </dd>
+<dd>
+<a class="el" href="group__conn_mgt_group.html#gafda2f702276fb0ac301efac10df09495" title="Destroys the connection object.">natsConnection_Destroy()</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">nc</td><td>the location where to store the pointer to the newly created <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+    <tr><td class="paramname">options</td><td>the options to use for this connection. If <code>NULL</code> this call is equivalent to <a class="el" href="group__conn_mgt_group.html#gafb83c8d7970ba68be0e6c40c38cdfde4" title="Connects to a NATS Server using any of the URL from the given list.">natsConnection_ConnectTo()</a> with <a class="el" href="nats_8h.html#a911c54900b46b968205871cd9f68d36c" title="The default NATS Server URL.">NATS_DEFAULT_URL</a>. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gaa89c06e30e19ff361125bfc9114d89a8" name="gaa89c06e30e19ff361125bfc9114d89a8"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaa89c06e30e19ff361125bfc9114d89a8">&#9670;&#160;</a></span>natsConnection_ProcessReadEvent()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void natsConnection_ProcessReadEvent </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >When using an external event loop, and the callback indicating that the socket is ready for reading, this call will read data from the socket and process it.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object.</td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="section warning"><dt>Warning</dt><dd>This API is reserved for external event loop adapters. </dd></dl>
+
+</div>
+</div>
+<a id="gad81b603b84c0180aefc6d5ebad7f2a47" name="gad81b603b84c0180aefc6d5ebad7f2a47"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gad81b603b84c0180aefc6d5ebad7f2a47">&#9670;&#160;</a></span>natsConnection_ProcessWriteEvent()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void natsConnection_ProcessWriteEvent </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >When using an external event loop, and the callback indicating that the socket is ready for writing, this call will write data to the socket.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object.</td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="section warning"><dt>Warning</dt><dd>This API is reserved for external event loop adapters. </dd></dl>
+
+</div>
+</div>
+<a id="gafb83c8d7970ba68be0e6c40c38cdfde4" name="gafb83c8d7970ba68be0e6c40c38cdfde4"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gafb83c8d7970ba68be0e6c40c38cdfde4">&#9670;&#160;</a></span>natsConnection_ConnectTo()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_ConnectTo </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> **&#160;</td>
+          <td class="paramname"><em>nc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>urls</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Attempts to connect to a <code>NATS Server</code>.</p>
+<p >This call supports multiple comma separated URLs. If more than one is specified, it behaves as if you were using a <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object and called <a class="el" href="group__opts_group.html#gacb7e964ae54b74d972d72e118b7b8bdf" title="Set the list of servers to try to (re)connect to.">natsOptions_SetServers()</a> with the equivalent array of URLs. The list is randomized before the connect sequence starts.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__conn_mgt_group.html#gafda2f702276fb0ac301efac10df09495" title="Destroys the connection object.">natsConnection_Destroy()</a> </dd>
+<dd>
+<a class="el" href="group__opts_group.html#gacb7e964ae54b74d972d72e118b7b8bdf" title="Set the list of servers to try to (re)connect to.">natsOptions_SetServers()</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">nc</td><td>the location where to store the pointer to the newly created <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+    <tr><td class="paramname">urls</td><td>the URL to connect to, or the list of URLs to chose from. If <code>NULL</code> this call is equivalent to <a class="el" href="group__conn_mgt_group.html#gafb83c8d7970ba68be0e6c40c38cdfde4" title="Connects to a NATS Server using any of the URL from the given list.">natsConnection_ConnectTo()</a> with <a class="el" href="nats_8h.html#a911c54900b46b968205871cd9f68d36c" title="The default NATS Server URL.">NATS_DEFAULT_URL</a> </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga530f0f1c75c58a81aae1a59f15b46d9f" name="ga530f0f1c75c58a81aae1a59f15b46d9f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga530f0f1c75c58a81aae1a59f15b46d9f">&#9670;&#160;</a></span>natsConnection_IsClosed()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> bool natsConnection_IsClosed </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Tests if connection has been closed.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga5aa349fc3895dde772671b324b07a688" name="ga5aa349fc3895dde772671b324b07a688"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga5aa349fc3895dde772671b324b07a688">&#9670;&#160;</a></span>natsConnection_IsReconnecting()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> bool natsConnection_IsReconnecting </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Tests if connection is reconnecting.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga15a0f8aa9a6f621535d01593a4c8edd5" name="ga15a0f8aa9a6f621535d01593a4c8edd5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga15a0f8aa9a6f621535d01593a4c8edd5">&#9670;&#160;</a></span>natsConnection_IsDraining()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool natsConnection_IsDraining </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Tests if connection is draining.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga33fa209522e5e0226b5b7c7d720a3b98" name="ga33fa209522e5e0226b5b7c7d720a3b98"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga33fa209522e5e0226b5b7c7d720a3b98">&#9670;&#160;</a></span>natsConnection_Status()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51">natsConnStatus</a> natsConnection_Status </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the current state of the connection.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51" title="The connection state.">natsConnStatus</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga0433159e518540ff874c4026fe9cd0c5" name="ga0433159e518540ff874c4026fe9cd0c5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga0433159e518540ff874c4026fe9cd0c5">&#9670;&#160;</a></span>natsConnection_Buffered()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int natsConnection_Buffered </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >When calling any of the publish functions, data is not necessarily immediately sent to the server. Some buffering occurs, allowing for better performance. This function indicates if there is any data not yet transmitted to the server.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>the number of bytes to be sent to the server, or -1 if the connection is closed. </dd></dl>
+
+</div>
+</div>
+<a id="ga1c98f8d89bb8e20ea8621e860a90267f" name="ga1c98f8d89bb8e20ea8621e860a90267f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga1c98f8d89bb8e20ea8621e860a90267f">&#9670;&#160;</a></span>natsConnection_Flush()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_Flush </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Performs a round trip to the server and return when it receives the internal reply.</p>
+<p >Note that if this call occurs when the connection to the server is lost, the <code>PING</code> will not be echoed even if the library can connect to a new (or the same) server. Therefore, in such situation, this call will fail with the status <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80abef517217119e8446a8e3382e1f37eb3">NATS_CONNECTION_DISCONNECTED</a>.</p>
+<p >If the connection is closed while this call is in progress, then the status <a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51aa78753a4de2d0379078bb09cdc1acdb2" title="The connection is closed.">NATS_CONN_STATUS_CLOSED</a> would be returned instead.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga85915ef0c8b87993be1b076099d6a7c1" name="ga85915ef0c8b87993be1b076099d6a7c1"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga85915ef0c8b87993be1b076099d6a7c1">&#9670;&#160;</a></span>natsConnection_FlushTimeout()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_FlushTimeout </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int64_t&#160;</td>
+          <td class="paramname"><em>timeout</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Performs a round trip to the server and return when it receives the internal reply, or if the call times-out (timeout is expressed in milliseconds).</p>
+<p >See possible failure case described in <a class="el" href="group__conn_mgt_group.html#ga1c98f8d89bb8e20ea8621e860a90267f" title="Flushes the connection.">natsConnection_Flush()</a>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+    <tr><td class="paramname">timeout</td><td>in milliseconds, is the time allowed for the flush to complete before <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ab88994c9ea9889ac4d9d656d62f550ed">NATS_TIMEOUT</a> error is returned. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga68e7149f7ff1cc4989b3f795fa7e76d9" name="ga68e7149f7ff1cc4989b3f795fa7e76d9"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga68e7149f7ff1cc4989b3f795fa7e76d9">&#9670;&#160;</a></span>natsConnection_GetMaxPayload()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t natsConnection_GetMaxPayload </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the maximum message payload accepted by the server. The information is gathered from the <code>NATS Server</code> when the connection is first established.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>the maximum message payload. </dd></dl>
+
+</div>
+</div>
+<a id="ga68821a8ae1176096b5afef7fdc7947ec" name="ga68821a8ae1176096b5afef7fdc7947ec"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga68821a8ae1176096b5afef7fdc7947ec">&#9670;&#160;</a></span>natsConnection_GetStats()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_GetStats </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa">natsStatistics</a> *&#160;</td>
+          <td class="paramname"><em>stats</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Copies in the provided statistics structure, a snapshot of the statistics for this connection.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+    <tr><td class="paramname">stats</td><td>the pointer to a <a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa" title="Statistics of a natsConnection.">natsStatistics</a> object in which statistics will be copied. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gaf623280407c43ade02285005f0642e6d" name="gaf623280407c43ade02285005f0642e6d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaf623280407c43ade02285005f0642e6d">&#9670;&#160;</a></span>natsConnection_GetConnectedUrl()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_GetConnectedUrl </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">char *&#160;</td>
+          <td class="paramname"><em>buffer</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">size_t&#160;</td>
+          <td class="paramname"><em>bufferSize</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Copies in the given buffer, the connected server's Url. If the buffer is too small, an error is returned.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+    <tr><td class="paramname">buffer</td><td>the buffer in which the URL is copied. </td></tr>
+    <tr><td class="paramname">bufferSize</td><td>the size of the buffer. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga48cee9ea1cdc9fc2770de2f9f0fd1ccf" name="ga48cee9ea1cdc9fc2770de2f9f0fd1ccf"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga48cee9ea1cdc9fc2770de2f9f0fd1ccf">&#9670;&#160;</a></span>natsConnection_GetConnectedServerId()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_GetConnectedServerId </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">char *&#160;</td>
+          <td class="paramname"><em>buffer</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">size_t&#160;</td>
+          <td class="paramname"><em>bufferSize</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Copies in the given buffer, the connected server's Id. If the buffer is too small, an error is returned.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+    <tr><td class="paramname">buffer</td><td>the buffer in which the server id is copied. </td></tr>
+    <tr><td class="paramname">bufferSize</td><td>the size of the buffer. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gaf4ee7262e35e44c40ad5dfe9240db76b" name="gaf4ee7262e35e44c40ad5dfe9240db76b"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaf4ee7262e35e44c40ad5dfe9240db76b">&#9670;&#160;</a></span>natsConnection_GetServers()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_GetServers </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">char ***&#160;</td>
+          <td class="paramname"><em>servers</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int *&#160;</td>
+          <td class="paramname"><em>count</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the list of known servers, including additional servers discovered after a connection has been established (with servers version 0.9.2 and above).</p>
+<p >No credential information is included in any of the server URLs returned by this call.<br  />
+ If you want to use any of these URLs to connect to a server that requires authentication, you will need to use <a class="el" href="group__opts_group.html#ga5b99da7dd74aac3be962f323c3863d9e" title="Sets the user name/password to use when not specified in the URL.">natsOptions_SetUserInfo</a> or <a class="el" href="group__opts_group.html#gad58a5b9dabadeebda30e952ff7b39193" title="Sets the token to use when not specified in the URL.">natsOptions_SetToken</a>.</p>
+<dl class="section note"><dt>Note</dt><dd>The user is responsible for freeing the memory of the returned array.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+    <tr><td class="paramname">servers</td><td>the location where to store the pointer to the array of server URLs. </td></tr>
+    <tr><td class="paramname">count</td><td>the location where to store the number of elements of the returned array. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gad25c77be0873495412c90a73fe450708" name="gad25c77be0873495412c90a73fe450708"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gad25c77be0873495412c90a73fe450708">&#9670;&#160;</a></span>natsConnection_GetDiscoveredServers()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_GetDiscoveredServers </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">char ***&#160;</td>
+          <td class="paramname"><em>servers</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int *&#160;</td>
+          <td class="paramname"><em>count</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Unlike <a class="el" href="group__conn_mgt_group.html#gaf4ee7262e35e44c40ad5dfe9240db76b" title="Returns the list of server URLs known to this connection.">natsConnection_GetServers</a>, this function only returns the list of servers that have been discovered after the a connection has been established (with servers version 0.9.2 and above).</p>
+<p >No credential information is included in any of the server URLs returned by this call.<br  />
+ If you want to use any of these URLs to connect to a server that requires authentication, you will need to use <a class="el" href="group__opts_group.html#ga5b99da7dd74aac3be962f323c3863d9e" title="Sets the user name/password to use when not specified in the URL.">natsOptions_SetUserInfo</a> or <a class="el" href="group__opts_group.html#gad58a5b9dabadeebda30e952ff7b39193" title="Sets the token to use when not specified in the URL.">natsOptions_SetToken</a>.</p>
+<dl class="section note"><dt>Note</dt><dd>The user is responsible for freeing the memory of the returned array.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+    <tr><td class="paramname">servers</td><td>the location where to store the pointer to the array of server URLs. </td></tr>
+    <tr><td class="paramname">count</td><td>the location where to store the number of elements of the returned array. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gab6cfa9cb6857ae10f096a94f5e244e63" name="gab6cfa9cb6857ae10f096a94f5e244e63"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gab6cfa9cb6857ae10f096a94f5e244e63">&#9670;&#160;</a></span>natsConnection_GetLastError()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_GetLastError </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char **&#160;</td>
+          <td class="paramname"><em>lastError</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the last known error as a 'natsStatus' and the location to the null-terminated error string.</p>
+<dl class="section warning"><dt>Warning</dt><dd>The returned string is owned by the connection object and must not be freed.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+    <tr><td class="paramname">lastError</td><td>the location where the pointer to the connection's last error string is copied. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga747513ba6ab63fdf9a72bfc8025a14ba" name="ga747513ba6ab63fdf9a72bfc8025a14ba"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga747513ba6ab63fdf9a72bfc8025a14ba">&#9670;&#160;</a></span>natsConnection_GetClientID()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_GetClientID </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">uint64_t *&#160;</td>
+          <td class="paramname"><em>cid</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the client ID assigned by the server to which the client is currently connected to.</p>
+<dl class="section note"><dt>Note</dt><dd>The value may change if the client reconnects.</dd></dl>
+<p>This function returns <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a8a4e298931ba0698a72e397b1b57c885" title="The server does not support this action.">NATS_NO_SERVER_SUPPORT</a> if the server's version is less than 1.2.0.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+    <tr><td class="paramname">cid</td><td>the location where to store the client ID. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga59bdc4ad9fea2053f5d3841f6b83f88b" name="ga59bdc4ad9fea2053f5d3841f6b83f88b"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga59bdc4ad9fea2053f5d3841f6b83f88b">&#9670;&#160;</a></span>natsConnection_Drain()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_Drain </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Drain will put a connection into a drain state. All subscriptions will immediately be put into a drain state. Upon completion, the publishers will be drained and can not publish any additional messages. Upon draining of the publishers, the connection will be closed. Use the <a class="el" href="group__opts_group.html#ga44410242e73134e5bb51ef27904a9253" title="Sets the callback to be invoked when a connection to a server is permanently lost.">natsOptions_SetClosedCB()</a> option to know when the connection has moved from draining to closed.</p>
+<p >This call uses a default drain timeout of 30 seconds.</p>
+<dl class="section warning"><dt>Warning</dt><dd>This function does not block waiting for the draining operation to complete.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#ga44410242e73134e5bb51ef27904a9253" title="Sets the callback to be invoked when a connection to a server is permanently lost.">natsOptions_SetClosedCB</a> </dd>
+<dd>
+<a class="el" href="group__conn_mgt_group.html#gae06fe6f5933f216d6d93645a122a7dd4" title="Drains the connection with given timeout.">natsConnection_DrainTimeout</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gae06fe6f5933f216d6d93645a122a7dd4" name="gae06fe6f5933f216d6d93645a122a7dd4"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gae06fe6f5933f216d6d93645a122a7dd4">&#9670;&#160;</a></span>natsConnection_DrainTimeout()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_DrainTimeout </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int64_t&#160;</td>
+          <td class="paramname"><em>timeout</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Identical to <a class="el" href="group__conn_mgt_group.html#ga59bdc4ad9fea2053f5d3841f6b83f88b" title="Drains the connection with default timeout.">natsConnection_Drain</a> but the timeout can be specified here.</p>
+<p >The value is expressed in milliseconds. Zero or negative value means that the operation will not timeout.</p>
+<dl class="section warning"><dt>Warning</dt><dd>This function does not block waiting for the draining operation to complete.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#ga44410242e73134e5bb51ef27904a9253" title="Sets the callback to be invoked when a connection to a server is permanently lost.">natsOptions_SetClosedCB</a> </dd>
+<dd>
+<a class="el" href="group__conn_mgt_group.html#ga59bdc4ad9fea2053f5d3841f6b83f88b" title="Drains the connection with default timeout.">natsConnection_Drain</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+    <tr><td class="paramname">timeout</td><td>the allowed time for a drain operation to complete, expressed in milliseconds. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga6960cfdbaac3b8759784f352d4c264f8" name="ga6960cfdbaac3b8759784f352d4c264f8"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga6960cfdbaac3b8759784f352d4c264f8">&#9670;&#160;</a></span>natsConnection_Sign()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_Sign </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const unsigned char *&#160;</td>
+          <td class="paramname"><em>message</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&#160;</td>
+          <td class="paramname"><em>messageLen</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">unsigned char&#160;</td>
+          <td class="paramname"><em>sig</em>[64]&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >The connection must have been created with the <a class="el" href="group__opts_group.html#ga59b47f7b7a19085cf8eaada9bfe5606e" title="Sets the file(s) to use to fetch user JWT and seed required to sign nonce.">natsOptions_SetUserCredentialsFromFiles</a>.</p>
+<p >This call will sign the given message with the private key extracted through the user credentials file(s).</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+    <tr><td class="paramname">message</td><td>the byte array to sign. </td></tr>
+    <tr><td class="paramname">messageLen</td><td>the length of the given byte array. </td></tr>
+    <tr><td class="paramname">sig</td><td>an array of 64 bytes in which the signature will be copied. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gadafcfeeeac2733c7119981ab97b7103d" name="gadafcfeeeac2733c7119981ab97b7103d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gadafcfeeeac2733c7119981ab97b7103d">&#9670;&#160;</a></span>natsConnection_GetClientIP()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_GetClientIP </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">char **&#160;</td>
+          <td class="paramname"><em>ip</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >When a connection is created to the server, the server identifies the connection's remote IP address and return it back to the client.</p>
+<dl class="section note"><dt>Note</dt><dd>The user is responsible to free memory allocated to store the client IP address.</dd>
+<dd>
+This is supported on servers &gt;= version 2.1.6. Calling <a class="el" href="group__conn_mgt_group.html#gadafcfeeeac2733c7119981ab97b7103d" title="Returns the client&#39;s IP address as reported by the server.">natsConnection_GetClientIP()</a> with server below this version will return the <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a8a4e298931ba0698a72e397b1b57c885" title="The server does not support this action.">NATS_NO_SERVER_SUPPORT</a> error.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__conn_mgt_group.html#ga761095a42374b4dafa178df7d7652dd5" title="Returns the connection local IP and port.">natsConnection_GetLocalIPAndPort</a> to get the local IP and port instead.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+    <tr><td class="paramname">ip</td><td>the memory location where to store the client's IP string. The user is responsible from freeing this memory. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gaa3fd27e6e7d8131e679d4f10e201c435" name="gaa3fd27e6e7d8131e679d4f10e201c435"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaa3fd27e6e7d8131e679d4f10e201c435">&#9670;&#160;</a></span>natsConnection_GetRTT()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_GetRTT </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int64_t *&#160;</td>
+          <td class="paramname"><em>rtt</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >The value returned is in nanoseconds.</p>
+<dl class="section note"><dt>Note</dt><dd>If the library is currently trying to reconnect, this call will return <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80abef517217119e8446a8e3382e1f37eb3">NATS_CONNECTION_DISCONNECTED</a>.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+    <tr><td class="paramname">rtt</td><td>the memory location where to store the rtt. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gad765b80ae8e1a06a7a942cccf29f042a" name="gad765b80ae8e1a06a7a942cccf29f042a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gad765b80ae8e1a06a7a942cccf29f042a">&#9670;&#160;</a></span>natsConnection_HasHeaderSupport()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_HasHeaderSupport </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns NATS_OK if the server this client is currently connected to supports headers, NATS_NO_SERVER_SUPPORT otherwise.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga761095a42374b4dafa178df7d7652dd5" name="ga761095a42374b4dafa178df7d7652dd5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga761095a42374b4dafa178df7d7652dd5">&#9670;&#160;</a></span>natsConnection_GetLocalIPAndPort()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_GetLocalIPAndPort </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">char **&#160;</td>
+          <td class="paramname"><em>ip</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int *&#160;</td>
+          <td class="paramname"><em>port</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Unlike <a class="el" href="group__conn_mgt_group.html#gadafcfeeeac2733c7119981ab97b7103d" title="Returns the client&#39;s IP address as reported by the server.">natsConnection_GetClientIP</a>, this function returns the connection's local IP and port.</p>
+<dl class="section note"><dt>Note</dt><dd>The user is responsible for freeing the memory allocated for the returned IP string.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">nc</td><td>the pointer of the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+    <tr><td class="paramname">ip</td><td>the memory location where to store the local IP string. The user is responsible from freeing this memory. </td></tr>
+    <tr><td class="paramname">port</td><td>the memory location where to store the local port.</td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd><a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990" title="Success.">NATS_OK</a> on success. </dd>
+<dd>
+<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80abef517217119e8446a8e3382e1f37eb3">NATS_CONNECTION_DISCONNECTED</a> if disconnected. </dd>
+<dd>
+<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a476d7bcf9a593b749e435f20a9156eff">NATS_CONNECTION_CLOSED</a> is connection is closed. </dd>
+<dd>
+<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a984189ec4cfe3e7647268c99f7e49ec9" title="Some system function returned an error.">NATS_SYS_ERROR</a> if a system error getting the IP and port occurred. </dd>
+<dd>
+<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a62ff6f5cc64399631defc0119731b514">NATS_NO_MEMORY</a> if the library was unable to allocate memory for the returned IP string. </dd></dl>
+
+</div>
+</div>
+<a id="ga19e204d27a232e2d4334301fc002b2ed" name="ga19e204d27a232e2d4334301fc002b2ed"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga19e204d27a232e2d4334301fc002b2ed">&#9670;&#160;</a></span>natsConnection_Close()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void natsConnection_Close </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Closes the connection to the server. This call will release all blocking calls, such as <a class="el" href="group__conn_mgt_group.html#ga1c98f8d89bb8e20ea8621e860a90267f" title="Flushes the connection.">natsConnection_Flush()</a> and <a class="el" href="group__sub_group.html#ga6538a5d78dfb0f16514b94c8e74c11af" title="Returns the next available message.">natsSubscription_NextMsg()</a>. The connection object is still usable until the call to <a class="el" href="group__conn_mgt_group.html#gafda2f702276fb0ac301efac10df09495" title="Destroys the connection object.">natsConnection_Destroy()</a>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gafda2f702276fb0ac301efac10df09495" name="gafda2f702276fb0ac301efac10df09495"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gafda2f702276fb0ac301efac10df09495">&#9670;&#160;</a></span>natsConnection_Destroy()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void natsConnection_Destroy </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Destroys the connection object, freeing up memory. If not already done, this call first closes the connection to the server.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__conn_mgt_group.js b/doc/html/group__conn_mgt_group.js
new file mode 100644 (file)
index 0000000..0268330
--- /dev/null
@@ -0,0 +1,31 @@
+var group__conn_mgt_group =
+[
+    [ "natsConnection_Connect", "group__conn_mgt_group.html#ga740be1ba16a8570eb98ef6755ebf52ce", null ],
+    [ "natsConnection_ProcessReadEvent", "group__conn_mgt_group.html#gaa89c06e30e19ff361125bfc9114d89a8", null ],
+    [ "natsConnection_ProcessWriteEvent", "group__conn_mgt_group.html#gad81b603b84c0180aefc6d5ebad7f2a47", null ],
+    [ "natsConnection_ConnectTo", "group__conn_mgt_group.html#gafb83c8d7970ba68be0e6c40c38cdfde4", null ],
+    [ "natsConnection_IsClosed", "group__conn_mgt_group.html#ga530f0f1c75c58a81aae1a59f15b46d9f", null ],
+    [ "natsConnection_IsReconnecting", "group__conn_mgt_group.html#ga5aa349fc3895dde772671b324b07a688", null ],
+    [ "natsConnection_IsDraining", "group__conn_mgt_group.html#ga15a0f8aa9a6f621535d01593a4c8edd5", null ],
+    [ "natsConnection_Status", "group__conn_mgt_group.html#ga33fa209522e5e0226b5b7c7d720a3b98", null ],
+    [ "natsConnection_Buffered", "group__conn_mgt_group.html#ga0433159e518540ff874c4026fe9cd0c5", null ],
+    [ "natsConnection_Flush", "group__conn_mgt_group.html#ga1c98f8d89bb8e20ea8621e860a90267f", null ],
+    [ "natsConnection_FlushTimeout", "group__conn_mgt_group.html#ga85915ef0c8b87993be1b076099d6a7c1", null ],
+    [ "natsConnection_GetMaxPayload", "group__conn_mgt_group.html#ga68e7149f7ff1cc4989b3f795fa7e76d9", null ],
+    [ "natsConnection_GetStats", "group__conn_mgt_group.html#ga68821a8ae1176096b5afef7fdc7947ec", null ],
+    [ "natsConnection_GetConnectedUrl", "group__conn_mgt_group.html#gaf623280407c43ade02285005f0642e6d", null ],
+    [ "natsConnection_GetConnectedServerId", "group__conn_mgt_group.html#ga48cee9ea1cdc9fc2770de2f9f0fd1ccf", null ],
+    [ "natsConnection_GetServers", "group__conn_mgt_group.html#gaf4ee7262e35e44c40ad5dfe9240db76b", null ],
+    [ "natsConnection_GetDiscoveredServers", "group__conn_mgt_group.html#gad25c77be0873495412c90a73fe450708", null ],
+    [ "natsConnection_GetLastError", "group__conn_mgt_group.html#gab6cfa9cb6857ae10f096a94f5e244e63", null ],
+    [ "natsConnection_GetClientID", "group__conn_mgt_group.html#ga747513ba6ab63fdf9a72bfc8025a14ba", null ],
+    [ "natsConnection_Drain", "group__conn_mgt_group.html#ga59bdc4ad9fea2053f5d3841f6b83f88b", null ],
+    [ "natsConnection_DrainTimeout", "group__conn_mgt_group.html#gae06fe6f5933f216d6d93645a122a7dd4", null ],
+    [ "natsConnection_Sign", "group__conn_mgt_group.html#ga6960cfdbaac3b8759784f352d4c264f8", null ],
+    [ "natsConnection_GetClientIP", "group__conn_mgt_group.html#gadafcfeeeac2733c7119981ab97b7103d", null ],
+    [ "natsConnection_GetRTT", "group__conn_mgt_group.html#gaa3fd27e6e7d8131e679d4f10e201c435", null ],
+    [ "natsConnection_HasHeaderSupport", "group__conn_mgt_group.html#gad765b80ae8e1a06a7a942cccf29f042a", null ],
+    [ "natsConnection_GetLocalIPAndPort", "group__conn_mgt_group.html#ga761095a42374b4dafa178df7d7652dd5", null ],
+    [ "natsConnection_Close", "group__conn_mgt_group.html#ga19e204d27a232e2d4334301fc002b2ed", null ],
+    [ "natsConnection_Destroy", "group__conn_mgt_group.html#gafda2f702276fb0ac301efac10df09495", null ]
+];
\ No newline at end of file
diff --git a/doc/html/group__conn_pub_group.html b/doc/html/group__conn_pub_group.html
new file mode 100644 (file)
index 0000000..b63971f
--- /dev/null
@@ -0,0 +1,564 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Publishing</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__conn_pub_group.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle"><div class="title">Publishing<div class="ingroups"><a class="el" href="group__func_group.html">Functions</a> &raquo; <a class="el" href="group__conn_group.html">Connection</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:gac0b9f7759ecc39b8d77807b94254f9b4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_pub_group.html#gac0b9f7759ecc39b8d77807b94254f9b4">natsConnection_Publish</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, const char *subj, const void *data, int dataLen)</td></tr>
+<tr class="memdesc:gac0b9f7759ecc39b8d77807b94254f9b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Publishes data on a subject.  <a href="group__conn_pub_group.html#gac0b9f7759ecc39b8d77807b94254f9b4">More...</a><br /></td></tr>
+<tr class="separator:gac0b9f7759ecc39b8d77807b94254f9b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gad09a717c20de4cf0e2a21dcfd9ce6c64"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_pub_group.html#gad09a717c20de4cf0e2a21dcfd9ce6c64">natsConnection_PublishString</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, const char *subj, const char *str)</td></tr>
+<tr class="memdesc:gad09a717c20de4cf0e2a21dcfd9ce6c64"><td class="mdescLeft">&#160;</td><td class="mdescRight">Publishes a string on a subject.  <a href="group__conn_pub_group.html#gad09a717c20de4cf0e2a21dcfd9ce6c64">More...</a><br /></td></tr>
+<tr class="separator:gad09a717c20de4cf0e2a21dcfd9ce6c64"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga74511acd87385931112c45c48c2a14ba"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_pub_group.html#ga74511acd87385931112c45c48c2a14ba">natsConnection_PublishMsg</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg)</td></tr>
+<tr class="memdesc:ga74511acd87385931112c45c48c2a14ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Publishes a message on a subject.  <a href="group__conn_pub_group.html#ga74511acd87385931112c45c48c2a14ba">More...</a><br /></td></tr>
+<tr class="separator:ga74511acd87385931112c45c48c2a14ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaaaa3d75ffec2dcdc6bf905cdb1eee59e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_pub_group.html#gaaaa3d75ffec2dcdc6bf905cdb1eee59e">natsConnection_PublishRequest</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, const char *subj, const char *reply, const void *data, int dataLen)</td></tr>
+<tr class="memdesc:gaaaa3d75ffec2dcdc6bf905cdb1eee59e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Publishes data on a subject expecting replies on the given reply.  <a href="group__conn_pub_group.html#gaaaa3d75ffec2dcdc6bf905cdb1eee59e">More...</a><br /></td></tr>
+<tr class="separator:gaaaa3d75ffec2dcdc6bf905cdb1eee59e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaafca9a8294e81a5a9979e762931e56c5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_pub_group.html#gaafca9a8294e81a5a9979e762931e56c5">natsConnection_PublishRequestString</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, const char *subj, const char *reply, const char *str)</td></tr>
+<tr class="memdesc:gaafca9a8294e81a5a9979e762931e56c5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Publishes a string on a subject expecting replies on the given reply.  <a href="group__conn_pub_group.html#gaafca9a8294e81a5a9979e762931e56c5">More...</a><br /></td></tr>
+<tr class="separator:gaafca9a8294e81a5a9979e762931e56c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf4b4a022f9c21fc269b87c000330c5a7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_pub_group.html#gaf4b4a022f9c21fc269b87c000330c5a7">natsConnection_Request</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **replyMsg, <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, const char *subj, const void *data, int dataLen, int64_t timeout)</td></tr>
+<tr class="memdesc:gaf4b4a022f9c21fc269b87c000330c5a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends a request and waits for a reply.  <a href="group__conn_pub_group.html#gaf4b4a022f9c21fc269b87c000330c5a7">More...</a><br /></td></tr>
+<tr class="separator:gaf4b4a022f9c21fc269b87c000330c5a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga4bb5105df6a3efd2088e6be0fdf6b31f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_pub_group.html#ga4bb5105df6a3efd2088e6be0fdf6b31f">natsConnection_RequestString</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **replyMsg, <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, const char *subj, const char *str, int64_t timeout)</td></tr>
+<tr class="memdesc:ga4bb5105df6a3efd2088e6be0fdf6b31f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends a request (as a string) and waits for a reply.  <a href="group__conn_pub_group.html#ga4bb5105df6a3efd2088e6be0fdf6b31f">More...</a><br /></td></tr>
+<tr class="separator:ga4bb5105df6a3efd2088e6be0fdf6b31f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga052de4b75b3b69ccd8d20eb4861b801d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_pub_group.html#ga052de4b75b3b69ccd8d20eb4861b801d">natsConnection_RequestMsg</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **replyMsg, <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *requestMsg, int64_t timeout)</td></tr>
+<tr class="memdesc:ga052de4b75b3b69ccd8d20eb4861b801d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends a request based on the given <code>requestMsg</code> and waits for a reply.  <a href="group__conn_pub_group.html#ga052de4b75b3b69ccd8d20eb4861b801d">More...</a><br /></td></tr>
+<tr class="separator:ga052de4b75b3b69ccd8d20eb4861b801d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<p >Publishing functions </p>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="gac0b9f7759ecc39b8d77807b94254f9b4" name="gac0b9f7759ecc39b8d77807b94254f9b4"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gac0b9f7759ecc39b8d77807b94254f9b4">&#9670;&#160;</a></span>natsConnection_Publish()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_Publish </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>subj</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const void *&#160;</td>
+          <td class="paramname"><em>data</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&#160;</td>
+          <td class="paramname"><em>dataLen</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Publishes the data argument to the given subject. The data argument is left untouched and needs to be correctly interpreted on the receiver.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+    <tr><td class="paramname">subj</td><td>the subject the data is sent to. </td></tr>
+    <tr><td class="paramname">data</td><td>the data to be sent, can be <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">dataLen</td><td>the length of the data to be sent. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gad09a717c20de4cf0e2a21dcfd9ce6c64" name="gad09a717c20de4cf0e2a21dcfd9ce6c64"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gad09a717c20de4cf0e2a21dcfd9ce6c64">&#9670;&#160;</a></span>natsConnection_PublishString()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_PublishString </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>subj</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>str</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Convenient function to publish a string. This call is equivalent to:</p>
+<div class="fragment"><div class="line"><span class="keyword">const</span> <span class="keywordtype">char</span>* myString = <span class="stringliteral">&quot;hello&quot;</span>;</div>
+<div class="line"> </div>
+<div class="line"><a class="code hl_function" href="group__conn_pub_group.html#gac0b9f7759ecc39b8d77807b94254f9b4">natsConnection_Publish</a>(nc, subj, (<span class="keyword">const</span> <span class="keywordtype">void</span>*) myString, (<span class="keywordtype">int</span>) strlen(myString));</div>
+<div class="ttc" id="agroup__conn_pub_group_html_gac0b9f7759ecc39b8d77807b94254f9b4"><div class="ttname"><a href="group__conn_pub_group.html#gac0b9f7759ecc39b8d77807b94254f9b4">natsConnection_Publish</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsConnection_Publish(natsConnection *nc, const char *subj, const void *data, int dataLen)</div><div class="ttdoc">Publishes data on a subject.</div></div>
+</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+    <tr><td class="paramname">subj</td><td>the subject the data is sent to. </td></tr>
+    <tr><td class="paramname">str</td><td>the string to be sent. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga74511acd87385931112c45c48c2a14ba" name="ga74511acd87385931112c45c48c2a14ba"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga74511acd87385931112c45c48c2a14ba">&#9670;&#160;</a></span>natsConnection_PublishMsg()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_PublishMsg </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *&#160;</td>
+          <td class="paramname"><em>msg</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Publishes the <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a>, which includes the subject, an optional reply and optional data.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__msg_group.html#ga098e4fec1c5a71c00a0d092fbd6d1a21" title="Creates a natsMsg object.">natsMsg_Create()</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+    <tr><td class="paramname">msg</td><td>the pointer to the <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a> object to send. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gaaaa3d75ffec2dcdc6bf905cdb1eee59e" name="gaaaa3d75ffec2dcdc6bf905cdb1eee59e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaaaa3d75ffec2dcdc6bf905cdb1eee59e">&#9670;&#160;</a></span>natsConnection_PublishRequest()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_PublishRequest </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>subj</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>reply</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const void *&#160;</td>
+          <td class="paramname"><em>data</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&#160;</td>
+          <td class="paramname"><em>dataLen</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Publishes the data argument to the given subject expecting a response on the reply subject. Use <a class="el" href="group__conn_pub_group.html#gaf4b4a022f9c21fc269b87c000330c5a7" title="Sends a request and waits for a reply.">natsConnection_Request()</a> for automatically waiting for a response inline.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+    <tr><td class="paramname">subj</td><td>the subject the request is sent to. </td></tr>
+    <tr><td class="paramname">reply</td><td>the reply on which resonses are expected. </td></tr>
+    <tr><td class="paramname">data</td><td>the data to be sent, can be <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">dataLen</td><td>the length of the data to be sent. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gaafca9a8294e81a5a9979e762931e56c5" name="gaafca9a8294e81a5a9979e762931e56c5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaafca9a8294e81a5a9979e762931e56c5">&#9670;&#160;</a></span>natsConnection_PublishRequestString()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_PublishRequestString </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>subj</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>reply</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>str</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Convenient function to publish a request as a string. This call is equivalent to:</p>
+<div class="fragment"><div class="line"><span class="keyword">const</span> <span class="keywordtype">char</span>* myString = <span class="stringliteral">&quot;hello&quot;</span>;</div>
+<div class="line"> </div>
+<div class="line">natsPublishRequest(nc, subj, reply, (<span class="keyword">const</span> <span class="keywordtype">void</span>*) myString, (<span class="keywordtype">int</span>) strlen(myString));</div>
+</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+    <tr><td class="paramname">subj</td><td>the subject the request is sent to. </td></tr>
+    <tr><td class="paramname">reply</td><td>the reply on which resonses are expected. </td></tr>
+    <tr><td class="paramname">str</td><td>the string to send. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gaf4b4a022f9c21fc269b87c000330c5a7" name="gaf4b4a022f9c21fc269b87c000330c5a7"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaf4b4a022f9c21fc269b87c000330c5a7">&#9670;&#160;</a></span>natsConnection_Request()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_Request </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **&#160;</td>
+          <td class="paramname"><em>replyMsg</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>subj</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const void *&#160;</td>
+          <td class="paramname"><em>data</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&#160;</td>
+          <td class="paramname"><em>dataLen</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int64_t&#160;</td>
+          <td class="paramname"><em>timeout</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Sends a request payload and delivers the first response message, or an error, including a timeout if no message was received properly.</p>
+<dl class="section warning"><dt>Warning</dt><dd>If connected to a NATS Server v2.2.0+ with no responder running when the request is received, this call will return a <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80aab97324e40ccfe1360080c651c330e62" title="No responders were running when the server received the request.">NATS_NO_RESPONDERS</a> error.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">replyMsg</td><td>the location where to store the pointer to the received <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a> reply. </td></tr>
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+    <tr><td class="paramname">subj</td><td>the subject the request is sent to. </td></tr>
+    <tr><td class="paramname">data</td><td>the data of the request, can be <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">dataLen</td><td>the length of the data to send. </td></tr>
+    <tr><td class="paramname">timeout</td><td>in milliseconds, before this call returns <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ab88994c9ea9889ac4d9d656d62f550ed">NATS_TIMEOUT</a> if no response is received in this alloted time. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga4bb5105df6a3efd2088e6be0fdf6b31f" name="ga4bb5105df6a3efd2088e6be0fdf6b31f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga4bb5105df6a3efd2088e6be0fdf6b31f">&#9670;&#160;</a></span>natsConnection_RequestString()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_RequestString </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **&#160;</td>
+          <td class="paramname"><em>replyMsg</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>subj</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>str</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int64_t&#160;</td>
+          <td class="paramname"><em>timeout</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Convenient function to send a request as a string. This call is equivalent to:</p>
+<div class="fragment"><div class="line"><span class="keyword">const</span> <span class="keywordtype">char</span>* myString = <span class="stringliteral">&quot;hello&quot;</span>;</div>
+<div class="line"> </div>
+<div class="line"><a class="code hl_function" href="group__conn_pub_group.html#gaf4b4a022f9c21fc269b87c000330c5a7">natsConnection_Request</a>(replyMsg, nc, subj, (<span class="keyword">const</span> <span class="keywordtype">void</span>*) myString, (<span class="keywordtype">int</span>) strlen(myString));</div>
+<div class="ttc" id="agroup__conn_pub_group_html_gaf4b4a022f9c21fc269b87c000330c5a7"><div class="ttname"><a href="group__conn_pub_group.html#gaf4b4a022f9c21fc269b87c000330c5a7">natsConnection_Request</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsConnection_Request(natsMsg **replyMsg, natsConnection *nc, const char *subj, const void *data, int dataLen, int64_t timeout)</div><div class="ttdoc">Sends a request and waits for a reply.</div></div>
+</div><!-- fragment --><dl class="section warning"><dt>Warning</dt><dd>See warning about no responders in <a class="el" href="group__conn_pub_group.html#gaf4b4a022f9c21fc269b87c000330c5a7" title="Sends a request and waits for a reply.">natsConnection_Request()</a>.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">replyMsg</td><td>the location where to store the pointer to the received <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a> reply. </td></tr>
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+    <tr><td class="paramname">subj</td><td>the subject the request is sent to. </td></tr>
+    <tr><td class="paramname">str</td><td>the string to send. </td></tr>
+    <tr><td class="paramname">timeout</td><td>in milliseconds, before this call returns <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ab88994c9ea9889ac4d9d656d62f550ed">NATS_TIMEOUT</a> if no response is received in this alloted time. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga052de4b75b3b69ccd8d20eb4861b801d" name="ga052de4b75b3b69ccd8d20eb4861b801d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga052de4b75b3b69ccd8d20eb4861b801d">&#9670;&#160;</a></span>natsConnection_RequestMsg()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_RequestMsg </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **&#160;</td>
+          <td class="paramname"><em>replyMsg</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *&#160;</td>
+          <td class="paramname"><em>requestMsg</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int64_t&#160;</td>
+          <td class="paramname"><em>timeout</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Similar to <a class="el" href="group__conn_pub_group.html#gaf4b4a022f9c21fc269b87c000330c5a7" title="Sends a request and waits for a reply.">natsConnection_Request</a> but uses <code>requestMsg</code> to extract subject, and payload to send.</p>
+<dl class="section warning"><dt>Warning</dt><dd>See warning about no responders in <a class="el" href="group__conn_pub_group.html#gaf4b4a022f9c21fc269b87c000330c5a7" title="Sends a request and waits for a reply.">natsConnection_Request()</a>.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">replyMsg</td><td>the location where to store the pointer to the received <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a> reply. </td></tr>
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+    <tr><td class="paramname">requestMsg</td><td>the message used for the request. </td></tr>
+    <tr><td class="paramname">timeout</td><td>in milliseconds, before this call returns <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ab88994c9ea9889ac4d9d656d62f550ed">NATS_TIMEOUT</a> if no response is received in this alloted time. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__conn_pub_group.js b/doc/html/group__conn_pub_group.js
new file mode 100644 (file)
index 0000000..f415c74
--- /dev/null
@@ -0,0 +1,11 @@
+var group__conn_pub_group =
+[
+    [ "natsConnection_Publish", "group__conn_pub_group.html#gac0b9f7759ecc39b8d77807b94254f9b4", null ],
+    [ "natsConnection_PublishString", "group__conn_pub_group.html#gad09a717c20de4cf0e2a21dcfd9ce6c64", null ],
+    [ "natsConnection_PublishMsg", "group__conn_pub_group.html#ga74511acd87385931112c45c48c2a14ba", null ],
+    [ "natsConnection_PublishRequest", "group__conn_pub_group.html#gaaaa3d75ffec2dcdc6bf905cdb1eee59e", null ],
+    [ "natsConnection_PublishRequestString", "group__conn_pub_group.html#gaafca9a8294e81a5a9979e762931e56c5", null ],
+    [ "natsConnection_Request", "group__conn_pub_group.html#gaf4b4a022f9c21fc269b87c000330c5a7", null ],
+    [ "natsConnection_RequestString", "group__conn_pub_group.html#ga4bb5105df6a3efd2088e6be0fdf6b31f", null ],
+    [ "natsConnection_RequestMsg", "group__conn_pub_group.html#ga052de4b75b3b69ccd8d20eb4861b801d", null ]
+];
\ No newline at end of file
diff --git a/doc/html/group__conn_sub_group.html b/doc/html/group__conn_sub_group.html
new file mode 100644 (file)
index 0000000..ae7ea6d
--- /dev/null
@@ -0,0 +1,493 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Subscribing</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__conn_sub_group.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle"><div class="title">Subscribing<div class="ingroups"><a class="el" href="group__func_group.html">Functions</a> &raquo; <a class="el" href="group__conn_group.html">Connection</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:gaefab965b5645798d47f9244f2b3fe3fb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_sub_group.html#gaefab965b5645798d47f9244f2b3fe3fb">natsConnection_Subscribe</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **sub, <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, const char *subject, <a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe">natsMsgHandler</a> cb, void *cbClosure)</td></tr>
+<tr class="memdesc:gaefab965b5645798d47f9244f2b3fe3fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates an asynchronous subscription.  <a href="group__conn_sub_group.html#gaefab965b5645798d47f9244f2b3fe3fb">More...</a><br /></td></tr>
+<tr class="separator:gaefab965b5645798d47f9244f2b3fe3fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gacb2c83b58b7909715424cbc327fdd404"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_sub_group.html#gacb2c83b58b7909715424cbc327fdd404">natsConnection_SubscribeTimeout</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **sub, <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, const char *subject, int64_t timeout, <a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe">natsMsgHandler</a> cb, void *cbClosure)</td></tr>
+<tr class="memdesc:gacb2c83b58b7909715424cbc327fdd404"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates an asynchronous subscription with a timeout.  <a href="group__conn_sub_group.html#gacb2c83b58b7909715424cbc327fdd404">More...</a><br /></td></tr>
+<tr class="separator:gacb2c83b58b7909715424cbc327fdd404"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga17574d5165f7e285462e3d3b2709edf4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_sub_group.html#ga17574d5165f7e285462e3d3b2709edf4">natsConnection_SubscribeSync</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **sub, <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, const char *subject)</td></tr>
+<tr class="memdesc:ga17574d5165f7e285462e3d3b2709edf4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a synchronous subcription.  <a href="group__conn_sub_group.html#ga17574d5165f7e285462e3d3b2709edf4">More...</a><br /></td></tr>
+<tr class="separator:ga17574d5165f7e285462e3d3b2709edf4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga3c9fee2775130786ef62f1cbeb191a48"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_sub_group.html#ga3c9fee2775130786ef62f1cbeb191a48">natsConnection_QueueSubscribe</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **sub, <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, const char *subject, const char *queueGroup, <a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe">natsMsgHandler</a> cb, void *cbClosure)</td></tr>
+<tr class="memdesc:ga3c9fee2775130786ef62f1cbeb191a48"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates an asynchronous queue subscriber.  <a href="group__conn_sub_group.html#ga3c9fee2775130786ef62f1cbeb191a48">More...</a><br /></td></tr>
+<tr class="separator:ga3c9fee2775130786ef62f1cbeb191a48"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga96fa115fd5b2ef7658884da80714b91c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_sub_group.html#ga96fa115fd5b2ef7658884da80714b91c">natsConnection_QueueSubscribeTimeout</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **sub, <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, const char *subject, const char *queueGroup, int64_t timeout, <a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe">natsMsgHandler</a> cb, void *cbClosure)</td></tr>
+<tr class="memdesc:ga96fa115fd5b2ef7658884da80714b91c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates an asynchronous queue subscriber with a timeout.  <a href="group__conn_sub_group.html#ga96fa115fd5b2ef7658884da80714b91c">More...</a><br /></td></tr>
+<tr class="separator:ga96fa115fd5b2ef7658884da80714b91c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga68630ea7c4bbdc7f8cd62058b41fb476"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_sub_group.html#ga68630ea7c4bbdc7f8cd62058b41fb476">natsConnection_QueueSubscribeSync</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **sub, <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, const char *subject, const char *queueGroup)</td></tr>
+<tr class="memdesc:ga68630ea7c4bbdc7f8cd62058b41fb476"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a synchronous queue subscriber.  <a href="group__conn_sub_group.html#ga68630ea7c4bbdc7f8cd62058b41fb476">More...</a><br /></td></tr>
+<tr class="separator:ga68630ea7c4bbdc7f8cd62058b41fb476"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<p >Subscribing functions. </p>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="gaefab965b5645798d47f9244f2b3fe3fb" name="gaefab965b5645798d47f9244f2b3fe3fb"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaefab965b5645798d47f9244f2b3fe3fb">&#9670;&#160;</a></span>natsConnection_Subscribe()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_Subscribe </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **&#160;</td>
+          <td class="paramname"><em>sub</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>subject</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe">natsMsgHandler</a>&#160;</td>
+          <td class="paramname"><em>cb</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">void *&#160;</td>
+          <td class="paramname"><em>cbClosure</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Expresses interest in the given subject. The subject can have wildcards (see <a class="el" href="group__wildcards_group.html">Wildcards</a>). Messages will be delivered to the associated <a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe" title="Callback used to deliver messages to the application.">natsMsgHandler</a>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the location where to store the pointer to the newly created <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+    <tr><td class="paramname">subject</td><td>the subject this subscription is created for. </td></tr>
+    <tr><td class="paramname">cb</td><td>the <a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe" title="Callback used to deliver messages to the application.">natsMsgHandler</a> callback. </td></tr>
+    <tr><td class="paramname">cbClosure</td><td>a pointer to an user defined object (can be <code>NULL</code>). See the <a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe" title="Callback used to deliver messages to the application.">natsMsgHandler</a> prototype. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gacb2c83b58b7909715424cbc327fdd404" name="gacb2c83b58b7909715424cbc327fdd404"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gacb2c83b58b7909715424cbc327fdd404">&#9670;&#160;</a></span>natsConnection_SubscribeTimeout()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_SubscribeTimeout </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **&#160;</td>
+          <td class="paramname"><em>sub</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>subject</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int64_t&#160;</td>
+          <td class="paramname"><em>timeout</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe">natsMsgHandler</a>&#160;</td>
+          <td class="paramname"><em>cb</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">void *&#160;</td>
+          <td class="paramname"><em>cbClosure</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Expresses interest in the given subject. The subject can have wildcards (see <a class="el" href="group__wildcards_group.html">Wildcards</a>). Messages will be delivered to the associated <a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe" title="Callback used to deliver messages to the application.">natsMsgHandler</a>.</p>
+<p >If no message is received by the given timeout (in milliseconds), the message handler is invoked with a <code>NULL</code> message.<br  />
+ You can then destroy the subscription in the callback, or simply return, in which case, the message handler will fire again when a message is received or the subscription times-out again.</p>
+<dl class="section note"><dt>Note</dt><dd>Receiving a message reset the timeout. Until all pending messages are processed, no timeout will occur. The timeout starts when the message handler for the last pending message returns.</dd></dl>
+<dl class="section warning"><dt>Warning</dt><dd>If you re-use message handler code between subscriptions with and without timeouts, keep in mind that the message passed in the message handler may be <code>NULL</code>.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the location where to store the pointer to the newly created <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+    <tr><td class="paramname">subject</td><td>the subject this subscription is created for. </td></tr>
+    <tr><td class="paramname">timeout</td><td>the interval (in milliseconds) after which, if no message is received, the message handler is invoked with a <code>NULL</code> message. </td></tr>
+    <tr><td class="paramname">cb</td><td>the <a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe" title="Callback used to deliver messages to the application.">natsMsgHandler</a> callback. </td></tr>
+    <tr><td class="paramname">cbClosure</td><td>a pointer to an user defined object (can be <code>NULL</code>). See the <a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe" title="Callback used to deliver messages to the application.">natsMsgHandler</a> prototype. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga17574d5165f7e285462e3d3b2709edf4" name="ga17574d5165f7e285462e3d3b2709edf4"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga17574d5165f7e285462e3d3b2709edf4">&#9670;&#160;</a></span>natsConnection_SubscribeSync()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_SubscribeSync </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **&#160;</td>
+          <td class="paramname"><em>sub</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>subject</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Similar to <a class="el" href="group__conn_sub_group.html#gaefab965b5645798d47f9244f2b3fe3fb" title="Creates an asynchronous subscription.">natsConnection_Subscribe</a>, but creates a synchronous subscription that can be polled via <a class="el" href="group__sub_group.html#ga6538a5d78dfb0f16514b94c8e74c11af" title="Returns the next available message.">natsSubscription_NextMsg()</a>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the location where to store the pointer to the newly created <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+    <tr><td class="paramname">subject</td><td>the subject this subscription is created for. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga3c9fee2775130786ef62f1cbeb191a48" name="ga3c9fee2775130786ef62f1cbeb191a48"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga3c9fee2775130786ef62f1cbeb191a48">&#9670;&#160;</a></span>natsConnection_QueueSubscribe()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_QueueSubscribe </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **&#160;</td>
+          <td class="paramname"><em>sub</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>subject</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>queueGroup</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe">natsMsgHandler</a>&#160;</td>
+          <td class="paramname"><em>cb</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">void *&#160;</td>
+          <td class="paramname"><em>cbClosure</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Creates an asynchronous queue subscriber on the given subject. All subscribers with the same queue name will form the queue group and only one member of the group will be selected to receive any given message asynchronously.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the location where to store the pointer to the newly created <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+    <tr><td class="paramname">subject</td><td>the subject this subscription is created for. </td></tr>
+    <tr><td class="paramname">queueGroup</td><td>the name of the group. </td></tr>
+    <tr><td class="paramname">cb</td><td>the <a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe" title="Callback used to deliver messages to the application.">natsMsgHandler</a> callback. </td></tr>
+    <tr><td class="paramname">cbClosure</td><td>a pointer to an user defined object (can be <code>NULL</code>). See the <a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe" title="Callback used to deliver messages to the application.">natsMsgHandler</a> prototype. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga96fa115fd5b2ef7658884da80714b91c" name="ga96fa115fd5b2ef7658884da80714b91c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga96fa115fd5b2ef7658884da80714b91c">&#9670;&#160;</a></span>natsConnection_QueueSubscribeTimeout()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_QueueSubscribeTimeout </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **&#160;</td>
+          <td class="paramname"><em>sub</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>subject</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>queueGroup</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int64_t&#160;</td>
+          <td class="paramname"><em>timeout</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe">natsMsgHandler</a>&#160;</td>
+          <td class="paramname"><em>cb</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">void *&#160;</td>
+          <td class="paramname"><em>cbClosure</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Creates an asynchronous queue subscriber on the given subject. All subscribers with the same queue name will form the queue group and only one member of the group will be selected to receive any given message asynchronously.</p>
+<p >If no message is received by the given timeout (in milliseconds), the message handler is invoked with a <code>NULL</code> message.<br  />
+ You can then destroy the subscription in the callback, or simply return, in which case, the message handler will fire again when a message is received or the subscription times-out again.</p>
+<dl class="section note"><dt>Note</dt><dd>Receiving a message reset the timeout. Until all pending messages are processed, no timeout will occur. The timeout starts when the message handler for the last pending message returns.</dd></dl>
+<dl class="section warning"><dt>Warning</dt><dd>If you re-use message handler code between subscriptions with and without timeouts, keep in mind that the message passed in the message handler may be <code>NULL</code>.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the location where to store the pointer to the newly created <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+    <tr><td class="paramname">subject</td><td>the subject this subscription is created for. </td></tr>
+    <tr><td class="paramname">queueGroup</td><td>the name of the group. </td></tr>
+    <tr><td class="paramname">timeout</td><td>the interval (in milliseconds) after which, if no message is received, the message handler is invoked with a <code>NULL</code> message. </td></tr>
+    <tr><td class="paramname">cb</td><td>the <a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe" title="Callback used to deliver messages to the application.">natsMsgHandler</a> callback. </td></tr>
+    <tr><td class="paramname">cbClosure</td><td>a pointer to an user defined object (can be <code>NULL</code>). See the <a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe" title="Callback used to deliver messages to the application.">natsMsgHandler</a> prototype. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga68630ea7c4bbdc7f8cd62058b41fb476" name="ga68630ea7c4bbdc7f8cd62058b41fb476"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga68630ea7c4bbdc7f8cd62058b41fb476">&#9670;&#160;</a></span>natsConnection_QueueSubscribeSync()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_QueueSubscribeSync </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **&#160;</td>
+          <td class="paramname"><em>sub</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>subject</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>queueGroup</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Similar to <a class="el" href="group__conn_sub_group.html#ga3c9fee2775130786ef62f1cbeb191a48" title="Creates an asynchronous queue subscriber.">natsConnection_QueueSubscribe</a>, but creates a synchronous subscription that can be polled via <a class="el" href="group__sub_group.html#ga6538a5d78dfb0f16514b94c8e74c11af" title="Returns the next available message.">natsSubscription_NextMsg()</a>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the location where to store the pointer to the newly created <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+    <tr><td class="paramname">subject</td><td>the subject this subscription is created for. </td></tr>
+    <tr><td class="paramname">queueGroup</td><td>the name of the group. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__conn_sub_group.js b/doc/html/group__conn_sub_group.js
new file mode 100644 (file)
index 0000000..0b4b589
--- /dev/null
@@ -0,0 +1,9 @@
+var group__conn_sub_group =
+[
+    [ "natsConnection_Subscribe", "group__conn_sub_group.html#gaefab965b5645798d47f9244f2b3fe3fb", null ],
+    [ "natsConnection_SubscribeTimeout", "group__conn_sub_group.html#gacb2c83b58b7909715424cbc327fdd404", null ],
+    [ "natsConnection_SubscribeSync", "group__conn_sub_group.html#ga17574d5165f7e285462e3d3b2709edf4", null ],
+    [ "natsConnection_QueueSubscribe", "group__conn_sub_group.html#ga3c9fee2775130786ef62f1cbeb191a48", null ],
+    [ "natsConnection_QueueSubscribeTimeout", "group__conn_sub_group.html#ga96fa115fd5b2ef7658884da80714b91c", null ],
+    [ "natsConnection_QueueSubscribeSync", "group__conn_sub_group.html#ga68630ea7c4bbdc7f8cd62058b41fb476", null ]
+];
\ No newline at end of file
diff --git a/doc/html/group__env_variables_group.html b/doc/html/group__env_variables_group.html
new file mode 100644 (file)
index 0000000..7b46529
--- /dev/null
@@ -0,0 +1,117 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Environment Variables</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__env_variables_group.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">Environment Variables</div></div>
+</div><!--header-->
+<div class="contents">
+<p >You will find here the environment variables that change the default behavior of the NATS C Client library. <br  />
+<br  />
+ </p><table class="markdownTable">
+<tr class="markdownTableHead">
+<th class="markdownTableHeadNone">Name   </th><th class="markdownTableHeadCenter">Effect    </th></tr>
+<tr class="markdownTableRowOdd">
+<td class="markdownTableBodyNone"><b><code>NATS_DEFAULT_TO_LIB_MSG_DELIVERY</code></b>   </td><td class="markdownTableBodyCenter">On <a class="el" href="group__library_group.html#ga4a26d4caecb23348f6eee862c95fee7d" title="Initializes the library.">nats_Open</a>, the library looks for this environment variable. If set (to any value), the library will default to using a global thread pool to perform message delivery. See <a class="el" href="group__opts_group.html#gabf060c92648b50c069f0abe7cbb06f1c" title="Switch on/off the use of a central message delivery thread pool.">natsOptions_UseGlobalMessageDelivery</a> and <a class="el" href="group__library_group.html#gab21e94ce7a7d226611ea2c05914cf19d" title="Sets the maximum size of the global message delivery thread pool.">nats_SetMessageDeliveryPoolSize</a>.   </td></tr>
+</table>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__func_group.html b/doc/html/group__func_group.html
new file mode 100644 (file)
index 0000000..a9ff622
--- /dev/null
@@ -0,0 +1,147 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Functions</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__func_group.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#groups">Modules</a>  </div>
+  <div class="headertitle"><div class="title">Functions</div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="groups" name="groups"></a>
+Modules</h2></td></tr>
+<tr class="memitem:group__library_group"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__library_group.html">Library</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:group__status_group"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__status_group.html">Status</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:group__stats_group"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stats_group.html">Statistics</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:group__opts_group"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html">Options</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:group__stan_conn_opts_group"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_opts_group.html">Streaming Connection Options</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:group__stan_sub_opts_group"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_opts_group.html">Streaming Subscription Options</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:group__inbox_group"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__inbox_group.html">Inboxes</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:group__msg_group"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msg_group.html">Message</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:group__stan_msg_group"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_msg_group.html">Streaming Message</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:group__conn_group"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_group.html">Connection</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:group__sub_group"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html">Subscription</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:group__stan_conn_group"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_group.html">Streaming Connection</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:group__stan_sub_group"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_group.html">Streaming Subscription</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:group__js_group"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_group.html">JetStream</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:group__kv_group"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html">KeyValue store</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<p >NATS Functions. </p>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__func_group.js b/doc/html/group__func_group.js
new file mode 100644 (file)
index 0000000..02a820e
--- /dev/null
@@ -0,0 +1,18 @@
+var group__func_group =
+[
+    [ "Library", "group__library_group.html", "group__library_group" ],
+    [ "Status", "group__status_group.html", "group__status_group" ],
+    [ "Statistics", "group__stats_group.html", "group__stats_group" ],
+    [ "Options", "group__opts_group.html", "group__opts_group" ],
+    [ "Streaming Connection Options", "group__stan_conn_opts_group.html", "group__stan_conn_opts_group" ],
+    [ "Streaming Subscription Options", "group__stan_sub_opts_group.html", "group__stan_sub_opts_group" ],
+    [ "Inboxes", "group__inbox_group.html", "group__inbox_group" ],
+    [ "Message", "group__msg_group.html", "group__msg_group" ],
+    [ "Streaming Message", "group__stan_msg_group.html", "group__stan_msg_group" ],
+    [ "Connection", "group__conn_group.html", "group__conn_group" ],
+    [ "Subscription", "group__sub_group.html", "group__sub_group" ],
+    [ "Streaming Connection", "group__stan_conn_group.html", "group__stan_conn_group" ],
+    [ "Streaming Subscription", "group__stan_sub_group.html", "group__stan_sub_group" ],
+    [ "JetStream", "group__js_group.html", "group__js_group" ],
+    [ "KeyValue store", "group__kv_group.html", "group__kv_group" ]
+];
\ No newline at end of file
diff --git a/doc/html/group__inbox_group.html b/doc/html/group__inbox_group.html
new file mode 100644 (file)
index 0000000..85a7506
--- /dev/null
@@ -0,0 +1,176 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Inboxes</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__inbox_group.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle"><div class="title">Inboxes<div class="ingroups"><a class="el" href="group__func_group.html">Functions</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:gaa1ec779a0b7ead54b78da05533848b6d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__inbox_group.html#gaa1ec779a0b7ead54b78da05533848b6d">natsInbox_Create</a> (<a class="el" href="group__types_group.html#ga206c3d4d6f4f6f96fd2cae53a3df31c1">natsInbox</a> **newInbox)</td></tr>
+<tr class="memdesc:gaa1ec779a0b7ead54b78da05533848b6d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates an inbox.  <a href="group__inbox_group.html#gaa1ec779a0b7ead54b78da05533848b6d">More...</a><br /></td></tr>
+<tr class="separator:gaa1ec779a0b7ead54b78da05533848b6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gabd6444fb8f28afb9c2b6645945f46cfe"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__inbox_group.html#gabd6444fb8f28afb9c2b6645945f46cfe">natsInbox_Destroy</a> (<a class="el" href="group__types_group.html#ga206c3d4d6f4f6f96fd2cae53a3df31c1">natsInbox</a> *inbox)</td></tr>
+<tr class="memdesc:gabd6444fb8f28afb9c2b6645945f46cfe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the inbox.  <a href="group__inbox_group.html#gabd6444fb8f28afb9c2b6645945f46cfe">More...</a><br /></td></tr>
+<tr class="separator:gabd6444fb8f28afb9c2b6645945f46cfe"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<p >NATS Inboxes. </p>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="gaa1ec779a0b7ead54b78da05533848b6d" name="gaa1ec779a0b7ead54b78da05533848b6d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaa1ec779a0b7ead54b78da05533848b6d">&#9670;&#160;</a></span>natsInbox_Create()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsInbox_Create </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga206c3d4d6f4f6f96fd2cae53a3df31c1">natsInbox</a> **&#160;</td>
+          <td class="paramname"><em>newInbox</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns an inbox string which can be used for directed replies from subscribers. These are guaranteed to be unique, but can be shared and subscribed to by others.</p>
+<dl class="section note"><dt>Note</dt><dd>The inbox needs to be destroyed when no longer needed.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__inbox_group.html#gabd6444fb8f28afb9c2b6645945f46cfe" title="Destroys the inbox.">natsInbox_Destroy()</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">newInbox</td><td>the location where to store a pointer to the newly created <a class="el" href="group__types_group.html#ga206c3d4d6f4f6f96fd2cae53a3df31c1" title="Unique subject often used for point-to-point communication.">natsInbox</a>. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gabd6444fb8f28afb9c2b6645945f46cfe" name="gabd6444fb8f28afb9c2b6645945f46cfe"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gabd6444fb8f28afb9c2b6645945f46cfe">&#9670;&#160;</a></span>natsInbox_Destroy()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void natsInbox_Destroy </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga206c3d4d6f4f6f96fd2cae53a3df31c1">natsInbox</a> *&#160;</td>
+          <td class="paramname"><em>inbox</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Destroys the inbox.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">inbox</td><td>the pointer to the <a class="el" href="group__types_group.html#ga206c3d4d6f4f6f96fd2cae53a3df31c1" title="Unique subject often used for point-to-point communication.">natsInbox</a> object to destroy. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__inbox_group.js b/doc/html/group__inbox_group.js
new file mode 100644 (file)
index 0000000..bf52e65
--- /dev/null
@@ -0,0 +1,5 @@
+var group__inbox_group =
+[
+    [ "natsInbox_Create", "group__inbox_group.html#gaa1ec779a0b7ead54b78da05533848b6d", null ],
+    [ "natsInbox_Destroy", "group__inbox_group.html#gabd6444fb8f28afb9c2b6645945f46cfe", null ]
+];
\ No newline at end of file
diff --git a/doc/html/group__js_assets_group.html b/doc/html/group__js_assets_group.html
new file mode 100644 (file)
index 0000000..326cb9f
--- /dev/null
@@ -0,0 +1,1707 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: JetStream Assets Management</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__js_assets_group.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle"><div class="title">JetStream Assets Management<div class="ingroups"><a class="el" href="group__func_group.html">Functions</a> &raquo; <a class="el" href="group__js_group.html">JetStream</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:gac230f71dbdc4d10bc7471d01763881d6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#gac230f71dbdc4d10bc7471d01763881d6">jsStreamConfig_Init</a> (<a class="el" href="structjs_stream_config.html">jsStreamConfig</a> *cfg)</td></tr>
+<tr class="memdesc:gac230f71dbdc4d10bc7471d01763881d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a streaming configuration structure.  <a href="group__js_assets_group.html#gac230f71dbdc4d10bc7471d01763881d6">More...</a><br /></td></tr>
+<tr class="separator:gac230f71dbdc4d10bc7471d01763881d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga223691e6831072a0b8f8103a778293b0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga223691e6831072a0b8f8103a778293b0">jsPlacement_Init</a> (<a class="el" href="structjs_placement.html">jsPlacement</a> *placement)</td></tr>
+<tr class="memdesc:ga223691e6831072a0b8f8103a778293b0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a placement configuration structure.  <a href="group__js_assets_group.html#ga223691e6831072a0b8f8103a778293b0">More...</a><br /></td></tr>
+<tr class="separator:ga223691e6831072a0b8f8103a778293b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga7fe8e0bf98a38eb59372e7cd78aaaf56"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga7fe8e0bf98a38eb59372e7cd78aaaf56">jsStreamSource_Init</a> (<a class="el" href="structjs_stream_source.html">jsStreamSource</a> *source)</td></tr>
+<tr class="memdesc:ga7fe8e0bf98a38eb59372e7cd78aaaf56"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a stream source configuration structure.  <a href="group__js_assets_group.html#ga7fe8e0bf98a38eb59372e7cd78aaaf56">More...</a><br /></td></tr>
+<tr class="separator:ga7fe8e0bf98a38eb59372e7cd78aaaf56"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga81aebebcd79922104720da51e95020d4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga81aebebcd79922104720da51e95020d4">jsExternalStream_Init</a> (<a class="el" href="structjs_external_stream.html">jsExternalStream</a> *external)</td></tr>
+<tr class="memdesc:ga81aebebcd79922104720da51e95020d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes an external stream configuration structure.  <a href="group__js_assets_group.html#ga81aebebcd79922104720da51e95020d4">More...</a><br /></td></tr>
+<tr class="separator:ga81aebebcd79922104720da51e95020d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga388bfeaa5a78ebf6ce7c15c6e3a7156b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga388bfeaa5a78ebf6ce7c15c6e3a7156b">jsRePublish_Init</a> (<a class="el" href="structjs_re_publish.html">jsRePublish</a> *rp)</td></tr>
+<tr class="memdesc:ga388bfeaa5a78ebf6ce7c15c6e3a7156b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a republish structure.  <a href="group__js_assets_group.html#ga388bfeaa5a78ebf6ce7c15c6e3a7156b">More...</a><br /></td></tr>
+<tr class="separator:ga388bfeaa5a78ebf6ce7c15c6e3a7156b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga5efc5136d33ba52161e6732f88f1ee75"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga5efc5136d33ba52161e6732f88f1ee75">js_AddStream</a> (<a class="el" href="structjs_stream_info.html">jsStreamInfo</a> **si, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="el" href="structjs_stream_config.html">jsStreamConfig</a> *cfg, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:ga5efc5136d33ba52161e6732f88f1ee75"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a stream.  <a href="group__js_assets_group.html#ga5efc5136d33ba52161e6732f88f1ee75">More...</a><br /></td></tr>
+<tr class="separator:ga5efc5136d33ba52161e6732f88f1ee75"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga75a5c44304e24481c67e17fbccc15c31"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga75a5c44304e24481c67e17fbccc15c31">js_UpdateStream</a> (<a class="el" href="structjs_stream_info.html">jsStreamInfo</a> **si, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="el" href="structjs_stream_config.html">jsStreamConfig</a> *cfg, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:ga75a5c44304e24481c67e17fbccc15c31"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates a stream.  <a href="group__js_assets_group.html#ga75a5c44304e24481c67e17fbccc15c31">More...</a><br /></td></tr>
+<tr class="separator:ga75a5c44304e24481c67e17fbccc15c31"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga5a6a886c18a79caa403908bf7f7ef125"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga5a6a886c18a79caa403908bf7f7ef125">js_PurgeStream</a> (<a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *stream, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:ga5a6a886c18a79caa403908bf7f7ef125"><td class="mdescLeft">&#160;</td><td class="mdescRight">Purges a stream.  <a href="group__js_assets_group.html#ga5a6a886c18a79caa403908bf7f7ef125">More...</a><br /></td></tr>
+<tr class="separator:ga5a6a886c18a79caa403908bf7f7ef125"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga397e55a0b3b6d36c9bf746eee3842172"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga397e55a0b3b6d36c9bf746eee3842172">js_DeleteStream</a> (<a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *stream, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:ga397e55a0b3b6d36c9bf746eee3842172"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deletes a stream.  <a href="group__js_assets_group.html#ga397e55a0b3b6d36c9bf746eee3842172">More...</a><br /></td></tr>
+<tr class="separator:ga397e55a0b3b6d36c9bf746eee3842172"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga9fe289ae172f83e53ca1b1b747744c1f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga9fe289ae172f83e53ca1b1b747744c1f">js_GetMsg</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **msg, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *stream, uint64_t seq, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:ga9fe289ae172f83e53ca1b1b747744c1f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves a JetStream message from the stream by sequence.  <a href="group__js_assets_group.html#ga9fe289ae172f83e53ca1b1b747744c1f">More...</a><br /></td></tr>
+<tr class="separator:ga9fe289ae172f83e53ca1b1b747744c1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga6835b53da27d5721eddb3698e582cf0c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga6835b53da27d5721eddb3698e582cf0c">js_GetLastMsg</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **msg, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *stream, const char *subject, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:ga6835b53da27d5721eddb3698e582cf0c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the last JetStream message from the stream for a given subject.  <a href="group__js_assets_group.html#ga6835b53da27d5721eddb3698e582cf0c">More...</a><br /></td></tr>
+<tr class="separator:ga6835b53da27d5721eddb3698e582cf0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga8d835d47aed9c84ce3b8dcfea469f4cb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga8d835d47aed9c84ce3b8dcfea469f4cb">jsDirectGetMsgOptions_Init</a> (<a class="el" href="structjs_direct_get_msg_options.html">jsDirectGetMsgOptions</a> *opts)</td></tr>
+<tr class="memdesc:ga8d835d47aed9c84ce3b8dcfea469f4cb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a direct get message options structure.  <a href="group__js_assets_group.html#ga8d835d47aed9c84ce3b8dcfea469f4cb">More...</a><br /></td></tr>
+<tr class="separator:ga8d835d47aed9c84ce3b8dcfea469f4cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga62c250cecc650b1eed0fa1691893e2ae"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga62c250cecc650b1eed0fa1691893e2ae">js_DirectGetMsg</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **msg, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *stream, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="structjs_direct_get_msg_options.html">jsDirectGetMsgOptions</a> *dgOpts)</td></tr>
+<tr class="memdesc:ga62c250cecc650b1eed0fa1691893e2ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves directly a JetStream message based on provided options.  <a href="group__js_assets_group.html#ga62c250cecc650b1eed0fa1691893e2ae">More...</a><br /></td></tr>
+<tr class="separator:ga62c250cecc650b1eed0fa1691893e2ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaeba5d45abbe811c0e40830c5f26c78fd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#gaeba5d45abbe811c0e40830c5f26c78fd">js_DeleteMsg</a> (<a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *stream, uint64_t seq, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:gaeba5d45abbe811c0e40830c5f26c78fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deletes a message from the stream.  <a href="group__js_assets_group.html#gaeba5d45abbe811c0e40830c5f26c78fd">More...</a><br /></td></tr>
+<tr class="separator:gaeba5d45abbe811c0e40830c5f26c78fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga7158f73e183462e9a15e9802e1746ff0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga7158f73e183462e9a15e9802e1746ff0">js_EraseMsg</a> (<a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *stream, uint64_t seq, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:ga7158f73e183462e9a15e9802e1746ff0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Erases a message from the stream.  <a href="group__js_assets_group.html#ga7158f73e183462e9a15e9802e1746ff0">More...</a><br /></td></tr>
+<tr class="separator:ga7158f73e183462e9a15e9802e1746ff0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga94cb23a35516b7779de28fcbb263180a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga94cb23a35516b7779de28fcbb263180a">js_GetStreamInfo</a> (<a class="el" href="structjs_stream_info.html">jsStreamInfo</a> **si, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *stream, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:ga94cb23a35516b7779de28fcbb263180a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retreives information from a stream.  <a href="group__js_assets_group.html#ga94cb23a35516b7779de28fcbb263180a">More...</a><br /></td></tr>
+<tr class="separator:ga94cb23a35516b7779de28fcbb263180a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga8ee87ef86e94be42685941abe9638bbd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga8ee87ef86e94be42685941abe9638bbd">jsStreamInfo_Destroy</a> (<a class="el" href="structjs_stream_info.html">jsStreamInfo</a> *si)</td></tr>
+<tr class="memdesc:ga8ee87ef86e94be42685941abe9638bbd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the stream information object.  <a href="group__js_assets_group.html#ga8ee87ef86e94be42685941abe9638bbd">More...</a><br /></td></tr>
+<tr class="separator:ga8ee87ef86e94be42685941abe9638bbd"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga531d91de372f0dffb8d64abecf88b0c0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga531d91de372f0dffb8d64abecf88b0c0">js_Streams</a> (<a class="el" href="structjs_stream_info_list.html">jsStreamInfoList</a> **list, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:ga531d91de372f0dffb8d64abecf88b0c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the list of all available streams.  <a href="group__js_assets_group.html#ga531d91de372f0dffb8d64abecf88b0c0">More...</a><br /></td></tr>
+<tr class="separator:ga531d91de372f0dffb8d64abecf88b0c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga38cdcc339eb8976d23296b99aa37d629"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga38cdcc339eb8976d23296b99aa37d629">jsStreamInfoList_Destroy</a> (<a class="el" href="structjs_stream_info_list.html">jsStreamInfoList</a> *list)</td></tr>
+<tr class="memdesc:ga38cdcc339eb8976d23296b99aa37d629"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the stream information list object.  <a href="group__js_assets_group.html#ga38cdcc339eb8976d23296b99aa37d629">More...</a><br /></td></tr>
+<tr class="separator:ga38cdcc339eb8976d23296b99aa37d629"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gac3dfc87863dbbb3c959ecde4bce905bc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#gac3dfc87863dbbb3c959ecde4bce905bc">js_StreamNames</a> (<a class="el" href="structjs_stream_names_list.html">jsStreamNamesList</a> **list, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:gac3dfc87863dbbb3c959ecde4bce905bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the list of all available stream names.  <a href="group__js_assets_group.html#gac3dfc87863dbbb3c959ecde4bce905bc">More...</a><br /></td></tr>
+<tr class="separator:gac3dfc87863dbbb3c959ecde4bce905bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf8644f281d4e24893a6a170b4f7faa65"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#gaf8644f281d4e24893a6a170b4f7faa65">jsStreamNamesList_Destroy</a> (<a class="el" href="structjs_stream_names_list.html">jsStreamNamesList</a> *list)</td></tr>
+<tr class="memdesc:gaf8644f281d4e24893a6a170b4f7faa65"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the stream names list object.  <a href="group__js_assets_group.html#gaf8644f281d4e24893a6a170b4f7faa65">More...</a><br /></td></tr>
+<tr class="separator:gaf8644f281d4e24893a6a170b4f7faa65"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga3381bb05c05bf4a8979adde68d37dd66"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga3381bb05c05bf4a8979adde68d37dd66">jsConsumerConfig_Init</a> (<a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a> *cc)</td></tr>
+<tr class="memdesc:ga3381bb05c05bf4a8979adde68d37dd66"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a consumer configuration structure.  <a href="group__js_assets_group.html#ga3381bb05c05bf4a8979adde68d37dd66">More...</a><br /></td></tr>
+<tr class="separator:ga3381bb05c05bf4a8979adde68d37dd66"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf2efb63db150e782d9007090b49d4115"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#gaf2efb63db150e782d9007090b49d4115">js_AddConsumer</a> (<a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a> **ci, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *stream, <a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a> *cfg, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:gaf2efb63db150e782d9007090b49d4115"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds a JetStream consumer.  <a href="group__js_assets_group.html#gaf2efb63db150e782d9007090b49d4115">More...</a><br /></td></tr>
+<tr class="separator:gaf2efb63db150e782d9007090b49d4115"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gad13ec256e24710bb237995814871e554"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#gad13ec256e24710bb237995814871e554">js_UpdateConsumer</a> (<a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a> **ci, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *stream, <a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a> *cfg, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:gad13ec256e24710bb237995814871e554"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates a JetStream consumer.  <a href="group__js_assets_group.html#gad13ec256e24710bb237995814871e554">More...</a><br /></td></tr>
+<tr class="separator:gad13ec256e24710bb237995814871e554"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2dda04757b4ab27a794b64f8d727fe23"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga2dda04757b4ab27a794b64f8d727fe23">js_GetConsumerInfo</a> (<a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a> **ci, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *stream, const char *consumer, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:ga2dda04757b4ab27a794b64f8d727fe23"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves information about a consumer.  <a href="group__js_assets_group.html#ga2dda04757b4ab27a794b64f8d727fe23">More...</a><br /></td></tr>
+<tr class="separator:ga2dda04757b4ab27a794b64f8d727fe23"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga52fbc61759b11494db91f348a733c490"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga52fbc61759b11494db91f348a733c490">js_DeleteConsumer</a> (<a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *stream, const char *consumer, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:ga52fbc61759b11494db91f348a733c490"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deletes a consumer.  <a href="group__js_assets_group.html#ga52fbc61759b11494db91f348a733c490">More...</a><br /></td></tr>
+<tr class="separator:ga52fbc61759b11494db91f348a733c490"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga9c1d5ed2f24ba836c10e415231f80088"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga9c1d5ed2f24ba836c10e415231f80088">jsConsumerInfo_Destroy</a> (<a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a> *ci)</td></tr>
+<tr class="memdesc:ga9c1d5ed2f24ba836c10e415231f80088"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the consumer information object.  <a href="group__js_assets_group.html#ga9c1d5ed2f24ba836c10e415231f80088">More...</a><br /></td></tr>
+<tr class="separator:ga9c1d5ed2f24ba836c10e415231f80088"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf28097ede3e9ba9926fb00856e63ffd9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#gaf28097ede3e9ba9926fb00856e63ffd9">js_Consumers</a> (<a class="el" href="structjs_consumer_info_list.html">jsConsumerInfoList</a> **list, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *stream, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:gaf28097ede3e9ba9926fb00856e63ffd9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the list of all available consumers for a stream.  <a href="group__js_assets_group.html#gaf28097ede3e9ba9926fb00856e63ffd9">More...</a><br /></td></tr>
+<tr class="separator:gaf28097ede3e9ba9926fb00856e63ffd9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga421de40d8e91658353111c3f2ea90ec8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga421de40d8e91658353111c3f2ea90ec8">jsConsumerInfoList_Destroy</a> (<a class="el" href="structjs_consumer_info_list.html">jsConsumerInfoList</a> *list)</td></tr>
+<tr class="memdesc:ga421de40d8e91658353111c3f2ea90ec8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the consumer information list object.  <a href="group__js_assets_group.html#ga421de40d8e91658353111c3f2ea90ec8">More...</a><br /></td></tr>
+<tr class="separator:ga421de40d8e91658353111c3f2ea90ec8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga690d19af55d12b82c8523d1861cef8d0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga690d19af55d12b82c8523d1861cef8d0">js_ConsumerNames</a> (<a class="el" href="structjs_consumer_names_list.html">jsConsumerNamesList</a> **list, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *stream, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:ga690d19af55d12b82c8523d1861cef8d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the list of all available consumer names for a stream.  <a href="group__js_assets_group.html#ga690d19af55d12b82c8523d1861cef8d0">More...</a><br /></td></tr>
+<tr class="separator:ga690d19af55d12b82c8523d1861cef8d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2ced0d190131460bf4608ab893dffc50"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga2ced0d190131460bf4608ab893dffc50">jsConsumerNamesList_Destroy</a> (<a class="el" href="structjs_consumer_names_list.html">jsConsumerNamesList</a> *list)</td></tr>
+<tr class="memdesc:ga2ced0d190131460bf4608ab893dffc50"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the consumer names list object.  <a href="group__js_assets_group.html#ga2ced0d190131460bf4608ab893dffc50">More...</a><br /></td></tr>
+<tr class="separator:ga2ced0d190131460bf4608ab893dffc50"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gac8965dcfc6b465fbc323aa552c606c46"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#gac8965dcfc6b465fbc323aa552c606c46">js_GetAccountInfo</a> (<a class="el" href="structjs_account_info.html">jsAccountInfo</a> **ai, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:gac8965dcfc6b465fbc323aa552c606c46"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves information about the JetStream usage from an account.  <a href="group__js_assets_group.html#gac8965dcfc6b465fbc323aa552c606c46">More...</a><br /></td></tr>
+<tr class="separator:gac8965dcfc6b465fbc323aa552c606c46"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga7c8664b38fcce8497746367d35e5f60b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga7c8664b38fcce8497746367d35e5f60b">jsAccountInfo_Destroy</a> (<a class="el" href="structjs_account_info.html">jsAccountInfo</a> *ai)</td></tr>
+<tr class="memdesc:ga7c8664b38fcce8497746367d35e5f60b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the account information object.  <a href="group__js_assets_group.html#ga7c8664b38fcce8497746367d35e5f60b">More...</a><br /></td></tr>
+<tr class="separator:ga7c8664b38fcce8497746367d35e5f60b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<p >JetStream Assets Management </p>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="gac230f71dbdc4d10bc7471d01763881d6" name="gac230f71dbdc4d10bc7471d01763881d6"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gac230f71dbdc4d10bc7471d01763881d6">&#9670;&#160;</a></span>jsStreamConfig_Init()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> jsStreamConfig_Init </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a> *&#160;</td>
+          <td class="paramname"><em>cfg</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Use this before setting specific stream configuration options and passing this configuration to some of the stream management APIs.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">cfg</td><td>the pointer to the <a class="el" href="structjs_stream_config.html">jsStreamConfig</a> to initialize. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga223691e6831072a0b8f8103a778293b0" name="ga223691e6831072a0b8f8103a778293b0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga223691e6831072a0b8f8103a778293b0">&#9670;&#160;</a></span>jsPlacement_Init()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> jsPlacement_Init </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_placement.html">jsPlacement</a> *&#160;</td>
+          <td class="paramname"><em>placement</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Use this before setting specific stream placement options.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">placement</td><td>the pointer to the <a class="el" href="structjs_placement.html">jsPlacement</a> to initialize. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga7fe8e0bf98a38eb59372e7cd78aaaf56" name="ga7fe8e0bf98a38eb59372e7cd78aaaf56"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga7fe8e0bf98a38eb59372e7cd78aaaf56">&#9670;&#160;</a></span>jsStreamSource_Init()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> jsStreamSource_Init </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_stream_source.html">jsStreamSource</a> *&#160;</td>
+          <td class="paramname"><em>source</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Use this before setting specific stream source options.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">source</td><td>the pointer to the <a class="el" href="structjs_stream_source.html">jsStreamSource</a> to initialize. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga81aebebcd79922104720da51e95020d4" name="ga81aebebcd79922104720da51e95020d4"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga81aebebcd79922104720da51e95020d4">&#9670;&#160;</a></span>jsExternalStream_Init()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> jsExternalStream_Init </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_external_stream.html">jsExternalStream</a> *&#160;</td>
+          <td class="paramname"><em>external</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Use this before setting specific external stream options.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">external</td><td>the pointer to the <a class="el" href="structjs_external_stream.html">jsExternalStream</a> to initialize. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga388bfeaa5a78ebf6ce7c15c6e3a7156b" name="ga388bfeaa5a78ebf6ce7c15c6e3a7156b"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga388bfeaa5a78ebf6ce7c15c6e3a7156b">&#9670;&#160;</a></span>jsRePublish_Init()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> jsRePublish_Init </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_re_publish.html">jsRePublish</a> *&#160;</td>
+          <td class="paramname"><em>rp</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Use this to set the source, destination and/or headers only for a stream re-publish.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">rp</td><td>the pointer to the <a class="el" href="structjs_re_publish.html">jsRePublish</a> to initialize. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga5efc5136d33ba52161e6732f88f1ee75" name="ga5efc5136d33ba52161e6732f88f1ee75"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga5efc5136d33ba52161e6732f88f1ee75">&#9670;&#160;</a></span>js_AddStream()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> js_AddStream </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_stream_info.html">jsStreamInfo</a> **&#160;</td>
+          <td class="paramname"><em>si</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *&#160;</td>
+          <td class="paramname"><em>js</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a> *&#160;</td>
+          <td class="paramname"><em>cfg</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_options.html">jsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *&#160;</td>
+          <td class="paramname"><em>errCode</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Creates a stream based on the provided configuration (that cannot be <code>NULL</code>). The name is mandatory and cannot contain <code>.</code> characters.</p>
+<dl class="section note"><dt>Note</dt><dd>If you do not need a <a class="el" href="structjs_stream_info.html">jsStreamInfo</a> to be returned, you can pass <code>NULL</code>, otherwise, on success you are responsible for freeing this object.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__js_assets_group.html#gac230f71dbdc4d10bc7471d01763881d6" title="Initializes a streaming configuration structure.">jsStreamConfig_Init</a> </dd>
+<dd>
+<a class="el" href="group__js_assets_group.html#ga8ee87ef86e94be42685941abe9638bbd" title="Destroys the stream information object.">jsStreamInfo_Destroy</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">si</td><td>the location where to store the pointer to the new <a class="el" href="structjs_stream_info.html">jsStreamInfo</a> object in response to the creation request, or <code>NULL</code> if the stream information is not needed. </td></tr>
+    <tr><td class="paramname">js</td><td>the pointer to the <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> context. </td></tr>
+    <tr><td class="paramname">cfg</td><td>the pointer to the <a class="el" href="structjs_stream_config.html">jsStreamConfig</a>. </td></tr>
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structjs_options.html">jsOptions</a> object, possibly <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">errCode</td><td>the location where to store the JetStream specific error code, or <code>NULL</code> if not needed. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga75a5c44304e24481c67e17fbccc15c31" name="ga75a5c44304e24481c67e17fbccc15c31"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga75a5c44304e24481c67e17fbccc15c31">&#9670;&#160;</a></span>js_UpdateStream()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> js_UpdateStream </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_stream_info.html">jsStreamInfo</a> **&#160;</td>
+          <td class="paramname"><em>si</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *&#160;</td>
+          <td class="paramname"><em>js</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a> *&#160;</td>
+          <td class="paramname"><em>cfg</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_options.html">jsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *&#160;</td>
+          <td class="paramname"><em>errCode</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Updates a stream based on the provided configuration (that cannot be <code>NULL</code>). The name is mandatory and cannot contain <code>.</code> characters.</p>
+<dl class="section note"><dt>Note</dt><dd>If you do not need a <a class="el" href="structjs_stream_info.html">jsStreamInfo</a> to be returned, you can pass <code>NULL</code>, otherwise, on success you are responsible for freeing this object.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__js_assets_group.html#gac230f71dbdc4d10bc7471d01763881d6" title="Initializes a streaming configuration structure.">jsStreamConfig_Init</a> </dd>
+<dd>
+<a class="el" href="group__js_assets_group.html#ga8ee87ef86e94be42685941abe9638bbd" title="Destroys the stream information object.">jsStreamInfo_Destroy</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">si</td><td>the location where to store the pointer to the new <a class="el" href="structjs_stream_info.html">jsStreamInfo</a> object in response to the creation request, or <code>NULL</code> if the stream information is not needed. </td></tr>
+    <tr><td class="paramname">js</td><td>the pointer to the <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> context. </td></tr>
+    <tr><td class="paramname">cfg</td><td>the pointer to the <a class="el" href="structjs_stream_config.html">jsStreamConfig</a>. </td></tr>
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structjs_options.html">jsOptions</a> object, possibly <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">errCode</td><td>the location where to store the JetStream specific error code, or <code>NULL</code> if not needed. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga5a6a886c18a79caa403908bf7f7ef125" name="ga5a6a886c18a79caa403908bf7f7ef125"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga5a6a886c18a79caa403908bf7f7ef125">&#9670;&#160;</a></span>js_PurgeStream()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> js_PurgeStream </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *&#160;</td>
+          <td class="paramname"><em>js</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>stream</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_options.html">jsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *&#160;</td>
+          <td class="paramname"><em>errCode</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Purges the stream named <code>stream</code>.</p>
+<p >For more advanced purge options, you can specify them through <a class="el" href="structjs_options.html">jsOptions</a>.</p>
+<div class="fragment"><div class="line">jsOptions        o;</div>
+<div class="line"> </div>
+<div class="line">jsOptions_Init(&amp;o);</div>
+<div class="line">o.Stream.Purge.Subject  = &quot;foo&quot;;</div>
+<div class="line">o.Stream.Purge.Sequence = 4;</div>
+<div class="line"> </div>
+<div class="line">js_PurgeStream(js, &quot;MY_STREAM&quot;, &amp;o, &amp;jerr);</div>
+</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">js</td><td>the pointer to the <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> context. </td></tr>
+    <tr><td class="paramname">stream</td><td>the name of the stream to purge. </td></tr>
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structjs_options.html">jsOptions</a> object, possibly <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">errCode</td><td>the location where to store the JetStream specific error code, or <code>NULL</code> if not needed. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga397e55a0b3b6d36c9bf746eee3842172" name="ga397e55a0b3b6d36c9bf746eee3842172"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga397e55a0b3b6d36c9bf746eee3842172">&#9670;&#160;</a></span>js_DeleteStream()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> js_DeleteStream </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *&#160;</td>
+          <td class="paramname"><em>js</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>stream</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_options.html">jsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *&#160;</td>
+          <td class="paramname"><em>errCode</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Deletes the stream named <code>stream</code>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">js</td><td>the pointer to the <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> context. </td></tr>
+    <tr><td class="paramname">stream</td><td>the name of the stream to delete. </td></tr>
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structjs_options.html">jsOptions</a> object, possibly <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">errCode</td><td>the location where to store the JetStream specific error code, or <code>NULL</code> if not needed. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga9fe289ae172f83e53ca1b1b747744c1f" name="ga9fe289ae172f83e53ca1b1b747744c1f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga9fe289ae172f83e53ca1b1b747744c1f">&#9670;&#160;</a></span>js_GetMsg()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> js_GetMsg </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **&#160;</td>
+          <td class="paramname"><em>msg</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *&#160;</td>
+          <td class="paramname"><em>js</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>stream</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">uint64_t&#160;</td>
+          <td class="paramname"><em>seq</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_options.html">jsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *&#160;</td>
+          <td class="paramname"><em>errCode</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Retrieves a raw stream message stored in JetStream by sequence number.</p>
+<dl class="section note"><dt>Note</dt><dd>The message needs to be destroyed by calling <a class="el" href="group__msg_group.html#ga9e9590018284939f43f60964283f33ae" title="Destroys the message object.">natsMsg_Destroy</a>.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__js_assets_group.html#ga6835b53da27d5721eddb3698e582cf0c" title="Retrieves the last JetStream message from the stream for a given subject.">js_GetLastMsg</a> </dd>
+<dd>
+<a class="el" href="group__msg_group.html#ga9e9590018284939f43f60964283f33ae" title="Destroys the message object.">natsMsg_Destroy</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">msg</td><td>the memory location where the library will store the pointer to the <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a>. </td></tr>
+    <tr><td class="paramname">js</td><td>the pointer to the <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> context. </td></tr>
+    <tr><td class="paramname">stream</td><td>the name of the stream. </td></tr>
+    <tr><td class="paramname">seq</td><td>the sequence in the stream of the message being retrieved. </td></tr>
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structjs_options.html">jsOptions</a> object, possibly <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">errCode</td><td>the location where to store the JetStream specific error code, or <code>NULL</code> if not needed. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga6835b53da27d5721eddb3698e582cf0c" name="ga6835b53da27d5721eddb3698e582cf0c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga6835b53da27d5721eddb3698e582cf0c">&#9670;&#160;</a></span>js_GetLastMsg()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> js_GetLastMsg </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **&#160;</td>
+          <td class="paramname"><em>msg</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *&#160;</td>
+          <td class="paramname"><em>js</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>stream</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>subject</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_options.html">jsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *&#160;</td>
+          <td class="paramname"><em>errCode</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Retrieves the last JetStream message from the stream for a given subject.</p>
+<dl class="section note"><dt>Note</dt><dd>The message needs to be destroyed by calling <a class="el" href="group__msg_group.html#ga9e9590018284939f43f60964283f33ae" title="Destroys the message object.">natsMsg_Destroy</a>.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__js_assets_group.html#ga9fe289ae172f83e53ca1b1b747744c1f" title="Retrieves a JetStream message from the stream by sequence.">js_GetMsg</a> </dd>
+<dd>
+<a class="el" href="group__msg_group.html#ga9e9590018284939f43f60964283f33ae" title="Destroys the message object.">natsMsg_Destroy</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">msg</td><td>the memory location where the library will store the pointer to the <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a>. </td></tr>
+    <tr><td class="paramname">js</td><td>the pointer to the <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> context. </td></tr>
+    <tr><td class="paramname">stream</td><td>the name of the stream. </td></tr>
+    <tr><td class="paramname">subject</td><td>the subject for which the last message is being retrieved. </td></tr>
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structjs_options.html">jsOptions</a> object, possibly <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">errCode</td><td>the location where to store the JetStream specific error code, or <code>NULL</code> if not needed. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga8d835d47aed9c84ce3b8dcfea469f4cb" name="ga8d835d47aed9c84ce3b8dcfea469f4cb"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga8d835d47aed9c84ce3b8dcfea469f4cb">&#9670;&#160;</a></span>jsDirectGetMsgOptions_Init()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> jsDirectGetMsgOptions_Init </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_direct_get_msg_options.html">jsDirectGetMsgOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Use this before setting specific direct get message options and passing it to <a class="el" href="group__js_assets_group.html#ga62c250cecc650b1eed0fa1691893e2ae" title="Retrieves directly a JetStream message based on provided options.">js_DirectGetMsg</a> API.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structjs_direct_get_msg_options.html">jsDirectGetMsgOptions</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga62c250cecc650b1eed0fa1691893e2ae" name="ga62c250cecc650b1eed0fa1691893e2ae"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga62c250cecc650b1eed0fa1691893e2ae">&#9670;&#160;</a></span>js_DirectGetMsg()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> js_DirectGetMsg </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **&#160;</td>
+          <td class="paramname"><em>msg</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *&#160;</td>
+          <td class="paramname"><em>js</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>stream</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_options.html">jsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_direct_get_msg_options.html">jsDirectGetMsgOptions</a> *&#160;</td>
+          <td class="paramname"><em>dgOpts</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >If a stream is created with <code>AllowDirect</code>, it is possible to retrieve a message without going through the leader.</p>
+<p >To specify the options, call <a class="el" href="group__js_assets_group.html#ga8d835d47aed9c84ce3b8dcfea469f4cb" title="Initializes a direct get message options structure.">jsDirectGetMsgOptions_Init</a> first and the set the appropriate options, then invoke this function.</p>
+<dl class="section note"><dt>Note</dt><dd>Some options are mutually exclusive but the library is not doing the check and leave it to the server to do it and return the error returned by the server.</dd>
+<dd>
+This API can only be used against servers that support the direct get feature, which is <code>v2.9.0+</code>. If running against an older server the call will likely timeout.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">msg</td><td>the location where to store the pointer to the retrieved message. </td></tr>
+    <tr><td class="paramname">js</td><td>the pointer to the <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> context. </td></tr>
+    <tr><td class="paramname">stream</td><td>the name of the stream. </td></tr>
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structjs_options.html">jsOptions</a> object, possibly <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">dgOpts</td><td>the pointer to the <a class="el" href="structjs_direct_get_msg_options.html">jsDirectGetMsgOptions</a> object, cannot be <code>NULL</code>. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gaeba5d45abbe811c0e40830c5f26c78fd" name="gaeba5d45abbe811c0e40830c5f26c78fd"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaeba5d45abbe811c0e40830c5f26c78fd">&#9670;&#160;</a></span>js_DeleteMsg()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> js_DeleteMsg </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *&#160;</td>
+          <td class="paramname"><em>js</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>stream</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">uint64_t&#160;</td>
+          <td class="paramname"><em>seq</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_options.html">jsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *&#160;</td>
+          <td class="paramname"><em>errCode</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Deletes the message at sequence <code>seq</code> in the stream named <code>stream</code>.</p>
+<dl class="section note"><dt>Note</dt><dd>To completely erase the content of the deleted message when stored on disk, use <a class="el" href="group__js_assets_group.html#ga7158f73e183462e9a15e9802e1746ff0" title="Erases a message from the stream.">js_EraseMsg</a> instead.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__js_assets_group.html#ga7158f73e183462e9a15e9802e1746ff0" title="Erases a message from the stream.">js_EraseMsg</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">js</td><td>the pointer to the <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> context. </td></tr>
+    <tr><td class="paramname">stream</td><td>the name of the stream. </td></tr>
+    <tr><td class="paramname">seq</td><td>the sequence in the stream of the message to delete. </td></tr>
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structjs_options.html">jsOptions</a> object, possibly <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">errCode</td><td>the location where to store the JetStream specific error code, or <code>NULL</code> if not needed. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga7158f73e183462e9a15e9802e1746ff0" name="ga7158f73e183462e9a15e9802e1746ff0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga7158f73e183462e9a15e9802e1746ff0">&#9670;&#160;</a></span>js_EraseMsg()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> js_EraseMsg </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *&#160;</td>
+          <td class="paramname"><em>js</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>stream</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">uint64_t&#160;</td>
+          <td class="paramname"><em>seq</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_options.html">jsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *&#160;</td>
+          <td class="paramname"><em>errCode</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Similar to <a class="el" href="group__js_assets_group.html#gaeba5d45abbe811c0e40830c5f26c78fd" title="Deletes a message from the stream.">js_DeleteMsg</a> except that the content of the deleted message is erased from stable storage.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__js_assets_group.html#gaeba5d45abbe811c0e40830c5f26c78fd" title="Deletes a message from the stream.">js_DeleteMsg</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">js</td><td>the pointer to the <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> context. </td></tr>
+    <tr><td class="paramname">stream</td><td>the name of the stream. </td></tr>
+    <tr><td class="paramname">seq</td><td>the sequence in the stream of the message to erase. </td></tr>
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structjs_options.html">jsOptions</a> object, possibly <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">errCode</td><td>the location where to store the JetStream specific error code, or <code>NULL</code> if not needed. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga94cb23a35516b7779de28fcbb263180a" name="ga94cb23a35516b7779de28fcbb263180a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga94cb23a35516b7779de28fcbb263180a">&#9670;&#160;</a></span>js_GetStreamInfo()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> js_GetStreamInfo </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_stream_info.html">jsStreamInfo</a> **&#160;</td>
+          <td class="paramname"><em>si</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *&#160;</td>
+          <td class="paramname"><em>js</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>stream</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_options.html">jsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *&#160;</td>
+          <td class="paramname"><em>errCode</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns information about the stream named <code>stream</code>.</p>
+<dl class="section note"><dt>Note</dt><dd>You need to free the returned object.</dd></dl>
+<p>To get some detailed information about deleted messages, set this option:</p>
+<div class="fragment"><div class="line">jsOptions                o;</div>
+<div class="line"> </div>
+<div class="line">jsOptions_Init(&amp;o);</div>
+<div class="line">o.Stream.Info.DeletedDetails = true;</div>
+<div class="line">js_GetStreamInfo(&amp;si, js, &quot;MY_STREAM&quot;, &amp;o, &amp;jerr);</div>
+</div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><a class="el" href="group__js_assets_group.html#ga8ee87ef86e94be42685941abe9638bbd" title="Destroys the stream information object.">jsStreamInfo_Destroy</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">si</td><td>the location where to store the pointer to the new <a class="el" href="structjs_stream_info.html">jsStreamInfo</a> object in response to the creation request. </td></tr>
+    <tr><td class="paramname">js</td><td>the pointer to the <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> context. </td></tr>
+    <tr><td class="paramname">stream</td><td>the name of the stream which information is retrieved. </td></tr>
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structjs_options.html">jsOptions</a> object, possibly <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">errCode</td><td>the location where to store the JetStream specific error code, or <code>NULL</code> if not needed. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga8ee87ef86e94be42685941abe9638bbd" name="ga8ee87ef86e94be42685941abe9638bbd"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga8ee87ef86e94be42685941abe9638bbd">&#9670;&#160;</a></span>jsStreamInfo_Destroy()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void jsStreamInfo_Destroy </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_stream_info.html">jsStreamInfo</a> *&#160;</td>
+          <td class="paramname"><em>si</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Releases memory allocated for this stream information object.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">si</td><td>the pointer to the <a class="el" href="structjs_stream_info.html">jsStreamInfo</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga531d91de372f0dffb8d64abecf88b0c0" name="ga531d91de372f0dffb8d64abecf88b0c0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga531d91de372f0dffb8d64abecf88b0c0">&#9670;&#160;</a></span>js_Streams()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> js_Streams </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_stream_info_list.html">jsStreamInfoList</a> **&#160;</td>
+          <td class="paramname"><em>list</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *&#160;</td>
+          <td class="paramname"><em>js</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_options.html">jsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *&#160;</td>
+          <td class="paramname"><em>errCode</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Retrieves the list of all <a class="el" href="structjs_stream_info.html">jsStreamInfo</a>. It is possible to filter which streams are to be retrieved based on a subject filter.</p>
+<dl class="section warning"><dt>Warning</dt><dd>The list should be destroyed when no longer used by calling <a class="el" href="group__js_assets_group.html#ga38cdcc339eb8976d23296b99aa37d629" title="Destroys the stream information list object.">jsStreamInfoList_Destroy</a>.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">list</td><td>the location where to store the pointer to the new <a class="el" href="structjs_stream_info_list.html">jsStreamInfoList</a> object. </td></tr>
+    <tr><td class="paramname">js</td><td>the pointer to the <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> context. </td></tr>
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structjs_options.html">jsOptions</a> object, possibly <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">errCode</td><td>the location where to store the JetStream specific error code, or <code>NULL</code> if not needed. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga38cdcc339eb8976d23296b99aa37d629" name="ga38cdcc339eb8976d23296b99aa37d629"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga38cdcc339eb8976d23296b99aa37d629">&#9670;&#160;</a></span>jsStreamInfoList_Destroy()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void jsStreamInfoList_Destroy </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_stream_info_list.html">jsStreamInfoList</a> *&#160;</td>
+          <td class="paramname"><em>list</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Releases memory allocated for this stream information list.</p>
+<dl class="section warning"><dt>Warning</dt><dd>All <a class="el" href="structjs_stream_info.html">jsStreamInfo</a> pointers contained in the list will be destroyed by this call.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">list</td><td>the pointer to the <a class="el" href="structjs_stream_info_list.html">jsStreamInfoList</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gac3dfc87863dbbb3c959ecde4bce905bc" name="gac3dfc87863dbbb3c959ecde4bce905bc"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gac3dfc87863dbbb3c959ecde4bce905bc">&#9670;&#160;</a></span>js_StreamNames()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> js_StreamNames </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_stream_names_list.html">jsStreamNamesList</a> **&#160;</td>
+          <td class="paramname"><em>list</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *&#160;</td>
+          <td class="paramname"><em>js</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_options.html">jsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *&#160;</td>
+          <td class="paramname"><em>errCode</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Retrieves the list of all stream names. It is possible to filter which streams are to be retrieved based on a subject filter.</p>
+<dl class="section warning"><dt>Warning</dt><dd>The list should be destroyed when no longer used by calling <a class="el" href="group__js_assets_group.html#gaf8644f281d4e24893a6a170b4f7faa65" title="Destroys the stream names list object.">jsStreamNamesList_Destroy</a>.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">list</td><td>the location where to store the pointer to the new <a class="el" href="structjs_stream_names_list.html">jsStreamNamesList</a> object. </td></tr>
+    <tr><td class="paramname">js</td><td>the pointer to the <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> context. </td></tr>
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structjs_options.html">jsOptions</a> object, possibly <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">errCode</td><td>the location where to store the JetStream specific error code, or <code>NULL</code> if not needed. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gaf8644f281d4e24893a6a170b4f7faa65" name="gaf8644f281d4e24893a6a170b4f7faa65"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaf8644f281d4e24893a6a170b4f7faa65">&#9670;&#160;</a></span>jsStreamNamesList_Destroy()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void jsStreamNamesList_Destroy </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_stream_names_list.html">jsStreamNamesList</a> *&#160;</td>
+          <td class="paramname"><em>list</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Releases memory allocated for this list of stream names.</p>
+<dl class="section warning"><dt>Warning</dt><dd>All string pointers contained in the list will be destroyed by this call.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">list</td><td>the pointer to the <a class="el" href="structjs_stream_names_list.html">jsStreamNamesList</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga3381bb05c05bf4a8979adde68d37dd66" name="ga3381bb05c05bf4a8979adde68d37dd66"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga3381bb05c05bf4a8979adde68d37dd66">&#9670;&#160;</a></span>jsConsumerConfig_Init()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> jsConsumerConfig_Init </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a> *&#160;</td>
+          <td class="paramname"><em>cc</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Use this before adding a consumer.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">cc</td><td>the pointer to the <a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a> to initialize. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gaf2efb63db150e782d9007090b49d4115" name="gaf2efb63db150e782d9007090b49d4115"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaf2efb63db150e782d9007090b49d4115">&#9670;&#160;</a></span>js_AddConsumer()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> js_AddConsumer </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a> **&#160;</td>
+          <td class="paramname"><em>ci</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *&#160;</td>
+          <td class="paramname"><em>js</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>stream</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a> *&#160;</td>
+          <td class="paramname"><em>cfg</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_options.html">jsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *&#160;</td>
+          <td class="paramname"><em>errCode</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Adds a consumer based on the provided configuration (that cannot be <code>NULL</code>).</p>
+<dl class="section note"><dt>Note</dt><dd>If you do not need a <a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a> to be returned, you can pass <code>NULL</code>, otherwise, on success you are responsible for freeing this object.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__js_assets_group.html#ga3381bb05c05bf4a8979adde68d37dd66" title="Initializes a consumer configuration structure.">jsConsumerConfig_Init</a> </dd>
+<dd>
+<a class="el" href="group__js_assets_group.html#ga9c1d5ed2f24ba836c10e415231f80088" title="Destroys the consumer information object.">jsConsumerInfo_Destroy</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">ci</td><td>the location where to store the pointer to the new <a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a> object in response to the creation request, or <code>NULL</code> if the consumer information is not needed. </td></tr>
+    <tr><td class="paramname">js</td><td>the pointer to the <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> context. </td></tr>
+    <tr><td class="paramname">stream</td><td>the name of the stream. </td></tr>
+    <tr><td class="paramname">cfg</td><td>the pointer to the <a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a>. </td></tr>
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structjs_options.html">jsOptions</a> object, possibly <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">errCode</td><td>the location where to store the JetStream specific error code, or <code>NULL</code> if not needed. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gad13ec256e24710bb237995814871e554" name="gad13ec256e24710bb237995814871e554"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gad13ec256e24710bb237995814871e554">&#9670;&#160;</a></span>js_UpdateConsumer()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> js_UpdateConsumer </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a> **&#160;</td>
+          <td class="paramname"><em>ci</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *&#160;</td>
+          <td class="paramname"><em>js</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>stream</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a> *&#160;</td>
+          <td class="paramname"><em>cfg</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_options.html">jsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *&#160;</td>
+          <td class="paramname"><em>errCode</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Updates a consumer based on the provided configuration (that cannot be <code>NULL</code>).</p>
+<dl class="section note"><dt>Note</dt><dd>If you do not need a <a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a> to be returned, you can pass <code>NULL</code>, otherwise, on success you are responsible for freeing this object.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__js_assets_group.html#ga3381bb05c05bf4a8979adde68d37dd66" title="Initializes a consumer configuration structure.">jsConsumerConfig_Init</a> </dd>
+<dd>
+<a class="el" href="group__js_assets_group.html#ga9c1d5ed2f24ba836c10e415231f80088" title="Destroys the consumer information object.">jsConsumerInfo_Destroy</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">ci</td><td>the location where to store the pointer to the new <a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a> object in response to the creation request, or <code>NULL</code> if the consumer information is not needed. </td></tr>
+    <tr><td class="paramname">js</td><td>the pointer to the <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> context. </td></tr>
+    <tr><td class="paramname">stream</td><td>the name of the stream. </td></tr>
+    <tr><td class="paramname">cfg</td><td>the pointer to the <a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a>. </td></tr>
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structjs_options.html">jsOptions</a> object, possibly <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">errCode</td><td>the location where to store the JetStream specific error code, or <code>NULL</code> if not needed. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga2dda04757b4ab27a794b64f8d727fe23" name="ga2dda04757b4ab27a794b64f8d727fe23"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga2dda04757b4ab27a794b64f8d727fe23">&#9670;&#160;</a></span>js_GetConsumerInfo()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> js_GetConsumerInfo </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a> **&#160;</td>
+          <td class="paramname"><em>ci</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *&#160;</td>
+          <td class="paramname"><em>js</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>stream</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>consumer</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_options.html">jsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *&#160;</td>
+          <td class="paramname"><em>errCode</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<dl class="section note"><dt>Note</dt><dd>The returned object should be destroyed using <a class="el" href="group__js_assets_group.html#ga9c1d5ed2f24ba836c10e415231f80088" title="Destroys the consumer information object.">jsConsumerInfo_Destroy</a> in order to free allocated memory.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">ci</td><td>the location where to store the pointer to the new <a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a> object. </td></tr>
+    <tr><td class="paramname">js</td><td>the pointer to the <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> context. </td></tr>
+    <tr><td class="paramname">stream</td><td>the name of the stream. </td></tr>
+    <tr><td class="paramname">consumer</td><td>the name of the consumer. </td></tr>
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structjs_options.html">jsOptions</a> object, possibly <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">errCode</td><td>the location where to store the JetStream specific error code, or <code>NULL</code> if not needed. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga52fbc61759b11494db91f348a733c490" name="ga52fbc61759b11494db91f348a733c490"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga52fbc61759b11494db91f348a733c490">&#9670;&#160;</a></span>js_DeleteConsumer()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> js_DeleteConsumer </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *&#160;</td>
+          <td class="paramname"><em>js</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>stream</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>consumer</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_options.html">jsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *&#160;</td>
+          <td class="paramname"><em>errCode</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Deletes the consumer named <code>consumer</code> from stream named <code>stream</code>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">js</td><td>the pointer to the <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> context. </td></tr>
+    <tr><td class="paramname">stream</td><td>the name of the stream. </td></tr>
+    <tr><td class="paramname">consumer</td><td>the name of the consumer. </td></tr>
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structjs_options.html">jsOptions</a> object, possibly <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">errCode</td><td>the location where to store the JetStream specific error code, or <code>NULL</code> if not needed. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga9c1d5ed2f24ba836c10e415231f80088" name="ga9c1d5ed2f24ba836c10e415231f80088"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga9c1d5ed2f24ba836c10e415231f80088">&#9670;&#160;</a></span>jsConsumerInfo_Destroy()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void jsConsumerInfo_Destroy </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a> *&#160;</td>
+          <td class="paramname"><em>ci</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Releases memory allocated for this consumer information object.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">ci</td><td>the pointer to the <a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gaf28097ede3e9ba9926fb00856e63ffd9" name="gaf28097ede3e9ba9926fb00856e63ffd9"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaf28097ede3e9ba9926fb00856e63ffd9">&#9670;&#160;</a></span>js_Consumers()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> js_Consumers </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_consumer_info_list.html">jsConsumerInfoList</a> **&#160;</td>
+          <td class="paramname"><em>list</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *&#160;</td>
+          <td class="paramname"><em>js</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>stream</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_options.html">jsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *&#160;</td>
+          <td class="paramname"><em>errCode</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Retrieves the list of all <a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a> for a given stream.</p>
+<dl class="section warning"><dt>Warning</dt><dd>The list should be destroyed when no longer used by calling <a class="el" href="group__js_assets_group.html#ga421de40d8e91658353111c3f2ea90ec8" title="Destroys the consumer information list object.">jsConsumerInfoList_Destroy</a>.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">list</td><td>the location where to store the pointer to the new <a class="el" href="structjs_consumer_info_list.html">jsConsumerInfoList</a> object. </td></tr>
+    <tr><td class="paramname">js</td><td>the pointer to the <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> context. </td></tr>
+    <tr><td class="paramname">stream</td><td>the stream name whose consumer list is requested. </td></tr>
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structjs_options.html">jsOptions</a> object, possibly <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">errCode</td><td>the location where to store the JetStream specific error code, or <code>NULL</code> if not needed. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga421de40d8e91658353111c3f2ea90ec8" name="ga421de40d8e91658353111c3f2ea90ec8"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga421de40d8e91658353111c3f2ea90ec8">&#9670;&#160;</a></span>jsConsumerInfoList_Destroy()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void jsConsumerInfoList_Destroy </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_consumer_info_list.html">jsConsumerInfoList</a> *&#160;</td>
+          <td class="paramname"><em>list</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Releases memory allocated for this consumer information list.</p>
+<dl class="section warning"><dt>Warning</dt><dd>All <a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a> pointers contained in the list will be destroyed by this call.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">list</td><td>the pointer to the <a class="el" href="structjs_consumer_info_list.html">jsConsumerInfoList</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga690d19af55d12b82c8523d1861cef8d0" name="ga690d19af55d12b82c8523d1861cef8d0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga690d19af55d12b82c8523d1861cef8d0">&#9670;&#160;</a></span>js_ConsumerNames()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> js_ConsumerNames </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_consumer_names_list.html">jsConsumerNamesList</a> **&#160;</td>
+          <td class="paramname"><em>list</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *&#160;</td>
+          <td class="paramname"><em>js</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>stream</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_options.html">jsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *&#160;</td>
+          <td class="paramname"><em>errCode</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Retrieves the list of all consumer names for a given stream.</p>
+<dl class="section warning"><dt>Warning</dt><dd>The list should be destroyed when no longer used by calling <a class="el" href="group__js_assets_group.html#ga2ced0d190131460bf4608ab893dffc50" title="Destroys the consumer names list object.">jsConsumerNamesList_Destroy</a>.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">list</td><td>the location where to store the pointer to the new <a class="el" href="structjs_consumer_names_list.html">jsConsumerNamesList</a> object. </td></tr>
+    <tr><td class="paramname">js</td><td>the pointer to the <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> context. </td></tr>
+    <tr><td class="paramname">stream</td><td>the stream name whose consumer list is requested. </td></tr>
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structjs_options.html">jsOptions</a> object, possibly <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">errCode</td><td>the location where to store the JetStream specific error code, or <code>NULL</code> if not needed. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga2ced0d190131460bf4608ab893dffc50" name="ga2ced0d190131460bf4608ab893dffc50"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga2ced0d190131460bf4608ab893dffc50">&#9670;&#160;</a></span>jsConsumerNamesList_Destroy()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void jsConsumerNamesList_Destroy </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_consumer_names_list.html">jsConsumerNamesList</a> *&#160;</td>
+          <td class="paramname"><em>list</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Releases memory allocated for this list of consumer names.</p>
+<dl class="section warning"><dt>Warning</dt><dd>All string pointers contained in the list will be destroyed by this call.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">list</td><td>the pointer to the <a class="el" href="structjs_consumer_names_list.html">jsConsumerNamesList</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gac8965dcfc6b465fbc323aa552c606c46" name="gac8965dcfc6b465fbc323aa552c606c46"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gac8965dcfc6b465fbc323aa552c606c46">&#9670;&#160;</a></span>js_GetAccountInfo()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> js_GetAccountInfo </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_account_info.html">jsAccountInfo</a> **&#160;</td>
+          <td class="paramname"><em>ai</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *&#160;</td>
+          <td class="paramname"><em>js</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_options.html">jsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *&#160;</td>
+          <td class="paramname"><em>errCode</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Retrieves information about the JetStream usage from an account.</p>
+<dl class="section note"><dt>Note</dt><dd>The returned object should be destroyed using <a class="el" href="group__js_assets_group.html#ga7c8664b38fcce8497746367d35e5f60b" title="Destroys the account information object.">jsAccountInfo_Destroy</a> in order to free allocated memory.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">ai</td><td>the location where to store the pointer to the new <a class="el" href="structjs_account_info.html">jsAccountInfo</a> object in response to the account information request. </td></tr>
+    <tr><td class="paramname">js</td><td>the pointer to the <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> context. </td></tr>
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structjs_options.html">jsOptions</a> object, possibly <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">errCode</td><td>the location where to store the JetStream specific error code, or <code>NULL</code> if not needed. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga7c8664b38fcce8497746367d35e5f60b" name="ga7c8664b38fcce8497746367d35e5f60b"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga7c8664b38fcce8497746367d35e5f60b">&#9670;&#160;</a></span>jsAccountInfo_Destroy()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void jsAccountInfo_Destroy </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_account_info.html">jsAccountInfo</a> *&#160;</td>
+          <td class="paramname"><em>ai</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Releases memory allocated for this account information object.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">ai</td><td>the pointer to the <a class="el" href="structjs_account_info.html">jsAccountInfo</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__js_assets_group.js b/doc/html/group__js_assets_group.js
new file mode 100644 (file)
index 0000000..4ce908e
--- /dev/null
@@ -0,0 +1,36 @@
+var group__js_assets_group =
+[
+    [ "jsStreamConfig_Init", "group__js_assets_group.html#gac230f71dbdc4d10bc7471d01763881d6", null ],
+    [ "jsPlacement_Init", "group__js_assets_group.html#ga223691e6831072a0b8f8103a778293b0", null ],
+    [ "jsStreamSource_Init", "group__js_assets_group.html#ga7fe8e0bf98a38eb59372e7cd78aaaf56", null ],
+    [ "jsExternalStream_Init", "group__js_assets_group.html#ga81aebebcd79922104720da51e95020d4", null ],
+    [ "jsRePublish_Init", "group__js_assets_group.html#ga388bfeaa5a78ebf6ce7c15c6e3a7156b", null ],
+    [ "js_AddStream", "group__js_assets_group.html#ga5efc5136d33ba52161e6732f88f1ee75", null ],
+    [ "js_UpdateStream", "group__js_assets_group.html#ga75a5c44304e24481c67e17fbccc15c31", null ],
+    [ "js_PurgeStream", "group__js_assets_group.html#ga5a6a886c18a79caa403908bf7f7ef125", null ],
+    [ "js_DeleteStream", "group__js_assets_group.html#ga397e55a0b3b6d36c9bf746eee3842172", null ],
+    [ "js_GetMsg", "group__js_assets_group.html#ga9fe289ae172f83e53ca1b1b747744c1f", null ],
+    [ "js_GetLastMsg", "group__js_assets_group.html#ga6835b53da27d5721eddb3698e582cf0c", null ],
+    [ "jsDirectGetMsgOptions_Init", "group__js_assets_group.html#ga8d835d47aed9c84ce3b8dcfea469f4cb", null ],
+    [ "js_DirectGetMsg", "group__js_assets_group.html#ga62c250cecc650b1eed0fa1691893e2ae", null ],
+    [ "js_DeleteMsg", "group__js_assets_group.html#gaeba5d45abbe811c0e40830c5f26c78fd", null ],
+    [ "js_EraseMsg", "group__js_assets_group.html#ga7158f73e183462e9a15e9802e1746ff0", null ],
+    [ "js_GetStreamInfo", "group__js_assets_group.html#ga94cb23a35516b7779de28fcbb263180a", null ],
+    [ "jsStreamInfo_Destroy", "group__js_assets_group.html#ga8ee87ef86e94be42685941abe9638bbd", null ],
+    [ "js_Streams", "group__js_assets_group.html#ga531d91de372f0dffb8d64abecf88b0c0", null ],
+    [ "jsStreamInfoList_Destroy", "group__js_assets_group.html#ga38cdcc339eb8976d23296b99aa37d629", null ],
+    [ "js_StreamNames", "group__js_assets_group.html#gac3dfc87863dbbb3c959ecde4bce905bc", null ],
+    [ "jsStreamNamesList_Destroy", "group__js_assets_group.html#gaf8644f281d4e24893a6a170b4f7faa65", null ],
+    [ "jsConsumerConfig_Init", "group__js_assets_group.html#ga3381bb05c05bf4a8979adde68d37dd66", null ],
+    [ "js_AddConsumer", "group__js_assets_group.html#gaf2efb63db150e782d9007090b49d4115", null ],
+    [ "js_UpdateConsumer", "group__js_assets_group.html#gad13ec256e24710bb237995814871e554", null ],
+    [ "js_GetConsumerInfo", "group__js_assets_group.html#ga2dda04757b4ab27a794b64f8d727fe23", null ],
+    [ "js_DeleteConsumer", "group__js_assets_group.html#ga52fbc61759b11494db91f348a733c490", null ],
+    [ "jsConsumerInfo_Destroy", "group__js_assets_group.html#ga9c1d5ed2f24ba836c10e415231f80088", null ],
+    [ "js_Consumers", "group__js_assets_group.html#gaf28097ede3e9ba9926fb00856e63ffd9", null ],
+    [ "jsConsumerInfoList_Destroy", "group__js_assets_group.html#ga421de40d8e91658353111c3f2ea90ec8", null ],
+    [ "js_ConsumerNames", "group__js_assets_group.html#ga690d19af55d12b82c8523d1861cef8d0", null ],
+    [ "jsConsumerNamesList_Destroy", "group__js_assets_group.html#ga2ced0d190131460bf4608ab893dffc50", null ],
+    [ "js_GetAccountInfo", "group__js_assets_group.html#gac8965dcfc6b465fbc323aa552c606c46", null ],
+    [ "jsAccountInfo_Destroy", "group__js_assets_group.html#ga7c8664b38fcce8497746367d35e5f60b", null ]
+];
\ No newline at end of file
diff --git a/doc/html/group__js_group.html b/doc/html/group__js_group.html
new file mode 100644 (file)
index 0000000..97697fd
--- /dev/null
@@ -0,0 +1,234 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: JetStream</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__js_group.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#groups">Modules</a> &#124;
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle"><div class="title">JetStream<div class="ingroups"><a class="el" href="group__func_group.html">Functions</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="groups" name="groups"></a>
+Modules</h2></td></tr>
+<tr class="memitem:group__js_assets_group"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html">JetStream Assets Management</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:group__js_pub_group"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_pub_group.html">Publishing</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:group__js_sub_group"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_sub_group.html">Subscribing</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:group__js_msg"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_msg.html">Messages</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:ga855ff9a04888d696785cc5ede96112e4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_group.html#ga855ff9a04888d696785cc5ede96112e4">jsOptions_Init</a> (<a class="el" href="structjs_options.html">jsOptions</a> *opts)</td></tr>
+<tr class="memdesc:ga855ff9a04888d696785cc5ede96112e4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a streaming context options structure.  <a href="group__js_group.html#ga855ff9a04888d696785cc5ede96112e4">More...</a><br /></td></tr>
+<tr class="separator:ga855ff9a04888d696785cc5ede96112e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga8ed08b0fe1074b1e490291f0af2cb03f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_group.html#ga8ed08b0fe1074b1e490291f0af2cb03f">natsConnection_JetStream</a> (<a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> **js, <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <a class="el" href="structjs_options.html">jsOptions</a> *opts)</td></tr>
+<tr class="memdesc:ga8ed08b0fe1074b1e490291f0af2cb03f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a new JetStream context.  <a href="group__js_group.html#ga8ed08b0fe1074b1e490291f0af2cb03f">More...</a><br /></td></tr>
+<tr class="separator:ga8ed08b0fe1074b1e490291f0af2cb03f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gacfa6ce3e60ea540e3331a09a7f3dc856"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_group.html#gacfa6ce3e60ea540e3331a09a7f3dc856">jsCtx_Destroy</a> (<a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js)</td></tr>
+<tr class="memdesc:gacfa6ce3e60ea540e3331a09a7f3dc856"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the JetStream context.  <a href="group__js_group.html#gacfa6ce3e60ea540e3331a09a7f3dc856">More...</a><br /></td></tr>
+<tr class="separator:gacfa6ce3e60ea540e3331a09a7f3dc856"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<p >JetStream. </p>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="ga855ff9a04888d696785cc5ede96112e4" name="ga855ff9a04888d696785cc5ede96112e4"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga855ff9a04888d696785cc5ede96112e4">&#9670;&#160;</a></span>jsOptions_Init()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> jsOptions_Init </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_options.html">jsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Use this before setting specific stream context options and passing it to JetStream APIs.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structjs_options.html">jsOptions</a> to initialize. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga8ed08b0fe1074b1e490291f0af2cb03f" name="ga8ed08b0fe1074b1e490291f0af2cb03f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga8ed08b0fe1074b1e490291f0af2cb03f">&#9670;&#160;</a></span>natsConnection_JetStream()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_JetStream </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> **&#160;</td>
+          <td class="paramname"><em>js</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_options.html">jsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >A JetStream context is used for messaging and assets management.</p>
+<p >Since the underlying NATS connection is used for communication, the NATS connection should stay valid while using the JetStream context. That is, do not close/destroy the NATS connection before destroying the JetStream context.</p>
+<dl class="section note"><dt>Note</dt><dd>When done, the context should be destroyed to release memory.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">js</td><td>the location where to store the pointer to the newly created <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> object. </td></tr>
+    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object from which to get the JetStream context. </td></tr>
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structjs_options.html">jsOptions</a> object, possibly <code>NULL</code>. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gacfa6ce3e60ea540e3331a09a7f3dc856" name="gacfa6ce3e60ea540e3331a09a7f3dc856"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gacfa6ce3e60ea540e3331a09a7f3dc856">&#9670;&#160;</a></span>jsCtx_Destroy()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void jsCtx_Destroy </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *&#160;</td>
+          <td class="paramname"><em>js</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Releases memory used by the context object.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">js</td><td>the pointer to the <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> object to destroy. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__js_group.js b/doc/html/group__js_group.js
new file mode 100644 (file)
index 0000000..0912f51
--- /dev/null
@@ -0,0 +1,10 @@
+var group__js_group =
+[
+    [ "JetStream Assets Management", "group__js_assets_group.html", "group__js_assets_group" ],
+    [ "Publishing", "group__js_pub_group.html", "group__js_pub_group" ],
+    [ "Subscribing", "group__js_sub_group.html", "group__js_sub_group" ],
+    [ "Messages", "group__js_msg.html", "group__js_msg" ],
+    [ "jsOptions_Init", "group__js_group.html#ga855ff9a04888d696785cc5ede96112e4", null ],
+    [ "natsConnection_JetStream", "group__js_group.html#ga8ed08b0fe1074b1e490291f0af2cb03f", null ],
+    [ "jsCtx_Destroy", "group__js_group.html#gacfa6ce3e60ea540e3331a09a7f3dc856", null ]
+];
\ No newline at end of file
diff --git a/doc/html/group__js_msg.html b/doc/html/group__js_msg.html
new file mode 100644 (file)
index 0000000..bba97eb
--- /dev/null
@@ -0,0 +1,496 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Messages</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__js_msg.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle"><div class="title">Messages<div class="ingroups"><a class="el" href="group__func_group.html">Functions</a> &raquo; <a class="el" href="group__js_group.html">JetStream</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:gacf48e59038fab35849e9dc6f8fcf6328"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_msg.html#gacf48e59038fab35849e9dc6f8fcf6328">natsMsg_GetMetaData</a> (<a class="el" href="structjs_msg_meta_data.html">jsMsgMetaData</a> **new_meta, <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg)</td></tr>
+<tr class="memdesc:gacf48e59038fab35849e9dc6f8fcf6328"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns metadata from this JetStream message.  <a href="group__js_msg.html#gacf48e59038fab35849e9dc6f8fcf6328">More...</a><br /></td></tr>
+<tr class="separator:gacf48e59038fab35849e9dc6f8fcf6328"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf9bf92294342bcb27053de7038606d12"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_msg.html#gaf9bf92294342bcb27053de7038606d12">jsMsgMetaData_Destroy</a> (<a class="el" href="structjs_msg_meta_data.html">jsMsgMetaData</a> *meta)</td></tr>
+<tr class="memdesc:gaf9bf92294342bcb27053de7038606d12"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the message metadata object.  <a href="group__js_msg.html#gaf9bf92294342bcb27053de7038606d12">More...</a><br /></td></tr>
+<tr class="separator:gaf9bf92294342bcb27053de7038606d12"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gae454fb7e7097a3cd3362cb49ef8a3c84"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_msg.html#gae454fb7e7097a3cd3362cb49ef8a3c84">natsMsg_Ack</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, <a class="el" href="structjs_options.html">jsOptions</a> *opts)</td></tr>
+<tr class="memdesc:gae454fb7e7097a3cd3362cb49ef8a3c84"><td class="mdescLeft">&#160;</td><td class="mdescRight">Acknowledges a message.  <a href="group__js_msg.html#gae454fb7e7097a3cd3362cb49ef8a3c84">More...</a><br /></td></tr>
+<tr class="separator:gae454fb7e7097a3cd3362cb49ef8a3c84"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gafb899ebf8e89b3a858fe20f7853635a7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_msg.html#gafb899ebf8e89b3a858fe20f7853635a7">natsMsg_AckSync</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:gafb899ebf8e89b3a858fe20f7853635a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Acknowledges a message and wait for a confirmation.  <a href="group__js_msg.html#gafb899ebf8e89b3a858fe20f7853635a7">More...</a><br /></td></tr>
+<tr class="separator:gafb899ebf8e89b3a858fe20f7853635a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gac271b874154301da9759f9ac05768b47"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_msg.html#gac271b874154301da9759f9ac05768b47">natsMsg_Nak</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, <a class="el" href="structjs_options.html">jsOptions</a> *opts)</td></tr>
+<tr class="memdesc:gac271b874154301da9759f9ac05768b47"><td class="mdescLeft">&#160;</td><td class="mdescRight">Negatively acknowledges a message.  <a href="group__js_msg.html#gac271b874154301da9759f9ac05768b47">More...</a><br /></td></tr>
+<tr class="separator:gac271b874154301da9759f9ac05768b47"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gac0697389fa60a3c4725e53cd23ada7bd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_msg.html#gac0697389fa60a3c4725e53cd23ada7bd">natsMsg_NakWithDelay</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, int64_t delay, <a class="el" href="structjs_options.html">jsOptions</a> *opts)</td></tr>
+<tr class="memdesc:gac0697389fa60a3c4725e53cd23ada7bd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Negatively acknowledges a message.  <a href="group__js_msg.html#gac0697389fa60a3c4725e53cd23ada7bd">More...</a><br /></td></tr>
+<tr class="separator:gac0697389fa60a3c4725e53cd23ada7bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gae1e0beb19cd76e2f69e6415c41c9bb39"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_msg.html#gae1e0beb19cd76e2f69e6415c41c9bb39">natsMsg_InProgress</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, <a class="el" href="structjs_options.html">jsOptions</a> *opts)</td></tr>
+<tr class="memdesc:gae1e0beb19cd76e2f69e6415c41c9bb39"><td class="mdescLeft">&#160;</td><td class="mdescRight">Resets redelivery timer on the server.  <a href="group__js_msg.html#gae1e0beb19cd76e2f69e6415c41c9bb39">More...</a><br /></td></tr>
+<tr class="separator:gae1e0beb19cd76e2f69e6415c41c9bb39"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gae84d21e4388255e9d990e53c9f67e7c4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_msg.html#gae84d21e4388255e9d990e53c9f67e7c4">natsMsg_Term</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, <a class="el" href="structjs_options.html">jsOptions</a> *opts)</td></tr>
+<tr class="memdesc:gae84d21e4388255e9d990e53c9f67e7c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Abandon this message.  <a href="group__js_msg.html#gae84d21e4388255e9d990e53c9f67e7c4">More...</a><br /></td></tr>
+<tr class="separator:gae84d21e4388255e9d990e53c9f67e7c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga819be2990ec20b964aa574b5331d7f2e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_msg.html#ga819be2990ec20b964aa574b5331d7f2e">natsMsg_GetSequence</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg)</td></tr>
+<tr class="memdesc:ga819be2990ec20b964aa574b5331d7f2e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the sequence number of this JetStream message.  <a href="group__js_msg.html#ga819be2990ec20b964aa574b5331d7f2e">More...</a><br /></td></tr>
+<tr class="separator:ga819be2990ec20b964aa574b5331d7f2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gab4850497c5481f5ec6eb1fcdb43646f5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_msg.html#gab4850497c5481f5ec6eb1fcdb43646f5">natsMsg_GetTime</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg)</td></tr>
+<tr class="memdesc:gab4850497c5481f5ec6eb1fcdb43646f5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the timestamp (in UTC) of this JetStream message.  <a href="group__js_msg.html#gab4850497c5481f5ec6eb1fcdb43646f5">More...</a><br /></td></tr>
+<tr class="separator:gab4850497c5481f5ec6eb1fcdb43646f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<p >Function specific to JetStream messages </p>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="gacf48e59038fab35849e9dc6f8fcf6328" name="gacf48e59038fab35849e9dc6f8fcf6328"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gacf48e59038fab35849e9dc6f8fcf6328">&#9670;&#160;</a></span>natsMsg_GetMetaData()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsMsg_GetMetaData </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_msg_meta_data.html">jsMsgMetaData</a> **&#160;</td>
+          <td class="paramname"><em>new_meta</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *&#160;</td>
+          <td class="paramname"><em>msg</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This works only for JetStream messages that have been received through a subscription callback or calling <a class="el" href="group__sub_group.html#ga6538a5d78dfb0f16514b94c8e74c11af" title="Returns the next available message.">natsSubscription_NextMsg</a>.</p>
+<dl class="section note"><dt>Note</dt><dd>The user must destroy the returned object with <a class="el" href="group__js_msg.html#gaf9bf92294342bcb27053de7038606d12" title="Destroys the message metadata object.">jsMsgMetaData_Destroy</a>.</dd>
+<dd>
+This function will return an error for non JetStream messages.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">new_meta</td><td>the location where to store the pointer to the newly created <a class="el" href="structjs_msg_meta_data.html">jsMsgMetaData</a> object. </td></tr>
+    <tr><td class="paramname">msg</td><td>the pointer to the <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a> object, which should be a JetStream message received through a subscription callback or <a class="el" href="group__sub_group.html#ga6538a5d78dfb0f16514b94c8e74c11af" title="Returns the next available message.">natsSubscription_NextMsg</a>. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gaf9bf92294342bcb27053de7038606d12" name="gaf9bf92294342bcb27053de7038606d12"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaf9bf92294342bcb27053de7038606d12">&#9670;&#160;</a></span>jsMsgMetaData_Destroy()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void jsMsgMetaData_Destroy </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_msg_meta_data.html">jsMsgMetaData</a> *&#160;</td>
+          <td class="paramname"><em>meta</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Releases memory allocated for this <a class="el" href="structjs_msg_meta_data.html">jsMsgMetaData</a> object.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">meta</td><td>the pointer to the <a class="el" href="structjs_msg_meta_data.html">jsMsgMetaData</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gae454fb7e7097a3cd3362cb49ef8a3c84" name="gae454fb7e7097a3cd3362cb49ef8a3c84"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gae454fb7e7097a3cd3362cb49ef8a3c84">&#9670;&#160;</a></span>natsMsg_Ack()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsMsg_Ack </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *&#160;</td>
+          <td class="paramname"><em>msg</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_options.html">jsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This tells the server that the message was successfully processed and it can move on to the next message.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">msg</td><td>the pointer to the <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a> object. </td></tr>
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structjs_options.html">jsOptions</a> object, possibly <code>NULL</code>. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gafb899ebf8e89b3a858fe20f7853635a7" name="gafb899ebf8e89b3a858fe20f7853635a7"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gafb899ebf8e89b3a858fe20f7853635a7">&#9670;&#160;</a></span>natsMsg_AckSync()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsMsg_AckSync </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *&#160;</td>
+          <td class="paramname"><em>msg</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_options.html">jsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *&#160;</td>
+          <td class="paramname"><em>errCode</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This is the synchronous version of <a class="el" href="group__js_msg.html#gae454fb7e7097a3cd3362cb49ef8a3c84" title="Acknowledges a message.">natsMsg_Ack</a>. This indicates successful message processing, and waits for confirmation from the server that the acknowledgment has been processed.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">msg</td><td>the pointer to the <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a> object. </td></tr>
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structjs_options.html">jsOptions</a> object, possibly <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">errCode</td><td>the location where to store the JetStream specific error code, or <code>NULL</code> if not needed. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gac271b874154301da9759f9ac05768b47" name="gac271b874154301da9759f9ac05768b47"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gac271b874154301da9759f9ac05768b47">&#9670;&#160;</a></span>natsMsg_Nak()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsMsg_Nak </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *&#160;</td>
+          <td class="paramname"><em>msg</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_options.html">jsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This tells the server to redeliver the message. You can configure the number of redeliveries by passing <code>MaxDeliver</code> when you subscribe.</p>
+<p >The default is infinite redeliveries.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">msg</td><td>the pointer to the <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a> object. </td></tr>
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structjs_options.html">jsOptions</a> object, possibly <code>NULL</code>. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gac0697389fa60a3c4725e53cd23ada7bd" name="gac0697389fa60a3c4725e53cd23ada7bd"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gac0697389fa60a3c4725e53cd23ada7bd">&#9670;&#160;</a></span>natsMsg_NakWithDelay()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsMsg_NakWithDelay </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *&#160;</td>
+          <td class="paramname"><em>msg</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int64_t&#160;</td>
+          <td class="paramname"><em>delay</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_options.html">jsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This tells the server to redeliver the message after the given <code>delay</code> duration expressed in milliseconds. You can configure the number of redeliveries by passing <code>MaxDeliver</code> when you subscribe.</p>
+<p >The default is infinite redeliveries.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">msg</td><td>the pointer to the <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a> object. </td></tr>
+    <tr><td class="paramname">delay</td><td>the amount of time before the redelivery expressed in milliseconds. </td></tr>
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structjs_options.html">jsOptions</a> object, possibly <code>NULL</code>. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gae1e0beb19cd76e2f69e6415c41c9bb39" name="gae1e0beb19cd76e2f69e6415c41c9bb39"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gae1e0beb19cd76e2f69e6415c41c9bb39">&#9670;&#160;</a></span>natsMsg_InProgress()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsMsg_InProgress </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *&#160;</td>
+          <td class="paramname"><em>msg</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_options.html">jsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This tells the server that this message is being worked on. It resets the redelivery timer on the server.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">msg</td><td>the pointer to the <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a> object. </td></tr>
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structjs_options.html">jsOptions</a> object, possibly <code>NULL</code>. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gae84d21e4388255e9d990e53c9f67e7c4" name="gae84d21e4388255e9d990e53c9f67e7c4"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gae84d21e4388255e9d990e53c9f67e7c4">&#9670;&#160;</a></span>natsMsg_Term()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsMsg_Term </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *&#160;</td>
+          <td class="paramname"><em>msg</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_options.html">jsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This tells the server to not redeliver this message, regardless of the value <code>MaxDeliver</code>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">msg</td><td>the pointer to the <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a> object. </td></tr>
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structjs_options.html">jsOptions</a> object, possibly <code>NULL</code>. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga819be2990ec20b964aa574b5331d7f2e" name="ga819be2990ec20b964aa574b5331d7f2e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga819be2990ec20b964aa574b5331d7f2e">&#9670;&#160;</a></span>natsMsg_GetSequence()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> uint64_t natsMsg_GetSequence </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *&#160;</td>
+          <td class="paramname"><em>msg</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the sequence number of this JetStream message, or <code>0</code> if <code>msg</code> is <code>NULL</code> or not a JetStream message.</p>
+<dl class="section note"><dt>Note</dt><dd>This applies to JetStream messages retrieved with <a class="el" href="group__js_assets_group.html#ga9fe289ae172f83e53ca1b1b747744c1f" title="Retrieves a JetStream message from the stream by sequence.">js_GetMsg</a> or <a class="el" href="group__js_assets_group.html#ga6835b53da27d5721eddb3698e582cf0c" title="Retrieves the last JetStream message from the stream for a given subject.">js_GetLastMsg</a>.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">msg</td><td>the pointer to the <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gab4850497c5481f5ec6eb1fcdb43646f5" name="gab4850497c5481f5ec6eb1fcdb43646f5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gab4850497c5481f5ec6eb1fcdb43646f5">&#9670;&#160;</a></span>natsMsg_GetTime()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t natsMsg_GetTime </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *&#160;</td>
+          <td class="paramname"><em>msg</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the timestamp (in UTC) of this JetStream message, or <code>0</code> if <code>msg</code> is <code>NULL</code> or not a JetStream message.</p>
+<dl class="section note"><dt>Note</dt><dd>This applies to JetStream messages retrieved with <a class="el" href="group__js_assets_group.html#ga9fe289ae172f83e53ca1b1b747744c1f" title="Retrieves a JetStream message from the stream by sequence.">js_GetMsg</a> or <a class="el" href="group__js_assets_group.html#ga6835b53da27d5721eddb3698e582cf0c" title="Retrieves the last JetStream message from the stream for a given subject.">js_GetLastMsg</a>.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">msg</td><td>the pointer to the <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__js_msg.js b/doc/html/group__js_msg.js
new file mode 100644 (file)
index 0000000..0b5b9fb
--- /dev/null
@@ -0,0 +1,13 @@
+var group__js_msg =
+[
+    [ "natsMsg_GetMetaData", "group__js_msg.html#gacf48e59038fab35849e9dc6f8fcf6328", null ],
+    [ "jsMsgMetaData_Destroy", "group__js_msg.html#gaf9bf92294342bcb27053de7038606d12", null ],
+    [ "natsMsg_Ack", "group__js_msg.html#gae454fb7e7097a3cd3362cb49ef8a3c84", null ],
+    [ "natsMsg_AckSync", "group__js_msg.html#gafb899ebf8e89b3a858fe20f7853635a7", null ],
+    [ "natsMsg_Nak", "group__js_msg.html#gac271b874154301da9759f9ac05768b47", null ],
+    [ "natsMsg_NakWithDelay", "group__js_msg.html#gac0697389fa60a3c4725e53cd23ada7bd", null ],
+    [ "natsMsg_InProgress", "group__js_msg.html#gae1e0beb19cd76e2f69e6415c41c9bb39", null ],
+    [ "natsMsg_Term", "group__js_msg.html#gae84d21e4388255e9d990e53c9f67e7c4", null ],
+    [ "natsMsg_GetSequence", "group__js_msg.html#ga819be2990ec20b964aa574b5331d7f2e", null ],
+    [ "natsMsg_GetTime", "group__js_msg.html#gab4850497c5481f5ec6eb1fcdb43646f5", null ]
+];
\ No newline at end of file
diff --git a/doc/html/group__js_pub_group.html b/doc/html/group__js_pub_group.html
new file mode 100644 (file)
index 0000000..ec13e39
--- /dev/null
@@ -0,0 +1,528 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Publishing</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__js_pub_group.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle"><div class="title">Publishing<div class="ingroups"><a class="el" href="group__func_group.html">Functions</a> &raquo; <a class="el" href="group__js_group.html">JetStream</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:gaf09f333a8675a8060c5ede07a6bdeef9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_pub_group.html#gaf09f333a8675a8060c5ede07a6bdeef9">jsPubOptions_Init</a> (<a class="el" href="structjs_pub_options.html">jsPubOptions</a> *opts)</td></tr>
+<tr class="memdesc:gaf09f333a8675a8060c5ede07a6bdeef9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a publish options structure.  <a href="group__js_pub_group.html#gaf09f333a8675a8060c5ede07a6bdeef9">More...</a><br /></td></tr>
+<tr class="separator:gaf09f333a8675a8060c5ede07a6bdeef9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gac6ba005531c82d9f0efa88dd6b458477"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_pub_group.html#gac6ba005531c82d9f0efa88dd6b458477">js_Publish</a> (<a class="el" href="structjs_pub_ack.html">jsPubAck</a> **pubAck, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *subj, const void *data, int dataLen, <a class="el" href="structjs_pub_options.html">jsPubOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:gac6ba005531c82d9f0efa88dd6b458477"><td class="mdescLeft">&#160;</td><td class="mdescRight">Publishes data on a subject to JetStream.  <a href="group__js_pub_group.html#gac6ba005531c82d9f0efa88dd6b458477">More...</a><br /></td></tr>
+<tr class="separator:gac6ba005531c82d9f0efa88dd6b458477"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2aceeb82fac3621aea843dd246732bdd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_pub_group.html#ga2aceeb82fac3621aea843dd246732bdd">js_PublishMsg</a> (<a class="el" href="structjs_pub_ack.html">jsPubAck</a> **pubAck, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, <a class="el" href="structjs_pub_options.html">jsPubOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:ga2aceeb82fac3621aea843dd246732bdd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Publishes a message to JetStream.  <a href="group__js_pub_group.html#ga2aceeb82fac3621aea843dd246732bdd">More...</a><br /></td></tr>
+<tr class="separator:ga2aceeb82fac3621aea843dd246732bdd"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaac130840b6db9109e72cf6ad9186dfc4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_pub_group.html#gaac130840b6db9109e72cf6ad9186dfc4">jsPubAck_Destroy</a> (<a class="el" href="structjs_pub_ack.html">jsPubAck</a> *pubAck)</td></tr>
+<tr class="memdesc:gaac130840b6db9109e72cf6ad9186dfc4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the publish acknowledgment object.  <a href="group__js_pub_group.html#gaac130840b6db9109e72cf6ad9186dfc4">More...</a><br /></td></tr>
+<tr class="separator:gaac130840b6db9109e72cf6ad9186dfc4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga069dfd6f0f3d96f1ff8bf2372e59900c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_pub_group.html#ga069dfd6f0f3d96f1ff8bf2372e59900c">js_PublishAsync</a> (<a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *subj, const void *data, int dataLen, <a class="el" href="structjs_pub_options.html">jsPubOptions</a> *opts)</td></tr>
+<tr class="memdesc:ga069dfd6f0f3d96f1ff8bf2372e59900c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Publishes data to JetStream but does not wait for a <a class="el" href="structjs_pub_ack.html">jsPubAck</a>.  <a href="group__js_pub_group.html#ga069dfd6f0f3d96f1ff8bf2372e59900c">More...</a><br /></td></tr>
+<tr class="separator:ga069dfd6f0f3d96f1ff8bf2372e59900c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gab7e4139a48c5ee4d2155cbb43142e873"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_pub_group.html#gab7e4139a48c5ee4d2155cbb43142e873">js_PublishMsgAsync</a> (<a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **msg, <a class="el" href="structjs_pub_options.html">jsPubOptions</a> *opts)</td></tr>
+<tr class="memdesc:gab7e4139a48c5ee4d2155cbb43142e873"><td class="mdescLeft">&#160;</td><td class="mdescRight">Publishes a message to JetStream but does not wait for a <a class="el" href="structjs_pub_ack.html">jsPubAck</a>.  <a href="group__js_pub_group.html#gab7e4139a48c5ee4d2155cbb43142e873">More...</a><br /></td></tr>
+<tr class="separator:gab7e4139a48c5ee4d2155cbb43142e873"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga24813ee9a58f00c0f21d10ab9c93b81d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_pub_group.html#ga24813ee9a58f00c0f21d10ab9c93b81d">js_PublishAsyncComplete</a> (<a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="el" href="structjs_pub_options.html">jsPubOptions</a> *opts)</td></tr>
+<tr class="memdesc:ga24813ee9a58f00c0f21d10ab9c93b81d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wait for all outstanding messages to be acknowledged.  <a href="group__js_pub_group.html#ga24813ee9a58f00c0f21d10ab9c93b81d">More...</a><br /></td></tr>
+<tr class="separator:ga24813ee9a58f00c0f21d10ab9c93b81d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2ac95a3450f77f8074fae3f2fbe7e54c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_pub_group.html#ga2ac95a3450f77f8074fae3f2fbe7e54c">js_PublishAsyncGetPendingList</a> (<a class="el" href="structnats_msg_list.html">natsMsgList</a> *pending, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js)</td></tr>
+<tr class="memdesc:ga2ac95a3450f77f8074fae3f2fbe7e54c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the list of pending messages published asynchronously.  <a href="group__js_pub_group.html#ga2ac95a3450f77f8074fae3f2fbe7e54c">More...</a><br /></td></tr>
+<tr class="separator:ga2ac95a3450f77f8074fae3f2fbe7e54c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<p >Publishing functions </p>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="gaf09f333a8675a8060c5ede07a6bdeef9" name="gaf09f333a8675a8060c5ede07a6bdeef9"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaf09f333a8675a8060c5ede07a6bdeef9">&#9670;&#160;</a></span>jsPubOptions_Init()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> jsPubOptions_Init </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_pub_options.html">jsPubOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Use this before setting specific publish options and passing this configuration to the JetStream publish APIs.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structjs_pub_options.html">jsPubOptions</a> to initialize. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gac6ba005531c82d9f0efa88dd6b458477" name="gac6ba005531c82d9f0efa88dd6b458477"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gac6ba005531c82d9f0efa88dd6b458477">&#9670;&#160;</a></span>js_Publish()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> js_Publish </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_pub_ack.html">jsPubAck</a> **&#160;</td>
+          <td class="paramname"><em>pubAck</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *&#160;</td>
+          <td class="paramname"><em>js</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>subj</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const void *&#160;</td>
+          <td class="paramname"><em>data</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&#160;</td>
+          <td class="paramname"><em>dataLen</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_pub_options.html">jsPubOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *&#160;</td>
+          <td class="paramname"><em>errCode</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Publishes the data to the given subject to JetStream.</p>
+<p >See <a class="el" href="group__js_pub_group.html#ga2aceeb82fac3621aea843dd246732bdd" title="Publishes a message to JetStream.">js_PublishMsg</a> for details.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">pubAck</td><td>the location where to store the pub acknowledgment, or <code>NULL</code> if not needed. </td></tr>
+    <tr><td class="paramname">js</td><td>the pointer to the <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> object. </td></tr>
+    <tr><td class="paramname">subj</td><td>the subject the data is sent to. </td></tr>
+    <tr><td class="paramname">data</td><td>the data to be sent, can be <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">dataLen</td><td>the length of the data to be sent. </td></tr>
+    <tr><td class="paramname">opts</td><td>the publish options, possibly <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">errCode</td><td>the location where to store the JetStream specific error code, or <code>NULL</code> if not needed. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga2aceeb82fac3621aea843dd246732bdd" name="ga2aceeb82fac3621aea843dd246732bdd"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga2aceeb82fac3621aea843dd246732bdd">&#9670;&#160;</a></span>js_PublishMsg()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> js_PublishMsg </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_pub_ack.html">jsPubAck</a> **&#160;</td>
+          <td class="paramname"><em>pubAck</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *&#160;</td>
+          <td class="paramname"><em>js</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *&#160;</td>
+          <td class="paramname"><em>msg</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_pub_options.html">jsPubOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *&#160;</td>
+          <td class="paramname"><em>errCode</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Publishes the given message to JetStream.</p>
+<dl class="section note"><dt>Note</dt><dd>If you are not interested in inspecting the publish acknowledgment, you can pass <code>NULL</code>, but keep in mind that the publish acknowledgment is still sent by the server. </dd>
+<dd>
+The returned <a class="el" href="structjs_pub_ack.html">jsPubAck</a> object needs to be destroyed with <a class="el" href="group__js_pub_group.html#gaac130840b6db9109e72cf6ad9186dfc4" title="Destroys the publish acknowledgment object.">jsPubAck_Destroy</a> when no longer needed.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__js_pub_group.html#gaac130840b6db9109e72cf6ad9186dfc4" title="Destroys the publish acknowledgment object.">jsPubAck_Destroy</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">pubAck</td><td>the location where to store the pub acknowledgment, or <code>NULL</code> if not needed. </td></tr>
+    <tr><td class="paramname">js</td><td>the pointer to the <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> object. </td></tr>
+    <tr><td class="paramname">msg</td><td>the pointer to the <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a> object to send. </td></tr>
+    <tr><td class="paramname">opts</td><td>the publish options, possibly <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">errCode</td><td>the location where to store the JetStream specific error code, or <code>NULL</code> if not needed. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gaac130840b6db9109e72cf6ad9186dfc4" name="gaac130840b6db9109e72cf6ad9186dfc4"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaac130840b6db9109e72cf6ad9186dfc4">&#9670;&#160;</a></span>jsPubAck_Destroy()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void jsPubAck_Destroy </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_pub_ack.html">jsPubAck</a> *&#160;</td>
+          <td class="paramname"><em>pubAck</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Releases memory allocated for this publish acknowledgment object.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">pubAck</td><td>the <a class="el" href="structjs_pub_ack.html">jsPubAck</a> object to destroy. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga069dfd6f0f3d96f1ff8bf2372e59900c" name="ga069dfd6f0f3d96f1ff8bf2372e59900c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga069dfd6f0f3d96f1ff8bf2372e59900c">&#9670;&#160;</a></span>js_PublishAsync()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> js_PublishAsync </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *&#160;</td>
+          <td class="paramname"><em>js</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>subj</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const void *&#160;</td>
+          <td class="paramname"><em>data</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&#160;</td>
+          <td class="paramname"><em>dataLen</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_pub_options.html">jsPubOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >See <a class="el" href="group__js_pub_group.html#gab7e4139a48c5ee4d2155cbb43142e873" title="Publishes a message to JetStream but does not wait for a jsPubAck.">js_PublishMsgAsync</a> for details.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">js</td><td>the pointer to the <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> object. </td></tr>
+    <tr><td class="paramname">subj</td><td>the subject the data is sent to. </td></tr>
+    <tr><td class="paramname">data</td><td>the data to be sent, can be <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">dataLen</td><td>the length of the data to be sent. </td></tr>
+    <tr><td class="paramname">opts</td><td>the publish options, possibly <code>NULL</code>. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gab7e4139a48c5ee4d2155cbb43142e873" name="gab7e4139a48c5ee4d2155cbb43142e873"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gab7e4139a48c5ee4d2155cbb43142e873">&#9670;&#160;</a></span>js_PublishMsgAsync()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> js_PublishMsgAsync </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *&#160;</td>
+          <td class="paramname"><em>js</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **&#160;</td>
+          <td class="paramname"><em>msg</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_pub_options.html">jsPubOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Publishes a message asynchronously to JetStream. User can call <a class="el" href="group__js_pub_group.html#ga24813ee9a58f00c0f21d10ab9c93b81d" title="Wait for all outstanding messages to be acknowledged.">js_PublishAsyncComplete</a> to be notified when all publish acknowledgments for the pending publish calls have been received.</p>
+<dl class="section note"><dt>Note</dt><dd>If this call is successful, the library takes ownership of the message and will destroy it after the acknowledgment has been received, or will present it to the user through the <a class="el" href="group__callbacks_group.html#ga954768cc1d3388bb6ab723e777647992" title="Callback used to process asynchronous publish errors from JetStream.">jsPubAckErrHandler</a> callback. To prevent the user from accessing/destroying the message while in use by the library, this function requires a pointer to the pointer of the message so that it can be cleared. That way, the user should always call <a class="el" href="group__msg_group.html#ga9e9590018284939f43f60964283f33ae" title="Destroys the message object.">natsMsg_Destroy</a>, regardless of success or failure, since <a class="el" href="group__msg_group.html#ga9e9590018284939f43f60964283f33ae" title="Destroys the message object.">natsMsg_Destroy</a> will have no effect if the message pointer is <code>NULL</code>.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__js_pub_group.html#ga24813ee9a58f00c0f21d10ab9c93b81d" title="Wait for all outstanding messages to be acknowledged.">js_PublishAsyncComplete</a> </dd>
+<dd>
+<a class="el" href="group__callbacks_group.html#ga954768cc1d3388bb6ab723e777647992" title="Callback used to process asynchronous publish errors from JetStream.">jsPubAckErrHandler</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">js</td><td>the pointer to the <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> object. </td></tr>
+    <tr><td class="paramname">msg</td><td>the memory location where the pointer to the <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a> object is located. If the library takes ownership of the message, this location will be cleared so a following call to <a class="el" href="group__msg_group.html#ga9e9590018284939f43f60964283f33ae" title="Destroys the message object.">natsMsg_Destroy</a> would have no effect. </td></tr>
+    <tr><td class="paramname">opts</td><td>the publish options, possibly <code>NULL</code>. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga24813ee9a58f00c0f21d10ab9c93b81d" name="ga24813ee9a58f00c0f21d10ab9c93b81d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga24813ee9a58f00c0f21d10ab9c93b81d">&#9670;&#160;</a></span>js_PublishAsyncComplete()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> js_PublishAsyncComplete </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *&#160;</td>
+          <td class="paramname"><em>js</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_pub_options.html">jsPubOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This call will block until the library has received acknowledgment for all outstanding published messages.</p>
+<p >To limit the wait, user can pass a <a class="el" href="structjs_pub_options.html">jsPubOptions</a> with a <code>MaxWait</code> set to the maximum number of milliseconds that the call should block.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">js</td><td>the pointer to the <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> object. </td></tr>
+    <tr><td class="paramname">opts</td><td>the publish options, possibly <code>NULL</code>. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga2ac95a3450f77f8074fae3f2fbe7e54c" name="ga2ac95a3450f77f8074fae3f2fbe7e54c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga2ac95a3450f77f8074fae3f2fbe7e54c">&#9670;&#160;</a></span>js_PublishAsyncGetPendingList()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> js_PublishAsyncGetPendingList </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structnats_msg_list.html">natsMsgList</a> *&#160;</td>
+          <td class="paramname"><em>pending</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *&#160;</td>
+          <td class="paramname"><em>js</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This call returns the list of all asynchronously published messages for which no acknowledgment have been received yet.</p>
+<p >The user has now back ownership of the messages and can resend send if desired or simply destroy them.</p>
+<dl class="section note"><dt>Note</dt><dd>After this call returns, it is possible that acknowledgments arrive from the server but since they have been removed from the pending list, the acknowledgments will be discarded (no <a class="el" href="group__callbacks_group.html#ga954768cc1d3388bb6ab723e777647992" title="Callback used to process asynchronous publish errors from JetStream.">jsPubAckErrHandler</a> callback invoked). If the server did receive a particular message and the user in the meantime has resent that message, it would be a duplicate, so in order for the server to detect this duplicate, ensure that the stream's duplicate window setting is specified and a unique message ID was set when sending the message.</dd></dl>
+<dl class="section warning"><dt>Warning</dt><dd>The user must call <a class="el" href="group__msg_group.html#ga1a091d24f939d881bf04fba78b8995c2" title="Destroys this list of messages.">natsMsgList_Destroy</a> to release memory allocated by this call and destroy all pending messages still present in the list.</dd></dl>
+<div class="fragment"><div class="line">natsMsgList pending;</div>
+<div class="line"> </div>
+<div class="line">s = js_PublishAsyncGetPendingList(&amp;pending, js);</div>
+<div class="line">if (s == NATS_OK)</div>
+<div class="line">{</div>
+<div class="line">     int i;</div>
+<div class="line"> </div>
+<div class="line">     for (i=0; i&lt;pending.Count; i++)</div>
+<div class="line">     {</div>
+<div class="line">             if (your_decision_to_resend(pending.Msgs[i]))</div>
+<div class="line">             {</div>
+<div class="line">                     // If the call is successful, pending.Msgs[i] will</div>
+<div class="line">                     // be set to NULL so the message will not be</div>
+<div class="line">                     // destroyed.</div>
+<div class="line">                     js_PublishMsgAsync(js, &amp;(pending.Msgs[i]), NULL);</div>
+<div class="line">             }</div>
+<div class="line">     }</div>
+<div class="line"> </div>
+<div class="line">     // Calling this will release memory allocated to hold the</div>
+<div class="line">     // array of messages but also call natsMsg_Destroy on all</div>
+<div class="line">     // messages still present in the array.</div>
+<div class="line">     natsMsgList_Destroy(&amp;pending);</div>
+<div class="line">}</div>
+</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">pending</td><td>pointer to a <a class="el" href="structnats_msg_list.html" title="A list of NATS messages.">natsMsgList</a> object, typically defined on the stack. </td></tr>
+    <tr><td class="paramname">js</td><td>the pointer to the <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__js_pub_group.js b/doc/html/group__js_pub_group.js
new file mode 100644 (file)
index 0000000..8f4c0bd
--- /dev/null
@@ -0,0 +1,11 @@
+var group__js_pub_group =
+[
+    [ "jsPubOptions_Init", "group__js_pub_group.html#gaf09f333a8675a8060c5ede07a6bdeef9", null ],
+    [ "js_Publish", "group__js_pub_group.html#gac6ba005531c82d9f0efa88dd6b458477", null ],
+    [ "js_PublishMsg", "group__js_pub_group.html#ga2aceeb82fac3621aea843dd246732bdd", null ],
+    [ "jsPubAck_Destroy", "group__js_pub_group.html#gaac130840b6db9109e72cf6ad9186dfc4", null ],
+    [ "js_PublishAsync", "group__js_pub_group.html#ga069dfd6f0f3d96f1ff8bf2372e59900c", null ],
+    [ "js_PublishMsgAsync", "group__js_pub_group.html#gab7e4139a48c5ee4d2155cbb43142e873", null ],
+    [ "js_PublishAsyncComplete", "group__js_pub_group.html#ga24813ee9a58f00c0f21d10ab9c93b81d", null ],
+    [ "js_PublishAsyncGetPendingList", "group__js_pub_group.html#ga2ac95a3450f77f8074fae3f2fbe7e54c", null ]
+];
\ No newline at end of file
diff --git a/doc/html/group__js_sub_group.html b/doc/html/group__js_sub_group.html
new file mode 100644 (file)
index 0000000..de4689b
--- /dev/null
@@ -0,0 +1,615 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Subscribing</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__js_sub_group.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle"><div class="title">Subscribing<div class="ingroups"><a class="el" href="group__func_group.html">Functions</a> &raquo; <a class="el" href="group__js_group.html">JetStream</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:ga472adb949d1af9d8f07bda99f5d7f3f8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_sub_group.html#ga472adb949d1af9d8f07bda99f5d7f3f8">jsSubOptions_Init</a> (<a class="el" href="structjs_sub_options.html">jsSubOptions</a> *opts)</td></tr>
+<tr class="memdesc:ga472adb949d1af9d8f07bda99f5d7f3f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a subscribe options structure.  <a href="group__js_sub_group.html#ga472adb949d1af9d8f07bda99f5d7f3f8">More...</a><br /></td></tr>
+<tr class="separator:ga472adb949d1af9d8f07bda99f5d7f3f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaa686c6efd84ef963de1925108e896515"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_sub_group.html#gaa686c6efd84ef963de1925108e896515">js_Subscribe</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **sub, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *subject, <a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe">natsMsgHandler</a> cb, void *cbClosure, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="structjs_sub_options.html">jsSubOptions</a> *subOpts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:gaa686c6efd84ef963de1925108e896515"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an asynchronous subscription.  <a href="group__js_sub_group.html#gaa686c6efd84ef963de1925108e896515">More...</a><br /></td></tr>
+<tr class="separator:gaa686c6efd84ef963de1925108e896515"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gabacb010031e535f9fb6e2167337e8adf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_sub_group.html#gabacb010031e535f9fb6e2167337e8adf">js_SubscribeSync</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **sub, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *subject, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="structjs_sub_options.html">jsSubOptions</a> *subOpts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:gabacb010031e535f9fb6e2167337e8adf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a synchronous subscription.  <a href="group__js_sub_group.html#gabacb010031e535f9fb6e2167337e8adf">More...</a><br /></td></tr>
+<tr class="separator:gabacb010031e535f9fb6e2167337e8adf"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaaeaddb73857aa4eb4901eec945ed27cd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_sub_group.html#gaaeaddb73857aa4eb4901eec945ed27cd">js_PullSubscribe</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **sub, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *subject, const char *durable, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="structjs_sub_options.html">jsSubOptions</a> *subOpts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:gaaeaddb73857aa4eb4901eec945ed27cd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a pull subscriber.  <a href="group__js_sub_group.html#gaaeaddb73857aa4eb4901eec945ed27cd">More...</a><br /></td></tr>
+<tr class="separator:gaaeaddb73857aa4eb4901eec945ed27cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gafc5e0d2269bd23b4d5fb7f3b05278e50"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_sub_group.html#gafc5e0d2269bd23b4d5fb7f3b05278e50">natsSubscription_Fetch</a> (<a class="el" href="structnats_msg_list.html">natsMsgList</a> *list, <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int batch, int64_t timeout, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:gafc5e0d2269bd23b4d5fb7f3b05278e50"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fetches messages for a pull subscription.  <a href="group__js_sub_group.html#gafc5e0d2269bd23b4d5fb7f3b05278e50">More...</a><br /></td></tr>
+<tr class="separator:gafc5e0d2269bd23b4d5fb7f3b05278e50"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga1c3a62de8cd4855ae61ea4f67417a43b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_sub_group.html#ga1c3a62de8cd4855ae61ea4f67417a43b">jsFetchRequest_Init</a> (<a class="el" href="structjs_fetch_request.html">jsFetchRequest</a> *request)</td></tr>
+<tr class="memdesc:ga1c3a62de8cd4855ae61ea4f67417a43b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a fetch request options structure.  <a href="group__js_sub_group.html#ga1c3a62de8cd4855ae61ea4f67417a43b">More...</a><br /></td></tr>
+<tr class="separator:ga1c3a62de8cd4855ae61ea4f67417a43b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga676292505e7fde8688cfd886b79a10ed"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_sub_group.html#ga676292505e7fde8688cfd886b79a10ed">natsSubscription_FetchRequest</a> (<a class="el" href="structnats_msg_list.html">natsMsgList</a> *list, <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, <a class="el" href="structjs_fetch_request.html">jsFetchRequest</a> *request)</td></tr>
+<tr class="memdesc:ga676292505e7fde8688cfd886b79a10ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fetches messages for a pull subscription with a complete request configuration.  <a href="group__js_sub_group.html#ga676292505e7fde8688cfd886b79a10ed">More...</a><br /></td></tr>
+<tr class="separator:ga676292505e7fde8688cfd886b79a10ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaae716a1431db065744c079b71a9f4c2e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_sub_group.html#gaae716a1431db065744c079b71a9f4c2e">natsSubscription_GetConsumerInfo</a> (<a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a> **ci, <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:gaae716a1431db065744c079b71a9f4c2e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a> associated with this subscription.  <a href="group__js_sub_group.html#gaae716a1431db065744c079b71a9f4c2e">More...</a><br /></td></tr>
+<tr class="separator:gaae716a1431db065744c079b71a9f4c2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga0daed9f0d2d00cb14314ecc180a6fa84"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_sub_group.html#ga0daed9f0d2d00cb14314ecc180a6fa84">natsSubscription_GetSequenceMismatch</a> (<a class="el" href="structjs_consumer_sequence_mismatch.html">jsConsumerSequenceMismatch</a> *csm, <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub)</td></tr>
+<tr class="memdesc:ga0daed9f0d2d00cb14314ecc180a6fa84"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the consumer sequence mismatch information.  <a href="group__js_sub_group.html#ga0daed9f0d2d00cb14314ecc180a6fa84">More...</a><br /></td></tr>
+<tr class="separator:ga0daed9f0d2d00cb14314ecc180a6fa84"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<p >Subscribing functions </p>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="ga472adb949d1af9d8f07bda99f5d7f3f8" name="ga472adb949d1af9d8f07bda99f5d7f3f8"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga472adb949d1af9d8f07bda99f5d7f3f8">&#9670;&#160;</a></span>jsSubOptions_Init()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> jsSubOptions_Init </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_sub_options.html">jsSubOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Use this before setting specific subscribe options and passing this configuration to the JetStream subscribe APIs.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structjs_sub_options.html">jsSubOptions</a> to initialize. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gaa686c6efd84ef963de1925108e896515" name="gaa686c6efd84ef963de1925108e896515"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaa686c6efd84ef963de1925108e896515">&#9670;&#160;</a></span>js_Subscribe()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> js_Subscribe </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **&#160;</td>
+          <td class="paramname"><em>sub</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *&#160;</td>
+          <td class="paramname"><em>js</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>subject</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe">natsMsgHandler</a>&#160;</td>
+          <td class="paramname"><em>cb</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">void *&#160;</td>
+          <td class="paramname"><em>cbClosure</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_options.html">jsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_sub_options.html">jsSubOptions</a> *&#160;</td>
+          <td class="paramname"><em>subOpts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *&#160;</td>
+          <td class="paramname"><em>errCode</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Typically the user or administrator will have created a JetStream consumer and this call will reference the stream/consumer to bind to with the use of <a class="el" href="structjs_sub_options.html">jsSubOptions</a>'s <code>Stream</code> and <code>Consumer</code>.</p>
+<p >Without the stream information, the library will use the provided <code>subject</code> to try figure out which stream this subscription is for.</p>
+<p >If a <code>Durable</code> is specified (with <a class="el" href="structjs_sub_options.html">jsSubOptions</a>' <code>Config.Durable</code>), the subscription will be durable. However, note the behavior described below regarding JetStream consumers created by this call.</p>
+<p >If no <code>Durable</code> is specified, the subscription will be ephemeral and removed by the server either after calling <a class="el" href="group__sub_group.html#gaee87f8be0e6c2a4693ba2cea070583ba" title="Unsubscribes.">natsSubscription_Unsubscribe</a> or after the subscription is destroyed and the <code>InactivityThreshold</code> has elapsed.</p>
+<dl class="section note"><dt>Note</dt><dd>If a JetStream consumer does not exist and this call creates it, it will be removed in the server once the user calls <a class="el" href="group__sub_group.html#gaee87f8be0e6c2a4693ba2cea070583ba" title="Unsubscribes.">natsSubscription_Unsubscribe</a> or <a class="el" href="group__sub_group.html#ga26c9736289d326fb7d6df7e2a0df72ab" title="Drains the subscription with a default timeout.">natsSubscription_Drain</a>, even if this is a <code>Durable</code> subscription. If the subscription should be maintained, it should be explicitly created using <a class="el" href="group__js_assets_group.html#gaf2efb63db150e782d9007090b49d4115" title="Adds a JetStream consumer.">js_AddConsumer</a> and then bound to with the use of <a class="el" href="structjs_sub_options.html">jsSubOptions</a>' <code>Stream</code> and <code>Consumer</code>.</dd></dl>
+<dl class="section warning"><dt>Warning</dt><dd>Prior to release v3.4.0, calling <a class="el" href="group__sub_group.html#ga50a95dd96e9b714201679a015d62832f" title="Destroys the subscription.">natsSubscription_Destroy</a> would delete the JetStream consumer if it was created by this call. The original intent was that it would be deleted only with explicit calls to unsubscribe or drain. Therefore, starting v3.4.0, if the user calls only <a class="el" href="group__sub_group.html#ga50a95dd96e9b714201679a015d62832f" title="Destroys the subscription.">natsSubscription_Destroy</a> (to free memory), the JetStream consumer will no longer be deleted. The user would have to explicitly call <a class="el" href="group__sub_group.html#gaee87f8be0e6c2a4693ba2cea070583ba" title="Unsubscribes.">natsSubscription_Unsubscribe</a> or <a class="el" href="group__js_assets_group.html#ga52fbc61759b11494db91f348a733c490" title="Deletes a consumer.">js_DeleteConsumer</a>.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the location where to store the pointer to the newly created <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
+    <tr><td class="paramname">js</td><td>the pointer to the <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> object. </td></tr>
+    <tr><td class="paramname">subject</td><td>the subject this subscription is created for. </td></tr>
+    <tr><td class="paramname">cb</td><td>the <a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe" title="Callback used to deliver messages to the application.">natsMsgHandler</a> callback. </td></tr>
+    <tr><td class="paramname">cbClosure</td><td>a pointer to an user defined object (can be <code>NULL</code>). See the <a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe" title="Callback used to deliver messages to the application.">natsMsgHandler</a> prototype. </td></tr>
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structjs_options.html">jsOptions</a> object, possibly <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">subOpts</td><td>the subscribe options, possibly <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">errCode</td><td>the location where to store the JetStream specific error code, or <code>NULL</code> if not needed. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gabacb010031e535f9fb6e2167337e8adf" name="gabacb010031e535f9fb6e2167337e8adf"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gabacb010031e535f9fb6e2167337e8adf">&#9670;&#160;</a></span>js_SubscribeSync()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> js_SubscribeSync </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **&#160;</td>
+          <td class="paramname"><em>sub</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *&#160;</td>
+          <td class="paramname"><em>js</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>subject</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_options.html">jsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_sub_options.html">jsSubOptions</a> *&#160;</td>
+          <td class="paramname"><em>subOpts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *&#160;</td>
+          <td class="paramname"><em>errCode</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >See important notes in <a class="el" href="group__js_sub_group.html#gaa686c6efd84ef963de1925108e896515" title="Create an asynchronous subscription.">js_Subscribe</a>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the location where to store the pointer to the newly created <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
+    <tr><td class="paramname">js</td><td>the pointer to the <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> object. </td></tr>
+    <tr><td class="paramname">subject</td><td>the subject this subscription is created for. the <a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe" title="Callback used to deliver messages to the application.">natsMsgHandler</a> prototype. </td></tr>
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structjs_options.html">jsOptions</a> object, possibly <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">subOpts</td><td>the subscribe options, possibly <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">errCode</td><td>the location where to store the JetStream specific error code, or <code>NULL</code> if not needed. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gaaeaddb73857aa4eb4901eec945ed27cd" name="gaaeaddb73857aa4eb4901eec945ed27cd"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaaeaddb73857aa4eb4901eec945ed27cd">&#9670;&#160;</a></span>js_PullSubscribe()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> js_PullSubscribe </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **&#160;</td>
+          <td class="paramname"><em>sub</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *&#160;</td>
+          <td class="paramname"><em>js</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>subject</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>durable</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_options.html">jsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_sub_options.html">jsSubOptions</a> *&#160;</td>
+          <td class="paramname"><em>subOpts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *&#160;</td>
+          <td class="paramname"><em>errCode</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >A pull based consumer is a type of consumer that does not have a delivery subject, that is the library has to request for the messages to be delivered as needed from the server.</p>
+<dl class="section note"><dt>Note</dt><dd>If no durable name is provided, the pull subscription will create an ephemeral JetStream consumer. The requirement for a durable name is lifted in NATS C client v3.4.0+ and NATS Server v2.7.0+. </dd>
+<dd>
+If a durable name is specified, it cannot contain the character ".".</dd></dl>
+<p>See important notes in <a class="el" href="group__js_sub_group.html#gaa686c6efd84ef963de1925108e896515" title="Create an asynchronous subscription.">js_Subscribe</a>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the location where to store the pointer to the newly created <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
+    <tr><td class="paramname">js</td><td>the pointer to the <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> object. </td></tr>
+    <tr><td class="paramname">subject</td><td>the subject this subscription is created for. </td></tr>
+    <tr><td class="paramname">durable</td><td>the optional durable name. </td></tr>
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structjs_options.html">jsOptions</a> object, possibly <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">subOpts</td><td>the subscribe options, possibly <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">errCode</td><td>the location where to store the JetStream specific error code, or <code>NULL</code> if not needed. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gafc5e0d2269bd23b4d5fb7f3b05278e50" name="gafc5e0d2269bd23b4d5fb7f3b05278e50"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gafc5e0d2269bd23b4d5fb7f3b05278e50">&#9670;&#160;</a></span>natsSubscription_Fetch()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_Fetch </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structnats_msg_list.html">natsMsgList</a> *&#160;</td>
+          <td class="paramname"><em>list</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
+          <td class="paramname"><em>sub</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&#160;</td>
+          <td class="paramname"><em>batch</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int64_t&#160;</td>
+          <td class="paramname"><em>timeout</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *&#160;</td>
+          <td class="paramname"><em>errCode</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Fetches up to <code>batch</code> messages from the server, waiting up to <code>timeout</code> milliseconds. No more thant <code>batch</code> messages will be returned, however, it can be less.</p>
+<p >For <code>batch</code> greater than <code>1</code>, this call will not necessarily wait up <code>timeout</code> milliseconds if some messages were collected and the library receives a notification that no more messages are available at this time.<br  />
+ It means that calling <code>natsSubscription_Fetch(&amp;list, sub, 10, 5000)</code> may return after less than 5 seconds with only 3 messages.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">list</td><td>the location to a <a class="el" href="structnats_msg_list.html" title="A list of NATS messages.">natsMsgList</a> that will be filled by the result of this call. </td></tr>
+    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
+    <tr><td class="paramname">batch</td><td>the batch size, that is, the maximum number of messages to return. </td></tr>
+    <tr><td class="paramname">timeout</td><td>the timeout (required) expressed in number of milliseconds. </td></tr>
+    <tr><td class="paramname">errCode</td><td>the location where to store the JetStream specific error code, or <code>NULL</code> if not needed. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga1c3a62de8cd4855ae61ea4f67417a43b" name="ga1c3a62de8cd4855ae61ea4f67417a43b"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga1c3a62de8cd4855ae61ea4f67417a43b">&#9670;&#160;</a></span>jsFetchRequest_Init()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> jsFetchRequest_Init </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_fetch_request.html">jsFetchRequest</a> *&#160;</td>
+          <td class="paramname"><em>request</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Use this before setting specific fetch options and passing it to <a class="el" href="group__js_sub_group.html#ga676292505e7fde8688cfd886b79a10ed" title="Fetches messages for a pull subscription with a complete request configuration.">natsSubscription_FetchRequest</a>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">request</td><td>the pointer to the <a class="el" href="structjs_fetch_request.html">jsFetchRequest</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga676292505e7fde8688cfd886b79a10ed" name="ga676292505e7fde8688cfd886b79a10ed"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga676292505e7fde8688cfd886b79a10ed">&#9670;&#160;</a></span>natsSubscription_FetchRequest()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_FetchRequest </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structnats_msg_list.html">natsMsgList</a> *&#160;</td>
+          <td class="paramname"><em>list</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
+          <td class="paramname"><em>sub</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_fetch_request.html">jsFetchRequest</a> *&#160;</td>
+          <td class="paramname"><em>request</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Similar to <a class="el" href="group__js_sub_group.html#gafc5e0d2269bd23b4d5fb7f3b05278e50" title="Fetches messages for a pull subscription.">natsSubscription_Fetch</a> but a full <a class="el" href="structjs_fetch_request.html">jsFetchRequest</a> configuration is provided for maximum control.</p>
+<p >Initialize the <a class="el" href="structjs_fetch_request.html">jsFetchRequest</a> structure using <a class="el" href="group__js_sub_group.html#ga1c3a62de8cd4855ae61ea4f67417a43b" title="Initializes a fetch request options structure.">jsFetchRequest_Init</a> and then set the parameters desired, then invoke this function.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">list</td><td>the location to a <a class="el" href="structnats_msg_list.html" title="A list of NATS messages.">natsMsgList</a> that will be filled by the result of this call. </td></tr>
+    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
+    <tr><td class="paramname">request</td><td>the pointer to a <a class="el" href="structjs_fetch_request.html">jsFetchRequest</a> configuration. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gaae716a1431db065744c079b71a9f4c2e" name="gaae716a1431db065744c079b71a9f4c2e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaae716a1431db065744c079b71a9f4c2e">&#9670;&#160;</a></span>natsSubscription_GetConsumerInfo()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_GetConsumerInfo </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a> **&#160;</td>
+          <td class="paramname"><em>ci</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
+          <td class="paramname"><em>sub</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structjs_options.html">jsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *&#160;</td>
+          <td class="paramname"><em>errCode</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the <a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a> associated with this subscription.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">ci</td><td>the location where to store the pointer to the new <a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a> object. </td></tr>
+    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structjs_options.html">jsOptions</a> object, possibly <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">errCode</td><td>the location where to store the JetStream specific error code, or <code>NULL</code> if not needed. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga0daed9f0d2d00cb14314ecc180a6fa84" name="ga0daed9f0d2d00cb14314ecc180a6fa84"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga0daed9f0d2d00cb14314ecc180a6fa84">&#9670;&#160;</a></span>natsSubscription_GetSequenceMismatch()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_GetSequenceMismatch </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structjs_consumer_sequence_mismatch.html">jsConsumerSequenceMismatch</a> *&#160;</td>
+          <td class="paramname"><em>csm</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
+          <td class="paramname"><em>sub</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >If <code>Heartbeat</code> is configured in <a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a> object (or configured in an existing JetStream consumer), the server sends heartbeats to the client at the given interval.</p>
+<p >Those heartbeats contains information that allow the application to detect a mismatch between the server and client's view of the state of the consumer.</p>
+<p >If the library detects a sequence mismatch, the behavior is different depending on the type of subscription:</p>
+<ul>
+<li>For asynchronous subscriptions: the error <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a22fa4802a34bac497f23e269a20a52f2" title="For JetStream subscriptions, it means that a consumer sequence mismatch was discovered.">NATS_MISMATCH</a> is published to the error handler (see <a class="el" href="group__opts_group.html#ga127ec7a8196b453947a7fa9a64096cbd" title="Sets the error handler for asynchronous events.">natsOptions_SetErrorHandler</a>).</li>
+<li>For synchronous subscriptions: the next call to <a class="el" href="group__sub_group.html#ga6538a5d78dfb0f16514b94c8e74c11af" title="Returns the next available message.">natsSubscription_NextMsg()</a> will return the error <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a22fa4802a34bac497f23e269a20a52f2" title="For JetStream subscriptions, it means that a consumer sequence mismatch was discovered.">NATS_MISMATCH</a> (but will succeed afterwards).</li>
+</ul>
+<p >In both cases, the user should check what the mismatch is using this function and possibly recreate the consumer based on the provided information.</p>
+<dl class="section note"><dt>Note</dt><dd>For a valid JetStream subscription, this function will return <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ad0229a12b17d3d12a28efed6213720d8">NATS_NOT_FOUND</a> if no consumer sequence mismatch has been detected.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="structjs_consumer_sequence_mismatch.html">jsConsumerSequenceMismatch</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">csm</td><td>the pointer location where to copy the consumer sequence mismatch information. </td></tr>
+    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__js_sub_group.js b/doc/html/group__js_sub_group.js
new file mode 100644 (file)
index 0000000..f19b1f0
--- /dev/null
@@ -0,0 +1,12 @@
+var group__js_sub_group =
+[
+    [ "jsSubOptions_Init", "group__js_sub_group.html#ga472adb949d1af9d8f07bda99f5d7f3f8", null ],
+    [ "js_Subscribe", "group__js_sub_group.html#gaa686c6efd84ef963de1925108e896515", null ],
+    [ "js_SubscribeSync", "group__js_sub_group.html#gabacb010031e535f9fb6e2167337e8adf", null ],
+    [ "js_PullSubscribe", "group__js_sub_group.html#gaaeaddb73857aa4eb4901eec945ed27cd", null ],
+    [ "natsSubscription_Fetch", "group__js_sub_group.html#gafc5e0d2269bd23b4d5fb7f3b05278e50", null ],
+    [ "jsFetchRequest_Init", "group__js_sub_group.html#ga1c3a62de8cd4855ae61ea4f67417a43b", null ],
+    [ "natsSubscription_FetchRequest", "group__js_sub_group.html#ga676292505e7fde8688cfd886b79a10ed", null ],
+    [ "natsSubscription_GetConsumerInfo", "group__js_sub_group.html#gaae716a1431db065744c079b71a9f4c2e", null ],
+    [ "natsSubscription_GetSequenceMismatch", "group__js_sub_group.html#ga0daed9f0d2d00cb14314ecc180a6fa84", null ]
+];
\ No newline at end of file
diff --git a/doc/html/group__kv_entry.html b/doc/html/group__kv_entry.html
new file mode 100644 (file)
index 0000000..a064a14
--- /dev/null
@@ -0,0 +1,401 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: KeyValue store entries</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__kv_entry.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle"><div class="title">KeyValue store entries<div class="ingroups"><a class="el" href="group__func_group.html">Functions</a> &raquo; <a class="el" href="group__kv_group.html">KeyValue store</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:gadedbb410cce499afb535eb6641c32ca7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_entry.html#gadedbb410cce499afb535eb6641c32ca7">kvEntry_Bucket</a> (<a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *e)</td></tr>
+<tr class="memdesc:gadedbb410cce499afb535eb6641c32ca7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the name of the bucket the data was loaded from.  <a href="group__kv_entry.html#gadedbb410cce499afb535eb6641c32ca7">More...</a><br /></td></tr>
+<tr class="separator:gadedbb410cce499afb535eb6641c32ca7"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gab455f32b0abfb1361dab4b5e7d98042a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_entry.html#gab455f32b0abfb1361dab4b5e7d98042a">kvEntry_Key</a> (<a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *e)</td></tr>
+<tr class="memdesc:gab455f32b0abfb1361dab4b5e7d98042a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the name of the key that was retrieved.  <a href="group__kv_entry.html#gab455f32b0abfb1361dab4b5e7d98042a">More...</a><br /></td></tr>
+<tr class="separator:gab455f32b0abfb1361dab4b5e7d98042a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga28077f81d71a30cbce2dc81e5c9574fc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_entry.html#ga28077f81d71a30cbce2dc81e5c9574fc">kvEntry_Value</a> (<a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *e)</td></tr>
+<tr class="memdesc:ga28077f81d71a30cbce2dc81e5c9574fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the value for this key.  <a href="group__kv_entry.html#ga28077f81d71a30cbce2dc81e5c9574fc">More...</a><br /></td></tr>
+<tr class="separator:ga28077f81d71a30cbce2dc81e5c9574fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf7ccc866865903f231e0431754ed2415"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_entry.html#gaf7ccc866865903f231e0431754ed2415">kvEntry_ValueLen</a> (<a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *e)</td></tr>
+<tr class="memdesc:gaf7ccc866865903f231e0431754ed2415"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the value length for this key.  <a href="group__kv_entry.html#gaf7ccc866865903f231e0431754ed2415">More...</a><br /></td></tr>
+<tr class="separator:gaf7ccc866865903f231e0431754ed2415"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga7ff6220915726600545357e31226fb65"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_entry.html#ga7ff6220915726600545357e31226fb65">kvEntry_ValueString</a> (<a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *e)</td></tr>
+<tr class="memdesc:ga7ff6220915726600545357e31226fb65"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the value, as a string, for this key.  <a href="group__kv_entry.html#ga7ff6220915726600545357e31226fb65">More...</a><br /></td></tr>
+<tr class="separator:ga7ff6220915726600545357e31226fb65"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2d58abf81cb577e21a76f9c77568409f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_entry.html#ga2d58abf81cb577e21a76f9c77568409f">kvEntry_Revision</a> (<a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *e)</td></tr>
+<tr class="memdesc:ga2d58abf81cb577e21a76f9c77568409f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the unique sequence for this value.  <a href="group__kv_entry.html#ga2d58abf81cb577e21a76f9c77568409f">More...</a><br /></td></tr>
+<tr class="separator:ga2d58abf81cb577e21a76f9c77568409f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga31ef3a2e3a7df6cf4dbb0a762737800a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_entry.html#ga31ef3a2e3a7df6cf4dbb0a762737800a">kvEntry_Created</a> (<a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *e)</td></tr>
+<tr class="memdesc:ga31ef3a2e3a7df6cf4dbb0a762737800a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the time (in UTC) the data was put in the bucket.  <a href="group__kv_entry.html#ga31ef3a2e3a7df6cf4dbb0a762737800a">More...</a><br /></td></tr>
+<tr class="separator:ga31ef3a2e3a7df6cf4dbb0a762737800a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga233a2d75895cfd0140cf77757592cf47"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_entry.html#ga233a2d75895cfd0140cf77757592cf47">kvEntry_Delta</a> (<a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *e)</td></tr>
+<tr class="memdesc:ga233a2d75895cfd0140cf77757592cf47"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the distance from the latest value.  <a href="group__kv_entry.html#ga233a2d75895cfd0140cf77757592cf47">More...</a><br /></td></tr>
+<tr class="separator:ga233a2d75895cfd0140cf77757592cf47"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga088fd67d3d384ad7a7ddfc82535becea"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="group__types_group.html#ga89db3bd6bf11af3ac5eb3ab560d16332">kvOperation</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_entry.html#ga088fd67d3d384ad7a7ddfc82535becea">kvEntry_Operation</a> (<a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *e)</td></tr>
+<tr class="memdesc:ga088fd67d3d384ad7a7ddfc82535becea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the type of operation of this value.  <a href="group__kv_entry.html#ga088fd67d3d384ad7a7ddfc82535becea">More...</a><br /></td></tr>
+<tr class="separator:ga088fd67d3d384ad7a7ddfc82535becea"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga8359ffcdeefb9c5821e6442d0d5ee388"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_entry.html#ga8359ffcdeefb9c5821e6442d0d5ee388">kvEntry_Destroy</a> (<a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *e)</td></tr>
+<tr class="memdesc:ga8359ffcdeefb9c5821e6442d0d5ee388"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the KeyValue entry object.  <a href="group__kv_entry.html#ga8359ffcdeefb9c5821e6442d0d5ee388">More...</a><br /></td></tr>
+<tr class="separator:ga8359ffcdeefb9c5821e6442d0d5ee388"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<p >These functions allow to inspect a the value, or entry, of a given key.</p>
+<dl class="section warning"><dt>Warning</dt><dd>EXPERIMENTAL FEATURE! We reserve the right to change the API without necessarily bumping the major version of the library. </dd></dl>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="gadedbb410cce499afb535eb6641c32ca7" name="gadedbb410cce499afb535eb6641c32ca7"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gadedbb410cce499afb535eb6641c32ca7">&#9670;&#160;</a></span>kvEntry_Bucket()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char * kvEntry_Bucket </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *&#160;</td>
+          <td class="paramname"><em>e</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the name of the bucket the data was loaded from, or <code>NULL</code> if <code>e</code> itself is <code>NULL</code>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">e</td><td>the pointer to the <a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gab455f32b0abfb1361dab4b5e7d98042a" name="gab455f32b0abfb1361dab4b5e7d98042a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gab455f32b0abfb1361dab4b5e7d98042a">&#9670;&#160;</a></span>kvEntry_Key()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char * kvEntry_Key </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *&#160;</td>
+          <td class="paramname"><em>e</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the name of the key that was retrieved, or <code>NULL</code> if <code>e</code> itself is <code>NULL</code>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">e</td><td>the pointer to the <a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga28077f81d71a30cbce2dc81e5c9574fc" name="ga28077f81d71a30cbce2dc81e5c9574fc"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga28077f81d71a30cbce2dc81e5c9574fc">&#9670;&#160;</a></span>kvEntry_Value()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const void * kvEntry_Value </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *&#160;</td>
+          <td class="paramname"><em>e</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the value for this key, or <code>NULL</code> if <code>e</code> itself is <code>NULL</code>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">e</td><td>the pointer to the <a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gaf7ccc866865903f231e0431754ed2415" name="gaf7ccc866865903f231e0431754ed2415"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaf7ccc866865903f231e0431754ed2415">&#9670;&#160;</a></span>kvEntry_ValueLen()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int kvEntry_ValueLen </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *&#160;</td>
+          <td class="paramname"><em>e</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the value length for this key, or <code>-1</code> if <code>e</code> itself is <code>NULL</code>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">e</td><td>the pointer to the <a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga7ff6220915726600545357e31226fb65" name="ga7ff6220915726600545357e31226fb65"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga7ff6220915726600545357e31226fb65">&#9670;&#160;</a></span>kvEntry_ValueString()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char * kvEntry_ValueString </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *&#160;</td>
+          <td class="paramname"><em>e</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >If the value is an actual string, this call will return a NULL terminating string (<code>const char*</code>), or <code>NULL</code> if <code>e</code> itself is <code>NULL</code>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">e</td><td>the pointer to the <a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga2d58abf81cb577e21a76f9c77568409f" name="ga2d58abf81cb577e21a76f9c77568409f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga2d58abf81cb577e21a76f9c77568409f">&#9670;&#160;</a></span>kvEntry_Revision()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> uint64_t kvEntry_Revision </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *&#160;</td>
+          <td class="paramname"><em>e</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the unique sequence for this value, or <code>0</code> if <code>e</code> itself is <code>NULL</code>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">e</td><td>the pointer to the <a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga31ef3a2e3a7df6cf4dbb0a762737800a" name="ga31ef3a2e3a7df6cf4dbb0a762737800a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga31ef3a2e3a7df6cf4dbb0a762737800a">&#9670;&#160;</a></span>kvEntry_Created()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t kvEntry_Created </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *&#160;</td>
+          <td class="paramname"><em>e</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the time (in UTC) the data was put in the bucket, or <code>0</code> if <code>e</code> itself is <code>NULL</code>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">e</td><td>the pointer to the <a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga233a2d75895cfd0140cf77757592cf47" name="ga233a2d75895cfd0140cf77757592cf47"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga233a2d75895cfd0140cf77757592cf47">&#9670;&#160;</a></span>kvEntry_Delta()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> uint64_t kvEntry_Delta </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *&#160;</td>
+          <td class="paramname"><em>e</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the distance from the latest value, or <code>0</code> if <code>e</code> itself is <code>NULL</code>.</p>
+<p >If history is enabled this is effectively the index of the historical value, 0 for latest, 1 for most recent etc...</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">e</td><td>the pointer to the <a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga088fd67d3d384ad7a7ddfc82535becea" name="ga088fd67d3d384ad7a7ddfc82535becea"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga088fd67d3d384ad7a7ddfc82535becea">&#9670;&#160;</a></span>kvEntry_Operation()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="group__types_group.html#ga89db3bd6bf11af3ac5eb3ab560d16332">kvOperation</a> kvEntry_Operation </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *&#160;</td>
+          <td class="paramname"><em>e</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the type of operation of this value.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__types_group.html#ga89db3bd6bf11af3ac5eb3ab560d16332">kvOperation</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">e</td><td>the pointer to the <a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga8359ffcdeefb9c5821e6442d0d5ee388" name="ga8359ffcdeefb9c5821e6442d0d5ee388"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga8359ffcdeefb9c5821e6442d0d5ee388">&#9670;&#160;</a></span>kvEntry_Destroy()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void kvEntry_Destroy </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *&#160;</td>
+          <td class="paramname"><em>e</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Releases memory allocated for this <a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> object.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">e</td><td>the pointer to the <a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__kv_entry.js b/doc/html/group__kv_entry.js
new file mode 100644 (file)
index 0000000..00633d3
--- /dev/null
@@ -0,0 +1,13 @@
+var group__kv_entry =
+[
+    [ "kvEntry_Bucket", "group__kv_entry.html#gadedbb410cce499afb535eb6641c32ca7", null ],
+    [ "kvEntry_Key", "group__kv_entry.html#gab455f32b0abfb1361dab4b5e7d98042a", null ],
+    [ "kvEntry_Value", "group__kv_entry.html#ga28077f81d71a30cbce2dc81e5c9574fc", null ],
+    [ "kvEntry_ValueLen", "group__kv_entry.html#gaf7ccc866865903f231e0431754ed2415", null ],
+    [ "kvEntry_ValueString", "group__kv_entry.html#ga7ff6220915726600545357e31226fb65", null ],
+    [ "kvEntry_Revision", "group__kv_entry.html#ga2d58abf81cb577e21a76f9c77568409f", null ],
+    [ "kvEntry_Created", "group__kv_entry.html#ga31ef3a2e3a7df6cf4dbb0a762737800a", null ],
+    [ "kvEntry_Delta", "group__kv_entry.html#ga233a2d75895cfd0140cf77757592cf47", null ],
+    [ "kvEntry_Operation", "group__kv_entry.html#ga088fd67d3d384ad7a7ddfc82535becea", null ],
+    [ "kvEntry_Destroy", "group__kv_entry.html#ga8359ffcdeefb9c5821e6442d0d5ee388", null ]
+];
\ No newline at end of file
diff --git a/doc/html/group__kv_group.html b/doc/html/group__kv_group.html
new file mode 100644 (file)
index 0000000..208f204
--- /dev/null
@@ -0,0 +1,1116 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: KeyValue store</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__kv_group.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#groups">Modules</a> &#124;
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle"><div class="title">KeyValue store<div class="ingroups"><a class="el" href="group__func_group.html">Functions</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="groups" name="groups"></a>
+Modules</h2></td></tr>
+<tr class="memitem:group__kv_group_mgt"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group_mgt.html">KeyValue store management</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:group__kv_entry"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_entry.html">KeyValue store entries</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:group__kv_watcher"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_watcher.html">KeyValue store watcher</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:group__kv_status"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_status.html">KeyValue store status</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:ga2db86f80d6bfce1bdbedf1b9da22913c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#ga2db86f80d6bfce1bdbedf1b9da22913c">kvStore_Get</a> (<a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> **new_entry, <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, const char *key)</td></tr>
+<tr class="memdesc:ga2db86f80d6bfce1bdbedf1b9da22913c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the latest entry for the key.  <a href="group__kv_group.html#ga2db86f80d6bfce1bdbedf1b9da22913c">More...</a><br /></td></tr>
+<tr class="separator:ga2db86f80d6bfce1bdbedf1b9da22913c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga9bf43431bb8264a3ea1f0df401afbe1a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#ga9bf43431bb8264a3ea1f0df401afbe1a">kvStore_GetRevision</a> (<a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> **new_entry, <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, const char *key, uint64_t revision)</td></tr>
+<tr class="memdesc:ga9bf43431bb8264a3ea1f0df401afbe1a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the entry at the specific revision for the key.  <a href="group__kv_group.html#ga9bf43431bb8264a3ea1f0df401afbe1a">More...</a><br /></td></tr>
+<tr class="separator:ga9bf43431bb8264a3ea1f0df401afbe1a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga1fdf7a1d3acf96e475184790589a401e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#ga1fdf7a1d3acf96e475184790589a401e">kvStore_Put</a> (uint64_t *rev, <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, const char *key, const void *data, int len)</td></tr>
+<tr class="memdesc:ga1fdf7a1d3acf96e475184790589a401e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Places the new value for the key into the store.  <a href="group__kv_group.html#ga1fdf7a1d3acf96e475184790589a401e">More...</a><br /></td></tr>
+<tr class="separator:ga1fdf7a1d3acf96e475184790589a401e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga84ebd66a95ce857765d4a16ec35daba9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#ga84ebd66a95ce857765d4a16ec35daba9">kvStore_PutString</a> (uint64_t *rev, <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, const char *key, const char *data)</td></tr>
+<tr class="memdesc:ga84ebd66a95ce857765d4a16ec35daba9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Places the new value (as a string) for the key into the store.  <a href="group__kv_group.html#ga84ebd66a95ce857765d4a16ec35daba9">More...</a><br /></td></tr>
+<tr class="separator:ga84ebd66a95ce857765d4a16ec35daba9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga5289f7cd3999cfb46fb1fcb83178aec6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#ga5289f7cd3999cfb46fb1fcb83178aec6">kvStore_Create</a> (uint64_t *rev, <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, const char *key, const void *data, int len)</td></tr>
+<tr class="memdesc:ga5289f7cd3999cfb46fb1fcb83178aec6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Places the value for the key into the store if and only if the key does not exist.  <a href="group__kv_group.html#ga5289f7cd3999cfb46fb1fcb83178aec6">More...</a><br /></td></tr>
+<tr class="separator:ga5289f7cd3999cfb46fb1fcb83178aec6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga5726ad2e6205d2f6749be013138218ca"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#ga5726ad2e6205d2f6749be013138218ca">kvStore_CreateString</a> (uint64_t *rev, <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, const char *key, const char *data)</td></tr>
+<tr class="memdesc:ga5726ad2e6205d2f6749be013138218ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Places the value (as a string) for the key into the store if and only if the key does not exist.  <a href="group__kv_group.html#ga5726ad2e6205d2f6749be013138218ca">More...</a><br /></td></tr>
+<tr class="separator:ga5726ad2e6205d2f6749be013138218ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gae0c593bb2ef94ae60e775617c9423038"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#gae0c593bb2ef94ae60e775617c9423038">kvStore_Update</a> (uint64_t *rev, <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, const char *key, const void *data, int len, uint64_t last)</td></tr>
+<tr class="memdesc:gae0c593bb2ef94ae60e775617c9423038"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates the value for the key into the store if and only if the latest revision matches.  <a href="group__kv_group.html#gae0c593bb2ef94ae60e775617c9423038">More...</a><br /></td></tr>
+<tr class="separator:gae0c593bb2ef94ae60e775617c9423038"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga13ed70f15cd1485cd15f96bcc4b7ad1c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#ga13ed70f15cd1485cd15f96bcc4b7ad1c">kvStore_UpdateString</a> (uint64_t *rev, <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, const char *key, const char *data, uint64_t last)</td></tr>
+<tr class="memdesc:ga13ed70f15cd1485cd15f96bcc4b7ad1c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates the value (as a string) for the key into the store if and only if the latest revision matches.  <a href="group__kv_group.html#ga13ed70f15cd1485cd15f96bcc4b7ad1c">More...</a><br /></td></tr>
+<tr class="separator:ga13ed70f15cd1485cd15f96bcc4b7ad1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga68101d46739ca894fd7c56c8661c08d8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#ga68101d46739ca894fd7c56c8661c08d8">kvStore_Delete</a> (<a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, const char *key)</td></tr>
+<tr class="memdesc:ga68101d46739ca894fd7c56c8661c08d8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deletes a key by placing a delete marker and leaving all revisions.  <a href="group__kv_group.html#ga68101d46739ca894fd7c56c8661c08d8">More...</a><br /></td></tr>
+<tr class="separator:ga68101d46739ca894fd7c56c8661c08d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga3d5fa3d895d0d3041440105b244e9ca9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#ga3d5fa3d895d0d3041440105b244e9ca9">kvStore_Purge</a> (<a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, const char *key, <a class="el" href="structkv_purge_options.html">kvPurgeOptions</a> *opts)</td></tr>
+<tr class="memdesc:ga3d5fa3d895d0d3041440105b244e9ca9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deletes a key by placing a purge marker and removing all revisions.  <a href="group__kv_group.html#ga3d5fa3d895d0d3041440105b244e9ca9">More...</a><br /></td></tr>
+<tr class="separator:ga3d5fa3d895d0d3041440105b244e9ca9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga762fd5de8cde683e46a6736a51e575f5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#ga762fd5de8cde683e46a6736a51e575f5">kvWatchOptions_Init</a> (<a class="el" href="structkv_watch_options.html">kvWatchOptions</a> *opts)</td></tr>
+<tr class="memdesc:ga762fd5de8cde683e46a6736a51e575f5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a KeyValue watcher options structure.  <a href="group__kv_group.html#ga762fd5de8cde683e46a6736a51e575f5">More...</a><br /></td></tr>
+<tr class="separator:ga762fd5de8cde683e46a6736a51e575f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga243113fd7df34ce104850ab888f04021"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#ga243113fd7df34ce104850ab888f04021">kvPurgeOptions_Init</a> (<a class="el" href="structkv_purge_options.html">kvPurgeOptions</a> *opts)</td></tr>
+<tr class="memdesc:ga243113fd7df34ce104850ab888f04021"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a KeyValue purge options structure.  <a href="group__kv_group.html#ga243113fd7df34ce104850ab888f04021">More...</a><br /></td></tr>
+<tr class="separator:ga243113fd7df34ce104850ab888f04021"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga34ab74b229ff88e64301ea53a274da69"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#ga34ab74b229ff88e64301ea53a274da69">kvStore_PurgeDeletes</a> (<a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, <a class="el" href="structkv_purge_options.html">kvPurgeOptions</a> *opts)</td></tr>
+<tr class="memdesc:ga34ab74b229ff88e64301ea53a274da69"><td class="mdescLeft">&#160;</td><td class="mdescRight">Purge and removes delete markers.  <a href="group__kv_group.html#ga34ab74b229ff88e64301ea53a274da69">More...</a><br /></td></tr>
+<tr class="separator:ga34ab74b229ff88e64301ea53a274da69"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga30feca870f580c7b9d2ad07a740505b2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#ga30feca870f580c7b9d2ad07a740505b2">kvStore_Watch</a> (<a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> **new_watcher, <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, const char *keys, <a class="el" href="structkv_watch_options.html">kvWatchOptions</a> *opts)</td></tr>
+<tr class="memdesc:ga30feca870f580c7b9d2ad07a740505b2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a watcher for any updates to keys that match the <code>keys</code> argument.  <a href="group__kv_group.html#ga30feca870f580c7b9d2ad07a740505b2">More...</a><br /></td></tr>
+<tr class="separator:ga30feca870f580c7b9d2ad07a740505b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf011f1dd6813391c65664e982747602e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#gaf011f1dd6813391c65664e982747602e">kvStore_WatchAll</a> (<a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> **new_watcher, <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, <a class="el" href="structkv_watch_options.html">kvWatchOptions</a> *opts)</td></tr>
+<tr class="memdesc:gaf011f1dd6813391c65664e982747602e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a watcher for any updates to any keys of the KeyValue store bucket.  <a href="group__kv_group.html#gaf011f1dd6813391c65664e982747602e">More...</a><br /></td></tr>
+<tr class="separator:gaf011f1dd6813391c65664e982747602e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga6030fc2a672ae868f7603587245b9d5a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#ga6030fc2a672ae868f7603587245b9d5a">kvStore_Keys</a> (<a class="el" href="structkv_keys_list.html">kvKeysList</a> *list, <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, <a class="el" href="structkv_watch_options.html">kvWatchOptions</a> *opts)</td></tr>
+<tr class="memdesc:ga6030fc2a672ae868f7603587245b9d5a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns all keys in the bucket.  <a href="group__kv_group.html#ga6030fc2a672ae868f7603587245b9d5a">More...</a><br /></td></tr>
+<tr class="separator:ga6030fc2a672ae868f7603587245b9d5a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga02ccd58bc5062f6ce6f94bf05e3dfe45"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#ga02ccd58bc5062f6ce6f94bf05e3dfe45">kvKeysList_Destroy</a> (<a class="el" href="structkv_keys_list.html">kvKeysList</a> *list)</td></tr>
+<tr class="memdesc:ga02ccd58bc5062f6ce6f94bf05e3dfe45"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys this list of KeyValue store key strings.  <a href="group__kv_group.html#ga02ccd58bc5062f6ce6f94bf05e3dfe45">More...</a><br /></td></tr>
+<tr class="separator:ga02ccd58bc5062f6ce6f94bf05e3dfe45"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga5aa57345313cee85b020e50c22023fb5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#ga5aa57345313cee85b020e50c22023fb5">kvStore_History</a> (<a class="el" href="structkv_entry_list.html">kvEntryList</a> *list, <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, const char *key, <a class="el" href="structkv_watch_options.html">kvWatchOptions</a> *opts)</td></tr>
+<tr class="memdesc:ga5aa57345313cee85b020e50c22023fb5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns all historical entries for the key.  <a href="group__kv_group.html#ga5aa57345313cee85b020e50c22023fb5">More...</a><br /></td></tr>
+<tr class="separator:ga5aa57345313cee85b020e50c22023fb5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gae783352ab81e22aa3173057d117518e6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#gae783352ab81e22aa3173057d117518e6">kvEntryList_Destroy</a> (<a class="el" href="structkv_entry_list.html">kvEntryList</a> *list)</td></tr>
+<tr class="memdesc:gae783352ab81e22aa3173057d117518e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys this list of KeyValue store entries.  <a href="group__kv_group.html#gae783352ab81e22aa3173057d117518e6">More...</a><br /></td></tr>
+<tr class="separator:gae783352ab81e22aa3173057d117518e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gad28fdf9aae16bba308cda799fca13281"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#gad28fdf9aae16bba308cda799fca13281">kvStore_Bucket</a> (<a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv)</td></tr>
+<tr class="memdesc:gad28fdf9aae16bba308cda799fca13281"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the bucket name of this KeyValue store object.  <a href="group__kv_group.html#gad28fdf9aae16bba308cda799fca13281">More...</a><br /></td></tr>
+<tr class="separator:gad28fdf9aae16bba308cda799fca13281"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gadf75e99cc28bc9c2d6eac7c9f7398c27"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#gadf75e99cc28bc9c2d6eac7c9f7398c27">kvStore_Status</a> (<a class="el" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a> **new_status, <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv)</td></tr>
+<tr class="memdesc:gadf75e99cc28bc9c2d6eac7c9f7398c27"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the status and configuration of a bucket.  <a href="group__kv_group.html#gadf75e99cc28bc9c2d6eac7c9f7398c27">More...</a><br /></td></tr>
+<tr class="separator:gadf75e99cc28bc9c2d6eac7c9f7398c27"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<p >A KeyValue store is a materialized view of JetStream.</p>
+<dl class="section warning"><dt>Warning</dt><dd>EXPERIMENTAL FEATURE! We reserve the right to change the API without necessarily bumping the major version of the library. </dd></dl>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="ga2db86f80d6bfce1bdbedf1b9da22913c" name="ga2db86f80d6bfce1bdbedf1b9da22913c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga2db86f80d6bfce1bdbedf1b9da22913c">&#9670;&#160;</a></span>kvStore_Get()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> kvStore_Get </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> **&#160;</td>
+          <td class="paramname"><em>new_entry</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *&#160;</td>
+          <td class="paramname"><em>kv</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>key</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the latest entry for the key.</p>
+<dl class="section note"><dt>Note</dt><dd>The entry should be destroyed to release memory using <a class="el" href="group__kv_entry.html#ga8359ffcdeefb9c5821e6442d0d5ee388" title="Destroys the KeyValue entry object.">kvEntry_Destroy</a>.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">new_entry</td><td>the location where to store the pointer to the entry associated with the <code>key</code>. </td></tr>
+    <tr><td class="paramname">kv</td><td>the pointer to the <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> object. </td></tr>
+    <tr><td class="paramname">key</td><td>the name of the key. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga9bf43431bb8264a3ea1f0df401afbe1a" name="ga9bf43431bb8264a3ea1f0df401afbe1a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga9bf43431bb8264a3ea1f0df401afbe1a">&#9670;&#160;</a></span>kvStore_GetRevision()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> kvStore_GetRevision </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> **&#160;</td>
+          <td class="paramname"><em>new_entry</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *&#160;</td>
+          <td class="paramname"><em>kv</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>key</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">uint64_t&#160;</td>
+          <td class="paramname"><em>revision</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the entry at the specific revision for the key, or <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ad0229a12b17d3d12a28efed6213720d8">NATS_NOT_FOUND</a> if there is no entry for that key and revision.</p>
+<dl class="section note"><dt>Note</dt><dd>The entry should be destroyed to release memory using <a class="el" href="group__kv_entry.html#ga8359ffcdeefb9c5821e6442d0d5ee388" title="Destroys the KeyValue entry object.">kvEntry_Destroy</a>.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">new_entry</td><td>the location where to store the pointer to the entry associated with the <code>key</code>. </td></tr>
+    <tr><td class="paramname">kv</td><td>the pointer to the <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> object. </td></tr>
+    <tr><td class="paramname">key</td><td>the name of the key. </td></tr>
+    <tr><td class="paramname">revision</td><td>the revision of the entry (must be &gt; 0). </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga1fdf7a1d3acf96e475184790589a401e" name="ga1fdf7a1d3acf96e475184790589a401e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga1fdf7a1d3acf96e475184790589a401e">&#9670;&#160;</a></span>kvStore_Put()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> kvStore_Put </td>
+          <td>(</td>
+          <td class="paramtype">uint64_t *&#160;</td>
+          <td class="paramname"><em>rev</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *&#160;</td>
+          <td class="paramname"><em>kv</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>key</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const void *&#160;</td>
+          <td class="paramname"><em>data</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&#160;</td>
+          <td class="paramname"><em>len</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Places the new value for the key into the store.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">rev</td><td>the location where to store the revision of this value, or <code>NULL</code> if the stream information is not needed. </td></tr>
+    <tr><td class="paramname">kv</td><td>the pointer to the <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> object. </td></tr>
+    <tr><td class="paramname">key</td><td>the name of the key. </td></tr>
+    <tr><td class="paramname">data</td><td>the pointer to the data in memory. </td></tr>
+    <tr><td class="paramname">len</td><td>the number of bytes to copy from the data's memory location. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga84ebd66a95ce857765d4a16ec35daba9" name="ga84ebd66a95ce857765d4a16ec35daba9"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga84ebd66a95ce857765d4a16ec35daba9">&#9670;&#160;</a></span>kvStore_PutString()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> kvStore_PutString </td>
+          <td>(</td>
+          <td class="paramtype">uint64_t *&#160;</td>
+          <td class="paramname"><em>rev</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *&#160;</td>
+          <td class="paramname"><em>kv</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>key</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>data</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Places the new value, as a string, for the key into the store.</p>
+<dl class="section note"><dt>Note</dt><dd>This is equivalent of calling <a class="el" href="group__kv_group.html#ga1fdf7a1d3acf96e475184790589a401e" title="Places the new value for the key into the store.">kvStore_Put</a> with <code>(int) strlen(data)</code>.</dd></dl>
+<dl class="section warning"><dt>Warning</dt><dd>The NULL terminating character is not included in the number of bytes stored in the KeyValue store.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">rev</td><td>the location where to store the revision of this value, or <code>NULL</code> if the stream information is not needed. </td></tr>
+    <tr><td class="paramname">kv</td><td>the pointer to the <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> object. </td></tr>
+    <tr><td class="paramname">key</td><td>the name of the key. </td></tr>
+    <tr><td class="paramname">data</td><td>the pointer to the string to store. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga5289f7cd3999cfb46fb1fcb83178aec6" name="ga5289f7cd3999cfb46fb1fcb83178aec6"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga5289f7cd3999cfb46fb1fcb83178aec6">&#9670;&#160;</a></span>kvStore_Create()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> kvStore_Create </td>
+          <td>(</td>
+          <td class="paramtype">uint64_t *&#160;</td>
+          <td class="paramname"><em>rev</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *&#160;</td>
+          <td class="paramname"><em>kv</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>key</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const void *&#160;</td>
+          <td class="paramname"><em>data</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&#160;</td>
+          <td class="paramname"><em>len</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Places the value for the key into the store if and only if the key does not exist.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">rev</td><td>the location where to store the revision of this value, or <code>NULL</code> if the stream information is not needed. </td></tr>
+    <tr><td class="paramname">kv</td><td>the pointer to the <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> object. </td></tr>
+    <tr><td class="paramname">key</td><td>the name of the key. </td></tr>
+    <tr><td class="paramname">data</td><td>the pointer to the data in memory. </td></tr>
+    <tr><td class="paramname">len</td><td>the number of bytes to copy from the data's memory location. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga5726ad2e6205d2f6749be013138218ca" name="ga5726ad2e6205d2f6749be013138218ca"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga5726ad2e6205d2f6749be013138218ca">&#9670;&#160;</a></span>kvStore_CreateString()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> kvStore_CreateString </td>
+          <td>(</td>
+          <td class="paramtype">uint64_t *&#160;</td>
+          <td class="paramname"><em>rev</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *&#160;</td>
+          <td class="paramname"><em>kv</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>key</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>data</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Places the value (as a string) for the key into the store if and only if the key does not exist.</p>
+<dl class="section note"><dt>Note</dt><dd>This is equivalent of calling <a class="el" href="group__kv_group.html#ga5289f7cd3999cfb46fb1fcb83178aec6" title="Places the value for the key into the store if and only if the key does not exist.">kvStore_Create</a> with <code>(int) strlen(data)</code>.</dd></dl>
+<dl class="section warning"><dt>Warning</dt><dd>The NULL terminating character is not included in the number of bytes stored in the KeyValue store.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">rev</td><td>the location where to store the revision of this value, or <code>NULL</code> if the stream information is not needed. </td></tr>
+    <tr><td class="paramname">kv</td><td>the pointer to the <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> object. </td></tr>
+    <tr><td class="paramname">key</td><td>the name of the key. </td></tr>
+    <tr><td class="paramname">data</td><td>the pointer to the string. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gae0c593bb2ef94ae60e775617c9423038" name="gae0c593bb2ef94ae60e775617c9423038"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gae0c593bb2ef94ae60e775617c9423038">&#9670;&#160;</a></span>kvStore_Update()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> kvStore_Update </td>
+          <td>(</td>
+          <td class="paramtype">uint64_t *&#160;</td>
+          <td class="paramname"><em>rev</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *&#160;</td>
+          <td class="paramname"><em>kv</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>key</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const void *&#160;</td>
+          <td class="paramname"><em>data</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&#160;</td>
+          <td class="paramname"><em>len</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">uint64_t&#160;</td>
+          <td class="paramname"><em>last</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Updates the value for the key into the store if and only if the latest revision matches.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">rev</td><td>the location where to store the revision of this value, or <code>NULL</code> if the stream information is not needed. </td></tr>
+    <tr><td class="paramname">kv</td><td>the pointer to the <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> object. </td></tr>
+    <tr><td class="paramname">key</td><td>the name of the key. </td></tr>
+    <tr><td class="paramname">data</td><td>the pointer to the data in memory. </td></tr>
+    <tr><td class="paramname">len</td><td>the number of bytes to copy from the data's memory location. </td></tr>
+    <tr><td class="paramname">last</td><td>the expected latest revision prior to the update. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga13ed70f15cd1485cd15f96bcc4b7ad1c" name="ga13ed70f15cd1485cd15f96bcc4b7ad1c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga13ed70f15cd1485cd15f96bcc4b7ad1c">&#9670;&#160;</a></span>kvStore_UpdateString()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> kvStore_UpdateString </td>
+          <td>(</td>
+          <td class="paramtype">uint64_t *&#160;</td>
+          <td class="paramname"><em>rev</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *&#160;</td>
+          <td class="paramname"><em>kv</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>key</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>data</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">uint64_t&#160;</td>
+          <td class="paramname"><em>last</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Updates the value (as a string) for the key into the store if and only if the latest revision matches.</p>
+<dl class="section note"><dt>Note</dt><dd>This is equivalent of calling <a class="el" href="group__kv_group.html#gae0c593bb2ef94ae60e775617c9423038" title="Updates the value for the key into the store if and only if the latest revision matches.">kvStore_Update</a> with <code>(int) strlen(data)</code>.</dd></dl>
+<dl class="section warning"><dt>Warning</dt><dd>The NULL terminating character is not included in the number of bytes stored in the KeyValue store.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">rev</td><td>the location where to store the revision of this value, or <code>NULL</code> if the stream information is not needed. </td></tr>
+    <tr><td class="paramname">kv</td><td>the pointer to the <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> object. </td></tr>
+    <tr><td class="paramname">key</td><td>the name of the key. </td></tr>
+    <tr><td class="paramname">data</td><td>the pointer to the string. </td></tr>
+    <tr><td class="paramname">last</td><td>the expected latest revision prior to the update. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga68101d46739ca894fd7c56c8661c08d8" name="ga68101d46739ca894fd7c56c8661c08d8"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga68101d46739ca894fd7c56c8661c08d8">&#9670;&#160;</a></span>kvStore_Delete()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> kvStore_Delete </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *&#160;</td>
+          <td class="paramname"><em>kv</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>key</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Deletes a key by placing a delete marker and leaving all revisions.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">kv</td><td>the pointer to the <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> object. </td></tr>
+    <tr><td class="paramname">key</td><td>the name of the key. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga3d5fa3d895d0d3041440105b244e9ca9" name="ga3d5fa3d895d0d3041440105b244e9ca9"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga3d5fa3d895d0d3041440105b244e9ca9">&#9670;&#160;</a></span>kvStore_Purge()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> kvStore_Purge </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *&#160;</td>
+          <td class="paramname"><em>kv</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>key</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structkv_purge_options.html">kvPurgeOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Deletes a key by placing a purge marker and removing all revisions.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">kv</td><td>the pointer to the <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> object. </td></tr>
+    <tr><td class="paramname">key</td><td>the name of the key. </td></tr>
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structkv_purge_options.html">kvPurgeOptions</a>, possibly <code>NULL</code>. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga762fd5de8cde683e46a6736a51e575f5" name="ga762fd5de8cde683e46a6736a51e575f5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga762fd5de8cde683e46a6736a51e575f5">&#9670;&#160;</a></span>kvWatchOptions_Init()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> kvWatchOptions_Init </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structkv_watch_options.html">kvWatchOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Use this before setting specific watcher options and passing it to <a class="el" href="group__kv_group.html#ga30feca870f580c7b9d2ad07a740505b2" title="Returns a watcher for any updates to keys that match the keys argument.">kvStore_Watch</a>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structkv_watch_options.html">kvWatchOptions</a> to initialize. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga243113fd7df34ce104850ab888f04021" name="ga243113fd7df34ce104850ab888f04021"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga243113fd7df34ce104850ab888f04021">&#9670;&#160;</a></span>kvPurgeOptions_Init()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> kvPurgeOptions_Init </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structkv_purge_options.html">kvPurgeOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Use this before setting specific purge options and passing it to <a class="el" href="group__kv_group.html#ga3d5fa3d895d0d3041440105b244e9ca9" title="Deletes a key by placing a purge marker and removing all revisions.">kvStore_Purge</a> or <a class="el" href="group__kv_group.html#ga34ab74b229ff88e64301ea53a274da69" title="Purge and removes delete markers.">kvStore_PurgeDeletes</a>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structkv_purge_options.html">kvPurgeOptions</a> to initialize. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga34ab74b229ff88e64301ea53a274da69" name="ga34ab74b229ff88e64301ea53a274da69"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga34ab74b229ff88e64301ea53a274da69">&#9670;&#160;</a></span>kvStore_PurgeDeletes()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> kvStore_PurgeDeletes </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *&#160;</td>
+          <td class="paramname"><em>kv</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structkv_purge_options.html">kvPurgeOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Removes data and delete markers, but may keep the markers that are considered more recent than a certain threshold (default is 30 minutes).</p>
+<p >This is a maintenance option if there is a larger buildup of delete markers.</p>
+<dl class="section note"><dt>Note</dt><dd>Use <a class="el" href="structkv_purge_options.html#a245c2def0f3aabe617219772cf7680a8">kvPurgeOptions.Timeout</a> to specify how long to wait (in milliseconds) in gathering all keys that have purge markers. This function will still purge some of the keys and return <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ab88994c9ea9889ac4d9d656d62f550ed">NATS_TIMEOUT</a> to indicate that it may not have deleted them all.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__kv_group.html#ga243113fd7df34ce104850ab888f04021" title="Initializes a KeyValue purge options structure.">kvPurgeOptions_Init</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">kv</td><td>the pointer to the <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> object. </td></tr>
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="structkv_purge_options.html">kvPurgeOptions</a>, possibly <code>NULL</code>. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga30feca870f580c7b9d2ad07a740505b2" name="ga30feca870f580c7b9d2ad07a740505b2"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga30feca870f580c7b9d2ad07a740505b2">&#9670;&#160;</a></span>kvStore_Watch()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> kvStore_Watch </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> **&#160;</td>
+          <td class="paramname"><em>new_watcher</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *&#160;</td>
+          <td class="paramname"><em>kv</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>keys</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structkv_watch_options.html">kvWatchOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns a watcher for any updates to keys that match the <code>keys</code> argument, which could include wildcard.</p>
+<p >A <code>NULL</code> entry will be posted when the watcher has received all initial values.</p>
+<p >Call <a class="el" href="group__kv_watcher.html#ga562c216a0199c30455af4c2da46000e5" title="Returns the next entry for this watcher.">kvWatcher_Next</a> to get the next <a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a>.</p>
+<dl class="section note"><dt>Note</dt><dd>The watcher should be destroyed to release memory using <a class="el" href="group__kv_watcher.html#ga21bc39fa795f7c4f392bd6d4e66ea1d9" title="Destroys the KeyValue watcher object.">kvWatcher_Destroy</a>.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">new_watcher</td><td>the location where to store the pointer to the new <a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> object. </td></tr>
+    <tr><td class="paramname">kv</td><td>the pointer to the <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> object. </td></tr>
+    <tr><td class="paramname">keys</td><td>the keys (wildcard possible) to create the watcher for. </td></tr>
+    <tr><td class="paramname">opts</td><td>the watcher options, possibly <code>NULL</code>. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gaf011f1dd6813391c65664e982747602e" name="gaf011f1dd6813391c65664e982747602e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaf011f1dd6813391c65664e982747602e">&#9670;&#160;</a></span>kvStore_WatchAll()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> kvStore_WatchAll </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> **&#160;</td>
+          <td class="paramname"><em>new_watcher</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *&#160;</td>
+          <td class="paramname"><em>kv</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structkv_watch_options.html">kvWatchOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns a watcher for any updates to any keys of the KeyValue store bucket.</p>
+<p >A <code>NULL</code> entry will be posted when the watcher has received all initial values.</p>
+<p >Call <a class="el" href="group__kv_watcher.html#ga562c216a0199c30455af4c2da46000e5" title="Returns the next entry for this watcher.">kvWatcher_Next</a> to get the next <a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a>.</p>
+<dl class="section note"><dt>Note</dt><dd>The watcher should be destroyed to release memory using <a class="el" href="group__kv_watcher.html#ga21bc39fa795f7c4f392bd6d4e66ea1d9" title="Destroys the KeyValue watcher object.">kvWatcher_Destroy</a>.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">new_watcher</td><td>the location where to store the pointer to the new <a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> object. </td></tr>
+    <tr><td class="paramname">kv</td><td>the pointer to the <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> object. </td></tr>
+    <tr><td class="paramname">opts</td><td>the watcher options, possibly <code>NULL</code>. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga6030fc2a672ae868f7603587245b9d5a" name="ga6030fc2a672ae868f7603587245b9d5a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga6030fc2a672ae868f7603587245b9d5a">&#9670;&#160;</a></span>kvStore_Keys()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> kvStore_Keys </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structkv_keys_list.html">kvKeysList</a> *&#160;</td>
+          <td class="paramname"><em>list</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *&#160;</td>
+          <td class="paramname"><em>kv</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structkv_watch_options.html">kvWatchOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns all keys in the bucket.</p>
+<dl class="section note"><dt>Note</dt><dd>Use <a class="el" href="structkv_watch_options.html#a56183d56585697d058c7eeb20bdddb66" title="How long to wait (in milliseconds) for some operations to complete.">kvWatchOptions.Timeout</a> to specify how long to wait (in milliseconds) to gather all keys for this bucket. If the deadline is reached, this function will return <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ab88994c9ea9889ac4d9d656d62f550ed">NATS_TIMEOUT</a> and no keys.</dd></dl>
+<dl class="section warning"><dt>Warning</dt><dd>The user should call <a class="el" href="group__kv_group.html#ga02ccd58bc5062f6ce6f94bf05e3dfe45" title="Destroys this list of KeyValue store key strings.">kvKeysList_Destroy</a> to release memory allocated for the entries list.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__kv_group.html#ga762fd5de8cde683e46a6736a51e575f5" title="Initializes a KeyValue watcher options structure.">kvWatchOptions_Init</a> </dd>
+<dd>
+<a class="el" href="group__kv_group.html#ga02ccd58bc5062f6ce6f94bf05e3dfe45" title="Destroys this list of KeyValue store key strings.">kvKeysList_Destroy</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">list</td><td>list the pointer to a <a class="el" href="structkv_keys_list.html" title="A list of KeyValue store keys.">kvKeysList</a> that will be initialized and filled with resulting key strings. </td></tr>
+    <tr><td class="paramname">kv</td><td>the pointer to the <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> object. </td></tr>
+    <tr><td class="paramname">opts</td><td>the history options, possibly <code>NULL</code>. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga02ccd58bc5062f6ce6f94bf05e3dfe45" name="ga02ccd58bc5062f6ce6f94bf05e3dfe45"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga02ccd58bc5062f6ce6f94bf05e3dfe45">&#9670;&#160;</a></span>kvKeysList_Destroy()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void kvKeysList_Destroy </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structkv_keys_list.html">kvKeysList</a> *&#160;</td>
+          <td class="paramname"><em>list</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This function iterates through the list of all key strings and free them. It then frees the array that was allocated to hold pointers to those keys.</p>
+<dl class="section note"><dt>Note</dt><dd>The <a class="el" href="structkv_keys_list.html" title="A list of KeyValue store keys.">kvKeysList</a> object itself is not freed since it is expected that users will pass a pointer to a stack object. Should the user create its own object, it will be the user responsibility to free this object.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">list</td><td>the <a class="el" href="structkv_keys_list.html" title="A list of KeyValue store keys.">kvKeysList</a> list of key strings to destroy. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga5aa57345313cee85b020e50c22023fb5" name="ga5aa57345313cee85b020e50c22023fb5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga5aa57345313cee85b020e50c22023fb5">&#9670;&#160;</a></span>kvStore_History()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> kvStore_History </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structkv_entry_list.html">kvEntryList</a> *&#160;</td>
+          <td class="paramname"><em>list</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *&#160;</td>
+          <td class="paramname"><em>kv</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>key</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structkv_watch_options.html">kvWatchOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns all historical entries for the key</p>
+<p >Use the options to alter the behavior. For instance, if delete markers are not desired, option <a class="el" href="structkv_watch_options.html#a0535edd21b26affc0057575bafc21a07">kvWatchOptions.IgnoreDeletes</a> should be specified.</p>
+<dl class="section note"><dt>Note</dt><dd>Use <a class="el" href="structkv_watch_options.html#a56183d56585697d058c7eeb20bdddb66" title="How long to wait (in milliseconds) for some operations to complete.">kvWatchOptions.Timeout</a> to specify how long to wait (in milliseconds) to gather all entries for this key. If the deadline is reached, this function will return <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ab88994c9ea9889ac4d9d656d62f550ed">NATS_TIMEOUT</a> and no entries.</dd></dl>
+<dl class="section warning"><dt>Warning</dt><dd>The user should call <a class="el" href="group__kv_group.html#gae783352ab81e22aa3173057d117518e6" title="Destroys this list of KeyValue store entries.">kvEntryList_Destroy</a> to release memory allocated for the entries list.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__kv_group.html#ga762fd5de8cde683e46a6736a51e575f5" title="Initializes a KeyValue watcher options structure.">kvWatchOptions_Init</a> </dd>
+<dd>
+<a class="el" href="group__kv_group.html#gae783352ab81e22aa3173057d117518e6" title="Destroys this list of KeyValue store entries.">kvEntryList_Destroy</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">list</td><td>the pointer to a <a class="el" href="structkv_entry_list.html" title="A list of KeyValue store entries.">kvEntryList</a> that will be initialized and filled with resulting entries. </td></tr>
+    <tr><td class="paramname">kv</td><td>the pointer to the <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> object. </td></tr>
+    <tr><td class="paramname">key</td><td>the key for which the history is requested. </td></tr>
+    <tr><td class="paramname">opts</td><td>the history options, possibly <code>NULL</code>. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gae783352ab81e22aa3173057d117518e6" name="gae783352ab81e22aa3173057d117518e6"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gae783352ab81e22aa3173057d117518e6">&#9670;&#160;</a></span>kvEntryList_Destroy()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void kvEntryList_Destroy </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structkv_entry_list.html">kvEntryList</a> *&#160;</td>
+          <td class="paramname"><em>list</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This function iterates through the list of all entries and call <a class="el" href="group__kv_entry.html#ga8359ffcdeefb9c5821e6442d0d5ee388" title="Destroys the KeyValue entry object.">kvEntry_Destroy</a>. It then frees the array that was allocated to hold pointers to those entries.</p>
+<dl class="section note"><dt>Note</dt><dd>The <a class="el" href="structkv_entry_list.html" title="A list of KeyValue store entries.">kvEntryList</a> object itself is not freed since it is expected that users will pass a pointer to a stack object. Should the user create its own object, it will be the user responsibility to free this object.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">list</td><td>the <a class="el" href="structkv_entry_list.html" title="A list of KeyValue store entries.">kvEntryList</a> list of <a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> objects to destroy. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gad28fdf9aae16bba308cda799fca13281" name="gad28fdf9aae16bba308cda799fca13281"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gad28fdf9aae16bba308cda799fca13281">&#9670;&#160;</a></span>kvStore_Bucket()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char * kvStore_Bucket </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *&#160;</td>
+          <td class="paramname"><em>kv</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the bucket name of this KeyValue store object, or <code>NULL</code> if <code>kv</code> itself is NULL.</p>
+<dl class="section warning"><dt>Warning</dt><dd>Do not free the string returned by this function.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">kv</td><td>the pointer to the <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gadf75e99cc28bc9c2d6eac7c9f7398c27" name="gadf75e99cc28bc9c2d6eac7c9f7398c27"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gadf75e99cc28bc9c2d6eac7c9f7398c27">&#9670;&#160;</a></span>kvStore_Status()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> kvStore_Status </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a> **&#160;</td>
+          <td class="paramname"><em>new_status</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *&#160;</td>
+          <td class="paramname"><em>kv</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the status and configuration of a bucket.</p>
+<dl class="section note"><dt>Note</dt><dd>The status should be destroyed to release memory using <a class="el" href="group__kv_status.html#ga5eb3d824c1873af705beee4798246a08" title="Destroys the KeyValue status object.">kvStatus_Destroy</a>.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">new_status</td><td>the location where to store the status of this KeyValue store. </td></tr>
+    <tr><td class="paramname">kv</td><td>the pointer to the <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__kv_group.js b/doc/html/group__kv_group.js
new file mode 100644 (file)
index 0000000..31341ef
--- /dev/null
@@ -0,0 +1,28 @@
+var group__kv_group =
+[
+    [ "KeyValue store management", "group__kv_group_mgt.html", "group__kv_group_mgt" ],
+    [ "KeyValue store entries", "group__kv_entry.html", "group__kv_entry" ],
+    [ "KeyValue store watcher", "group__kv_watcher.html", "group__kv_watcher" ],
+    [ "KeyValue store status", "group__kv_status.html", "group__kv_status" ],
+    [ "kvStore_Get", "group__kv_group.html#ga2db86f80d6bfce1bdbedf1b9da22913c", null ],
+    [ "kvStore_GetRevision", "group__kv_group.html#ga9bf43431bb8264a3ea1f0df401afbe1a", null ],
+    [ "kvStore_Put", "group__kv_group.html#ga1fdf7a1d3acf96e475184790589a401e", null ],
+    [ "kvStore_PutString", "group__kv_group.html#ga84ebd66a95ce857765d4a16ec35daba9", null ],
+    [ "kvStore_Create", "group__kv_group.html#ga5289f7cd3999cfb46fb1fcb83178aec6", null ],
+    [ "kvStore_CreateString", "group__kv_group.html#ga5726ad2e6205d2f6749be013138218ca", null ],
+    [ "kvStore_Update", "group__kv_group.html#gae0c593bb2ef94ae60e775617c9423038", null ],
+    [ "kvStore_UpdateString", "group__kv_group.html#ga13ed70f15cd1485cd15f96bcc4b7ad1c", null ],
+    [ "kvStore_Delete", "group__kv_group.html#ga68101d46739ca894fd7c56c8661c08d8", null ],
+    [ "kvStore_Purge", "group__kv_group.html#ga3d5fa3d895d0d3041440105b244e9ca9", null ],
+    [ "kvWatchOptions_Init", "group__kv_group.html#ga762fd5de8cde683e46a6736a51e575f5", null ],
+    [ "kvPurgeOptions_Init", "group__kv_group.html#ga243113fd7df34ce104850ab888f04021", null ],
+    [ "kvStore_PurgeDeletes", "group__kv_group.html#ga34ab74b229ff88e64301ea53a274da69", null ],
+    [ "kvStore_Watch", "group__kv_group.html#ga30feca870f580c7b9d2ad07a740505b2", null ],
+    [ "kvStore_WatchAll", "group__kv_group.html#gaf011f1dd6813391c65664e982747602e", null ],
+    [ "kvStore_Keys", "group__kv_group.html#ga6030fc2a672ae868f7603587245b9d5a", null ],
+    [ "kvKeysList_Destroy", "group__kv_group.html#ga02ccd58bc5062f6ce6f94bf05e3dfe45", null ],
+    [ "kvStore_History", "group__kv_group.html#ga5aa57345313cee85b020e50c22023fb5", null ],
+    [ "kvEntryList_Destroy", "group__kv_group.html#gae783352ab81e22aa3173057d117518e6", null ],
+    [ "kvStore_Bucket", "group__kv_group.html#gad28fdf9aae16bba308cda799fca13281", null ],
+    [ "kvStore_Status", "group__kv_group.html#gadf75e99cc28bc9c2d6eac7c9f7398c27", null ]
+];
\ No newline at end of file
diff --git a/doc/html/group__kv_group_mgt.html b/doc/html/group__kv_group_mgt.html
new file mode 100644 (file)
index 0000000..ad9a7b1
--- /dev/null
@@ -0,0 +1,312 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: KeyValue store management</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__kv_group_mgt.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle"><div class="title">KeyValue store management<div class="ingroups"><a class="el" href="group__func_group.html">Functions</a> &raquo; <a class="el" href="group__kv_group.html">KeyValue store</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:ga16d4c27d8ac62bb86ba601bc40f53172"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group_mgt.html#ga16d4c27d8ac62bb86ba601bc40f53172">kvConfig_Init</a> (<a class="el" href="structkv_config.html">kvConfig</a> *cfg)</td></tr>
+<tr class="memdesc:ga16d4c27d8ac62bb86ba601bc40f53172"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a KeyValue configuration structure.  <a href="group__kv_group_mgt.html#ga16d4c27d8ac62bb86ba601bc40f53172">More...</a><br /></td></tr>
+<tr class="separator:ga16d4c27d8ac62bb86ba601bc40f53172"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gabc445bfe87112e56a6c73872fec6893e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group_mgt.html#gabc445bfe87112e56a6c73872fec6893e">js_CreateKeyValue</a> (<a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> **new_kv, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="el" href="structkv_config.html">kvConfig</a> *cfg)</td></tr>
+<tr class="memdesc:gabc445bfe87112e56a6c73872fec6893e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a KeyValue store with a given configuration.  <a href="group__kv_group_mgt.html#gabc445bfe87112e56a6c73872fec6893e">More...</a><br /></td></tr>
+<tr class="separator:gabc445bfe87112e56a6c73872fec6893e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga54e6c109a7c633e431b3eded286e00f6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group_mgt.html#ga54e6c109a7c633e431b3eded286e00f6">js_KeyValue</a> (<a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> **new_kv, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *bucket)</td></tr>
+<tr class="memdesc:ga54e6c109a7c633e431b3eded286e00f6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Looks-up and binds to an existing KeyValue store.  <a href="group__kv_group_mgt.html#ga54e6c109a7c633e431b3eded286e00f6">More...</a><br /></td></tr>
+<tr class="separator:ga54e6c109a7c633e431b3eded286e00f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga6bc715319560bc28359679fcdcead937"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group_mgt.html#ga6bc715319560bc28359679fcdcead937">js_DeleteKeyValue</a> (<a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *bucket)</td></tr>
+<tr class="memdesc:ga6bc715319560bc28359679fcdcead937"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deletes a KeyValue store.  <a href="group__kv_group_mgt.html#ga6bc715319560bc28359679fcdcead937">More...</a><br /></td></tr>
+<tr class="separator:ga6bc715319560bc28359679fcdcead937"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gab0d6bdbfabd27af67eaeb36cec0787da"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group_mgt.html#gab0d6bdbfabd27af67eaeb36cec0787da">kvStore_Destroy</a> (<a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv)</td></tr>
+<tr class="memdesc:gab0d6bdbfabd27af67eaeb36cec0787da"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys a KeyValue store object.  <a href="group__kv_group_mgt.html#gab0d6bdbfabd27af67eaeb36cec0787da">More...</a><br /></td></tr>
+<tr class="separator:gab0d6bdbfabd27af67eaeb36cec0787da"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<p >These functions allow to create, get or delete a KeyValue store.</p>
+<dl class="section warning"><dt>Warning</dt><dd>EXPERIMENTAL FEATURE! We reserve the right to change the API without necessarily bumping the major version of the library. </dd></dl>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="ga16d4c27d8ac62bb86ba601bc40f53172" name="ga16d4c27d8ac62bb86ba601bc40f53172"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga16d4c27d8ac62bb86ba601bc40f53172">&#9670;&#160;</a></span>kvConfig_Init()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> kvConfig_Init </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structkv_config.html">kvConfig</a> *&#160;</td>
+          <td class="paramname"><em>cfg</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Use this before setting specific <a class="el" href="structkv_config.html">kvConfig</a> options and passing it to <a class="el" href="group__kv_group_mgt.html#gabc445bfe87112e56a6c73872fec6893e" title="Creates a KeyValue store with a given configuration.">js_CreateKeyValue</a>.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__kv_group_mgt.html#gabc445bfe87112e56a6c73872fec6893e" title="Creates a KeyValue store with a given configuration.">js_CreateKeyValue</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">cfg</td><td>the pointer to the stack variable <a class="el" href="structkv_config.html">kvConfig</a> to initialize. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gabc445bfe87112e56a6c73872fec6893e" name="gabc445bfe87112e56a6c73872fec6893e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gabc445bfe87112e56a6c73872fec6893e">&#9670;&#160;</a></span>js_CreateKeyValue()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> js_CreateKeyValue </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> **&#160;</td>
+          <td class="paramname"><em>new_kv</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *&#160;</td>
+          <td class="paramname"><em>js</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structkv_config.html">kvConfig</a> *&#160;</td>
+          <td class="paramname"><em>cfg</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Creates a KeyValue store with a given configuration.</p>
+<p >Bucket names are restricted to this set of characters: <code>A-Z</code>, <code>a-z</code>, <code>0-9</code>, <code>_</code> and <code>-</code>.</p>
+<dl class="section note"><dt>Note</dt><dd>The return <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> object needs to be destroyed using <a class="el" href="group__kv_group_mgt.html#gab0d6bdbfabd27af67eaeb36cec0787da" title="Destroys a KeyValue store object.">kvStore_Destroy</a> when no longer needed to free allocated memory. This is different from deleting a KeyValue store from the server using the <a class="el" href="group__kv_group_mgt.html#ga6bc715319560bc28359679fcdcead937" title="Deletes a KeyValue store.">js_DeleteKeyValue</a> API.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">new_kv</td><td>the location where to store the newly created <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> object. </td></tr>
+    <tr><td class="paramname">js</td><td>the pointer to the <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> object. </td></tr>
+    <tr><td class="paramname">cfg</td><td>the pointer to the <a class="el" href="structkv_config.html">kvConfig</a> configuration information used to create the <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga54e6c109a7c633e431b3eded286e00f6" name="ga54e6c109a7c633e431b3eded286e00f6"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga54e6c109a7c633e431b3eded286e00f6">&#9670;&#160;</a></span>js_KeyValue()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> js_KeyValue </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> **&#160;</td>
+          <td class="paramname"><em>new_kv</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *&#160;</td>
+          <td class="paramname"><em>js</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>bucket</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This call is when the user wants to use an existing KeyValue store. If the store does not already exists, an error is returned.</p>
+<p >Bucket names are restricted to this set of characters: <code>A-Z</code>, <code>a-z</code>, <code>0-9</code>, <code>_</code> and <code>-</code>.</p>
+<dl class="section note"><dt>Note</dt><dd>The return <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> object needs to be destroyed using <a class="el" href="group__kv_group_mgt.html#gab0d6bdbfabd27af67eaeb36cec0787da" title="Destroys a KeyValue store object.">kvStore_Destroy</a> when no longer needed to free allocated memory. This is different from deleting a KeyValue store from the server using the <a class="el" href="group__kv_group_mgt.html#ga6bc715319560bc28359679fcdcead937" title="Deletes a KeyValue store.">js_DeleteKeyValue</a> API.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">new_kv</td><td>the location where to store the newly created <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> object. </td></tr>
+    <tr><td class="paramname">js</td><td>the pointer to the <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> object. </td></tr>
+    <tr><td class="paramname">bucket</td><td>the name of the bucket of the existing KeyValue store. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga6bc715319560bc28359679fcdcead937" name="ga6bc715319560bc28359679fcdcead937"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga6bc715319560bc28359679fcdcead937">&#9670;&#160;</a></span>js_DeleteKeyValue()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> js_DeleteKeyValue </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *&#160;</td>
+          <td class="paramname"><em>js</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>bucket</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This will delete the KeyValue store with the <code>bucket</code> name.</p>
+<p >Bucket names are restricted to this set of characters: <code>A-Z</code>, <code>a-z</code>, <code>0-9</code>, <code>_</code> and <code>-</code>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">js</td><td>the pointer to the <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> object. </td></tr>
+    <tr><td class="paramname">bucket</td><td>the name of the bucket of the existing KeyValue store. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gab0d6bdbfabd27af67eaeb36cec0787da" name="gab0d6bdbfabd27af67eaeb36cec0787da"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gab0d6bdbfabd27af67eaeb36cec0787da">&#9670;&#160;</a></span>kvStore_Destroy()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void kvStore_Destroy </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *&#160;</td>
+          <td class="paramname"><em>kv</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This will simply free memory resources in the library for this <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a>, but does not delete the KeyValue store in the server.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">kv</td><td>the pointer to the <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__kv_group_mgt.js b/doc/html/group__kv_group_mgt.js
new file mode 100644 (file)
index 0000000..2e201a5
--- /dev/null
@@ -0,0 +1,8 @@
+var group__kv_group_mgt =
+[
+    [ "kvConfig_Init", "group__kv_group_mgt.html#ga16d4c27d8ac62bb86ba601bc40f53172", null ],
+    [ "js_CreateKeyValue", "group__kv_group_mgt.html#gabc445bfe87112e56a6c73872fec6893e", null ],
+    [ "js_KeyValue", "group__kv_group_mgt.html#ga54e6c109a7c633e431b3eded286e00f6", null ],
+    [ "js_DeleteKeyValue", "group__kv_group_mgt.html#ga6bc715319560bc28359679fcdcead937", null ],
+    [ "kvStore_Destroy", "group__kv_group_mgt.html#gab0d6bdbfabd27af67eaeb36cec0787da", null ]
+];
\ No newline at end of file
diff --git a/doc/html/group__kv_status.html b/doc/html/group__kv_status.html
new file mode 100644 (file)
index 0000000..149cdc3
--- /dev/null
@@ -0,0 +1,287 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: KeyValue store status</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__kv_status.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle"><div class="title">KeyValue store status<div class="ingroups"><a class="el" href="group__func_group.html">Functions</a> &raquo; <a class="el" href="group__kv_group.html">KeyValue store</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:ga1acec36db32207f21e15afc26bb5af1c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_status.html#ga1acec36db32207f21e15afc26bb5af1c">kvStatus_Bucket</a> (<a class="el" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a> *sts)</td></tr>
+<tr class="memdesc:ga1acec36db32207f21e15afc26bb5af1c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the bucket name.  <a href="group__kv_status.html#ga1acec36db32207f21e15afc26bb5af1c">More...</a><br /></td></tr>
+<tr class="separator:ga1acec36db32207f21e15afc26bb5af1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2016af3c73841d8b226361e764dce158"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_status.html#ga2016af3c73841d8b226361e764dce158">kvStatus_Values</a> (<a class="el" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a> *sts)</td></tr>
+<tr class="memdesc:ga2016af3c73841d8b226361e764dce158"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns how many messages are in the bucket, including historical values.  <a href="group__kv_status.html#ga2016af3c73841d8b226361e764dce158">More...</a><br /></td></tr>
+<tr class="separator:ga2016af3c73841d8b226361e764dce158"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gada6f22b5659b184762cea4f45d369ee5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_status.html#gada6f22b5659b184762cea4f45d369ee5">kvStatus_History</a> (<a class="el" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a> *sts)</td></tr>
+<tr class="memdesc:gada6f22b5659b184762cea4f45d369ee5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the configured history kept per key.  <a href="group__kv_status.html#gada6f22b5659b184762cea4f45d369ee5">More...</a><br /></td></tr>
+<tr class="separator:gada6f22b5659b184762cea4f45d369ee5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaa747ad0a6182ec7a47fb47018c33d1c1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_status.html#gaa747ad0a6182ec7a47fb47018c33d1c1">kvStatus_TTL</a> (<a class="el" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a> *sts)</td></tr>
+<tr class="memdesc:gaa747ad0a6182ec7a47fb47018c33d1c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns how long the bucket keeps values for.  <a href="group__kv_status.html#gaa747ad0a6182ec7a47fb47018c33d1c1">More...</a><br /></td></tr>
+<tr class="separator:gaa747ad0a6182ec7a47fb47018c33d1c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga86b114f4dac9f06df86101f84bd497b2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_status.html#ga86b114f4dac9f06df86101f84bd497b2">kvStatus_Replicas</a> (<a class="el" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a> *sts)</td></tr>
+<tr class="memdesc:ga86b114f4dac9f06df86101f84bd497b2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of replicas to keep for a bucket.  <a href="group__kv_status.html#ga86b114f4dac9f06df86101f84bd497b2">More...</a><br /></td></tr>
+<tr class="separator:ga86b114f4dac9f06df86101f84bd497b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga5eb3d824c1873af705beee4798246a08"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_status.html#ga5eb3d824c1873af705beee4798246a08">kvStatus_Destroy</a> (<a class="el" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a> *sts)</td></tr>
+<tr class="memdesc:ga5eb3d824c1873af705beee4798246a08"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the KeyValue status object.  <a href="group__kv_status.html#ga5eb3d824c1873af705beee4798246a08">More...</a><br /></td></tr>
+<tr class="separator:ga5eb3d824c1873af705beee4798246a08"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<p >These functions allow to inspect the status of a bucket.</p>
+<dl class="section warning"><dt>Warning</dt><dd>EXPERIMENTAL FEATURE! We reserve the right to change the API without necessarily bumping the major version of the library. </dd></dl>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="ga1acec36db32207f21e15afc26bb5af1c" name="ga1acec36db32207f21e15afc26bb5af1c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga1acec36db32207f21e15afc26bb5af1c">&#9670;&#160;</a></span>kvStatus_Bucket()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char * kvStatus_Bucket </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a> *&#160;</td>
+          <td class="paramname"><em>sts</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the bucket name, or <code>NULL</code> if <code>sts</code> itself is <code>NULL</code>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sts</td><td>the pointer to the <a class="el" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga2016af3c73841d8b226361e764dce158" name="ga2016af3c73841d8b226361e764dce158"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga2016af3c73841d8b226361e764dce158">&#9670;&#160;</a></span>kvStatus_Values()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> uint64_t kvStatus_Values </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a> *&#160;</td>
+          <td class="paramname"><em>sts</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns how many messages are in the bucket, including historical values, or <code>0</code> if <code>sts</code> itself is <code>NULL</code>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sts</td><td>the pointer to the <a class="el" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gada6f22b5659b184762cea4f45d369ee5" name="gada6f22b5659b184762cea4f45d369ee5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gada6f22b5659b184762cea4f45d369ee5">&#9670;&#160;</a></span>kvStatus_History()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t kvStatus_History </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a> *&#160;</td>
+          <td class="paramname"><em>sts</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the configured history kept per key, or <code>0</code> if <code>sts</code> itself is <code>NULL</code>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sts</td><td>the pointer to the <a class="el" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gaa747ad0a6182ec7a47fb47018c33d1c1" name="gaa747ad0a6182ec7a47fb47018c33d1c1"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaa747ad0a6182ec7a47fb47018c33d1c1">&#9670;&#160;</a></span>kvStatus_TTL()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t kvStatus_TTL </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a> *&#160;</td>
+          <td class="paramname"><em>sts</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns how long the bucket keeps values for, or <code>0</code> if <code>sts</code> itself is <code>NULL</code>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sts</td><td>the pointer to the <a class="el" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga86b114f4dac9f06df86101f84bd497b2" name="ga86b114f4dac9f06df86101f84bd497b2"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga86b114f4dac9f06df86101f84bd497b2">&#9670;&#160;</a></span>kvStatus_Replicas()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t kvStatus_Replicas </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a> *&#160;</td>
+          <td class="paramname"><em>sts</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the number of replicas to keep for a bucket, or <code>0</code> if <code>sts</code> itself is <code>NULL</code>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sts</td><td>the pointer to the <a class="el" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga5eb3d824c1873af705beee4798246a08" name="ga5eb3d824c1873af705beee4798246a08"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga5eb3d824c1873af705beee4798246a08">&#9670;&#160;</a></span>kvStatus_Destroy()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void kvStatus_Destroy </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a> *&#160;</td>
+          <td class="paramname"><em>sts</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Releases memory allocated for this <a class="el" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a> object.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sts</td><td>the pointer to the <a class="el" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__kv_status.js b/doc/html/group__kv_status.js
new file mode 100644 (file)
index 0000000..d12a97a
--- /dev/null
@@ -0,0 +1,9 @@
+var group__kv_status =
+[
+    [ "kvStatus_Bucket", "group__kv_status.html#ga1acec36db32207f21e15afc26bb5af1c", null ],
+    [ "kvStatus_Values", "group__kv_status.html#ga2016af3c73841d8b226361e764dce158", null ],
+    [ "kvStatus_History", "group__kv_status.html#gada6f22b5659b184762cea4f45d369ee5", null ],
+    [ "kvStatus_TTL", "group__kv_status.html#gaa747ad0a6182ec7a47fb47018c33d1c1", null ],
+    [ "kvStatus_Replicas", "group__kv_status.html#ga86b114f4dac9f06df86101f84bd497b2", null ],
+    [ "kvStatus_Destroy", "group__kv_status.html#ga5eb3d824c1873af705beee4798246a08", null ]
+];
\ No newline at end of file
diff --git a/doc/html/group__kv_watcher.html b/doc/html/group__kv_watcher.html
new file mode 100644 (file)
index 0000000..2dd05fb
--- /dev/null
@@ -0,0 +1,224 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: KeyValue store watcher</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__kv_watcher.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle"><div class="title">KeyValue store watcher<div class="ingroups"><a class="el" href="group__func_group.html">Functions</a> &raquo; <a class="el" href="group__kv_group.html">KeyValue store</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:ga562c216a0199c30455af4c2da46000e5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_watcher.html#ga562c216a0199c30455af4c2da46000e5">kvWatcher_Next</a> (<a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> **new_entry, <a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> *w, int64_t timeout)</td></tr>
+<tr class="memdesc:ga562c216a0199c30455af4c2da46000e5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the next entry for this watcher.  <a href="group__kv_watcher.html#ga562c216a0199c30455af4c2da46000e5">More...</a><br /></td></tr>
+<tr class="separator:ga562c216a0199c30455af4c2da46000e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga73adf44114fedd62ef75ebd81839b65e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_watcher.html#ga73adf44114fedd62ef75ebd81839b65e">kvWatcher_Stop</a> (<a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> *w)</td></tr>
+<tr class="memdesc:ga73adf44114fedd62ef75ebd81839b65e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stops the watcher.  <a href="group__kv_watcher.html#ga73adf44114fedd62ef75ebd81839b65e">More...</a><br /></td></tr>
+<tr class="separator:ga73adf44114fedd62ef75ebd81839b65e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga21bc39fa795f7c4f392bd6d4e66ea1d9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_watcher.html#ga21bc39fa795f7c4f392bd6d4e66ea1d9">kvWatcher_Destroy</a> (<a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> *w)</td></tr>
+<tr class="memdesc:ga21bc39fa795f7c4f392bd6d4e66ea1d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the KeyValue watcher object.  <a href="group__kv_watcher.html#ga21bc39fa795f7c4f392bd6d4e66ea1d9">More...</a><br /></td></tr>
+<tr class="separator:ga21bc39fa795f7c4f392bd6d4e66ea1d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<p >These functions allow to receive updates for key(s) on a given bucket.</p>
+<dl class="section warning"><dt>Warning</dt><dd>EXPERIMENTAL FEATURE! We reserve the right to change the API without necessarily bumping the major version of the library. </dd></dl>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="ga562c216a0199c30455af4c2da46000e5" name="ga562c216a0199c30455af4c2da46000e5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga562c216a0199c30455af4c2da46000e5">&#9670;&#160;</a></span>kvWatcher_Next()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> kvWatcher_Next </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> **&#160;</td>
+          <td class="paramname"><em>new_entry</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> *&#160;</td>
+          <td class="paramname"><em>w</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int64_t&#160;</td>
+          <td class="paramname"><em>timeout</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the next entry for this watcher. The entry may be <code>NULL</code> (with <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990" title="Success.">NATS_OK</a> status) to indicate that the initial state has been retrieved.</p>
+<p >If a thread is waiting on this call, it can be canceled with a call to <a class="el" href="group__kv_watcher.html#ga73adf44114fedd62ef75ebd81839b65e" title="Stops the watcher.">kvWatcher_Stop</a>.</p>
+<dl class="section note"><dt>Note</dt><dd>The entry should be destroyed to release memory using <a class="el" href="group__kv_entry.html#ga8359ffcdeefb9c5821e6442d0d5ee388" title="Destroys the KeyValue entry object.">kvEntry_Destroy</a>.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">new_entry</td><td>the location where to store the pointer to the <a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> object. </td></tr>
+    <tr><td class="paramname">w</td><td>the pointer to the <a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> object. </td></tr>
+    <tr><td class="paramname">timeout</td><td>how long to wait (in milliseconds) for the next entry. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga73adf44114fedd62ef75ebd81839b65e" name="ga73adf44114fedd62ef75ebd81839b65e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga73adf44114fedd62ef75ebd81839b65e">&#9670;&#160;</a></span>kvWatcher_Stop()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> kvWatcher_Stop </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> *&#160;</td>
+          <td class="paramname"><em>w</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Stops the watcher. Stopping a stopped watcher returns <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990" title="Success.">NATS_OK</a>.</p>
+<p >After this call, new and existing calls to <a class="el" href="group__kv_watcher.html#ga562c216a0199c30455af4c2da46000e5" title="Returns the next entry for this watcher.">kvWatcher_Next</a> (that are waiting for an update) will return with <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9bb78b4f245d2870040d25c450febd4b">NATS_ILLEGAL_STATE</a>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">w</td><td>the pointer to the <a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga21bc39fa795f7c4f392bd6d4e66ea1d9" name="ga21bc39fa795f7c4f392bd6d4e66ea1d9"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga21bc39fa795f7c4f392bd6d4e66ea1d9">&#9670;&#160;</a></span>kvWatcher_Destroy()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void kvWatcher_Destroy </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> *&#160;</td>
+          <td class="paramname"><em>w</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Releases memory allocated for this <a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> object.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">w</td><td>the pointer to the <a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__kv_watcher.js b/doc/html/group__kv_watcher.js
new file mode 100644 (file)
index 0000000..48baf05
--- /dev/null
@@ -0,0 +1,6 @@
+var group__kv_watcher =
+[
+    [ "kvWatcher_Next", "group__kv_watcher.html#ga562c216a0199c30455af4c2da46000e5", null ],
+    [ "kvWatcher_Stop", "group__kv_watcher.html#ga73adf44114fedd62ef75ebd81839b65e", null ],
+    [ "kvWatcher_Destroy", "group__kv_watcher.html#ga21bc39fa795f7c4f392bd6d4e66ea1d9", null ]
+];
\ No newline at end of file
diff --git a/doc/html/group__libevent_functions.html b/doc/html/group__libevent_functions.html
new file mode 100644 (file)
index 0000000..93be75a
--- /dev/null
@@ -0,0 +1,299 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Libevent Adapter</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__libevent_functions.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle"><div class="title">Libevent Adapter</div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:ga195d269473332931fd0fede0bac3309e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__libevent_functions.html#ga195d269473332931fd0fede0bac3309e">natsLibevent_Init</a> (void)</td></tr>
+<tr class="memdesc:ga195d269473332931fd0fede0bac3309e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the adapter.  <a href="group__libevent_functions.html#ga195d269473332931fd0fede0bac3309e">More...</a><br /></td></tr>
+<tr class="separator:ga195d269473332931fd0fede0bac3309e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga30c00f21a5251ee9fde09c1f2b429cd2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__libevent_functions.html#ga30c00f21a5251ee9fde09c1f2b429cd2">natsLibevent_Attach</a> (void **userData, void *loop, <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <a class="el" href="nats_8h.html#af798865ac824e5959987de0fe8d07383">natsSock</a> socket)</td></tr>
+<tr class="memdesc:ga30c00f21a5251ee9fde09c1f2b429cd2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Attach a connection to the given event loop.  <a href="group__libevent_functions.html#ga30c00f21a5251ee9fde09c1f2b429cd2">More...</a><br /></td></tr>
+<tr class="separator:ga30c00f21a5251ee9fde09c1f2b429cd2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga8a14ce23b4f6ba3bf63369961f9a5552"><td class="memItemLeft" align="right" valign="top"><a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__libevent_functions.html#ga8a14ce23b4f6ba3bf63369961f9a5552">natsLibevent_Read</a> (void *userData, bool add)</td></tr>
+<tr class="memdesc:ga8a14ce23b4f6ba3bf63369961f9a5552"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start or stop polling on READ events.  <a href="group__libevent_functions.html#ga8a14ce23b4f6ba3bf63369961f9a5552">More...</a><br /></td></tr>
+<tr class="separator:ga8a14ce23b4f6ba3bf63369961f9a5552"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga7ac99f326a59e5663ff66f5023c87091"><td class="memItemLeft" align="right" valign="top"><a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__libevent_functions.html#ga7ac99f326a59e5663ff66f5023c87091">natsLibevent_Write</a> (void *userData, bool add)</td></tr>
+<tr class="memdesc:ga7ac99f326a59e5663ff66f5023c87091"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start or stop polling on WRITE events.  <a href="group__libevent_functions.html#ga7ac99f326a59e5663ff66f5023c87091">More...</a><br /></td></tr>
+<tr class="separator:ga7ac99f326a59e5663ff66f5023c87091"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaac76f5937329a8650f69c6bd8af36cd5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__libevent_functions.html#gaac76f5937329a8650f69c6bd8af36cd5">natsLibevent_Detach</a> (void *userData)</td></tr>
+<tr class="memdesc:gaac76f5937329a8650f69c6bd8af36cd5"><td class="mdescLeft">&#160;</td><td class="mdescRight">The connection is closed, it can be safely detached.  <a href="group__libevent_functions.html#gaac76f5937329a8650f69c6bd8af36cd5">More...</a><br /></td></tr>
+<tr class="separator:gaac76f5937329a8650f69c6bd8af36cd5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<p >Adapter to plug a <code>NATS</code> connection to a <code>libevent</code> event loop. </p>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="ga195d269473332931fd0fede0bac3309e" name="ga195d269473332931fd0fede0bac3309e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga195d269473332931fd0fede0bac3309e">&#9670;&#160;</a></span>natsLibevent_Init()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void natsLibevent_Init </td>
+          <td>(</td>
+          <td class="paramtype">void&#160;</td>
+          <td class="paramname"></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Needs to be called once so that the adapter can initialize some state. </p>
+
+</div>
+</div>
+<a id="ga30c00f21a5251ee9fde09c1f2b429cd2" name="ga30c00f21a5251ee9fde09c1f2b429cd2"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga30c00f21a5251ee9fde09c1f2b429cd2">&#9670;&#160;</a></span>natsLibevent_Attach()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsLibevent_Attach </td>
+          <td>(</td>
+          <td class="paramtype">void **&#160;</td>
+          <td class="paramname"><em>userData</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">void *&#160;</td>
+          <td class="paramname"><em>loop</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="nats_8h.html#af798865ac824e5959987de0fe8d07383">natsSock</a>&#160;</td>
+          <td class="paramname"><em>socket</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This callback is invoked after <code>NATS</code> library has connected, or reconnected. For a reconnect event, <code>*userData</code> will not be <code>NULL</code>. This function will start polling on READ events for the given <code>socket</code>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">userData</td><td>the location where the adapter stores the user object passed to the other callbacks. </td></tr>
+    <tr><td class="paramname">loop</td><td>the event loop as a generic pointer. Cast to appropriate type. </td></tr>
+    <tr><td class="paramname">nc</td><td>the connection to attach to the event loop </td></tr>
+    <tr><td class="paramname">socket</td><td>the socket to start polling on. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga8a14ce23b4f6ba3bf63369961f9a5552" name="ga8a14ce23b4f6ba3bf63369961f9a5552"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga8a14ce23b4f6ba3bf63369961f9a5552">&#9670;&#160;</a></span>natsLibevent_Read()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsLibevent_Read </td>
+          <td>(</td>
+          <td class="paramtype">void *&#160;</td>
+          <td class="paramname"><em>userData</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">bool&#160;</td>
+          <td class="paramname"><em>add</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This callback is invoked to notify that the event library should start or stop polling for READ events.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">userData</td><td>the user object created in <a class="el" href="group__libevent_functions.html#ga30c00f21a5251ee9fde09c1f2b429cd2" title="Attach a connection to the given event loop.">natsLibevent_Attach</a> </td></tr>
+    <tr><td class="paramname">add</td><td><code>true</code> if the library needs to start polling, <code>false</code> otherwise. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga7ac99f326a59e5663ff66f5023c87091" name="ga7ac99f326a59e5663ff66f5023c87091"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga7ac99f326a59e5663ff66f5023c87091">&#9670;&#160;</a></span>natsLibevent_Write()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsLibevent_Write </td>
+          <td>(</td>
+          <td class="paramtype">void *&#160;</td>
+          <td class="paramname"><em>userData</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">bool&#160;</td>
+          <td class="paramname"><em>add</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This callback is invoked to notify that the event library should start or stop polling for WRITE events.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">userData</td><td>the user object created in <a class="el" href="group__libevent_functions.html#ga30c00f21a5251ee9fde09c1f2b429cd2" title="Attach a connection to the given event loop.">natsLibevent_Attach</a> </td></tr>
+    <tr><td class="paramname">add</td><td><code>true</code> if the library needs to start polling, <code>false</code> otherwise. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gaac76f5937329a8650f69c6bd8af36cd5" name="gaac76f5937329a8650f69c6bd8af36cd5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaac76f5937329a8650f69c6bd8af36cd5">&#9670;&#160;</a></span>natsLibevent_Detach()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsLibevent_Detach </td>
+          <td>(</td>
+          <td class="paramtype">void *&#160;</td>
+          <td class="paramname"><em>userData</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >When a connection is closed (not disconnected, pending a reconnect), this callback will be invoked. This is the opportunity to cleanup the state maintained by the adapter for this connection.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">userData</td><td>the user object created in <a class="el" href="group__libevent_functions.html#ga30c00f21a5251ee9fde09c1f2b429cd2" title="Attach a connection to the given event loop.">natsLibevent_Attach</a> </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__libevent_functions.js b/doc/html/group__libevent_functions.js
new file mode 100644 (file)
index 0000000..ea697f9
--- /dev/null
@@ -0,0 +1,8 @@
+var group__libevent_functions =
+[
+    [ "natsLibevent_Init", "group__libevent_functions.html#ga195d269473332931fd0fede0bac3309e", null ],
+    [ "natsLibevent_Attach", "group__libevent_functions.html#ga30c00f21a5251ee9fde09c1f2b429cd2", null ],
+    [ "natsLibevent_Read", "group__libevent_functions.html#ga8a14ce23b4f6ba3bf63369961f9a5552", null ],
+    [ "natsLibevent_Write", "group__libevent_functions.html#ga7ac99f326a59e5663ff66f5023c87091", null ],
+    [ "natsLibevent_Detach", "group__libevent_functions.html#gaac76f5937329a8650f69c6bd8af36cd5", null ]
+];
\ No newline at end of file
diff --git a/doc/html/group__library_group.html b/doc/html/group__library_group.html
new file mode 100644 (file)
index 0000000..2d8f7f9
--- /dev/null
@@ -0,0 +1,580 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Library</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__library_group.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle"><div class="title">Library<div class="ingroups"><a class="el" href="group__func_group.html">Functions</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:ga4a26d4caecb23348f6eee862c95fee7d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__library_group.html#ga4a26d4caecb23348f6eee862c95fee7d">nats_Open</a> (int64_t lockSpinCount)</td></tr>
+<tr class="memdesc:ga4a26d4caecb23348f6eee862c95fee7d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the library.  <a href="group__library_group.html#ga4a26d4caecb23348f6eee862c95fee7d">More...</a><br /></td></tr>
+<tr class="separator:ga4a26d4caecb23348f6eee862c95fee7d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga0d8c3df1c0c4a3d340d8ff81355fb1e8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__library_group.html#ga0d8c3df1c0c4a3d340d8ff81355fb1e8">nats_GetVersion</a> (void)</td></tr>
+<tr class="memdesc:ga0d8c3df1c0c4a3d340d8ff81355fb1e8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the Library's version.  <a href="group__library_group.html#ga0d8c3df1c0c4a3d340d8ff81355fb1e8">More...</a><br /></td></tr>
+<tr class="separator:ga0d8c3df1c0c4a3d340d8ff81355fb1e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga5fbbaa19b0290b654d2669a05bd512e8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__library_group.html#ga5fbbaa19b0290b654d2669a05bd512e8">nats_GetVersionNumber</a> (void)</td></tr>
+<tr class="memdesc:ga5fbbaa19b0290b654d2669a05bd512e8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the Library's version as a number.  <a href="group__library_group.html#ga5fbbaa19b0290b654d2669a05bd512e8">More...</a><br /></td></tr>
+<tr class="separator:ga5fbbaa19b0290b654d2669a05bd512e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga8c2ad4df801bd9d11564587ed3a7081e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__library_group.html#ga8c2ad4df801bd9d11564587ed3a7081e">nats_CheckCompatibility</a> (void)</td></tr>
+<tr class="memdesc:ga8c2ad4df801bd9d11564587ed3a7081e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check that the header is compatible with the library.  <a href="group__library_group.html#ga8c2ad4df801bd9d11564587ed3a7081e">More...</a><br /></td></tr>
+<tr class="separator:ga8c2ad4df801bd9d11564587ed3a7081e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaa3c10ba3ae001595007ad0dc5dccc15e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__library_group.html#gaa3c10ba3ae001595007ad0dc5dccc15e">nats_Now</a> (void)</td></tr>
+<tr class="memdesc:gaa3c10ba3ae001595007ad0dc5dccc15e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gives the current time in milliseconds.  <a href="group__library_group.html#gaa3c10ba3ae001595007ad0dc5dccc15e">More...</a><br /></td></tr>
+<tr class="separator:gaa3c10ba3ae001595007ad0dc5dccc15e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gacf5e423920d6a647df3bbf7de39d5223"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__library_group.html#gacf5e423920d6a647df3bbf7de39d5223">nats_NowInNanoSeconds</a> (void)</td></tr>
+<tr class="memdesc:gacf5e423920d6a647df3bbf7de39d5223"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gives the current time in nanoseconds.  <a href="group__library_group.html#gacf5e423920d6a647df3bbf7de39d5223">More...</a><br /></td></tr>
+<tr class="separator:gacf5e423920d6a647df3bbf7de39d5223"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gad5040264cd4b1404956babf3c03a4f09"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__library_group.html#gad5040264cd4b1404956babf3c03a4f09">nats_Sleep</a> (int64_t sleepTime)</td></tr>
+<tr class="memdesc:gad5040264cd4b1404956babf3c03a4f09"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sleeps for a given number of milliseconds.  <a href="group__library_group.html#gad5040264cd4b1404956babf3c03a4f09">More...</a><br /></td></tr>
+<tr class="separator:gad5040264cd4b1404956babf3c03a4f09"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gadecfd49a58b581dbba40da77b195fd85"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__library_group.html#gadecfd49a58b581dbba40da77b195fd85">nats_GetLastError</a> (<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> *status)</td></tr>
+<tr class="memdesc:gadecfd49a58b581dbba40da77b195fd85"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the calling thread's last known error.  <a href="group__library_group.html#gadecfd49a58b581dbba40da77b195fd85">More...</a><br /></td></tr>
+<tr class="separator:gadecfd49a58b581dbba40da77b195fd85"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaca24172e1b97ca01cee29ca437f5702e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__library_group.html#gaca24172e1b97ca01cee29ca437f5702e">nats_GetLastErrorStack</a> (char *buffer, size_t bufLen)</td></tr>
+<tr class="memdesc:gaca24172e1b97ca01cee29ca437f5702e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the calling thread's last known error stack.  <a href="group__library_group.html#gaca24172e1b97ca01cee29ca437f5702e">More...</a><br /></td></tr>
+<tr class="separator:gaca24172e1b97ca01cee29ca437f5702e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga5fab3b18c4fe3630254483575f6066f4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__library_group.html#ga5fab3b18c4fe3630254483575f6066f4">nats_PrintLastErrorStack</a> (FILE *file)</td></tr>
+<tr class="memdesc:ga5fab3b18c4fe3630254483575f6066f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prints the calling thread's last known error stack into the file.  <a href="group__library_group.html#ga5fab3b18c4fe3630254483575f6066f4">More...</a><br /></td></tr>
+<tr class="separator:ga5fab3b18c4fe3630254483575f6066f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gab21e94ce7a7d226611ea2c05914cf19d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__library_group.html#gab21e94ce7a7d226611ea2c05914cf19d">nats_SetMessageDeliveryPoolSize</a> (int max)</td></tr>
+<tr class="memdesc:gab21e94ce7a7d226611ea2c05914cf19d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the maximum size of the global message delivery thread pool.  <a href="group__library_group.html#gab21e94ce7a7d226611ea2c05914cf19d">More...</a><br /></td></tr>
+<tr class="separator:gab21e94ce7a7d226611ea2c05914cf19d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gafe171baefa00a85b77205116e9f3e48a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__library_group.html#gafe171baefa00a85b77205116e9f3e48a">nats_ReleaseThreadMemory</a> (void)</td></tr>
+<tr class="memdesc:gafe171baefa00a85b77205116e9f3e48a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Release thread-local memory possibly allocated by the library.  <a href="group__library_group.html#gafe171baefa00a85b77205116e9f3e48a">More...</a><br /></td></tr>
+<tr class="separator:gafe171baefa00a85b77205116e9f3e48a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf781f246e2e0ab24623ca667c48dc3ba"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__library_group.html#gaf781f246e2e0ab24623ca667c48dc3ba">nats_Sign</a> (const char *encodedSeed, const char *input, unsigned char **signature, int *signatureLength)</td></tr>
+<tr class="memdesc:gaf781f246e2e0ab24623ca667c48dc3ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Signs a given text using the provided private key.  <a href="group__library_group.html#gaf781f246e2e0ab24623ca667c48dc3ba">More...</a><br /></td></tr>
+<tr class="separator:gaf781f246e2e0ab24623ca667c48dc3ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gae75131e0ce4e5b89d0f82ea7892f112e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__library_group.html#gae75131e0ce4e5b89d0f82ea7892f112e">nats_Close</a> (void)</td></tr>
+<tr class="memdesc:gae75131e0ce4e5b89d0f82ea7892f112e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tear down the library.  <a href="group__library_group.html#gae75131e0ce4e5b89d0f82ea7892f112e">More...</a><br /></td></tr>
+<tr class="separator:gae75131e0ce4e5b89d0f82ea7892f112e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf75bb5b38bf32e6a8f43e54068625903"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__library_group.html#gaf75bb5b38bf32e6a8f43e54068625903">nats_CloseAndWait</a> (int64_t timeout)</td></tr>
+<tr class="memdesc:gaf75bb5b38bf32e6a8f43e54068625903"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tear down the library and wait for all resources to be released.  <a href="group__library_group.html#gaf75bb5b38bf32e6a8f43e54068625903">More...</a><br /></td></tr>
+<tr class="separator:gaf75bb5b38bf32e6a8f43e54068625903"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<p >Library and helper functions. </p>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="ga4a26d4caecb23348f6eee862c95fee7d" name="ga4a26d4caecb23348f6eee862c95fee7d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga4a26d4caecb23348f6eee862c95fee7d">&#9670;&#160;</a></span>nats_Open()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> nats_Open </td>
+          <td>(</td>
+          <td class="paramtype">int64_t&#160;</td>
+          <td class="paramname"><em>lockSpinCount</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This initializes the library.</p>
+<p >It is invoked automatically when creating a connection, using a default spin count. However, you can call this explicitly before creating the very first connection in order for your chosen spin count to take effect.</p>
+<dl class="section warning"><dt>Warning</dt><dd>You must not call <a class="el" href="group__library_group.html#ga4a26d4caecb23348f6eee862c95fee7d" title="Initializes the library.">nats_Open</a> and <a class="el" href="group__library_group.html#gae75131e0ce4e5b89d0f82ea7892f112e" title="Tear down the library.">nats_Close</a> concurrently.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">lockSpinCount</td><td>The number of times the library will spin trying to lock a mutex object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga0d8c3df1c0c4a3d340d8ff81355fb1e8" name="ga0d8c3df1c0c4a3d340d8ff81355fb1e8"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga0d8c3df1c0c4a3d340d8ff81355fb1e8">&#9670;&#160;</a></span>nats_GetVersion()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char * nats_GetVersion </td>
+          <td>(</td>
+          <td class="paramtype">void&#160;</td>
+          <td class="paramname"></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the version of the library your application is linked with. </p>
+
+</div>
+</div>
+<a id="ga5fbbaa19b0290b654d2669a05bd512e8" name="ga5fbbaa19b0290b654d2669a05bd512e8"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga5fbbaa19b0290b654d2669a05bd512e8">&#9670;&#160;</a></span>nats_GetVersionNumber()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> uint32_t nats_GetVersionNumber </td>
+          <td>(</td>
+          <td class="paramtype">void&#160;</td>
+          <td class="paramname"></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >The version is returned as an hexadecimal number. For instance, if the string version is "1.2.3", the value returned will be:</p>
+<blockquote class="doxtable">
+<p >&zwj;0x010203 </p>
+</blockquote>
+
+</div>
+</div>
+<a id="ga8c2ad4df801bd9d11564587ed3a7081e" name="ga8c2ad4df801bd9d11564587ed3a7081e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga8c2ad4df801bd9d11564587ed3a7081e">&#9670;&#160;</a></span>nats_CheckCompatibility()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> bool nats_CheckCompatibility </td>
+          <td>(</td>
+          <td class="paramtype">void&#160;</td>
+          <td class="paramname"></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >The version of the header you used to compile your application may be incompatible with the library the application is linked with.</p>
+<p >This function will check that the two are compatibles. If they are not, a message is printed and the application will exit.</p>
+<dl class="section return"><dt>Returns</dt><dd><code>true</code> if the header and library are compatibles, otherwise the application exits.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__library_group.html#ga0d8c3df1c0c4a3d340d8ff81355fb1e8" title="Returns the Library&#39;s version.">nats_GetVersion</a> </dd>
+<dd>
+<a class="el" href="group__library_group.html#ga5fbbaa19b0290b654d2669a05bd512e8" title="Returns the Library&#39;s version as a number.">nats_GetVersionNumber</a> </dd></dl>
+
+</div>
+</div>
+<a id="gaa3c10ba3ae001595007ad0dc5dccc15e" name="gaa3c10ba3ae001595007ad0dc5dccc15e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaa3c10ba3ae001595007ad0dc5dccc15e">&#9670;&#160;</a></span>nats_Now()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t nats_Now </td>
+          <td>(</td>
+          <td class="paramtype">void&#160;</td>
+          <td class="paramname"></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Gives the current time in milliseconds. </p>
+
+</div>
+</div>
+<a id="gacf5e423920d6a647df3bbf7de39d5223" name="gacf5e423920d6a647df3bbf7de39d5223"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gacf5e423920d6a647df3bbf7de39d5223">&#9670;&#160;</a></span>nats_NowInNanoSeconds()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t nats_NowInNanoSeconds </td>
+          <td>(</td>
+          <td class="paramtype">void&#160;</td>
+          <td class="paramname"></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Gives the current time in nanoseconds. When such granularity is not available, the time returned is still expressed in nanoseconds. </p>
+
+</div>
+</div>
+<a id="gad5040264cd4b1404956babf3c03a4f09" name="gad5040264cd4b1404956babf3c03a4f09"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gad5040264cd4b1404956babf3c03a4f09">&#9670;&#160;</a></span>nats_Sleep()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void nats_Sleep </td>
+          <td>(</td>
+          <td class="paramtype">int64_t&#160;</td>
+          <td class="paramname"><em>sleepTime</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Causes the current thread to be suspended for at least the number of milliseconds.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sleepTime</td><td>the number of milliseconds. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gadecfd49a58b581dbba40da77b195fd85" name="gadecfd49a58b581dbba40da77b195fd85"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gadecfd49a58b581dbba40da77b195fd85">&#9670;&#160;</a></span>nats_GetLastError()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char * nats_GetLastError </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> *&#160;</td>
+          <td class="paramname"><em>status</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the calling thread's last known error. This can be useful when <a class="el" href="group__conn_mgt_group.html#ga740be1ba16a8570eb98ef6755ebf52ce" title="Connects to a NATS Server using the provided options.">natsConnection_Connect</a> fails. Since no connection object is returned, you would not be able to call <a class="el" href="group__conn_mgt_group.html#gab6cfa9cb6857ae10f096a94f5e244e63" title="Gets the last connection error.">natsConnection_GetLastError</a>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">status</td><td>if not <code>NULL</code>, this function will store the last error status in there. </td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>the thread local error string.</dd></dl>
+<dl class="section warning"><dt>Warning</dt><dd>Do not free the string returned by this function. </dd></dl>
+
+</div>
+</div>
+<a id="gaca24172e1b97ca01cee29ca437f5702e" name="gaca24172e1b97ca01cee29ca437f5702e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaca24172e1b97ca01cee29ca437f5702e">&#9670;&#160;</a></span>nats_GetLastErrorStack()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> nats_GetLastErrorStack </td>
+          <td>(</td>
+          <td class="paramtype">char *&#160;</td>
+          <td class="paramname"><em>buffer</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">size_t&#160;</td>
+          <td class="paramname"><em>bufLen</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Copies the calling thread's last known error stack into the provided buffer. If the buffer is not big enough, <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a317fb9be1a80f6b1877f96a9a2db16ad" title="A buffer is not large enough to accommodate the data.">NATS_INSUFFICIENT_BUFFER</a> is returned.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">buffer</td><td>the buffer into the stack is copied. </td></tr>
+    <tr><td class="paramname">bufLen</td><td>the size of the buffer </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga5fab3b18c4fe3630254483575f6066f4" name="ga5fab3b18c4fe3630254483575f6066f4"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga5fab3b18c4fe3630254483575f6066f4">&#9670;&#160;</a></span>nats_PrintLastErrorStack()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void nats_PrintLastErrorStack </td>
+          <td>(</td>
+          <td class="paramtype">FILE *&#160;</td>
+          <td class="paramname"><em>file</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This call prints the calling thread's last known error stack into the file <code>file</code>. It first prints the error status and the error string, then the stack.</p>
+<p >Here is an example for a call:</p>
+<div class="fragment"><div class="line">Error: 29 - SSL Error - (conn.c:565): SSL handshake error: sslv3 alert bad certificate</div>
+<div class="line">Stack: (library version: 1.2.3-beta)</div>
+<div class="line">  01 - _makeTLSConn</div>
+<div class="line">  02 - _checkForSecure</div>
+<div class="line">  03 - _processExpectedInfo</div>
+<div class="line">  04 - _processConnInit</div>
+<div class="line">  05 - _connect</div>
+<div class="line">  06 - natsConnection_Connect</div>
+</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">file</td><td>the file the stack is printed to. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gab21e94ce7a7d226611ea2c05914cf19d" name="gab21e94ce7a7d226611ea2c05914cf19d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gab21e94ce7a7d226611ea2c05914cf19d">&#9670;&#160;</a></span>nats_SetMessageDeliveryPoolSize()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> nats_SetMessageDeliveryPoolSize </td>
+          <td>(</td>
+          <td class="paramtype">int&#160;</td>
+          <td class="paramname"><em>max</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Normally, each asynchronous subscriber that is created has its own message delivery thread. The advantage is that it reduces lock contentions, therefore improving performance.<br  />
+ However, if an application creates many subscribers, this is not scaling well since the process would use too many threads.</p>
+<p >The library has a thread pool that can perform message delivery. If a connection is created with the proper option set (<a class="el" href="group__opts_group.html#gabf060c92648b50c069f0abe7cbb06f1c" title="Switch on/off the use of a central message delivery thread pool.">natsOptions_UseGlobalMessageDelivery</a>), then this thread pool will be responsible for delivering the messages. The thread pool is lazily initialized, that is, no thread is used as long as no subscriber (requiring global message delivery) is created.</p>
+<p >Each subscriber will be attached to a given worker on the pool so that message delivery order is guaranteed.</p>
+<p >This call allows you to set the maximum size of the pool.</p>
+<dl class="section note"><dt>Note</dt><dd>At this time, a pool does not shrink, but the caller will not get an error when calling this function with a size smaller than the current size.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#gabf060c92648b50c069f0abe7cbb06f1c" title="Switch on/off the use of a central message delivery thread pool.">natsOptions_UseGlobalMessageDelivery()</a> </dd>
+<dd>
+<a class="el" href="group__env_variables_group.html">Environment Variables</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">max</td><td>the maximum size of the pool. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gafe171baefa00a85b77205116e9f3e48a" name="gafe171baefa00a85b77205116e9f3e48a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gafe171baefa00a85b77205116e9f3e48a">&#9670;&#160;</a></span>nats_ReleaseThreadMemory()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void nats_ReleaseThreadMemory </td>
+          <td>(</td>
+          <td class="paramtype">void&#160;</td>
+          <td class="paramname"></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This needs to be called on user-created threads where NATS calls are performed. This does not need to be called in threads created by the library. For instance, do not call this function in the message handler that you specify when creating a subscription.</p>
+<p >Also, you do not need to call this in an user thread (or the main) if you are calling <a class="el" href="group__library_group.html#gae75131e0ce4e5b89d0f82ea7892f112e" title="Tear down the library.">nats_Close()</a> there. </p>
+
+</div>
+</div>
+<a id="gaf781f246e2e0ab24623ca667c48dc3ba" name="gaf781f246e2e0ab24623ca667c48dc3ba"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaf781f246e2e0ab24623ca667c48dc3ba">&#9670;&#160;</a></span>nats_Sign()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> nats_Sign </td>
+          <td>(</td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>encodedSeed</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>input</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">unsigned char **&#160;</td>
+          <td class="paramname"><em>signature</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int *&#160;</td>
+          <td class="paramname"><em>signatureLength</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >The key is the encoded string representation of the private key, or seed. This is what you get when generating an NKey using NATS tooling.</p>
+<p >The input is a string, generally the nonce sent by the server when accepting a connection.</p>
+<p >This function signs the input and returns the signature through the output arguments. This call allocates memory necessary to hold the signature. If this is used as part of the signature callback passed to <a class="el" href="group__opts_group.html#ga0290eac4665569c850468d9f00e246a0" title="Sets the NKey public key and signature callback.">natsOptions_SetNKey()</a>, then the memory will be automatically freed by the library after the signature has been inserted in the CONNECT protocol. If this function is used outside of this context, it is the user responsibility to free the allocated memory when no longer needed.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#ga0290eac4665569c850468d9f00e246a0" title="Sets the NKey public key and signature callback.">natsOptions_SetNKey()</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">encodedSeed</td><td>the string encoded private key, also known as seed. </td></tr>
+    <tr><td class="paramname">input</td><td>the input to be signed. </td></tr>
+    <tr><td class="paramname">signature</td><td>the memory location of allocated memory containing the signed input. </td></tr>
+    <tr><td class="paramname">signatureLength</td><td>the size of the allocated signature. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gae75131e0ce4e5b89d0f82ea7892f112e" name="gae75131e0ce4e5b89d0f82ea7892f112e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gae75131e0ce4e5b89d0f82ea7892f112e">&#9670;&#160;</a></span>nats_Close()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void nats_Close </td>
+          <td>(</td>
+          <td class="paramtype">void&#160;</td>
+          <td class="paramname"></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Releases memory used by the library.</p>
+<p >For this to take effect, all NATS objects that you have created must first be destroyed.</p>
+<p >This call does not block and it is possible that the library is not unloaded right away if there are still internal threads referencing it, so calling <a class="el" href="group__library_group.html#ga4a26d4caecb23348f6eee862c95fee7d" title="Initializes the library.">nats_Open()</a> right away may fail. If you want to ensure that the library is fully unloaded, call <a class="el" href="group__library_group.html#gaf75bb5b38bf32e6a8f43e54068625903" title="Tear down the library and wait for all resources to be released.">nats_CloseAndWait()</a> instead.</p>
+<dl class="section note"><dt>Note</dt><dd>There are still a small number of thread local keys and a mutex that are not freed until the application exit (in which case a final cleanup is executed).</dd></dl>
+<dl class="section warning"><dt>Warning</dt><dd>You must not call <a class="el" href="group__library_group.html#ga4a26d4caecb23348f6eee862c95fee7d" title="Initializes the library.">nats_Open</a> and <a class="el" href="group__library_group.html#gae75131e0ce4e5b89d0f82ea7892f112e" title="Tear down the library.">nats_Close</a> concurrently.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__library_group.html#gaf75bb5b38bf32e6a8f43e54068625903" title="Tear down the library and wait for all resources to be released.">nats_CloseAndWait()</a> </dd></dl>
+
+</div>
+</div>
+<a id="gaf75bb5b38bf32e6a8f43e54068625903" name="gaf75bb5b38bf32e6a8f43e54068625903"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaf75bb5b38bf32e6a8f43e54068625903">&#9670;&#160;</a></span>nats_CloseAndWait()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> nats_CloseAndWait </td>
+          <td>(</td>
+          <td class="paramtype">int64_t&#160;</td>
+          <td class="paramname"><em>timeout</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Similar to <a class="el" href="group__library_group.html#gae75131e0ce4e5b89d0f82ea7892f112e" title="Tear down the library.">nats_Close()</a> except that this call will make sure that all references to the library are decremented before returning (up to the given timeout). Internal threads (such as subscriptions dispatchers, etc..) hold a reference to the library. Only when all references have been released that this call will return. It means that you must call all the "destroy" calls before calling this function, otherwise it will block forever (or up to given timeout).</p>
+<p >For instance, this code would "deadlock": </p><div class="fragment"><div class="line">natsConnection_ConnectTo(&amp;nc, NATS_DEFAULT_URL);</div>
+<div class="line">nats_CloseWait(0);</div>
+<div class="line">natsConnection_Destroy(nc);</div>
+</div><!-- fragment --><p> But this would work as expected: </p><div class="fragment"><div class="line">natsConnection_ConnectTo(&amp;nc, NATS_DEFAULT_URL);</div>
+<div class="line">natsConnection_Destroy(nc);</div>
+<div class="line">nats_CloseWait(0);</div>
+</div><!-- fragment --><p> The library and other objects (such as connections, subscriptions, etc) use internal threads. After the destroy call, it is possible or even likely that some threads are still running, holding references to the library. Unlike <a class="el" href="group__library_group.html#gae75131e0ce4e5b89d0f82ea7892f112e" title="Tear down the library.">nats_Close()</a>, which will simply ensure that the library is ultimately releasing memory, the <a class="el" href="group__library_group.html#gaf75bb5b38bf32e6a8f43e54068625903" title="Tear down the library and wait for all resources to be released.">nats_CloseAndWait()</a> API will ensure that all those internal threads have unrolled and that the memory used by the library is released before returning.</p>
+<dl class="section note"><dt>Note</dt><dd>If a timeout is specified, the call may return <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ab88994c9ea9889ac4d9d656d62f550ed">NATS_TIMEOUT</a> but the library is still being tear down and memory will be released. The error is just to notify you that the operation did not complete in the allotted time. Calling <a class="el" href="group__library_group.html#ga4a26d4caecb23348f6eee862c95fee7d" title="Initializes the library.">nats_Open()</a> in this case (or any implicit opening of the library) may result in an error since the library may still be in the process of being closed.</dd></dl>
+<dl class="section warning"><dt>Warning</dt><dd>Due to the blocking nature it is illegal to call this from any NATS thread (such as message or connection callbacks). If trying to do so, a <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9bb78b4f245d2870040d25c450febd4b">NATS_ILLEGAL_STATE</a> error will be returned.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__library_group.html#gae75131e0ce4e5b89d0f82ea7892f112e" title="Tear down the library.">nats_Close()</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">timeout</td><td>the maximum time to wait for the library to be closed. If negative or 0, waits for as long as needed. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__library_group.js b/doc/html/group__library_group.js
new file mode 100644 (file)
index 0000000..eafdb1b
--- /dev/null
@@ -0,0 +1,18 @@
+var group__library_group =
+[
+    [ "nats_Open", "group__library_group.html#ga4a26d4caecb23348f6eee862c95fee7d", null ],
+    [ "nats_GetVersion", "group__library_group.html#ga0d8c3df1c0c4a3d340d8ff81355fb1e8", null ],
+    [ "nats_GetVersionNumber", "group__library_group.html#ga5fbbaa19b0290b654d2669a05bd512e8", null ],
+    [ "nats_CheckCompatibility", "group__library_group.html#ga8c2ad4df801bd9d11564587ed3a7081e", null ],
+    [ "nats_Now", "group__library_group.html#gaa3c10ba3ae001595007ad0dc5dccc15e", null ],
+    [ "nats_NowInNanoSeconds", "group__library_group.html#gacf5e423920d6a647df3bbf7de39d5223", null ],
+    [ "nats_Sleep", "group__library_group.html#gad5040264cd4b1404956babf3c03a4f09", null ],
+    [ "nats_GetLastError", "group__library_group.html#gadecfd49a58b581dbba40da77b195fd85", null ],
+    [ "nats_GetLastErrorStack", "group__library_group.html#gaca24172e1b97ca01cee29ca437f5702e", null ],
+    [ "nats_PrintLastErrorStack", "group__library_group.html#ga5fab3b18c4fe3630254483575f6066f4", null ],
+    [ "nats_SetMessageDeliveryPoolSize", "group__library_group.html#gab21e94ce7a7d226611ea2c05914cf19d", null ],
+    [ "nats_ReleaseThreadMemory", "group__library_group.html#gafe171baefa00a85b77205116e9f3e48a", null ],
+    [ "nats_Sign", "group__library_group.html#gaf781f246e2e0ab24623ca667c48dc3ba", null ],
+    [ "nats_Close", "group__library_group.html#gae75131e0ce4e5b89d0f82ea7892f112e", null ],
+    [ "nats_CloseAndWait", "group__library_group.html#gaf75bb5b38bf32e6a8f43e54068625903", null ]
+];
\ No newline at end of file
diff --git a/doc/html/group__libuv_functions.html b/doc/html/group__libuv_functions.html
new file mode 100644 (file)
index 0000000..c159186
--- /dev/null
@@ -0,0 +1,327 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Libuv Adapter</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__libuv_functions.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle"><div class="title">Libuv Adapter</div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:ga5d4b677cbe1cd132c37bc56dbfc6949e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__libuv_functions.html#ga5d4b677cbe1cd132c37bc56dbfc6949e">natsLibuv_Init</a> (void)</td></tr>
+<tr class="memdesc:ga5d4b677cbe1cd132c37bc56dbfc6949e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the adapter.  <a href="group__libuv_functions.html#ga5d4b677cbe1cd132c37bc56dbfc6949e">More...</a><br /></td></tr>
+<tr class="separator:ga5d4b677cbe1cd132c37bc56dbfc6949e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga1baf4a20b138dcf00807a8b830f4e02d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__libuv_functions.html#ga1baf4a20b138dcf00807a8b830f4e02d">natsLibuv_SetThreadLocalLoop</a> (uv_loop_t *loop)</td></tr>
+<tr class="memdesc:ga1baf4a20b138dcf00807a8b830f4e02d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Register the event loop with the thread running <code>uv_run()</code>.  <a href="group__libuv_functions.html#ga1baf4a20b138dcf00807a8b830f4e02d">More...</a><br /></td></tr>
+<tr class="separator:ga1baf4a20b138dcf00807a8b830f4e02d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga86ac71cffe752effd7397740d80c3c42"><td class="memItemLeft" align="right" valign="top"><a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__libuv_functions.html#ga86ac71cffe752effd7397740d80c3c42">natsLibuv_Attach</a> (void **userData, void *loop, <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <a class="el" href="nats_8h.html#af798865ac824e5959987de0fe8d07383">natsSock</a> socket)</td></tr>
+<tr class="memdesc:ga86ac71cffe752effd7397740d80c3c42"><td class="mdescLeft">&#160;</td><td class="mdescRight">Attach a connection to the given event loop.  <a href="group__libuv_functions.html#ga86ac71cffe752effd7397740d80c3c42">More...</a><br /></td></tr>
+<tr class="separator:ga86ac71cffe752effd7397740d80c3c42"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga85c722b2d2699a954362b20528f0aaac"><td class="memItemLeft" align="right" valign="top"><a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__libuv_functions.html#ga85c722b2d2699a954362b20528f0aaac">natsLibuv_Read</a> (void *userData, bool add)</td></tr>
+<tr class="memdesc:ga85c722b2d2699a954362b20528f0aaac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start or stop polling on READ events.  <a href="group__libuv_functions.html#ga85c722b2d2699a954362b20528f0aaac">More...</a><br /></td></tr>
+<tr class="separator:ga85c722b2d2699a954362b20528f0aaac"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gafaa633c9067f485f330b72644277b07d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__libuv_functions.html#gafaa633c9067f485f330b72644277b07d">natsLibuv_Write</a> (void *userData, bool add)</td></tr>
+<tr class="memdesc:gafaa633c9067f485f330b72644277b07d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start or stop polling on WRITE events.  <a href="group__libuv_functions.html#gafaa633c9067f485f330b72644277b07d">More...</a><br /></td></tr>
+<tr class="separator:gafaa633c9067f485f330b72644277b07d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga8df663525fb59b882a0f3bd563083dc7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__libuv_functions.html#ga8df663525fb59b882a0f3bd563083dc7">natsLibuv_Detach</a> (void *userData)</td></tr>
+<tr class="memdesc:ga8df663525fb59b882a0f3bd563083dc7"><td class="mdescLeft">&#160;</td><td class="mdescRight">The connection is closed, it can be safely detached.  <a href="group__libuv_functions.html#ga8df663525fb59b882a0f3bd563083dc7">More...</a><br /></td></tr>
+<tr class="separator:ga8df663525fb59b882a0f3bd563083dc7"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<p >Adapter to plug a <code>NATS</code> connection to a <code>libuv</code> event loop. </p>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="ga5d4b677cbe1cd132c37bc56dbfc6949e" name="ga5d4b677cbe1cd132c37bc56dbfc6949e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga5d4b677cbe1cd132c37bc56dbfc6949e">&#9670;&#160;</a></span>natsLibuv_Init()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void natsLibuv_Init </td>
+          <td>(</td>
+          <td class="paramtype">void&#160;</td>
+          <td class="paramname"></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Needs to be called once so that the adapter can initialize some state. </p>
+
+</div>
+</div>
+<a id="ga1baf4a20b138dcf00807a8b830f4e02d" name="ga1baf4a20b138dcf00807a8b830f4e02d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga1baf4a20b138dcf00807a8b830f4e02d">&#9670;&#160;</a></span>natsLibuv_SetThreadLocalLoop()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void natsLibuv_SetThreadLocalLoop </td>
+          <td>(</td>
+          <td class="paramtype">uv_loop_t *&#160;</td>
+          <td class="paramname"><em>loop</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Since <code>libuv</code> is not thread-safe, the adapter needs to know in which thread <code>uv_run()</code> will run for the given <code>loop</code>. It allows the adapter to schedule events so that they are executed in the event loop thread.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">loop</td><td>an event loop. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga86ac71cffe752effd7397740d80c3c42" name="ga86ac71cffe752effd7397740d80c3c42"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga86ac71cffe752effd7397740d80c3c42">&#9670;&#160;</a></span>natsLibuv_Attach()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsLibuv_Attach </td>
+          <td>(</td>
+          <td class="paramtype">void **&#160;</td>
+          <td class="paramname"><em>userData</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">void *&#160;</td>
+          <td class="paramname"><em>loop</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
+          <td class="paramname"><em>nc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="nats_8h.html#af798865ac824e5959987de0fe8d07383">natsSock</a>&#160;</td>
+          <td class="paramname"><em>socket</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This callback is invoked after <code>NATS</code> library has connected, or reconnected. For a reconnect event, <code>*userData</code> will not be <code>NULL</code>. This function will start polling on READ events for the given <code>socket</code>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">userData</td><td>the location where the adapter stores the user object passed to the other callbacks. </td></tr>
+    <tr><td class="paramname">loop</td><td>the event loop as a generic pointer. Cast to appropriate type. </td></tr>
+    <tr><td class="paramname">nc</td><td>the connection to attach to the event loop </td></tr>
+    <tr><td class="paramname">socket</td><td>the socket to start polling on. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga85c722b2d2699a954362b20528f0aaac" name="ga85c722b2d2699a954362b20528f0aaac"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga85c722b2d2699a954362b20528f0aaac">&#9670;&#160;</a></span>natsLibuv_Read()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsLibuv_Read </td>
+          <td>(</td>
+          <td class="paramtype">void *&#160;</td>
+          <td class="paramname"><em>userData</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">bool&#160;</td>
+          <td class="paramname"><em>add</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This callback is invoked to notify that the event library should start or stop polling for READ events.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">userData</td><td>the user object created in <a class="el" href="group__libuv_functions.html#ga86ac71cffe752effd7397740d80c3c42" title="Attach a connection to the given event loop.">natsLibuv_Attach</a> </td></tr>
+    <tr><td class="paramname">add</td><td><code>true</code> if the library needs to start polling, <code>false</code> otherwise. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gafaa633c9067f485f330b72644277b07d" name="gafaa633c9067f485f330b72644277b07d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gafaa633c9067f485f330b72644277b07d">&#9670;&#160;</a></span>natsLibuv_Write()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsLibuv_Write </td>
+          <td>(</td>
+          <td class="paramtype">void *&#160;</td>
+          <td class="paramname"><em>userData</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">bool&#160;</td>
+          <td class="paramname"><em>add</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This callback is invoked to notify that the event library should start or stop polling for WRITE events.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">userData</td><td>the user object created in <a class="el" href="group__libuv_functions.html#ga86ac71cffe752effd7397740d80c3c42" title="Attach a connection to the given event loop.">natsLibuv_Attach</a> </td></tr>
+    <tr><td class="paramname">add</td><td><code>true</code> if the library needs to start polling, <code>false</code> otherwise. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga8df663525fb59b882a0f3bd563083dc7" name="ga8df663525fb59b882a0f3bd563083dc7"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga8df663525fb59b882a0f3bd563083dc7">&#9670;&#160;</a></span>natsLibuv_Detach()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsLibuv_Detach </td>
+          <td>(</td>
+          <td class="paramtype">void *&#160;</td>
+          <td class="paramname"><em>userData</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >When a connection is closed (not disconnected, pending a reconnect), this callback will be invoked. This is the opportunity to cleanup the state maintained by the adapter for this connection.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">userData</td><td>the user object created in <a class="el" href="group__libuv_functions.html#ga86ac71cffe752effd7397740d80c3c42" title="Attach a connection to the given event loop.">natsLibuv_Attach</a> </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__libuv_functions.js b/doc/html/group__libuv_functions.js
new file mode 100644 (file)
index 0000000..cfcd515
--- /dev/null
@@ -0,0 +1,9 @@
+var group__libuv_functions =
+[
+    [ "natsLibuv_Init", "group__libuv_functions.html#ga5d4b677cbe1cd132c37bc56dbfc6949e", null ],
+    [ "natsLibuv_SetThreadLocalLoop", "group__libuv_functions.html#ga1baf4a20b138dcf00807a8b830f4e02d", null ],
+    [ "natsLibuv_Attach", "group__libuv_functions.html#ga86ac71cffe752effd7397740d80c3c42", null ],
+    [ "natsLibuv_Read", "group__libuv_functions.html#ga85c722b2d2699a954362b20528f0aaac", null ],
+    [ "natsLibuv_Write", "group__libuv_functions.html#gafaa633c9067f485f330b72644277b07d", null ],
+    [ "natsLibuv_Detach", "group__libuv_functions.html#ga8df663525fb59b882a0f3bd563083dc7", null ]
+];
\ No newline at end of file
diff --git a/doc/html/group__msg_group.html b/doc/html/group__msg_group.html
new file mode 100644 (file)
index 0000000..9405492
--- /dev/null
@@ -0,0 +1,705 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Message</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__msg_group.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle"><div class="title">Message<div class="ingroups"><a class="el" href="group__func_group.html">Functions</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:ga1a091d24f939d881bf04fba78b8995c2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msg_group.html#ga1a091d24f939d881bf04fba78b8995c2">natsMsgList_Destroy</a> (<a class="el" href="structnats_msg_list.html">natsMsgList</a> *list)</td></tr>
+<tr class="memdesc:ga1a091d24f939d881bf04fba78b8995c2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys this list of messages.  <a href="group__msg_group.html#ga1a091d24f939d881bf04fba78b8995c2">More...</a><br /></td></tr>
+<tr class="separator:ga1a091d24f939d881bf04fba78b8995c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga098e4fec1c5a71c00a0d092fbd6d1a21"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msg_group.html#ga098e4fec1c5a71c00a0d092fbd6d1a21">natsMsg_Create</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **newMsg, const char *subj, const char *reply, const char *data, int dataLen)</td></tr>
+<tr class="memdesc:ga098e4fec1c5a71c00a0d092fbd6d1a21"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a> object.  <a href="group__msg_group.html#ga098e4fec1c5a71c00a0d092fbd6d1a21">More...</a><br /></td></tr>
+<tr class="separator:ga098e4fec1c5a71c00a0d092fbd6d1a21"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gad7cad38946648e3047aa0665a3dd230a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msg_group.html#gad7cad38946648e3047aa0665a3dd230a">natsMsg_GetSubject</a> (const <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg)</td></tr>
+<tr class="memdesc:gad7cad38946648e3047aa0665a3dd230a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the subject set in this message.  <a href="group__msg_group.html#gad7cad38946648e3047aa0665a3dd230a">More...</a><br /></td></tr>
+<tr class="separator:gad7cad38946648e3047aa0665a3dd230a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga880535362c91b3e405792aa66ff945b6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msg_group.html#ga880535362c91b3e405792aa66ff945b6">natsMsg_GetReply</a> (const <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg)</td></tr>
+<tr class="memdesc:ga880535362c91b3e405792aa66ff945b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the reply set in this message.  <a href="group__msg_group.html#ga880535362c91b3e405792aa66ff945b6">More...</a><br /></td></tr>
+<tr class="separator:ga880535362c91b3e405792aa66ff945b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga523364451fd92534e754054266196e59"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msg_group.html#ga523364451fd92534e754054266196e59">natsMsg_GetData</a> (const <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg)</td></tr>
+<tr class="memdesc:ga523364451fd92534e754054266196e59"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the message payload.  <a href="group__msg_group.html#ga523364451fd92534e754054266196e59">More...</a><br /></td></tr>
+<tr class="separator:ga523364451fd92534e754054266196e59"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga25b69066ae50287e178aaf4f70f7d3de"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msg_group.html#ga25b69066ae50287e178aaf4f70f7d3de">natsMsg_GetDataLength</a> (const <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg)</td></tr>
+<tr class="memdesc:ga25b69066ae50287e178aaf4f70f7d3de"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the message length.  <a href="group__msg_group.html#ga25b69066ae50287e178aaf4f70f7d3de">More...</a><br /></td></tr>
+<tr class="separator:ga25b69066ae50287e178aaf4f70f7d3de"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf30b47d4217c9335919f05536e379af8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msg_group.html#gaf30b47d4217c9335919f05536e379af8">natsMsgHeader_Set</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, const char *key, const char *value)</td></tr>
+<tr class="memdesc:gaf30b47d4217c9335919f05536e379af8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the header entries associated with <code>key</code> to the single element <code>value</code>.  <a href="group__msg_group.html#gaf30b47d4217c9335919f05536e379af8">More...</a><br /></td></tr>
+<tr class="separator:gaf30b47d4217c9335919f05536e379af8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2b641ec3b1745604d7de1102e472254b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msg_group.html#ga2b641ec3b1745604d7de1102e472254b">natsMsgHeader_Add</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, const char *key, const char *value)</td></tr>
+<tr class="memdesc:ga2b641ec3b1745604d7de1102e472254b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add <code>value</code> to the header associated with <code>key</code>.  <a href="group__msg_group.html#ga2b641ec3b1745604d7de1102e472254b">More...</a><br /></td></tr>
+<tr class="separator:ga2b641ec3b1745604d7de1102e472254b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gab3349f0b0ce721b340d5c0753c90ee18"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msg_group.html#gab3349f0b0ce721b340d5c0753c90ee18">natsMsgHeader_Get</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, const char *key, const char **value)</td></tr>
+<tr class="memdesc:gab3349f0b0ce721b340d5c0753c90ee18"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the header entry associated with <code>key</code>.  <a href="group__msg_group.html#gab3349f0b0ce721b340d5c0753c90ee18">More...</a><br /></td></tr>
+<tr class="separator:gab3349f0b0ce721b340d5c0753c90ee18"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gae1ce9c9d82d151a3ea9dc03da048f66f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msg_group.html#gae1ce9c9d82d151a3ea9dc03da048f66f">natsMsgHeader_Values</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, const char *key, const char ***values, int *count)</td></tr>
+<tr class="memdesc:gae1ce9c9d82d151a3ea9dc03da048f66f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get all header values associated with <code>key</code>.  <a href="group__msg_group.html#gae1ce9c9d82d151a3ea9dc03da048f66f">More...</a><br /></td></tr>
+<tr class="separator:gae1ce9c9d82d151a3ea9dc03da048f66f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga6ee8a007111ada293dd24ff0bab02491"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msg_group.html#ga6ee8a007111ada293dd24ff0bab02491">natsMsgHeader_Keys</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, const char ***keys, int *count)</td></tr>
+<tr class="memdesc:ga6ee8a007111ada293dd24ff0bab02491"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get all header keys.  <a href="group__msg_group.html#ga6ee8a007111ada293dd24ff0bab02491">More...</a><br /></td></tr>
+<tr class="separator:ga6ee8a007111ada293dd24ff0bab02491"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gac78ca02dc93d05cae837ced6386408f1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msg_group.html#gac78ca02dc93d05cae837ced6386408f1">natsMsgHeader_Delete</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, const char *key)</td></tr>
+<tr class="memdesc:gac78ca02dc93d05cae837ced6386408f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete the value(s) associated with <code>key</code>.  <a href="group__msg_group.html#gac78ca02dc93d05cae837ced6386408f1">More...</a><br /></td></tr>
+<tr class="separator:gac78ca02dc93d05cae837ced6386408f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga43aa4a8e4b93725b4876ee2677e19c7b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msg_group.html#ga43aa4a8e4b93725b4876ee2677e19c7b">natsMsg_IsNoResponders</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg)</td></tr>
+<tr class="memdesc:ga43aa4a8e4b93725b4876ee2677e19c7b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Indicates if this message is a "no responders" message from the server.  <a href="group__msg_group.html#ga43aa4a8e4b93725b4876ee2677e19c7b">More...</a><br /></td></tr>
+<tr class="separator:ga43aa4a8e4b93725b4876ee2677e19c7b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga9e9590018284939f43f60964283f33ae"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msg_group.html#ga9e9590018284939f43f60964283f33ae">natsMsg_Destroy</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg)</td></tr>
+<tr class="memdesc:ga9e9590018284939f43f60964283f33ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the message object.  <a href="group__msg_group.html#ga9e9590018284939f43f60964283f33ae">More...</a><br /></td></tr>
+<tr class="separator:ga9e9590018284939f43f60964283f33ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<p >NATS Message. </p>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="ga1a091d24f939d881bf04fba78b8995c2" name="ga1a091d24f939d881bf04fba78b8995c2"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga1a091d24f939d881bf04fba78b8995c2">&#9670;&#160;</a></span>natsMsgList_Destroy()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void natsMsgList_Destroy </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structnats_msg_list.html">natsMsgList</a> *&#160;</td>
+          <td class="paramname"><em>list</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This function iterates through the list of all messages and call <a class="el" href="group__msg_group.html#ga9e9590018284939f43f60964283f33ae" title="Destroys the message object.">natsMsg_Destroy</a> for each valid (not set to <code>NULL</code>) message. It then frees the array that was allocated to hold pointers to those messages.</p>
+<dl class="section note"><dt>Note</dt><dd>The <a class="el" href="structnats_msg_list.html" title="A list of NATS messages.">natsMsgList</a> object itself is not freed since it is expected that users will pass a pointer to a stack object. Should the user create its own object, it will be the user responsibility to free this object.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">list</td><td>the <a class="el" href="structnats_msg_list.html" title="A list of NATS messages.">natsMsgList</a> list of <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a> objects to destroy. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga098e4fec1c5a71c00a0d092fbd6d1a21" name="ga098e4fec1c5a71c00a0d092fbd6d1a21"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga098e4fec1c5a71c00a0d092fbd6d1a21">&#9670;&#160;</a></span>natsMsg_Create()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsMsg_Create </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **&#160;</td>
+          <td class="paramname"><em>newMsg</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>subj</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>reply</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>data</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&#160;</td>
+          <td class="paramname"><em>dataLen</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Creates a <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a> object. This is used by the subscription related calls and by <a class="el" href="group__conn_pub_group.html#ga74511acd87385931112c45c48c2a14ba" title="Publishes a message on a subject.">natsConnection_PublishMsg()</a>.</p>
+<dl class="section note"><dt>Note</dt><dd>Messages need to be destroyed with <a class="el" href="group__msg_group.html#ga9e9590018284939f43f60964283f33ae" title="Destroys the message object.">natsMsg_Destroy()</a> when no longer needed.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__msg_group.html#ga9e9590018284939f43f60964283f33ae" title="Destroys the message object.">natsMsg_Destroy()</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">newMsg</td><td>the location where to store the pointer to the newly created <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a> object. </td></tr>
+    <tr><td class="paramname">subj</td><td>the subject this message will be sent to. Cannot be <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">reply</td><td>the optional reply for this message. </td></tr>
+    <tr><td class="paramname">data</td><td>the optional message payload. </td></tr>
+    <tr><td class="paramname">dataLen</td><td>the size of the payload. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gad7cad38946648e3047aa0665a3dd230a" name="gad7cad38946648e3047aa0665a3dd230a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gad7cad38946648e3047aa0665a3dd230a">&#9670;&#160;</a></span>natsMsg_GetSubject()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char * natsMsg_GetSubject </td>
+          <td>(</td>
+          <td class="paramtype">const <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *&#160;</td>
+          <td class="paramname"><em>msg</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the subject set on that message.</p>
+<dl class="section warning"><dt>Warning</dt><dd>The string belongs to the message and must not be freed. Copy it if needed. </dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">msg</td><td>the pointer to the <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga880535362c91b3e405792aa66ff945b6" name="ga880535362c91b3e405792aa66ff945b6"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga880535362c91b3e405792aa66ff945b6">&#9670;&#160;</a></span>natsMsg_GetReply()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char * natsMsg_GetReply </td>
+          <td>(</td>
+          <td class="paramtype">const <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *&#160;</td>
+          <td class="paramname"><em>msg</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the reply, possibly <code>NULL</code>.</p>
+<dl class="section warning"><dt>Warning</dt><dd>The string belongs to the message and must not be freed. Copy it if needed.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">msg</td><td>the pointer to the <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga523364451fd92534e754054266196e59" name="ga523364451fd92534e754054266196e59"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga523364451fd92534e754054266196e59">&#9670;&#160;</a></span>natsMsg_GetData()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char * natsMsg_GetData </td>
+          <td>(</td>
+          <td class="paramtype">const <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *&#160;</td>
+          <td class="paramname"><em>msg</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the message payload, possibly <code>NULL</code>.</p>
+<p >Note that although the data sent and received from the server is not <code>NULL</code> terminated, the NATS C Client does add a <code>NULL</code> byte to the received payload. If you expect the received data to be a "string", then this conveniently allows you to call <a class="el" href="group__msg_group.html#ga523364451fd92534e754054266196e59" title="Returns the message payload.">natsMsg_GetData()</a> without having to copy the returned data to a buffer to add the <code>NULL</code> byte at the end.</p>
+<dl class="section warning"><dt>Warning</dt><dd>The string belongs to the message and must not be freed. Copy it if needed.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">msg</td><td>the pointer to the <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga25b69066ae50287e178aaf4f70f7d3de" name="ga25b69066ae50287e178aaf4f70f7d3de"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga25b69066ae50287e178aaf4f70f7d3de">&#9670;&#160;</a></span>natsMsg_GetDataLength()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int natsMsg_GetDataLength </td>
+          <td>(</td>
+          <td class="paramtype">const <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *&#160;</td>
+          <td class="paramname"><em>msg</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the message's payload length, possibly 0.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">msg</td><td>the pointer to the <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gaf30b47d4217c9335919f05536e379af8" name="gaf30b47d4217c9335919f05536e379af8"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaf30b47d4217c9335919f05536e379af8">&#9670;&#160;</a></span>natsMsgHeader_Set()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsMsgHeader_Set </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *&#160;</td>
+          <td class="paramname"><em>msg</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>key</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>value</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >It will replace any existing value associated with <code>key</code>.</p>
+<dl class="section warning"><dt>Warning</dt><dd>Prior to v3.0.0, the <code>key</code> was stored in its canonical form, this is no longer the case. Header keys are now case sensitive.</dd>
+<dd>
+Headers are not thread-safe, that is, you must not set/add/get values or delete keys for the same message from different threads. The internal structure of <code>natsMsg</code> may possible be altered during this call.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">msg</td><td>the pointer to the <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a> object. </td></tr>
+    <tr><td class="paramname">key</td><td>the key under which the <code>value</code> will be stored. It can't ne <code>NULL</code> or empty. </td></tr>
+    <tr><td class="paramname">value</td><td>the string to store under the given <code>key</code>. The value can be <code>NULL</code> or empty string. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga2b641ec3b1745604d7de1102e472254b" name="ga2b641ec3b1745604d7de1102e472254b"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga2b641ec3b1745604d7de1102e472254b">&#9670;&#160;</a></span>natsMsgHeader_Add()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsMsgHeader_Add </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *&#160;</td>
+          <td class="paramname"><em>msg</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>key</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>value</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >It will append to any existing values associated with <code>key</code>.</p>
+<dl class="section warning"><dt>Warning</dt><dd>Prior to v3.0.0, the <code>key</code> was stored in its canonical form, this is no longer the case. Header keys are now case sensitive.</dd>
+<dd>
+Headers are not thread-safe, that is, you must not set/add/get values or delete keys for the same message from different threads. The internal structure of <code>natsMsg</code> may possible be altered during this call.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">msg</td><td>the pointer to the <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a> object. </td></tr>
+    <tr><td class="paramname">key</td><td>the key under which the <code>value</code> will be stored. It can't ne <code>NULL</code> or empty. </td></tr>
+    <tr><td class="paramname">value</td><td>the string to add to the values associated with the given <code>key</code>. The value can be <code>NULL</code> or empty string. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gab3349f0b0ce721b340d5c0753c90ee18" name="gab3349f0b0ce721b340d5c0753c90ee18"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gab3349f0b0ce721b340d5c0753c90ee18">&#9670;&#160;</a></span>natsMsgHeader_Get()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsMsgHeader_Get </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *&#160;</td>
+          <td class="paramname"><em>msg</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>key</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char **&#160;</td>
+          <td class="paramname"><em>value</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >If more than one entry for the <code>key</code> is available, the first is returned. The returned value is owned by the library and MUST not be freed or altered.</p>
+<dl class="section warning"><dt>Warning</dt><dd>Prior to v3.0.0, the <code>key</code> was stored in its canonical form, this is no longer the case. Header keys are now case sensitive.</dd>
+<dd>
+Headers are not thread-safe, that is, you must not set/add/get values or delete keys for the same message from different threads. The internal structure of <code>natsMsg</code> may possible be altered during this call.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">msg</td><td>the pointer to the <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a> object. </td></tr>
+    <tr><td class="paramname">key</td><td>the key for which the value is requested. </td></tr>
+    <tr><td class="paramname">value</td><td>the memory location where the library will store the pointer to the first value (if more than one is found) associated with the <code>key</code>. </td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>NATS_NOT_FOUND if <code>key</code> is not present in the headers. </dd></dl>
+
+</div>
+</div>
+<a id="gae1ce9c9d82d151a3ea9dc03da048f66f" name="gae1ce9c9d82d151a3ea9dc03da048f66f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gae1ce9c9d82d151a3ea9dc03da048f66f">&#9670;&#160;</a></span>natsMsgHeader_Values()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsMsgHeader_Values </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *&#160;</td>
+          <td class="paramname"><em>msg</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>key</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char ***&#160;</td>
+          <td class="paramname"><em>values</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int *&#160;</td>
+          <td class="paramname"><em>count</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >The returned strings are own by the library and MUST not be freed or altered. However, the returned array <code>values</code> MUST be freed by the user.</p>
+<div class="fragment"><div class="line"><span class="keyword">const</span> <span class="keywordtype">char</span>* *values = NULL;</div>
+<div class="line"><span class="keywordtype">int</span>         count   = 0;</div>
+<div class="line"> </div>
+<div class="line">s = <a class="code hl_function" href="group__msg_group.html#gae1ce9c9d82d151a3ea9dc03da048f66f">natsMsgHeader_Values</a>(msg, <span class="stringliteral">&quot;My-Key&quot;</span>, &amp;values, &amp;count);</div>
+<div class="line"><span class="keywordflow">if</span> (s == <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">NATS_OK</a>)</div>
+<div class="line">{</div>
+<div class="line">     <span class="comment">// do something with the values</span></div>
+<div class="line"> </div>
+<div class="line">     <span class="comment">// then free the array of pointers.</span></div>
+<div class="line">     free((<span class="keywordtype">void</span>*) values);</div>
+<div class="line">}</div>
+<div class="ttc" id="agroup__msg_group_html_gae1ce9c9d82d151a3ea9dc03da048f66f"><div class="ttname"><a href="group__msg_group.html#gae1ce9c9d82d151a3ea9dc03da048f66f">natsMsgHeader_Values</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsMsgHeader_Values(natsMsg *msg, const char *key, const char ***values, int *count)</div><div class="ttdoc">Get all header values associated with key.</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">NATS_OK</a></div><div class="ttdeci">@ NATS_OK</div><div class="ttdoc">Success.</div><div class="ttdef"><b>Definition:</b> status.h:51</div></div>
+</div><!-- fragment --><dl class="section warning"><dt>Warning</dt><dd>Prior to v3.0.0, the <code>key</code> was stored in its canonical form, this is no longer the case. Header keys are now case sensitive.</dd>
+<dd>
+Headers are not thread-safe, that is, you must not set/add/get values or delete keys for the same message from different threads. The internal structure of <code>natsMsg</code> may possible be altered during this call.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">msg</td><td>the pointer to the <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a> object. </td></tr>
+    <tr><td class="paramname">key</td><td>the key for which the values are requested. </td></tr>
+    <tr><td class="paramname">values</td><td>the memory location where the library will store the pointer to the array of values. </td></tr>
+    <tr><td class="paramname">count</td><td>the memory location where the library will store the number of values returned. </td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>NATS_NOT_FOUND if <code>key</code> is not present in the headers. </dd></dl>
+
+</div>
+</div>
+<a id="ga6ee8a007111ada293dd24ff0bab02491" name="ga6ee8a007111ada293dd24ff0bab02491"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga6ee8a007111ada293dd24ff0bab02491">&#9670;&#160;</a></span>natsMsgHeader_Keys()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsMsgHeader_Keys </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *&#160;</td>
+          <td class="paramname"><em>msg</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char ***&#160;</td>
+          <td class="paramname"><em>keys</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int *&#160;</td>
+          <td class="paramname"><em>count</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >The returned strings are own by the library and MUST not be freed or altered. However, the returned array <code>keys</code> MUST be freed by the user.</p>
+<div class="fragment"><div class="line"><span class="keyword">const</span> <span class="keywordtype">char</span>* *keys = NULL;</div>
+<div class="line"><span class="keywordtype">int</span>         count   = 0;</div>
+<div class="line"> </div>
+<div class="line">s = <a class="code hl_function" href="group__msg_group.html#ga6ee8a007111ada293dd24ff0bab02491">natsMsgHeader_Keys</a>(msg, &amp;keys, &amp;count);</div>
+<div class="line"><span class="keywordflow">if</span> (s == <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">NATS_OK</a>)</div>
+<div class="line">{</div>
+<div class="line">     <span class="comment">// do something with the keys</span></div>
+<div class="line"> </div>
+<div class="line">     <span class="comment">// then free the array of pointers.</span></div>
+<div class="line">     free((<span class="keywordtype">void</span>*) keys);</div>
+<div class="line">}</div>
+<div class="ttc" id="agroup__msg_group_html_ga6ee8a007111ada293dd24ff0bab02491"><div class="ttname"><a href="group__msg_group.html#ga6ee8a007111ada293dd24ff0bab02491">natsMsgHeader_Keys</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsMsgHeader_Keys(natsMsg *msg, const char ***keys, int *count)</div><div class="ttdoc">Get all header keys.</div></div>
+</div><!-- fragment --><dl class="section warning"><dt>Warning</dt><dd>Headers are not thread-safe, that is, you must not set/add/get values or delete keys for the same message from different threads. The internal structure of <code>natsMsg</code> may possible be altered during this call.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">msg</td><td>the pointer to the <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a> object. </td></tr>
+    <tr><td class="paramname">keys</td><td>the memory location where the library will store the pointer to the array of keys. </td></tr>
+    <tr><td class="paramname">count</td><td>the memory location where the library will store the number of keys returned. </td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>NATS_NOT_FOUND if no key is present. </dd></dl>
+
+</div>
+</div>
+<a id="gac78ca02dc93d05cae837ced6386408f1" name="gac78ca02dc93d05cae837ced6386408f1"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gac78ca02dc93d05cae837ced6386408f1">&#9670;&#160;</a></span>natsMsgHeader_Delete()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsMsgHeader_Delete </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *&#160;</td>
+          <td class="paramname"><em>msg</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>key</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<dl class="section warning"><dt>Warning</dt><dd>Prior to v3.0.0, the <code>key</code> was stored in its canonical form, this is no longer the case. Header keys are now case sensitive.</dd>
+<dd>
+Headers are not thread-safe, that is, you must not set/add/get values or delete keys for the same message from different threads. The internal structure of <code>natsMsg</code> may possible be altered during this call.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">msg</td><td>the pointer to the <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a> object. </td></tr>
+    <tr><td class="paramname">key</td><td>the key to delete from the headers map. </td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>NATS_NOT_FOUND if <code>key</code> is not present in the headers. </dd></dl>
+
+</div>
+</div>
+<a id="ga43aa4a8e4b93725b4876ee2677e19c7b" name="ga43aa4a8e4b93725b4876ee2677e19c7b"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga43aa4a8e4b93725b4876ee2677e19c7b">&#9670;&#160;</a></span>natsMsg_IsNoResponders()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> bool natsMsg_IsNoResponders </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *&#160;</td>
+          <td class="paramname"><em>msg</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Starting with the NATS Server v2.2.0+ and the C client v2.2.0+ releases, which introduced support for message headers and the "no responders" feature, if a request is received by the server and there are no subscriptions on the request's subject, the server sends a message with no payload but with a header "Status" with value "503".</p>
+<p >The call <a class="el" href="group__conn_pub_group.html#gaf4b4a022f9c21fc269b87c000330c5a7" title="Sends a request and waits for a reply.">natsConnection_Request()</a> and its variants intercept this special message and instead of returning it to the user, they return <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80aab97324e40ccfe1360080c651c330e62" title="No responders were running when the server received the request.">NATS_NO_RESPONDERS</a>.</p>
+<p >If a synchronous subscription is created on a subject used as a reply subject to a <a class="el" href="group__conn_pub_group.html#gaaaa3d75ffec2dcdc6bf905cdb1eee59e" title="Publishes data on a subject expecting replies on the given reply.">natsConnection_PublishRequest</a> call (and its variants), <a class="el" href="group__sub_group.html#ga6538a5d78dfb0f16514b94c8e74c11af" title="Returns the next available message.">natsSubscription_NextMsg</a> also detects this message and returns <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80aab97324e40ccfe1360080c651c330e62" title="No responders were running when the server received the request.">NATS_NO_RESPONDERS</a> (but it was not from release v2.2.0 to v2.4.1).</p>
+<p >For asynchronous subscriptions, the user may want to know that the request failed because there are no responders. For that reason, the message is passed to the message callback, and this function can be used to detect that this is a "no responders" message from the server and act accordingly.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">msg</td><td>the pointer to the <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd><code>true</code> if this message is a "no responders" message from the server, that is, has no payload and the "Status" header with "503" as the value. </dd></dl>
+
+</div>
+</div>
+<a id="ga9e9590018284939f43f60964283f33ae" name="ga9e9590018284939f43f60964283f33ae"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga9e9590018284939f43f60964283f33ae">&#9670;&#160;</a></span>natsMsg_Destroy()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void natsMsg_Destroy </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *&#160;</td>
+          <td class="paramname"><em>msg</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Destroys the message, freeing memory.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">msg</td><td>the pointer to the <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a> object to destroy. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__msg_group.js b/doc/html/group__msg_group.js
new file mode 100644 (file)
index 0000000..ea343d0
--- /dev/null
@@ -0,0 +1,17 @@
+var group__msg_group =
+[
+    [ "natsMsgList_Destroy", "group__msg_group.html#ga1a091d24f939d881bf04fba78b8995c2", null ],
+    [ "natsMsg_Create", "group__msg_group.html#ga098e4fec1c5a71c00a0d092fbd6d1a21", null ],
+    [ "natsMsg_GetSubject", "group__msg_group.html#gad7cad38946648e3047aa0665a3dd230a", null ],
+    [ "natsMsg_GetReply", "group__msg_group.html#ga880535362c91b3e405792aa66ff945b6", null ],
+    [ "natsMsg_GetData", "group__msg_group.html#ga523364451fd92534e754054266196e59", null ],
+    [ "natsMsg_GetDataLength", "group__msg_group.html#ga25b69066ae50287e178aaf4f70f7d3de", null ],
+    [ "natsMsgHeader_Set", "group__msg_group.html#gaf30b47d4217c9335919f05536e379af8", null ],
+    [ "natsMsgHeader_Add", "group__msg_group.html#ga2b641ec3b1745604d7de1102e472254b", null ],
+    [ "natsMsgHeader_Get", "group__msg_group.html#gab3349f0b0ce721b340d5c0753c90ee18", null ],
+    [ "natsMsgHeader_Values", "group__msg_group.html#gae1ce9c9d82d151a3ea9dc03da048f66f", null ],
+    [ "natsMsgHeader_Keys", "group__msg_group.html#ga6ee8a007111ada293dd24ff0bab02491", null ],
+    [ "natsMsgHeader_Delete", "group__msg_group.html#gac78ca02dc93d05cae837ced6386408f1", null ],
+    [ "natsMsg_IsNoResponders", "group__msg_group.html#ga43aa4a8e4b93725b4876ee2677e19c7b", null ],
+    [ "natsMsg_Destroy", "group__msg_group.html#ga9e9590018284939f43f60964283f33ae", null ]
+];
\ No newline at end of file
diff --git a/doc/html/group__opts_group.html b/doc/html/group__opts_group.html
new file mode 100644 (file)
index 0000000..12f5c03
--- /dev/null
@@ -0,0 +1,2513 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Options</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__opts_group.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle"><div class="title">Options<div class="ingroups"><a class="el" href="group__func_group.html">Functions</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:ga61d4a0cf2fbf7d13cc910e5a00c575be"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga61d4a0cf2fbf7d13cc910e5a00c575be">natsOptions_Create</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> **newOpts)</td></tr>
+<tr class="memdesc:ga61d4a0cf2fbf7d13cc910e5a00c575be"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object.  <a href="group__opts_group.html#ga61d4a0cf2fbf7d13cc910e5a00c575be">More...</a><br /></td></tr>
+<tr class="separator:ga61d4a0cf2fbf7d13cc910e5a00c575be"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga3f7e760214417c7d87541ecb9ab5bea5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga3f7e760214417c7d87541ecb9ab5bea5">natsOptions_SetURL</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *url)</td></tr>
+<tr class="memdesc:ga3f7e760214417c7d87541ecb9ab5bea5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the URL to connect to.  <a href="group__opts_group.html#ga3f7e760214417c7d87541ecb9ab5bea5">More...</a><br /></td></tr>
+<tr class="separator:ga3f7e760214417c7d87541ecb9ab5bea5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gacb7e964ae54b74d972d72e118b7b8bdf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gacb7e964ae54b74d972d72e118b7b8bdf">natsOptions_SetServers</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char **servers, int serversCount)</td></tr>
+<tr class="memdesc:gacb7e964ae54b74d972d72e118b7b8bdf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the list of servers to try to (re)connect to.  <a href="group__opts_group.html#gacb7e964ae54b74d972d72e118b7b8bdf">More...</a><br /></td></tr>
+<tr class="separator:gacb7e964ae54b74d972d72e118b7b8bdf"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga5b99da7dd74aac3be962f323c3863d9e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga5b99da7dd74aac3be962f323c3863d9e">natsOptions_SetUserInfo</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *user, const char *password)</td></tr>
+<tr class="memdesc:ga5b99da7dd74aac3be962f323c3863d9e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the user name/password to use when not specified in the URL.  <a href="group__opts_group.html#ga5b99da7dd74aac3be962f323c3863d9e">More...</a><br /></td></tr>
+<tr class="separator:ga5b99da7dd74aac3be962f323c3863d9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gad58a5b9dabadeebda30e952ff7b39193"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gad58a5b9dabadeebda30e952ff7b39193">natsOptions_SetToken</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *token)</td></tr>
+<tr class="memdesc:gad58a5b9dabadeebda30e952ff7b39193"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the token to use when not specified in the URL.  <a href="group__opts_group.html#gad58a5b9dabadeebda30e952ff7b39193">More...</a><br /></td></tr>
+<tr class="separator:gad58a5b9dabadeebda30e952ff7b39193"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga23a3b1f022112e98ddccb18b247b4426"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga23a3b1f022112e98ddccb18b247b4426">natsOptions_SetTokenHandler</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <a class="el" href="group__callbacks_group.html#ga4b02de70fe9380d184fd01d87527f499">natsTokenHandler</a> tokenCb, void *closure)</td></tr>
+<tr class="memdesc:ga23a3b1f022112e98ddccb18b247b4426"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the tokenCb to use whenever a token is needed.  <a href="group__opts_group.html#ga23a3b1f022112e98ddccb18b247b4426">More...</a><br /></td></tr>
+<tr class="separator:ga23a3b1f022112e98ddccb18b247b4426"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaabf8763b931dcf389c83fd95d760a413"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gaabf8763b931dcf389c83fd95d760a413">natsOptions_SetNoRandomize</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool noRandomize)</td></tr>
+<tr class="memdesc:gaabf8763b931dcf389c83fd95d760a413"><td class="mdescLeft">&#160;</td><td class="mdescRight">Indicate if the servers list should be randomized.  <a href="group__opts_group.html#gaabf8763b931dcf389c83fd95d760a413">More...</a><br /></td></tr>
+<tr class="separator:gaabf8763b931dcf389c83fd95d760a413"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga17cd7fe41176cd98aca1184fa9352ad9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga17cd7fe41176cd98aca1184fa9352ad9">natsOptions_SetTimeout</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int64_t timeout)</td></tr>
+<tr class="memdesc:ga17cd7fe41176cd98aca1184fa9352ad9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the (re)connect process timeout.  <a href="group__opts_group.html#ga17cd7fe41176cd98aca1184fa9352ad9">More...</a><br /></td></tr>
+<tr class="separator:ga17cd7fe41176cd98aca1184fa9352ad9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga1c529d347be0fe2eec17c7f4698e283e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga1c529d347be0fe2eec17c7f4698e283e">natsOptions_SetName</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *name)</td></tr>
+<tr class="memdesc:ga1c529d347be0fe2eec17c7f4698e283e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the name.  <a href="group__opts_group.html#ga1c529d347be0fe2eec17c7f4698e283e">More...</a><br /></td></tr>
+<tr class="separator:ga1c529d347be0fe2eec17c7f4698e283e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaa1f09416d443fa7a6af6b695da563eba"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gaa1f09416d443fa7a6af6b695da563eba">natsOptions_SetSecure</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool secure)</td></tr>
+<tr class="memdesc:gaa1f09416d443fa7a6af6b695da563eba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the secure mode.  <a href="group__opts_group.html#gaa1f09416d443fa7a6af6b695da563eba">More...</a><br /></td></tr>
+<tr class="separator:gaa1f09416d443fa7a6af6b695da563eba"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2cd6563694a439b3949a31fd81103099"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga2cd6563694a439b3949a31fd81103099">natsOptions_LoadCATrustedCertificates</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *fileName)</td></tr>
+<tr class="memdesc:ga2cd6563694a439b3949a31fd81103099"><td class="mdescLeft">&#160;</td><td class="mdescRight">Loads the trusted CA certificates from a file.  <a href="group__opts_group.html#ga2cd6563694a439b3949a31fd81103099">More...</a><br /></td></tr>
+<tr class="separator:ga2cd6563694a439b3949a31fd81103099"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gafb30794fc2ae74b9e0bd8fb609b901c8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gafb30794fc2ae74b9e0bd8fb609b901c8">natsOptions_SetCATrustedCertificates</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *certificates)</td></tr>
+<tr class="memdesc:gafb30794fc2ae74b9e0bd8fb609b901c8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the trusted CA certificates from memory.  <a href="group__opts_group.html#gafb30794fc2ae74b9e0bd8fb609b901c8">More...</a><br /></td></tr>
+<tr class="separator:gafb30794fc2ae74b9e0bd8fb609b901c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga36943e2ba53d05407cdabc4e7e96484b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga36943e2ba53d05407cdabc4e7e96484b">natsOptions_LoadCertificatesChain</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *certsFileName, const char *keyFileName)</td></tr>
+<tr class="memdesc:ga36943e2ba53d05407cdabc4e7e96484b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Loads the certificate chain from a file, using the given key.  <a href="group__opts_group.html#ga36943e2ba53d05407cdabc4e7e96484b">More...</a><br /></td></tr>
+<tr class="separator:ga36943e2ba53d05407cdabc4e7e96484b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gae98f0f9034e93941767ab1ae6eec2c0c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gae98f0f9034e93941767ab1ae6eec2c0c">natsOptions_SetCertificatesChain</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *cert, const char *key)</td></tr>
+<tr class="memdesc:gae98f0f9034e93941767ab1ae6eec2c0c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the client certificate and key.  <a href="group__opts_group.html#gae98f0f9034e93941767ab1ae6eec2c0c">More...</a><br /></td></tr>
+<tr class="separator:gae98f0f9034e93941767ab1ae6eec2c0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga5698f020e8eb3e7440eb073fe08ef62c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga5698f020e8eb3e7440eb073fe08ef62c">natsOptions_SetCiphers</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *ciphers)</td></tr>
+<tr class="memdesc:ga5698f020e8eb3e7440eb073fe08ef62c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the list of available ciphers.  <a href="group__opts_group.html#ga5698f020e8eb3e7440eb073fe08ef62c">More...</a><br /></td></tr>
+<tr class="separator:ga5698f020e8eb3e7440eb073fe08ef62c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2b7f144b011d8ce62941b608a8f324f0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga2b7f144b011d8ce62941b608a8f324f0">natsOptions_SetCipherSuites</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *ciphers)</td></tr>
+<tr class="memdesc:ga2b7f144b011d8ce62941b608a8f324f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the list of available ciphers for TLSv1.3.  <a href="group__opts_group.html#ga2b7f144b011d8ce62941b608a8f324f0">More...</a><br /></td></tr>
+<tr class="separator:ga2b7f144b011d8ce62941b608a8f324f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga0ba43ba9930df385e4781b12be9f2851"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga0ba43ba9930df385e4781b12be9f2851">natsOptions_SetExpectedHostname</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *hostname)</td></tr>
+<tr class="memdesc:ga0ba43ba9930df385e4781b12be9f2851"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the server certificate's expected hostname.  <a href="group__opts_group.html#ga0ba43ba9930df385e4781b12be9f2851">More...</a><br /></td></tr>
+<tr class="separator:ga0ba43ba9930df385e4781b12be9f2851"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga6f804ec44adc299989fe623570679da3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga6f804ec44adc299989fe623570679da3">natsOptions_SkipServerVerification</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool skip)</td></tr>
+<tr class="memdesc:ga6f804ec44adc299989fe623570679da3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Switch server certificate verification.  <a href="group__opts_group.html#ga6f804ec44adc299989fe623570679da3">More...</a><br /></td></tr>
+<tr class="separator:ga6f804ec44adc299989fe623570679da3"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaa16bfd09ef318af18c27a0e199681b69"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gaa16bfd09ef318af18c27a0e199681b69">natsOptions_SetVerbose</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool verbose)</td></tr>
+<tr class="memdesc:gaa16bfd09ef318af18c27a0e199681b69"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the verbose mode.  <a href="group__opts_group.html#gaa16bfd09ef318af18c27a0e199681b69">More...</a><br /></td></tr>
+<tr class="separator:gaa16bfd09ef318af18c27a0e199681b69"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga26f166af20de98bec67bc6cc916f769e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga26f166af20de98bec67bc6cc916f769e">natsOptions_SetPedantic</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool pedantic)</td></tr>
+<tr class="memdesc:ga26f166af20de98bec67bc6cc916f769e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the pedantic mode.  <a href="group__opts_group.html#ga26f166af20de98bec67bc6cc916f769e">More...</a><br /></td></tr>
+<tr class="separator:ga26f166af20de98bec67bc6cc916f769e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gae68fb615835364c0809555e8dc93f57e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gae68fb615835364c0809555e8dc93f57e">natsOptions_SetPingInterval</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int64_t interval)</td></tr>
+<tr class="memdesc:gae68fb615835364c0809555e8dc93f57e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the ping interval.  <a href="group__opts_group.html#gae68fb615835364c0809555e8dc93f57e">More...</a><br /></td></tr>
+<tr class="separator:gae68fb615835364c0809555e8dc93f57e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaaff89c3f41627f4b2929dbc9b82d265b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gaaff89c3f41627f4b2929dbc9b82d265b">natsOptions_SetMaxPingsOut</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int maxPingsOut)</td></tr>
+<tr class="memdesc:gaaff89c3f41627f4b2929dbc9b82d265b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the limit of outstanding <code>PING</code>s without corresponding <code>PONG</code>s.  <a href="group__opts_group.html#gaaff89c3f41627f4b2929dbc9b82d265b">More...</a><br /></td></tr>
+<tr class="separator:gaaff89c3f41627f4b2929dbc9b82d265b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga1a3e3abfd7ddd8aff247df8f332bbda3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga1a3e3abfd7ddd8aff247df8f332bbda3">natsOptions_SetIOBufSize</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int ioBufSize)</td></tr>
+<tr class="memdesc:ga1a3e3abfd7ddd8aff247df8f332bbda3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the size of the internal read/write buffers.  <a href="group__opts_group.html#ga1a3e3abfd7ddd8aff247df8f332bbda3">More...</a><br /></td></tr>
+<tr class="separator:ga1a3e3abfd7ddd8aff247df8f332bbda3"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga3d1d3cb2f2a0e23d27dd60e96d1cc91b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga3d1d3cb2f2a0e23d27dd60e96d1cc91b">natsOptions_SetAllowReconnect</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool allow)</td></tr>
+<tr class="memdesc:ga3d1d3cb2f2a0e23d27dd60e96d1cc91b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Indicates if the connection will be allowed to reconnect.  <a href="group__opts_group.html#ga3d1d3cb2f2a0e23d27dd60e96d1cc91b">More...</a><br /></td></tr>
+<tr class="separator:ga3d1d3cb2f2a0e23d27dd60e96d1cc91b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gab54cd2719c0b64eebd6c7b83dd2908a0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gab54cd2719c0b64eebd6c7b83dd2908a0">natsOptions_SetMaxReconnect</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int maxReconnect)</td></tr>
+<tr class="memdesc:gab54cd2719c0b64eebd6c7b83dd2908a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the maximum number of reconnect attempts.  <a href="group__opts_group.html#gab54cd2719c0b64eebd6c7b83dd2908a0">More...</a><br /></td></tr>
+<tr class="separator:gab54cd2719c0b64eebd6c7b83dd2908a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2730f4e16e318a2ef8de98dbf6ede807"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga2730f4e16e318a2ef8de98dbf6ede807">natsOptions_SetReconnectWait</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int64_t reconnectWait)</td></tr>
+<tr class="memdesc:ga2730f4e16e318a2ef8de98dbf6ede807"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the time between reconnect attempts.  <a href="group__opts_group.html#ga2730f4e16e318a2ef8de98dbf6ede807">More...</a><br /></td></tr>
+<tr class="separator:ga2730f4e16e318a2ef8de98dbf6ede807"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga8f3df57ed8ae418d3ae6678ae5e2a5d2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga8f3df57ed8ae418d3ae6678ae5e2a5d2">natsOptions_SetReconnectJitter</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int64_t jitter, int64_t jitterTLS)</td></tr>
+<tr class="memdesc:ga8f3df57ed8ae418d3ae6678ae5e2a5d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the upper bound of a random delay added to reconnect wait.  <a href="group__opts_group.html#ga8f3df57ed8ae418d3ae6678ae5e2a5d2">More...</a><br /></td></tr>
+<tr class="separator:ga8f3df57ed8ae418d3ae6678ae5e2a5d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga3593165aa113d6736e0226ddc56b3e9d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga3593165aa113d6736e0226ddc56b3e9d">natsOptions_SetCustomReconnectDelay</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <a class="el" href="group__callbacks_group.html#ga3353d4b92851c52121f65aaf0684cba4">natsCustomReconnectDelayHandler</a> cb, void *closure)</td></tr>
+<tr class="memdesc:ga3593165aa113d6736e0226ddc56b3e9d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the handler to invoke when the library needs to wait before the next reconnect attempts.  <a href="group__opts_group.html#ga3593165aa113d6736e0226ddc56b3e9d">More...</a><br /></td></tr>
+<tr class="separator:ga3593165aa113d6736e0226ddc56b3e9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaa0d4b7ece8477cb9879f0dafff3456a5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gaa0d4b7ece8477cb9879f0dafff3456a5">natsOptions_SetReconnectBufSize</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int reconnectBufSize)</td></tr>
+<tr class="memdesc:gaa0d4b7ece8477cb9879f0dafff3456a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the size of the backing buffer used during reconnect.  <a href="group__opts_group.html#gaa0d4b7ece8477cb9879f0dafff3456a5">More...</a><br /></td></tr>
+<tr class="separator:gaa0d4b7ece8477cb9879f0dafff3456a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga95510436eee06f9992ded96a44795c40"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga95510436eee06f9992ded96a44795c40">natsOptions_SetMaxPendingMsgs</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int maxPending)</td></tr>
+<tr class="memdesc:ga95510436eee06f9992ded96a44795c40"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the maximum number of pending messages per subscription.  <a href="group__opts_group.html#ga95510436eee06f9992ded96a44795c40">More...</a><br /></td></tr>
+<tr class="separator:ga95510436eee06f9992ded96a44795c40"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga127ec7a8196b453947a7fa9a64096cbd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga127ec7a8196b453947a7fa9a64096cbd">natsOptions_SetErrorHandler</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <a class="el" href="group__callbacks_group.html#ga9e511dffa471dfb971b7dd2b12329626">natsErrHandler</a> errHandler, void *closure)</td></tr>
+<tr class="memdesc:ga127ec7a8196b453947a7fa9a64096cbd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the error handler for asynchronous events.  <a href="group__opts_group.html#ga127ec7a8196b453947a7fa9a64096cbd">More...</a><br /></td></tr>
+<tr class="separator:ga127ec7a8196b453947a7fa9a64096cbd"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga44410242e73134e5bb51ef27904a9253"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga44410242e73134e5bb51ef27904a9253">natsOptions_SetClosedCB</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <a class="el" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a> closedCb, void *closure)</td></tr>
+<tr class="memdesc:ga44410242e73134e5bb51ef27904a9253"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the callback to be invoked when a connection to a server is permanently lost.  <a href="group__opts_group.html#ga44410242e73134e5bb51ef27904a9253">More...</a><br /></td></tr>
+<tr class="separator:ga44410242e73134e5bb51ef27904a9253"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gadc8dc0cedd91bda71d544f3dedc4a039"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gadc8dc0cedd91bda71d544f3dedc4a039">natsOptions_SetDisconnectedCB</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <a class="el" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a> disconnectedCb, void *closure)</td></tr>
+<tr class="memdesc:gadc8dc0cedd91bda71d544f3dedc4a039"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the callback to be invoked when the connection to a server is lost.  <a href="group__opts_group.html#gadc8dc0cedd91bda71d544f3dedc4a039">More...</a><br /></td></tr>
+<tr class="separator:gadc8dc0cedd91bda71d544f3dedc4a039"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga26a48c8529fffa5f5d1a61c030979980"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga26a48c8529fffa5f5d1a61c030979980">natsOptions_SetReconnectedCB</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <a class="el" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a> reconnectedCb, void *closure)</td></tr>
+<tr class="memdesc:ga26a48c8529fffa5f5d1a61c030979980"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the callback to be invoked when the connection has reconnected.  <a href="group__opts_group.html#ga26a48c8529fffa5f5d1a61c030979980">More...</a><br /></td></tr>
+<tr class="separator:ga26a48c8529fffa5f5d1a61c030979980"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gab5baab507c974402ab0d8c5e8227ee65"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gab5baab507c974402ab0d8c5e8227ee65">natsOptions_SetDiscoveredServersCB</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <a class="el" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a> discoveredServersCb, void *closure)</td></tr>
+<tr class="memdesc:gab5baab507c974402ab0d8c5e8227ee65"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the callback to be invoked when new servers are discovered.  <a href="group__opts_group.html#gab5baab507c974402ab0d8c5e8227ee65">More...</a><br /></td></tr>
+<tr class="separator:gab5baab507c974402ab0d8c5e8227ee65"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga7e4172084520708b8c9f28e73174461c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga7e4172084520708b8c9f28e73174461c">natsOptions_SetIgnoreDiscoveredServers</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool ignore)</td></tr>
+<tr class="memdesc:ga7e4172084520708b8c9f28e73174461c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets if the library should ignore or not discovered servers.  <a href="group__opts_group.html#ga7e4172084520708b8c9f28e73174461c">More...</a><br /></td></tr>
+<tr class="separator:ga7e4172084520708b8c9f28e73174461c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga54dea2ffeb33779771652a7a14fc4adc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga54dea2ffeb33779771652a7a14fc4adc">natsOptions_SetLameDuckModeCB</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <a class="el" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a> lameDuckCb, void *closure)</td></tr>
+<tr class="memdesc:ga54dea2ffeb33779771652a7a14fc4adc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the callback to be invoked when server enters lame duck mode.  <a href="group__opts_group.html#ga54dea2ffeb33779771652a7a14fc4adc">More...</a><br /></td></tr>
+<tr class="separator:ga54dea2ffeb33779771652a7a14fc4adc"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gab09491bad908dedcb323c780280733ff"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gab09491bad908dedcb323c780280733ff">natsOptions_SetEventLoop</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, void *loop, <a class="el" href="group__callbacks_group.html#ga245eab0a01a485e40fba267f84ec037f">natsEvLoop_Attach</a> attachCb, <a class="el" href="group__callbacks_group.html#gaea4c125ecfb43eaf43da20e8444c2aaa">natsEvLoop_ReadAddRemove</a> readCb, <a class="el" href="group__callbacks_group.html#ga2bb5dd2d821ca5bbc0488f7e6aceed17">natsEvLoop_WriteAddRemove</a> writeCb, <a class="el" href="group__callbacks_group.html#gab63dee7f7012ba11ae20b76dbc36f2d0">natsEvLoop_Detach</a> detachCb)</td></tr>
+<tr class="memdesc:gab09491bad908dedcb323c780280733ff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the external event loop and associated callbacks.  <a href="group__opts_group.html#gab09491bad908dedcb323c780280733ff">More...</a><br /></td></tr>
+<tr class="separator:gab09491bad908dedcb323c780280733ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gabf060c92648b50c069f0abe7cbb06f1c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gabf060c92648b50c069f0abe7cbb06f1c">natsOptions_UseGlobalMessageDelivery</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool global)</td></tr>
+<tr class="memdesc:gabf060c92648b50c069f0abe7cbb06f1c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Switch on/off the use of a central message delivery thread pool.  <a href="group__opts_group.html#gabf060c92648b50c069f0abe7cbb06f1c">More...</a><br /></td></tr>
+<tr class="separator:gabf060c92648b50c069f0abe7cbb06f1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga7ca713c7532eff4d41a492e95b8822cf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga7ca713c7532eff4d41a492e95b8822cf">natsOptions_IPResolutionOrder</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int order)</td></tr>
+<tr class="memdesc:ga7ca713c7532eff4d41a492e95b8822cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Dictates the order in which host name are resolved during connect.  <a href="group__opts_group.html#ga7ca713c7532eff4d41a492e95b8822cf">More...</a><br /></td></tr>
+<tr class="separator:ga7ca713c7532eff4d41a492e95b8822cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga8f06568cc3319a5a0eef9f80282034ca"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga8f06568cc3319a5a0eef9f80282034ca">natsOptions_SetSendAsap</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool sendAsap)</td></tr>
+<tr class="memdesc:ga8f06568cc3319a5a0eef9f80282034ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets if Publish calls should send data right away.  <a href="group__opts_group.html#ga8f06568cc3319a5a0eef9f80282034ca">More...</a><br /></td></tr>
+<tr class="separator:ga8f06568cc3319a5a0eef9f80282034ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga70aa85319933d78c0076cc862fa3e5a6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga70aa85319933d78c0076cc862fa3e5a6">natsOptions_UseOldRequestStyle</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool useOldStyle)</td></tr>
+<tr class="memdesc:ga70aa85319933d78c0076cc862fa3e5a6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Switches the use of old style requests.  <a href="group__opts_group.html#ga70aa85319933d78c0076cc862fa3e5a6">More...</a><br /></td></tr>
+<tr class="separator:ga70aa85319933d78c0076cc862fa3e5a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gadef4376a5e608cbc8c1a9e2b6335dc79"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gadef4376a5e608cbc8c1a9e2b6335dc79">natsOptions_SetFailRequestsOnDisconnect</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool failRequests)</td></tr>
+<tr class="memdesc:gadef4376a5e608cbc8c1a9e2b6335dc79"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fails pending requests on disconnect event.  <a href="group__opts_group.html#gadef4376a5e608cbc8c1a9e2b6335dc79">More...</a><br /></td></tr>
+<tr class="separator:gadef4376a5e608cbc8c1a9e2b6335dc79"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga4f694b87039cedaa65cd25656b14d1a3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga4f694b87039cedaa65cd25656b14d1a3">natsOptions_SetNoEcho</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool noEcho)</td></tr>
+<tr class="memdesc:ga4f694b87039cedaa65cd25656b14d1a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets if connection receives its own messages.  <a href="group__opts_group.html#ga4f694b87039cedaa65cd25656b14d1a3">More...</a><br /></td></tr>
+<tr class="separator:ga4f694b87039cedaa65cd25656b14d1a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga20946800d024b7089e73d63454d1c19f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga20946800d024b7089e73d63454d1c19f">natsOptions_SetRetryOnFailedConnect</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool retry, <a class="el" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a> connectedCb, void *closure)</td></tr>
+<tr class="memdesc:ga20946800d024b7089e73d63454d1c19f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Indicates if initial connect failure should be retried or not.  <a href="group__opts_group.html#ga20946800d024b7089e73d63454d1c19f">More...</a><br /></td></tr>
+<tr class="separator:ga20946800d024b7089e73d63454d1c19f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga60117450fc1f7b6f81bab455aeed7515"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga60117450fc1f7b6f81bab455aeed7515">natsOptions_SetUserCredentialsCallbacks</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <a class="el" href="group__callbacks_group.html#ga258b30458134be90f17315c037f34b7b">natsUserJWTHandler</a> ujwtCB, void *ujwtClosure, <a class="el" href="group__callbacks_group.html#gab786ffd670c86de0563559351305080b">natsSignatureHandler</a> sigCB, void *sigClosure)</td></tr>
+<tr class="memdesc:ga60117450fc1f7b6f81bab455aeed7515"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the callbacks to fetch user JWT and sign server's nonce.  <a href="group__opts_group.html#ga60117450fc1f7b6f81bab455aeed7515">More...</a><br /></td></tr>
+<tr class="separator:ga60117450fc1f7b6f81bab455aeed7515"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga59b47f7b7a19085cf8eaada9bfe5606e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga59b47f7b7a19085cf8eaada9bfe5606e">natsOptions_SetUserCredentialsFromFiles</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *userOrChainedFile, const char *seedFile)</td></tr>
+<tr class="memdesc:ga59b47f7b7a19085cf8eaada9bfe5606e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the file(s) to use to fetch user JWT and seed required to sign nonce.  <a href="group__opts_group.html#ga59b47f7b7a19085cf8eaada9bfe5606e">More...</a><br /></td></tr>
+<tr class="separator:ga59b47f7b7a19085cf8eaada9bfe5606e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga0290eac4665569c850468d9f00e246a0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga0290eac4665569c850468d9f00e246a0">natsOptions_SetNKey</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *pubKey, <a class="el" href="group__callbacks_group.html#gab786ffd670c86de0563559351305080b">natsSignatureHandler</a> sigCB, void *sigClosure)</td></tr>
+<tr class="memdesc:ga0290eac4665569c850468d9f00e246a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the NKey public key and signature callback.  <a href="group__opts_group.html#ga0290eac4665569c850468d9f00e246a0">More...</a><br /></td></tr>
+<tr class="separator:ga0290eac4665569c850468d9f00e246a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga696f02e0493c00d3c1eafff45b62b68e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga696f02e0493c00d3c1eafff45b62b68e">natsOptions_SetNKeyFromSeed</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *pubKey, const char *seedFile)</td></tr>
+<tr class="memdesc:ga696f02e0493c00d3c1eafff45b62b68e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the NKey public key and its seed file.  <a href="group__opts_group.html#ga696f02e0493c00d3c1eafff45b62b68e">More...</a><br /></td></tr>
+<tr class="separator:ga696f02e0493c00d3c1eafff45b62b68e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaafda5fb8d9ee3a17bd475ceaecfac218"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gaafda5fb8d9ee3a17bd475ceaecfac218">natsOptions_SetWriteDeadline</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int64_t deadline)</td></tr>
+<tr class="memdesc:gaafda5fb8d9ee3a17bd475ceaecfac218"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the write deadline.  <a href="group__opts_group.html#gaafda5fb8d9ee3a17bd475ceaecfac218">More...</a><br /></td></tr>
+<tr class="separator:gaafda5fb8d9ee3a17bd475ceaecfac218"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga192465163abb87ad48a843b45cdf9984"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga192465163abb87ad48a843b45cdf9984">natsOptions_DisableNoResponders</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool disabled)</td></tr>
+<tr class="memdesc:ga192465163abb87ad48a843b45cdf9984"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable/Disable the "no responders" feature.  <a href="group__opts_group.html#ga192465163abb87ad48a843b45cdf9984">More...</a><br /></td></tr>
+<tr class="separator:ga192465163abb87ad48a843b45cdf9984"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gac5173473a731a4a36d15346fedddf91f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gac5173473a731a4a36d15346fedddf91f">natsOptions_SetCustomInboxPrefix</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *inboxPrefix)</td></tr>
+<tr class="memdesc:gac5173473a731a4a36d15346fedddf91f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets a custom inbox prefix.  <a href="group__opts_group.html#gac5173473a731a4a36d15346fedddf91f">More...</a><br /></td></tr>
+<tr class="separator:gac5173473a731a4a36d15346fedddf91f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga93d8068cd6fff53b7f8e1c403db45eb9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga93d8068cd6fff53b7f8e1c403db45eb9">natsOptions_Destroy</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts)</td></tr>
+<tr class="memdesc:ga93d8068cd6fff53b7f8e1c403db45eb9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys a <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object.  <a href="group__opts_group.html#ga93d8068cd6fff53b7f8e1c403db45eb9">More...</a><br /></td></tr>
+<tr class="separator:ga93d8068cd6fff53b7f8e1c403db45eb9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<p >NATS Options. </p>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="ga61d4a0cf2fbf7d13cc910e5a00c575be" name="ga61d4a0cf2fbf7d13cc910e5a00c575be"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga61d4a0cf2fbf7d13cc910e5a00c575be">&#9670;&#160;</a></span>natsOptions_Create()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_Create </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> **&#160;</td>
+          <td class="paramname"><em>newOpts</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Creates a <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. This object is used when one wants to set specific options prior to connecting to the <code>NATS Server</code>.</p>
+<p >After making the appropriate natsOptions_Set calls, this object is passed to the <a class="el" href="group__conn_mgt_group.html#ga740be1ba16a8570eb98ef6755ebf52ce" title="Connects to a NATS Server using the provided options.">natsConnection_Connect()</a> call, which will clone this object. After <a class="el" href="group__conn_mgt_group.html#ga740be1ba16a8570eb98ef6755ebf52ce" title="Connects to a NATS Server using the provided options.">natsConnection_Connect()</a> returns, modifications to the options object will not affect the connection.</p>
+<dl class="section note"><dt>Note</dt><dd>The object needs to be destroyed when no longer needed.*</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__conn_mgt_group.html#ga740be1ba16a8570eb98ef6755ebf52ce" title="Connects to a NATS Server using the provided options.">natsConnection_Connect()</a> </dd>
+<dd>
+<a class="el" href="group__opts_group.html#ga93d8068cd6fff53b7f8e1c403db45eb9" title="Destroys a natsOptions object.">natsOptions_Destroy()</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">newOpts</td><td>the location where store the pointer to the newly created <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga3f7e760214417c7d87541ecb9ab5bea5" name="ga3f7e760214417c7d87541ecb9ab5bea5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga3f7e760214417c7d87541ecb9ab5bea5">&#9670;&#160;</a></span>natsOptions_SetURL()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetURL </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>url</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Sets the URL of the <code>NATS Server</code> the client should try to connect to. The URL can contain optional user name and password.</p>
+<p >Some valid URLS:</p>
+<ul>
+<li>nats://localhost:4222</li>
+<li>nats://user@localhost:4222</li>
+<li>nats://user:password@localhost:4222</li>
+</ul>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#gacb7e964ae54b74d972d72e118b7b8bdf" title="Set the list of servers to try to (re)connect to.">natsOptions_SetServers</a> </dd>
+<dd>
+<a class="el" href="group__opts_group.html#ga5b99da7dd74aac3be962f323c3863d9e" title="Sets the user name/password to use when not specified in the URL.">natsOptions_SetUserInfo</a> </dd>
+<dd>
+<a class="el" href="group__opts_group.html#gad58a5b9dabadeebda30e952ff7b39193" title="Sets the token to use when not specified in the URL.">natsOptions_SetToken</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">url</td><td>the string representing the URL the connection should use to connect to the server. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gacb7e964ae54b74d972d72e118b7b8bdf" name="gacb7e964ae54b74d972d72e118b7b8bdf"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gacb7e964ae54b74d972d72e118b7b8bdf">&#9670;&#160;</a></span>natsOptions_SetServers()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetServers </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char **&#160;</td>
+          <td class="paramname"><em>servers</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&#160;</td>
+          <td class="paramname"><em>serversCount</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This specifies a list of servers to try to connect (or reconnect) to. Note that if you call <a class="el" href="group__opts_group.html#ga3f7e760214417c7d87541ecb9ab5bea5" title="Sets the URL to connect to.">natsOptions_SetURL()</a> too, the actual list will contain the one from <a class="el" href="group__opts_group.html#ga3f7e760214417c7d87541ecb9ab5bea5" title="Sets the URL to connect to.">natsOptions_SetURL()</a> and the ones specified in this call.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#ga3f7e760214417c7d87541ecb9ab5bea5" title="Sets the URL to connect to.">natsOptions_SetURL</a> </dd>
+<dd>
+<a class="el" href="group__opts_group.html#ga5b99da7dd74aac3be962f323c3863d9e" title="Sets the user name/password to use when not specified in the URL.">natsOptions_SetUserInfo</a> </dd>
+<dd>
+<a class="el" href="group__opts_group.html#gad58a5b9dabadeebda30e952ff7b39193" title="Sets the token to use when not specified in the URL.">natsOptions_SetToken</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">servers</td><td>the array of strings representing the server URLs. </td></tr>
+    <tr><td class="paramname">serversCount</td><td>the size of the array. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga5b99da7dd74aac3be962f323c3863d9e" name="ga5b99da7dd74aac3be962f323c3863d9e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga5b99da7dd74aac3be962f323c3863d9e">&#9670;&#160;</a></span>natsOptions_SetUserInfo()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetUserInfo </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>user</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>password</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Credentials are usually provided through the URL in the form: <code>nats://foo:bar@localhost:4222</code>.<br  />
+ Until now, you could specify URLs in two ways, with <a class="el" href="group__opts_group.html#gacb7e964ae54b74d972d72e118b7b8bdf" title="Set the list of servers to try to (re)connect to.">natsOptions_SetServers</a> or <a class="el" href="group__conn_mgt_group.html#gafb83c8d7970ba68be0e6c40c38cdfde4" title="Connects to a NATS Server using any of the URL from the given list.">natsConnection_ConnectTo</a>. The client library would connect (or reconnect) only to this given list of URLs, so if any of the server in the list required authentication, you were responsible for providing the appropriate credentials in the URLs.<br  />
+ <br  />
+ However, with cluster auto-discovery, the client library asynchronously receives URLs of servers in the cluster. These URLs do not contain any embedded credentials. <br  />
+ You need to use this function (or <a class="el" href="group__opts_group.html#gad58a5b9dabadeebda30e952ff7b39193" title="Sets the token to use when not specified in the URL.">natsOptions_SetToken</a>) to instruct the client library to use those credentials when connecting to a server that requires authentication and for which there is no embedded credentials in the URL.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#gad58a5b9dabadeebda30e952ff7b39193" title="Sets the token to use when not specified in the URL.">natsOptions_SetToken</a> </dd>
+<dd>
+<a class="el" href="group__opts_group.html#ga3f7e760214417c7d87541ecb9ab5bea5" title="Sets the URL to connect to.">natsOptions_SetURL</a> </dd>
+<dd>
+<a class="el" href="group__opts_group.html#gacb7e964ae54b74d972d72e118b7b8bdf" title="Set the list of servers to try to (re)connect to.">natsOptions_SetServers</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">user</td><td>the user name to send to the server during connect. </td></tr>
+    <tr><td class="paramname">password</td><td>the password to send to the server during connect. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gad58a5b9dabadeebda30e952ff7b39193" name="gad58a5b9dabadeebda30e952ff7b39193"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gad58a5b9dabadeebda30e952ff7b39193">&#9670;&#160;</a></span>natsOptions_SetToken()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetToken </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>token</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Tokens are usually provided through the URL in the form: <code>nats://mytoken@localhost:4222</code>.<br  />
+ Until now, you could specify URLs in two ways, with <a class="el" href="group__opts_group.html#gacb7e964ae54b74d972d72e118b7b8bdf" title="Set the list of servers to try to (re)connect to.">natsOptions_SetServers</a> or <a class="el" href="group__conn_mgt_group.html#gafb83c8d7970ba68be0e6c40c38cdfde4" title="Connects to a NATS Server using any of the URL from the given list.">natsConnection_ConnectTo</a>. The client library would connect (or reconnect) only to this given list of URLs, so if any of the server in the list required authentication, you were responsible for providing the appropriate token in the URLs.<br  />
+ <br  />
+ However, with cluster auto-discovery, the client library asynchronously receives URLs of servers in the cluster. These URLs do not contain any embedded tokens. <br  />
+ You need to use this function (or <a class="el" href="group__opts_group.html#ga5b99da7dd74aac3be962f323c3863d9e" title="Sets the user name/password to use when not specified in the URL.">natsOptions_SetUserInfo</a>) to instruct the client library to use this token when connecting to a server that requires authentication and for which there is no embedded token in the URL.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#ga5b99da7dd74aac3be962f323c3863d9e" title="Sets the user name/password to use when not specified in the URL.">natsOptions_SetUserInfo</a> </dd>
+<dd>
+<a class="el" href="group__opts_group.html#ga3f7e760214417c7d87541ecb9ab5bea5" title="Sets the URL to connect to.">natsOptions_SetURL</a> </dd>
+<dd>
+<a class="el" href="group__opts_group.html#gacb7e964ae54b74d972d72e118b7b8bdf" title="Set the list of servers to try to (re)connect to.">natsOptions_SetServers</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">token</td><td>the token to send to the server during connect. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga23a3b1f022112e98ddccb18b247b4426" name="ga23a3b1f022112e98ddccb18b247b4426"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga23a3b1f022112e98ddccb18b247b4426">&#9670;&#160;</a></span>natsOptions_SetTokenHandler()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetTokenHandler </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__callbacks_group.html#ga4b02de70fe9380d184fd01d87527f499">natsTokenHandler</a>&#160;</td>
+          <td class="paramname"><em>tokenCb</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">void *&#160;</td>
+          <td class="paramname"><em>closure</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >For use cases where setting a static token through the URL<br  />
+ or through <a class="el" href="group__opts_group.html#gad58a5b9dabadeebda30e952ff7b39193" title="Sets the token to use when not specified in the URL.">natsOptions_SetToken</a> is not desirable.<br  />
+ <br  />
+ This function can be used to generate a token whenever the client needs one.<br  />
+ Some example of use cases: expiring token, credential rotation, ...</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#gad58a5b9dabadeebda30e952ff7b39193" title="Sets the token to use when not specified in the URL.">natsOptions_SetToken</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">tokenCb</td><td>the tokenCb to use to generate a token to the server during connect. </td></tr>
+    <tr><td class="paramname">closure</td><td>a pointer to an user defined object (can be <code>NULL</code>). See the <a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe" title="Callback used to deliver messages to the application.">natsMsgHandler</a> prototype. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gaabf8763b931dcf389c83fd95d760a413" name="gaabf8763b931dcf389c83fd95d760a413"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaabf8763b931dcf389c83fd95d760a413">&#9670;&#160;</a></span>natsOptions_SetNoRandomize()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetNoRandomize </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">bool&#160;</td>
+          <td class="paramname"><em>noRandomize</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >If 'noRandomize' is true, then the list of server URLs is used in the order provided by <a class="el" href="group__opts_group.html#ga3f7e760214417c7d87541ecb9ab5bea5" title="Sets the URL to connect to.">natsOptions_SetURL()</a> + <a class="el" href="group__opts_group.html#gacb7e964ae54b74d972d72e118b7b8bdf" title="Set the list of servers to try to (re)connect to.">natsOptions_SetServers()</a>. Otherwise, the list is formed in a random order.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">noRandomize</td><td>if <code>true</code>, the list will be used as-is. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga17cd7fe41176cd98aca1184fa9352ad9" name="ga17cd7fe41176cd98aca1184fa9352ad9"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga17cd7fe41176cd98aca1184fa9352ad9">&#9670;&#160;</a></span>natsOptions_SetTimeout()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetTimeout </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int64_t&#160;</td>
+          <td class="paramname"><em>timeout</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This timeout, expressed in milliseconds, is used to interrupt a (re)connect attempt to a <code>NATS Server</code>. This timeout is used both for the low level TCP connect call, and for timing out the response from the server to the client's initial <code>PING</code> protocol.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">timeout</td><td>the time, in milliseconds, allowed for an individual connect (or reconnect) to complete. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga1c529d347be0fe2eec17c7f4698e283e" name="ga1c529d347be0fe2eec17c7f4698e283e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga1c529d347be0fe2eec17c7f4698e283e">&#9670;&#160;</a></span>natsOptions_SetName()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetName </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>name</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This name is sent as part of the <code>CONNECT</code> protocol. There is no default name.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">name</td><td>the name to set. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gaa1f09416d443fa7a6af6b695da563eba" name="gaa1f09416d443fa7a6af6b695da563eba"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaa1f09416d443fa7a6af6b695da563eba">&#9670;&#160;</a></span>natsOptions_SetSecure()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetSecure </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">bool&#160;</td>
+          <td class="paramname"><em>secure</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Indicates to the server if the client wants a secure (SSL/TLS) connection.</p>
+<p >The default is <code>false</code>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">secure</td><td><code>true</code> for a secure connection, <code>false</code> otherwise. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga2cd6563694a439b3949a31fd81103099" name="ga2cd6563694a439b3949a31fd81103099"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga2cd6563694a439b3949a31fd81103099">&#9670;&#160;</a></span>natsOptions_LoadCATrustedCertificates()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_LoadCATrustedCertificates </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>fileName</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Loads the trusted CA certificates from a file.</p>
+<p >Note that the certificates are added to a SSL context for this <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object at the time of this call, so possible errors while loading the certificates will be reported now instead of when a connection is created. You can get extra information by calling <a class="el" href="group__library_group.html#gadecfd49a58b581dbba40da77b195fd85" title="Returns the calling thread&#39;s last known error.">nats_GetLastError</a>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">fileName</td><td>the file containing the CA certificates. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gafb30794fc2ae74b9e0bd8fb609b901c8" name="gafb30794fc2ae74b9e0bd8fb609b901c8"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gafb30794fc2ae74b9e0bd8fb609b901c8">&#9670;&#160;</a></span>natsOptions_SetCATrustedCertificates()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetCATrustedCertificates </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>certificates</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Similar to <a class="el" href="group__opts_group.html#ga2cd6563694a439b3949a31fd81103099" title="Loads the trusted CA certificates from a file.">natsOptions_LoadCATrustedCertificates</a> expect that instead of loading from file, this loads from the given memory location.</p>
+<p >If more than one certificate need to be provided, they need to be concatenated. For instance:</p>
+<div class="fragment"><div class="line">const char *certs =</div>
+<div class="line">   &quot;-----BEGIN CERTIFICATE-----\n&quot;</div>
+<div class="line">   &quot;MIIGjzCCBHegAwIBAgIJAKT2W9SKY7o4MA0GCSqGSIb3DQEBCwUAMIGLMQswCQYD\n&quot;</div>
+<div class="line">   (...)</div>
+<div class="line">   &quot;-----END CERTIFICATE-----\n&quot;</div>
+<div class="line">   &quot;-----BEGIN CERTIFICATE-----\n&quot;</div>
+<div class="line">   &quot;MIIXyz...\n&quot;</div>
+<div class="line">   (...)</div>
+<div class="line">   &quot;-----END CERTIFICATE-----\n&quot;</div>
+</div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#ga2cd6563694a439b3949a31fd81103099" title="Loads the trusted CA certificates from a file.">natsOptions_LoadCATrustedCertificates</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">certificates</td><td>the string containing the concatenated CA certificates. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga36943e2ba53d05407cdabc4e7e96484b" name="ga36943e2ba53d05407cdabc4e7e96484b"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga36943e2ba53d05407cdabc4e7e96484b">&#9670;&#160;</a></span>natsOptions_LoadCertificatesChain()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_LoadCertificatesChain </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>certsFileName</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>keyFileName</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >The certificates must be in PEM format and must be sorted starting with the subject's certificate, followed by intermediate CA certificates if applicable, and ending at the highest level (root) CA.</p>
+<p >The private key file format supported is also PEM.</p>
+<p >See <a class="el" href="group__opts_group.html#ga2cd6563694a439b3949a31fd81103099" title="Loads the trusted CA certificates from a file.">natsOptions_LoadCATrustedCertificates</a> regarding error reports.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">certsFileName</td><td>the file containing the client certificates. </td></tr>
+    <tr><td class="paramname">keyFileName</td><td>the file containing the client private key. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gae98f0f9034e93941767ab1ae6eec2c0c" name="gae98f0f9034e93941767ab1ae6eec2c0c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gae98f0f9034e93941767ab1ae6eec2c0c">&#9670;&#160;</a></span>natsOptions_SetCertificatesChain()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetCertificatesChain </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>cert</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>key</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Similar to <a class="el" href="group__opts_group.html#ga36943e2ba53d05407cdabc4e7e96484b" title="Loads the certificate chain from a file, using the given key.">natsOptions_LoadCertificatesChain</a> expect that instead of loading from file, this loads from the given memory locations.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#ga36943e2ba53d05407cdabc4e7e96484b" title="Loads the certificate chain from a file, using the given key.">natsOptions_LoadCertificatesChain()</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">cert</td><td>the memory location containing the client certificates. </td></tr>
+    <tr><td class="paramname">key</td><td>the memory location containing the client private key. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga5698f020e8eb3e7440eb073fe08ef62c" name="ga5698f020e8eb3e7440eb073fe08ef62c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga5698f020e8eb3e7440eb073fe08ef62c">&#9670;&#160;</a></span>natsOptions_SetCiphers()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetCiphers </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>ciphers</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<dl class="section note"><dt>Note</dt><dd>This function does not impact TLSv1.3 ciphersuites.</dd></dl>
+<p>Sets the list of available ciphers. Check <a href="https://www.openssl.org/docs/man1.1.1/man1/ciphers.html">https://www.openssl.org/docs/man1.1.1/man1/ciphers.html</a> for the proper syntax. Here is an example:</p>
+<blockquote class="doxtable">
+<p >&zwj;"-ALL:HIGH" </p>
+</blockquote>
+<p>See <a class="el" href="group__opts_group.html#ga2cd6563694a439b3949a31fd81103099" title="Loads the trusted CA certificates from a file.">natsOptions_LoadCATrustedCertificates</a> regarding error reports.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">ciphers</td><td>the ciphers suite. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga2b7f144b011d8ce62941b608a8f324f0" name="ga2b7f144b011d8ce62941b608a8f324f0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga2b7f144b011d8ce62941b608a8f324f0">&#9670;&#160;</a></span>natsOptions_SetCipherSuites()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetCipherSuites </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>ciphers</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Sets the list of available ciphers. Check <a href="https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_set_ciphersuites.html">https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_set_ciphersuites.html</a> for the proper syntax. Here is an example:</p>
+<blockquote class="doxtable">
+<p >&zwj;"TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256" </p>
+</blockquote>
+<p>See <a class="el" href="group__opts_group.html#ga2cd6563694a439b3949a31fd81103099" title="Loads the trusted CA certificates from a file.">natsOptions_LoadCATrustedCertificates</a> regarding error reports.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">ciphers</td><td>the ciphers suite. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga0ba43ba9930df385e4781b12be9f2851" name="ga0ba43ba9930df385e4781b12be9f2851"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga0ba43ba9930df385e4781b12be9f2851">&#9670;&#160;</a></span>natsOptions_SetExpectedHostname()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetExpectedHostname </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>hostname</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >If set, the library will check that the hostname in the server certificate matches the given <code>hostname</code>. This will occur when a connection is created, not at the time of this call.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">hostname</td><td>the expected server certificate hostname. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga6f804ec44adc299989fe623570679da3" name="ga6f804ec44adc299989fe623570679da3"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga6f804ec44adc299989fe623570679da3">&#9670;&#160;</a></span>natsOptions_SkipServerVerification()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SkipServerVerification </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">bool&#160;</td>
+          <td class="paramname"><em>skip</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >By default, the server certificate is verified. You can disable the verification by passing <code>true</code> to this function.</p>
+<dl class="section warning"><dt>Warning</dt><dd>This is fine for tests but use with caution since this is not secure.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">skip</td><td>set it to <code>true</code> to disable - or skip - server certificate verification. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gaa16bfd09ef318af18c27a0e199681b69" name="gaa16bfd09ef318af18c27a0e199681b69"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaa16bfd09ef318af18c27a0e199681b69">&#9670;&#160;</a></span>natsOptions_SetVerbose()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetVerbose </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">bool&#160;</td>
+          <td class="paramname"><em>verbose</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Sets the verbose mode. If <code>true</code>, sends are echoed by the server with an <code>OK</code> protocol message.</p>
+<p >The default is <code>false</code>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">verbose</td><td><code>true</code> for a verbose protocol, <code>false</code> otherwise. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga26f166af20de98bec67bc6cc916f769e" name="ga26f166af20de98bec67bc6cc916f769e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga26f166af20de98bec67bc6cc916f769e">&#9670;&#160;</a></span>natsOptions_SetPedantic()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetPedantic </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">bool&#160;</td>
+          <td class="paramname"><em>pedantic</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Sets the pedantic mode. If <code>true</code> some extra checks will be performed by the server.</p>
+<p >The default is <code>false</code></p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">pedantic</td><td><code>true</code> for a pedantic protocol, <code>false</code> otherwise. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gae68fb615835364c0809555e8dc93f57e" name="gae68fb615835364c0809555e8dc93f57e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gae68fb615835364c0809555e8dc93f57e">&#9670;&#160;</a></span>natsOptions_SetPingInterval()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetPingInterval </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int64_t&#160;</td>
+          <td class="paramname"><em>interval</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Interval, expressed in milliseconds, in which the client sends <code>PING</code> protocols to the <code>NATS Server</code>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">interval</td><td>the interval, in milliseconds, at which the connection will send <code>PING</code> protocols to the server. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gaaff89c3f41627f4b2929dbc9b82d265b" name="gaaff89c3f41627f4b2929dbc9b82d265b"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaaff89c3f41627f4b2929dbc9b82d265b">&#9670;&#160;</a></span>natsOptions_SetMaxPingsOut()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetMaxPingsOut </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&#160;</td>
+          <td class="paramname"><em>maxPingsOut</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Specifies the maximum number of <code>PING</code>s without corresponding <code>PONG</code>s (which should be received from the server) before closing the connection with the <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80aa76d5e3ce051bc7510be90e73663c93d">NATS_STALE_CONNECTION</a> status. If reconnection is allowed, the client library will try to reconnect.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">maxPingsOut</td><td>the maximum number of <code>PING</code>s without <code>PONG</code>s (positive number). </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga1a3e3abfd7ddd8aff247df8f332bbda3" name="ga1a3e3abfd7ddd8aff247df8f332bbda3"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga1a3e3abfd7ddd8aff247df8f332bbda3">&#9670;&#160;</a></span>natsOptions_SetIOBufSize()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetIOBufSize </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&#160;</td>
+          <td class="paramname"><em>ioBufSize</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Sets the size, in bytes, of the internal read/write buffers used for reading/writing data from a socket. If not specified, or the value is 0, the library will use a default value, currently set to 32KB.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">ioBufSize</td><td>the size, in bytes, of the internal buffer for read/write operations. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga3d1d3cb2f2a0e23d27dd60e96d1cc91b" name="ga3d1d3cb2f2a0e23d27dd60e96d1cc91b"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga3d1d3cb2f2a0e23d27dd60e96d1cc91b">&#9670;&#160;</a></span>natsOptions_SetAllowReconnect()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetAllowReconnect </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">bool&#160;</td>
+          <td class="paramname"><em>allow</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Specifies whether or not the client library should try to reconnect when losing the connection to the <code>NATS Server</code>.</p>
+<p >The default is <code>true</code>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">allow</td><td><code>true</code> if the connection is allowed to reconnect, <code>false</code> otherwise. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gab54cd2719c0b64eebd6c7b83dd2908a0" name="gab54cd2719c0b64eebd6c7b83dd2908a0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gab54cd2719c0b64eebd6c7b83dd2908a0">&#9670;&#160;</a></span>natsOptions_SetMaxReconnect()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetMaxReconnect </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&#160;</td>
+          <td class="paramname"><em>maxReconnect</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Specifies the maximum number of reconnect attempts.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">maxReconnect</td><td>the maximum number of reconnects (positive number). </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga2730f4e16e318a2ef8de98dbf6ede807" name="ga2730f4e16e318a2ef8de98dbf6ede807"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga2730f4e16e318a2ef8de98dbf6ede807">&#9670;&#160;</a></span>natsOptions_SetReconnectWait()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetReconnectWait </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int64_t&#160;</td>
+          <td class="paramname"><em>reconnectWait</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Specifies how long to wait between two reconnect attempts from the same server. This means that if you have a list with S1,S2 and are currently connected to S1, and get disconnected, the library will immediately attempt to connect to S2. If this fails, it will go back to S1, and this time will wait for <code>reconnectWait</code> milliseconds since the last attempt to connect to S1.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">reconnectWait</td><td>the time, in milliseconds, to wait between attempts to reconnect to the same server. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga8f3df57ed8ae418d3ae6678ae5e2a5d2" name="ga8f3df57ed8ae418d3ae6678ae5e2a5d2"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga8f3df57ed8ae418d3ae6678ae5e2a5d2">&#9670;&#160;</a></span>natsOptions_SetReconnectJitter()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetReconnectJitter </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int64_t&#160;</td>
+          <td class="paramname"><em>jitter</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int64_t&#160;</td>
+          <td class="paramname"><em>jitterTLS</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >After a disconnect, the library will try to reconnect to any server URLs in its list (the URLs are either provided by the user or discovered through gossip protocol).</p>
+<p >After the library failed to reconnect to every server in the list, it will wait for <code>reconnectWait</code> as specified with <a class="el" href="group__opts_group.html#ga2730f4e16e318a2ef8de98dbf6ede807" title="Sets the time between reconnect attempts.">natsOptions_SetReconnectWait()</a>. This option adds some random jitter to the reconnect wait delay.</p>
+<p >This will help minimize the thundering herd phenomenon. For instance, suppose a server has 1000 connections, all were created at different times, but have the same reconnect wait option. If this server suddenly stops, then all connections will detect the failure and initiate a reconnect at the same time. The issue is even greater when those connections are TLS because of the added cost of the TLS handshake.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#ga2730f4e16e318a2ef8de98dbf6ede807" title="Sets the time between reconnect attempts.">natsOptions_SetReconnectWait()</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">jitter</td><td>the jitter in milliseconds for non TLS connections. </td></tr>
+    <tr><td class="paramname">jitterTLS</td><td>the jitter in milliseconds for TLS connections. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga3593165aa113d6736e0226ddc56b3e9d" name="ga3593165aa113d6736e0226ddc56b3e9d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga3593165aa113d6736e0226ddc56b3e9d">&#9670;&#160;</a></span>natsOptions_SetCustomReconnectDelay()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetCustomReconnectDelay </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__callbacks_group.html#ga3353d4b92851c52121f65aaf0684cba4">natsCustomReconnectDelayHandler</a>&#160;</td>
+          <td class="paramname"><em>cb</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">void *&#160;</td>
+          <td class="paramname"><em>closure</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This callback is invoked after the library tried every URL in the server list and failed to reconnect. It passes to the user the current number of attempts. This function shall return the amount of time the library will sleep before attempting to reconnect again.</p>
+<p >It is strongly recommended that this value contains some jitter to prevent all connections to attempt reconnecting at the same time.</p>
+<dl class="section note"><dt>Note</dt><dd>When using this approach, the reconnect wait as specified by <a class="el" href="group__opts_group.html#ga2730f4e16e318a2ef8de98dbf6ede807" title="Sets the time between reconnect attempts.">natsOptions_SetReconnectWait()</a> is ignored.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">cb</td><td>the custom reconnect delay handler to invoke. </td></tr>
+    <tr><td class="paramname">closure</td><td>a pointer to an user defined object (can be <code>NULL</code>). See the <a class="el" href="group__callbacks_group.html#ga3353d4b92851c52121f65aaf0684cba4" title="Callback used to specify how long to wait between reconnects.">natsCustomReconnectDelayHandler</a> prototype. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gaa0d4b7ece8477cb9879f0dafff3456a5" name="gaa0d4b7ece8477cb9879f0dafff3456a5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaa0d4b7ece8477cb9879f0dafff3456a5">&#9670;&#160;</a></span>natsOptions_SetReconnectBufSize()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetReconnectBufSize </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&#160;</td>
+          <td class="paramname"><em>reconnectBufSize</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Sets the size, in bytes, of the backing buffer holding published data while the library is reconnecting. Once this buffer has been exhausted, publish operations will return the <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a317fb9be1a80f6b1877f96a9a2db16ad" title="A buffer is not large enough to accommodate the data.">NATS_INSUFFICIENT_BUFFER</a> error. If not specified, or the value is 0, the library will use a default value, currently set to 8MB.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">reconnectBufSize</td><td>the size, in bytes, of the backing buffer for write operations during a reconnect. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga95510436eee06f9992ded96a44795c40" name="ga95510436eee06f9992ded96a44795c40"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga95510436eee06f9992ded96a44795c40">&#9670;&#160;</a></span>natsOptions_SetMaxPendingMsgs()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetMaxPendingMsgs </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&#160;</td>
+          <td class="paramname"><em>maxPending</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Specifies the maximum number of inbound messages that can be buffered in the library, for each subscription, before inbound messages are dropped and <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ae93ff5b7fe31f8570308385d92d317b0">NATS_SLOW_CONSUMER</a> status is reported to the <a class="el" href="group__callbacks_group.html#ga9e511dffa471dfb971b7dd2b12329626" title="Callback used to notify the user of errors encountered while processing inbound messages.">natsErrHandler</a> callback (if one has been set).</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#ga127ec7a8196b453947a7fa9a64096cbd" title="Sets the error handler for asynchronous events.">natsOptions_SetErrorHandler()</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">maxPending</td><td>the number of messages allowed to be buffered by the library before triggering a slow consumer scenario. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga127ec7a8196b453947a7fa9a64096cbd" name="ga127ec7a8196b453947a7fa9a64096cbd"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga127ec7a8196b453947a7fa9a64096cbd">&#9670;&#160;</a></span>natsOptions_SetErrorHandler()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetErrorHandler </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__callbacks_group.html#ga9e511dffa471dfb971b7dd2b12329626">natsErrHandler</a>&#160;</td>
+          <td class="paramname"><em>errHandler</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">void *&#160;</td>
+          <td class="paramname"><em>closure</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Specifies the callback to invoke when an asynchronous error occurs. This is used by applications having only asynchronous subscriptions that would not know otherwise that a problem with the connection occurred.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__callbacks_group.html#ga9e511dffa471dfb971b7dd2b12329626" title="Callback used to notify the user of errors encountered while processing inbound messages.">natsErrHandler</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">errHandler</td><td>the error handler callback. </td></tr>
+    <tr><td class="paramname">closure</td><td>a pointer to an user object that will be passed to the callback. <code>closure</code> can be <code>NULL</code>. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga44410242e73134e5bb51ef27904a9253" name="ga44410242e73134e5bb51ef27904a9253"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga44410242e73134e5bb51ef27904a9253">&#9670;&#160;</a></span>natsOptions_SetClosedCB()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetClosedCB </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a>&#160;</td>
+          <td class="paramname"><em>closedCb</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">void *&#160;</td>
+          <td class="paramname"><em>closure</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Specifies the callback to invoke when a connection is terminally closed, that is, after all reconnect attempts have failed (when reconnection is allowed).</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">closedCb</td><td>the callback to be invoked when the connection is closed. </td></tr>
+    <tr><td class="paramname">closure</td><td>a pointer to an user object that will be passed to the callback. <code>closure</code> can be <code>NULL</code>. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gadc8dc0cedd91bda71d544f3dedc4a039" name="gadc8dc0cedd91bda71d544f3dedc4a039"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gadc8dc0cedd91bda71d544f3dedc4a039">&#9670;&#160;</a></span>natsOptions_SetDisconnectedCB()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetDisconnectedCB </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a>&#160;</td>
+          <td class="paramname"><em>disconnectedCb</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">void *&#160;</td>
+          <td class="paramname"><em>closure</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Specifies the callback to invoke when a connection to the <code>NATS Server</code> is lost.</p>
+<dl class="section warning"><dt>Warning</dt><dd>Invocation of this callback is asynchronous, which means that the state of the connection may have changed when this callback is invoked.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">disconnectedCb</td><td>the callback to be invoked when a connection to a server is lost </td></tr>
+    <tr><td class="paramname">closure</td><td>a pointer to an user object that will be passed to the callback. <code>closure</code> can be <code>NULL</code>. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga26a48c8529fffa5f5d1a61c030979980" name="ga26a48c8529fffa5f5d1a61c030979980"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga26a48c8529fffa5f5d1a61c030979980">&#9670;&#160;</a></span>natsOptions_SetReconnectedCB()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetReconnectedCB </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a>&#160;</td>
+          <td class="paramname"><em>reconnectedCb</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">void *&#160;</td>
+          <td class="paramname"><em>closure</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Specifies the callback to invoke when the client library has successfully reconnected to a <code>NATS Server</code>.</p>
+<dl class="section warning"><dt>Warning</dt><dd>Invocation of this callback is asynchronous, which means that the state of the connection may have changed when this callback is invoked.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">reconnectedCb</td><td>the callback to be invoked when the connection to a server has been re-established. </td></tr>
+    <tr><td class="paramname">closure</td><td>a pointer to an user object that will be passed to the callback. <code>closure</code> can be <code>NULL</code>. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gab5baab507c974402ab0d8c5e8227ee65" name="gab5baab507c974402ab0d8c5e8227ee65"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gab5baab507c974402ab0d8c5e8227ee65">&#9670;&#160;</a></span>natsOptions_SetDiscoveredServersCB()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetDiscoveredServersCB </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a>&#160;</td>
+          <td class="paramname"><em>discoveredServersCb</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">void *&#160;</td>
+          <td class="paramname"><em>closure</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Specifies the callback to invoke when the client library has been notified of one or more new <code>NATS Servers</code>.</p>
+<dl class="section warning"><dt>Warning</dt><dd>Invocation of this callback is asynchronous, which means that the state may have changed when this callback is invoked.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">discoveredServersCb</td><td>the callback to be invoked when new servers have been discovered. </td></tr>
+    <tr><td class="paramname">closure</td><td>a pointer to an user object that will be passed to the callback. <code>closure</code> can be <code>NULL</code>. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga7e4172084520708b8c9f28e73174461c" name="ga7e4172084520708b8c9f28e73174461c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga7e4172084520708b8c9f28e73174461c">&#9670;&#160;</a></span>natsOptions_SetIgnoreDiscoveredServers()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetIgnoreDiscoveredServers </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">bool&#160;</td>
+          <td class="paramname"><em>ignore</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >By default, when a server joins a cluster, a client is notified of the new URL and added to the list so it can be used in case of a reconnect.</p>
+<p >The servers can be configured to disable this gossip, however, if not done at the servers level, this option allows the discovered servers to be ignored.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">ignore</td><td>if discovered server should be ignored or not. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga54dea2ffeb33779771652a7a14fc4adc" name="ga54dea2ffeb33779771652a7a14fc4adc"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga54dea2ffeb33779771652a7a14fc4adc">&#9670;&#160;</a></span>natsOptions_SetLameDuckModeCB()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetLameDuckModeCB </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a>&#160;</td>
+          <td class="paramname"><em>lameDuckCb</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">void *&#160;</td>
+          <td class="paramname"><em>closure</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Specifies the callback to invoke when the server notifies the connection that it entered lame duck mode, that is, going to gradually disconnect all its connections before shuting down. This is often used in deployments when upgrading NATS Servers.</p>
+<dl class="section warning"><dt>Warning</dt><dd>Invocation of this callback is asynchronous, which means that the state may have changed when this callback is invoked.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">lameDuckCb</td><td>the callback to be invoked when server enters lame duck mode. </td></tr>
+    <tr><td class="paramname">closure</td><td>a pointer to an user object that will be passed to the callback. <code>closure</code> can be <code>NULL</code>. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gab09491bad908dedcb323c780280733ff" name="gab09491bad908dedcb323c780280733ff"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gab09491bad908dedcb323c780280733ff">&#9670;&#160;</a></span>natsOptions_SetEventLoop()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetEventLoop </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">void *&#160;</td>
+          <td class="paramname"><em>loop</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__callbacks_group.html#ga245eab0a01a485e40fba267f84ec037f">natsEvLoop_Attach</a>&#160;</td>
+          <td class="paramname"><em>attachCb</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__callbacks_group.html#gaea4c125ecfb43eaf43da20e8444c2aaa">natsEvLoop_ReadAddRemove</a>&#160;</td>
+          <td class="paramname"><em>readCb</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__callbacks_group.html#ga2bb5dd2d821ca5bbc0488f7e6aceed17">natsEvLoop_WriteAddRemove</a>&#160;</td>
+          <td class="paramname"><em>writeCb</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__callbacks_group.html#gab63dee7f7012ba11ae20b76dbc36f2d0">natsEvLoop_Detach</a>&#160;</td>
+          <td class="paramname"><em>detachCb</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >If you want to use an external event loop, the <code>NATS</code> library will not create a thread to read data from the socket, and will not directly write data to the socket. Instead, the library will invoke those callbacks for various events.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">loop</td><td>the <code>void*</code> pointer to the external event loop. </td></tr>
+    <tr><td class="paramname">attachCb</td><td>the callback invoked after the connection is connected, or reconnected. </td></tr>
+    <tr><td class="paramname">readCb</td><td>the callback invoked when the event library should start or stop polling for read events. </td></tr>
+    <tr><td class="paramname">writeCb</td><td>the callback invoked when the event library should start or stop polling for write events. </td></tr>
+    <tr><td class="paramname">detachCb</td><td>the callback invoked when a connection is closed. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gabf060c92648b50c069f0abe7cbb06f1c" name="gabf060c92648b50c069f0abe7cbb06f1c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gabf060c92648b50c069f0abe7cbb06f1c">&#9670;&#160;</a></span>natsOptions_UseGlobalMessageDelivery()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_UseGlobalMessageDelivery </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">bool&#160;</td>
+          <td class="paramname"><em>global</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Normally, each asynchronous subscriber that is created has its own message delivery thread. The advantage is that it reduces lock contentions, therefore improving performance.<br  />
+ However, if an application creates many subscribers, this is not scaling well since the process would use too many threads.</p>
+<p >When a connection is created from a <code>nats_Options</code> that has enabled global message delivery, asynchronous subscribers from this connection will use a shared thread pool responsible for message delivery.</p>
+<dl class="section note"><dt>Note</dt><dd>The message order per subscription is still guaranteed.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__library_group.html#gab21e94ce7a7d226611ea2c05914cf19d" title="Sets the maximum size of the global message delivery thread pool.">nats_SetMessageDeliveryPoolSize()</a> </dd>
+<dd>
+<a class="el" href="group__env_variables_group.html">Environment Variables</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">global</td><td>if <code>true</code>, uses the global message delivery thread pool, otherwise, each asynchronous subscriber will create their own message delivery thread. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga7ca713c7532eff4d41a492e95b8822cf" name="ga7ca713c7532eff4d41a492e95b8822cf"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga7ca713c7532eff4d41a492e95b8822cf">&#9670;&#160;</a></span>natsOptions_IPResolutionOrder()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_IPResolutionOrder </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&#160;</td>
+          <td class="paramname"><em>order</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >The library would previously favor IPv6 addresses during the connect process. <br  />
+ You can now change the order, or even exclude a family of addresses, using this option. Here is the list of possible values: <br  />
+ </p><table class="markdownTable">
+<tr class="markdownTableHead">
+<th class="markdownTableHeadNone">Value   </th><th class="markdownTableHeadNone">Meaning    </th></tr>
+<tr class="markdownTableRowOdd">
+<td class="markdownTableBodyNone">46   </td><td class="markdownTableBodyNone">try IPv4 first, if it fails try IPv6    </td></tr>
+<tr class="markdownTableRowEven">
+<td class="markdownTableBodyNone">64   </td><td class="markdownTableBodyNone">try IPv6 first, if it fails try IPv4    </td></tr>
+<tr class="markdownTableRowOdd">
+<td class="markdownTableBodyNone">4   </td><td class="markdownTableBodyNone">use only IPv4    </td></tr>
+<tr class="markdownTableRowEven">
+<td class="markdownTableBodyNone">6   </td><td class="markdownTableBodyNone">use only IPv6    </td></tr>
+<tr class="markdownTableRowOdd">
+<td class="markdownTableBodyNone">0   </td><td class="markdownTableBodyNone">any family, no specific order   </td></tr>
+</table>
+<dl class="section note"><dt>Note</dt><dd>If this option is not set, or you specify <code>0</code> for the order, the library will use the first IP (based on the DNS configuration) for which a successful connection can be made.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">order</td><td>a string representing the order for the IP resolution. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga8f06568cc3319a5a0eef9f80282034ca" name="ga8f06568cc3319a5a0eef9f80282034ca"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga8f06568cc3319a5a0eef9f80282034ca">&#9670;&#160;</a></span>natsOptions_SetSendAsap()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetSendAsap </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">bool&#160;</td>
+          <td class="paramname"><em>sendAsap</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >For throughput performance, the client library tries by default to buffer as much data as possible before sending it over TCP.</p>
+<p >Setting this option to <code>true</code> will make Publish calls send the data right away, reducing latency, but also throughput.</p>
+<p >A good use-case would be a connection used to solely send replies. Imagine, a requestor sending a request, waiting for the reply before sending the next request.<br  />
+ The replier application will send only one reply at a time (since it will not receive the next request until the requestor receives the reply).<br  />
+ In such case, it makes sense for the reply to be sent right away.</p>
+<p >The alternative would be to call <a class="el" href="group__conn_mgt_group.html#ga1c98f8d89bb8e20ea8621e860a90267f" title="Flushes the connection.">natsConnection_Flush()</a>, but this call requires a round-trip with the server, which is less efficient than using this option.</p>
+<p >Note that the Request() call already automatically sends the request as fast as possible, there is no need to set an option for that.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">sendAsap</td><td>a boolean indicating if published data should be sent right away or be buffered. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga70aa85319933d78c0076cc862fa3e5a6" name="ga70aa85319933d78c0076cc862fa3e5a6"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga70aa85319933d78c0076cc862fa3e5a6">&#9670;&#160;</a></span>natsOptions_UseOldRequestStyle()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_UseOldRequestStyle </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">bool&#160;</td>
+          <td class="paramname"><em>useOldStyle</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Setting <code>useOldStyle</code> to <code>true</code> forces the request calls to use the original behavior, which is to create a new inbox, a new subscription on that inbox and set auto-unsubscribe to 1.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">useOldStyle</td><td>a boolean indicating if old request style should be used. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gadef4376a5e608cbc8c1a9e2b6335dc79" name="gadef4376a5e608cbc8c1a9e2b6335dc79"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gadef4376a5e608cbc8c1a9e2b6335dc79">&#9670;&#160;</a></span>natsOptions_SetFailRequestsOnDisconnect()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetFailRequestsOnDisconnect </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">bool&#160;</td>
+          <td class="paramname"><em>failRequests</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >If this option is enabled, all pending <a class="el" href="group__conn_pub_group.html#gaf4b4a022f9c21fc269b87c000330c5a7" title="Sends a request and waits for a reply.">natsConnection_Request()</a> family calls will fail with the <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80abef517217119e8446a8e3382e1f37eb3">NATS_CONNECTION_DISCONNECTED</a> status.</p>
+<dl class="section note"><dt>Note</dt><dd>This does not apply to requests from connections that use the old style requests.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#ga70aa85319933d78c0076cc862fa3e5a6" title="Switches the use of old style requests.">natsOptions_UseOldRequestStyle</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">failRequests</td><td>a boolean indicating if pending requests should fail when a disconnect event occurs. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga4f694b87039cedaa65cd25656b14d1a3" name="ga4f694b87039cedaa65cd25656b14d1a3"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga4f694b87039cedaa65cd25656b14d1a3">&#9670;&#160;</a></span>natsOptions_SetNoEcho()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetNoEcho </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">bool&#160;</td>
+          <td class="paramname"><em>noEcho</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This configures whether the server will echo back messages that are sent on this connection if there is also matching subscriptions.</p>
+<p >Set this to <code>true</code> to prevent the server from sending back messages produced by this connection. The default is false, that is, messages originating from this connection will be sent by the server if the connection has matching subscriptions.</p>
+<dl class="section note"><dt>Note</dt><dd>This is supported on servers &gt;= version 1.2.0. Calling <a class="el" href="group__conn_mgt_group.html#ga740be1ba16a8570eb98ef6755ebf52ce" title="Connects to a NATS Server using the provided options.">natsConnection_Connect()</a> with the option set to <code>true</code> to server below this version will return the <code>NATS_NO_SERVER_SUPPORT</code> error.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">noEcho</td><td>a boolean indicating if sent messages can be delivered back to this connection or not. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga20946800d024b7089e73d63454d1c19f" name="ga20946800d024b7089e73d63454d1c19f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga20946800d024b7089e73d63454d1c19f">&#9670;&#160;</a></span>natsOptions_SetRetryOnFailedConnect()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetRetryOnFailedConnect </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">bool&#160;</td>
+          <td class="paramname"><em>retry</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a>&#160;</td>
+          <td class="paramname"><em>connectedCb</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">void *&#160;</td>
+          <td class="paramname"><em>closure</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >By default, <a class="el" href="group__conn_mgt_group.html#ga740be1ba16a8570eb98ef6755ebf52ce" title="Connects to a NATS Server using the provided options.">natsConnection_Connect()</a> attempts to connect to a server specified in provided list of servers. If it cannot connect and the list has been fully tried, the function returns an error.</p>
+<p >This option is used to changed this default behavior.</p>
+<p >If <code>retry</code> is set to <code>true</code> and connection cannot be established right away, the library will attempt to connect based on the reconnect attempts and delay settings.</p>
+<dl class="section note"><dt>Note</dt><dd>The connect retry logic uses reconnect settings even if <a class="el" href="group__opts_group.html#ga3d1d3cb2f2a0e23d27dd60e96d1cc91b" title="Indicates if the connection will be allowed to reconnect.">natsOptions_SetAllowReconnect()</a> has been set to false. In other words, a failed connect may be retried even though a reconnect will not be allowed should the connection to the server be lost after initial connect.</dd></dl>
+<p>The behavior will then depend on the value of the <code>connectedCb</code> parameter:</p>
+<ul>
+<li>If <code>NULL</code>, then the call blocks until it can connect or exhausts the reconnect attempts.</li>
+<li>If not <code>NULL</code>, and no connection can be immediately established, the <a class="el" href="group__conn_mgt_group.html#ga740be1ba16a8570eb98ef6755ebf52ce" title="Connects to a NATS Server using the provided options.">natsConnection_Connect()</a> calls returns <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a49a1ea653ce112b3c53eedebcd60811d">NATS_NOT_YET_CONNECTED</a> to indicate that no connection is currently established, but will try asynchronously to connect using the reconnect attempts/delay settings. If the connection is later established, the specified callback will be invoked. If no connection can be made and the retry attempts are exhausted, the callback registered with <a class="el" href="group__opts_group.html#ga44410242e73134e5bb51ef27904a9253" title="Sets the callback to be invoked when a connection to a server is permanently lost.">natsOptions_SetClosedCB()</a>, if any, will be invoked.</li>
+</ul>
+<dl class="section note"><dt>Note</dt><dd>If <a class="el" href="group__conn_mgt_group.html#ga740be1ba16a8570eb98ef6755ebf52ce" title="Connects to a NATS Server using the provided options.">natsConnection_Connect()</a> returns <code>NATS_OK</code> (that is, a connection to a <code>NATS Server</code> was established in that call), then the <code>connectedCb</code> callback will not be invoked.</dd></dl>
+<p>If <code>retry</code> is set to false, <a class="el" href="group__conn_mgt_group.html#ga740be1ba16a8570eb98ef6755ebf52ce" title="Connects to a NATS Server using the provided options.">natsConnection_Connect()</a> behaves as originally designed, that is, returns an error and no connection object if failing to connect to any server in the list.</p>
+<dl class="section note"><dt>Note</dt><dd>The <code>connectedCb</code> parameter is ignored and set to <code>NULL</code> in the options object when <code>retry</code> is set to <code>false</code>.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#gab54cd2719c0b64eebd6c7b83dd2908a0" title="Sets the maximum number of reconnect attempts.">natsOptions_SetMaxReconnect()</a> </dd>
+<dd>
+<a class="el" href="group__opts_group.html#ga2730f4e16e318a2ef8de98dbf6ede807" title="Sets the time between reconnect attempts.">natsOptions_SetReconnectWait()</a> </dd>
+<dd>
+<a class="el" href="group__opts_group.html#ga44410242e73134e5bb51ef27904a9253" title="Sets the callback to be invoked when a connection to a server is permanently lost.">natsOptions_SetClosedCB()</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">retry</td><td>a boolean indicating if a failed connect should be retried. </td></tr>
+    <tr><td class="paramname">connectedCb</td><td>if <code>retry</code> is true and this is not <code>NULL</code>, then the connect may be asynchronous and this callback will be invoked if the connect succeeds. </td></tr>
+    <tr><td class="paramname">closure</td><td>a pointer to an user object that will be passed to the callback. <code>closure</code> can be <code>NULL</code>. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga60117450fc1f7b6f81bab455aeed7515" name="ga60117450fc1f7b6f81bab455aeed7515"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga60117450fc1f7b6f81bab455aeed7515">&#9670;&#160;</a></span>natsOptions_SetUserCredentialsCallbacks()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetUserCredentialsCallbacks </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__callbacks_group.html#ga258b30458134be90f17315c037f34b7b">natsUserJWTHandler</a>&#160;</td>
+          <td class="paramname"><em>ujwtCB</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">void *&#160;</td>
+          <td class="paramname"><em>ujwtClosure</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__callbacks_group.html#gab786ffd670c86de0563559351305080b">natsSignatureHandler</a>&#160;</td>
+          <td class="paramname"><em>sigCB</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">void *&#160;</td>
+          <td class="paramname"><em>sigClosure</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Any time the library creates a TCP connection to the server, the server in response sends an <code>INFO</code> protocol. That <code>INFO</code> protocol, for NATS Server at v2.0.0+, may include a <code>nonce</code> for the client to sign.</p>
+<p >If this option is set, the library will invoke the two handlers to fetch the user JWT and sign the server's nonce.</p>
+<p >This is an option that will be used only by users that are able to sign using Ed25519 (public-key signature system). Most users will probably prefer the user of <a class="el" href="group__opts_group.html#ga59b47f7b7a19085cf8eaada9bfe5606e" title="Sets the file(s) to use to fetch user JWT and seed required to sign nonce.">natsOptions_SetUserCredentialsFromFiles()</a>.</p>
+<dl class="section note"><dt>Note</dt><dd><a class="el" href="group__opts_group.html#ga60117450fc1f7b6f81bab455aeed7515" title="Sets the callbacks to fetch user JWT and sign server&#39;s nonce.">natsOptions_SetUserCredentialsCallbacks()</a> and <a class="el" href="group__opts_group.html#ga0290eac4665569c850468d9f00e246a0" title="Sets the NKey public key and signature callback.">natsOptions_SetNKey()</a> are mutually exclusive. Calling this function will remove the NKey and replace the signature handler, that was set with <a class="el" href="group__opts_group.html#ga0290eac4665569c850468d9f00e246a0" title="Sets the NKey public key and signature callback.">natsOptions_SetNKey()</a>, with this one.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__callbacks_group.html#ga258b30458134be90f17315c037f34b7b" title="Callback used to fetch and return account signed user JWT.">natsUserJWTHandler</a> </dd>
+<dd>
+<a class="el" href="group__callbacks_group.html#gab786ffd670c86de0563559351305080b" title="Callback used to sign a nonce sent by the server.">natsSignatureHandler</a> </dd>
+<dd>
+<a class="el" href="group__opts_group.html#ga59b47f7b7a19085cf8eaada9bfe5606e" title="Sets the file(s) to use to fetch user JWT and seed required to sign nonce.">natsOptions_SetUserCredentialsFromFiles()</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">ujwtCB</td><td>the callback to invoke to fetch the user JWT. </td></tr>
+    <tr><td class="paramname">ujwtClosure</td><td>the closure that will be passed to the <code>ujwtCB</code> callback. </td></tr>
+    <tr><td class="paramname">sigCB</td><td>the callback to invoke to sign the server nonce. </td></tr>
+    <tr><td class="paramname">sigClosure</td><td>the closure that will be passed to the <code>sigCB</code> callback. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga59b47f7b7a19085cf8eaada9bfe5606e" name="ga59b47f7b7a19085cf8eaada9bfe5606e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga59b47f7b7a19085cf8eaada9bfe5606e">&#9670;&#160;</a></span>natsOptions_SetUserCredentialsFromFiles()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetUserCredentialsFromFiles </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>userOrChainedFile</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>seedFile</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This is a convenient option that specifies the files(s) to use to fetch the user JWT and the user seed to be used to sign the server's nonce.</p>
+<p >The <code>userOrChainedFile</code> contains the user JWT token and possibly the user NKey seed. Note the format of this file:</p>
+<div class="fragment"><div class="line">-----BEGIN NATS USER JWT-----</div>
+<div class="line">...an user JWT token...</div>
+<div class="line">------END NATS USER JWT------</div>
+<div class="line"> </div>
+<div class="line">************************* IMPORTANT *************************</div>
+<div class="line">NKEY Seed printed below can be used to sign and prove identity.</div>
+<div class="line">NKEYs are sensitive and should be treated as secrets.</div>
+<div class="line"> </div>
+<div class="line">-----BEGIN USER NKEY SEED-----</div>
+<div class="line">SU...</div>
+<div class="line">------END USER NKEY SEED------</div>
+</div><!-- fragment --><p >The <code>---BEGIN NATS USER JWT---</code> header is used to detect where the user JWT is in this file.</p>
+<p >If the file does not contain the user NKey seed, then the <code>seedFile</code> file name must be specified and must contain the user NKey seed.</p>
+<dl class="section note"><dt>Note</dt><dd><a class="el" href="group__opts_group.html#ga59b47f7b7a19085cf8eaada9bfe5606e" title="Sets the file(s) to use to fetch user JWT and seed required to sign nonce.">natsOptions_SetUserCredentialsFromFiles()</a> and <a class="el" href="group__opts_group.html#ga0290eac4665569c850468d9f00e246a0" title="Sets the NKey public key and signature callback.">natsOptions_SetNKey()</a> are mutually exclusive. Calling this function will remove the NKey and replace the signature handler, that was set with <a class="el" href="group__opts_group.html#ga0290eac4665569c850468d9f00e246a0" title="Sets the NKey public key and signature callback.">natsOptions_SetNKey()</a>, with an internal one that will handle the signature.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">userOrChainedFile</td><td>the name of the file containing the user JWT and possibly the user NKey seed. </td></tr>
+    <tr><td class="paramname">seedFile</td><td>the name of the file containing the user NKey seed. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga0290eac4665569c850468d9f00e246a0" name="ga0290eac4665569c850468d9f00e246a0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga0290eac4665569c850468d9f00e246a0">&#9670;&#160;</a></span>natsOptions_SetNKey()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetNKey </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>pubKey</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__callbacks_group.html#gab786ffd670c86de0563559351305080b">natsSignatureHandler</a>&#160;</td>
+          <td class="paramname"><em>sigCB</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">void *&#160;</td>
+          <td class="paramname"><em>sigClosure</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Any time the library creates a TCP connection to the server, the server in response sends an <code>INFO</code> protocol. That <code>INFO</code> protocol, for NATS Server at v2.0.0+, may include a <code>nonce</code> for the client to sign.</p>
+<p >If this option is set, the library will add the NKey public key <code>pubKey</code> to the <code>CONNECT</code> protocol along with the server's nonce signature resulting from the invocation of the signature handler <code>sigCB</code>.</p>
+<dl class="section note"><dt>Note</dt><dd><a class="el" href="group__opts_group.html#ga0290eac4665569c850468d9f00e246a0" title="Sets the NKey public key and signature callback.">natsOptions_SetNKey()</a> and <a class="el" href="group__opts_group.html#ga60117450fc1f7b6f81bab455aeed7515" title="Sets the callbacks to fetch user JWT and sign server&#39;s nonce.">natsOptions_SetUserCredentialsCallbacks()</a> or <a class="el" href="group__opts_group.html#ga59b47f7b7a19085cf8eaada9bfe5606e" title="Sets the file(s) to use to fetch user JWT and seed required to sign nonce.">natsOptions_SetUserCredentialsFromFiles()</a> are mutually exclusive. Calling this function will remove the user JWT callback and replace the signature handler, that was set with one of the user credentials options, with this one.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__callbacks_group.html#gab786ffd670c86de0563559351305080b" title="Callback used to sign a nonce sent by the server.">natsSignatureHandler</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">pubKey</td><td>the user NKey public key. </td></tr>
+    <tr><td class="paramname">sigCB</td><td>the callback to invoke to sign the server nonce. </td></tr>
+    <tr><td class="paramname">sigClosure</td><td>the closure that will be passed to the <code>sigCB</code> callback. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga696f02e0493c00d3c1eafff45b62b68e" name="ga696f02e0493c00d3c1eafff45b62b68e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga696f02e0493c00d3c1eafff45b62b68e">&#9670;&#160;</a></span>natsOptions_SetNKeyFromSeed()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetNKeyFromSeed </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>pubKey</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>seedFile</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Any time the library creates a TCP connection to the server, the server in response sends an <code>INFO</code> protocol. That <code>INFO</code> protocol, for NATS Server at v2.0.0+, may include a <code>nonce</code> for the client to sign.</p>
+<p >If this option is set, the library will add the NKey public key <code>pubKey</code> to the <code>CONNECT</code> protocol along with the server's nonce signature signed using the private key from the provided seed file. The library takes care of clearing the memory holding the private key read from the file as soon as it is no longer needed.</p>
+<dl class="section note"><dt>Note</dt><dd><a class="el" href="group__opts_group.html#ga696f02e0493c00d3c1eafff45b62b68e" title="Sets the NKey public key and its seed file.">natsOptions_SetNKeyFromSeed()</a> and <a class="el" href="group__opts_group.html#ga60117450fc1f7b6f81bab455aeed7515" title="Sets the callbacks to fetch user JWT and sign server&#39;s nonce.">natsOptions_SetUserCredentialsCallbacks()</a> or <a class="el" href="group__opts_group.html#ga59b47f7b7a19085cf8eaada9bfe5606e" title="Sets the file(s) to use to fetch user JWT and seed required to sign nonce.">natsOptions_SetUserCredentialsFromFiles()</a> are mutually exclusive. Calling this function will remove the user JWT callback and replace the signature handler, that was set with one of the user credentials options, with this one.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__callbacks_group.html#gab786ffd670c86de0563559351305080b" title="Callback used to sign a nonce sent by the server.">natsSignatureHandler</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">pubKey</td><td>the user NKey public key. </td></tr>
+    <tr><td class="paramname">seedFile</td><td>the name of the file containing the user NKey seed. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gaafda5fb8d9ee3a17bd475ceaecfac218" name="gaafda5fb8d9ee3a17bd475ceaecfac218"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaafda5fb8d9ee3a17bd475ceaecfac218">&#9670;&#160;</a></span>natsOptions_SetWriteDeadline()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetWriteDeadline </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int64_t&#160;</td>
+          <td class="paramname"><em>deadline</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >If this is set, the socket is set to non-blocking mode and write will have a deadline set. If the deadline is reached, the write call will return an error which will translate to publish calls, or any library call trying to send data to the server, to possibly fail.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">deadline</td><td>the write deadline expressed in milliseconds. If set to 0, it means that there is no deadline and socket is in blocking mode. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga192465163abb87ad48a843b45cdf9984" name="ga192465163abb87ad48a843b45cdf9984"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga192465163abb87ad48a843b45cdf9984">&#9670;&#160;</a></span>natsOptions_DisableNoResponders()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_DisableNoResponders </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">bool&#160;</td>
+          <td class="paramname"><em>disabled</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >By default, when a connection to a NATS Server v2.2.0+ is made, the library signals to the server that it supports the "no responders" feature, which means that if a request is made, and there are no subscriptions on the request subject (no responders), then the server sends back an empty message with the header "Status" and value "503". The request APIs capture this message and instead return a <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80aab97324e40ccfe1360080c651c330e62" title="No responders were running when the server received the request.">NATS_NO_RESPONDERS</a> status, instead of waiting for the timeout to occur and return <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ab88994c9ea9889ac4d9d656d62f550ed">NATS_TIMEOUT</a>.</p>
+<p >In case where users set up their own asynchronous subscription on the reply subject and publish the request with <a class="el" href="group__conn_pub_group.html#gaaaa3d75ffec2dcdc6bf905cdb1eee59e" title="Publishes data on a subject expecting replies on the given reply.">natsConnection_PublishRequest</a> and the like, then the message callback may be invoked with this "no responders" message, which can be checked with <a class="el" href="group__msg_group.html#ga43aa4a8e4b93725b4876ee2677e19c7b" title="Indicates if this message is a &quot;no responders&quot; message from the server.">natsMsg_IsNoResponders</a>.</p>
+<p >However, if users don't want to have to deal with that, it is possible to instruct the server to disable this feature for a given connection. If that is the case, requests will behave as with pre-v2.2.0 servers, in that the request will timeout when there are no responders.</p>
+<dl class="section note"><dt>Note</dt><dd>This function is to disable the feature that is normally enabled by default. Passing <code>false</code> means that it would enable it again if you had previously disable the option. However, the feature may still be disabled when connecting to a server that does not support it.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__msg_group.html#ga43aa4a8e4b93725b4876ee2677e19c7b" title="Indicates if this message is a &quot;no responders&quot; message from the server.">natsMsg_IsNoResponders()</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">disabled</td><td>the boolean to indicate if the feature should be disabled or not. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gac5173473a731a4a36d15346fedddf91f" name="gac5173473a731a4a36d15346fedddf91f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gac5173473a731a4a36d15346fedddf91f">&#9670;&#160;</a></span>natsOptions_SetCustomInboxPrefix()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetCustomInboxPrefix </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>inboxPrefix</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >The default inbox prefix is "_INBOX", but you can change it using this option. This can be useful when setting permissions and/or with import/exports across different accounts.</p>
+<p >The prefix must be a valid subject and not contain any of the wildcards tokens <code>*</code> nor <code>&gt;</code>.</p>
+<p >To clear the custom inbox prefix, call this function with <code>NULL</code> or the empty string.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object. </td></tr>
+    <tr><td class="paramname">inboxPrefix</td><td>the desired inbox prefix. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga93d8068cd6fff53b7f8e1c403db45eb9" name="ga93d8068cd6fff53b7f8e1c403db45eb9"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga93d8068cd6fff53b7f8e1c403db45eb9">&#9670;&#160;</a></span>natsOptions_Destroy()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void natsOptions_Destroy </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Destroys the natsOptions object, freeing used memory. See the note in the <a class="el" href="group__opts_group.html#ga61d4a0cf2fbf7d13cc910e5a00c575be" title="Creates a natsOptions object.">natsOptions_Create()</a> call.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object to destroy. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__opts_group.js b/doc/html/group__opts_group.js
new file mode 100644 (file)
index 0000000..7c010ab
--- /dev/null
@@ -0,0 +1,56 @@
+var group__opts_group =
+[
+    [ "natsOptions_Create", "group__opts_group.html#ga61d4a0cf2fbf7d13cc910e5a00c575be", null ],
+    [ "natsOptions_SetURL", "group__opts_group.html#ga3f7e760214417c7d87541ecb9ab5bea5", null ],
+    [ "natsOptions_SetServers", "group__opts_group.html#gacb7e964ae54b74d972d72e118b7b8bdf", null ],
+    [ "natsOptions_SetUserInfo", "group__opts_group.html#ga5b99da7dd74aac3be962f323c3863d9e", null ],
+    [ "natsOptions_SetToken", "group__opts_group.html#gad58a5b9dabadeebda30e952ff7b39193", null ],
+    [ "natsOptions_SetTokenHandler", "group__opts_group.html#ga23a3b1f022112e98ddccb18b247b4426", null ],
+    [ "natsOptions_SetNoRandomize", "group__opts_group.html#gaabf8763b931dcf389c83fd95d760a413", null ],
+    [ "natsOptions_SetTimeout", "group__opts_group.html#ga17cd7fe41176cd98aca1184fa9352ad9", null ],
+    [ "natsOptions_SetName", "group__opts_group.html#ga1c529d347be0fe2eec17c7f4698e283e", null ],
+    [ "natsOptions_SetSecure", "group__opts_group.html#gaa1f09416d443fa7a6af6b695da563eba", null ],
+    [ "natsOptions_LoadCATrustedCertificates", "group__opts_group.html#ga2cd6563694a439b3949a31fd81103099", null ],
+    [ "natsOptions_SetCATrustedCertificates", "group__opts_group.html#gafb30794fc2ae74b9e0bd8fb609b901c8", null ],
+    [ "natsOptions_LoadCertificatesChain", "group__opts_group.html#ga36943e2ba53d05407cdabc4e7e96484b", null ],
+    [ "natsOptions_SetCertificatesChain", "group__opts_group.html#gae98f0f9034e93941767ab1ae6eec2c0c", null ],
+    [ "natsOptions_SetCiphers", "group__opts_group.html#ga5698f020e8eb3e7440eb073fe08ef62c", null ],
+    [ "natsOptions_SetCipherSuites", "group__opts_group.html#ga2b7f144b011d8ce62941b608a8f324f0", null ],
+    [ "natsOptions_SetExpectedHostname", "group__opts_group.html#ga0ba43ba9930df385e4781b12be9f2851", null ],
+    [ "natsOptions_SkipServerVerification", "group__opts_group.html#ga6f804ec44adc299989fe623570679da3", null ],
+    [ "natsOptions_SetVerbose", "group__opts_group.html#gaa16bfd09ef318af18c27a0e199681b69", null ],
+    [ "natsOptions_SetPedantic", "group__opts_group.html#ga26f166af20de98bec67bc6cc916f769e", null ],
+    [ "natsOptions_SetPingInterval", "group__opts_group.html#gae68fb615835364c0809555e8dc93f57e", null ],
+    [ "natsOptions_SetMaxPingsOut", "group__opts_group.html#gaaff89c3f41627f4b2929dbc9b82d265b", null ],
+    [ "natsOptions_SetIOBufSize", "group__opts_group.html#ga1a3e3abfd7ddd8aff247df8f332bbda3", null ],
+    [ "natsOptions_SetAllowReconnect", "group__opts_group.html#ga3d1d3cb2f2a0e23d27dd60e96d1cc91b", null ],
+    [ "natsOptions_SetMaxReconnect", "group__opts_group.html#gab54cd2719c0b64eebd6c7b83dd2908a0", null ],
+    [ "natsOptions_SetReconnectWait", "group__opts_group.html#ga2730f4e16e318a2ef8de98dbf6ede807", null ],
+    [ "natsOptions_SetReconnectJitter", "group__opts_group.html#ga8f3df57ed8ae418d3ae6678ae5e2a5d2", null ],
+    [ "natsOptions_SetCustomReconnectDelay", "group__opts_group.html#ga3593165aa113d6736e0226ddc56b3e9d", null ],
+    [ "natsOptions_SetReconnectBufSize", "group__opts_group.html#gaa0d4b7ece8477cb9879f0dafff3456a5", null ],
+    [ "natsOptions_SetMaxPendingMsgs", "group__opts_group.html#ga95510436eee06f9992ded96a44795c40", null ],
+    [ "natsOptions_SetErrorHandler", "group__opts_group.html#ga127ec7a8196b453947a7fa9a64096cbd", null ],
+    [ "natsOptions_SetClosedCB", "group__opts_group.html#ga44410242e73134e5bb51ef27904a9253", null ],
+    [ "natsOptions_SetDisconnectedCB", "group__opts_group.html#gadc8dc0cedd91bda71d544f3dedc4a039", null ],
+    [ "natsOptions_SetReconnectedCB", "group__opts_group.html#ga26a48c8529fffa5f5d1a61c030979980", null ],
+    [ "natsOptions_SetDiscoveredServersCB", "group__opts_group.html#gab5baab507c974402ab0d8c5e8227ee65", null ],
+    [ "natsOptions_SetIgnoreDiscoveredServers", "group__opts_group.html#ga7e4172084520708b8c9f28e73174461c", null ],
+    [ "natsOptions_SetLameDuckModeCB", "group__opts_group.html#ga54dea2ffeb33779771652a7a14fc4adc", null ],
+    [ "natsOptions_SetEventLoop", "group__opts_group.html#gab09491bad908dedcb323c780280733ff", null ],
+    [ "natsOptions_UseGlobalMessageDelivery", "group__opts_group.html#gabf060c92648b50c069f0abe7cbb06f1c", null ],
+    [ "natsOptions_IPResolutionOrder", "group__opts_group.html#ga7ca713c7532eff4d41a492e95b8822cf", null ],
+    [ "natsOptions_SetSendAsap", "group__opts_group.html#ga8f06568cc3319a5a0eef9f80282034ca", null ],
+    [ "natsOptions_UseOldRequestStyle", "group__opts_group.html#ga70aa85319933d78c0076cc862fa3e5a6", null ],
+    [ "natsOptions_SetFailRequestsOnDisconnect", "group__opts_group.html#gadef4376a5e608cbc8c1a9e2b6335dc79", null ],
+    [ "natsOptions_SetNoEcho", "group__opts_group.html#ga4f694b87039cedaa65cd25656b14d1a3", null ],
+    [ "natsOptions_SetRetryOnFailedConnect", "group__opts_group.html#ga20946800d024b7089e73d63454d1c19f", null ],
+    [ "natsOptions_SetUserCredentialsCallbacks", "group__opts_group.html#ga60117450fc1f7b6f81bab455aeed7515", null ],
+    [ "natsOptions_SetUserCredentialsFromFiles", "group__opts_group.html#ga59b47f7b7a19085cf8eaada9bfe5606e", null ],
+    [ "natsOptions_SetNKey", "group__opts_group.html#ga0290eac4665569c850468d9f00e246a0", null ],
+    [ "natsOptions_SetNKeyFromSeed", "group__opts_group.html#ga696f02e0493c00d3c1eafff45b62b68e", null ],
+    [ "natsOptions_SetWriteDeadline", "group__opts_group.html#gaafda5fb8d9ee3a17bd475ceaecfac218", null ],
+    [ "natsOptions_DisableNoResponders", "group__opts_group.html#ga192465163abb87ad48a843b45cdf9984", null ],
+    [ "natsOptions_SetCustomInboxPrefix", "group__opts_group.html#gac5173473a731a4a36d15346fedddf91f", null ],
+    [ "natsOptions_Destroy", "group__opts_group.html#ga93d8068cd6fff53b7f8e1c403db45eb9", null ]
+];
\ No newline at end of file
diff --git a/doc/html/group__stan_conn_group.html b/doc/html/group__stan_conn_group.html
new file mode 100644 (file)
index 0000000..7dbdaa1
--- /dev/null
@@ -0,0 +1,123 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Streaming Connection</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__stan_conn_group.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#groups">Modules</a>  </div>
+  <div class="headertitle"><div class="title">Streaming Connection<div class="ingroups"><a class="el" href="group__func_group.html">Functions</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="groups" name="groups"></a>
+Modules</h2></td></tr>
+<tr class="memitem:group__stan_conn_mgt_group"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_mgt_group.html">Management</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:group__stan_conn_pub_group"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_pub_group.html">Publishing</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:group__stan_conn_sub_group"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_sub_group.html">Subscribing</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<p >NATS Streaming Connection </p>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__stan_conn_group.js b/doc/html/group__stan_conn_group.js
new file mode 100644 (file)
index 0000000..aa28526
--- /dev/null
@@ -0,0 +1,6 @@
+var group__stan_conn_group =
+[
+    [ "Management", "group__stan_conn_mgt_group.html", "group__stan_conn_mgt_group" ],
+    [ "Publishing", "group__stan_conn_pub_group.html", "group__stan_conn_pub_group" ],
+    [ "Subscribing", "group__stan_conn_sub_group.html", "group__stan_conn_sub_group" ]
+];
\ No newline at end of file
diff --git a/doc/html/group__stan_conn_mgt_group.html b/doc/html/group__stan_conn_mgt_group.html
new file mode 100644 (file)
index 0000000..3427058
--- /dev/null
@@ -0,0 +1,309 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Management</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__stan_conn_mgt_group.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle"><div class="title">Management<div class="ingroups"><a class="el" href="group__func_group.html">Functions</a> &raquo; <a class="el" href="group__stan_conn_group.html">Streaming Connection</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:ga35e0e6e5e3b7f3818a3ac3600efb8f8f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_mgt_group.html#ga35e0e6e5e3b7f3818a3ac3600efb8f8f">stanConnection_Connect</a> (<a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> **sc, const char *clusterID, const char *clientID, <a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *options)</td></tr>
+<tr class="memdesc:ga35e0e6e5e3b7f3818a3ac3600efb8f8f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connects to a <code>NATS Streaming Server</code> using the provided options.  <a href="group__stan_conn_mgt_group.html#ga35e0e6e5e3b7f3818a3ac3600efb8f8f">More...</a><br /></td></tr>
+<tr class="separator:ga35e0e6e5e3b7f3818a3ac3600efb8f8f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga166ec494a55c9b1f9ebafd2294e05ff6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_mgt_group.html#ga166ec494a55c9b1f9ebafd2294e05ff6">stanConnection_GetNATSConnection</a> (<a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *sc, <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> **nc)</td></tr>
+<tr class="memdesc:ga166ec494a55c9b1f9ebafd2294e05ff6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the underlying NATS Connection.  <a href="group__stan_conn_mgt_group.html#ga166ec494a55c9b1f9ebafd2294e05ff6">More...</a><br /></td></tr>
+<tr class="separator:ga166ec494a55c9b1f9ebafd2294e05ff6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2e56a93825e1214a5ab688860e2a8ce6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_mgt_group.html#ga2e56a93825e1214a5ab688860e2a8ce6">stanConnection_ReleaseNATSConnection</a> (<a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *sc)</td></tr>
+<tr class="memdesc:ga2e56a93825e1214a5ab688860e2a8ce6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Releases the NATS Connection.  <a href="group__stan_conn_mgt_group.html#ga2e56a93825e1214a5ab688860e2a8ce6">More...</a><br /></td></tr>
+<tr class="separator:ga2e56a93825e1214a5ab688860e2a8ce6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga4952a7f65a53fdb5ca1c26b1a1656f1d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_mgt_group.html#ga4952a7f65a53fdb5ca1c26b1a1656f1d">stanConnection_Close</a> (<a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *sc)</td></tr>
+<tr class="memdesc:ga4952a7f65a53fdb5ca1c26b1a1656f1d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Closes the connection.  <a href="group__stan_conn_mgt_group.html#ga4952a7f65a53fdb5ca1c26b1a1656f1d">More...</a><br /></td></tr>
+<tr class="separator:ga4952a7f65a53fdb5ca1c26b1a1656f1d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaea095eec18fdf04e06de16711f8b1a04"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_mgt_group.html#gaea095eec18fdf04e06de16711f8b1a04">stanConnection_Destroy</a> (<a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *sc)</td></tr>
+<tr class="memdesc:gaea095eec18fdf04e06de16711f8b1a04"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the connection object.  <a href="group__stan_conn_mgt_group.html#gaea095eec18fdf04e06de16711f8b1a04">More...</a><br /></td></tr>
+<tr class="separator:gaea095eec18fdf04e06de16711f8b1a04"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<p >Functions related to connection management. </p>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="ga35e0e6e5e3b7f3818a3ac3600efb8f8f" name="ga35e0e6e5e3b7f3818a3ac3600efb8f8f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga35e0e6e5e3b7f3818a3ac3600efb8f8f">&#9670;&#160;</a></span>stanConnection_Connect()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanConnection_Connect </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> **&#160;</td>
+          <td class="paramname"><em>sc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>clusterID</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>clientID</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *&#160;</td>
+          <td class="paramname"><em>options</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Attempts to connect to a <code>NATS Streaming Server</code>.</p>
+<p >This call is cloning the <a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1" title="Way to configure a stanConnection.">stanConnOptions</a> object, if given. Once this call returns, changes made to the <code>options</code> will not have an effect to this connection. The <code>options</code> can however be changed prior to be passed to another <a class="el" href="group__stan_conn_mgt_group.html#ga35e0e6e5e3b7f3818a3ac3600efb8f8f" title="Connects to a NATS Streaming Server using the provided options.">stanConnection_Connect()</a> call if desired.</p>
+<dl class="section note"><dt>Note</dt><dd>The Streaming connection does not honor the NATS Connection option <a class="el" href="group__opts_group.html#ga20946800d024b7089e73d63454d1c19f" title="Indicates if initial connect failure should be retried or not.">natsOptions_SetRetryOnFailedConnect()</a>. If you pass NATS Options with this option enabled, no error is returned, but if the connection cannot be established "right away", the connect call will return an error.</dd></dl>
+<dl class="section warning"><dt>Warning</dt><dd>If connecting to a NATS Server v2.2.0+ and there is no Streaming server listening on the connect request subject, this call will return <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80aab97324e40ccfe1360080c651c330e62" title="No responders were running when the server received the request.">NATS_NO_RESPONDERS</a>, not <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ab88994c9ea9889ac4d9d656d62f550ed">NATS_TIMEOUT</a>.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1" title="Way to configure a stanConnection.">stanConnOptions</a> </dd>
+<dd>
+<a class="el" href="group__stan_conn_mgt_group.html#gaea095eec18fdf04e06de16711f8b1a04" title="Destroys the connection object.">stanConnection_Destroy()</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sc</td><td>the location where to store the pointer to the newly created <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+    <tr><td class="paramname">clusterID</td><td>the name of the cluster this connection is for. </td></tr>
+    <tr><td class="paramname">clientID</td><td>the client ID for this connection. Only one connection with this ID will be accepted by the server. Use only a-zA-Z0-9_- characters. </td></tr>
+    <tr><td class="paramname">options</td><td>the options to use for this connection (can be <code>NULL</code>). </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga166ec494a55c9b1f9ebafd2294e05ff6" name="ga166ec494a55c9b1f9ebafd2294e05ff6"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga166ec494a55c9b1f9ebafd2294e05ff6">&#9670;&#160;</a></span>stanConnection_GetNATSConnection()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanConnection_GetNATSConnection </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *&#160;</td>
+          <td class="paramname"><em>sc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> **&#160;</td>
+          <td class="paramname"><em>nc</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This can be used if the application needs to do non streaming messaging but does not want to create a separate NATS Connection.</p>
+<p >Obtain a NATS connection from a NATS streaming connection. The NATS connection can be used to perform regular NATS operations, but it is owned and managed by the NATS streaming connection. It cannot be closed, which will happen when the NATS streaming connection is closed.</p>
+<dl class="section note"><dt>Note</dt><dd>For each call to this function, the user must call <a class="el" href="group__stan_conn_mgt_group.html#ga2e56a93825e1214a5ab688860e2a8ce6" title="Releases the NATS Connection.">stanConnection_ReleaseNATSConnection()</a> when access to the NATS Connection is no longer needed.</dd></dl>
+<dl class="section warning"><dt>Warning</dt><dd>The returned connection cannot be closed, drained nor destroyed. Calling corresponding functions will have no effect or return <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9bb78b4f245d2870040d25c450febd4b">NATS_ILLEGAL_STATE</a>.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__stan_conn_mgt_group.html#ga2e56a93825e1214a5ab688860e2a8ce6" title="Releases the NATS Connection.">stanConnection_ReleaseNATSConnection()</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sc</td><td>the pointer to the <a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c" title="A connection to a NATS Streaming Server.">stanConnection</a> object. </td></tr>
+    <tr><td class="paramname">nc</td><td>the location where to store the pointer of the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga2e56a93825e1214a5ab688860e2a8ce6" name="ga2e56a93825e1214a5ab688860e2a8ce6"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga2e56a93825e1214a5ab688860e2a8ce6">&#9670;&#160;</a></span>stanConnection_ReleaseNATSConnection()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void stanConnection_ReleaseNATSConnection </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *&#160;</td>
+          <td class="paramname"><em>sc</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This should be paired with the <a class="el" href="group__stan_conn_mgt_group.html#ga166ec494a55c9b1f9ebafd2294e05ff6" title="Returns the underlying NATS Connection.">stanConnection_GetNATSConnection()</a> call. That is, after getting a reference to the underlying NATS Connection and once that connection is no longer needed, calling this function will allow resources to be properly released when the streaming connection is destroyed.</p>
+<p >You would normally call <a class="el" href="group__stan_conn_mgt_group.html#ga166ec494a55c9b1f9ebafd2294e05ff6" title="Returns the underlying NATS Connection.">stanConnection_GetNATSConnection()</a> and this function only once.</p>
+<p >After the last <a class="el" href="group__stan_conn_mgt_group.html#ga2e56a93825e1214a5ab688860e2a8ce6" title="Releases the NATS Connection.">stanConnection_ReleaseNATSConnection()</a> call is made, you must no longer use the NATS Connection because if <a class="el" href="group__stan_conn_mgt_group.html#gaea095eec18fdf04e06de16711f8b1a04" title="Destroys the connection object.">stanConnection_Destroy()</a> is called, that could make the pointer to the NATS Connection invalid.</p>
+<dl class="section note"><dt>Note</dt><dd>If the streaming connection is closed/destroyed before the last call to <a class="el" href="group__stan_conn_mgt_group.html#ga2e56a93825e1214a5ab688860e2a8ce6" title="Releases the NATS Connection.">stanConnection_ReleaseNATSConnection</a>, the pointer to the NATS connection will still be valid, although all calls will fail since the connection is now closed. Calling this function will release the streaming object allowing memory to be freed.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__stan_conn_mgt_group.html#ga166ec494a55c9b1f9ebafd2294e05ff6" title="Returns the underlying NATS Connection.">stanConnection_GetNATSConnection</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sc</td><td>the pointer to the <a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c" title="A connection to a NATS Streaming Server.">stanConnection</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga4952a7f65a53fdb5ca1c26b1a1656f1d" name="ga4952a7f65a53fdb5ca1c26b1a1656f1d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga4952a7f65a53fdb5ca1c26b1a1656f1d">&#9670;&#160;</a></span>stanConnection_Close()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanConnection_Close </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *&#160;</td>
+          <td class="paramname"><em>sc</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Closes the connection to the server. This call will release all blocking calls. The connection object is still usable until the call to <a class="el" href="group__stan_conn_mgt_group.html#gaea095eec18fdf04e06de16711f8b1a04" title="Destroys the connection object.">stanConnection_Destroy()</a>.</p>
+<dl class="section warning"><dt>Warning</dt><dd>See warning about connecting to a NATS Server v2.2.0+ in <a class="el" href="group__stan_conn_mgt_group.html#ga35e0e6e5e3b7f3818a3ac3600efb8f8f" title="Connects to a NATS Streaming Server using the provided options.">stanConnection_Connect()</a>.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sc</td><td>the pointer to the <a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c" title="A connection to a NATS Streaming Server.">stanConnection</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gaea095eec18fdf04e06de16711f8b1a04" name="gaea095eec18fdf04e06de16711f8b1a04"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaea095eec18fdf04e06de16711f8b1a04">&#9670;&#160;</a></span>stanConnection_Destroy()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanConnection_Destroy </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *&#160;</td>
+          <td class="paramname"><em>sc</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Destroys the connection object, freeing up memory. If not already done, this call first closes the connection to the server.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sc</td><td>the pointer to the <a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c" title="A connection to a NATS Streaming Server.">stanConnection</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__stan_conn_mgt_group.js b/doc/html/group__stan_conn_mgt_group.js
new file mode 100644 (file)
index 0000000..ceacbef
--- /dev/null
@@ -0,0 +1,8 @@
+var group__stan_conn_mgt_group =
+[
+    [ "stanConnection_Connect", "group__stan_conn_mgt_group.html#ga35e0e6e5e3b7f3818a3ac3600efb8f8f", null ],
+    [ "stanConnection_GetNATSConnection", "group__stan_conn_mgt_group.html#ga166ec494a55c9b1f9ebafd2294e05ff6", null ],
+    [ "stanConnection_ReleaseNATSConnection", "group__stan_conn_mgt_group.html#ga2e56a93825e1214a5ab688860e2a8ce6", null ],
+    [ "stanConnection_Close", "group__stan_conn_mgt_group.html#ga4952a7f65a53fdb5ca1c26b1a1656f1d", null ],
+    [ "stanConnection_Destroy", "group__stan_conn_mgt_group.html#gaea095eec18fdf04e06de16711f8b1a04", null ]
+];
\ No newline at end of file
diff --git a/doc/html/group__stan_conn_opts_group.html b/doc/html/group__stan_conn_opts_group.html
new file mode 100644 (file)
index 0000000..41045f5
--- /dev/null
@@ -0,0 +1,528 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Streaming Connection Options</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__stan_conn_opts_group.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle"><div class="title">Streaming Connection Options<div class="ingroups"><a class="el" href="group__func_group.html">Functions</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:gaff52a1ce90253b4bdbb0005fca4f71b6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_opts_group.html#gaff52a1ce90253b4bdbb0005fca4f71b6">stanConnOptions_Create</a> (<a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> **newOpts)</td></tr>
+<tr class="memdesc:gaff52a1ce90253b4bdbb0005fca4f71b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a <a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1" title="Way to configure a stanConnection.">stanConnOptions</a> object.  <a href="group__stan_conn_opts_group.html#gaff52a1ce90253b4bdbb0005fca4f71b6">More...</a><br /></td></tr>
+<tr class="separator:gaff52a1ce90253b4bdbb0005fca4f71b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga3c6d511fc1e1febcdf5344960de5a0b3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_opts_group.html#ga3c6d511fc1e1febcdf5344960de5a0b3">stanConnOptions_SetURL</a> (<a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *opts, const char *url)</td></tr>
+<tr class="memdesc:ga3c6d511fc1e1febcdf5344960de5a0b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the URL to connect to.  <a href="group__stan_conn_opts_group.html#ga3c6d511fc1e1febcdf5344960de5a0b3">More...</a><br /></td></tr>
+<tr class="separator:ga3c6d511fc1e1febcdf5344960de5a0b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gae3fc9a4daa7f85367811a313857337b4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_opts_group.html#gae3fc9a4daa7f85367811a313857337b4">stanConnOptions_SetNATSOptions</a> (<a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *opts, <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *nOpts)</td></tr>
+<tr class="memdesc:gae3fc9a4daa7f85367811a313857337b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the NATS Options to use to create the connection.  <a href="group__stan_conn_opts_group.html#gae3fc9a4daa7f85367811a313857337b4">More...</a><br /></td></tr>
+<tr class="separator:gae3fc9a4daa7f85367811a313857337b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga66c72c482696d9ceca71fced7cbb1264"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_opts_group.html#ga66c72c482696d9ceca71fced7cbb1264">stanConnOptions_SetConnectionWait</a> (<a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *opts, int64_t wait)</td></tr>
+<tr class="memdesc:ga66c72c482696d9ceca71fced7cbb1264"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the timeout for establishing a connection.  <a href="group__stan_conn_opts_group.html#ga66c72c482696d9ceca71fced7cbb1264">More...</a><br /></td></tr>
+<tr class="separator:ga66c72c482696d9ceca71fced7cbb1264"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga36f2ee441562dcf619d6e020b823fc96"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_opts_group.html#ga36f2ee441562dcf619d6e020b823fc96">stanConnOptions_SetPubAckWait</a> (<a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *opts, int64_t wait)</td></tr>
+<tr class="memdesc:ga36f2ee441562dcf619d6e020b823fc96"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the timeout for waiting for an ACK for a published message.  <a href="group__stan_conn_opts_group.html#ga36f2ee441562dcf619d6e020b823fc96">More...</a><br /></td></tr>
+<tr class="separator:ga36f2ee441562dcf619d6e020b823fc96"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga07105d1d00878bba19f47243b2c88402"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_opts_group.html#ga07105d1d00878bba19f47243b2c88402">stanConnOptions_SetDiscoveryPrefix</a> (<a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *opts, const char *prefix)</td></tr>
+<tr class="memdesc:ga07105d1d00878bba19f47243b2c88402"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the subject prefix the library sends the connect request to.  <a href="group__stan_conn_opts_group.html#ga07105d1d00878bba19f47243b2c88402">More...</a><br /></td></tr>
+<tr class="separator:ga07105d1d00878bba19f47243b2c88402"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga29eee1be7eff749aeac3bab60d1b0405"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_opts_group.html#ga29eee1be7eff749aeac3bab60d1b0405">stanConnOptions_SetMaxPubAcksInflight</a> (<a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *opts, int maxPubAcksInflight, float percentage)</td></tr>
+<tr class="memdesc:ga29eee1be7eff749aeac3bab60d1b0405"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the maximum number of published messages without outstanding ACKs from the server.  <a href="group__stan_conn_opts_group.html#ga29eee1be7eff749aeac3bab60d1b0405">More...</a><br /></td></tr>
+<tr class="separator:ga29eee1be7eff749aeac3bab60d1b0405"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gad835223f08fbeae2a3c7a34d3fa1550b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_opts_group.html#gad835223f08fbeae2a3c7a34d3fa1550b">stanConnOptions_SetPings</a> (<a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *opts, int interval, int maxOut)</td></tr>
+<tr class="memdesc:gad835223f08fbeae2a3c7a34d3fa1550b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the ping interval and max out values.  <a href="group__stan_conn_opts_group.html#gad835223f08fbeae2a3c7a34d3fa1550b">More...</a><br /></td></tr>
+<tr class="separator:gad835223f08fbeae2a3c7a34d3fa1550b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga19ba15c8001aa835b261eea3a309e6d3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_opts_group.html#ga19ba15c8001aa835b261eea3a309e6d3">stanConnOptions_SetConnectionLostHandler</a> (<a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *opts, <a class="el" href="group__callbacks_group.html#gac34092f6c698374f86ad349302bdd55c">stanConnectionLostHandler</a> handler, void *closure)</td></tr>
+<tr class="memdesc:ga19ba15c8001aa835b261eea3a309e6d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the connection lost handler.  <a href="group__stan_conn_opts_group.html#ga19ba15c8001aa835b261eea3a309e6d3">More...</a><br /></td></tr>
+<tr class="separator:ga19ba15c8001aa835b261eea3a309e6d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga83fd0a29b136cbfb643be642eb2fa726"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_opts_group.html#ga83fd0a29b136cbfb643be642eb2fa726">stanConnOptions_Destroy</a> (<a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *opts)</td></tr>
+<tr class="memdesc:ga83fd0a29b136cbfb643be642eb2fa726"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys a <a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1" title="Way to configure a stanConnection.">stanConnOptions</a> object.  <a href="group__stan_conn_opts_group.html#ga83fd0a29b136cbfb643be642eb2fa726">More...</a><br /></td></tr>
+<tr class="separator:ga83fd0a29b136cbfb643be642eb2fa726"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<p >NATS Streaming Connection Options. </p>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="gaff52a1ce90253b4bdbb0005fca4f71b6" name="gaff52a1ce90253b4bdbb0005fca4f71b6"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaff52a1ce90253b4bdbb0005fca4f71b6">&#9670;&#160;</a></span>stanConnOptions_Create()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanConnOptions_Create </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> **&#160;</td>
+          <td class="paramname"><em>newOpts</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Creates a <a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1" title="Way to configure a stanConnection.">stanConnOptions</a> object. This object is used when one wants to set specific options prior to connecting to the <code>NATS Streaning Server</code>.</p>
+<p >After making the appropriate <code>stanConnOptions_SetXXX()</code> calls, this object is passed to the <a class="el" href="group__stan_conn_mgt_group.html#ga35e0e6e5e3b7f3818a3ac3600efb8f8f" title="Connects to a NATS Streaming Server using the provided options.">stanConnection_Connect()</a> call, which will clone this object. After <a class="el" href="group__stan_conn_mgt_group.html#ga35e0e6e5e3b7f3818a3ac3600efb8f8f" title="Connects to a NATS Streaming Server using the provided options.">stanConnection_Connect()</a> returns, modifications to the options object will not affect the connection.</p>
+<p >The default options set in this call are: url: <code>nats://localhost:4222</code> connection wait: 2 seconds publish ack wait: 30 seconds discovery prefix: <code>_STAN.discovery</code> maximum publish acks inflight and percentage: 16384, 50% ping interval: 5 seconds max ping out without response: 3</p>
+<dl class="section note"><dt>Note</dt><dd>The object needs to be destroyed when no longer needed.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__stan_conn_mgt_group.html#ga35e0e6e5e3b7f3818a3ac3600efb8f8f" title="Connects to a NATS Streaming Server using the provided options.">stanConnection_Connect()</a> </dd>
+<dd>
+<a class="el" href="group__stan_conn_opts_group.html#ga83fd0a29b136cbfb643be642eb2fa726" title="Destroys a stanConnOptions object.">stanConnOptions_Destroy()</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">newOpts</td><td>the location where store the pointer to the newly created <a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1" title="Way to configure a stanConnection.">stanConnOptions</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga3c6d511fc1e1febcdf5344960de5a0b3" name="ga3c6d511fc1e1febcdf5344960de5a0b3"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga3c6d511fc1e1febcdf5344960de5a0b3">&#9670;&#160;</a></span>stanConnOptions_SetURL()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanConnOptions_SetURL </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>url</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Sets the URL of the <code>NATS Streaming Server</code> the client should try to connect to. The URL can contain optional user name and password. You can provide a comma separated list of URLs too.</p>
+<p >Some valid URLS:</p>
+<ul>
+<li>nats://localhost:4222</li>
+<li>nats://user@localhost:4222</li>
+<li>nats://user:password@localhost:4222</li>
+<li>nats://host1:4222,nats://host2:4222,nats://host3:4222</li>
+</ul>
+<dl class="section note"><dt>Note</dt><dd>This option takes precedence over <a class="el" href="group__opts_group.html#ga3f7e760214417c7d87541ecb9ab5bea5" title="Sets the URL to connect to.">natsOptions_SetURL</a> when NATS options are passed with <a class="el" href="group__stan_conn_opts_group.html#gae3fc9a4daa7f85367811a313857337b4" title="Sets the NATS Options to use to create the connection.">stanConnOptions_SetNATSOptions</a>.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1" title="Way to configure a stanConnection.">stanConnOptions</a> object. </td></tr>
+    <tr><td class="paramname">url</td><td>the string representing the URL the connection should use to connect to the server. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gae3fc9a4daa7f85367811a313857337b4" name="gae3fc9a4daa7f85367811a313857337b4"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gae3fc9a4daa7f85367811a313857337b4">&#9670;&#160;</a></span>stanConnOptions_SetNATSOptions()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanConnOptions_SetNATSOptions </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
+          <td class="paramname"><em>nOpts</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >The Streaming client connects to the NATS Streaming Server through a regular NATS Connection (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a>). To configure this connection create a <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> and configure it as needed, then call this function.</p>
+<p >This function clones the passed options, so after this call, any changes to the given <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> will not affect the <a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1" title="Way to configure a stanConnection.">stanConnOptions</a>.</p>
+<dl class="section note"><dt>Note</dt><dd>If both <a class="el" href="group__opts_group.html#ga3f7e760214417c7d87541ecb9ab5bea5" title="Sets the URL to connect to.">natsOptions_SetURL</a> and <a class="el" href="group__stan_conn_opts_group.html#ga3c6d511fc1e1febcdf5344960de5a0b3" title="Sets the URL to connect to.">stanConnOptions_SetURL</a> are used the URL(s) set in the later take precedence.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1" title="Way to configure a stanConnection.">stanConnOptions</a> object. </td></tr>
+    <tr><td class="paramname">nOpts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object to use to create the connection to the server. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga66c72c482696d9ceca71fced7cbb1264" name="ga66c72c482696d9ceca71fced7cbb1264"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga66c72c482696d9ceca71fced7cbb1264">&#9670;&#160;</a></span>stanConnOptions_SetConnectionWait()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanConnOptions_SetConnectionWait </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int64_t&#160;</td>
+          <td class="paramname"><em>wait</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Value expressed in milliseconds.</p>
+<p >Default is 2000 milliseconds (2 seconds).</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1" title="Way to configure a stanConnection.">stanConnOptions</a> object. </td></tr>
+    <tr><td class="paramname">wait</td><td>how long to wait for a response from the streaming server. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga36f2ee441562dcf619d6e020b823fc96" name="ga36f2ee441562dcf619d6e020b823fc96"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga36f2ee441562dcf619d6e020b823fc96">&#9670;&#160;</a></span>stanConnOptions_SetPubAckWait()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanConnOptions_SetPubAckWait </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int64_t&#160;</td>
+          <td class="paramname"><em>wait</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Value expressed in milliseconds.</p>
+<p >Default is 30000 milliseconds (30 seconds).</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1" title="Way to configure a stanConnection.">stanConnOptions</a> object. </td></tr>
+    <tr><td class="paramname">wait</td><td>how long to wait for a response from the streaming server. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga07105d1d00878bba19f47243b2c88402" name="ga07105d1d00878bba19f47243b2c88402"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga07105d1d00878bba19f47243b2c88402">&#9670;&#160;</a></span>stanConnOptions_SetDiscoveryPrefix()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanConnOptions_SetDiscoveryPrefix </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>prefix</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Default is <code>_STAN.discovery</code></p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1" title="Way to configure a stanConnection.">stanConnOptions</a> object. </td></tr>
+    <tr><td class="paramname">prefix</td><td>the subject prefix the library sends the connect request to. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga29eee1be7eff749aeac3bab60d1b0405" name="ga29eee1be7eff749aeac3bab60d1b0405"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga29eee1be7eff749aeac3bab60d1b0405">&#9670;&#160;</a></span>stanConnOptions_SetMaxPubAcksInflight()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanConnOptions_SetMaxPubAcksInflight </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&#160;</td>
+          <td class="paramname"><em>maxPubAcksInflight</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">float&#160;</td>
+          <td class="paramname"><em>percentage</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >A connection will block <a class="el" href="group__stan_conn_pub_group.html#ga24f3f7f709b15fe53e1edaeead08fc7d" title="Publishes data on a channel.">stanConnection_Publish()</a> or <a class="el" href="group__stan_conn_pub_group.html#ga0c4d1e4615f8ac834f0a4021f75d39f0" title="Asynchronously publishes data on a channel.">stanConnection_PublishAsync</a> calls if the number of outstanding published messages has reached this number.</p>
+<p >When the connection receives ACKs, the number of outstanding messages will decrease. If the number falls between <code>maxPubAcksInflight * percentage</code>, then the blocked publish calls will be released.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1" title="Way to configure a stanConnection.">stanConnOptions</a> object. </td></tr>
+    <tr><td class="paramname">maxPubAcksInflight</td><td>the maximum number of published messages without ACKs from the server. </td></tr>
+    <tr><td class="paramname">percentage</td><td>the percentage (expressed as a float between ]0.0 and 1.0]) of the maxPubAcksInflight number below which a blocked publish call is released. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gad835223f08fbeae2a3c7a34d3fa1550b" name="gad835223f08fbeae2a3c7a34d3fa1550b"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gad835223f08fbeae2a3c7a34d3fa1550b">&#9670;&#160;</a></span>stanConnOptions_SetPings()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanConnOptions_SetPings </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&#160;</td>
+          <td class="paramname"><em>interval</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&#160;</td>
+          <td class="paramname"><em>maxOut</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Value expressed in number of seconds.</p>
+<p >Default is 5 seconds and 3 missed PONGs.</p>
+<p >The interval needs to be at least 1 and represents the number of seconds. The maxOut needs to be at least 2, since the count of sent PINGs increase whenever a PING is sent and reset to 0 when a response is received. Setting to 1 would cause the library to close the connection right away.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1" title="Way to configure a stanConnection.">stanConnOptions</a> object. </td></tr>
+    <tr><td class="paramname">interval</td><td>the number of seconds between each PING. </td></tr>
+    <tr><td class="paramname">maxOut</td><td>the maximum number of PINGs without receiving a PONG back. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga19ba15c8001aa835b261eea3a309e6d3" name="ga19ba15c8001aa835b261eea3a309e6d3"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga19ba15c8001aa835b261eea3a309e6d3">&#9670;&#160;</a></span>stanConnOptions_SetConnectionLostHandler()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanConnOptions_SetConnectionLostHandler </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__callbacks_group.html#gac34092f6c698374f86ad349302bdd55c">stanConnectionLostHandler</a>&#160;</td>
+          <td class="paramname"><em>handler</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">void *&#160;</td>
+          <td class="paramname"><em>closure</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This callback will be invoked should the client permanently lose contact with the server (or another client replaces it while being disconnected). The callback will not be invoked on normal <a class="el" href="group__stan_conn_mgt_group.html#ga4952a7f65a53fdb5ca1c26b1a1656f1d" title="Closes the connection.">stanConnection_Close()</a>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1" title="Way to configure a stanConnection.">stanConnOptions</a> object. </td></tr>
+    <tr><td class="paramname">handler</td><td>the handler to be invoked when the connection to the streaming server is lost. </td></tr>
+    <tr><td class="paramname">closure</td><td>the closure the library will pass to the callback. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga83fd0a29b136cbfb643be642eb2fa726" name="ga83fd0a29b136cbfb643be642eb2fa726"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga83fd0a29b136cbfb643be642eb2fa726">&#9670;&#160;</a></span>stanConnOptions_Destroy()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void stanConnOptions_Destroy </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Destroys the <a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1" title="Way to configure a stanConnection.">stanConnOptions</a> object, freeing used memory. See the note in the <a class="el" href="group__stan_conn_opts_group.html#gaff52a1ce90253b4bdbb0005fca4f71b6" title="Creates a stanConnOptions object.">stanConnOptions_Create()</a> call.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1" title="Way to configure a stanConnection.">stanConnOptions</a> object to destroy. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__stan_conn_opts_group.js b/doc/html/group__stan_conn_opts_group.js
new file mode 100644 (file)
index 0000000..7b3534c
--- /dev/null
@@ -0,0 +1,13 @@
+var group__stan_conn_opts_group =
+[
+    [ "stanConnOptions_Create", "group__stan_conn_opts_group.html#gaff52a1ce90253b4bdbb0005fca4f71b6", null ],
+    [ "stanConnOptions_SetURL", "group__stan_conn_opts_group.html#ga3c6d511fc1e1febcdf5344960de5a0b3", null ],
+    [ "stanConnOptions_SetNATSOptions", "group__stan_conn_opts_group.html#gae3fc9a4daa7f85367811a313857337b4", null ],
+    [ "stanConnOptions_SetConnectionWait", "group__stan_conn_opts_group.html#ga66c72c482696d9ceca71fced7cbb1264", null ],
+    [ "stanConnOptions_SetPubAckWait", "group__stan_conn_opts_group.html#ga36f2ee441562dcf619d6e020b823fc96", null ],
+    [ "stanConnOptions_SetDiscoveryPrefix", "group__stan_conn_opts_group.html#ga07105d1d00878bba19f47243b2c88402", null ],
+    [ "stanConnOptions_SetMaxPubAcksInflight", "group__stan_conn_opts_group.html#ga29eee1be7eff749aeac3bab60d1b0405", null ],
+    [ "stanConnOptions_SetPings", "group__stan_conn_opts_group.html#gad835223f08fbeae2a3c7a34d3fa1550b", null ],
+    [ "stanConnOptions_SetConnectionLostHandler", "group__stan_conn_opts_group.html#ga19ba15c8001aa835b261eea3a309e6d3", null ],
+    [ "stanConnOptions_Destroy", "group__stan_conn_opts_group.html#ga83fd0a29b136cbfb643be642eb2fa726", null ]
+];
\ No newline at end of file
diff --git a/doc/html/group__stan_conn_pub_group.html b/doc/html/group__stan_conn_pub_group.html
new file mode 100644 (file)
index 0000000..fc37ae4
--- /dev/null
@@ -0,0 +1,240 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Publishing</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__stan_conn_pub_group.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle"><div class="title">Publishing<div class="ingroups"><a class="el" href="group__func_group.html">Functions</a> &raquo; <a class="el" href="group__stan_conn_group.html">Streaming Connection</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:ga24f3f7f709b15fe53e1edaeead08fc7d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_pub_group.html#ga24f3f7f709b15fe53e1edaeead08fc7d">stanConnection_Publish</a> (<a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *sc, const char *channel, const void *data, int dataLen)</td></tr>
+<tr class="memdesc:ga24f3f7f709b15fe53e1edaeead08fc7d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Publishes data on a channel.  <a href="group__stan_conn_pub_group.html#ga24f3f7f709b15fe53e1edaeead08fc7d">More...</a><br /></td></tr>
+<tr class="separator:ga24f3f7f709b15fe53e1edaeead08fc7d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga0c4d1e4615f8ac834f0a4021f75d39f0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_pub_group.html#ga0c4d1e4615f8ac834f0a4021f75d39f0">stanConnection_PublishAsync</a> (<a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *sc, const char *channel, const void *data, int dataLen, <a class="el" href="group__callbacks_group.html#gad5d6a685731b3bf635995b7375af4d18">stanPubAckHandler</a> ah, void *ahClosure)</td></tr>
+<tr class="memdesc:ga0c4d1e4615f8ac834f0a4021f75d39f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Asynchronously publishes data on a channel.  <a href="group__stan_conn_pub_group.html#ga0c4d1e4615f8ac834f0a4021f75d39f0">More...</a><br /></td></tr>
+<tr class="separator:ga0c4d1e4615f8ac834f0a4021f75d39f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<p >Publishing functions </p>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="ga24f3f7f709b15fe53e1edaeead08fc7d" name="ga24f3f7f709b15fe53e1edaeead08fc7d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga24f3f7f709b15fe53e1edaeead08fc7d">&#9670;&#160;</a></span>stanConnection_Publish()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanConnection_Publish </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *&#160;</td>
+          <td class="paramname"><em>sc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>channel</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const void *&#160;</td>
+          <td class="paramname"><em>data</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&#160;</td>
+          <td class="paramname"><em>dataLen</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Publishes the data argument to the given channel. The data argument is left untouched and needs to be correctly interpreted on the receiver.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sc</td><td>the pointer to the <a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c" title="A connection to a NATS Streaming Server.">stanConnection</a> object. </td></tr>
+    <tr><td class="paramname">channel</td><td>the channel name the data is sent to. </td></tr>
+    <tr><td class="paramname">data</td><td>the data to be sent, can be <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">dataLen</td><td>the length of the data to be sent. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga0c4d1e4615f8ac834f0a4021f75d39f0" name="ga0c4d1e4615f8ac834f0a4021f75d39f0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga0c4d1e4615f8ac834f0a4021f75d39f0">&#9670;&#160;</a></span>stanConnection_PublishAsync()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanConnection_PublishAsync </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *&#160;</td>
+          <td class="paramname"><em>sc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>channel</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const void *&#160;</td>
+          <td class="paramname"><em>data</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&#160;</td>
+          <td class="paramname"><em>dataLen</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__callbacks_group.html#gad5d6a685731b3bf635995b7375af4d18">stanPubAckHandler</a>&#160;</td>
+          <td class="paramname"><em>ah</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">void *&#160;</td>
+          <td class="paramname"><em>ahClosure</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Publishes the data argument to the given channel. The data argument is left untouched and needs to be correctly interpreted on the receiver.</p>
+<p >This function does not wait for an acknowledgment back from the server. Instead, the library will invoke the provided callback when that acknowledgment comes.</p>
+<p >In order to correlate the acknowledgment with the published message, you can use the <code>ahClosure</code> since this will be passed to the <a class="el" href="group__callbacks_group.html#gad5d6a685731b3bf635995b7375af4d18" title="Callback used to notify of an asynchronous publish result.">stanPubAckHandler</a> on every invocation. In other words, you should use a unique closure for each published message.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+    <tr><td class="paramname">channel</td><td>the channel name the data is sent to. </td></tr>
+    <tr><td class="paramname">data</td><td>the data to be sent, can be <code>NULL</code>. </td></tr>
+    <tr><td class="paramname">dataLen</td><td>the length of the data to be sent. </td></tr>
+    <tr><td class="paramname">ah</td><td>the publish acknowledgment callback. If <code>NULL</code> the user will not be notified of the publish result. </td></tr>
+    <tr><td class="paramname">ahClosure</td><td>the closure the library will pass to the <code>ah</code> callback if one has been set. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__stan_conn_pub_group.js b/doc/html/group__stan_conn_pub_group.js
new file mode 100644 (file)
index 0000000..b15b00c
--- /dev/null
@@ -0,0 +1,5 @@
+var group__stan_conn_pub_group =
+[
+    [ "stanConnection_Publish", "group__stan_conn_pub_group.html#ga24f3f7f709b15fe53e1edaeead08fc7d", null ],
+    [ "stanConnection_PublishAsync", "group__stan_conn_pub_group.html#ga0c4d1e4615f8ac834f0a4021f75d39f0", null ]
+];
\ No newline at end of file
diff --git a/doc/html/group__stan_conn_sub_group.html b/doc/html/group__stan_conn_sub_group.html
new file mode 100644 (file)
index 0000000..f9af070
--- /dev/null
@@ -0,0 +1,261 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Subscribing</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__stan_conn_sub_group.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle"><div class="title">Subscribing<div class="ingroups"><a class="el" href="group__func_group.html">Functions</a> &raquo; <a class="el" href="group__stan_conn_group.html">Streaming Connection</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:gae545358fdc493baf6d29429a8156781f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_sub_group.html#gae545358fdc493baf6d29429a8156781f">stanConnection_Subscribe</a> (<a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a> **sub, <a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *sc, const char *channel, <a class="el" href="group__callbacks_group.html#gaf7456e37fa14f1834d9048d3789e9409">stanMsgHandler</a> cb, void *cbClosure, <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *options)</td></tr>
+<tr class="memdesc:gae545358fdc493baf6d29429a8156781f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a subscription.  <a href="group__stan_conn_sub_group.html#gae545358fdc493baf6d29429a8156781f">More...</a><br /></td></tr>
+<tr class="separator:gae545358fdc493baf6d29429a8156781f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga17d42bf9a4fa39470561a1a668e6b4a2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_sub_group.html#ga17d42bf9a4fa39470561a1a668e6b4a2">stanConnection_QueueSubscribe</a> (<a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a> **sub, <a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *sc, const char *channel, const char *queueGroup, <a class="el" href="group__callbacks_group.html#gaf7456e37fa14f1834d9048d3789e9409">stanMsgHandler</a> cb, void *cbClosure, <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *options)</td></tr>
+<tr class="memdesc:ga17d42bf9a4fa39470561a1a668e6b4a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a queue subscription.  <a href="group__stan_conn_sub_group.html#ga17d42bf9a4fa39470561a1a668e6b4a2">More...</a><br /></td></tr>
+<tr class="separator:ga17d42bf9a4fa39470561a1a668e6b4a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<p >Subscribing functions. </p>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="gae545358fdc493baf6d29429a8156781f" name="gae545358fdc493baf6d29429a8156781f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gae545358fdc493baf6d29429a8156781f">&#9670;&#160;</a></span>stanConnection_Subscribe()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanConnection_Subscribe </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a> **&#160;</td>
+          <td class="paramname"><em>sub</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *&#160;</td>
+          <td class="paramname"><em>sc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>channel</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__callbacks_group.html#gaf7456e37fa14f1834d9048d3789e9409">stanMsgHandler</a>&#160;</td>
+          <td class="paramname"><em>cb</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">void *&#160;</td>
+          <td class="paramname"><em>cbClosure</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *&#160;</td>
+          <td class="paramname"><em>options</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Expresses interest in the given subject. The subject can NOT have wildcards. Messages will be delivered to the associated <a class="el" href="group__callbacks_group.html#gaf7456e37fa14f1834d9048d3789e9409" title="Callback used to deliver messages to the application.">stanMsgHandler</a>.</p>
+<dl class="section warning"><dt>Warning</dt><dd>See warning about connecting to a NATS Server v2.2.0+ in <a class="el" href="group__stan_conn_mgt_group.html#ga35e0e6e5e3b7f3818a3ac3600efb8f8f" title="Connects to a NATS Streaming Server using the provided options.">stanConnection_Connect()</a>.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the location where to store the pointer to the newly created <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
+    <tr><td class="paramname">sc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+    <tr><td class="paramname">channel</td><td>the channel this subscription is created for. </td></tr>
+    <tr><td class="paramname">cb</td><td>the <a class="el" href="group__callbacks_group.html#gaf7456e37fa14f1834d9048d3789e9409" title="Callback used to deliver messages to the application.">stanMsgHandler</a> callback. </td></tr>
+    <tr><td class="paramname">cbClosure</td><td>a pointer to an user defined object (can be <code>NULL</code>). See the <a class="el" href="group__callbacks_group.html#gaf7456e37fa14f1834d9048d3789e9409" title="Callback used to deliver messages to the application.">stanMsgHandler</a> prototype. </td></tr>
+    <tr><td class="paramname">options</td><td>the optional to further configure the subscription. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga17d42bf9a4fa39470561a1a668e6b4a2" name="ga17d42bf9a4fa39470561a1a668e6b4a2"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga17d42bf9a4fa39470561a1a668e6b4a2">&#9670;&#160;</a></span>stanConnection_QueueSubscribe()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanConnection_QueueSubscribe </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a> **&#160;</td>
+          <td class="paramname"><em>sub</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *&#160;</td>
+          <td class="paramname"><em>sc</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>channel</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>queueGroup</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__callbacks_group.html#gaf7456e37fa14f1834d9048d3789e9409">stanMsgHandler</a>&#160;</td>
+          <td class="paramname"><em>cb</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">void *&#160;</td>
+          <td class="paramname"><em>cbClosure</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *&#160;</td>
+          <td class="paramname"><em>options</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Creates a queue subscriber on the given channel. All subscribers with the same queue name will form the queue group and only one member of the group will be selected to receive any given message asynchronously.</p>
+<dl class="section warning"><dt>Warning</dt><dd>See warning about connecting to a NATS Server v2.2.0+ in <a class="el" href="group__stan_conn_mgt_group.html#ga35e0e6e5e3b7f3818a3ac3600efb8f8f" title="Connects to a NATS Streaming Server using the provided options.">stanConnection_Connect()</a>.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the location where to store the pointer to the newly created <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
+    <tr><td class="paramname">sc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> object. </td></tr>
+    <tr><td class="paramname">channel</td><td>the channel name this subscription is created for. </td></tr>
+    <tr><td class="paramname">queueGroup</td><td>the name of the group. </td></tr>
+    <tr><td class="paramname">cb</td><td>the <a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe" title="Callback used to deliver messages to the application.">natsMsgHandler</a> callback. </td></tr>
+    <tr><td class="paramname">cbClosure</td><td>a pointer to an user defined object (can be <code>NULL</code>). See the <a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe" title="Callback used to deliver messages to the application.">natsMsgHandler</a> prototype. </td></tr>
+    <tr><td class="paramname">options</td><td>the optional options to further configure this queue subscription. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__stan_conn_sub_group.js b/doc/html/group__stan_conn_sub_group.js
new file mode 100644 (file)
index 0000000..7cb2a20
--- /dev/null
@@ -0,0 +1,5 @@
+var group__stan_conn_sub_group =
+[
+    [ "stanConnection_Subscribe", "group__stan_conn_sub_group.html#gae545358fdc493baf6d29429a8156781f", null ],
+    [ "stanConnection_QueueSubscribe", "group__stan_conn_sub_group.html#ga17d42bf9a4fa39470561a1a668e6b4a2", null ]
+];
\ No newline at end of file
diff --git a/doc/html/group__stan_msg_group.html b/doc/html/group__stan_msg_group.html
new file mode 100644 (file)
index 0000000..67ca69d
--- /dev/null
@@ -0,0 +1,288 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Streaming Message</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__stan_msg_group.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle"><div class="title">Streaming Message<div class="ingroups"><a class="el" href="group__func_group.html">Functions</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:ga98b66ff73447e1d7e329edbfcde782b5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_msg_group.html#ga98b66ff73447e1d7e329edbfcde782b5">stanMsg_GetSequence</a> (const <a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a> *msg)</td></tr>
+<tr class="memdesc:ga98b66ff73447e1d7e329edbfcde782b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the message's sequence number.  <a href="group__stan_msg_group.html#ga98b66ff73447e1d7e329edbfcde782b5">More...</a><br /></td></tr>
+<tr class="separator:ga98b66ff73447e1d7e329edbfcde782b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2fa524b11e9621cf46ca9b1a3ca66452"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_msg_group.html#ga2fa524b11e9621cf46ca9b1a3ca66452">stanMsg_GetTimestamp</a> (const <a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a> *msg)</td></tr>
+<tr class="memdesc:ga2fa524b11e9621cf46ca9b1a3ca66452"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the message's timestamp.  <a href="group__stan_msg_group.html#ga2fa524b11e9621cf46ca9b1a3ca66452">More...</a><br /></td></tr>
+<tr class="separator:ga2fa524b11e9621cf46ca9b1a3ca66452"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga8e537d014b89d9d7da7906b2ee75d5c0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_msg_group.html#ga8e537d014b89d9d7da7906b2ee75d5c0">stanMsg_IsRedelivered</a> (const <a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a> *msg)</td></tr>
+<tr class="memdesc:ga8e537d014b89d9d7da7906b2ee75d5c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the message's redelivered flag.  <a href="group__stan_msg_group.html#ga8e537d014b89d9d7da7906b2ee75d5c0">More...</a><br /></td></tr>
+<tr class="separator:ga8e537d014b89d9d7da7906b2ee75d5c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2f27fbfb79a46c52e079f670c59e1260"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_msg_group.html#ga2f27fbfb79a46c52e079f670c59e1260">stanMsg_GetData</a> (const <a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a> *msg)</td></tr>
+<tr class="memdesc:ga2f27fbfb79a46c52e079f670c59e1260"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the message payload.  <a href="group__stan_msg_group.html#ga2f27fbfb79a46c52e079f670c59e1260">More...</a><br /></td></tr>
+<tr class="separator:ga2f27fbfb79a46c52e079f670c59e1260"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga7d1e394a686bc25ab7376b7f28b9e777"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_msg_group.html#ga7d1e394a686bc25ab7376b7f28b9e777">stanMsg_GetDataLength</a> (const <a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a> *msg)</td></tr>
+<tr class="memdesc:ga7d1e394a686bc25ab7376b7f28b9e777"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the message length.  <a href="group__stan_msg_group.html#ga7d1e394a686bc25ab7376b7f28b9e777">More...</a><br /></td></tr>
+<tr class="separator:ga7d1e394a686bc25ab7376b7f28b9e777"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gacd0059fb499963f5b2eae18053e5f74f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_msg_group.html#gacd0059fb499963f5b2eae18053e5f74f">stanMsg_Destroy</a> (<a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a> *msg)</td></tr>
+<tr class="memdesc:gacd0059fb499963f5b2eae18053e5f74f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the message object.  <a href="group__stan_msg_group.html#gacd0059fb499963f5b2eae18053e5f74f">More...</a><br /></td></tr>
+<tr class="separator:gacd0059fb499963f5b2eae18053e5f74f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<p >NATS Streaming Message. </p>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="ga98b66ff73447e1d7e329edbfcde782b5" name="ga98b66ff73447e1d7e329edbfcde782b5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga98b66ff73447e1d7e329edbfcde782b5">&#9670;&#160;</a></span>stanMsg_GetSequence()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> uint64_t stanMsg_GetSequence </td>
+          <td>(</td>
+          <td class="paramtype">const <a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a> *&#160;</td>
+          <td class="paramname"><em>msg</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the message's sequence number (as assigned by the cluster).</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">msg</td><td>the pointer to the <a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d" title="The Streaming message.">stanMsg</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga2fa524b11e9621cf46ca9b1a3ca66452" name="ga2fa524b11e9621cf46ca9b1a3ca66452"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga2fa524b11e9621cf46ca9b1a3ca66452">&#9670;&#160;</a></span>stanMsg_GetTimestamp()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t stanMsg_GetTimestamp </td>
+          <td>(</td>
+          <td class="paramtype">const <a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a> *&#160;</td>
+          <td class="paramname"><em>msg</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the message's timestamp (as assigned by the cluster).</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">msg</td><td>the pointer to the <a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d" title="The Streaming message.">stanMsg</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga8e537d014b89d9d7da7906b2ee75d5c0" name="ga8e537d014b89d9d7da7906b2ee75d5c0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga8e537d014b89d9d7da7906b2ee75d5c0">&#9670;&#160;</a></span>stanMsg_IsRedelivered()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> bool stanMsg_IsRedelivered </td>
+          <td>(</td>
+          <td class="paramtype">const <a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a> *&#160;</td>
+          <td class="paramname"><em>msg</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the message's redelivered flag. This can help detect if this message is a possible duplicate (due to redelivery and at-least-once semantic).</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">msg</td><td>the pointer to the <a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d" title="The Streaming message.">stanMsg</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga2f27fbfb79a46c52e079f670c59e1260" name="ga2f27fbfb79a46c52e079f670c59e1260"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga2f27fbfb79a46c52e079f670c59e1260">&#9670;&#160;</a></span>stanMsg_GetData()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char * stanMsg_GetData </td>
+          <td>(</td>
+          <td class="paramtype">const <a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a> *&#160;</td>
+          <td class="paramname"><em>msg</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the message payload, possibly <code>NULL</code>.</p>
+<p >Note that although the data sent and received from the server is not <code>NULL</code> terminated, the NATS C Client does add a <code>NULL</code> byte to the received payload. If you expect the received data to be a "string", then this conveniently allows you to call <a class="el" href="group__stan_msg_group.html#ga2f27fbfb79a46c52e079f670c59e1260" title="Returns the message payload.">stanMsg_GetData()</a> without having to copy the returned data to a buffer to add the <code>NULL</code> byte at the end.</p>
+<dl class="section warning"><dt>Warning</dt><dd>The string belongs to the message and must not be freed. Copy it if needed.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">msg</td><td>the pointer to the <a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d" title="The Streaming message.">stanMsg</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga7d1e394a686bc25ab7376b7f28b9e777" name="ga7d1e394a686bc25ab7376b7f28b9e777"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga7d1e394a686bc25ab7376b7f28b9e777">&#9670;&#160;</a></span>stanMsg_GetDataLength()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int stanMsg_GetDataLength </td>
+          <td>(</td>
+          <td class="paramtype">const <a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a> *&#160;</td>
+          <td class="paramname"><em>msg</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the message's payload length, possibly 0.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">msg</td><td>the pointer to the <a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d" title="The Streaming message.">stanMsg</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gacd0059fb499963f5b2eae18053e5f74f" name="gacd0059fb499963f5b2eae18053e5f74f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gacd0059fb499963f5b2eae18053e5f74f">&#9670;&#160;</a></span>stanMsg_Destroy()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void stanMsg_Destroy </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a> *&#160;</td>
+          <td class="paramname"><em>msg</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Destroys the message, freeing memory.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">msg</td><td>the pointer to the <a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d" title="The Streaming message.">stanMsg</a> object to destroy. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__stan_msg_group.js b/doc/html/group__stan_msg_group.js
new file mode 100644 (file)
index 0000000..12ebb91
--- /dev/null
@@ -0,0 +1,9 @@
+var group__stan_msg_group =
+[
+    [ "stanMsg_GetSequence", "group__stan_msg_group.html#ga98b66ff73447e1d7e329edbfcde782b5", null ],
+    [ "stanMsg_GetTimestamp", "group__stan_msg_group.html#ga2fa524b11e9621cf46ca9b1a3ca66452", null ],
+    [ "stanMsg_IsRedelivered", "group__stan_msg_group.html#ga8e537d014b89d9d7da7906b2ee75d5c0", null ],
+    [ "stanMsg_GetData", "group__stan_msg_group.html#ga2f27fbfb79a46c52e079f670c59e1260", null ],
+    [ "stanMsg_GetDataLength", "group__stan_msg_group.html#ga7d1e394a686bc25ab7376b7f28b9e777", null ],
+    [ "stanMsg_Destroy", "group__stan_msg_group.html#gacd0059fb499963f5b2eae18053e5f74f", null ]
+];
\ No newline at end of file
diff --git a/doc/html/group__stan_sub_group.html b/doc/html/group__stan_sub_group.html
new file mode 100644 (file)
index 0000000..a13dc9d
--- /dev/null
@@ -0,0 +1,295 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Streaming Subscription</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__stan_sub_group.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle"><div class="title">Streaming Subscription<div class="ingroups"><a class="el" href="group__func_group.html">Functions</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:ga7b039908ec45cfc2c16ec61ba8daca9d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_group.html#ga7b039908ec45cfc2c16ec61ba8daca9d">stanSubscription_SetOnCompleteCB</a> (<a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a> *sub, <a class="el" href="group__callbacks_group.html#ga245131e64f1d0dff7edc8ed874a07e9a">natsOnCompleteCB</a> cb, void *closure)</td></tr>
+<tr class="memdesc:ga7b039908ec45cfc2c16ec61ba8daca9d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets a completion callback.  <a href="group__stan_sub_group.html#ga7b039908ec45cfc2c16ec61ba8daca9d">More...</a><br /></td></tr>
+<tr class="separator:ga7b039908ec45cfc2c16ec61ba8daca9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga3a1cca9fa3ea54fcf7a43fd1335a26d3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_group.html#ga3a1cca9fa3ea54fcf7a43fd1335a26d3">stanSubscription_AckMsg</a> (<a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a> *sub, <a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a> *msg)</td></tr>
+<tr class="memdesc:ga3a1cca9fa3ea54fcf7a43fd1335a26d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Acknowledge a message.  <a href="group__stan_sub_group.html#ga3a1cca9fa3ea54fcf7a43fd1335a26d3">More...</a><br /></td></tr>
+<tr class="separator:ga3a1cca9fa3ea54fcf7a43fd1335a26d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gafa428a7e0f6800216cb06fd738bd235e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_group.html#gafa428a7e0f6800216cb06fd738bd235e">stanSubscription_Unsubscribe</a> (<a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a> *sub)</td></tr>
+<tr class="memdesc:gafa428a7e0f6800216cb06fd738bd235e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Permanently remove a subscription.  <a href="group__stan_sub_group.html#gafa428a7e0f6800216cb06fd738bd235e">More...</a><br /></td></tr>
+<tr class="separator:gafa428a7e0f6800216cb06fd738bd235e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gacfa3a7b4fa333c84acfa7521fbbb5bcc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_group.html#gacfa3a7b4fa333c84acfa7521fbbb5bcc">stanSubscription_Close</a> (<a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a> *sub)</td></tr>
+<tr class="memdesc:gacfa3a7b4fa333c84acfa7521fbbb5bcc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Closes the subscription.  <a href="group__stan_sub_group.html#gacfa3a7b4fa333c84acfa7521fbbb5bcc">More...</a><br /></td></tr>
+<tr class="separator:gacfa3a7b4fa333c84acfa7521fbbb5bcc"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga3f6ce924f6a1830a55e30e9910aad4ba"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_group.html#ga3f6ce924f6a1830a55e30e9910aad4ba">stanSubscription_Destroy</a> (<a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a> *sub)</td></tr>
+<tr class="memdesc:ga3f6ce924f6a1830a55e30e9910aad4ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the subscription.  <a href="group__stan_sub_group.html#ga3f6ce924f6a1830a55e30e9910aad4ba">More...</a><br /></td></tr>
+<tr class="separator:ga3f6ce924f6a1830a55e30e9910aad4ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<p >NATS Streaming Subscriptions. </p>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="ga7b039908ec45cfc2c16ec61ba8daca9d" name="ga7b039908ec45cfc2c16ec61ba8daca9d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga7b039908ec45cfc2c16ec61ba8daca9d">&#9670;&#160;</a></span>stanSubscription_SetOnCompleteCB()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanSubscription_SetOnCompleteCB </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a> *&#160;</td>
+          <td class="paramname"><em>sub</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__callbacks_group.html#ga245131e64f1d0dff7edc8ed874a07e9a">natsOnCompleteCB</a>&#160;</td>
+          <td class="paramname"><em>cb</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">void *&#160;</td>
+          <td class="paramname"><em>closure</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >In order to make sure that an asynchronous subscription's message handler is no longer invoked once the subscription is closed (or unsubscribed) (<a class="el" href="group__stan_sub_group.html#gacfa3a7b4fa333c84acfa7521fbbb5bcc" title="Closes the subscription.">stanSubscription_Close</a>, <a class="el" href="group__stan_sub_group.html#gafa428a7e0f6800216cb06fd738bd235e" title="Permanently remove a subscription.">stanSubscription_Unsubscribe</a>), the subscription should be closed from the message handler itslef.</p>
+<p >If the application closes the subscription from a different thread and immediately frees resources needed in the message handler, there is a risk of a crash since the subscription's message handler may still be invoked one last time or already in the process of executing.</p>
+<p >To address this, the user can set a callback that will be invoked after the subscription is closed and the message handler has returned.</p>
+<dl class="section note"><dt>Note</dt><dd>You don't need to call this function if you are not freeing resources needed in the message handler or if you always close the subscription from the message handler itself.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__callbacks_group.html#ga245131e64f1d0dff7edc8ed874a07e9a" title="Callback used to notify that an object lifecycle is complete.">natsOnCompleteCB</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5" title="Interest on a given channel.">stanSubscription</a> object </td></tr>
+    <tr><td class="paramname">cb</td><td>the callback to invoke when the last message of a closed subscription has been dispatched </td></tr>
+    <tr><td class="paramname">closure</td><td>the pointer to a user defined object (possibly <code>NULL</code>) that will be passed to the callback </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga3a1cca9fa3ea54fcf7a43fd1335a26d3" name="ga3a1cca9fa3ea54fcf7a43fd1335a26d3"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga3a1cca9fa3ea54fcf7a43fd1335a26d3">&#9670;&#160;</a></span>stanSubscription_AckMsg()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanSubscription_AckMsg </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a> *&#160;</td>
+          <td class="paramname"><em>sub</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a> *&#160;</td>
+          <td class="paramname"><em>msg</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >If the subscription is created with manual acknowledgment mode (see <a class="el" href="group__stan_sub_opts_group.html#ga6f49ae2629e49d2bfa35990cf030bf83" title="Sets the subscription&#39;s acknowledgment mode.">stanSubOptions_SetManualAckMode</a>) then it is the user responsibility to acknowledge received messages when appropriate.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5" title="Interest on a given channel.">stanSubscription</a> object. </td></tr>
+    <tr><td class="paramname">msg</td><td>the message to acknowledge. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gafa428a7e0f6800216cb06fd738bd235e" name="gafa428a7e0f6800216cb06fd738bd235e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gafa428a7e0f6800216cb06fd738bd235e">&#9670;&#160;</a></span>stanSubscription_Unsubscribe()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanSubscription_Unsubscribe </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a> *&#160;</td>
+          <td class="paramname"><em>sub</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Removes interest on the channel. The subscription may still have a callback in progress, in that case, the subscription will still be valid until the callback returns.</p>
+<p >For non-durable subscriptions, <a class="el" href="group__stan_sub_group.html#gafa428a7e0f6800216cb06fd738bd235e" title="Permanently remove a subscription.">stanSubscription_Unsubscribe</a> and <a class="el" href="group__stan_sub_group.html#gacfa3a7b4fa333c84acfa7521fbbb5bcc" title="Closes the subscription.">stanSubscription_Close</a> have the same effect.</p>
+<p >For durable subscriptions, calling this function causes the server to remove the durable subscription (instead of simply suspending it). It means that once this call is made, calling <a class="el" href="group__stan_conn_sub_group.html#gae545358fdc493baf6d29429a8156781f" title="Creates a subscription.">stanConnection_Subscribe()</a> with the same durable name creates a brand new durable subscription, instead of simply resuming delivery.</p>
+<dl class="section warning"><dt>Warning</dt><dd>See warning about connecting to a NATS Server v2.2.0+ in <a class="el" href="group__stan_conn_mgt_group.html#ga35e0e6e5e3b7f3818a3ac3600efb8f8f" title="Connects to a NATS Streaming Server using the provided options.">stanConnection_Connect()</a>.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5" title="Interest on a given channel.">stanSubscription</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gacfa3a7b4fa333c84acfa7521fbbb5bcc" name="gacfa3a7b4fa333c84acfa7521fbbb5bcc"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gacfa3a7b4fa333c84acfa7521fbbb5bcc">&#9670;&#160;</a></span>stanSubscription_Close()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanSubscription_Close </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a> *&#160;</td>
+          <td class="paramname"><em>sub</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Similar to <a class="el" href="group__stan_sub_group.html#gafa428a7e0f6800216cb06fd738bd235e" title="Permanently remove a subscription.">stanSubscription_Unsubscribe()</a> except that durable interest is not removed in the server. The durable subscription can therefore be resumed.</p>
+<dl class="section warning"><dt>Warning</dt><dd>See warning about connecting to a NATS Server v2.2.0+ in <a class="el" href="group__stan_conn_mgt_group.html#ga35e0e6e5e3b7f3818a3ac3600efb8f8f" title="Connects to a NATS Streaming Server using the provided options.">stanConnection_Connect()</a>.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5" title="Interest on a given channel.">stanSubscription</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga3f6ce924f6a1830a55e30e9910aad4ba" name="ga3f6ce924f6a1830a55e30e9910aad4ba"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga3f6ce924f6a1830a55e30e9910aad4ba">&#9670;&#160;</a></span>stanSubscription_Destroy()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void stanSubscription_Destroy </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a> *&#160;</td>
+          <td class="paramname"><em>sub</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Destroys the subscription object, freeing up memory. If not already done, this call will removes interest on the subject.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5" title="Interest on a given channel.">stanSubscription</a> object to destroy. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__stan_sub_group.js b/doc/html/group__stan_sub_group.js
new file mode 100644 (file)
index 0000000..2f6dee8
--- /dev/null
@@ -0,0 +1,8 @@
+var group__stan_sub_group =
+[
+    [ "stanSubscription_SetOnCompleteCB", "group__stan_sub_group.html#ga7b039908ec45cfc2c16ec61ba8daca9d", null ],
+    [ "stanSubscription_AckMsg", "group__stan_sub_group.html#ga3a1cca9fa3ea54fcf7a43fd1335a26d3", null ],
+    [ "stanSubscription_Unsubscribe", "group__stan_sub_group.html#gafa428a7e0f6800216cb06fd738bd235e", null ],
+    [ "stanSubscription_Close", "group__stan_sub_group.html#gacfa3a7b4fa333c84acfa7521fbbb5bcc", null ],
+    [ "stanSubscription_Destroy", "group__stan_sub_group.html#ga3f6ce924f6a1830a55e30e9910aad4ba", null ]
+];
\ No newline at end of file
diff --git a/doc/html/group__stan_sub_opts_group.html b/doc/html/group__stan_sub_opts_group.html
new file mode 100644 (file)
index 0000000..a494ece
--- /dev/null
@@ -0,0 +1,522 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Streaming Subscription Options</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__stan_sub_opts_group.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle"><div class="title">Streaming Subscription Options<div class="ingroups"><a class="el" href="group__func_group.html">Functions</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:gad87a2cef4f4ddf64696f9864773c37cf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_opts_group.html#gad87a2cef4f4ddf64696f9864773c37cf">stanSubOptions_Create</a> (<a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> **newOpts)</td></tr>
+<tr class="memdesc:gad87a2cef4f4ddf64696f9864773c37cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3" title="Way to configure a stanSubscription.">stanSubOptions</a> object.  <a href="group__stan_sub_opts_group.html#gad87a2cef4f4ddf64696f9864773c37cf">More...</a><br /></td></tr>
+<tr class="separator:gad87a2cef4f4ddf64696f9864773c37cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaa018bceba99ef3726157e87c6918ab14"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_opts_group.html#gaa018bceba99ef3726157e87c6918ab14">stanSubOptions_SetDurableName</a> (<a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts, const char *durableName)</td></tr>
+<tr class="memdesc:gaa018bceba99ef3726157e87c6918ab14"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the Durable Name for this subscription.  <a href="group__stan_sub_opts_group.html#gaa018bceba99ef3726157e87c6918ab14">More...</a><br /></td></tr>
+<tr class="separator:gaa018bceba99ef3726157e87c6918ab14"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gafbb4e6c74978c4e8f30f016c20cc2bdf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_opts_group.html#gafbb4e6c74978c4e8f30f016c20cc2bdf">stanSubOptions_SetAckWait</a> (<a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts, int64_t wait)</td></tr>
+<tr class="memdesc:gafbb4e6c74978c4e8f30f016c20cc2bdf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the timeout for waiting for an ACK from the cluster's point of view for delivered messages.  <a href="group__stan_sub_opts_group.html#gafbb4e6c74978c4e8f30f016c20cc2bdf">More...</a><br /></td></tr>
+<tr class="separator:gafbb4e6c74978c4e8f30f016c20cc2bdf"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga35efbdea888e00440c500845064931c0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_opts_group.html#ga35efbdea888e00440c500845064931c0">stanSubOptions_SetMaxInflight</a> (<a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts, int maxInflight)</td></tr>
+<tr class="memdesc:ga35efbdea888e00440c500845064931c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the the maximum number of messages the cluster will send without an ACK.  <a href="group__stan_sub_opts_group.html#ga35efbdea888e00440c500845064931c0">More...</a><br /></td></tr>
+<tr class="separator:ga35efbdea888e00440c500845064931c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga6cb7f6e1ac697d16959f9042eeb84dc1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_opts_group.html#ga6cb7f6e1ac697d16959f9042eeb84dc1">stanSubOptions_StartAtSequence</a> (<a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts, uint64_t seq)</td></tr>
+<tr class="memdesc:ga6cb7f6e1ac697d16959f9042eeb84dc1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the desired start position based on the given sequence number.  <a href="group__stan_sub_opts_group.html#ga6cb7f6e1ac697d16959f9042eeb84dc1">More...</a><br /></td></tr>
+<tr class="separator:ga6cb7f6e1ac697d16959f9042eeb84dc1"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaafd7a553486eea3c9d309da0744a3608"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_opts_group.html#gaafd7a553486eea3c9d309da0744a3608">stanSubOptions_StartAtTime</a> (<a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts, int64_t time)</td></tr>
+<tr class="memdesc:gaafd7a553486eea3c9d309da0744a3608"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the desired start position based on the given time.  <a href="group__stan_sub_opts_group.html#gaafd7a553486eea3c9d309da0744a3608">More...</a><br /></td></tr>
+<tr class="separator:gaafd7a553486eea3c9d309da0744a3608"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga27d9175901997b8468997019746599b5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_opts_group.html#ga27d9175901997b8468997019746599b5">stanSubOptions_StartAtTimeDelta</a> (<a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts, int64_t delta)</td></tr>
+<tr class="memdesc:ga27d9175901997b8468997019746599b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the desired start position based on the given delta.  <a href="group__stan_sub_opts_group.html#ga27d9175901997b8468997019746599b5">More...</a><br /></td></tr>
+<tr class="separator:ga27d9175901997b8468997019746599b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga856a74e31f3307faf988747c1f88717c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_opts_group.html#ga856a74e31f3307faf988747c1f88717c">stanSubOptions_StartWithLastReceived</a> (<a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts)</td></tr>
+<tr class="memdesc:ga856a74e31f3307faf988747c1f88717c"><td class="mdescLeft">&#160;</td><td class="mdescRight">The subscription should start with the last message in the channel.  <a href="group__stan_sub_opts_group.html#ga856a74e31f3307faf988747c1f88717c">More...</a><br /></td></tr>
+<tr class="separator:ga856a74e31f3307faf988747c1f88717c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gab09b81358e93199a4631eb06f1ec179f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_opts_group.html#gab09b81358e93199a4631eb06f1ec179f">stanSubOptions_DeliverAllAvailable</a> (<a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts)</td></tr>
+<tr class="memdesc:gab09b81358e93199a4631eb06f1ec179f"><td class="mdescLeft">&#160;</td><td class="mdescRight">The subscription should start with the first message in the channel.  <a href="group__stan_sub_opts_group.html#gab09b81358e93199a4631eb06f1ec179f">More...</a><br /></td></tr>
+<tr class="separator:gab09b81358e93199a4631eb06f1ec179f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga6f49ae2629e49d2bfa35990cf030bf83"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_opts_group.html#ga6f49ae2629e49d2bfa35990cf030bf83">stanSubOptions_SetManualAckMode</a> (<a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts, bool manual)</td></tr>
+<tr class="memdesc:ga6f49ae2629e49d2bfa35990cf030bf83"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the subscription's acknowledgment mode.  <a href="group__stan_sub_opts_group.html#ga6f49ae2629e49d2bfa35990cf030bf83">More...</a><br /></td></tr>
+<tr class="separator:ga6f49ae2629e49d2bfa35990cf030bf83"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga1b56877d0a6729e148c9c288e2b88e3f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_opts_group.html#ga1b56877d0a6729e148c9c288e2b88e3f">stanSubOptions_Destroy</a> (<a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts)</td></tr>
+<tr class="memdesc:ga1b56877d0a6729e148c9c288e2b88e3f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys a <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3" title="Way to configure a stanSubscription.">stanSubOptions</a> object.  <a href="group__stan_sub_opts_group.html#ga1b56877d0a6729e148c9c288e2b88e3f">More...</a><br /></td></tr>
+<tr class="separator:ga1b56877d0a6729e148c9c288e2b88e3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<p >NATS Streaming Subscription Options. </p>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="gad87a2cef4f4ddf64696f9864773c37cf" name="gad87a2cef4f4ddf64696f9864773c37cf"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gad87a2cef4f4ddf64696f9864773c37cf">&#9670;&#160;</a></span>stanSubOptions_Create()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanSubOptions_Create </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> **&#160;</td>
+          <td class="paramname"><em>newOpts</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Creates a <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3" title="Way to configure a stanSubscription.">stanSubOptions</a> object. This object is used when one wants to set specific options prior to create a subscription.</p>
+<p >After making the appropriate <code>stanSubOptions_SetXXX()</code> calls, this object is passed to the <a class="el" href="group__stan_conn_sub_group.html#gae545358fdc493baf6d29429a8156781f" title="Creates a subscription.">stanConnection_Subscribe()</a> or <a class="el" href="group__stan_conn_sub_group.html#ga17d42bf9a4fa39470561a1a668e6b4a2" title="Creates a queue subscription.">stanConnection_QueueSubscribe()</a> call, which will clone this object. It means that modifications to the options object will not affect the created subscription.</p>
+<p >The default options set in this call are: ackWait: 30000 milliseconds (30 seconds) maxIinflight: 1024 start position: new only</p>
+<dl class="section note"><dt>Note</dt><dd>The object needs to be destroyed when no longer needed.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__stan_conn_sub_group.html#gae545358fdc493baf6d29429a8156781f" title="Creates a subscription.">stanConnection_Subscribe()</a> </dd>
+<dd>
+<a class="el" href="group__stan_conn_sub_group.html#ga17d42bf9a4fa39470561a1a668e6b4a2" title="Creates a queue subscription.">stanConnection_QueueSubscribe()</a> </dd>
+<dd>
+<a class="el" href="group__stan_sub_opts_group.html#ga1b56877d0a6729e148c9c288e2b88e3f" title="Destroys a stanSubOptions object.">stanSubOptions_Destroy()</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">newOpts</td><td>the location where store the pointer to the newly created <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3" title="Way to configure a stanSubscription.">stanSubOptions</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gaa018bceba99ef3726157e87c6918ab14" name="gaa018bceba99ef3726157e87c6918ab14"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaa018bceba99ef3726157e87c6918ab14">&#9670;&#160;</a></span>stanSubOptions_SetDurableName()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanSubOptions_SetDurableName </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname"><em>durableName</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >If a durable name is set, this subscription will be durable. It means that if the application stops and re-create the same subscription with the same connection client ID and durable name (or simply durable name for queue subscriptions), then the server will resume (re)delivery of messages from the last known position in the steam for that durable.</p>
+<p >It means that the start position, if provided, is used only when the durable subscription is first created, then is ignored by the server for the rest of the durable subscription lifetime.</p>
+<dl class="section note"><dt>Note</dt><dd>Durable names should be alphanumeric and not contain the character <code>:</code>.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3" title="Way to configure a stanSubscription.">stanSubOptions</a> object. </td></tr>
+    <tr><td class="paramname">durableName</td><td>the string representing the name of the durable subscription. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gafbb4e6c74978c4e8f30f016c20cc2bdf" name="gafbb4e6c74978c4e8f30f016c20cc2bdf"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gafbb4e6c74978c4e8f30f016c20cc2bdf">&#9670;&#160;</a></span>stanSubOptions_SetAckWait()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanSubOptions_SetAckWait </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int64_t&#160;</td>
+          <td class="paramname"><em>wait</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Value expressed in milliseconds.</p>
+<p >Default is 30000 milliseconds (30 seconds).</p>
+<p >If the server does not receive an acknowledgment from the subscription for a delivered message after this amount of time, the server will re-deliver the unacknowledged message.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3" title="Way to configure a stanSubscription.">stanSubOptions</a> object. </td></tr>
+    <tr><td class="paramname">wait</td><td>how long the server will wait for an acknowledgment from the subscription. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga35efbdea888e00440c500845064931c0" name="ga35efbdea888e00440c500845064931c0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga35efbdea888e00440c500845064931c0">&#9670;&#160;</a></span>stanSubOptions_SetMaxInflight()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanSubOptions_SetMaxInflight </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&#160;</td>
+          <td class="paramname"><em>maxInflight</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Default is 1024.</p>
+<p >If a subscription receives messages but does not acknowledge them, the server will stop sending new messages when it reaches this number. Unacknowledged messages are re-delivered regardless of that setting.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3" title="Way to configure a stanSubscription.">stanSubOptions</a> object. </td></tr>
+    <tr><td class="paramname">maxInflight</td><td>the maximum number of messages the subscription will receive without sending back ACKs. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga6cb7f6e1ac697d16959f9042eeb84dc1" name="ga6cb7f6e1ac697d16959f9042eeb84dc1"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga6cb7f6e1ac697d16959f9042eeb84dc1">&#9670;&#160;</a></span>stanSubOptions_StartAtSequence()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanSubOptions_StartAtSequence </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">uint64_t&#160;</td>
+          <td class="paramname"><em>seq</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This allows the subscription to start at a specific sequence number in the channel's message log.</p>
+<p >If the sequence is smaller than the first available message in the message log (old messages dropped due to channel limits), the subscription will be created with the first available sequence.</p>
+<p >Conversely, if the given sequence is higher than the currently last sequence number, the subscription will receive only new published messages.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3" title="Way to configure a stanSubscription.">stanSubOptions</a> object. </td></tr>
+    <tr><td class="paramname">seq</td><td>the starting sequence. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gaafd7a553486eea3c9d309da0744a3608" name="gaafd7a553486eea3c9d309da0744a3608"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaafd7a553486eea3c9d309da0744a3608">&#9670;&#160;</a></span>stanSubOptions_StartAtTime()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanSubOptions_StartAtTime </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int64_t&#160;</td>
+          <td class="paramname"><em>time</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >When the subscription is created, the server will send messages starting with the message which timestamp is at least the given time. The time is expressed in number of milliseconds since the EPOCH, as given by <a class="el" href="group__library_group.html#gaa3c10ba3ae001595007ad0dc5dccc15e" title="Gives the current time in milliseconds.">nats_Now()</a> for instance.</p>
+<p >If the time is in the past and the most recent message's timestamp is older than the given time, or if the time is in the future, the subscription will receive only new messages.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3" title="Way to configure a stanSubscription.">stanSubOptions</a> object. </td></tr>
+    <tr><td class="paramname">time</td><td>the start time, expressed in milliseconds since the EPOCH. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga27d9175901997b8468997019746599b5" name="ga27d9175901997b8468997019746599b5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga27d9175901997b8468997019746599b5">&#9670;&#160;</a></span>stanSubOptions_StartAtTimeDelta()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanSubOptions_StartAtTimeDelta </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int64_t&#160;</td>
+          <td class="paramname"><em>delta</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >When the subscription is created, the server will send messages starting with the message which timestamp is at least now minus <code>delta</code>. In other words, this means start receiving messages that were sent n milliseconds ago.</p>
+<p >The delta is expressed in milliseconds.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3" title="Way to configure a stanSubscription.">stanSubOptions</a> object. </td></tr>
+    <tr><td class="paramname">delta</td><td>he historical time delta (from now) from which to start receiving messages. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga856a74e31f3307faf988747c1f88717c" name="ga856a74e31f3307faf988747c1f88717c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga856a74e31f3307faf988747c1f88717c">&#9670;&#160;</a></span>stanSubOptions_StartWithLastReceived()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanSubOptions_StartWithLastReceived </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >When the subscription is created, the server will start sending messages starting with the last message currently in the channel message's log. The subscription will then receive any new published message.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3" title="Way to configure a stanSubscription.">stanSubOptions</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gab09b81358e93199a4631eb06f1ec179f" name="gab09b81358e93199a4631eb06f1ec179f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gab09b81358e93199a4631eb06f1ec179f">&#9670;&#160;</a></span>stanSubOptions_DeliverAllAvailable()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanSubOptions_DeliverAllAvailable </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >When the subscription is created, the server will start sending messages starting with the first message currently in the channel message's log.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3" title="Way to configure a stanSubscription.">stanSubOptions</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga6f49ae2629e49d2bfa35990cf030bf83" name="ga6f49ae2629e49d2bfa35990cf030bf83"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga6f49ae2629e49d2bfa35990cf030bf83">&#9670;&#160;</a></span>stanSubOptions_SetManualAckMode()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> stanSubOptions_SetManualAckMode </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">bool&#160;</td>
+          <td class="paramname"><em>manual</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >By default, a subscription will automatically send a message acknowledgment after the <a class="el" href="group__callbacks_group.html#gaf7456e37fa14f1834d9048d3789e9409" title="Callback used to deliver messages to the application.">stanMsgHandler</a> callback returns.</p>
+<p >In order to control when the acknowledgment is sent, set the acknowledgment mode to <code>manual</code> and call <a class="el" href="group__stan_sub_group.html#ga3a1cca9fa3ea54fcf7a43fd1335a26d3" title="Acknowledge a message.">stanSubscription_AckMsg()</a>.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__stan_sub_group.html#ga3a1cca9fa3ea54fcf7a43fd1335a26d3" title="Acknowledge a message.">stanSubscription_AckMsg()</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3" title="Way to configure a stanSubscription.">stanSubOptions</a> object. </td></tr>
+    <tr><td class="paramname">manual</td><td>a boolean indicating if the subscription should auto-acknowledge or if the user will. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga1b56877d0a6729e148c9c288e2b88e3f" name="ga1b56877d0a6729e148c9c288e2b88e3f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga1b56877d0a6729e148c9c288e2b88e3f">&#9670;&#160;</a></span>stanSubOptions_Destroy()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void stanSubOptions_Destroy </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *&#160;</td>
+          <td class="paramname"><em>opts</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Destroys the <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3" title="Way to configure a stanSubscription.">stanSubOptions</a> object, freeing used memory. See the note in the <a class="el" href="group__stan_sub_opts_group.html#gad87a2cef4f4ddf64696f9864773c37cf" title="Creates a stanSubOptions object.">stanSubOptions_Create()</a> call.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3" title="Way to configure a stanSubscription.">stanSubOptions</a> object to destroy. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__stan_sub_opts_group.js b/doc/html/group__stan_sub_opts_group.js
new file mode 100644 (file)
index 0000000..a3a5f95
--- /dev/null
@@ -0,0 +1,14 @@
+var group__stan_sub_opts_group =
+[
+    [ "stanSubOptions_Create", "group__stan_sub_opts_group.html#gad87a2cef4f4ddf64696f9864773c37cf", null ],
+    [ "stanSubOptions_SetDurableName", "group__stan_sub_opts_group.html#gaa018bceba99ef3726157e87c6918ab14", null ],
+    [ "stanSubOptions_SetAckWait", "group__stan_sub_opts_group.html#gafbb4e6c74978c4e8f30f016c20cc2bdf", null ],
+    [ "stanSubOptions_SetMaxInflight", "group__stan_sub_opts_group.html#ga35efbdea888e00440c500845064931c0", null ],
+    [ "stanSubOptions_StartAtSequence", "group__stan_sub_opts_group.html#ga6cb7f6e1ac697d16959f9042eeb84dc1", null ],
+    [ "stanSubOptions_StartAtTime", "group__stan_sub_opts_group.html#gaafd7a553486eea3c9d309da0744a3608", null ],
+    [ "stanSubOptions_StartAtTimeDelta", "group__stan_sub_opts_group.html#ga27d9175901997b8468997019746599b5", null ],
+    [ "stanSubOptions_StartWithLastReceived", "group__stan_sub_opts_group.html#ga856a74e31f3307faf988747c1f88717c", null ],
+    [ "stanSubOptions_DeliverAllAvailable", "group__stan_sub_opts_group.html#gab09b81358e93199a4631eb06f1ec179f", null ],
+    [ "stanSubOptions_SetManualAckMode", "group__stan_sub_opts_group.html#ga6f49ae2629e49d2bfa35990cf030bf83", null ],
+    [ "stanSubOptions_Destroy", "group__stan_sub_opts_group.html#ga1b56877d0a6729e148c9c288e2b88e3f", null ]
+];
\ No newline at end of file
diff --git a/doc/html/group__stats_group.html b/doc/html/group__stats_group.html
new file mode 100644 (file)
index 0000000..b8ded6f
--- /dev/null
@@ -0,0 +1,245 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Statistics</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__stats_group.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle"><div class="title">Statistics<div class="ingroups"><a class="el" href="group__func_group.html">Functions</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:gafa923df029168f4991b77ffdd9e24877"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stats_group.html#gafa923df029168f4991b77ffdd9e24877">natsStatistics_Create</a> (<a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa">natsStatistics</a> **newStats)</td></tr>
+<tr class="memdesc:gafa923df029168f4991b77ffdd9e24877"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a <a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa" title="Statistics of a natsConnection.">natsStatistics</a> object.  <a href="group__stats_group.html#gafa923df029168f4991b77ffdd9e24877">More...</a><br /></td></tr>
+<tr class="separator:gafa923df029168f4991b77ffdd9e24877"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gad85f5ffb4272713f6cc6d988e6d4e75f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stats_group.html#gad85f5ffb4272713f6cc6d988e6d4e75f">natsStatistics_GetCounts</a> (const <a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa">natsStatistics</a> *stats, uint64_t *inMsgs, uint64_t *inBytes, uint64_t *outMsgs, uint64_t *outBytes, uint64_t *reconnects)</td></tr>
+<tr class="memdesc:gad85f5ffb4272713f6cc6d988e6d4e75f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Extracts the various statistics values.  <a href="group__stats_group.html#gad85f5ffb4272713f6cc6d988e6d4e75f">More...</a><br /></td></tr>
+<tr class="separator:gad85f5ffb4272713f6cc6d988e6d4e75f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga26a04e77af8fc160adf7c33088dcf59c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stats_group.html#ga26a04e77af8fc160adf7c33088dcf59c">natsStatistics_Destroy</a> (<a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa">natsStatistics</a> *stats)</td></tr>
+<tr class="memdesc:ga26a04e77af8fc160adf7c33088dcf59c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the <a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa" title="Statistics of a natsConnection.">natsStatistics</a> object.  <a href="group__stats_group.html#ga26a04e77af8fc160adf7c33088dcf59c">More...</a><br /></td></tr>
+<tr class="separator:ga26a04e77af8fc160adf7c33088dcf59c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<p >Statistics Functions. </p>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="gafa923df029168f4991b77ffdd9e24877" name="gafa923df029168f4991b77ffdd9e24877"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gafa923df029168f4991b77ffdd9e24877">&#9670;&#160;</a></span>natsStatistics_Create()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsStatistics_Create </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa">natsStatistics</a> **&#160;</td>
+          <td class="paramname"><em>newStats</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Creates a statistics object that can be passed to <a class="el" href="group__conn_mgt_group.html#ga68821a8ae1176096b5afef7fdc7947ec" title="Gets the connection statistics.">natsConnection_GetStats()</a>.</p>
+<dl class="section note"><dt>Note</dt><dd>The object needs to be destroyed when no longer needed.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__stats_group.html#ga26a04e77af8fc160adf7c33088dcf59c" title="Destroys the natsStatistics object.">natsStatistics_Destroy()</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">newStats</td><td>the location where to store the pointer to the newly created <a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa" title="Statistics of a natsConnection.">natsStatistics</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gad85f5ffb4272713f6cc6d988e6d4e75f" name="gad85f5ffb4272713f6cc6d988e6d4e75f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gad85f5ffb4272713f6cc6d988e6d4e75f">&#9670;&#160;</a></span>natsStatistics_GetCounts()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsStatistics_GetCounts </td>
+          <td>(</td>
+          <td class="paramtype">const <a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa">natsStatistics</a> *&#160;</td>
+          <td class="paramname"><em>stats</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">uint64_t *&#160;</td>
+          <td class="paramname"><em>inMsgs</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">uint64_t *&#160;</td>
+          <td class="paramname"><em>inBytes</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">uint64_t *&#160;</td>
+          <td class="paramname"><em>outMsgs</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">uint64_t *&#160;</td>
+          <td class="paramname"><em>outBytes</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">uint64_t *&#160;</td>
+          <td class="paramname"><em>reconnects</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Gets the counts out of the statistics object.</p>
+<dl class="section note"><dt>Note</dt><dd>You can pass <code>NULL</code> to any of the count your are not interested in getting.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__conn_mgt_group.html#ga68821a8ae1176096b5afef7fdc7947ec" title="Gets the connection statistics.">natsConnection_GetStats()</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">stats</td><td>the pointer to the <a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa" title="Statistics of a natsConnection.">natsStatistics</a> object to get the values from. </td></tr>
+    <tr><td class="paramname">inMsgs</td><td>total number of inbound messages. </td></tr>
+    <tr><td class="paramname">inBytes</td><td>total size (in bytes) of inbound messages. </td></tr>
+    <tr><td class="paramname">outMsgs</td><td>total number of outbound messages. </td></tr>
+    <tr><td class="paramname">outBytes</td><td>total size (in bytes) of outbound messages. </td></tr>
+    <tr><td class="paramname">reconnects</td><td>total number of times the client has reconnected. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga26a04e77af8fc160adf7c33088dcf59c" name="ga26a04e77af8fc160adf7c33088dcf59c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga26a04e77af8fc160adf7c33088dcf59c">&#9670;&#160;</a></span>natsStatistics_Destroy()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void natsStatistics_Destroy </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa">natsStatistics</a> *&#160;</td>
+          <td class="paramname"><em>stats</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Destroys the statistics object, freeing up memory.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">stats</td><td>the pointer to the <a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa" title="Statistics of a natsConnection.">natsStatistics</a> object to destroy. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__stats_group.js b/doc/html/group__stats_group.js
new file mode 100644 (file)
index 0000000..bfc66d2
--- /dev/null
@@ -0,0 +1,6 @@
+var group__stats_group =
+[
+    [ "natsStatistics_Create", "group__stats_group.html#gafa923df029168f4991b77ffdd9e24877", null ],
+    [ "natsStatistics_GetCounts", "group__stats_group.html#gad85f5ffb4272713f6cc6d988e6d4e75f", null ],
+    [ "natsStatistics_Destroy", "group__stats_group.html#ga26a04e77af8fc160adf7c33088dcf59c", null ]
+];
\ No newline at end of file
diff --git a/doc/html/group__status_group.html b/doc/html/group__status_group.html
new file mode 100644 (file)
index 0000000..b6bd187
--- /dev/null
@@ -0,0 +1,147 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Status</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__status_group.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle"><div class="title">Status<div class="ingroups"><a class="el" href="group__func_group.html">Functions</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:ga4a83c4a08f1e4dd9451c1a88b6a4254e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__status_group.html#ga4a83c4a08f1e4dd9451c1a88b6a4254e">natsStatus_GetText</a> (<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> s)</td></tr>
+<tr class="memdesc:ga4a83c4a08f1e4dd9451c1a88b6a4254e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the text corresponding to a <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80" title="Status returned by most of the APIs.">natsStatus</a>.  <a href="group__status_group.html#ga4a83c4a08f1e4dd9451c1a88b6a4254e">More...</a><br /></td></tr>
+<tr class="separator:ga4a83c4a08f1e4dd9451c1a88b6a4254e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<p >Functions related to <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80" title="Status returned by most of the APIs.">natsStatus</a>. </p>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="ga4a83c4a08f1e4dd9451c1a88b6a4254e" name="ga4a83c4a08f1e4dd9451c1a88b6a4254e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga4a83c4a08f1e4dd9451c1a88b6a4254e">&#9670;&#160;</a></span>natsStatus_GetText()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char * natsStatus_GetText </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td>
+          <td class="paramname"><em>s</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the static string corresponding to the given status.</p>
+<dl class="section warning"><dt>Warning</dt><dd>The returned string is a static string, do not attempt to free it.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">s</td><td>status to get the text representation from. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__status_group.js b/doc/html/group__status_group.js
new file mode 100644 (file)
index 0000000..6df3996
--- /dev/null
@@ -0,0 +1,4 @@
+var group__status_group =
+[
+    [ "natsStatus_GetText", "group__status_group.html#ga4a83c4a08f1e4dd9451c1a88b6a4254e", null ]
+];
\ No newline at end of file
diff --git a/doc/html/group__sub_group.html b/doc/html/group__sub_group.html
new file mode 100644 (file)
index 0000000..b924c93
--- /dev/null
@@ -0,0 +1,1029 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Subscription</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__sub_group.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle"><div class="title">Subscription<div class="ingroups"><a class="el" href="group__func_group.html">Functions</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:ga38f1e41fc7619101fc4aa52014dd5428"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga38f1e41fc7619101fc4aa52014dd5428">natsSubscription_NoDeliveryDelay</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub)</td></tr>
+<tr class="memdesc:ga38f1e41fc7619101fc4aa52014dd5428"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables the No Delivery Delay mode.  <a href="group__sub_group.html#ga38f1e41fc7619101fc4aa52014dd5428">More...</a><br /></td></tr>
+<tr class="separator:ga38f1e41fc7619101fc4aa52014dd5428"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga6538a5d78dfb0f16514b94c8e74c11af"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga6538a5d78dfb0f16514b94c8e74c11af">natsSubscription_NextMsg</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **nextMsg, <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int64_t timeout)</td></tr>
+<tr class="memdesc:ga6538a5d78dfb0f16514b94c8e74c11af"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the next available message.  <a href="group__sub_group.html#ga6538a5d78dfb0f16514b94c8e74c11af">More...</a><br /></td></tr>
+<tr class="separator:ga6538a5d78dfb0f16514b94c8e74c11af"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaee87f8be0e6c2a4693ba2cea070583ba"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#gaee87f8be0e6c2a4693ba2cea070583ba">natsSubscription_Unsubscribe</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub)</td></tr>
+<tr class="memdesc:gaee87f8be0e6c2a4693ba2cea070583ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unsubscribes.  <a href="group__sub_group.html#gaee87f8be0e6c2a4693ba2cea070583ba">More...</a><br /></td></tr>
+<tr class="separator:gaee87f8be0e6c2a4693ba2cea070583ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga09f285de2746a6e27fc66efd60bd3116"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga09f285de2746a6e27fc66efd60bd3116">natsSubscription_AutoUnsubscribe</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int max)</td></tr>
+<tr class="memdesc:ga09f285de2746a6e27fc66efd60bd3116"><td class="mdescLeft">&#160;</td><td class="mdescRight">Auto-Unsubscribes.  <a href="group__sub_group.html#ga09f285de2746a6e27fc66efd60bd3116">More...</a><br /></td></tr>
+<tr class="separator:ga09f285de2746a6e27fc66efd60bd3116"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga8a37b2d5290da3aecc05483d79e7e254"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga8a37b2d5290da3aecc05483d79e7e254">natsSubscription_QueuedMsgs</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, uint64_t *queuedMsgs)</td></tr>
+<tr class="memdesc:ga8a37b2d5290da3aecc05483d79e7e254"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the number of pending messages.  <a href="group__sub_group.html#ga8a37b2d5290da3aecc05483d79e7e254">More...</a><br /></td></tr>
+<tr class="separator:ga8a37b2d5290da3aecc05483d79e7e254"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga5a029a784c0a7f8b5800b48cc995db20"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga5a029a784c0a7f8b5800b48cc995db20">natsSubscription_GetID</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub)</td></tr>
+<tr class="memdesc:ga5a029a784c0a7f8b5800b48cc995db20"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the subscription id.  <a href="group__sub_group.html#ga5a029a784c0a7f8b5800b48cc995db20">More...</a><br /></td></tr>
+<tr class="separator:ga5a029a784c0a7f8b5800b48cc995db20"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gadd4872b9fc5678a73f9ab04ce8428432"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#gadd4872b9fc5678a73f9ab04ce8428432">natsSubscription_GetSubject</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub)</td></tr>
+<tr class="memdesc:gadd4872b9fc5678a73f9ab04ce8428432"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the subject name.  <a href="group__sub_group.html#gadd4872b9fc5678a73f9ab04ce8428432">More...</a><br /></td></tr>
+<tr class="separator:gadd4872b9fc5678a73f9ab04ce8428432"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga68a7cea89e75c529a7dd3bb77303dda4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga68a7cea89e75c529a7dd3bb77303dda4">natsSubscription_SetPendingLimits</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int msgLimit, int bytesLimit)</td></tr>
+<tr class="memdesc:ga68a7cea89e75c529a7dd3bb77303dda4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the limit for pending messages and bytes.  <a href="group__sub_group.html#ga68a7cea89e75c529a7dd3bb77303dda4">More...</a><br /></td></tr>
+<tr class="separator:ga68a7cea89e75c529a7dd3bb77303dda4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga786bb458981274fe717f266bd3b96d96"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga786bb458981274fe717f266bd3b96d96">natsSubscription_GetPendingLimits</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int *msgLimit, int *bytesLimit)</td></tr>
+<tr class="memdesc:ga786bb458981274fe717f266bd3b96d96"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the current limit for pending messages and bytes.  <a href="group__sub_group.html#ga786bb458981274fe717f266bd3b96d96">More...</a><br /></td></tr>
+<tr class="separator:ga786bb458981274fe717f266bd3b96d96"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaca6262e2ef842caa701a9f233db72707"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#gaca6262e2ef842caa701a9f233db72707">natsSubscription_GetPending</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int *msgs, int *bytes)</td></tr>
+<tr class="memdesc:gaca6262e2ef842caa701a9f233db72707"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of pending messages and bytes.  <a href="group__sub_group.html#gaca6262e2ef842caa701a9f233db72707">More...</a><br /></td></tr>
+<tr class="separator:gaca6262e2ef842caa701a9f233db72707"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga476b7276d0b7f9946834d2bb2423e955"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga476b7276d0b7f9946834d2bb2423e955">natsSubscription_GetDelivered</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int64_t *msgs)</td></tr>
+<tr class="memdesc:ga476b7276d0b7f9946834d2bb2423e955"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of delivered messages.  <a href="group__sub_group.html#ga476b7276d0b7f9946834d2bb2423e955">More...</a><br /></td></tr>
+<tr class="separator:ga476b7276d0b7f9946834d2bb2423e955"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga24f1636869e26661ce62c9c9f4d80823"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga24f1636869e26661ce62c9c9f4d80823">natsSubscription_GetDropped</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int64_t *msgs)</td></tr>
+<tr class="memdesc:ga24f1636869e26661ce62c9c9f4d80823"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of dropped messages.  <a href="group__sub_group.html#ga24f1636869e26661ce62c9c9f4d80823">More...</a><br /></td></tr>
+<tr class="separator:ga24f1636869e26661ce62c9c9f4d80823"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga0abc5d9afbc6b0c9c5adaf533904c968"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga0abc5d9afbc6b0c9c5adaf533904c968">natsSubscription_GetMaxPending</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int *msgs, int *bytes)</td></tr>
+<tr class="memdesc:ga0abc5d9afbc6b0c9c5adaf533904c968"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the maximum number of pending messages and bytes.  <a href="group__sub_group.html#ga0abc5d9afbc6b0c9c5adaf533904c968">More...</a><br /></td></tr>
+<tr class="separator:ga0abc5d9afbc6b0c9c5adaf533904c968"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gafe31911d8372db401d33856465421710"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#gafe31911d8372db401d33856465421710">natsSubscription_ClearMaxPending</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub)</td></tr>
+<tr class="memdesc:gafe31911d8372db401d33856465421710"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears the statistics regarding the maximum pending values.  <a href="group__sub_group.html#gafe31911d8372db401d33856465421710">More...</a><br /></td></tr>
+<tr class="separator:gafe31911d8372db401d33856465421710"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga12b60cdb3aca7329edebc480ae86bfab"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga12b60cdb3aca7329edebc480ae86bfab">natsSubscription_GetStats</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int *pendingMsgs, int *pendingBytes, int *maxPendingMsgs, int *maxPendingBytes, int64_t *deliveredMsgs, int64_t *droppedMsgs)</td></tr>
+<tr class="memdesc:ga12b60cdb3aca7329edebc480ae86bfab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get various statistics from this subscription.  <a href="group__sub_group.html#ga12b60cdb3aca7329edebc480ae86bfab">More...</a><br /></td></tr>
+<tr class="separator:ga12b60cdb3aca7329edebc480ae86bfab"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga5e6454bbc7a90b9694112d45bd8de903"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga5e6454bbc7a90b9694112d45bd8de903">natsSubscription_IsValid</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub)</td></tr>
+<tr class="memdesc:ga5e6454bbc7a90b9694112d45bd8de903"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks the validity of the subscription.  <a href="group__sub_group.html#ga5e6454bbc7a90b9694112d45bd8de903">More...</a><br /></td></tr>
+<tr class="separator:ga5e6454bbc7a90b9694112d45bd8de903"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga26c9736289d326fb7d6df7e2a0df72ab"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga26c9736289d326fb7d6df7e2a0df72ab">natsSubscription_Drain</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub)</td></tr>
+<tr class="memdesc:ga26c9736289d326fb7d6df7e2a0df72ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Drains the subscription with a default timeout.  <a href="group__sub_group.html#ga26c9736289d326fb7d6df7e2a0df72ab">More...</a><br /></td></tr>
+<tr class="separator:ga26c9736289d326fb7d6df7e2a0df72ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga9c26a3f9584e7804060a48ec1b7e2a68"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga9c26a3f9584e7804060a48ec1b7e2a68">natsSubscription_DrainTimeout</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int64_t timeout)</td></tr>
+<tr class="memdesc:ga9c26a3f9584e7804060a48ec1b7e2a68"><td class="mdescLeft">&#160;</td><td class="mdescRight">Drains the subscription with the specified timeout.  <a href="group__sub_group.html#ga9c26a3f9584e7804060a48ec1b7e2a68">More...</a><br /></td></tr>
+<tr class="separator:ga9c26a3f9584e7804060a48ec1b7e2a68"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga0408c9b6e4ad4078ac0267656ace222d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga0408c9b6e4ad4078ac0267656ace222d">natsSubscription_WaitForDrainCompletion</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int64_t timeout)</td></tr>
+<tr class="memdesc:ga0408c9b6e4ad4078ac0267656ace222d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Blocks until the drain operation completes.  <a href="group__sub_group.html#ga0408c9b6e4ad4078ac0267656ace222d">More...</a><br /></td></tr>
+<tr class="separator:ga0408c9b6e4ad4078ac0267656ace222d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga9834bd02f67a25ac084d5ad71e146019"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga9834bd02f67a25ac084d5ad71e146019">natsSubscription_DrainCompletionStatus</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub)</td></tr>
+<tr class="memdesc:ga9834bd02f67a25ac084d5ad71e146019"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the status of the drain after completion.  <a href="group__sub_group.html#ga9834bd02f67a25ac084d5ad71e146019">More...</a><br /></td></tr>
+<tr class="separator:ga9834bd02f67a25ac084d5ad71e146019"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaea632f845d473e7461b134c0e7bf4077"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#gaea632f845d473e7461b134c0e7bf4077">natsSubscription_SetOnCompleteCB</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, <a class="el" href="group__callbacks_group.html#ga245131e64f1d0dff7edc8ed874a07e9a">natsOnCompleteCB</a> cb, void *closure)</td></tr>
+<tr class="memdesc:gaea632f845d473e7461b134c0e7bf4077"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets a completion callback.  <a href="group__sub_group.html#gaea632f845d473e7461b134c0e7bf4077">More...</a><br /></td></tr>
+<tr class="separator:gaea632f845d473e7461b134c0e7bf4077"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga50a95dd96e9b714201679a015d62832f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga50a95dd96e9b714201679a015d62832f">natsSubscription_Destroy</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub)</td></tr>
+<tr class="memdesc:ga50a95dd96e9b714201679a015d62832f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the subscription.  <a href="group__sub_group.html#ga50a95dd96e9b714201679a015d62832f">More...</a><br /></td></tr>
+<tr class="separator:ga50a95dd96e9b714201679a015d62832f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<p >NATS Subscriptions. </p>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="ga38f1e41fc7619101fc4aa52014dd5428" name="ga38f1e41fc7619101fc4aa52014dd5428"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga38f1e41fc7619101fc4aa52014dd5428">&#9670;&#160;</a></span>natsSubscription_NoDeliveryDelay()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_NoDeliveryDelay </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
+          <td class="paramname"><em>sub</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >By default, messages that arrive are not immediately delivered. This generally improves performance. However, in case of request-reply, this delay has a negative impact. In such case, call this function to have the subscriber be notified immediately each time a message arrives.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object.</td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000001">Deprecated:</a></b></dt><dd>No longer needed. Will be removed in the future. </dd></dl>
+
+</div>
+</div>
+<a id="ga6538a5d78dfb0f16514b94c8e74c11af" name="ga6538a5d78dfb0f16514b94c8e74c11af"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga6538a5d78dfb0f16514b94c8e74c11af">&#9670;&#160;</a></span>natsSubscription_NextMsg()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_NextMsg </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **&#160;</td>
+          <td class="paramname"><em>nextMsg</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
+          <td class="paramname"><em>sub</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int64_t&#160;</td>
+          <td class="paramname"><em>timeout</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Return the next message available to a synchronous subscriber or block until one is available. A timeout (expressed in milliseconds) can be used to return when no message has been delivered. If the value is zero, then this call will not wait and return the next message that was pending in the client, and <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ab88994c9ea9889ac4d9d656d62f550ed">NATS_TIMEOUT</a> otherwise.</p>
+<dl class="section note"><dt>Note</dt><dd>If you create a subscription for a subject used as the reply subject of a <a class="el" href="group__conn_pub_group.html#gaaaa3d75ffec2dcdc6bf905cdb1eee59e" title="Publishes data on a subject expecting replies on the given reply.">natsConnection_PublishRequest</a> call (or any of its variant), and there are no responders for the request subject, NATS Servers v2.2.0+ will return an empty message with a header "Status" and value "503". The library v2.2.0 until v2.4.1 would return this message to the user, which was wrong.<br  />
+ The library now returns no message and <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80aab97324e40ccfe1360080c651c330e62" title="No responders were running when the server received the request.">NATS_NO_RESPONDERS</a> status.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">nextMsg</td><td>the location where to store the pointer to the next available message. </td></tr>
+    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
+    <tr><td class="paramname">timeout</td><td>time, in milliseconds, after which this call will return <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ab88994c9ea9889ac4d9d656d62f550ed">NATS_TIMEOUT</a> if no message is available. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gaee87f8be0e6c2a4693ba2cea070583ba" name="gaee87f8be0e6c2a4693ba2cea070583ba"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaee87f8be0e6c2a4693ba2cea070583ba">&#9670;&#160;</a></span>natsSubscription_Unsubscribe()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_Unsubscribe </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
+          <td class="paramname"><em>sub</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Removes interest on the subject. Asynchronous subscription may still have a callback in progress, in that case, the subscription will still be valid until the callback returns.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga09f285de2746a6e27fc66efd60bd3116" name="ga09f285de2746a6e27fc66efd60bd3116"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga09f285de2746a6e27fc66efd60bd3116">&#9670;&#160;</a></span>natsSubscription_AutoUnsubscribe()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_AutoUnsubscribe </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
+          <td class="paramname"><em>sub</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&#160;</td>
+          <td class="paramname"><em>max</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This call issues an automatic <a class="el" href="group__sub_group.html#gaee87f8be0e6c2a4693ba2cea070583ba" title="Unsubscribes.">natsSubscription_Unsubscribe</a> that is processed by the server when 'max' messages have been received. This can be useful when sending a request to an unknown number of subscribers.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
+    <tr><td class="paramname">max</td><td>the maximum number of message you want this subscription to receive. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga8a37b2d5290da3aecc05483d79e7e254" name="ga8a37b2d5290da3aecc05483d79e7e254"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga8a37b2d5290da3aecc05483d79e7e254">&#9670;&#160;</a></span>natsSubscription_QueuedMsgs()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_QueuedMsgs </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
+          <td class="paramname"><em>sub</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">uint64_t *&#160;</td>
+          <td class="paramname"><em>queuedMsgs</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the number of queued messages in the client for this subscription.</p>
+<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000002">Deprecated:</a></b></dt><dd>Use <a class="el" href="group__sub_group.html#gaca6262e2ef842caa701a9f233db72707" title="Returns the number of pending messages and bytes.">natsSubscription_GetPending</a> instead.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
+    <tr><td class="paramname">queuedMsgs</td><td>the location where to store the number of queued messages. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga5a029a784c0a7f8b5800b48cc995db20" name="ga5a029a784c0a7f8b5800b48cc995db20"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga5a029a784c0a7f8b5800b48cc995db20">&#9670;&#160;</a></span>natsSubscription_GetID()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t natsSubscription_GetID </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
+          <td class="paramname"><em>sub</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the id of the given subscription.</p>
+<dl class="section note"><dt>Note</dt><dd>Invalid or closed subscriptions will cause a value of 0 to be returned.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gadd4872b9fc5678a73f9ab04ce8428432" name="gadd4872b9fc5678a73f9ab04ce8428432"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gadd4872b9fc5678a73f9ab04ce8428432">&#9670;&#160;</a></span>natsSubscription_GetSubject()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char * natsSubscription_GetSubject </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
+          <td class="paramname"><em>sub</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the subject of the given subscription.</p>
+<dl class="section note"><dt>Note</dt><dd>Invalid or closed subscriptions will cause a value of NULL to be returned.</dd></dl>
+<dl class="section warning"><dt>Warning</dt><dd>The string belongs to the subscription and must not be freed. Copy it if needed.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga68a7cea89e75c529a7dd3bb77303dda4" name="ga68a7cea89e75c529a7dd3bb77303dda4"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga68a7cea89e75c529a7dd3bb77303dda4">&#9670;&#160;</a></span>natsSubscription_SetPendingLimits()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_SetPendingLimits </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
+          <td class="paramname"><em>sub</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&#160;</td>
+          <td class="paramname"><em>msgLimit</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&#160;</td>
+          <td class="paramname"><em>bytesLimit</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Specifies the maximum number and size of incoming messages that can be buffered in the library for this subscription, before new incoming messages are dropped and <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ae93ff5b7fe31f8570308385d92d317b0">NATS_SLOW_CONSUMER</a> status is reported to the <a class="el" href="group__callbacks_group.html#ga9e511dffa471dfb971b7dd2b12329626" title="Callback used to notify the user of errors encountered while processing inbound messages.">natsErrHandler</a> callback (if one has been set).</p>
+<p >If no limit is set at the subscription level, the limit set by <a class="el" href="group__opts_group.html#ga95510436eee06f9992ded96a44795c40" title="Sets the maximum number of pending messages per subscription.">natsOptions_SetMaxPendingMsgs</a> before creating the connection will be used.</p>
+<dl class="section note"><dt>Note</dt><dd>If no option is set, there is still a default of <code>65536</code> messages and <code>65536 * 1024</code> bytes.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#ga95510436eee06f9992ded96a44795c40" title="Sets the maximum number of pending messages per subscription.">natsOptions_SetMaxPendingMsgs</a> </dd>
+<dd>
+<a class="el" href="group__sub_group.html#ga786bb458981274fe717f266bd3b96d96" title="Returns the current limit for pending messages and bytes.">natsSubscription_GetPendingLimits</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>he pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
+    <tr><td class="paramname">msgLimit</td><td>the limit in number of messages that the subscription can hold. </td></tr>
+    <tr><td class="paramname">bytesLimit</td><td>the limit in bytes that the subscription can hold. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga786bb458981274fe717f266bd3b96d96" name="ga786bb458981274fe717f266bd3b96d96"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga786bb458981274fe717f266bd3b96d96">&#9670;&#160;</a></span>natsSubscription_GetPendingLimits()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_GetPendingLimits </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
+          <td class="paramname"><em>sub</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int *&#160;</td>
+          <td class="paramname"><em>msgLimit</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int *&#160;</td>
+          <td class="paramname"><em>bytesLimit</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Regardless if limits have been explicitly set with <a class="el" href="group__sub_group.html#ga68a7cea89e75c529a7dd3bb77303dda4" title="Sets the limit for pending messages and bytes.">natsSubscription_SetPendingLimits</a>, this call will store in the provided memory locations, the limits set for this subscription.</p>
+<dl class="section note"><dt>Note</dt><dd>It is possible for <code>msgLimit</code> and/or <code>bytesLimits</code> to be <code>NULL</code>, in which case the corresponding value is obviously not stored, but the function will not return an error.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#ga95510436eee06f9992ded96a44795c40" title="Sets the maximum number of pending messages per subscription.">natsOptions_SetMaxPendingMsgs</a> </dd>
+<dd>
+<a class="el" href="group__sub_group.html#ga68a7cea89e75c529a7dd3bb77303dda4" title="Sets the limit for pending messages and bytes.">natsSubscription_SetPendingLimits</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
+    <tr><td class="paramname">msgLimit</td><td>if not <code>NULL</code>, the memory location where to store the maximum number of pending messages for this subscription. </td></tr>
+    <tr><td class="paramname">bytesLimit</td><td>if not <code>NULL</code>, the memory location where to store the maximum size of pending messages for this subscription. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gaca6262e2ef842caa701a9f233db72707" name="gaca6262e2ef842caa701a9f233db72707"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaca6262e2ef842caa701a9f233db72707">&#9670;&#160;</a></span>natsSubscription_GetPending()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_GetPending </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
+          <td class="paramname"><em>sub</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int *&#160;</td>
+          <td class="paramname"><em>msgs</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int *&#160;</td>
+          <td class="paramname"><em>bytes</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the total number and size of pending messages on this subscription.</p>
+<dl class="section note"><dt>Note</dt><dd>It is possible for <code>msgs</code> and <code>bytes</code> to be NULL, in which case the corresponding values are obviously not stored, but the function will not return an error.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
+    <tr><td class="paramname">msgs</td><td>if not <code>NULL</code>, the memory location where to store the number of pending messages. </td></tr>
+    <tr><td class="paramname">bytes</td><td>if not <code>NULL</code>, the memory location where to store the total size of pending messages. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga476b7276d0b7f9946834d2bb2423e955" name="ga476b7276d0b7f9946834d2bb2423e955"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga476b7276d0b7f9946834d2bb2423e955">&#9670;&#160;</a></span>natsSubscription_GetDelivered()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_GetDelivered </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
+          <td class="paramname"><em>sub</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int64_t *&#160;</td>
+          <td class="paramname"><em>msgs</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the number of delivered messages for this subscription.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
+    <tr><td class="paramname">msgs</td><td>the memory location where to store the number of delivered messages. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga24f1636869e26661ce62c9c9f4d80823" name="ga24f1636869e26661ce62c9c9f4d80823"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga24f1636869e26661ce62c9c9f4d80823">&#9670;&#160;</a></span>natsSubscription_GetDropped()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_GetDropped </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
+          <td class="paramname"><em>sub</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int64_t *&#160;</td>
+          <td class="paramname"><em>msgs</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the number of known dropped messages for this subscription. This happens when a consumer is not keeping up and the library starts to drop messages when the maximum number (and/or size) of pending messages has been reached.</p>
+<dl class="section note"><dt>Note</dt><dd>If the server declares the connection a slow consumer, this number may not be valid.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#ga95510436eee06f9992ded96a44795c40" title="Sets the maximum number of pending messages per subscription.">natsOptions_SetMaxPendingMsgs</a> </dd>
+<dd>
+<a class="el" href="group__sub_group.html#ga68a7cea89e75c529a7dd3bb77303dda4" title="Sets the limit for pending messages and bytes.">natsSubscription_SetPendingLimits</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
+    <tr><td class="paramname">msgs</td><td>the memory location where to store the number of dropped messages. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga0abc5d9afbc6b0c9c5adaf533904c968" name="ga0abc5d9afbc6b0c9c5adaf533904c968"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga0abc5d9afbc6b0c9c5adaf533904c968">&#9670;&#160;</a></span>natsSubscription_GetMaxPending()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_GetMaxPending </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
+          <td class="paramname"><em>sub</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int *&#160;</td>
+          <td class="paramname"><em>msgs</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int *&#160;</td>
+          <td class="paramname"><em>bytes</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns the maximum of pending messages and bytes seen so far.</p>
+<dl class="section note"><dt>Note</dt><dd><code>msgs</code> and/or <code>bytes</code> can be NULL.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
+    <tr><td class="paramname">msgs</td><td>if not <code>NULL</code>, the memory location where to store the maximum number of pending messages seen so far. </td></tr>
+    <tr><td class="paramname">bytes</td><td>if not <code>NULL</code>, the memory location where to store the maximum number of bytes pending seen so far. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gafe31911d8372db401d33856465421710" name="gafe31911d8372db401d33856465421710"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gafe31911d8372db401d33856465421710">&#9670;&#160;</a></span>natsSubscription_ClearMaxPending()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_ClearMaxPending </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
+          <td class="paramname"><em>sub</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Clears the statistics regarding the maximum pending values.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga12b60cdb3aca7329edebc480ae86bfab" name="ga12b60cdb3aca7329edebc480ae86bfab"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga12b60cdb3aca7329edebc480ae86bfab">&#9670;&#160;</a></span>natsSubscription_GetStats()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_GetStats </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
+          <td class="paramname"><em>sub</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int *&#160;</td>
+          <td class="paramname"><em>pendingMsgs</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int *&#160;</td>
+          <td class="paramname"><em>pendingBytes</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int *&#160;</td>
+          <td class="paramname"><em>maxPendingMsgs</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int *&#160;</td>
+          <td class="paramname"><em>maxPendingBytes</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int64_t *&#160;</td>
+          <td class="paramname"><em>deliveredMsgs</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int64_t *&#160;</td>
+          <td class="paramname"><em>droppedMsgs</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This is a convenient function to get several subscription's statistics in one call.</p>
+<dl class="section note"><dt>Note</dt><dd>Any or all of the statistics pointers can be <code>NULL</code>.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__sub_group.html#gaca6262e2ef842caa701a9f233db72707" title="Returns the number of pending messages and bytes.">natsSubscription_GetPending</a> </dd>
+<dd>
+<a class="el" href="group__sub_group.html#ga0abc5d9afbc6b0c9c5adaf533904c968" title="Returns the maximum number of pending messages and bytes.">natsSubscription_GetMaxPending</a> </dd>
+<dd>
+<a class="el" href="group__sub_group.html#ga476b7276d0b7f9946834d2bb2423e955" title="Returns the number of delivered messages.">natsSubscription_GetDelivered</a> </dd>
+<dd>
+<a class="el" href="group__sub_group.html#ga24f1636869e26661ce62c9c9f4d80823" title="Returns the number of dropped messages.">natsSubscription_GetDropped</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
+    <tr><td class="paramname">pendingMsgs</td><td>if not <code>NULL</code>, memory location where to store the number of pending messages. </td></tr>
+    <tr><td class="paramname">pendingBytes</td><td>if not <code>NULL</code>, memory location where to store the total size of pending messages. </td></tr>
+    <tr><td class="paramname">maxPendingMsgs</td><td>if not <code>NULL</code>, memory location where to store the maximum number of pending messages seen so far. </td></tr>
+    <tr><td class="paramname">maxPendingBytes</td><td>if not <code>NULL</code>, memory location where to store the maximum total size of pending messages seen so far. </td></tr>
+    <tr><td class="paramname">deliveredMsgs</td><td>if not <code>NULL</code>, memory location where to store the number of delivered messages. </td></tr>
+    <tr><td class="paramname">droppedMsgs</td><td>if not <code>NULL</code>, memory location where to store the number of dropped messages. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga5e6454bbc7a90b9694112d45bd8de903" name="ga5e6454bbc7a90b9694112d45bd8de903"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga5e6454bbc7a90b9694112d45bd8de903">&#9670;&#160;</a></span>natsSubscription_IsValid()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> bool natsSubscription_IsValid </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
+          <td class="paramname"><em>sub</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Returns a boolean indicating whether the subscription is still active. This will return false if the subscription has already been closed, or auto unsubscribed.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga26c9736289d326fb7d6df7e2a0df72ab" name="ga26c9736289d326fb7d6df7e2a0df72ab"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga26c9736289d326fb7d6df7e2a0df72ab">&#9670;&#160;</a></span>natsSubscription_Drain()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_Drain </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
+          <td class="paramname"><em>sub</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Drain will remove interest but continue to invoke callbacks until all messages have been processed.</p>
+<p >This call uses a default drain timeout of 30 seconds. See <a class="el" href="group__sub_group.html#ga9c26a3f9584e7804060a48ec1b7e2a68" title="Drains the subscription with the specified timeout.">natsSubscription_DrainTimeout</a> for details on behavior when timeout elapses.</p>
+<dl class="section warning"><dt>Warning</dt><dd>This function does not block waiting for the operation to complete. To synchronously wait, see <a class="el" href="group__sub_group.html#ga0408c9b6e4ad4078ac0267656ace222d" title="Blocks until the drain operation completes.">natsSubscription_WaitForDrainCompletion</a></dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__sub_group.html#ga9c26a3f9584e7804060a48ec1b7e2a68" title="Drains the subscription with the specified timeout.">natsSubscription_DrainTimeout</a> </dd>
+<dd>
+<a class="el" href="group__sub_group.html#ga0408c9b6e4ad4078ac0267656ace222d" title="Blocks until the drain operation completes.">natsSubscription_WaitForDrainCompletion</a> </dd>
+<dd>
+<a class="el" href="group__sub_group.html#ga9834bd02f67a25ac084d5ad71e146019" title="Returns the status of the drain after completion.">natsSubscription_DrainCompletionStatus</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga9c26a3f9584e7804060a48ec1b7e2a68" name="ga9c26a3f9584e7804060a48ec1b7e2a68"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga9c26a3f9584e7804060a48ec1b7e2a68">&#9670;&#160;</a></span>natsSubscription_DrainTimeout()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_DrainTimeout </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
+          <td class="paramname"><em>sub</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int64_t&#160;</td>
+          <td class="paramname"><em>timeout</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Drain will remove interest but continue to invoke callbacks until all messages have been processed, or the specified timeout has elapsed. In that case, the subscription will be forcibly closed and remaining pending messages (if any) will not be processed.</p>
+<p >The timeout is expressed in milliseconds. Zero or negative value means that the call will not timeout, but see below for more details.</p>
+<p >When this call returns, the UNSUBSCRIBE protocol for this subscription has been enqueued to the outgoing connection buffer, but not sent to the server, ensuring that this call does not block.</p>
+<p >The library then asynchronously ensures that this protocol is sent and waits for a confirmation from the server. After that, it is guaranteed that no new message for this subscription will be received and the library can proceed with the rest of the draining.</p>
+<p >However, should the "flush" of the protocol fail, the library will ensure that no new message is added to the subscription (in the event the server did not receive the UNSUBSCRIBE protocol and still attempts to deliver messages), and will proceed with the draining of the pending messages. Users can check the status of the draining after it has completed by calling <a class="el" href="group__sub_group.html#ga9834bd02f67a25ac084d5ad71e146019" title="Returns the status of the drain after completion.">natsSubscription_DrainCompletionStatus</a>.</p>
+<p >If no timeout is specified (that is, value is zero or negative), a timeout will be used for the "flush" of the protocol. Again, even in case of failure, the draining will proceed.</p>
+<p >If a timeout is specified, the complete process: "flush" of the protocol and draining of messages, must happen before the timeout elapses otherwise the subscription will be forcibly closed, and not all message callbacks may be invoked.</p>
+<p >Regardless of the presence of a timeout or not, should the subscription or connection be closed while draining occurs, the draining process will stop. The <a class="el" href="group__sub_group.html#ga0408c9b6e4ad4078ac0267656ace222d" title="Blocks until the drain operation completes.">natsSubscription_WaitForDrainCompletion</a> call will not report an error. To know if an error occurred, the user can call <a class="el" href="group__sub_group.html#ga9834bd02f67a25ac084d5ad71e146019" title="Returns the status of the drain after completion.">natsSubscription_DrainCompletionStatus</a> after ensuring that the drain has completed.</p>
+<dl class="section warning"><dt>Warning</dt><dd>This function does not block waiting for the operation to complete. To synchronously wait, see <a class="el" href="group__sub_group.html#ga0408c9b6e4ad4078ac0267656ace222d" title="Blocks until the drain operation completes.">natsSubscription_WaitForDrainCompletion</a></dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__sub_group.html#ga26c9736289d326fb7d6df7e2a0df72ab" title="Drains the subscription with a default timeout.">natsSubscription_Drain</a> </dd>
+<dd>
+<a class="el" href="group__sub_group.html#ga0408c9b6e4ad4078ac0267656ace222d" title="Blocks until the drain operation completes.">natsSubscription_WaitForDrainCompletion</a> </dd>
+<dd>
+<a class="el" href="group__sub_group.html#ga9834bd02f67a25ac084d5ad71e146019" title="Returns the status of the drain after completion.">natsSubscription_DrainCompletionStatus</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
+    <tr><td class="paramname">timeout</td><td>how long to wait for the operation to complete, expressed in milliseconds. If the timeout elapses the subscription will be closed. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga0408c9b6e4ad4078ac0267656ace222d" name="ga0408c9b6e4ad4078ac0267656ace222d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga0408c9b6e4ad4078ac0267656ace222d">&#9670;&#160;</a></span>natsSubscription_WaitForDrainCompletion()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_WaitForDrainCompletion </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
+          <td class="paramname"><em>sub</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int64_t&#160;</td>
+          <td class="paramname"><em>timeout</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This function blocks until the subscription is fully drained. Returns no error if the subscription is drained or closed, otherwise returns the error if the subscription was not in drained mode (<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9bb78b4f245d2870040d25c450febd4b">NATS_ILLEGAL_STATE</a>) or if this subscription was not drained or closed prior to the specified timeout (<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ab88994c9ea9889ac4d9d656d62f550ed">NATS_TIMEOUT</a>).</p>
+<p >The timeout is expressed in milliseconds. Zero or negative value means that the call will not timeout.</p>
+<p >Note that if this call times-out, it does not mean that the drain stops. The drain will continue until its own timeout elapses.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__sub_group.html#ga26c9736289d326fb7d6df7e2a0df72ab" title="Drains the subscription with a default timeout.">natsSubscription_Drain</a> </dd>
+<dd>
+<a class="el" href="group__sub_group.html#ga9c26a3f9584e7804060a48ec1b7e2a68" title="Drains the subscription with the specified timeout.">natsSubscription_DrainTimeout</a> </dd>
+<dd>
+<a class="el" href="group__sub_group.html#ga9834bd02f67a25ac084d5ad71e146019" title="Returns the status of the drain after completion.">natsSubscription_DrainCompletionStatus</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
+    <tr><td class="paramname">timeout</td><td>how long to wait for the operation to complete, expressed in milliseconds. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga9834bd02f67a25ac084d5ad71e146019" name="ga9834bd02f67a25ac084d5ad71e146019"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga9834bd02f67a25ac084d5ad71e146019">&#9670;&#160;</a></span>natsSubscription_DrainCompletionStatus()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_DrainCompletionStatus </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
+          <td class="paramname"><em>sub</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Once the drain has completed, users can use this function to know if the drain completed successfully or not.</p>
+<p >Possible return values (the list is not exhaustive):</p>
+<p ><code>NATS_OK</code> the library sent the UNSUBSCRIBE protocol and finished processing all messages that were pending.<br  />
+ <code>NATS_ILLEGAL_STATE</code> this call was made for a subscription that had not started draining or the draining is still in progress.<br  />
+ <code>NATS_INVALID_SUBSCRIPTION</code> the subscription was closed while draining, which means that some messages may not have been processed.<br  />
+ <code>NATS_CONNECTION_CLOSED</code> the connection was closed while draining, which means that some messages may not have been processed.</p>
+<dl class="section note"><dt>Note</dt><dd>This call does not wait for the drain completion (see <a class="el" href="group__sub_group.html#ga0408c9b6e4ad4078ac0267656ace222d" title="Blocks until the drain operation completes.">natsSubscription_WaitForDrainCompletion</a> for that).</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__sub_group.html#ga26c9736289d326fb7d6df7e2a0df72ab" title="Drains the subscription with a default timeout.">natsSubscription_Drain</a> </dd>
+<dd>
+<a class="el" href="group__sub_group.html#ga9c26a3f9584e7804060a48ec1b7e2a68" title="Drains the subscription with the specified timeout.">natsSubscription_DrainTimeout</a> </dd>
+<dd>
+<a class="el" href="group__sub_group.html#ga0408c9b6e4ad4078ac0267656ace222d" title="Blocks until the drain operation completes.">natsSubscription_WaitForDrainCompletion</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="gaea632f845d473e7461b134c0e7bf4077" name="gaea632f845d473e7461b134c0e7bf4077"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaea632f845d473e7461b134c0e7bf4077">&#9670;&#160;</a></span>natsSubscription_SetOnCompleteCB()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsSubscription_SetOnCompleteCB </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
+          <td class="paramname"><em>sub</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="group__callbacks_group.html#ga245131e64f1d0dff7edc8ed874a07e9a">natsOnCompleteCB</a>&#160;</td>
+          <td class="paramname"><em>cb</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">void *&#160;</td>
+          <td class="paramname"><em>closure</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >In order to make sure that an asynchronous subscription's message handler is no longer invoked once the subscription is closed (<a class="el" href="group__sub_group.html#gaee87f8be0e6c2a4693ba2cea070583ba" title="Unsubscribes.">natsSubscription_Unsubscribe</a>), the subscription should be closed from the message handler itslef.</p>
+<p >If the application closes the subscription from a different thread and immediately frees resources needed in the message handler, there is a risk of a crash since the subscription's message handler may still be invoked one last time or already in the process of executing.</p>
+<p >To address this, the user can set a callback that will be invoked after the subscription is closed and the message handler has returned. This applies to asynchronous subscriptions using their own dispatcher or using the library's delivery thread pool.</p>
+<dl class="section note"><dt>Note</dt><dd>You don't need to call this function if you are not freeing resources needed in the message handler or if you always close the subscription from the message handler itself.</dd>
+<dd>
+If you plan on calling this function, you should do so before calling <a class="el" href="group__sub_group.html#ga09f285de2746a6e27fc66efd60bd3116" title="Auto-Unsubscribes.">natsSubscription_AutoUnsubscribe</a>, since there is a risk that the subscription be removed as soon as <a class="el" href="group__sub_group.html#ga09f285de2746a6e27fc66efd60bd3116" title="Auto-Unsubscribes.">natsSubscription_AutoUnsubscribe</a> returns.</dd></dl>
+<p>Calling this function on a synchronous or closed subscription will return <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a273e92a0ff3b7eaf946b4b7fa6cc6c6c">NATS_INVALID_SUBSCRIPTION</a>.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__callbacks_group.html#ga245131e64f1d0dff7edc8ed874a07e9a" title="Callback used to notify that an object lifecycle is complete.">natsOnCompleteCB</a></dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object </td></tr>
+    <tr><td class="paramname">cb</td><td>the callback to invoke when the last message of a closed subscription has been dispatched </td></tr>
+    <tr><td class="paramname">closure</td><td>the pointer to a user defined object (possibly <code>NULL</code>) that will be passed to the callback </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a id="ga50a95dd96e9b714201679a015d62832f" name="ga50a95dd96e9b714201679a015d62832f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga50a95dd96e9b714201679a015d62832f">&#9670;&#160;</a></span>natsSubscription_Destroy()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void natsSubscription_Destroy </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *&#160;</td>
+          <td class="paramname"><em>sub</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Destroys the subscription object, freeing up memory. If not already done, this call will removes interest on the subject.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">sub</td><td>the pointer to the <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> object to destroy. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__sub_group.js b/doc/html/group__sub_group.js
new file mode 100644 (file)
index 0000000..7093fb4
--- /dev/null
@@ -0,0 +1,25 @@
+var group__sub_group =
+[
+    [ "natsSubscription_NoDeliveryDelay", "group__sub_group.html#ga38f1e41fc7619101fc4aa52014dd5428", null ],
+    [ "natsSubscription_NextMsg", "group__sub_group.html#ga6538a5d78dfb0f16514b94c8e74c11af", null ],
+    [ "natsSubscription_Unsubscribe", "group__sub_group.html#gaee87f8be0e6c2a4693ba2cea070583ba", null ],
+    [ "natsSubscription_AutoUnsubscribe", "group__sub_group.html#ga09f285de2746a6e27fc66efd60bd3116", null ],
+    [ "natsSubscription_QueuedMsgs", "group__sub_group.html#ga8a37b2d5290da3aecc05483d79e7e254", null ],
+    [ "natsSubscription_GetID", "group__sub_group.html#ga5a029a784c0a7f8b5800b48cc995db20", null ],
+    [ "natsSubscription_GetSubject", "group__sub_group.html#gadd4872b9fc5678a73f9ab04ce8428432", null ],
+    [ "natsSubscription_SetPendingLimits", "group__sub_group.html#ga68a7cea89e75c529a7dd3bb77303dda4", null ],
+    [ "natsSubscription_GetPendingLimits", "group__sub_group.html#ga786bb458981274fe717f266bd3b96d96", null ],
+    [ "natsSubscription_GetPending", "group__sub_group.html#gaca6262e2ef842caa701a9f233db72707", null ],
+    [ "natsSubscription_GetDelivered", "group__sub_group.html#ga476b7276d0b7f9946834d2bb2423e955", null ],
+    [ "natsSubscription_GetDropped", "group__sub_group.html#ga24f1636869e26661ce62c9c9f4d80823", null ],
+    [ "natsSubscription_GetMaxPending", "group__sub_group.html#ga0abc5d9afbc6b0c9c5adaf533904c968", null ],
+    [ "natsSubscription_ClearMaxPending", "group__sub_group.html#gafe31911d8372db401d33856465421710", null ],
+    [ "natsSubscription_GetStats", "group__sub_group.html#ga12b60cdb3aca7329edebc480ae86bfab", null ],
+    [ "natsSubscription_IsValid", "group__sub_group.html#ga5e6454bbc7a90b9694112d45bd8de903", null ],
+    [ "natsSubscription_Drain", "group__sub_group.html#ga26c9736289d326fb7d6df7e2a0df72ab", null ],
+    [ "natsSubscription_DrainTimeout", "group__sub_group.html#ga9c26a3f9584e7804060a48ec1b7e2a68", null ],
+    [ "natsSubscription_WaitForDrainCompletion", "group__sub_group.html#ga0408c9b6e4ad4078ac0267656ace222d", null ],
+    [ "natsSubscription_DrainCompletionStatus", "group__sub_group.html#ga9834bd02f67a25ac084d5ad71e146019", null ],
+    [ "natsSubscription_SetOnCompleteCB", "group__sub_group.html#gaea632f845d473e7461b134c0e7bf4077", null ],
+    [ "natsSubscription_Destroy", "group__sub_group.html#ga50a95dd96e9b714201679a015d62832f", null ]
+];
\ No newline at end of file
diff --git a/doc/html/group__types_group.html b/doc/html/group__types_group.html
new file mode 100644 (file)
index 0000000..3e66604
--- /dev/null
@@ -0,0 +1,1532 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Types</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__types_group.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#nested-classes">Classes</a> &#124;
+<a href="#typedef-members">Typedefs</a> &#124;
+<a href="#enum-members">Enumerations</a>  </div>
+  <div class="headertitle"><div class="title">Types</div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
+Classes</h2></td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnats_msg_list.html">natsMsgList</a></td></tr>
+<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A list of NATS messages.  <a href="structnats_msg_list.html#details">More...</a><br /></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_pub_options.html">jsPubOptions</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_placement.html">jsPlacement</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_external_stream.html">jsExternalStream</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_source.html">jsStreamSource</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_re_publish.html">jsRePublish</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_lost_stream_data.html">jsLostStreamData</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_state_subject.html">jsStreamStateSubject</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_state_subjects.html">jsStreamStateSubjects</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_state.html">jsStreamState</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_peer_info.html">jsPeerInfo</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_cluster_info.html">jsClusterInfo</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_source_info.html">jsStreamSourceInfo</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_info.html">jsStreamInfo</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_info_list.html">jsStreamInfoList</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_names_list.html">jsStreamNamesList</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_sequence_mismatch.html">jsConsumerSequenceMismatch</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_sub_options.html">jsSubOptions</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_sequence_pair.html">jsSequencePair</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_sequence_info.html">jsSequenceInfo</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_info_list.html">jsConsumerInfoList</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_names_list.html">jsConsumerNamesList</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_a_p_i_stats.html">jsAPIStats</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_account_limits.html">jsAccountLimits</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_tier.html">jsTier</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_account_info.html">jsAccountInfo</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_msg_meta_data.html">jsMsgMetaData</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_pub_ack.html">jsPubAck</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_pub_ack_err.html">jsPubAckErr</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_direct_get_msg_options.html">jsDirectGetMsgOptions</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_fetch_request.html">jsFetchRequest</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_options.html">jsOptions</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkv_config.html">kvConfig</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkv_watch_options.html">kvWatchOptions</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkv_purge_options.html">kvPurgeOptions</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkv_entry_list.html">kvEntryList</a></td></tr>
+<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A list of KeyValue store entries.  <a href="structkv_entry_list.html#details">More...</a><br /></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkv_keys_list.html">kvKeysList</a></td></tr>
+<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A list of KeyValue store keys.  <a href="structkv_keys_list.html#details">More...</a><br /></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
+Typedefs</h2></td></tr>
+<tr class="memitem:gaf88dca0a18efb5c5e994d265a9f04aec"><td class="memItemLeft" align="right" valign="top">typedef struct __natsConnection&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a></td></tr>
+<tr class="memdesc:gaf88dca0a18efb5c5e994d265a9f04aec"><td class="mdescLeft">&#160;</td><td class="mdescRight">A connection to a <code>NATS Server</code>.  <a href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">More...</a><br /></td></tr>
+<tr class="separator:gaf88dca0a18efb5c5e994d265a9f04aec"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga57a4b8c7109e2773878655722ce028aa"><td class="memItemLeft" align="right" valign="top">typedef struct __natsStatistics&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa">natsStatistics</a></td></tr>
+<tr class="memdesc:ga57a4b8c7109e2773878655722ce028aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Statistics of a <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a>.  <a href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa">More...</a><br /></td></tr>
+<tr class="separator:ga57a4b8c7109e2773878655722ce028aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga87158ec63b4f90f69e20451624ea01d8"><td class="memItemLeft" align="right" valign="top">typedef struct __natsSubscription&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a></td></tr>
+<tr class="memdesc:ga87158ec63b4f90f69e20451624ea01d8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Interest on a given subject.  <a href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">More...</a><br /></td></tr>
+<tr class="separator:ga87158ec63b4f90f69e20451624ea01d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gadcab54026c4ed78f344ce03ce31bb61a"><td class="memItemLeft" align="right" valign="top">typedef struct __natsMsg&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a></td></tr>
+<tr class="memdesc:gadcab54026c4ed78f344ce03ce31bb61a"><td class="mdescLeft">&#160;</td><td class="mdescRight">A structure holding a subject, optional reply and payload.  <a href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">More...</a><br /></td></tr>
+<tr class="separator:gadcab54026c4ed78f344ce03ce31bb61a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gabcc48b40a81fe302188f4ee06ea9c54e"><td class="memItemLeft" align="right" valign="top">typedef struct __natsOptions&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a></td></tr>
+<tr class="memdesc:gabcc48b40a81fe302188f4ee06ea9c54e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Way to configure a <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a>.  <a href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">More...</a><br /></td></tr>
+<tr class="separator:gabcc48b40a81fe302188f4ee06ea9c54e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga206c3d4d6f4f6f96fd2cae53a3df31c1"><td class="memItemLeft" align="right" valign="top">typedef char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga206c3d4d6f4f6f96fd2cae53a3df31c1">natsInbox</a></td></tr>
+<tr class="memdesc:ga206c3d4d6f4f6f96fd2cae53a3df31c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unique subject often used for point-to-point communication.  <a href="group__types_group.html#ga206c3d4d6f4f6f96fd2cae53a3df31c1">More...</a><br /></td></tr>
+<tr class="separator:ga206c3d4d6f4f6f96fd2cae53a3df31c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gafd5523161ec3783e79719cb9a9a66b5b"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structnats_msg_list.html">natsMsgList</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gafd5523161ec3783e79719cb9a9a66b5b">natsMsgList</a></td></tr>
+<tr class="memdesc:gafd5523161ec3783e79719cb9a9a66b5b"><td class="mdescLeft">&#160;</td><td class="mdescRight">A list of NATS messages.  <a href="group__types_group.html#gafd5523161ec3783e79719cb9a9a66b5b">More...</a><br /></td></tr>
+<tr class="separator:gafd5523161ec3783e79719cb9a9a66b5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaaf12cdd24c6cc23a57c20466c92ff8c1"><td class="memItemLeft" align="right" valign="top">typedef struct __jsCtx&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a></td></tr>
+<tr class="separator:gaaf12cdd24c6cc23a57c20466c92ff8c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga7bbea3575d35dcdbfc9b766b04269eb7"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_pub_options.html">jsPubOptions</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga7bbea3575d35dcdbfc9b766b04269eb7">jsPubOptions</a></td></tr>
+<tr class="separator:ga7bbea3575d35dcdbfc9b766b04269eb7"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga49d1138fac9da8b85d00a367081e91c9"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_placement.html">jsPlacement</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga49d1138fac9da8b85d00a367081e91c9">jsPlacement</a></td></tr>
+<tr class="separator:ga49d1138fac9da8b85d00a367081e91c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaef6601477f6456bebc229f7f38982a6c"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_external_stream.html">jsExternalStream</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gaef6601477f6456bebc229f7f38982a6c">jsExternalStream</a></td></tr>
+<tr class="separator:gaef6601477f6456bebc229f7f38982a6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gab4c43c87d81917aab748a50eee028449"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_stream_source.html">jsStreamSource</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gab4c43c87d81917aab748a50eee028449">jsStreamSource</a></td></tr>
+<tr class="separator:gab4c43c87d81917aab748a50eee028449"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gab991313d33ce270a882e4d0756c138f6"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_re_publish.html">jsRePublish</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gab991313d33ce270a882e4d0756c138f6">jsRePublish</a></td></tr>
+<tr class="separator:gab991313d33ce270a882e4d0756c138f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga26fd6a73df327ca3c271e46ddefc8acf"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_stream_config.html">jsStreamConfig</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga26fd6a73df327ca3c271e46ddefc8acf">jsStreamConfig</a></td></tr>
+<tr class="separator:ga26fd6a73df327ca3c271e46ddefc8acf"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf80828510450faf84bbf456e94f5b784"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_lost_stream_data.html">jsLostStreamData</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gaf80828510450faf84bbf456e94f5b784">jsLostStreamData</a></td></tr>
+<tr class="separator:gaf80828510450faf84bbf456e94f5b784"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga55dce2fa9ecd215716cc9ceece7dfefa"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_stream_state_subject.html">jsStreamStateSubject</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga55dce2fa9ecd215716cc9ceece7dfefa">jsStreamStateSubject</a></td></tr>
+<tr class="separator:ga55dce2fa9ecd215716cc9ceece7dfefa"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gae8b57d9c40364f97a705f3e61a1156b0"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_stream_state_subjects.html">jsStreamStateSubjects</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gae8b57d9c40364f97a705f3e61a1156b0">jsStreamStateSubjects</a></td></tr>
+<tr class="separator:gae8b57d9c40364f97a705f3e61a1156b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2bfd6de6ffc84d767482b3dd57cb9271"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_stream_state.html">jsStreamState</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga2bfd6de6ffc84d767482b3dd57cb9271">jsStreamState</a></td></tr>
+<tr class="separator:ga2bfd6de6ffc84d767482b3dd57cb9271"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga1e938dab794089f9329d7b7ece8f3e9b"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_peer_info.html">jsPeerInfo</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga1e938dab794089f9329d7b7ece8f3e9b">jsPeerInfo</a></td></tr>
+<tr class="separator:ga1e938dab794089f9329d7b7ece8f3e9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaaf92318ce94a1ae3547c9a7af5a3f4f6"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_cluster_info.html">jsClusterInfo</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gaaf92318ce94a1ae3547c9a7af5a3f4f6">jsClusterInfo</a></td></tr>
+<tr class="separator:gaaf92318ce94a1ae3547c9a7af5a3f4f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gab2f33f57188a550f2f747d4f27bc24bd"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_stream_source_info.html">jsStreamSourceInfo</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gab2f33f57188a550f2f747d4f27bc24bd">jsStreamSourceInfo</a></td></tr>
+<tr class="separator:gab2f33f57188a550f2f747d4f27bc24bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2629c9454996edf7914be36a9e44921b"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_stream_info.html">jsStreamInfo</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga2629c9454996edf7914be36a9e44921b">jsStreamInfo</a></td></tr>
+<tr class="separator:ga2629c9454996edf7914be36a9e44921b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga1e54c2a1bc94834d1670875fc151f565"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_stream_info_list.html">jsStreamInfoList</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga1e54c2a1bc94834d1670875fc151f565">jsStreamInfoList</a></td></tr>
+<tr class="separator:ga1e54c2a1bc94834d1670875fc151f565"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf4d31a4dc83b2805422beafb1f8fa000"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_stream_names_list.html">jsStreamNamesList</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gaf4d31a4dc83b2805422beafb1f8fa000">jsStreamNamesList</a></td></tr>
+<tr class="separator:gaf4d31a4dc83b2805422beafb1f8fa000"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga0483b2197c0ddd9082b48c2dd3fe7cee"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga0483b2197c0ddd9082b48c2dd3fe7cee">jsConsumerConfig</a></td></tr>
+<tr class="separator:ga0483b2197c0ddd9082b48c2dd3fe7cee"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gace471cd2cef1df797b2a1c6b485049bd"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_consumer_sequence_mismatch.html">jsConsumerSequenceMismatch</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gace471cd2cef1df797b2a1c6b485049bd">jsConsumerSequenceMismatch</a></td></tr>
+<tr class="separator:gace471cd2cef1df797b2a1c6b485049bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaccfaac2079656ffd40d003e4de5d2280"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_sub_options.html">jsSubOptions</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gaccfaac2079656ffd40d003e4de5d2280">jsSubOptions</a></td></tr>
+<tr class="separator:gaccfaac2079656ffd40d003e4de5d2280"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga39011d30b295759b7f6ca0a7539dff8f"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_sequence_pair.html">jsSequencePair</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga39011d30b295759b7f6ca0a7539dff8f">jsSequencePair</a></td></tr>
+<tr class="separator:ga39011d30b295759b7f6ca0a7539dff8f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga27e1a5d5b513f9eb7d61a17db71f8003"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_sequence_info.html">jsSequenceInfo</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga27e1a5d5b513f9eb7d61a17db71f8003">jsSequenceInfo</a></td></tr>
+<tr class="separator:ga27e1a5d5b513f9eb7d61a17db71f8003"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2f21bb79884e56a5613d7fe76b11b1e5"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga2f21bb79884e56a5613d7fe76b11b1e5">jsConsumerInfo</a></td></tr>
+<tr class="separator:ga2f21bb79884e56a5613d7fe76b11b1e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gadad3bf72baae970662248d82d9b05d0a"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_consumer_info_list.html">jsConsumerInfoList</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gadad3bf72baae970662248d82d9b05d0a">jsConsumerInfoList</a></td></tr>
+<tr class="separator:gadad3bf72baae970662248d82d9b05d0a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gad00ab4381eec504ada3272aa9ff8adb2"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_consumer_names_list.html">jsConsumerNamesList</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gad00ab4381eec504ada3272aa9ff8adb2">jsConsumerNamesList</a></td></tr>
+<tr class="separator:gad00ab4381eec504ada3272aa9ff8adb2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gad057a0107367ce5727975f3daf63ff75"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_a_p_i_stats.html">jsAPIStats</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gad057a0107367ce5727975f3daf63ff75">jsAPIStats</a></td></tr>
+<tr class="separator:gad057a0107367ce5727975f3daf63ff75"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaa889f706cce285adb9cea8aba0b76866"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_account_limits.html">jsAccountLimits</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gaa889f706cce285adb9cea8aba0b76866">jsAccountLimits</a></td></tr>
+<tr class="separator:gaa889f706cce285adb9cea8aba0b76866"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga1d48d3eb36b50c9ab6d8477dccf247d8"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_tier.html">jsTier</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga1d48d3eb36b50c9ab6d8477dccf247d8">jsTier</a></td></tr>
+<tr class="separator:ga1d48d3eb36b50c9ab6d8477dccf247d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga57cdc53b29a4fedb5a4140b6e64a4fab"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_account_info.html">jsAccountInfo</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga57cdc53b29a4fedb5a4140b6e64a4fab">jsAccountInfo</a></td></tr>
+<tr class="separator:ga57cdc53b29a4fedb5a4140b6e64a4fab"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gace9595b1a5ce3f7a13670367fd293b4a"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_msg_meta_data.html">jsMsgMetaData</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gace9595b1a5ce3f7a13670367fd293b4a">jsMsgMetaData</a></td></tr>
+<tr class="separator:gace9595b1a5ce3f7a13670367fd293b4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf1d5e436c5d41c5b9b96d84e3d2bc86f"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_pub_ack.html">jsPubAck</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gaf1d5e436c5d41c5b9b96d84e3d2bc86f">jsPubAck</a></td></tr>
+<tr class="separator:gaf1d5e436c5d41c5b9b96d84e3d2bc86f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gadb7c287bc86b92765fbe45a066b96f40"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_pub_ack_err.html">jsPubAckErr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gadb7c287bc86b92765fbe45a066b96f40">jsPubAckErr</a></td></tr>
+<tr class="separator:gadb7c287bc86b92765fbe45a066b96f40"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga85123afa00d522a249a5b2a8abd7e063"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_direct_get_msg_options.html">jsDirectGetMsgOptions</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga85123afa00d522a249a5b2a8abd7e063">jsDirectGetMsgOptions</a></td></tr>
+<tr class="separator:ga85123afa00d522a249a5b2a8abd7e063"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf11e6664c1f335a5287af71c703935fa"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_fetch_request.html">jsFetchRequest</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gaf11e6664c1f335a5287af71c703935fa">jsFetchRequest</a></td></tr>
+<tr class="separator:gaf11e6664c1f335a5287af71c703935fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga0e3a3b7cf89e7dfa955f0f8f3f1eb6e5"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_options.html">jsOptions</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga0e3a3b7cf89e7dfa955f0f8f3f1eb6e5">jsOptions</a></td></tr>
+<tr class="separator:ga0e3a3b7cf89e7dfa955f0f8f3f1eb6e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga054c05493dd3cfc5c3e7a665a424e54a"><td class="memItemLeft" align="right" valign="top">typedef struct __kvStore&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a></td></tr>
+<tr class="separator:ga054c05493dd3cfc5c3e7a665a424e54a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gad489fb4074f27427560ca71797db6191"><td class="memItemLeft" align="right" valign="top">typedef struct __kvEntry&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a></td></tr>
+<tr class="separator:gad489fb4074f27427560ca71797db6191"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gad3a0dd2dac950d5709ee5772b104fc80"><td class="memItemLeft" align="right" valign="top">typedef struct __kvStatus&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a></td></tr>
+<tr class="separator:gad3a0dd2dac950d5709ee5772b104fc80"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga526fa6d37e818784b94cdc1713f3a043"><td class="memItemLeft" align="right" valign="top">typedef struct __kvWatcher&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a></td></tr>
+<tr class="separator:ga526fa6d37e818784b94cdc1713f3a043"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga6d594b091b4bb46192336413066a8edf"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structkv_config.html">kvConfig</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga6d594b091b4bb46192336413066a8edf">kvConfig</a></td></tr>
+<tr class="separator:ga6d594b091b4bb46192336413066a8edf"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gac32f992fe797a1f7befc7dc3452640b6"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structkv_watch_options.html">kvWatchOptions</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gac32f992fe797a1f7befc7dc3452640b6">kvWatchOptions</a></td></tr>
+<tr class="separator:gac32f992fe797a1f7befc7dc3452640b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga90e8de23c4468005488bde690a2ffe9d"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structkv_purge_options.html">kvPurgeOptions</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga90e8de23c4468005488bde690a2ffe9d">kvPurgeOptions</a></td></tr>
+<tr class="separator:ga90e8de23c4468005488bde690a2ffe9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga0125d394a3cbae2a1713eed8fab7f78e"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structkv_entry_list.html">kvEntryList</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga0125d394a3cbae2a1713eed8fab7f78e">kvEntryList</a></td></tr>
+<tr class="memdesc:ga0125d394a3cbae2a1713eed8fab7f78e"><td class="mdescLeft">&#160;</td><td class="mdescRight">A list of KeyValue store entries.  <a href="group__types_group.html#ga0125d394a3cbae2a1713eed8fab7f78e">More...</a><br /></td></tr>
+<tr class="separator:ga0125d394a3cbae2a1713eed8fab7f78e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gab36492d9d4370337cfed80edce4144e0"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structkv_keys_list.html">kvKeysList</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gab36492d9d4370337cfed80edce4144e0">kvKeysList</a></td></tr>
+<tr class="memdesc:gab36492d9d4370337cfed80edce4144e0"><td class="mdescLeft">&#160;</td><td class="mdescRight">A list of KeyValue store keys.  <a href="group__types_group.html#gab36492d9d4370337cfed80edce4144e0">More...</a><br /></td></tr>
+<tr class="separator:gab36492d9d4370337cfed80edce4144e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga9e826493769d23086cfccefe95cdf64c"><td class="memItemLeft" align="right" valign="top">typedef struct __stanConnection&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a></td></tr>
+<tr class="memdesc:ga9e826493769d23086cfccefe95cdf64c"><td class="mdescLeft">&#160;</td><td class="mdescRight">A connection to a <code>NATS Streaming Server</code>.  <a href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">More...</a><br /></td></tr>
+<tr class="separator:ga9e826493769d23086cfccefe95cdf64c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gae4dae869fb614536f0f027c2e2660cc5"><td class="memItemLeft" align="right" valign="top">typedef struct __stanSubscription&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a></td></tr>
+<tr class="memdesc:gae4dae869fb614536f0f027c2e2660cc5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Interest on a given channel.  <a href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">More...</a><br /></td></tr>
+<tr class="separator:gae4dae869fb614536f0f027c2e2660cc5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2cf5db7703b42d97abe56a3e83b2a87d"><td class="memItemLeft" align="right" valign="top">typedef struct __stanMsg&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a></td></tr>
+<tr class="memdesc:ga2cf5db7703b42d97abe56a3e83b2a87d"><td class="mdescLeft">&#160;</td><td class="mdescRight">The Streaming message.  <a href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">More...</a><br /></td></tr>
+<tr class="separator:ga2cf5db7703b42d97abe56a3e83b2a87d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga13d64411878ba13a6ca39c915f2447c1"><td class="memItemLeft" align="right" valign="top">typedef struct __stanConnOptions&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a></td></tr>
+<tr class="memdesc:ga13d64411878ba13a6ca39c915f2447c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Way to configure a <a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c" title="A connection to a NATS Streaming Server.">stanConnection</a>.  <a href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">More...</a><br /></td></tr>
+<tr class="separator:ga13d64411878ba13a6ca39c915f2447c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga023712711f5c289663fc2223e83686d3"><td class="memItemLeft" align="right" valign="top">typedef struct __stanSubOptions&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a></td></tr>
+<tr class="memdesc:ga023712711f5c289663fc2223e83686d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Way to configure a <a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5" title="Interest on a given channel.">stanSubscription</a>.  <a href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">More...</a><br /></td></tr>
+<tr class="separator:ga023712711f5c289663fc2223e83686d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="enum-members" name="enum-members"></a>
+Enumerations</h2></td></tr>
+<tr class="memitem:ga410f8fb053efa02b2ca1de0c02fa4b6d"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga410f8fb053efa02b2ca1de0c02fa4b6d">jsRetentionPolicy</a> { <a class="el" href="group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6da6a2aa02f32acec6526d81f6e974e690f">js_LimitsPolicy</a> = 0
+, <a class="el" href="group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6dae874de4a787cfbec4c6d0eb1a3f05ebd">js_InterestPolicy</a>
+, <a class="el" href="group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6daf7e6581e69572691b01d1294a3c3a478">js_WorkQueuePolicy</a>
+ }</td></tr>
+<tr class="separator:ga410f8fb053efa02b2ca1de0c02fa4b6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga7f88b7d482488398074f9d1419a9b8c2"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga7f88b7d482488398074f9d1419a9b8c2">jsDiscardPolicy</a> { <a class="el" href="group__types_group.html#gga7f88b7d482488398074f9d1419a9b8c2abb31b828421634f1e6a1ef9359bc91f6">js_DiscardOld</a> = 0
+, <a class="el" href="group__types_group.html#gga7f88b7d482488398074f9d1419a9b8c2a99d7f2d740af26c340c0a4e2b72fb6ab">js_DiscardNew</a>
+ }</td></tr>
+<tr class="separator:ga7f88b7d482488398074f9d1419a9b8c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga1802a53c79e667f093bba033b16adc98"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga1802a53c79e667f093bba033b16adc98">jsStorageType</a> { <a class="el" href="group__types_group.html#gga1802a53c79e667f093bba033b16adc98a1d9dad1854cf374b22e3688b98284dec">js_FileStorage</a> = 0
+, <a class="el" href="group__types_group.html#gga1802a53c79e667f093bba033b16adc98a428ed10448726ad01c1db77a7f748314">js_MemoryStorage</a>
+ }</td></tr>
+<tr class="separator:ga1802a53c79e667f093bba033b16adc98"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga117ed2c35f89ef3144540ed9cbadc818"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga117ed2c35f89ef3144540ed9cbadc818">jsDeliverPolicy</a> { <br />
+&#160;&#160;<a class="el" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818ac692ba1363103768ac4bb58695549758">js_DeliverAll</a> = 0
+, <a class="el" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818abbd81d6c4e0f17f30e2186f1335e991d">js_DeliverLast</a>
+, <a class="el" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a82b8d36e17391212398984f92db9c381">js_DeliverNew</a>
+, <a class="el" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a06299d9c8262a16306ba6cc16d293c5e">js_DeliverByStartSequence</a>
+, <br />
+&#160;&#160;<a class="el" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a33317133d42f21bf5919827a691543f6">js_DeliverByStartTime</a>
+, <a class="el" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818abb50ebcd2fbafe27038c966121b9407b">js_DeliverLastPerSubject</a>
+<br />
+ }</td></tr>
+<tr class="separator:ga117ed2c35f89ef3144540ed9cbadc818"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga8fcb50e6e7312834791f9e237d28e873"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga8fcb50e6e7312834791f9e237d28e873">jsAckPolicy</a> { <a class="el" href="group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873a02d46a6395933c55c95ee5194bb6b80e">js_AckExplicit</a> = 0
+, <a class="el" href="group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873afd91fe31cf57c68863ca3090b07c296c">js_AckNone</a>
+, <a class="el" href="group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873a1232af28bf4e4b82e962174f1432ed4a">js_AckAll</a>
+ }</td></tr>
+<tr class="separator:ga8fcb50e6e7312834791f9e237d28e873"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga8650faf52b0b6b23df376eebeb9d0354"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga8650faf52b0b6b23df376eebeb9d0354">jsReplayPolicy</a> { <a class="el" href="group__types_group.html#gga8650faf52b0b6b23df376eebeb9d0354a2c4a1e2b75f31dd69a89b541d75afa44">js_ReplayInstant</a> = 0
+, <a class="el" href="group__types_group.html#gga8650faf52b0b6b23df376eebeb9d0354a6ee3851dac5c90a61492193dd55931f5">js_ReplayOriginal</a>
+ }</td></tr>
+<tr class="separator:ga8650faf52b0b6b23df376eebeb9d0354"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga89db3bd6bf11af3ac5eb3ab560d16332"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga89db3bd6bf11af3ac5eb3ab560d16332">kvOperation</a> { <a class="el" href="group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332a0b7a6bef67e4220f5f0c4075f2ed16b6">kvOp_Unknown</a> = 0
+, <a class="el" href="group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332acc0e1da3c292cb7eb19d909c9dfd788a">kvOp_Put</a>
+, <a class="el" href="group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332a4efb91331f3307128c75af5b23362f83">kvOp_Delete</a>
+, <a class="el" href="group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332aee19ab8144bf518e251ea2004309b657">kvOp_Purge</a>
+ }</td></tr>
+<tr class="separator:ga89db3bd6bf11af3ac5eb3ab560d16332"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<p >NATS Types. </p>
+<h2 class="groupheader">Typedef Documentation</h2>
+<a id="gaf88dca0a18efb5c5e994d265a9f04aec" name="gaf88dca0a18efb5c5e994d265a9f04aec"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaf88dca0a18efb5c5e994d265a9f04aec">&#9670;&#160;</a></span>natsConnection</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct __natsConnection <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >A <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a> represents a bare connection to a <code>NATS Server</code>. It will send and receive byte array payloads. </p>
+
+</div>
+</div>
+<a id="ga57a4b8c7109e2773878655722ce028aa" name="ga57a4b8c7109e2773878655722ce028aa"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga57a4b8c7109e2773878655722ce028aa">&#9670;&#160;</a></span>natsStatistics</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct __natsStatistics <a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa">natsStatistics</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Tracks various statistics received and sent on a connection, including counts for messages and bytes. </p>
+
+</div>
+</div>
+<a id="ga87158ec63b4f90f69e20451624ea01d8" name="ga87158ec63b4f90f69e20451624ea01d8"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga87158ec63b4f90f69e20451624ea01d8">&#9670;&#160;</a></span>natsSubscription</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct __natsSubscription <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >A <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8" title="Interest on a given subject.">natsSubscription</a> represents interest in a given subject. </p>
+
+</div>
+</div>
+<a id="gadcab54026c4ed78f344ce03ce31bb61a" name="gadcab54026c4ed78f344ce03ce31bb61a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gadcab54026c4ed78f344ce03ce31bb61a">&#9670;&#160;</a></span>natsMsg</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct __natsMsg <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p ><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a> is a structure used by Subscribers and <a class="el" href="group__conn_pub_group.html#ga74511acd87385931112c45c48c2a14ba" title="Publishes a message on a subject.">natsConnection_PublishMsg()</a>. </p>
+
+</div>
+</div>
+<a id="gabcc48b40a81fe302188f4ee06ea9c54e" name="gabcc48b40a81fe302188f4ee06ea9c54e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gabcc48b40a81fe302188f4ee06ea9c54e">&#9670;&#160;</a></span>natsOptions</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct __natsOptions <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Options can be used to create a customized <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a>. </p>
+
+</div>
+</div>
+<a id="ga206c3d4d6f4f6f96fd2cae53a3df31c1" name="ga206c3d4d6f4f6f96fd2cae53a3df31c1"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga206c3d4d6f4f6f96fd2cae53a3df31c1">&#9670;&#160;</a></span>natsInbox</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef char <a class="el" href="group__types_group.html#ga206c3d4d6f4f6f96fd2cae53a3df31c1">natsInbox</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This can be used as the reply for a request. Inboxes are meant to be unique so that replies can be sent to a specific subscriber. That being said, inboxes can be shared across multiple subscribers if desired. </p>
+
+</div>
+</div>
+<a id="gafd5523161ec3783e79719cb9a9a66b5b" name="gafd5523161ec3783e79719cb9a9a66b5b"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gafd5523161ec3783e79719cb9a9a66b5b">&#9670;&#160;</a></span>natsMsgList</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structnats_msg_list.html">natsMsgList</a> <a class="el" href="structnats_msg_list.html">natsMsgList</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Used by some APIs which return a list of <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a> objects.</p>
+<p >Those APIs will not create the object, but instead initialize the object to which a pointer to that object will be passed to it. Typically, the user will define the object on the stack and pass a pointer to this object to APIs that require a pointer to a <a class="el" href="structnats_msg_list.html" title="A list of NATS messages.">natsMsgList</a> object.</p>
+<p >Similarly, calling <a class="el" href="group__msg_group.html#ga1a091d24f939d881bf04fba78b8995c2" title="Destroys this list of messages.">natsMsgList_Destroy</a> will call <a class="el" href="group__msg_group.html#ga9e9590018284939f43f60964283f33ae" title="Destroys the message object.">natsMsg_Destroy</a> on any message still in the list, free the array containing pointers to the messages, but not free the <a class="el" href="structnats_msg_list.html" title="A list of NATS messages.">natsMsgList</a> object itself.</p>
+<dl class="section note"><dt>Note</dt><dd>If the user wants to keep some of the messages from the list, the pointers of those messages in the <code>Msgs</code> array should be set to <code>NULL</code>. The value <code>Count</code> MUST not be changed. The function <a class="el" href="group__msg_group.html#ga1a091d24f939d881bf04fba78b8995c2" title="Destroys this list of messages.">natsMsgList_Destroy</a> will iterate through all pointers in the list and only destroy the ones that have not been set to <code>NULL</code>.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__msg_group.html#ga1a091d24f939d881bf04fba78b8995c2" title="Destroys this list of messages.">natsMsgList_Destroy</a> </dd></dl>
+
+</div>
+</div>
+<a id="gaaf12cdd24c6cc23a57c20466c92ff8c1" name="gaaf12cdd24c6cc23a57c20466c92ff8c1"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaaf12cdd24c6cc23a57c20466c92ff8c1">&#9670;&#160;</a></span>jsCtx</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct __jsCtx <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >The JetStream context. Use for JetStream assets management and communication.</p>
+<dl class="section warning"><dt>Warning</dt><dd>A context MUST not be destroyed concurrently with <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> API calls (for instance <a class="el" href="group__js_pub_group.html#gac6ba005531c82d9f0efa88dd6b458477" title="Publishes data on a subject to JetStream.">js_Publish</a> or <a class="el" href="group__js_pub_group.html#ga069dfd6f0f3d96f1ff8bf2372e59900c" title="Publishes data to JetStream but does not wait for a jsPubAck.">js_PublishAsync</a>, etc...). However, it is safe to destroy the context while a <a class="el" href="group__callbacks_group.html#ga954768cc1d3388bb6ab723e777647992" title="Callback used to process asynchronous publish errors from JetStream.">jsPubAckErrHandler</a> callback is running or while inside <a class="el" href="group__js_pub_group.html#ga24813ee9a58f00c0f21d10ab9c93b81d" title="Wait for all outstanding messages to be acknowledged.">js_PublishAsyncComplete</a>. </dd></dl>
+
+</div>
+</div>
+<a id="ga7bbea3575d35dcdbfc9b766b04269eb7" name="ga7bbea3575d35dcdbfc9b766b04269eb7"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga7bbea3575d35dcdbfc9b766b04269eb7">&#9670;&#160;</a></span>jsPubOptions</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structjs_pub_options.html">jsPubOptions</a> <a class="el" href="structjs_pub_options.html">jsPubOptions</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >JetStream publish options.</p>
+<p >These are options that you can provide to JetStream publish APIs.</p>
+<p >The common usage will be to initialize a structure on the stack by calling <a class="el" href="group__js_pub_group.html#gaf09f333a8675a8060c5ede07a6bdeef9" title="Initializes a publish options structure.">jsPubOptions_Init</a>. Note that strings are owned by the application and need to be valid for the duration of the API call this object is passed to.</p>
+<dl class="section note"><dt>Note</dt><dd>It is the user responsibility to free the strings if they have been allocated.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__js_pub_group.html#gaf09f333a8675a8060c5ede07a6bdeef9" title="Initializes a publish options structure.">jsPubOptions_Init</a> </dd></dl>
+
+</div>
+</div>
+<a id="ga49d1138fac9da8b85d00a367081e91c9" name="ga49d1138fac9da8b85d00a367081e91c9"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga49d1138fac9da8b85d00a367081e91c9">&#9670;&#160;</a></span>jsPlacement</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structjs_placement.html">jsPlacement</a> <a class="el" href="structjs_placement.html">jsPlacement</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Used to guide placement of streams in clustered JetStream.</p>
+<p >Initialize the object with <a class="el" href="group__js_assets_group.html#ga223691e6831072a0b8f8103a778293b0" title="Initializes a placement configuration structure.">jsPlacement_Init</a>.</p>
+<dl class="section note"><dt>Note</dt><dd>The strings are applications owned and will not be freed by the library.</dd></dl>
+<p>See <a class="el" href="structjs_stream_config.html">jsStreamConfig</a> for information on how to configure a stream.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__js_assets_group.html#ga223691e6831072a0b8f8103a778293b0" title="Initializes a placement configuration structure.">jsPlacement_Init</a> </dd></dl>
+
+</div>
+</div>
+<a id="gaef6601477f6456bebc229f7f38982a6c" name="gaef6601477f6456bebc229f7f38982a6c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaef6601477f6456bebc229f7f38982a6c">&#9670;&#160;</a></span>jsExternalStream</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structjs_external_stream.html">jsExternalStream</a> <a class="el" href="structjs_external_stream.html">jsExternalStream</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Allows you to qualify access to a stream source in another account.</p>
+<p >Initialize the object with <a class="el" href="group__js_assets_group.html#ga81aebebcd79922104720da51e95020d4" title="Initializes an external stream configuration structure.">jsExternalStream_Init</a>.</p>
+<dl class="section note"><dt>Note</dt><dd>The strings are applications owned and will not be freed by the library.</dd></dl>
+<p>See <a class="el" href="structjs_stream_config.html">jsStreamConfig</a> for information on how to configure a stream. </p>
+
+</div>
+</div>
+<a id="gab4c43c87d81917aab748a50eee028449" name="gab4c43c87d81917aab748a50eee028449"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gab4c43c87d81917aab748a50eee028449">&#9670;&#160;</a></span>jsStreamSource</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structjs_stream_source.html">jsStreamSource</a> <a class="el" href="structjs_stream_source.html">jsStreamSource</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Dictates how streams can source from other streams.</p>
+<p >Initialize the object with <a class="el" href="group__js_assets_group.html#ga7fe8e0bf98a38eb59372e7cd78aaaf56" title="Initializes a stream source configuration structure.">jsStreamSource_Init</a>.</p>
+<dl class="section note"><dt>Note</dt><dd>The strings are applications owned and will not be freed by the library.</dd>
+<dd>
+The <code>OptStartTime</code> needs to be expressed as the number of nanoseconds passed since 00:00:00 UTC Thursday, 1 January 1970.</dd></dl>
+<p>See <a class="el" href="structjs_stream_config.html">jsStreamConfig</a> for information on how to configure a stream. </p>
+
+</div>
+</div>
+<a id="gab991313d33ce270a882e4d0756c138f6" name="gab991313d33ce270a882e4d0756c138f6"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gab991313d33ce270a882e4d0756c138f6">&#9670;&#160;</a></span>jsRePublish</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structjs_re_publish.html">jsRePublish</a> <a class="el" href="structjs_re_publish.html">jsRePublish</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Allows a source subject to be mapped to a destination subject for republishing. </p>
+
+</div>
+</div>
+<a id="ga26fd6a73df327ca3c271e46ddefc8acf" name="ga26fd6a73df327ca3c271e46ddefc8acf"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga26fd6a73df327ca3c271e46ddefc8acf">&#9670;&#160;</a></span>jsStreamConfig</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structjs_stream_config.html">jsStreamConfig</a> <a class="el" href="structjs_stream_config.html">jsStreamConfig</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Configuration of a JetStream stream.</p>
+<p >There are sensible defaults for most. If no subjects are given the name will be used as the only subject.</p>
+<p >In order to add/update a stream, a configuration needs to be set. The typical usage would be to initialize all required objects on the stack and configure them, then pass the pointer to the configuration to <a class="el" href="group__js_assets_group.html#ga5efc5136d33ba52161e6732f88f1ee75" title="Creates a stream.">js_AddStream</a> or <a class="el" href="group__js_assets_group.html#ga75a5c44304e24481c67e17fbccc15c31" title="Updates a stream.">js_UpdateStream</a>.</p>
+<dl class="section note"><dt>Note</dt><dd>The strings are applications owned and will not be freed by the library.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__js_assets_group.html#gac230f71dbdc4d10bc7471d01763881d6" title="Initializes a streaming configuration structure.">jsStreamConfig_Init</a></dd></dl>
+<div class="fragment"><div class="line">jsStreamConfig   sc;</div>
+<div class="line">jsPlacement      p;</div>
+<div class="line">jsStreamSource   m;</div>
+<div class="line">jsExternalStream esm;</div>
+<div class="line">jsStreamSource   s1;</div>
+<div class="line">jsStreamSource   s2;</div>
+<div class="line">jsExternalStream esmS2;</div>
+<div class="line">const char       *subjects[]     = {&quot;foo&quot;, &quot;bar&quot;};</div>
+<div class="line">const char       *tags[]         = {&quot;tag1&quot;, &quot;tag2&quot;};</div>
+<div class="line">jsStreamSource   *sources[]      = {&amp;s1, &amp;s2};</div>
+<div class="line">jsRePublish      rp;</div>
+<div class="line"> </div>
+<div class="line">jsStreamConfig_Init(&amp;sc);</div>
+<div class="line"> </div>
+<div class="line">jsPlacement_Init(&amp;p);</div>
+<div class="line">p.Cluster = &quot;MyCluster&quot;;</div>
+<div class="line">p.Tags = tags;</div>
+<div class="line">p.TagsLen = 2;</div>
+<div class="line"> </div>
+<div class="line">jsStreamSource_Init(&amp;m);</div>
+<div class="line">m.Name = &quot;AStream&quot;;</div>
+<div class="line">m.OptStartSeq = 100;</div>
+<div class="line">m.FilterSubject = &quot;foo&quot;;</div>
+<div class="line">jsExternalStream_Init(&amp;esm);</div>
+<div class="line">esm.APIPrefix = &quot;mirror.prefix.&quot;;</div>
+<div class="line">esm.DeliverPrefix = &quot;deliver.prefix.&quot;;</div>
+<div class="line">m.External = &amp;esm;</div>
+<div class="line"> </div>
+<div class="line">jsStreamSource_Init(&amp;s1);</div>
+<div class="line">s1.Name = &quot;StreamOne&quot;;</div>
+<div class="line">s1.OptStartSeq = 10;</div>
+<div class="line">s1.FilterSubject = &quot;stream.one&quot;;</div>
+<div class="line"> </div>
+<div class="line">jsStreamSource_Init(&amp;s2);</div>
+<div class="line">s2.Name = &quot;StreamTwo&quot;;</div>
+<div class="line">s2.FilterSubject = &quot;stream.two&quot;;</div>
+<div class="line">jsExternalStream_Init(&amp;esmS2);</div>
+<div class="line">esmS2.APIPrefix = &quot;mirror.prefix.&quot;;</div>
+<div class="line">esmS2.DeliverPrefix = &quot;deliver.prefix.&quot;;</div>
+<div class="line">s2.External = &amp;esmS2;</div>
+<div class="line"> </div>
+<div class="line">sc.Name = &quot;MyStream&quot;;</div>
+<div class="line">sc.Subjects = subjects;</div>
+<div class="line">sc.SubjectsLen = 2;</div>
+<div class="line">sc.Retention = js_InterestPolicy;</div>
+<div class="line">sc.Replicas = 3;</div>
+<div class="line">sc.Placement = &amp;p;</div>
+<div class="line">sc.Mirror = &amp;m;</div>
+<div class="line">sc.Sources = sources;</div>
+<div class="line">sc.SourcesLen = 2;</div>
+<div class="line"> </div>
+<div class="line">// For RePublish subject:</div>
+<div class="line">jsRePublish_Init(&amp;rp);</div>
+<div class="line">rp.Source = &quot;&gt;&quot;;</div>
+<div class="line">rp.Destination = &quot;RP.&gt;&quot;;</div>
+<div class="line">sc.RePublish = &amp;rp;</div>
+<div class="line"> </div>
+<div class="line">s = js_AddStream(&amp;si, js, &amp;sc, NULL, &amp;jerr);</div>
+</div><!-- fragment --> 
+</div>
+</div>
+<a id="gaf80828510450faf84bbf456e94f5b784" name="gaf80828510450faf84bbf456e94f5b784"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaf80828510450faf84bbf456e94f5b784">&#9670;&#160;</a></span>jsLostStreamData</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structjs_lost_stream_data.html">jsLostStreamData</a> <a class="el" href="structjs_lost_stream_data.html">jsLostStreamData</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Information about messages that have been lost </p>
+
+</div>
+</div>
+<a id="ga55dce2fa9ecd215716cc9ceece7dfefa" name="ga55dce2fa9ecd215716cc9ceece7dfefa"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga55dce2fa9ecd215716cc9ceece7dfefa">&#9670;&#160;</a></span>jsStreamStateSubject</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structjs_stream_state_subject.html">jsStreamStateSubject</a> <a class="el" href="structjs_stream_state_subject.html">jsStreamStateSubject</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This indicate that the given <code>Subject</code> in a stream contains <code>Msgs</code> messages.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="structjs_stream_state_subjects.html">jsStreamStateSubjects</a> </dd></dl>
+
+</div>
+</div>
+<a id="gae8b57d9c40364f97a705f3e61a1156b0" name="gae8b57d9c40364f97a705f3e61a1156b0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gae8b57d9c40364f97a705f3e61a1156b0">&#9670;&#160;</a></span>jsStreamStateSubjects</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structjs_stream_state_subjects.html">jsStreamStateSubjects</a> <a class="el" href="structjs_stream_state_subjects.html">jsStreamStateSubjects</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >List of subjects optionally returned in the stream information request.</p>
+<p >This structure indicates the number of elements in the list, that is, the list contains <code>Count</code> <a class="el" href="structjs_stream_state_subject.html">jsStreamStateSubject</a> elements.</p>
+<p >To get this list in <a class="el" href="structjs_stream_state.html">jsStreamState</a>, you have to ask for it through <a class="el" href="structjs_options.html">jsOptions</a>.</p>
+<div class="fragment"><div class="line">jsStreamInfo *si = NULL;</div>
+<div class="line">jsOptions    o;</div>
+<div class="line"> </div>
+<div class="line">jsOptions_Init(&amp;o);</div>
+<div class="line">o.Stream.Info.SubjectsFilter = &quot;foo.&gt;&quot;;</div>
+<div class="line">s = js_GetStreamInfo(&amp;si, js, &quot;MY_STREAM&quot;, &amp;o, &amp;jerr);</div>
+<div class="line"> </div>
+<div class="line">// handle errors and assume si-&gt;State.Subjects is not NULL</div>
+<div class="line"> </div>
+<div class="line">for (i=0; i&lt;si-&gt;State.Subjects-&gt;Count; i++)</div>
+<div class="line">{</div>
+<div class="line">     jsStreamStateSubject *subj = &amp;(si-&gt;State.Subjects-&gt;List[i]);</div>
+<div class="line">     printf(&quot;Subject=%s Messages count=%d\n&quot;, subj-&gt;Subject, (int) subj-&gt;Msgs);</div>
+<div class="line">}</div>
+</div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><a class="el" href="structjs_stream_state_subject.html">jsStreamStateSubject</a> </dd>
+<dd>
+<a class="el" href="group__js_assets_group.html#ga94cb23a35516b7779de28fcbb263180a" title="Retreives information from a stream.">js_GetStreamInfo</a> </dd>
+<dd>
+jsOptions.Stream.Info.SubjectsFilter </dd></dl>
+
+</div>
+</div>
+<a id="ga2bfd6de6ffc84d767482b3dd57cb9271" name="ga2bfd6de6ffc84d767482b3dd57cb9271"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga2bfd6de6ffc84d767482b3dd57cb9271">&#9670;&#160;</a></span>jsStreamState</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structjs_stream_state.html">jsStreamState</a> <a class="el" href="structjs_stream_state.html">jsStreamState</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Information about the given stream</p>
+<dl class="section note"><dt>Note</dt><dd><code>FirstTime</code> and <code>LastTime</code> are message timestamps expressed as the number of nanoseconds passed since 00:00:00 UTC Thursday, 1 January 1970. </dd></dl>
+
+</div>
+</div>
+<a id="ga1e938dab794089f9329d7b7ece8f3e9b" name="ga1e938dab794089f9329d7b7ece8f3e9b"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga1e938dab794089f9329d7b7ece8f3e9b">&#9670;&#160;</a></span>jsPeerInfo</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structjs_peer_info.html">jsPeerInfo</a> <a class="el" href="structjs_peer_info.html">jsPeerInfo</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Information about all the peers in the cluster that are supporting the stream or consumer. </p>
+
+</div>
+</div>
+<a id="gaaf92318ce94a1ae3547c9a7af5a3f4f6" name="gaaf92318ce94a1ae3547c9a7af5a3f4f6"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaaf92318ce94a1ae3547c9a7af5a3f4f6">&#9670;&#160;</a></span>jsClusterInfo</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structjs_cluster_info.html">jsClusterInfo</a> <a class="el" href="structjs_cluster_info.html">jsClusterInfo</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Information about the underlying set of servers that make up the stream or consumer. </p>
+
+</div>
+</div>
+<a id="gab2f33f57188a550f2f747d4f27bc24bd" name="gab2f33f57188a550f2f747d4f27bc24bd"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gab2f33f57188a550f2f747d4f27bc24bd">&#9670;&#160;</a></span>jsStreamSourceInfo</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structjs_stream_source_info.html">jsStreamSourceInfo</a> <a class="el" href="structjs_stream_source_info.html">jsStreamSourceInfo</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Information about an upstream stream source. </p>
+
+</div>
+</div>
+<a id="ga2629c9454996edf7914be36a9e44921b" name="ga2629c9454996edf7914be36a9e44921b"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga2629c9454996edf7914be36a9e44921b">&#9670;&#160;</a></span>jsStreamInfo</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structjs_stream_info.html">jsStreamInfo</a> <a class="el" href="structjs_stream_info.html">jsStreamInfo</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Configuration and current state for this stream.</p>
+<dl class="section note"><dt>Note</dt><dd><code>Created</code> is the timestamp when the stream was created, expressed as the number of nanoseconds passed since 00:00:00 UTC Thursday, 1 January 1970. </dd></dl>
+
+</div>
+</div>
+<a id="ga1e54c2a1bc94834d1670875fc151f565" name="ga1e54c2a1bc94834d1670875fc151f565"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga1e54c2a1bc94834d1670875fc151f565">&#9670;&#160;</a></span>jsStreamInfoList</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structjs_stream_info_list.html">jsStreamInfoList</a> <a class="el" href="structjs_stream_info_list.html">jsStreamInfoList</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >List of stream information objects returned by <a class="el" href="group__js_assets_group.html#ga531d91de372f0dffb8d64abecf88b0c0" title="Retrieves the list of all available streams.">js_Streams</a></p>
+<dl class="section note"><dt>Note</dt><dd>Once done, the list should be destroyed calling <a class="el" href="group__js_assets_group.html#ga38cdcc339eb8976d23296b99aa37d629" title="Destroys the stream information list object.">jsStreamInfoList_Destroy</a></dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__js_assets_group.html#ga38cdcc339eb8976d23296b99aa37d629" title="Destroys the stream information list object.">jsStreamInfoList_Destroy</a> </dd></dl>
+
+</div>
+</div>
+<a id="gaf4d31a4dc83b2805422beafb1f8fa000" name="gaf4d31a4dc83b2805422beafb1f8fa000"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaf4d31a4dc83b2805422beafb1f8fa000">&#9670;&#160;</a></span>jsStreamNamesList</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structjs_stream_names_list.html">jsStreamNamesList</a> <a class="el" href="structjs_stream_names_list.html">jsStreamNamesList</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >List of stream names returned by <a class="el" href="group__js_assets_group.html#gac3dfc87863dbbb3c959ecde4bce905bc" title="Retrieves the list of all available stream names.">js_StreamNames</a></p>
+<dl class="section note"><dt>Note</dt><dd>Once done, the list should be destroyed calling <a class="el" href="group__js_assets_group.html#gaf8644f281d4e24893a6a170b4f7faa65" title="Destroys the stream names list object.">jsStreamNamesList_Destroy</a></dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__js_assets_group.html#gaf8644f281d4e24893a6a170b4f7faa65" title="Destroys the stream names list object.">jsStreamNamesList_Destroy</a> </dd></dl>
+
+</div>
+</div>
+<a id="ga0483b2197c0ddd9082b48c2dd3fe7cee" name="ga0483b2197c0ddd9082b48c2dd3fe7cee"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga0483b2197c0ddd9082b48c2dd3fe7cee">&#9670;&#160;</a></span>jsConsumerConfig</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a> <a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Configuration of a JetStream consumer.</p>
+<p >In order to add a consumer, a configuration needs to be set. The typical usage would be to initialize all required objects on the stack and configure them, then pass the pointer to the configuration to <a class="el" href="group__js_assets_group.html#gaf2efb63db150e782d9007090b49d4115" title="Adds a JetStream consumer.">js_AddConsumer</a>.</p>
+<dl class="section note"><dt>Note</dt><dd><code>OptStartTime</code> needs to be expressed as the number of nanoseconds passed since 00:00:00 UTC Thursday, 1 January 1970.</dd>
+<dd>
+The strings are applications owned and will not be freed by the library.</dd>
+<dd>
+<code>SampleFrequency</code> is a sampling value, represented as a string such as "50" for 50%, that causes the server to produce advisories for consumer ack metrics.</dd>
+<dd>
+<code>Durable</code> cannot contain the character ".".</dd>
+<dd>
+<code>HeadersOnly</code> means that the subscription will not receive any message payload, instead, it will receive only messages headers (if present) with the addition of the header <a class="el" href="nats_8h.html#a5ce9005964bd9cf0604a9ef1afa87ea4" title="Message header for JetStream messages representing the message payload size.">JSMsgSize</a> ("Nats-Msg-Size"), whose value is the payload size.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__js_assets_group.html#ga3381bb05c05bf4a8979adde68d37dd66" title="Initializes a consumer configuration structure.">jsConsumerConfig_Init</a></dd></dl>
+<div class="fragment"><div class="line">jsConsumerInfo   *ci = NULL;</div>
+<div class="line">jsConsumerConfig cc;</div>
+<div class="line"> </div>
+<div class="line">jsConsumerConfig_Init(&amp;cc);</div>
+<div class="line">cc.Durable = &quot;MY_DURABLE&quot;;</div>
+<div class="line">cc.DeliverSubject = &quot;foo&quot;;</div>
+<div class="line">cc.DeliverPolicy = js_DeliverNew;</div>
+<div class="line"> </div>
+<div class="line">s = js_AddConsumer(&amp;ci, js, &amp;cc, NULL, &amp;jerr);</div>
+</div><!-- fragment --> 
+</div>
+</div>
+<a id="gace471cd2cef1df797b2a1c6b485049bd" name="gace471cd2cef1df797b2a1c6b485049bd"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gace471cd2cef1df797b2a1c6b485049bd">&#9670;&#160;</a></span>jsConsumerSequenceMismatch</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structjs_consumer_sequence_mismatch.html">jsConsumerSequenceMismatch</a> <a class="el" href="structjs_consumer_sequence_mismatch.html">jsConsumerSequenceMismatch</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This represents a consumer sequence mismatch between the server and client views.</p>
+<p >This can help applications find out if messages have been missed. Without this and during a disconnect, it would be possible that a subscription is not aware that it missed messages from the server. When acknowledgment mode is other than <a class="el" href="group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873afd91fe31cf57c68863ca3090b07c296c" title="Requires no acks for delivered messages.">js_AckNone</a>, messages would ultimately be redelivered, but for <a class="el" href="group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873afd91fe31cf57c68863ca3090b07c296c" title="Requires no acks for delivered messages.">js_AckNone</a>, they would not. But even with an acknowledgment mode this may help finding sooner that something went wrong and let the application decide if it wants to recreate the subscription starting at a given sequence.</p>
+<p >The gap of missing messages could be calculated as <code>ConsumerServer-ConsumerClient</code>.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__js_sub_group.html#ga0daed9f0d2d00cb14314ecc180a6fa84" title="Returns the consumer sequence mismatch information.">natsSubscription_GetSequenceMismatch</a> </dd></dl>
+
+</div>
+</div>
+<a id="gaccfaac2079656ffd40d003e4de5d2280" name="gaccfaac2079656ffd40d003e4de5d2280"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaccfaac2079656ffd40d003e4de5d2280">&#9670;&#160;</a></span>jsSubOptions</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structjs_sub_options.html">jsSubOptions</a> <a class="el" href="structjs_sub_options.html">jsSubOptions</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >JetStream subscribe options.</p>
+<p >These are options that you can provide to JetStream subscribe APIs.</p>
+<p >The common usage will be to initialize a structure on the stack by calling <a class="el" href="group__js_sub_group.html#ga472adb949d1af9d8f07bda99f5d7f3f8" title="Initializes a subscribe options structure.">jsSubOptions_Init</a>. Note that strings are owned by the application and need to be valid for the duration of the API call this object is passed to.</p>
+<dl class="section note"><dt>Note</dt><dd>It is the user responsibility to free the strings if they have been allocated.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__js_sub_group.html#ga472adb949d1af9d8f07bda99f5d7f3f8" title="Initializes a subscribe options structure.">jsSubOptions_Init</a> </dd></dl>
+
+</div>
+</div>
+<a id="ga39011d30b295759b7f6ca0a7539dff8f" name="ga39011d30b295759b7f6ca0a7539dff8f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga39011d30b295759b7f6ca0a7539dff8f">&#9670;&#160;</a></span>jsSequencePair</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structjs_sequence_pair.html">jsSequencePair</a> <a class="el" href="structjs_sequence_pair.html">jsSequencePair</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Includes the consumer and stream sequence info from a JetStream consumer. </p>
+
+</div>
+</div>
+<a id="ga27e1a5d5b513f9eb7d61a17db71f8003" name="ga27e1a5d5b513f9eb7d61a17db71f8003"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga27e1a5d5b513f9eb7d61a17db71f8003">&#9670;&#160;</a></span>jsSequenceInfo</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structjs_sequence_info.html">jsSequenceInfo</a> <a class="el" href="structjs_sequence_info.html">jsSequenceInfo</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Has both the consumer and the stream sequence and last activity. </p>
+
+</div>
+</div>
+<a id="ga2f21bb79884e56a5613d7fe76b11b1e5" name="ga2f21bb79884e56a5613d7fe76b11b1e5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga2f21bb79884e56a5613d7fe76b11b1e5">&#9670;&#160;</a></span>jsConsumerInfo</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a> <a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Configuration and current state for this consumer.</p>
+<dl class="section note"><dt>Note</dt><dd><code>Created</code> is the timestamp when the consumer was created, expressed as the number of nanoseconds passed since 00:00:00 UTC Thursday, 1 January 1970. </dd></dl>
+
+</div>
+</div>
+<a id="gadad3bf72baae970662248d82d9b05d0a" name="gadad3bf72baae970662248d82d9b05d0a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gadad3bf72baae970662248d82d9b05d0a">&#9670;&#160;</a></span>jsConsumerInfoList</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structjs_consumer_info_list.html">jsConsumerInfoList</a> <a class="el" href="structjs_consumer_info_list.html">jsConsumerInfoList</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >List of consumers information objects returned by <a class="el" href="group__js_assets_group.html#gaf28097ede3e9ba9926fb00856e63ffd9" title="Retrieves the list of all available consumers for a stream.">js_Consumers</a></p>
+<dl class="section note"><dt>Note</dt><dd>Once done, the list should be destroyed calling <a class="el" href="group__js_assets_group.html#ga421de40d8e91658353111c3f2ea90ec8" title="Destroys the consumer information list object.">jsConsumerInfoList_Destroy</a></dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__js_assets_group.html#ga38cdcc339eb8976d23296b99aa37d629" title="Destroys the stream information list object.">jsStreamInfoList_Destroy</a> </dd></dl>
+
+</div>
+</div>
+<a id="gad00ab4381eec504ada3272aa9ff8adb2" name="gad00ab4381eec504ada3272aa9ff8adb2"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gad00ab4381eec504ada3272aa9ff8adb2">&#9670;&#160;</a></span>jsConsumerNamesList</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structjs_consumer_names_list.html">jsConsumerNamesList</a> <a class="el" href="structjs_consumer_names_list.html">jsConsumerNamesList</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >List of consumer names returned by <a class="el" href="group__js_assets_group.html#ga690d19af55d12b82c8523d1861cef8d0" title="Retrieves the list of all available consumer names for a stream.">js_ConsumerNames</a></p>
+<dl class="section note"><dt>Note</dt><dd>Once done, the list should be destroyed calling <a class="el" href="group__js_assets_group.html#ga2ced0d190131460bf4608ab893dffc50" title="Destroys the consumer names list object.">jsConsumerNamesList_Destroy</a></dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__js_assets_group.html#ga2ced0d190131460bf4608ab893dffc50" title="Destroys the consumer names list object.">jsConsumerNamesList_Destroy</a> </dd></dl>
+
+</div>
+</div>
+<a id="gad057a0107367ce5727975f3daf63ff75" name="gad057a0107367ce5727975f3daf63ff75"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gad057a0107367ce5727975f3daf63ff75">&#9670;&#160;</a></span>jsAPIStats</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structjs_a_p_i_stats.html">jsAPIStats</a> <a class="el" href="structjs_a_p_i_stats.html">jsAPIStats</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Reports on API calls to JetStream for this account. </p>
+
+</div>
+</div>
+<a id="gaa889f706cce285adb9cea8aba0b76866" name="gaa889f706cce285adb9cea8aba0b76866"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaa889f706cce285adb9cea8aba0b76866">&#9670;&#160;</a></span>jsAccountLimits</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structjs_account_limits.html">jsAccountLimits</a> <a class="el" href="structjs_account_limits.html">jsAccountLimits</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Includes the JetStream limits of the current account. </p>
+
+</div>
+</div>
+<a id="ga1d48d3eb36b50c9ab6d8477dccf247d8" name="ga1d48d3eb36b50c9ab6d8477dccf247d8"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga1d48d3eb36b50c9ab6d8477dccf247d8">&#9670;&#160;</a></span>jsTier</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structjs_tier.html">jsTier</a> <a class="el" href="structjs_tier.html">jsTier</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ga57cdc53b29a4fedb5a4140b6e64a4fab" name="ga57cdc53b29a4fedb5a4140b6e64a4fab"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga57cdc53b29a4fedb5a4140b6e64a4fab">&#9670;&#160;</a></span>jsAccountInfo</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structjs_account_info.html">jsAccountInfo</a> <a class="el" href="structjs_account_info.html">jsAccountInfo</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Information about the JetStream usage from the current account. </p>
+
+</div>
+</div>
+<a id="gace9595b1a5ce3f7a13670367fd293b4a" name="gace9595b1a5ce3f7a13670367fd293b4a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gace9595b1a5ce3f7a13670367fd293b4a">&#9670;&#160;</a></span>jsMsgMetaData</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structjs_msg_meta_data.html">jsMsgMetaData</a> <a class="el" href="structjs_msg_meta_data.html">jsMsgMetaData</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This represents the JetStream metadata associated with received messages.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__js_msg.html#gacf48e59038fab35849e9dc6f8fcf6328" title="Returns metadata from this JetStream message.">natsMsg_GetMetaData</a> </dd>
+<dd>
+<a class="el" href="group__js_msg.html#gaf9bf92294342bcb27053de7038606d12" title="Destroys the message metadata object.">jsMsgMetaData_Destroy</a> </dd></dl>
+
+</div>
+</div>
+<a id="gaf1d5e436c5d41c5b9b96d84e3d2bc86f" name="gaf1d5e436c5d41c5b9b96d84e3d2bc86f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaf1d5e436c5d41c5b9b96d84e3d2bc86f">&#9670;&#160;</a></span>jsPubAck</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structjs_pub_ack.html">jsPubAck</a> <a class="el" href="structjs_pub_ack.html">jsPubAck</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Ack received after successfully publishing a message. </p>
+
+</div>
+</div>
+<a id="gadb7c287bc86b92765fbe45a066b96f40" name="gadb7c287bc86b92765fbe45a066b96f40"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gadb7c287bc86b92765fbe45a066b96f40">&#9670;&#160;</a></span>jsPubAckErr</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structjs_pub_ack_err.html">jsPubAckErr</a> <a class="el" href="structjs_pub_ack_err.html">jsPubAckErr</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Publish acknowledgment failure that will be passed to the optional <a class="el" href="group__callbacks_group.html#ga954768cc1d3388bb6ab723e777647992" title="Callback used to process asynchronous publish errors from JetStream.">jsPubAckErrHandler</a> callback. </p>
+
+</div>
+</div>
+<a id="ga85123afa00d522a249a5b2a8abd7e063" name="ga85123afa00d522a249a5b2a8abd7e063"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga85123afa00d522a249a5b2a8abd7e063">&#9670;&#160;</a></span>jsDirectGetMsgOptions</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structjs_direct_get_msg_options.html">jsDirectGetMsgOptions</a> <a class="el" href="structjs_direct_get_msg_options.html">jsDirectGetMsgOptions</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Options for the <a class="el" href="group__js_assets_group.html#ga62c250cecc650b1eed0fa1691893e2ae" title="Retrieves directly a JetStream message based on provided options.">js_DirectGetMsg()</a> call, which retrieves a message from any server (not only the leader) as long as the stream has been created with a AllowDirect option.</p>
+<p >Note that some options are mutually exclusive but are not checked byt the library. The server will reject invalid requests and the library will return the error returned from the server. </p>
+
+</div>
+</div>
+<a id="gaf11e6664c1f335a5287af71c703935fa" name="gaf11e6664c1f335a5287af71c703935fa"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gaf11e6664c1f335a5287af71c703935fa">&#9670;&#160;</a></span>jsFetchRequest</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structjs_fetch_request.html">jsFetchRequest</a> <a class="el" href="structjs_fetch_request.html">jsFetchRequest</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Options for the <a class="el" href="group__js_sub_group.html#ga676292505e7fde8688cfd886b79a10ed" title="Fetches messages for a pull subscription with a complete request configuration.">natsSubscription_FetchRequest()</a> call, which is similar to <a class="el" href="group__js_sub_group.html#gafc5e0d2269bd23b4d5fb7f3b05278e50" title="Fetches messages for a pull subscription.">natsSubscription_Fetch()</a> but gives more control in the configuration of the fetch. </p>
+
+</div>
+</div>
+<a id="ga0e3a3b7cf89e7dfa955f0f8f3f1eb6e5" name="ga0e3a3b7cf89e7dfa955f0f8f3f1eb6e5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga0e3a3b7cf89e7dfa955f0f8f3f1eb6e5">&#9670;&#160;</a></span>jsOptions</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structjs_options.html">jsOptions</a> <a class="el" href="structjs_options.html">jsOptions</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >JetStream context options.</p>
+<p >Initialize the object with <a class="el" href="group__js_group.html#ga855ff9a04888d696785cc5ede96112e4" title="Initializes a streaming context options structure.">jsOptions_Init</a>. </p>
+
+</div>
+</div>
+<a id="ga054c05493dd3cfc5c3e7a665a424e54a" name="ga054c05493dd3cfc5c3e7a665a424e54a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga054c05493dd3cfc5c3e7a665a424e54a">&#9670;&#160;</a></span>kvStore</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct __kvStore <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >The KeyValue store object. </p>
+
+</div>
+</div>
+<a id="gad489fb4074f27427560ca71797db6191" name="gad489fb4074f27427560ca71797db6191"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gad489fb4074f27427560ca71797db6191">&#9670;&#160;</a></span>kvEntry</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct __kvEntry <a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >The KeyValue entry object. </p>
+
+</div>
+</div>
+<a id="gad3a0dd2dac950d5709ee5772b104fc80" name="gad3a0dd2dac950d5709ee5772b104fc80"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gad3a0dd2dac950d5709ee5772b104fc80">&#9670;&#160;</a></span>kvStatus</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct __kvStatus <a class="el" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >The KeyValue status object. </p>
+
+</div>
+</div>
+<a id="ga526fa6d37e818784b94cdc1713f3a043" name="ga526fa6d37e818784b94cdc1713f3a043"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga526fa6d37e818784b94cdc1713f3a043">&#9670;&#160;</a></span>kvWatcher</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct __kvWatcher <a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >The KeyValue watcher object. </p>
+
+</div>
+</div>
+<a id="ga6d594b091b4bb46192336413066a8edf" name="ga6d594b091b4bb46192336413066a8edf"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga6d594b091b4bb46192336413066a8edf">&#9670;&#160;</a></span>kvConfig</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structkv_config.html">kvConfig</a> <a class="el" href="structkv_config.html">kvConfig</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >KeyValue configuration object.</p>
+<p >Initialize the object with <a class="el" href="group__kv_group_mgt.html#ga16d4c27d8ac62bb86ba601bc40f53172" title="Initializes a KeyValue configuration structure.">kvConfig_Init</a>. </p>
+
+</div>
+</div>
+<a id="gac32f992fe797a1f7befc7dc3452640b6" name="gac32f992fe797a1f7befc7dc3452640b6"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gac32f992fe797a1f7befc7dc3452640b6">&#9670;&#160;</a></span>kvWatchOptions</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structkv_watch_options.html">kvWatchOptions</a> <a class="el" href="structkv_watch_options.html">kvWatchOptions</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >KeyValue watcher options object.</p>
+<p >Initialize the object with <a class="el" href="group__kv_group.html#ga762fd5de8cde683e46a6736a51e575f5" title="Initializes a KeyValue watcher options structure.">kvWatchOptions_Init</a> </p>
+
+</div>
+</div>
+<a id="ga90e8de23c4468005488bde690a2ffe9d" name="ga90e8de23c4468005488bde690a2ffe9d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga90e8de23c4468005488bde690a2ffe9d">&#9670;&#160;</a></span>kvPurgeOptions</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structkv_purge_options.html">kvPurgeOptions</a> <a class="el" href="structkv_purge_options.html">kvPurgeOptions</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >KeyValue purge options object.</p>
+<p >Initialize the object with <a class="el" href="group__kv_group.html#ga243113fd7df34ce104850ab888f04021" title="Initializes a KeyValue purge options structure.">kvPurgeOptions_Init</a> </p>
+
+</div>
+</div>
+<a id="ga0125d394a3cbae2a1713eed8fab7f78e" name="ga0125d394a3cbae2a1713eed8fab7f78e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga0125d394a3cbae2a1713eed8fab7f78e">&#9670;&#160;</a></span>kvEntryList</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structkv_entry_list.html">kvEntryList</a> <a class="el" href="structkv_entry_list.html">kvEntryList</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Used by some APIs which return a list of <a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> objects.</p>
+<p >Those APIs will not create the object, but instead initialize the object.</p>
+<p >Typically, the user will define the object on the stack and pass a pointer to this object to APIs that require a pointer to a <a class="el" href="structkv_entry_list.html" title="A list of KeyValue store entries.">kvEntryList</a> object.</p>
+<p >Similarly, calling <a class="el" href="group__kv_group.html#gae783352ab81e22aa3173057d117518e6" title="Destroys this list of KeyValue store entries.">kvEntryList_Destroy</a> will call <a class="el" href="group__kv_entry.html#ga8359ffcdeefb9c5821e6442d0d5ee388" title="Destroys the KeyValue entry object.">kvEntry_Destroy</a> on entries in the list, free the array containing pointers to the entries, but not free the <a class="el" href="structkv_entry_list.html" title="A list of KeyValue store entries.">kvEntryList</a> object itself.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__kv_group.html#gae783352ab81e22aa3173057d117518e6" title="Destroys this list of KeyValue store entries.">kvEntryList_Destroy</a> </dd></dl>
+
+</div>
+</div>
+<a id="gab36492d9d4370337cfed80edce4144e0" name="gab36492d9d4370337cfed80edce4144e0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gab36492d9d4370337cfed80edce4144e0">&#9670;&#160;</a></span>kvKeysList</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct <a class="el" href="structkv_keys_list.html">kvKeysList</a> <a class="el" href="structkv_keys_list.html">kvKeysList</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Used by some APIs which return a list of key names.</p>
+<p >Those APIs will not create the object, but instead initialize the object.</p>
+<p >Typically, the user will define the object on the stack and pass a pointer to this object to APIs that require a pointer to a <a class="el" href="structkv_keys_list.html" title="A list of KeyValue store keys.">kvKeysList</a> object.</p>
+<p >Similarly, calling <a class="el" href="group__kv_group.html#ga02ccd58bc5062f6ce6f94bf05e3dfe45" title="Destroys this list of KeyValue store key strings.">kvKeysList_Destroy</a> will free key strings in the list, free the array containing pointers to the keys, but not free the <a class="el" href="structkv_keys_list.html" title="A list of KeyValue store keys.">kvKeysList</a> object itself.</p>
+<dl class="section see"><dt>See also</dt><dd>kvKeysList_Cleanup </dd></dl>
+
+</div>
+</div>
+<a id="ga9e826493769d23086cfccefe95cdf64c" name="ga9e826493769d23086cfccefe95cdf64c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga9e826493769d23086cfccefe95cdf64c">&#9670;&#160;</a></span>stanConnection</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct __stanConnection <a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >A <a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c" title="A connection to a NATS Streaming Server.">stanConnection</a> represents a connection to a <code>NATS Streaming Server</code>. </p>
+
+</div>
+</div>
+<a id="gae4dae869fb614536f0f027c2e2660cc5" name="gae4dae869fb614536f0f027c2e2660cc5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#gae4dae869fb614536f0f027c2e2660cc5">&#9670;&#160;</a></span>stanSubscription</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct __stanSubscription <a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >A <a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5" title="Interest on a given channel.">stanSubscription</a> represents interest in a given channel. </p>
+
+</div>
+</div>
+<a id="ga2cf5db7703b42d97abe56a3e83b2a87d" name="ga2cf5db7703b42d97abe56a3e83b2a87d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga2cf5db7703b42d97abe56a3e83b2a87d">&#9670;&#160;</a></span>stanMsg</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct __stanMsg <a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p ><a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d" title="The Streaming message.">stanMsg</a> is the object passed to the subscriptions' message callbacks. </p>
+
+</div>
+</div>
+<a id="ga13d64411878ba13a6ca39c915f2447c1" name="ga13d64411878ba13a6ca39c915f2447c1"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga13d64411878ba13a6ca39c915f2447c1">&#9670;&#160;</a></span>stanConnOptions</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct __stanConnOptions <a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Options can be used to create a customized <a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c" title="A connection to a NATS Streaming Server.">stanConnection</a>. </p>
+
+</div>
+</div>
+<a id="ga023712711f5c289663fc2223e83686d3" name="ga023712711f5c289663fc2223e83686d3"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga023712711f5c289663fc2223e83686d3">&#9670;&#160;</a></span>stanSubOptions</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef struct __stanSubOptions <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Options can be used to create a customized <a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5" title="Interest on a given channel.">stanSubscription</a>. </p>
+
+</div>
+</div>
+<h2 class="groupheader">Enumeration Type Documentation</h2>
+<a id="ga410f8fb053efa02b2ca1de0c02fa4b6d" name="ga410f8fb053efa02b2ca1de0c02fa4b6d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga410f8fb053efa02b2ca1de0c02fa4b6d">&#9670;&#160;</a></span>jsRetentionPolicy</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">enum <a class="el" href="group__types_group.html#ga410f8fb053efa02b2ca1de0c02fa4b6d">jsRetentionPolicy</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Determines how messages in a set are retained. </p>
+<table class="fieldtable">
+<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga410f8fb053efa02b2ca1de0c02fa4b6da6a2aa02f32acec6526d81f6e974e690f" name="gga410f8fb053efa02b2ca1de0c02fa4b6da6a2aa02f32acec6526d81f6e974e690f"></a>js_LimitsPolicy&#160;</td><td class="fielddoc"><p >Specifies that messages are retained until any given limit is reached, which could be one of MaxMsgs, MaxBytes, or MaxAge. This is the default. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="gga410f8fb053efa02b2ca1de0c02fa4b6dae874de4a787cfbec4c6d0eb1a3f05ebd" name="gga410f8fb053efa02b2ca1de0c02fa4b6dae874de4a787cfbec4c6d0eb1a3f05ebd"></a>js_InterestPolicy&#160;</td><td class="fielddoc"><p >Specifies that when all known observables have acknowledged a message it can be removed. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="gga410f8fb053efa02b2ca1de0c02fa4b6daf7e6581e69572691b01d1294a3c3a478" name="gga410f8fb053efa02b2ca1de0c02fa4b6daf7e6581e69572691b01d1294a3c3a478"></a>js_WorkQueuePolicy&#160;</td><td class="fielddoc"><p >Specifies that when the first worker or subscriber acknowledges the message it can be removed. </p>
+</td></tr>
+</table>
+
+</div>
+</div>
+<a id="ga7f88b7d482488398074f9d1419a9b8c2" name="ga7f88b7d482488398074f9d1419a9b8c2"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga7f88b7d482488398074f9d1419a9b8c2">&#9670;&#160;</a></span>jsDiscardPolicy</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">enum <a class="el" href="group__types_group.html#ga7f88b7d482488398074f9d1419a9b8c2">jsDiscardPolicy</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Determines how to proceed when limits of messages or bytes are reached. </p>
+<table class="fieldtable">
+<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga7f88b7d482488398074f9d1419a9b8c2abb31b828421634f1e6a1ef9359bc91f6" name="gga7f88b7d482488398074f9d1419a9b8c2abb31b828421634f1e6a1ef9359bc91f6"></a>js_DiscardOld&#160;</td><td class="fielddoc"><p >Will remove older messages to return to the limits. This is the default. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="gga7f88b7d482488398074f9d1419a9b8c2a99d7f2d740af26c340c0a4e2b72fb6ab" name="gga7f88b7d482488398074f9d1419a9b8c2a99d7f2d740af26c340c0a4e2b72fb6ab"></a>js_DiscardNew&#160;</td><td class="fielddoc"><p >Will fail to store new messages. </p>
+</td></tr>
+</table>
+
+</div>
+</div>
+<a id="ga1802a53c79e667f093bba033b16adc98" name="ga1802a53c79e667f093bba033b16adc98"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga1802a53c79e667f093bba033b16adc98">&#9670;&#160;</a></span>jsStorageType</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">enum <a class="el" href="group__types_group.html#ga1802a53c79e667f093bba033b16adc98">jsStorageType</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Determines how messages are stored for retention. </p>
+<table class="fieldtable">
+<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga1802a53c79e667f093bba033b16adc98a1d9dad1854cf374b22e3688b98284dec" name="gga1802a53c79e667f093bba033b16adc98a1d9dad1854cf374b22e3688b98284dec"></a>js_FileStorage&#160;</td><td class="fielddoc"><p >Specifies on disk storage. It's the default. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="gga1802a53c79e667f093bba033b16adc98a428ed10448726ad01c1db77a7f748314" name="gga1802a53c79e667f093bba033b16adc98a428ed10448726ad01c1db77a7f748314"></a>js_MemoryStorage&#160;</td><td class="fielddoc"><p >Specifies in memory only. </p>
+</td></tr>
+</table>
+
+</div>
+</div>
+<a id="ga117ed2c35f89ef3144540ed9cbadc818" name="ga117ed2c35f89ef3144540ed9cbadc818"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga117ed2c35f89ef3144540ed9cbadc818">&#9670;&#160;</a></span>jsDeliverPolicy</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">enum <a class="el" href="group__types_group.html#ga117ed2c35f89ef3144540ed9cbadc818">jsDeliverPolicy</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Determines how the consumer should select the first message to deliver. </p>
+<table class="fieldtable">
+<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga117ed2c35f89ef3144540ed9cbadc818ac692ba1363103768ac4bb58695549758" name="gga117ed2c35f89ef3144540ed9cbadc818ac692ba1363103768ac4bb58695549758"></a>js_DeliverAll&#160;</td><td class="fielddoc"><p >Starts from the very beginning of a stream. This is the default. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="gga117ed2c35f89ef3144540ed9cbadc818abbd81d6c4e0f17f30e2186f1335e991d" name="gga117ed2c35f89ef3144540ed9cbadc818abbd81d6c4e0f17f30e2186f1335e991d"></a>js_DeliverLast&#160;</td><td class="fielddoc"><p >Starts with the last sequence received. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="gga117ed2c35f89ef3144540ed9cbadc818a82b8d36e17391212398984f92db9c381" name="gga117ed2c35f89ef3144540ed9cbadc818a82b8d36e17391212398984f92db9c381"></a>js_DeliverNew&#160;</td><td class="fielddoc"><p >Starts with messages sent after the consumer is created. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="gga117ed2c35f89ef3144540ed9cbadc818a06299d9c8262a16306ba6cc16d293c5e" name="gga117ed2c35f89ef3144540ed9cbadc818a06299d9c8262a16306ba6cc16d293c5e"></a>js_DeliverByStartSequence&#160;</td><td class="fielddoc"><p >Starts from a given sequence. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="gga117ed2c35f89ef3144540ed9cbadc818a33317133d42f21bf5919827a691543f6" name="gga117ed2c35f89ef3144540ed9cbadc818a33317133d42f21bf5919827a691543f6"></a>js_DeliverByStartTime&#160;</td><td class="fielddoc"><p >Starts from a given UTC time (number of nanoseconds since epoch) </p>
+</td></tr>
+<tr><td class="fieldname"><a id="gga117ed2c35f89ef3144540ed9cbadc818abb50ebcd2fbafe27038c966121b9407b" name="gga117ed2c35f89ef3144540ed9cbadc818abb50ebcd2fbafe27038c966121b9407b"></a>js_DeliverLastPerSubject&#160;</td><td class="fielddoc"><p >Starts with the last message for all subjects received. </p>
+</td></tr>
+</table>
+
+</div>
+</div>
+<a id="ga8fcb50e6e7312834791f9e237d28e873" name="ga8fcb50e6e7312834791f9e237d28e873"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga8fcb50e6e7312834791f9e237d28e873">&#9670;&#160;</a></span>jsAckPolicy</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">enum <a class="el" href="group__types_group.html#ga8fcb50e6e7312834791f9e237d28e873">jsAckPolicy</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Determines how the consumer should acknowledge delivered messages. </p>
+<table class="fieldtable">
+<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga8fcb50e6e7312834791f9e237d28e873a02d46a6395933c55c95ee5194bb6b80e" name="gga8fcb50e6e7312834791f9e237d28e873a02d46a6395933c55c95ee5194bb6b80e"></a>js_AckExplicit&#160;</td><td class="fielddoc"><p >Requires ack or nack for all messages. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="gga8fcb50e6e7312834791f9e237d28e873afd91fe31cf57c68863ca3090b07c296c" name="gga8fcb50e6e7312834791f9e237d28e873afd91fe31cf57c68863ca3090b07c296c"></a>js_AckNone&#160;</td><td class="fielddoc"><p >Requires no acks for delivered messages. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="gga8fcb50e6e7312834791f9e237d28e873a1232af28bf4e4b82e962174f1432ed4a" name="gga8fcb50e6e7312834791f9e237d28e873a1232af28bf4e4b82e962174f1432ed4a"></a>js_AckAll&#160;</td><td class="fielddoc"><p >When acking a sequence number, this implicitly acks all sequences below this one as well. </p>
+</td></tr>
+</table>
+
+</div>
+</div>
+<a id="ga8650faf52b0b6b23df376eebeb9d0354" name="ga8650faf52b0b6b23df376eebeb9d0354"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga8650faf52b0b6b23df376eebeb9d0354">&#9670;&#160;</a></span>jsReplayPolicy</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">enum <a class="el" href="group__types_group.html#ga8650faf52b0b6b23df376eebeb9d0354">jsReplayPolicy</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Determines how the consumer should replay messages it already has queued in the stream. </p>
+<table class="fieldtable">
+<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga8650faf52b0b6b23df376eebeb9d0354a2c4a1e2b75f31dd69a89b541d75afa44" name="gga8650faf52b0b6b23df376eebeb9d0354a2c4a1e2b75f31dd69a89b541d75afa44"></a>js_ReplayInstant&#160;</td><td class="fielddoc"><p >Replays messages as fast as possible. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="gga8650faf52b0b6b23df376eebeb9d0354a6ee3851dac5c90a61492193dd55931f5" name="gga8650faf52b0b6b23df376eebeb9d0354a6ee3851dac5c90a61492193dd55931f5"></a>js_ReplayOriginal&#160;</td><td class="fielddoc"><p >Maintains the same timing as the messages were received. </p>
+</td></tr>
+</table>
+
+</div>
+</div>
+<a id="ga89db3bd6bf11af3ac5eb3ab560d16332" name="ga89db3bd6bf11af3ac5eb3ab560d16332"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ga89db3bd6bf11af3ac5eb3ab560d16332">&#9670;&#160;</a></span>kvOperation</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">enum <a class="el" href="group__types_group.html#ga89db3bd6bf11af3ac5eb3ab560d16332">kvOperation</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Determines the type of operation of a <a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> </p>
+<table class="fieldtable">
+<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga89db3bd6bf11af3ac5eb3ab560d16332a0b7a6bef67e4220f5f0c4075f2ed16b6" name="gga89db3bd6bf11af3ac5eb3ab560d16332a0b7a6bef67e4220f5f0c4075f2ed16b6"></a>kvOp_Unknown&#160;</td><td class="fielddoc"></td></tr>
+<tr><td class="fieldname"><a id="gga89db3bd6bf11af3ac5eb3ab560d16332acc0e1da3c292cb7eb19d909c9dfd788a" name="gga89db3bd6bf11af3ac5eb3ab560d16332acc0e1da3c292cb7eb19d909c9dfd788a"></a>kvOp_Put&#160;</td><td class="fielddoc"></td></tr>
+<tr><td class="fieldname"><a id="gga89db3bd6bf11af3ac5eb3ab560d16332a4efb91331f3307128c75af5b23362f83" name="gga89db3bd6bf11af3ac5eb3ab560d16332a4efb91331f3307128c75af5b23362f83"></a>kvOp_Delete&#160;</td><td class="fielddoc"></td></tr>
+<tr><td class="fieldname"><a id="gga89db3bd6bf11af3ac5eb3ab560d16332aee19ab8144bf518e251ea2004309b657" name="gga89db3bd6bf11af3ac5eb3ab560d16332aee19ab8144bf518e251ea2004309b657"></a>kvOp_Purge&#160;</td><td class="fielddoc"></td></tr>
+</table>
+
+</div>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/group__types_group.js b/doc/html/group__types_group.js
new file mode 100644 (file)
index 0000000..7670a4c
--- /dev/null
@@ -0,0 +1,421 @@
+var group__types_group =
+[
+    [ "natsMsgList", "structnats_msg_list.html", [
+      [ "Msgs", "structnats_msg_list.html#aa123668879f1c9c11c9be7bd81a205c5", null ],
+      [ "Count", "structnats_msg_list.html#a5c48bf6b9e7f1d889d7ad31694911750", null ]
+    ] ],
+    [ "jsPubOptions", "structjs_pub_options.html", [
+      [ "MaxWait", "structjs_pub_options.html#a1b242c9311b904a2e5337417b5c6d143", null ],
+      [ "MsgId", "structjs_pub_options.html#ac8708487360b784f7dd5d7a21e5617c0", null ],
+      [ "ExpectStream", "structjs_pub_options.html#ac7ac74d2557d772c3092288dacf3711f", null ],
+      [ "ExpectLastMsgId", "structjs_pub_options.html#a095391b33a261586fc02eaf013b65e61", null ],
+      [ "ExpectLastSeq", "structjs_pub_options.html#a3b02b60b05caa6d242079a4c26b181bf", null ],
+      [ "ExpectLastSubjectSeq", "structjs_pub_options.html#aeefec1d2c7644562d23b87e55bf2e253", null ],
+      [ "ExpectNoMessage", "structjs_pub_options.html#a740a7edee8c832a75b75fded6046ba90", null ]
+    ] ],
+    [ "jsPlacement", "structjs_placement.html", [
+      [ "Cluster", "structjs_placement.html#ad8c83588d57f0e30959cfb6f3d5d61bf", null ],
+      [ "Tags", "structjs_placement.html#af078a85b744b9ff3771bb2da6005b90d", null ],
+      [ "TagsLen", "structjs_placement.html#a35644f07531409518521b1b4fa28c9e3", null ]
+    ] ],
+    [ "jsExternalStream", "structjs_external_stream.html", [
+      [ "APIPrefix", "structjs_external_stream.html#a2eaf2c0c3e77c269f44e254af8b24e96", null ],
+      [ "DeliverPrefix", "structjs_external_stream.html#a26ca427f3c5be1cae579ddccc16432d3", null ]
+    ] ],
+    [ "jsStreamSource", "structjs_stream_source.html", [
+      [ "Name", "structjs_stream_source.html#a7d9e5c064866b3f0b5601193c5885ec3", null ],
+      [ "OptStartSeq", "structjs_stream_source.html#ad6948b7a34c202f324b6d2beb32fe5ed", null ],
+      [ "OptStartTime", "structjs_stream_source.html#a67eb1dac41b2d826a923cfb23baa24a5", null ],
+      [ "FilterSubject", "structjs_stream_source.html#af787b51dde9d77626f33860564eb08c3", null ],
+      [ "External", "structjs_stream_source.html#a295458d156af5373bb3f5ab06612a888", null ]
+    ] ],
+    [ "jsRePublish", "structjs_re_publish.html", [
+      [ "Source", "structjs_re_publish.html#a1acb593929fd69bbe0f4dc8300dfaeb2", null ],
+      [ "Destination", "structjs_re_publish.html#a662b2e57d237b171b2b61509f7e1023a", null ],
+      [ "HeadersOnly", "structjs_re_publish.html#a16ebc4cdae4a407cf4e32aad212888db", null ]
+    ] ],
+    [ "jsStreamConfig", "structjs_stream_config.html", [
+      [ "Name", "structjs_stream_config.html#a7fe3d5086f1c660a6999ae40ecd370e5", null ],
+      [ "Description", "structjs_stream_config.html#a4f9f422d2e9e7389860291ab19bd7f10", null ],
+      [ "Subjects", "structjs_stream_config.html#a0c5f3354073dbe72650e3db7f59a47af", null ],
+      [ "SubjectsLen", "structjs_stream_config.html#ab2186aae798df6c222b3fa69e31597e1", null ],
+      [ "Retention", "structjs_stream_config.html#a5ebc95b76afafa5e7a129953ba1bb3c7", null ],
+      [ "MaxConsumers", "structjs_stream_config.html#a7338c82c8cbfcd5f4bfb7ad34b1d8395", null ],
+      [ "MaxMsgs", "structjs_stream_config.html#a60a5184d1d97b056dbb31ac6a5b3d82d", null ],
+      [ "MaxBytes", "structjs_stream_config.html#ad75e47d4293441bd5ddbc5eaf01e0451", null ],
+      [ "MaxAge", "structjs_stream_config.html#aa538765ad97d343d60212ebd9894661e", null ],
+      [ "MaxMsgsPerSubject", "structjs_stream_config.html#aa167c7547d13bf2a01510a375ad38340", null ],
+      [ "MaxMsgSize", "structjs_stream_config.html#a93a2336a57b6bfb792d530fd13a90641", null ],
+      [ "Discard", "structjs_stream_config.html#a0b44ea5251ef20bf5b5658bcfbea832d", null ],
+      [ "Storage", "structjs_stream_config.html#a59c34091f336eafa77da2991c852c0d8", null ],
+      [ "Replicas", "structjs_stream_config.html#adbf2c948cf8091b149603b918ef49ffc", null ],
+      [ "NoAck", "structjs_stream_config.html#a8e358fbc569a1c6d49c704e6dbdf8609", null ],
+      [ "Template", "structjs_stream_config.html#a50f866f0e73c4ff0a5f43b354a059fa9", null ],
+      [ "Duplicates", "structjs_stream_config.html#a9e0ff10273d0182f885615b4f7d1cc20", null ],
+      [ "Placement", "structjs_stream_config.html#acee6c66afc78d79c2f518eed89177efb", null ],
+      [ "Mirror", "structjs_stream_config.html#acdba5b22e4e60fd81a54769a7d09bc51", null ],
+      [ "Sources", "structjs_stream_config.html#a8f0ee08922e5b2108082b5b9e4a6284b", null ],
+      [ "SourcesLen", "structjs_stream_config.html#a34960d6acc710c2f32b563f4bb7c9c0a", null ],
+      [ "Sealed", "structjs_stream_config.html#aede3fd2ab13d230eda14c96f9997e1b7", null ],
+      [ "DenyDelete", "structjs_stream_config.html#af2d42dd29b9a35257937aeeb53c9f287", null ],
+      [ "DenyPurge", "structjs_stream_config.html#a575ffbaa85b0300032963296b090583a", null ],
+      [ "AllowRollup", "structjs_stream_config.html#aba71cdb342181f52bb9f7ff5f770a1fa", null ],
+      [ "RePublish", "structjs_stream_config.html#a95ab0061b6e935b129a4a9c133e6b11c", null ],
+      [ "AllowDirect", "structjs_stream_config.html#a28630f6f07ca02553c5d5718d7c29721", null ],
+      [ "MirrorDirect", "structjs_stream_config.html#a9d67ddcc7c54c345dd60ed5e59234f1e", null ],
+      [ "DiscardNewPerSubject", "structjs_stream_config.html#a3fb7d5e1a09829fe742749da880afe4a", null ]
+    ] ],
+    [ "jsLostStreamData", "structjs_lost_stream_data.html", [
+      [ "Msgs", "structjs_lost_stream_data.html#a5d2e87697526033c842a7f955776dfda", null ],
+      [ "MsgsLen", "structjs_lost_stream_data.html#abdc373ed7fc9b7cf161c13da1913fc9a", null ],
+      [ "Bytes", "structjs_lost_stream_data.html#a841fcadca3f66e9170a51080dc1acf30", null ]
+    ] ],
+    [ "jsStreamStateSubject", "structjs_stream_state_subject.html", [
+      [ "Subject", "structjs_stream_state_subject.html#aa766824a7f8b69db592971af3262640e", null ],
+      [ "Msgs", "structjs_stream_state_subject.html#a8b9b2edc5afe82b7b3bc7dbdd67a4384", null ]
+    ] ],
+    [ "jsStreamStateSubjects", "structjs_stream_state_subjects.html", [
+      [ "List", "structjs_stream_state_subjects.html#aef3d1e886b16961daa84c43650fa80c0", null ],
+      [ "Count", "structjs_stream_state_subjects.html#ab88e2026f518b6cdffd3901b5e5cd374", null ]
+    ] ],
+    [ "jsStreamState", "structjs_stream_state.html", [
+      [ "Msgs", "structjs_stream_state.html#a495269fe83c6bbf2023cca94add0a888", null ],
+      [ "Bytes", "structjs_stream_state.html#ae603fa6ecfb63c93b61272b7d1b8fb4d", null ],
+      [ "FirstSeq", "structjs_stream_state.html#a55bb6719163acef7fdb6d0bc3ae8d5da", null ],
+      [ "FirstTime", "structjs_stream_state.html#afb7a708022faff518c060b33e99b04b0", null ],
+      [ "LastSeq", "structjs_stream_state.html#a22da809fe7a1ec3101841e86d6708827", null ],
+      [ "LastTime", "structjs_stream_state.html#a67cbd0d8b43d8c05c8b4cd6b0e44dab0", null ],
+      [ "NumSubjects", "structjs_stream_state.html#aaa43db17641826e7c6ecc1954f641960", null ],
+      [ "Subjects", "structjs_stream_state.html#a4af56e8bee7262ab050f2a25114c5909", null ],
+      [ "NumDeleted", "structjs_stream_state.html#acbec2f01830b56cb4c0bf54ae5170e51", null ],
+      [ "Deleted", "structjs_stream_state.html#abcf4d3c581c06d820f1ad21d640bef3f", null ],
+      [ "DeletedLen", "structjs_stream_state.html#a34a08a64c97269165630bf2e0c78c2c0", null ],
+      [ "Lost", "structjs_stream_state.html#a1adf8991f31fc4db9d6907a0316f8eec", null ],
+      [ "Consumers", "structjs_stream_state.html#a27f4cfb85c0f1b0c5c7ad5275bd25d85", null ]
+    ] ],
+    [ "jsPeerInfo", "structjs_peer_info.html", [
+      [ "Name", "structjs_peer_info.html#abf29230ce03a1c14d50227663e07de6a", null ],
+      [ "Current", "structjs_peer_info.html#ad8cecd039a8ad1c68daba89007b055d4", null ],
+      [ "Offline", "structjs_peer_info.html#a3f3e09c5996858ec5faca2dc7fa5224e", null ],
+      [ "Active", "structjs_peer_info.html#a8441d023932c388953197f7ea39402fe", null ],
+      [ "Lag", "structjs_peer_info.html#a49a2623963dad653a6d7996c750056c9", null ]
+    ] ],
+    [ "jsClusterInfo", "structjs_cluster_info.html", [
+      [ "Name", "structjs_cluster_info.html#a2e13d7ec417574100c938c4df78e5484", null ],
+      [ "Leader", "structjs_cluster_info.html#af7d85652b52f56fa1eedce8f45fe6a19", null ],
+      [ "Replicas", "structjs_cluster_info.html#a8dfcae3bc348a5b595b509e3f3d3500b", null ],
+      [ "ReplicasLen", "structjs_cluster_info.html#a237a639579def1345e02f1490a510ed5", null ]
+    ] ],
+    [ "jsStreamSourceInfo", "structjs_stream_source_info.html", [
+      [ "Name", "structjs_stream_source_info.html#a6db3c6ff8a465a45f8bd5c7bdf5f6c04", null ],
+      [ "External", "structjs_stream_source_info.html#a7eb19dd2637079fd1e970a2b38d33e05", null ],
+      [ "Lag", "structjs_stream_source_info.html#ab2ee0ca3ecd98c2df6d4e9bd88686863", null ],
+      [ "Active", "structjs_stream_source_info.html#a28b8cc0a9d487672955d3a3fa03de247", null ]
+    ] ],
+    [ "jsStreamInfo", "structjs_stream_info.html", [
+      [ "Config", "structjs_stream_info.html#adcc402d28e0ee443419e9b549da233c6", null ],
+      [ "Created", "structjs_stream_info.html#a578ce52a275c690dd4627c1d119c7838", null ],
+      [ "State", "structjs_stream_info.html#a766ac56dec3bd19fa5b9861fb5f64397", null ],
+      [ "Cluster", "structjs_stream_info.html#a8d10d6fdc3f713ac726c72cae06a209a", null ],
+      [ "Mirror", "structjs_stream_info.html#ab71aae7e4f6c62e2a09a3a52c9e4fa2a", null ],
+      [ "Sources", "structjs_stream_info.html#a2e7ca48a93fe57265609e7e0cd3fa386", null ],
+      [ "SourcesLen", "structjs_stream_info.html#af14110cb1f8e16e3dade8d9f7c2fd672", null ]
+    ] ],
+    [ "jsStreamInfoList", "structjs_stream_info_list.html", [
+      [ "List", "structjs_stream_info_list.html#a7b096ee7a25363f231f56419a244daef", null ],
+      [ "Count", "structjs_stream_info_list.html#a8bc8490af12bb4f7a245605aecde62c2", null ]
+    ] ],
+    [ "jsStreamNamesList", "structjs_stream_names_list.html", [
+      [ "List", "structjs_stream_names_list.html#a1875a7e449759dfc2a40b0eb74de0acf", null ],
+      [ "Count", "structjs_stream_names_list.html#ab1385b6333537306d0462946c26cde4f", null ]
+    ] ],
+    [ "jsConsumerConfig", "structjs_consumer_config.html", [
+      [ "Name", "structjs_consumer_config.html#a201217d93cfed17eb4d3e2d9579b826a", null ],
+      [ "Durable", "structjs_consumer_config.html#a36cf121162cf0b40edf051991d851ee0", null ],
+      [ "Description", "structjs_consumer_config.html#a36a14d666d99bdade87a5e21a25491d6", null ],
+      [ "DeliverPolicy", "structjs_consumer_config.html#a364127e68bf0d3bf13efdc0b416667f4", null ],
+      [ "OptStartSeq", "structjs_consumer_config.html#a2f0243899885dc97f304f48ca52b5356", null ],
+      [ "OptStartTime", "structjs_consumer_config.html#a802ea3bf0669395bee28611f4ecede80", null ],
+      [ "AckPolicy", "structjs_consumer_config.html#a8a311af614dfae1b0f4e4af7db467aab", null ],
+      [ "AckWait", "structjs_consumer_config.html#a651a94b9b78668dde830dc7869610e67", null ],
+      [ "MaxDeliver", "structjs_consumer_config.html#ad47e15e1d6a4a8b0b155f9d3d5873c95", null ],
+      [ "BackOff", "structjs_consumer_config.html#aa2d0aff64a2c46122d0f0fe89e8ae011", null ],
+      [ "BackOffLen", "structjs_consumer_config.html#ad2f6ca3f2d0f977aedb8687c462c1cfc", null ],
+      [ "FilterSubject", "structjs_consumer_config.html#af56ab7708b11e85e0b9115d152d281ca", null ],
+      [ "ReplayPolicy", "structjs_consumer_config.html#ade510daf7c5d67553d2cd20b64ab9939", null ],
+      [ "RateLimit", "structjs_consumer_config.html#a351b388a36ccb7978e6e85a6f4fc0816", null ],
+      [ "SampleFrequency", "structjs_consumer_config.html#a43f40b8eef0074b4146fb945b4645584", null ],
+      [ "MaxWaiting", "structjs_consumer_config.html#a8472d49fae908ab0291b4d62c8411b76", null ],
+      [ "MaxAckPending", "structjs_consumer_config.html#aeb2336d480e3885385d1b08410e89892", null ],
+      [ "FlowControl", "structjs_consumer_config.html#a484c64b6c54f6f758f54315470ed20d0", null ],
+      [ "Heartbeat", "structjs_consumer_config.html#ac439828c3bedb8826a1e92de13280d53", null ],
+      [ "HeadersOnly", "structjs_consumer_config.html#a30d4142bac47ab6dc583c5ee193704e6", null ],
+      [ "MaxRequestBatch", "structjs_consumer_config.html#a4e86deefe08854b9a82b4908397aad32", null ],
+      [ "MaxRequestExpires", "structjs_consumer_config.html#aa71aa3dfe5826466be301097b1bae04d", null ],
+      [ "MaxRequestMaxBytes", "structjs_consumer_config.html#a74a026cdd92c538bcf84297f4468bb21", null ],
+      [ "DeliverSubject", "structjs_consumer_config.html#a95aa4184ed77f69b7674756572da1ded", null ],
+      [ "DeliverGroup", "structjs_consumer_config.html#ae0765f3b5effe365187d3cf809c6ed3c", null ],
+      [ "InactiveThreshold", "structjs_consumer_config.html#af6376a6009124c25d7016bc548f3855d", null ],
+      [ "Replicas", "structjs_consumer_config.html#acfba6d6ecb6323fd8ffe6c0bb4fbffae", null ],
+      [ "MemoryStorage", "structjs_consumer_config.html#a046177256938d6a601c629f9fd82f888", null ]
+    ] ],
+    [ "jsConsumerSequenceMismatch", "structjs_consumer_sequence_mismatch.html", [
+      [ "Stream", "structjs_consumer_sequence_mismatch.html#aad6a17af1719c023c38a6fd254b73f8e", null ],
+      [ "ConsumerClient", "structjs_consumer_sequence_mismatch.html#adb383429dadb1ab0e1f7d013bc546a28", null ],
+      [ "ConsumerServer", "structjs_consumer_sequence_mismatch.html#ac1df353001d853c8a56cef9f82fb831c", null ]
+    ] ],
+    [ "jsSubOptions", "structjs_sub_options.html", [
+      [ "Stream", "structjs_sub_options.html#a856a6af4a7ff5aa2e736338091e69484", null ],
+      [ "Consumer", "structjs_sub_options.html#a7aa5b8439ed288b858943f28c291cb36", null ],
+      [ "Queue", "structjs_sub_options.html#aaf4b620d112a31f51a20389c5405805d", null ],
+      [ "ManualAck", "structjs_sub_options.html#a21a905c49dfab61729d8674702d196b2", null ],
+      [ "Config", "structjs_sub_options.html#acab25d71a2efe26bb3b084071435c2b5", null ],
+      [ "Ordered", "structjs_sub_options.html#a95c5d2db8ca97d644042d436de119be4", null ]
+    ] ],
+    [ "jsSequencePair", "structjs_sequence_pair.html", [
+      [ "Consumer", "structjs_sequence_pair.html#a6d205effd29f8994f0028bfaf2e8d816", null ],
+      [ "Stream", "structjs_sequence_pair.html#ab051e0815302c48ba6122bd18d9d76f7", null ]
+    ] ],
+    [ "jsSequenceInfo", "structjs_sequence_info.html", [
+      [ "Consumer", "structjs_sequence_info.html#ae4416a5d766e07db207e563668edd06f", null ],
+      [ "Stream", "structjs_sequence_info.html#ab52c55c1d0edd20e064870b490b4b990", null ],
+      [ "Last", "structjs_sequence_info.html#a4e94c91650b7db253645515fee4c3b05", null ]
+    ] ],
+    [ "jsConsumerInfo", "structjs_consumer_info.html", [
+      [ "Stream", "structjs_consumer_info.html#a8f21939613163a7c0ebfb521aa471260", null ],
+      [ "Name", "structjs_consumer_info.html#a9359aea7cd05a27b2a15f8a35cdb1008", null ],
+      [ "Created", "structjs_consumer_info.html#a670d38f2e9ba5c354ca3560a8064d00c", null ],
+      [ "Config", "structjs_consumer_info.html#a2f63940ca1f024ad3840418c2f6a1ae1", null ],
+      [ "Delivered", "structjs_consumer_info.html#a15f2d68fbf126acc1907ba9462ad9ee9", null ],
+      [ "AckFloor", "structjs_consumer_info.html#ab69c36ae092df9b0663b675a5abbab55", null ],
+      [ "NumAckPending", "structjs_consumer_info.html#a882bebeb7af80fcce088afdf2c98de50", null ],
+      [ "NumRedelivered", "structjs_consumer_info.html#a932bf14ebb9ce167af8975e3b1f8d001", null ],
+      [ "NumWaiting", "structjs_consumer_info.html#a57e4a4139310c50a1f3d51af67197af0", null ],
+      [ "NumPending", "structjs_consumer_info.html#aeaefd5a500996013b1ce13d8872e869b", null ],
+      [ "Cluster", "structjs_consumer_info.html#a6f4401563a9fd102226d82cdc6136e32", null ],
+      [ "PushBound", "structjs_consumer_info.html#a31282cdc72000a91af03f89899740bfa", null ]
+    ] ],
+    [ "jsConsumerInfoList", "structjs_consumer_info_list.html", [
+      [ "List", "structjs_consumer_info_list.html#a75354882af5e11959b198a70bde14db8", null ],
+      [ "Count", "structjs_consumer_info_list.html#a813c908362a6426a929133f7c0d3395f", null ]
+    ] ],
+    [ "jsConsumerNamesList", "structjs_consumer_names_list.html", [
+      [ "List", "structjs_consumer_names_list.html#aa4b3cf17902a2d580cc3a230bfa5d309", null ],
+      [ "Count", "structjs_consumer_names_list.html#a0bccbad8ac5d335a0ed89970a58900fb", null ]
+    ] ],
+    [ "jsAPIStats", "structjs_a_p_i_stats.html", [
+      [ "Total", "structjs_a_p_i_stats.html#a1545170bebb347d0ea1254f51c3027cf", null ],
+      [ "Errors", "structjs_a_p_i_stats.html#a84e85ad9d94dbe9afd1101388574255d", null ]
+    ] ],
+    [ "jsAccountLimits", "structjs_account_limits.html", [
+      [ "MaxMemory", "structjs_account_limits.html#a7bfc63e6f49ce724663ee534c5efdfa4", null ],
+      [ "MaxStore", "structjs_account_limits.html#a6fff014c46739410ecf298b0cf643b30", null ],
+      [ "MaxStreams", "structjs_account_limits.html#a4710a10950857a322c2a3ad6f946ded2", null ],
+      [ "MaxConsumers", "structjs_account_limits.html#a6169f29101d51d48eed0803b719e6338", null ],
+      [ "MaxAckPending", "structjs_account_limits.html#a4abf1972690c20d73bd314f2059e8013", null ],
+      [ "MemoryMaxStreamBytes", "structjs_account_limits.html#a38875d969274b0f0fcefc6b04ce56eb8", null ],
+      [ "StoreMaxStreamBytes", "structjs_account_limits.html#a8cca06ab72b715c02a6a2c72b59f6a52", null ],
+      [ "MaxBytesRequired", "structjs_account_limits.html#a858edf99ee1c60354bdba4e59293fb6a", null ]
+    ] ],
+    [ "jsTier", "structjs_tier.html", [
+      [ "Name", "structjs_tier.html#a1ed542b9acccbe7761839f33c43053a6", null ],
+      [ "Memory", "structjs_tier.html#aeff4a4cb86e10d8d7749d6ff69f97ed1", null ],
+      [ "Store", "structjs_tier.html#ab16c426e1c35d8c0fd6c460c43580a39", null ],
+      [ "Streams", "structjs_tier.html#a3f9234fde387faf3775d841aa797a6ea", null ],
+      [ "Consumers", "structjs_tier.html#ac33ce862c041572d10184e7fa0dd0bfe", null ],
+      [ "Limits", "structjs_tier.html#af2edbabd5e078b1e31dd73d44fd507d3", null ]
+    ] ],
+    [ "jsAccountInfo", "structjs_account_info.html", [
+      [ "Memory", "structjs_account_info.html#a448578d621e878267ad5f1792002a665", null ],
+      [ "Store", "structjs_account_info.html#ad1c254c5b8f11f57062a4e2d5fb10ae3", null ],
+      [ "Streams", "structjs_account_info.html#a17317abf03effdcdedc2003fca8adc71", null ],
+      [ "Consumers", "structjs_account_info.html#a1237c3f19a42a3203825971b429312e9", null ],
+      [ "Domain", "structjs_account_info.html#ab6ba03298e1863132550b9b08d06048c", null ],
+      [ "API", "structjs_account_info.html#a94ab71c69b7883c2731ae8741ddc1e94", null ],
+      [ "Limits", "structjs_account_info.html#aad93cf4bb6c1fbb09ae8545c03f315a9", null ],
+      [ "Tiers", "structjs_account_info.html#ab654d5c7456bb62df1808deb32a620fc", null ],
+      [ "TiersLen", "structjs_account_info.html#a21c14ca283400c684b18e61a534b6724", null ]
+    ] ],
+    [ "jsMsgMetaData", "structjs_msg_meta_data.html", [
+      [ "Sequence", "structjs_msg_meta_data.html#a23d5fd1992033164c73d5c2a16a4e321", null ],
+      [ "NumDelivered", "structjs_msg_meta_data.html#a9a50965fac061a9728b160702d3f56ff", null ],
+      [ "NumPending", "structjs_msg_meta_data.html#a02f1bbd37e9650ed6bfda0210f038e30", null ],
+      [ "Timestamp", "structjs_msg_meta_data.html#abab9ed5600a3629ea6d6c78170d7d5e9", null ],
+      [ "Stream", "structjs_msg_meta_data.html#a32e2a9438d2dc769f7f64d2f8897abc4", null ],
+      [ "Consumer", "structjs_msg_meta_data.html#a6dcc2a442984b0ca070b3d8077192127", null ],
+      [ "Domain", "structjs_msg_meta_data.html#a388e38ccea591181436d199dc7c2f8ea", null ]
+    ] ],
+    [ "jsPubAck", "structjs_pub_ack.html", [
+      [ "Stream", "structjs_pub_ack.html#a4fd5e6cdb7217d72c553afcc75358893", null ],
+      [ "Sequence", "structjs_pub_ack.html#a01d302d5e1a2e71487a8c74c3fed1691", null ],
+      [ "Domain", "structjs_pub_ack.html#a0b73200c0b035db3c9c96421706d51b0", null ],
+      [ "Duplicate", "structjs_pub_ack.html#a0381a49ff62e8fac7a52cad6a5eb7243", null ]
+    ] ],
+    [ "jsPubAckErr", "structjs_pub_ack_err.html", [
+      [ "Msg", "structjs_pub_ack_err.html#a156ca2f779d132ffa8c519124cf9739b", null ],
+      [ "Err", "structjs_pub_ack_err.html#a406e39e818f93bc59ac18cbdf035baf5", null ],
+      [ "ErrCode", "structjs_pub_ack_err.html#aa558fd192cc6d6c02ad891445ec5aa8a", null ],
+      [ "ErrText", "structjs_pub_ack_err.html#ad1a85e6ff4046d7df33c1e24323ddc87", null ]
+    ] ],
+    [ "jsDirectGetMsgOptions", "structjs_direct_get_msg_options.html", [
+      [ "Sequence", "structjs_direct_get_msg_options.html#a60211d7499cfecdd6e61e6c73af1a2f5", null ],
+      [ "NextBySubject", "structjs_direct_get_msg_options.html#a16ce7908a3d1690b8ae8bc22350ac238", null ],
+      [ "LastBySubject", "structjs_direct_get_msg_options.html#aae968f31cdda96fa3c5e9374a36b9630", null ]
+    ] ],
+    [ "jsFetchRequest", "structjs_fetch_request.html", [
+      [ "Expires", "structjs_fetch_request.html#ac3351138ce8ac3b321ac1eb78887116e", null ],
+      [ "Batch", "structjs_fetch_request.html#a84f06b60e25decb2674996f0cb315f63", null ],
+      [ "MaxBytes", "structjs_fetch_request.html#a3298db691c2ecb9725cc029e2c35d6d1", null ],
+      [ "NoWait", "structjs_fetch_request.html#ae251eebb1998a39fe3b898302b58293d", null ],
+      [ "Heartbeat", "structjs_fetch_request.html#ae8e73c7cc2e2a2d2502407c9b1522496", null ]
+    ] ],
+    [ "jsOptions", "structjs_options.html", [
+      [ "jsOptionsPublishAsync", "structjs_options_1_1js_options_publish_async.html", [
+        [ "MaxPending", "structjs_options_1_1js_options_publish_async.html#add8dd21cbab2d5df19688c26365fe4d1", null ],
+        [ "AckHandler", "structjs_options_1_1js_options_publish_async.html#a508140119f40a2c056d4ee8c0cd55df9", null ],
+        [ "AckHandlerClosure", "structjs_options_1_1js_options_publish_async.html#a60c95f10797c04ea2e625759c6936ec9", null ],
+        [ "ErrHandler", "structjs_options_1_1js_options_publish_async.html#a0a180995c49990ca277e449b7d43616b", null ],
+        [ "ErrHandlerClosure", "structjs_options_1_1js_options_publish_async.html#a784a0029c30e82ff37c39ae6c276bc81", null ],
+        [ "StallWait", "structjs_options_1_1js_options_publish_async.html#ada58fefe0ed40157b5f5d44b9dd175f9", null ]
+      ] ],
+      [ "jsOptionsStream", "structjs_options_1_1js_options_stream.html", [
+        [ "jsOptionsStreamInfo", "structjs_options_1_1js_options_stream_1_1js_options_stream_info.html", [
+          [ "DeletedDetails", "structjs_options_1_1js_options_stream_1_1js_options_stream_info.html#a73f847afe18f56eaaf6788900270bef7", null ],
+          [ "SubjectsFilter", "structjs_options_1_1js_options_stream_1_1js_options_stream_info.html#af874e0f5aa15fb2a41504631ed786e6d", null ]
+        ] ],
+        [ "jsOptionsStreamPurge", "structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html", [
+          [ "Subject", "structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#aa99e6ee3bef1c22243f01544181315fe", null ],
+          [ "Sequence", "structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#a0d61e5d3c9c518f455549086ababe7f6", null ],
+          [ "Keep", "structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#a882c1ce1e636817450893caa72aa4eda", null ]
+        ] ],
+        [ "Purge", "structjs_options_1_1js_options_stream.html#afe680264223b434ca6959f9e122af029", null ],
+        [ "Info", "structjs_options_1_1js_options_stream.html#a2ca89c298b4df1f5e3e0a44e205c789c", null ]
+      ] ],
+      [ "Prefix", "structjs_options.html#ab06e45296fccf0fe6152e083e38d916f", null ],
+      [ "Domain", "structjs_options.html#ae4df6c9c01c0ea9ab0e6d5a6ec8af74e", null ],
+      [ "Wait", "structjs_options.html#a7fd42e1f83da5861e716137c16f8b72f", null ],
+      [ "PublishAsync", "structjs_options.html#a5ce5c11cc9b9df2b6bc47cd77d7b1dc4", null ],
+      [ "Stream", "structjs_options.html#ae50544ee0ef8dd7d02ef9802805807ae", null ]
+    ] ],
+    [ "kvConfig", "structkv_config.html", [
+      [ "Bucket", "structkv_config.html#a11b636da727c17566d5ab1274f69fee5", null ],
+      [ "Description", "structkv_config.html#a941e9cad2bab67f093bf4d9567b4749a", null ],
+      [ "MaxValueSize", "structkv_config.html#a281156a9df0130abad7f3b2728ac35a5", null ],
+      [ "History", "structkv_config.html#a0ec6b3afbfdaa33436e2ae748e986e98", null ],
+      [ "TTL", "structkv_config.html#ad2f5503e2f2522cb52e0ba1b86983dba", null ],
+      [ "MaxBytes", "structkv_config.html#a1bc37777aa91b8b57a70e7647670cd12", null ],
+      [ "StorageType", "structkv_config.html#ad5db9a58224d93ab86b4cfc4c46f1897", null ],
+      [ "Replicas", "structkv_config.html#a48f0f70383eff868321f9c94ae1a87cd", null ],
+      [ "RePublish", "structkv_config.html#ae172d3e442eef1a57cd7cf266d9e8951", null ]
+    ] ],
+    [ "kvWatchOptions", "structkv_watch_options.html", [
+      [ "IgnoreDeletes", "structkv_watch_options.html#a0535edd21b26affc0057575bafc21a07", null ],
+      [ "IncludeHistory", "structkv_watch_options.html#a08274f08ae96e14d9ded326e4e665649", null ],
+      [ "MetaOnly", "structkv_watch_options.html#ac9094bce4f3c6513431ba32fb49e5605", null ],
+      [ "Timeout", "structkv_watch_options.html#a56183d56585697d058c7eeb20bdddb66", null ]
+    ] ],
+    [ "kvPurgeOptions", "structkv_purge_options.html", [
+      [ "Timeout", "structkv_purge_options.html#a245c2def0f3aabe617219772cf7680a8", null ],
+      [ "DeleteMarkersOlderThan", "structkv_purge_options.html#a47fed1e95073666cbe441aba7c149da6", null ]
+    ] ],
+    [ "kvEntryList", "structkv_entry_list.html", [
+      [ "Entries", "structkv_entry_list.html#a179d4d3e5844d005be1ed9134b969a50", null ],
+      [ "Count", "structkv_entry_list.html#a82da55d42e1a6862d3b0034dfc6f321f", null ]
+    ] ],
+    [ "kvKeysList", "structkv_keys_list.html", [
+      [ "Keys", "structkv_keys_list.html#aa5cb40820a1a927375215e0a94ecfc18", null ],
+      [ "Count", "structkv_keys_list.html#a625f7b34784e024a538359efd9a97265", null ]
+    ] ],
+    [ "natsConnection", "group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec", null ],
+    [ "natsStatistics", "group__types_group.html#ga57a4b8c7109e2773878655722ce028aa", null ],
+    [ "natsSubscription", "group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8", null ],
+    [ "natsMsg", "group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a", null ],
+    [ "natsOptions", "group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e", null ],
+    [ "natsInbox", "group__types_group.html#ga206c3d4d6f4f6f96fd2cae53a3df31c1", null ],
+    [ "natsMsgList", "group__types_group.html#gafd5523161ec3783e79719cb9a9a66b5b", null ],
+    [ "jsCtx", "group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1", null ],
+    [ "jsPubOptions", "group__types_group.html#ga7bbea3575d35dcdbfc9b766b04269eb7", null ],
+    [ "jsPlacement", "group__types_group.html#ga49d1138fac9da8b85d00a367081e91c9", null ],
+    [ "jsExternalStream", "group__types_group.html#gaef6601477f6456bebc229f7f38982a6c", null ],
+    [ "jsStreamSource", "group__types_group.html#gab4c43c87d81917aab748a50eee028449", null ],
+    [ "jsRePublish", "group__types_group.html#gab991313d33ce270a882e4d0756c138f6", null ],
+    [ "jsStreamConfig", "group__types_group.html#ga26fd6a73df327ca3c271e46ddefc8acf", null ],
+    [ "jsLostStreamData", "group__types_group.html#gaf80828510450faf84bbf456e94f5b784", null ],
+    [ "jsStreamStateSubject", "group__types_group.html#ga55dce2fa9ecd215716cc9ceece7dfefa", null ],
+    [ "jsStreamStateSubjects", "group__types_group.html#gae8b57d9c40364f97a705f3e61a1156b0", null ],
+    [ "jsStreamState", "group__types_group.html#ga2bfd6de6ffc84d767482b3dd57cb9271", null ],
+    [ "jsPeerInfo", "group__types_group.html#ga1e938dab794089f9329d7b7ece8f3e9b", null ],
+    [ "jsClusterInfo", "group__types_group.html#gaaf92318ce94a1ae3547c9a7af5a3f4f6", null ],
+    [ "jsStreamSourceInfo", "group__types_group.html#gab2f33f57188a550f2f747d4f27bc24bd", null ],
+    [ "jsStreamInfo", "group__types_group.html#ga2629c9454996edf7914be36a9e44921b", null ],
+    [ "jsStreamInfoList", "group__types_group.html#ga1e54c2a1bc94834d1670875fc151f565", null ],
+    [ "jsStreamNamesList", "group__types_group.html#gaf4d31a4dc83b2805422beafb1f8fa000", null ],
+    [ "jsConsumerConfig", "group__types_group.html#ga0483b2197c0ddd9082b48c2dd3fe7cee", null ],
+    [ "jsConsumerSequenceMismatch", "group__types_group.html#gace471cd2cef1df797b2a1c6b485049bd", null ],
+    [ "jsSubOptions", "group__types_group.html#gaccfaac2079656ffd40d003e4de5d2280", null ],
+    [ "jsSequencePair", "group__types_group.html#ga39011d30b295759b7f6ca0a7539dff8f", null ],
+    [ "jsSequenceInfo", "group__types_group.html#ga27e1a5d5b513f9eb7d61a17db71f8003", null ],
+    [ "jsConsumerInfo", "group__types_group.html#ga2f21bb79884e56a5613d7fe76b11b1e5", null ],
+    [ "jsConsumerInfoList", "group__types_group.html#gadad3bf72baae970662248d82d9b05d0a", null ],
+    [ "jsConsumerNamesList", "group__types_group.html#gad00ab4381eec504ada3272aa9ff8adb2", null ],
+    [ "jsAPIStats", "group__types_group.html#gad057a0107367ce5727975f3daf63ff75", null ],
+    [ "jsAccountLimits", "group__types_group.html#gaa889f706cce285adb9cea8aba0b76866", null ],
+    [ "jsTier", "group__types_group.html#ga1d48d3eb36b50c9ab6d8477dccf247d8", null ],
+    [ "jsAccountInfo", "group__types_group.html#ga57cdc53b29a4fedb5a4140b6e64a4fab", null ],
+    [ "jsMsgMetaData", "group__types_group.html#gace9595b1a5ce3f7a13670367fd293b4a", null ],
+    [ "jsPubAck", "group__types_group.html#gaf1d5e436c5d41c5b9b96d84e3d2bc86f", null ],
+    [ "jsPubAckErr", "group__types_group.html#gadb7c287bc86b92765fbe45a066b96f40", null ],
+    [ "jsDirectGetMsgOptions", "group__types_group.html#ga85123afa00d522a249a5b2a8abd7e063", null ],
+    [ "jsFetchRequest", "group__types_group.html#gaf11e6664c1f335a5287af71c703935fa", null ],
+    [ "jsOptions", "group__types_group.html#ga0e3a3b7cf89e7dfa955f0f8f3f1eb6e5", null ],
+    [ "kvStore", "group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a", null ],
+    [ "kvEntry", "group__types_group.html#gad489fb4074f27427560ca71797db6191", null ],
+    [ "kvStatus", "group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80", null ],
+    [ "kvWatcher", "group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043", null ],
+    [ "kvConfig", "group__types_group.html#ga6d594b091b4bb46192336413066a8edf", null ],
+    [ "kvWatchOptions", "group__types_group.html#gac32f992fe797a1f7befc7dc3452640b6", null ],
+    [ "kvPurgeOptions", "group__types_group.html#ga90e8de23c4468005488bde690a2ffe9d", null ],
+    [ "kvEntryList", "group__types_group.html#ga0125d394a3cbae2a1713eed8fab7f78e", null ],
+    [ "kvKeysList", "group__types_group.html#gab36492d9d4370337cfed80edce4144e0", null ],
+    [ "stanConnection", "group__types_group.html#ga9e826493769d23086cfccefe95cdf64c", null ],
+    [ "stanSubscription", "group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5", null ],
+    [ "stanMsg", "group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d", null ],
+    [ "stanConnOptions", "group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1", null ],
+    [ "stanSubOptions", "group__types_group.html#ga023712711f5c289663fc2223e83686d3", null ],
+    [ "jsRetentionPolicy", "group__types_group.html#ga410f8fb053efa02b2ca1de0c02fa4b6d", [
+      [ "js_LimitsPolicy", "group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6da6a2aa02f32acec6526d81f6e974e690f", null ],
+      [ "js_InterestPolicy", "group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6dae874de4a787cfbec4c6d0eb1a3f05ebd", null ],
+      [ "js_WorkQueuePolicy", "group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6daf7e6581e69572691b01d1294a3c3a478", null ]
+    ] ],
+    [ "jsDiscardPolicy", "group__types_group.html#ga7f88b7d482488398074f9d1419a9b8c2", [
+      [ "js_DiscardOld", "group__types_group.html#gga7f88b7d482488398074f9d1419a9b8c2abb31b828421634f1e6a1ef9359bc91f6", null ],
+      [ "js_DiscardNew", "group__types_group.html#gga7f88b7d482488398074f9d1419a9b8c2a99d7f2d740af26c340c0a4e2b72fb6ab", null ]
+    ] ],
+    [ "jsStorageType", "group__types_group.html#ga1802a53c79e667f093bba033b16adc98", [
+      [ "js_FileStorage", "group__types_group.html#gga1802a53c79e667f093bba033b16adc98a1d9dad1854cf374b22e3688b98284dec", null ],
+      [ "js_MemoryStorage", "group__types_group.html#gga1802a53c79e667f093bba033b16adc98a428ed10448726ad01c1db77a7f748314", null ]
+    ] ],
+    [ "jsDeliverPolicy", "group__types_group.html#ga117ed2c35f89ef3144540ed9cbadc818", [
+      [ "js_DeliverAll", "group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818ac692ba1363103768ac4bb58695549758", null ],
+      [ "js_DeliverLast", "group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818abbd81d6c4e0f17f30e2186f1335e991d", null ],
+      [ "js_DeliverNew", "group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a82b8d36e17391212398984f92db9c381", null ],
+      [ "js_DeliverByStartSequence", "group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a06299d9c8262a16306ba6cc16d293c5e", null ],
+      [ "js_DeliverByStartTime", "group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a33317133d42f21bf5919827a691543f6", null ],
+      [ "js_DeliverLastPerSubject", "group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818abb50ebcd2fbafe27038c966121b9407b", null ]
+    ] ],
+    [ "jsAckPolicy", "group__types_group.html#ga8fcb50e6e7312834791f9e237d28e873", [
+      [ "js_AckExplicit", "group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873a02d46a6395933c55c95ee5194bb6b80e", null ],
+      [ "js_AckNone", "group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873afd91fe31cf57c68863ca3090b07c296c", null ],
+      [ "js_AckAll", "group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873a1232af28bf4e4b82e962174f1432ed4a", null ]
+    ] ],
+    [ "jsReplayPolicy", "group__types_group.html#ga8650faf52b0b6b23df376eebeb9d0354", [
+      [ "js_ReplayInstant", "group__types_group.html#gga8650faf52b0b6b23df376eebeb9d0354a2c4a1e2b75f31dd69a89b541d75afa44", null ],
+      [ "js_ReplayOriginal", "group__types_group.html#gga8650faf52b0b6b23df376eebeb9d0354a6ee3851dac5c90a61492193dd55931f5", null ]
+    ] ],
+    [ "kvOperation", "group__types_group.html#ga89db3bd6bf11af3ac5eb3ab560d16332", [
+      [ "kvOp_Unknown", "group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332a0b7a6bef67e4220f5f0c4075f2ed16b6", null ],
+      [ "kvOp_Put", "group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332acc0e1da3c292cb7eb19d909c9dfd788a", null ],
+      [ "kvOp_Delete", "group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332a4efb91331f3307128c75af5b23362f83", null ],
+      [ "kvOp_Purge", "group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332aee19ab8144bf518e251ea2004309b657", null ]
+    ] ]
+];
\ No newline at end of file
diff --git a/doc/html/group__wildcards_group.html b/doc/html/group__wildcards_group.html
new file mode 100644 (file)
index 0000000..760e0ea
--- /dev/null
@@ -0,0 +1,128 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Wildcards</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('group__wildcards_group.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">Wildcards</div></div>
+</div><!--header-->
+<div class="contents">
+<p >Use of wildcards. There are two type of wildcards: <code>*</code> for partial, and <code>&gt;</code> for full.</p>
+<p >A subscription on subject <code>foo.*</code> would receive messages sent to:</p><ul>
+<li><code>foo.bar</code></li>
+<li><code>foo.baz</code></li>
+</ul>
+<p >but not on:</p>
+<ul>
+<li><code>foo.bar.baz</code> (too many elements)</li>
+<li><code>bar.foo</code>. (does not start with <code>foo</code>).</li>
+</ul>
+<p >A subscription on subject <code>foo.&gt;</code> would receive messages sent to:</p><ul>
+<li><code>foo.bar</code></li>
+<li><code>foo.baz</code></li>
+<li><code>foo.bar.baz</code></li>
+</ul>
+<p >but not on:</p><ul>
+<li><code>foo</code> (only one element, needs at least two)</li>
+<li><code>bar.baz</code> (does not start with <code>foo</code>). </li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/index.html b/doc/html/index.html
new file mode 100644 (file)
index 0000000..0593d03
--- /dev/null
@@ -0,0 +1,127 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: NATS C client.</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('index.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div><div class="header">
+  <div class="headertitle"><div class="title">NATS C client. </div></div>
+</div><!--header-->
+<div class="contents">
+<div class="textblock"><h1><a class="anchor" id="intro_sec"></a>
+Introduction</h1>
+<p >The NATS C Client is part of NATS, an open-source cloud-native messaging system, and is supported by <a href="http://www.synadia.com">Synadia Communications Inc.</a>. This client, written in C, follows the go client closely, but diverges in some places.</p>
+<h1><a class="anchor" id="install_sec"></a>
+Installation</h1>
+<p >Instructions to build and install the NATS C Client can be found at the <a href="https://github.com/nats-io/nats.c">NATS C Client GitHub page</a></p>
+<h1><a class="anchor" id="faq_sec"></a>
+Frequently Asked Questions</h1>
+<p >Some of the frequently asked questions can be found <a href="https://github.com/nats-io/nats.c#faq">here</a></p>
+<h1><a class="anchor" id="other_doc_section"></a>
+Other Documentation</h1>
+<p >This documentation focuses on the NATS C Client API; for additional information, refer to the following:</p>
+<ul>
+<li><a href="http://nats.io/documentation">General Documentation for nats.io</a></li>
+<li><a href="https://github.com/nats-io/nats.c">NATS C Client found on GitHub</a></li>
+<li><a href="https://github.com/nats-io/nats-server">The NATS Server (nats-server) found on GitHub</a> </li>
+</ul>
+</div></div><!-- PageDoc -->
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/jquery.js b/doc/html/jquery.js
new file mode 100644 (file)
index 0000000..1dffb65
--- /dev/null
@@ -0,0 +1,34 @@
+/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */
+!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:f,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(n){return this.pushStack(S.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},S.extend=S.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(p(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?S.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:y}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=t[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,S="sizzle"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(),A=ue(),N=ue(),j=function(e,t){return e===t&&(l=!0),0},D={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",F=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",B=new RegExp(M+"+","g"),$=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="<a id='"+S+"'></a><select id='"+S+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0<se(t,C,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!=C&&T(e),y(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&D.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(j),l){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1)}return u=null,e},o=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else while(t=e[r++])n+=o(t);return n},(b=se.selectors={cacheLength:50,createPseudo:le,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(B," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,v){var y="nth"!==h.slice(0,3),m="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=y!==m?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(y){while(l){a=e;while(a=a[l])if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&p){d=(s=(r=(i=(o=(a=c)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1])&&r[2],a=s&&c.childNodes[s];while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if(1===a.nodeType&&++d&&a===e){i[h]=[k,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1]),!1===d)while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if((x?a.nodeName.toLowerCase()===f:1===a.nodeType)&&++d&&(p&&((i=(o=a[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[k,d]),a===e))break;return(d-=v)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return a[S]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=P(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:le(function(e){var r=[],i=[],s=f(e.replace($,"$1"));return s[S]?le(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:le(function(t){return function(e){return 0<se(t,e).length}}),contains:le(function(t){return t=t.replace(te,ne),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),lang:le(function(n){return V.test(n||"")||se.error("unsupported lang: "+n),n=n.replace(te,ne).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ve(function(){return[0]}),last:ve(function(e,t){return[t-1]}),eq:ve(function(e,t,n){return[n<0?n+t:n]}),even:ve(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ve(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ve(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ve(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=de(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=he(e);function me(){}function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function be(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){while(e=e[u])if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[k,p];if(n){while(e=e[u])if((1===e.nodeType||f)&&s(e,t,n))return!0}else while(e=e[u])if(1===e.nodeType||f)if(i=(o=e[S]||(e[S]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===k&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function we(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Ce(d,h,g,v,y,e){return v&&!v[S]&&(v=Ce(v)),y&&!y[S]&&(y=Ce(y,e)),le(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:Te(c,s,d,n,r),p=g?y||(e?d:l||v)?[]:t:f;if(g&&g(f,p,n,r),v){i=Te(p,u),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a))}if(e){if(y||d){if(y){i=[],o=p.length;while(o--)(a=p[o])&&i.push(f[o]=a);y(null,p=[],i,r)}o=p.length;while(o--)(a=p[o])&&-1<(i=y?P(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=Te(p===t?p.splice(l,p.length):p),y?y(null,t,p,r):H.apply(t,p)})}function Ee(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=be(function(e){return e===i},a,!0),l=be(function(e){return-1<P(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[be(we(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[S]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return Ce(1<s&&we(c),1<s&&xe(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace($,"$1"),t,s<n&&Ee(e.slice(s,n)),n<r&&Ee(e=e.slice(n)),n<r&&xe(e))}c.push(t)}return we(c)}return me.prototype=b.filters=b.pseudos,b.setFilters=new me,h=se.tokenize=function(e,t){var n,r,i,o,a,s,u,l=x[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=_.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=z.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace($," ")}),a=a.slice(n.length)),b.filter)!(r=G[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?se.error(e):x(e,s).slice(0)},f=se.compile=function(e,t){var n,v,y,m,x,r,i=[],o=[],a=A[e+" "];if(!a){t||(t=h(e)),n=t.length;while(n--)(a=Ee(t[n]))[S]?i.push(a):o.push(a);(a=A(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=k+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==C||(T(o),n=!E);while(s=v[a++])if(s(o,t||C,n)){r.push(o);break}i&&(k=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=q.call(r));f=Te(f)}H.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&se.uniqueSort(r)}return i&&(k=h,w=p),c},m?le(r):r))).selector=e}return a},g=se.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,ne),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=G.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(te,ne),ee.test(o[0].type)&&ye(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return H.apply(n,r),n;break}}}return(l||f(e,c))(r,t,!E,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},d.sortStable=S.split("").sort(j).join("")===S,d.detectDuplicates=!!l,T(),d.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(C.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),d.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(C);S.find=d,S.expr=d.selectors,S.expr[":"]=S.expr.pseudos,S.uniqueSort=S.unique=d.uniqueSort,S.text=d.getText,S.isXMLDoc=d.isXML,S.contains=d.contains,S.escapeSelector=d.escape;var h=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&S(e).is(n))break;r.push(e)}return r},T=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},k=S.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1<i.call(n,e)!==r}):S.filter(n,e,r)}S.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?S.find.matchesSelector(r,e)?[r]:[]:S.find.matches(e,S.grep(t,function(e){return 1===e.nodeType}))},S.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(S(e).filter(function(){for(t=0;t<r;t++)if(S.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)S.find(e,i[t],n);return 1<r?S.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&k.test(e)?S(e):e||[],!1).length}});var D,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(S.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&S(e);if(!k.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&S.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?S.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(S(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return h(e,"parentNode")},parentsUntil:function(e,t,n){return h(e,"parentNode",n)},next:function(e){return O(e,"nextSibling")},prev:function(e){return O(e,"previousSibling")},nextAll:function(e){return h(e,"nextSibling")},prevAll:function(e){return h(e,"previousSibling")},nextUntil:function(e,t,n){return h(e,"nextSibling",n)},prevUntil:function(e,t,n){return h(e,"previousSibling",n)},siblings:function(e){return T((e.parentNode||{}).firstChild,e)},children:function(e){return T(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(A(e,"template")&&(e=e.content||e),S.merge([],e.childNodes))}},function(r,i){S.fn[r]=function(e,t){var n=S.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=S.filter(t,n)),1<this.length&&(H[r]||S.uniqueSort(n),L.test(r)&&n.reverse()),this.pushStack(n)}});var P=/[^\x20\t\r\n\f]+/g;function R(e){return e}function M(e){throw e}function I(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}S.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},S.each(e.match(P)||[],function(e,t){n[t]=!0}),n):S.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){S.each(e,function(e,t){m(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==w(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return S.each(arguments,function(e,t){var n;while(-1<(n=S.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<S.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},S.extend({Deferred:function(e){var o=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return S.Deferred(function(r){S.each(o,function(e,t){var n=m(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&m(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,m(t)?s?t.call(e,l(u,o,R,s),l(u,o,M,s)):(u++,t.call(e,l(u,o,R,s),l(u,o,M,s),l(u,o,R,o.notifyWith))):(a!==R&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==M&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(S.Deferred.getStackHook&&(t.stackTrace=S.Deferred.getStackHook()),C.setTimeout(t))}}return S.Deferred(function(e){o[0][3].add(l(0,e,m(r)?r:R,e.notifyWith)),o[1][3].add(l(0,e,m(t)?t:R)),o[2][3].add(l(0,e,m(n)?n:M))}).promise()},promise:function(e){return null!=e?S.extend(e,a):a}},s={};return S.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=s.call(arguments),o=S.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?s.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(I(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||m(i[t]&&i[t].then)))return o.then();while(t--)I(i[t],a(t),o.reject);return o.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&W.test(e.name)&&C.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},S.readyException=function(e){C.setTimeout(function(){throw e})};var F=S.Deferred();function B(){E.removeEventListener("DOMContentLoaded",B),C.removeEventListener("load",B),S.ready()}S.fn.ready=function(e){return F.then(e)["catch"](function(e){S.readyException(e)}),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0)!==e&&0<--S.readyWait||F.resolveWith(E,[S])}}),S.ready.then=F.then,"complete"===E.readyState||"loading"!==E.readyState&&!E.documentElement.doScroll?C.setTimeout(S.ready):(E.addEventListener("DOMContentLoaded",B),C.addEventListener("load",B));var $=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===w(n))for(s in i=!0,n)$(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(S(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},_=/^-ms-/,z=/-([a-z])/g;function U(e,t){return t.toUpperCase()}function X(e){return e.replace(_,"ms-").replace(z,U)}var V=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function G(){this.expando=S.expando+G.uid++}G.uid=1,G.prototype={cache:function(e){var t=e[this.expando];return t||(t={},V(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[X(t)]=n;else for(r in t)i[X(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][X(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(X):(t=X(t))in r?[t]:t.match(P)||[]).length;while(n--)delete r[t[n]]}(void 0===t||S.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!S.isEmptyObject(t)}};var Y=new G,Q=new G,J=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,K=/[A-Z]/g;function Z(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(K,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:J.test(i)?JSON.parse(i):i)}catch(e){}Q.set(e,t,n)}else n=void 0;return n}S.extend({hasData:function(e){return Q.hasData(e)||Y.hasData(e)},data:function(e,t,n){return Q.access(e,t,n)},removeData:function(e,t){Q.remove(e,t)},_data:function(e,t,n){return Y.access(e,t,n)},_removeData:function(e,t){Y.remove(e,t)}}),S.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=Q.get(o),1===o.nodeType&&!Y.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=X(r.slice(5)),Z(o,r,i[r]));Y.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){Q.set(this,n)}):$(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=Q.get(o,n))?t:void 0!==(t=Z(o,n))?t:void 0;this.each(function(){Q.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){Q.remove(this,e)})}}),S.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.access(e,t,S.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=S.queue(e,t),r=n.length,i=n.shift(),o=S._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){S.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Y.get(e,n)||Y.access(e,n,{empty:S.Callbacks("once memory").add(function(){Y.remove(e,[t+"queue",n])})})}}),S.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?S.queue(this[0],t):void 0===n?this:this.each(function(){var e=S.queue(this,t,n);S._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&S.dequeue(this,t)})},dequeue:function(e){return this.each(function(){S.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=S.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=Y.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),ne=["Top","Right","Bottom","Left"],re=E.documentElement,ie=function(e){return S.contains(e.ownerDocument,e)},oe={composed:!0};re.getRootNode&&(ie=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(oe)===e.ownerDocument});var ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ie(e)&&"none"===S.css(e,"display")};function se(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return S.css(e,t,"")},u=s(),l=n&&n[3]||(S.cssNumber[t]?"":"px"),c=e.nodeType&&(S.cssNumber[t]||"px"!==l&&+u)&&te.exec(S.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)S.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,S.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ue={};function le(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Y.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ae(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ue[s])||(o=a.body.appendChild(a.createElement(s)),u=S.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ue[s]=u)))):"none"!==n&&(l[c]="none",Y.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}S.fn.extend({show:function(){return le(this,!0)},hide:function(){return le(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?S(this).show():S(this).hide()})}});var ce,fe,pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="<textarea>x</textarea>",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="<option></option>",y.option=!!ce.lastChild;var ge={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],"globalEval",!t||Y.get(t[n],"globalEval"))}ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td,y.option||(ge.optgroup=ge.option=[1,"<select multiple='multiple'>","</select>"]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===w(o))S.merge(p,o.nodeType?[o]:o);else if(me.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+S.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;S.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<S.inArray(o,r))i&&i.push(o);else if(l=ie(o),a=ve(f.appendChild(o),"script"),l&&ye(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}var be=/^([^.]*)(?:\.(.+)|)/;function we(){return!0}function Te(){return!1}function Ce(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ee(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ee(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Te;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return S().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=S.guid++)),e.each(function(){S.event.add(this,t,i,r,n)})}function Se(e,i,o){o?(Y.set(e,i,!1),S.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Y.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(S.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Y.set(this,i,r),t=o(this,i),this[i](),r!==(n=Y.get(this,i))||t?Y.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n&&n.value}else r.length&&(Y.set(this,i,{value:S.event.trigger(S.extend(r[0],S.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,i)&&S.event.add(e,i,we)}S.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.get(t);if(V(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&S.find.matchesSelector(re,i),n.guid||(n.guid=S.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof S&&S.event.triggered!==e.type?S.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(P)||[""]).length;while(l--)d=g=(s=be.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=S.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=S.event.special[d]||{},c=S.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&S.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),S.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.hasData(e)&&Y.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(P)||[""]).length;while(l--)if(d=g=(s=be.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=S.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||S.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)S.event.remove(e,d+t[l],n,r,!0);S.isEmptyObject(u)&&Y.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=S.event.fix(e),l=(Y.get(this,"events")||Object.create(null))[u.type]||[],c=S.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=S.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((S.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<S(i,this).index(l):S.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(S.Event.prototype,t,{enumerable:!0,configurable:!0,get:m(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[S.expando]?e:new S.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Se(t,"click",we),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Se(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&A(t,"input")&&Y.get(t,"click")||A(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},S.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?we:Te,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:Te,isPropagationStopped:Te,isImmediatePropagationStopped:Te,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=we,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=we,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=we,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},S.event.addProp),S.each({focus:"focusin",blur:"focusout"},function(e,t){S.event.special[e]={setup:function(){return Se(this,e,Ce),!1},trigger:function(){return Se(this,e),!0},_default:function(){return!0},delegateType:t}}),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){S.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||S.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),S.fn.extend({on:function(e,t,n,r){return Ee(this,e,t,n,r)},one:function(e,t,n,r){return Ee(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,S(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Te),this.each(function(){S.event.remove(this,e,n,t)})}});var ke=/<script|<style|<link/i,Ae=/checked\s*(?:[^=]|=\s*.checked.)/i,Ne=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)S.event.add(t,i,s[i][n]);Q.hasData(e)&&(o=Q.access(e),a=S.extend({},o),Q.set(t,a))}}function He(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=m(d);if(h||1<f&&"string"==typeof d&&!y.checkClone&&Ae.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),He(t,r,i,o)});if(f&&(t=(e=xe(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=S.map(ve(e,"script"),De)).length;c<f;c++)u=e,c!==p&&(u=S.clone(u,!0,!0),s&&S.merge(a,ve(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,S.map(a,qe),c=0;c<s;c++)u=a[c],he.test(u.type||"")&&!Y.access(u,"globalEval")&&S.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?S._evalUrl&&!u.noModule&&S._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):b(u.textContent.replace(Ne,""),u,l))}return n}function Oe(e,t,n){for(var r,i=t?S.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||S.cleanData(ve(r)),r.parentNode&&(n&&ie(r)&&ye(ve(r,"script")),r.parentNode.removeChild(r));return e}S.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=ie(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&pe.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ve(e),a=a||ve(c),r=0,i=o.length;r<i;r++)Le(o[r],a[r]);else Le(e,c);return 0<(a=ve(c,"script")).length&&ye(a,!f&&ve(e,"script")),c},cleanData:function(e){for(var t,n,r,i=S.event.special,o=0;void 0!==(n=e[o]);o++)if(V(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?S.event.remove(n,r):S.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),S.fn.extend({detach:function(e){return Oe(this,e,!0)},remove:function(e){return Oe(this,e)},text:function(e){return $(this,function(e){return void 0===e?S.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return He(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||je(this,e).appendChild(e)})},prepend:function(){return He(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=je(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return He(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return He(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(S.cleanData(ve(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return S.clone(this,e,t)})},html:function(e){return $(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!ke.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(S.cleanData(ve(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return He(this,arguments,function(e){var t=this.parentNode;S.inArray(this,n)<0&&(S.cleanData(ve(this)),t&&t.replaceChild(e,this))},n)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){S.fn[e]=function(e){for(var t,n=[],r=S(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),S(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var Pe=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Re=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},Me=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Ie=new RegExp(ne.join("|"),"i");function We(e,t,n){var r,i,o,a,s=e.style;return(n=n||Re(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||ie(e)||(a=S.style(e,t)),!y.pixelBoxStyles()&&Pe.test(a)&&Ie.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function Fe(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",re.appendChild(u).appendChild(l);var e=C.getComputedStyle(l);n="1%"!==e.top,s=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),r=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),re.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=E.createElement("div"),l=E.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle="content-box"===l.style.backgroundClip,S.extend(y,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=E.createElement("table"),t=E.createElement("tr"),n=E.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",re.appendChild(e).appendChild(t).appendChild(n),r=C.getComputedStyle(t),a=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===t.offsetHeight,re.removeChild(e)),a}}))}();var Be=["Webkit","Moz","ms"],$e=E.createElement("div").style,_e={};function ze(e){var t=S.cssProps[e]||_e[e];return t||(e in $e?e:_e[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=Be.length;while(n--)if((e=Be[n]+t)in $e)return e}(e)||e)}var Ue=/^(none|table(?!-c[ea]).+)/,Xe=/^--/,Ve={position:"absolute",visibility:"hidden",display:"block"},Ge={letterSpacing:"0",fontWeight:"400"};function Ye(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Qe(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=S.css(e,n+ne[a],!0,i)),r?("content"===n&&(u-=S.css(e,"padding"+ne[a],!0,i)),"margin"!==n&&(u-=S.css(e,"border"+ne[a]+"Width",!0,i))):(u+=S.css(e,"padding"+ne[a],!0,i),"padding"!==n?u+=S.css(e,"border"+ne[a]+"Width",!0,i):s+=S.css(e,"border"+ne[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function Je(e,t,n){var r=Re(e),i=(!y.boxSizingReliable()||n)&&"border-box"===S.css(e,"boxSizing",!1,r),o=i,a=We(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Pe.test(a)){if(!n)return a;a="auto"}return(!y.boxSizingReliable()&&i||!y.reliableTrDimensions()&&A(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===S.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===S.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Qe(e,t,n||(i?"border":"content"),o,r,a)+"px"}function Ke(e,t,n,r,i){return new Ke.prototype.init(e,t,n,r,i)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=We(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=X(t),u=Xe.test(t),l=e.style;if(u||(t=ze(s)),a=S.cssHooks[t]||S.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=te.exec(n))&&i[1]&&(n=se(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(S.cssNumber[s]?"":"px")),y.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=X(t);return Xe.test(t)||(t=ze(s)),(a=S.cssHooks[t]||S.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=We(e,t,r)),"normal"===i&&t in Ge&&(i=Ge[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),S.each(["height","width"],function(e,u){S.cssHooks[u]={get:function(e,t,n){if(t)return!Ue.test(S.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Je(e,u,n):Me(e,Ve,function(){return Je(e,u,n)})},set:function(e,t,n){var r,i=Re(e),o=!y.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===S.css(e,"boxSizing",!1,i),s=n?Qe(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-Qe(e,u,"border",!1,i)-.5)),s&&(r=te.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=S.css(e,u)),Ye(0,t,s)}}}),S.cssHooks.marginLeft=Fe(y.reliableMarginLeft,function(e,t){if(t)return(parseFloat(We(e,"marginLeft"))||e.getBoundingClientRect().left-Me(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),S.each({margin:"",padding:"",border:"Width"},function(i,o){S.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+ne[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(S.cssHooks[i+o].set=Ye)}),S.fn.extend({css:function(e,t){return $(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Re(e),i=t.length;a<i;a++)o[t[a]]=S.css(e,t[a],!1,r);return o}return void 0!==n?S.style(e,t,n):S.css(e,t)},e,t,1<arguments.length)}}),((S.Tween=Ke).prototype={constructor:Ke,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(S.cssNumber[n]?"":"px")},cur:function(){var e=Ke.propHooks[this.prop];return e&&e.get?e.get(this):Ke.propHooks._default.get(this)},run:function(e){var t,n=Ke.propHooks[this.prop];return this.options.duration?this.pos=t=S.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Ke.propHooks._default.set(this),this}}).init.prototype=Ke.prototype,(Ke.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=S.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||!S.cssHooks[e.prop]&&null==e.elem.style[ze(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=Ke.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},S.fx=Ke.prototype.init,S.fx.step={};var Ze,et,tt,nt,rt=/^(?:toggle|show|hide)$/,it=/queueHooks$/;function ot(){et&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(ot):C.setTimeout(ot,S.fx.interval),S.fx.tick())}function at(){return C.setTimeout(function(){Ze=void 0}),Ze=Date.now()}function st(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ne[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ut(e,t,n){for(var r,i=(lt.tweeners[t]||[]).concat(lt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function lt(o,e,t){var n,a,r=0,i=lt.prefilters.length,s=S.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=Ze||at(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:S.extend({},e),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},t),originalProperties:e,originalOptions:t,startTime:Ze||at(),duration:t.duration,tweens:[],createTween:function(e,t){var n=S.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=X(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=S.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=lt.prefilters[r].call(l,o,c,l.opts))return m(n.stop)&&(S._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return S.map(c,ut,l),m(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),S.fx.timer(S.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}S.Animation=S.extend(lt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(P);for(var n,r=0,i=e.length;r<i;r++)n=e[r],lt.tweeners[n]=lt.tweeners[n]||[],lt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),v=Y.get(e,"fxshow");for(r in n.queue||(null==(a=S._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,S.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],rt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||S.style(e,r)}if((u=!S.isEmptyObject(t))||!S.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Y.get(e,"display")),"none"===(c=S.css(e,"display"))&&(l?c=l:(le([e],!0),l=e.style.display||l,c=S.css(e,"display"),le([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===S.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Y.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&le([e],!0),p.done(function(){for(r in g||le([e]),Y.remove(e,"fxshow"),d)S.style(e,r,d[r])})),u=ut(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?lt.prefilters.unshift(e):lt.prefilters.push(e)}}),S.speed=function(e,t,n){var r=e&&"object"==typeof e?S.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return S.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in S.fx.speeds?r.duration=S.fx.speeds[r.duration]:r.duration=S.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&S.dequeue(this,r.queue)},r},S.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=S.isEmptyObject(t),o=S.speed(e,n,r),a=function(){var e=lt(this,S.extend({},t),o);(i||Y.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=S.timers,r=Y.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&it.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||S.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=Y.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=S.timers,o=n?n.length:0;for(t.finish=!0,S.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),S.each(["toggle","show","hide"],function(e,r){var i=S.fn[r];S.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(st(r,!0),e,t,n)}}),S.each({slideDown:st("show"),slideUp:st("hide"),slideToggle:st("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){S.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),S.timers=[],S.fx.tick=function(){var e,t=0,n=S.timers;for(Ze=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||S.fx.stop(),Ze=void 0},S.fx.timer=function(e){S.timers.push(e),S.fx.start()},S.fx.interval=13,S.fx.start=function(){et||(et=!0,ot())},S.fx.stop=function(){et=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(r,e){return r=S.fx&&S.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},tt=E.createElement("input"),nt=E.createElement("select").appendChild(E.createElement("option")),tt.type="checkbox",y.checkOn=""!==tt.value,y.optSelected=nt.selected,(tt=E.createElement("input")).value="t",tt.type="radio",y.radioValue="t"===tt.value;var ct,ft=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return $(this,S.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){S.removeAttr(this,e)})}}),S.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?S.prop(e,t,n):(1===o&&S.isXMLDoc(e)||(i=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?ct:void 0)),void 0!==n?null===n?void S.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=S.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&"radio"===t&&A(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(P);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),ct={set:function(e,t,n){return!1===t?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),function(e,t){var a=ft[t]||S.find.attr;ft[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=ft[o],ft[o]=r,r=null!=a(e,t,n)?o:null,ft[o]=i),r}});var pt=/^(?:input|select|textarea|button)$/i,dt=/^(?:a|area)$/i;function ht(e){return(e.match(P)||[]).join(" ")}function gt(e){return e.getAttribute&&e.getAttribute("class")||""}function vt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(P)||[]}S.fn.extend({prop:function(e,t){return $(this,S.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[S.propFix[e]||e]})}}),S.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&S.isXMLDoc(e)||(t=S.propFix[t]||t,i=S.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=S.find.attr(e,"tabindex");return t?parseInt(t,10):pt.test(e.nodeName)||dt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),y.optSelected||(S.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){S.propFix[this.toLowerCase()]=this}),S.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).addClass(t.call(this,e,gt(this)))});if((e=vt(t)).length)while(n=this[u++])if(i=gt(n),r=1===n.nodeType&&" "+ht(i)+" "){a=0;while(o=e[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=ht(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).removeClass(t.call(this,e,gt(this)))});if(!arguments.length)return this.attr("class","");if((e=vt(t)).length)while(n=this[u++])if(i=gt(n),r=1===n.nodeType&&" "+ht(i)+" "){a=0;while(o=e[a++])while(-1<r.indexOf(" "+o+" "))r=r.replace(" "+o+" "," ");i!==(s=ht(r))&&n.setAttribute("class",s)}return this},toggleClass:function(i,t){var o=typeof i,a="string"===o||Array.isArray(i);return"boolean"==typeof t&&a?t?this.addClass(i):this.removeClass(i):m(i)?this.each(function(e){S(this).toggleClass(i.call(this,e,gt(this),t),t)}):this.each(function(){var e,t,n,r;if(a){t=0,n=S(this),r=vt(i);while(e=r[t++])n.hasClass(e)?n.removeClass(e):n.addClass(e)}else void 0!==i&&"boolean"!==o||((e=gt(this))&&Y.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===i?"":Y.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+ht(gt(n))+" ").indexOf(t))return!0;return!1}});var yt=/\r/g;S.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=m(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,S(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=S.map(t,function(e){return null==e?"":e+""})),(r=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=S.valHooks[t.type]||S.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(yt,""):null==e?"":e:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:ht(S.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,"optgroup"))){if(t=S(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=S.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<S.inArray(S.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),S.each(["radio","checkbox"],function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<S.inArray(S(e).val(),t)}},y.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),y.focusin="onfocusin"in C;var mt=/^(?:focusinfocus|focusoutblur)$/,xt=function(e){e.stopPropagation()};S.extend(S.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||E],d=v.call(e,"type")?e.type:e,h=v.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||E,3!==n.nodeType&&8!==n.nodeType&&!mt.test(d+S.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[S.expando]?e:new S.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:S.makeArray(t,[e]),c=S.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!x(n)){for(s=c.delegateType||d,mt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||E)&&p.push(a.defaultView||a.parentWindow||C)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(Y.get(o,"events")||Object.create(null))[e.type]&&Y.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&V(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!V(n)||u&&m(n[d])&&!x(n)&&((a=n[u])&&(n[u]=null),S.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,xt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,xt),S.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(r,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each(function(){S.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}}),y.focusin||S.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(e){S.event.simulate(r,e.target,S.event.fix(e))};S.event.special[r]={setup:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r);t||e.addEventListener(n,i,!0),Y.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r)-1;t?Y.access(e,r,t):(e.removeEventListener(n,i,!0),Y.remove(e,r))}}});var bt=C.location,wt={guid:Date.now()},Tt=/\?/;S.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||S.error("Invalid XML: "+(n?S.map(n.childNodes,function(e){return e.textContent}).join("\n"):e)),t};var Ct=/\[\]$/,Et=/\r?\n/g,St=/^(?:submit|button|image|reset|file)$/i,kt=/^(?:input|select|textarea|keygen)/i;function At(n,e,r,i){var t;if(Array.isArray(e))S.each(e,function(e,t){r||Ct.test(n)?i(n,t):At(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==w(e))i(n,e);else for(t in e)At(n+"["+t+"]",e[t],r,i)}S.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,function(){i(this.name,this.value)});else for(n in e)At(n,e[n],t,i);return r.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=S.prop(this,"elements");return e?S.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!S(this).is(":disabled")&&kt.test(this.nodeName)&&!St.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,function(e){return{name:t.name,value:e.replace(Et,"\r\n")}}):{name:t.name,value:n.replace(Et,"\r\n")}}).get()}});var Nt=/%20/g,jt=/#.*$/,Dt=/([?&])_=[^&]*/,qt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Lt=/^(?:GET|HEAD)$/,Ht=/^\/\//,Ot={},Pt={},Rt="*/".concat("*"),Mt=E.createElement("a");function It(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(P)||[];if(m(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Wt(t,i,o,a){var s={},u=t===Pt;function l(e){var r;return s[e]=!0,S.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function Ft(e,t){var n,r,i=S.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&S.extend(!0,e,r),e}Mt.href=bt.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:bt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(bt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Rt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Ft(Ft(e,S.ajaxSettings),t):Ft(S.ajaxSettings,e)},ajaxPrefilter:It(Ot),ajaxTransport:It(Pt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=S.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?S(y):S.event,x=S.Deferred(),b=S.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=qt.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||bt.href)+"").replace(Ht,bt.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(P)||[""],null==v.crossDomain){r=E.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Mt.protocol+"//"+Mt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=S.param(v.data,v.traditional)),Wt(Ot,v,t,T),h)return T;for(i in(g=S.event&&v.global)&&0==S.active++&&S.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Lt.test(v.type),f=v.url.replace(jt,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(Nt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(Tt.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(Dt,"$1"),o=(Tt.test(f)?"&":"?")+"_="+wt.guid+++o),v.url=f+o),v.ifModified&&(S.lastModified[f]&&T.setRequestHeader("If-Modified-Since",S.lastModified[f]),S.etag[f]&&T.setRequestHeader("If-None-Match",S.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+Rt+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Wt(Pt,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=C.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),!i&&-1<S.inArray("script",v.dataTypes)&&S.inArray("json",v.dataTypes)<0&&(v.converters["text script"]=function(){}),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(S.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(S.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--S.active||S.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return S.get(e,t,n,"json")},getScript:function(e,t){return S.get(e,void 0,t,"script")}}),S.each(["get","post"],function(e,i){S[i]=function(e,t,n,r){return m(t)&&(r=r||n,n=t,t=void 0),S.ajax(S.extend({url:e,type:i,dataType:r,data:t,success:n},S.isPlainObject(e)&&e))}}),S.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),S._evalUrl=function(e,t,n){return S.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){S.globalEval(e,t,n)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return m(n)?this.each(function(e){S(this).wrapInner(n.call(this,e))}):this.each(function(){var e=S(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=m(t);return this.each(function(e){S(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){S(this).replaceWith(this.childNodes)}),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var Bt={0:200,1223:204},$t=S.ajaxSettings.xhr();y.cors=!!$t&&"withCredentials"in $t,y.ajax=$t=!!$t,S.ajaxTransport(function(i){var o,a;if(y.cors||$t&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(Bt[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),S.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),S.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return S.globalEval(e),e}}}),S.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),S.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=S("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=ht(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&S.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?S("<div>").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var Xt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;S.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||S.guid++,i},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.isArray=Array.isArray,S.parseJSON=JSON.parse,S.nodeName=A,S.isFunction=m,S.isWindow=x,S.camelCase=X,S.type=w,S.now=Date.now,S.isNumeric=function(e){var t=S.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},S.trim=function(e){return null==e?"":(e+"").replace(Xt,"")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return S});var Vt=C.jQuery,Gt=C.$;return S.noConflict=function(e){return C.$===S&&(C.$=Gt),e&&C.jQuery===S&&(C.jQuery=Vt),S},"undefined"==typeof e&&(C.jQuery=C.$=S),S});
+/*! jQuery UI - v1.13.2 - 2022-08-01
+* http://jqueryui.com
+* Includes: widget.js, position.js, data.js, disable-selection.js, focusable.js, form-reset-mixin.js, jquery-patch.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/resizable.js, widgets/mouse.js
+* Copyright jQuery Foundation and other contributors; Licensed MIT */
+
+!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(y){"use strict";y.ui=y.ui||{};y.ui.version="1.13.2";var n,i=0,h=Array.prototype.hasOwnProperty,a=Array.prototype.slice;y.cleanData=(n=y.cleanData,function(t){for(var e,i,s=0;null!=(i=t[s]);s++)(e=y._data(i,"events"))&&e.remove&&y(i).triggerHandler("remove");n(t)}),y.widget=function(t,i,e){var s,n,o,h={},a=t.split(".")[0],r=a+"-"+(t=t.split(".")[1]);return e||(e=i,i=y.Widget),Array.isArray(e)&&(e=y.extend.apply(null,[{}].concat(e))),y.expr.pseudos[r.toLowerCase()]=function(t){return!!y.data(t,r)},y[a]=y[a]||{},s=y[a][t],n=y[a][t]=function(t,e){if(!this||!this._createWidget)return new n(t,e);arguments.length&&this._createWidget(t,e)},y.extend(n,s,{version:e.version,_proto:y.extend({},e),_childConstructors:[]}),(o=new i).options=y.widget.extend({},o.options),y.each(e,function(e,s){function n(){return i.prototype[e].apply(this,arguments)}function o(t){return i.prototype[e].apply(this,t)}h[e]="function"==typeof s?function(){var t,e=this._super,i=this._superApply;return this._super=n,this._superApply=o,t=s.apply(this,arguments),this._super=e,this._superApply=i,t}:s}),n.prototype=y.widget.extend(o,{widgetEventPrefix:s&&o.widgetEventPrefix||t},h,{constructor:n,namespace:a,widgetName:t,widgetFullName:r}),s?(y.each(s._childConstructors,function(t,e){var i=e.prototype;y.widget(i.namespace+"."+i.widgetName,n,e._proto)}),delete s._childConstructors):i._childConstructors.push(n),y.widget.bridge(t,n),n},y.widget.extend=function(t){for(var e,i,s=a.call(arguments,1),n=0,o=s.length;n<o;n++)for(e in s[n])i=s[n][e],h.call(s[n],e)&&void 0!==i&&(y.isPlainObject(i)?t[e]=y.isPlainObject(t[e])?y.widget.extend({},t[e],i):y.widget.extend({},i):t[e]=i);return t},y.widget.bridge=function(o,e){var h=e.prototype.widgetFullName||o;y.fn[o]=function(i){var t="string"==typeof i,s=a.call(arguments,1),n=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=y.data(this,h);return"instance"===i?(n=e,!1):e?"function"!=typeof e[i]||"_"===i.charAt(0)?y.error("no such method '"+i+"' for "+o+" widget instance"):(t=e[i].apply(e,s))!==e&&void 0!==t?(n=t&&t.jquery?n.pushStack(t.get()):t,!1):void 0:y.error("cannot call methods on "+o+" prior to initialization; attempted to call method '"+i+"'")}):n=void 0:(s.length&&(i=y.widget.extend.apply(null,[i].concat(s))),this.each(function(){var t=y.data(this,h);t?(t.option(i||{}),t._init&&t._init()):y.data(this,h,new e(i,this))})),n}},y.Widget=function(){},y.Widget._childConstructors=[],y.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=y(e||this.defaultElement||this)[0],this.element=y(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=y(),this.hoverable=y(),this.focusable=y(),this.classesElementLookup={},e!==this&&(y.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=y(e.style?e.ownerDocument:e.document||e),this.window=y(this.document[0].defaultView||this.document[0].parentWindow)),this.options=y.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:y.noop,_create:y.noop,_init:y.noop,destroy:function(){var i=this;this._destroy(),y.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:y.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return y.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=y.widget.extend({},this.options[t]),n=0;n<i.length-1;n++)s[i[n]]=s[i[n]]||{},s=s[i[n]];if(t=i.pop(),1===arguments.length)return void 0===s[t]?null:s[t];s[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];o[t]=e}return this._setOptions(o),this},_setOptions:function(t){for(var e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,i,s;for(e in t)s=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&s&&s.length&&(i=y(s.get()),this._removeClass(s,e),i.addClass(this._classes({element:i,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(n){var o=[],h=this;function t(t,e){for(var i,s=0;s<t.length;s++)i=h.classesElementLookup[t[s]]||y(),i=n.add?(function(){var i=[];n.element.each(function(t,e){y.map(h.classesElementLookup,function(t){return t}).some(function(t){return t.is(e)})||i.push(e)}),h._on(y(i),{remove:"_untrackClassesElement"})}(),y(y.uniqueSort(i.get().concat(n.element.get())))):y(i.not(n.element).get()),h.classesElementLookup[t[s]]=i,o.push(t[s]),e&&n.classes[t[s]]&&o.push(n.classes[t[s]])}return(n=y.extend({element:this.element,classes:this.options.classes||{}},n)).keys&&t(n.keys.match(/\S+/g)||[],!0),n.extra&&t(n.extra.match(/\S+/g)||[]),o.join(" ")},_untrackClassesElement:function(i){var s=this;y.each(s.classesElementLookup,function(t,e){-1!==y.inArray(i.target,e)&&(s.classesElementLookup[t]=y(e.not(i.target).get()))}),this._off(y(i.target))},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){var n="string"==typeof t||null===t,i={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s="boolean"==typeof s?s:i};return i.element.toggleClass(this._classes(i),s),this},_on:function(n,o,t){var h,a=this;"boolean"!=typeof n&&(t=o,o=n,n=!1),t?(o=h=y(o),this.bindings=this.bindings.add(o)):(t=o,o=this.element,h=this.widget()),y.each(t,function(t,e){function i(){if(n||!0!==a.options.disabled&&!y(this).hasClass("ui-state-disabled"))return("string"==typeof e?a[e]:e).apply(a,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||y.guid++);var s=t.match(/^([\w:-]*)\s*(.*)$/),t=s[1]+a.eventNamespace,s=s[2];s?h.on(t,s,i):o.on(t,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e),this.bindings=y(this.bindings.not(t).get()),this.focusable=y(this.focusable.not(t).get()),this.hoverable=y(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(y(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(y(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(y(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(y(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var s,n,o=this.options[t];if(i=i||{},(e=y.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],n=e.originalEvent)for(s in n)s in e||(e[s]=n[s]);return this.element.trigger(e,i),!("function"==typeof o&&!1===o.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},y.each({show:"fadeIn",hide:"fadeOut"},function(o,h){y.Widget.prototype["_"+o]=function(e,t,i){var s,n=(t="string"==typeof t?{effect:t}:t)?!0!==t&&"number"!=typeof t&&t.effect||h:o;"number"==typeof(t=t||{})?t={duration:t}:!0===t&&(t={}),s=!y.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),s&&y.effects&&y.effects.effect[n]?e[o](t):n!==o&&e[n]?e[n](t.duration,t.easing,i):e.queue(function(t){y(this)[o](),i&&i.call(e[0]),t()})}});var s,x,D,o,r,l,u,p,W;y.widget;function E(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function H(t,e){return parseInt(y.css(t,e),10)||0}function S(t){return null!=t&&t===t.window}x=Math.max,D=Math.abs,o=/left|center|right/,r=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,u=/^\w+/,p=/%$/,W=y.fn.position,y.position={scrollbarWidth:function(){if(void 0!==s)return s;var t,e=y("<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>"),i=e.children()[0];return y("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),s=t-i},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?y.position.scrollbarWidth():0,height:e?y.position.scrollbarWidth():0}},getWithinInfo:function(t){var e=y(t||window),i=S(e[0]),s=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:i,isDocument:s,offset:!i&&!s?y(t).offset():{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:e.outerWidth(),height:e.outerHeight()}}},y.fn.position=function(p){if(!p||!p.of)return W.apply(this,arguments);var d,c,f,g,m,t,_="string"==typeof(p=y.extend({},p)).of?y(document).find(p.of):y(p.of),w=y.position.getWithinInfo(p.within),v=y.position.getScrollInfo(w),b=(p.collision||"flip").split(" "),z={},e=9===(t=(e=_)[0]).nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:S(t)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:t.preventDefault?{width:0,height:0,offset:{top:t.pageY,left:t.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()};return _[0].preventDefault&&(p.at="left top"),c=e.width,f=e.height,m=y.extend({},g=e.offset),y.each(["my","at"],function(){var t,e,i=(p[this]||"").split(" ");(i=1===i.length?o.test(i[0])?i.concat(["center"]):r.test(i[0])?["center"].concat(i):["center","center"]:i)[0]=o.test(i[0])?i[0]:"center",i[1]=r.test(i[1])?i[1]:"center",t=l.exec(i[0]),e=l.exec(i[1]),z[this]=[t?t[0]:0,e?e[0]:0],p[this]=[u.exec(i[0])[0],u.exec(i[1])[0]]}),1===b.length&&(b[1]=b[0]),"right"===p.at[0]?m.left+=c:"center"===p.at[0]&&(m.left+=c/2),"bottom"===p.at[1]?m.top+=f:"center"===p.at[1]&&(m.top+=f/2),d=E(z.at,c,f),m.left+=d[0],m.top+=d[1],this.each(function(){var i,t,h=y(this),a=h.outerWidth(),r=h.outerHeight(),e=H(this,"marginLeft"),s=H(this,"marginTop"),n=a+e+H(this,"marginRight")+v.width,o=r+s+H(this,"marginBottom")+v.height,l=y.extend({},m),u=E(z.my,h.outerWidth(),h.outerHeight());"right"===p.my[0]?l.left-=a:"center"===p.my[0]&&(l.left-=a/2),"bottom"===p.my[1]?l.top-=r:"center"===p.my[1]&&(l.top-=r/2),l.left+=u[0],l.top+=u[1],i={marginLeft:e,marginTop:s},y.each(["left","top"],function(t,e){y.ui.position[b[t]]&&y.ui.position[b[t]][e](l,{targetWidth:c,targetHeight:f,elemWidth:a,elemHeight:r,collisionPosition:i,collisionWidth:n,collisionHeight:o,offset:[d[0]+u[0],d[1]+u[1]],my:p.my,at:p.at,within:w,elem:h})}),p.using&&(t=function(t){var e=g.left-l.left,i=e+c-a,s=g.top-l.top,n=s+f-r,o={target:{element:_,left:g.left,top:g.top,width:c,height:f},element:{element:h,left:l.left,top:l.top,width:a,height:r},horizontal:i<0?"left":0<e?"right":"center",vertical:n<0?"top":0<s?"bottom":"middle"};c<a&&D(e+i)<c&&(o.horizontal="center"),f<r&&D(s+n)<f&&(o.vertical="middle"),x(D(e),D(i))>x(D(s),D(n))?o.important="horizontal":o.important="vertical",p.using.call(this,t,o)}),h.offset(y.extend(l,{using:t}))})},y.ui.position={fit:{left:function(t,e){var i=e.within,s=i.isWindow?i.scrollLeft:i.offset.left,n=i.width,o=t.left-e.collisionPosition.marginLeft,h=s-o,a=o+e.collisionWidth-n-s;e.collisionWidth>n?0<h&&a<=0?(i=t.left+h+e.collisionWidth-n-s,t.left+=h-i):t.left=!(0<a&&h<=0)&&a<h?s+n-e.collisionWidth:s:0<h?t.left+=h:0<a?t.left-=a:t.left=x(t.left-o,t.left)},top:function(t,e){var i=e.within,s=i.isWindow?i.scrollTop:i.offset.top,n=e.within.height,o=t.top-e.collisionPosition.marginTop,h=s-o,a=o+e.collisionHeight-n-s;e.collisionHeight>n?0<h&&a<=0?(i=t.top+h+e.collisionHeight-n-s,t.top+=h-i):t.top=!(0<a&&h<=0)&&a<h?s+n-e.collisionHeight:s:0<h?t.top+=h:0<a?t.top-=a:t.top=x(t.top-o,t.top)}},flip:{left:function(t,e){var i=e.within,s=i.offset.left+i.scrollLeft,n=i.width,o=i.isWindow?i.scrollLeft:i.offset.left,h=t.left-e.collisionPosition.marginLeft,a=h-o,r=h+e.collisionWidth-n-o,l="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,i="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,h=-2*e.offset[0];a<0?((s=t.left+l+i+h+e.collisionWidth-n-s)<0||s<D(a))&&(t.left+=l+i+h):0<r&&(0<(o=t.left-e.collisionPosition.marginLeft+l+i+h-o)||D(o)<r)&&(t.left+=l+i+h)},top:function(t,e){var i=e.within,s=i.offset.top+i.scrollTop,n=i.height,o=i.isWindow?i.scrollTop:i.offset.top,h=t.top-e.collisionPosition.marginTop,a=h-o,r=h+e.collisionHeight-n-o,l="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,i="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,h=-2*e.offset[1];a<0?((s=t.top+l+i+h+e.collisionHeight-n-s)<0||s<D(a))&&(t.top+=l+i+h):0<r&&(0<(o=t.top-e.collisionPosition.marginTop+l+i+h-o)||D(o)<r)&&(t.top+=l+i+h)}},flipfit:{left:function(){y.ui.position.flip.left.apply(this,arguments),y.ui.position.fit.left.apply(this,arguments)},top:function(){y.ui.position.flip.top.apply(this,arguments),y.ui.position.fit.top.apply(this,arguments)}}};var t;y.ui.position,y.extend(y.expr.pseudos,{data:y.expr.createPseudo?y.expr.createPseudo(function(e){return function(t){return!!y.data(t,e)}}):function(t,e,i){return!!y.data(t,i[3])}}),y.fn.extend({disableSelection:(t="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}});y.ui.focusable=function(t,e){var i,s,n,o,h=t.nodeName.toLowerCase();return"area"===h?(s=(i=t.parentNode).name,!(!t.href||!s||"map"!==i.nodeName.toLowerCase())&&(0<(s=y("img[usemap='#"+s+"']")).length&&s.is(":visible"))):(/^(input|select|textarea|button|object)$/.test(h)?(n=!t.disabled)&&(o=y(t).closest("fieldset")[0])&&(n=!o.disabled):n="a"===h&&t.href||e,n&&y(t).is(":visible")&&function(t){var e=t.css("visibility");for(;"inherit"===e;)t=t.parent(),e=t.css("visibility");return"visible"===e}(y(t)))},y.extend(y.expr.pseudos,{focusable:function(t){return y.ui.focusable(t,null!=y.attr(t,"tabindex"))}});var e,d;y.ui.focusable,y.fn._form=function(){return"string"==typeof this[0].form?this.closest("form"):y(this[0].form)},y.ui.formResetMixin={_formResetHandler:function(){var e=y(this);setTimeout(function(){var t=e.data("ui-form-reset-instances");y.each(t,function(){this.refresh()})})},_bindFormResetHandler:function(){var t;this.form=this.element._form(),this.form.length&&((t=this.form.data("ui-form-reset-instances")||[]).length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t))},_unbindFormResetHandler:function(){var t;this.form.length&&((t=this.form.data("ui-form-reset-instances")).splice(y.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset"))}};y.expr.pseudos||(y.expr.pseudos=y.expr[":"]),y.uniqueSort||(y.uniqueSort=y.unique),y.escapeSelector||(e=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,d=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},y.escapeSelector=function(t){return(t+"").replace(e,d)}),y.fn.even&&y.fn.odd||y.fn.extend({even:function(){return this.filter(function(t){return t%2==0})},odd:function(){return this.filter(function(t){return t%2==1})}});y.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},y.fn.labels=function(){var t,e,i;return this.length?this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(e=this.eq(0).parents("label"),(t=this.attr("id"))&&(i=(i=this.eq(0).parents().last()).add((i.length?i:this).siblings()),t="label[for='"+y.escapeSelector(t)+"']",e=e.add(i.find(t).addBack(t))),this.pushStack(e)):this.pushStack([])},y.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,s=t?/(auto|scroll|hidden)/:/(auto|scroll)/,t=this.parents().filter(function(){var t=y(this);return(!i||"static"!==t.css("position"))&&s.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&t.length?t:y(this[0].ownerDocument||document)},y.extend(y.expr.pseudos,{tabbable:function(t){var e=y.attr(t,"tabindex"),i=null!=e;return(!i||0<=e)&&y.ui.focusable(t,i)}}),y.fn.extend({uniqueId:(c=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++c)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&y(this).removeAttr("id")})}}),y.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var c,f=!1;y(document).on("mouseup",function(){f=!1});y.widget("ui.mouse",{version:"1.13.2",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(t){if(!0===y.data(t.target,e.widgetName+".preventClickEvent"))return y.removeData(t.target,e.widgetName+".preventClickEvent"),t.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!f){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var e=this,i=1===t.which,s=!("string"!=typeof this.options.cancel||!t.target.nodeName)&&y(t.target).closest(this.options.cancel).length;return i&&!s&&this._mouseCapture(t)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(t),!this._mouseStarted)?(t.preventDefault(),!0):(!0===y.data(t.target,this.widgetName+".preventClickEvent")&&y.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return e._mouseMove(t)},this._mouseUpDelegate=function(t){return e._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),f=!0)):!0}},_mouseMove:function(t){if(this._mouseMoved){if(y.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button)return this._mouseUp(t);if(!t.which)if(t.originalEvent.altKey||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&y.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,f=!1,t.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),y.ui.plugin={add:function(t,e,i){var s,n=y.ui[t].prototype;for(s in i)n.plugins[s]=n.plugins[s]||[],n.plugins[s].push([e,i[s]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;n<o.length;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}};y.widget("ui.resizable",y.ui.mouse,{version:"1.13.2",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(t,e){if("hidden"===y(t).css("overflow"))return!1;var i=e&&"left"===e?"scrollLeft":"scrollTop",e=!1;if(0<t[i])return!0;try{t[i]=1,e=0<t[i],t[i]=0}catch(t){}return e},_create:function(){var t,e=this.options,i=this;this._addClass("ui-resizable"),y.extend(this,{_aspectRatio:!!e.aspectRatio,aspectRatio:e.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:e.helper||e.ghost||e.animate?e.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(y("<div class='ui-wrapper'></div>").css({overflow:"hidden",position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(t),this._proportionallyResize()),this._setupHandles(),e.autoHide&&y(this.element).on("mouseenter",function(){e.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){e.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy(),this._addedHandles.remove();function t(t){y(t).removeData("resizable").removeData("ui-resizable").off(".resizable")}var e;return this.elementIsWrapper&&(t(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;case"aspectRatio":this._aspectRatio=!!e}},_setupHandles:function(){var t,e,i,s,n,o=this.options,h=this;if(this.handles=o.handles||(y(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=y(),this._addedHandles=y(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split(","),this.handles={},e=0;e<i.length;e++)s="ui-resizable-"+(t=String.prototype.trim.call(i[e])),n=y("<div>"),this._addClass(n,"ui-resizable-handle "+s),n.css({zIndex:o.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.children(this.handles[t]).length||(this.element.append(n),this._addedHandles=this._addedHandles.add(n));this._renderAxis=function(t){var e,i,s;for(e in t=t||this.element,this.handles)this.handles[e].constructor===String?this.handles[e]=this.element.children(this.handles[e]).first().show():(this.handles[e].jquery||this.handles[e].nodeType)&&(this.handles[e]=y(this.handles[e]),this._on(this.handles[e],{mousedown:h._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=y(this.handles[e],this.element),s=/sw|ne|nw|se|n|s/.test(e)?i.outerHeight():i.outerWidth(),i=["padding",/ne|nw|n/.test(e)?"Top":/se|sw|s/.test(e)?"Bottom":/^e$/.test(e)?"Right":"Left"].join(""),t.css(i,s),this._proportionallyResize()),this._handles=this._handles.add(this.handles[e])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){h.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),h.axis=n&&n[1]?n[1]:"se")}),o.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._addedHandles.remove()},_mouseCapture:function(t){var e,i,s=!1;for(e in this.handles)(i=y(this.handles[e])[0])!==t.target&&!y.contains(i,t.target)||(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var e,i,s=this.options,n=this.element;return this.resizing=!0,this._renderProxy(),e=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),s.containment&&(e+=y(s.containment).scrollLeft()||0,i+=y(s.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:n.width(),height:n.height()},this.originalSize=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()},this.sizeDiff={width:n.outerWidth()-n.width(),height:n.outerHeight()-n.height()},this.originalPosition={left:e,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof s.aspectRatio?s.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=y(".ui-resizable-"+this.axis).css("cursor"),y("body").css("cursor","auto"===s?this.axis+"-resize":s),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var e=this.originalMousePosition,i=this.axis,s=t.pageX-e.left||0,e=t.pageY-e.top||0,i=this._change[i];return this._updatePrevProperties(),i&&(e=i.apply(this,[t,s,e]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(e=this._updateRatio(e,t)),e=this._respectSize(e,t),this._updateCache(e),this._propagate("resize",t),e=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),y.isEmptyObject(e)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var e,i,s,n=this.options,o=this;return this._helper&&(s=(e=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:o.sizeDiff.height,i=e?0:o.sizeDiff.width,e={width:o.helper.width()-i,height:o.helper.height()-s},i=parseFloat(o.element.css("left"))+(o.position.left-o.originalPosition.left)||null,s=parseFloat(o.element.css("top"))+(o.position.top-o.originalPosition.top)||null,n.animate||this.element.css(y.extend(e,{top:s,left:i})),o.helper.height(o.size.height),o.helper.width(o.size.width),this._helper&&!n.animate&&this._proportionallyResize()),y("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s=this.options,n={minWidth:this._isNumber(s.minWidth)?s.minWidth:0,maxWidth:this._isNumber(s.maxWidth)?s.maxWidth:1/0,minHeight:this._isNumber(s.minHeight)?s.minHeight:0,maxHeight:this._isNumber(s.maxHeight)?s.maxHeight:1/0};(this._aspectRatio||t)&&(e=n.minHeight*this.aspectRatio,i=n.minWidth/this.aspectRatio,s=n.maxHeight*this.aspectRatio,t=n.maxWidth/this.aspectRatio,e>n.minWidth&&(n.minWidth=e),i>n.minHeight&&(n.minHeight=i),s<n.maxWidth&&(n.maxWidth=s),t<n.maxHeight&&(n.maxHeight=t)),this._vBoundaries=n},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,n=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,h=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,r=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),i=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),h&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=a-e.minWidth),s&&l&&(t.left=a-e.maxWidth),h&&i&&(t.top=r-e.minHeight),n&&i&&(t.top=r-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e<this._proportionallyResizeElements.length;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,e=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||y("<div></div>").css({overflow:"hidden"}),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++e.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(t,e,i){return y.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},sw:function(t,e,i){return y.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,e,i]))},ne:function(t,e,i){return y.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},nw:function(t,e,i){return y.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,e,i]))}},_propagate:function(t,e){y.ui.plugin.call(this,t,[e,this.ui()]),"resize"!==t&&this._trigger(t,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),y.ui.plugin.add("resizable","animate",{stop:function(e){var i=y(this).resizable("instance"),t=i.options,s=i._proportionallyResizeElements,n=s.length&&/textarea/i.test(s[0].nodeName),o=n&&i._hasScroll(s[0],"left")?0:i.sizeDiff.height,h=n?0:i.sizeDiff.width,n={width:i.size.width-h,height:i.size.height-o},h=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,o=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(y.extend(n,o&&h?{top:o,left:h}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};s&&s.length&&y(s[0]).css({width:t.width,height:t.height}),i._updateCache(t),i._propagate("resize",e)}})}}),y.ui.plugin.add("resizable","containment",{start:function(){var i,s,n=y(this).resizable("instance"),t=n.options,e=n.element,o=t.containment,h=o instanceof y?o.get(0):/parent/.test(o)?e.parent().get(0):o;h&&(n.containerElement=y(h),/document/.test(o)||o===document?(n.containerOffset={left:0,top:0},n.containerPosition={left:0,top:0},n.parentData={element:y(document),left:0,top:0,width:y(document).width(),height:y(document).height()||document.body.parentNode.scrollHeight}):(i=y(h),s=[],y(["Top","Right","Left","Bottom"]).each(function(t,e){s[t]=n._num(i.css("padding"+e))}),n.containerOffset=i.offset(),n.containerPosition=i.position(),n.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},t=n.containerOffset,e=n.containerSize.height,o=n.containerSize.width,o=n._hasScroll(h,"left")?h.scrollWidth:o,e=n._hasScroll(h)?h.scrollHeight:e,n.parentData={element:h,left:t.left,top:t.top,width:o,height:e}))},resize:function(t){var e=y(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.position,o=e._aspectRatio||t.shiftKey,h={top:0,left:0},a=e.containerElement,t=!0;a[0]!==document&&/static/.test(a.css("position"))&&(h=s),n.left<(e._helper?s.left:0)&&(e.size.width=e.size.width+(e._helper?e.position.left-s.left:e.position.left-h.left),o&&(e.size.height=e.size.width/e.aspectRatio,t=!1),e.position.left=i.helper?s.left:0),n.top<(e._helper?s.top:0)&&(e.size.height=e.size.height+(e._helper?e.position.top-s.top:e.position.top),o&&(e.size.width=e.size.height*e.aspectRatio,t=!1),e.position.top=e._helper?s.top:0),i=e.containerElement.get(0)===e.element.parent().get(0),n=/relative|absolute/.test(e.containerElement.css("position")),i&&n?(e.offset.left=e.parentData.left+e.position.left,e.offset.top=e.parentData.top+e.position.top):(e.offset.left=e.element.offset().left,e.offset.top=e.element.offset().top),n=Math.abs(e.sizeDiff.width+(e._helper?e.offset.left-h.left:e.offset.left-s.left)),s=Math.abs(e.sizeDiff.height+(e._helper?e.offset.top-h.top:e.offset.top-s.top)),n+e.size.width>=e.parentData.width&&(e.size.width=e.parentData.width-n,o&&(e.size.height=e.size.width/e.aspectRatio,t=!1)),s+e.size.height>=e.parentData.height&&(e.size.height=e.parentData.height-s,o&&(e.size.width=e.size.height*e.aspectRatio,t=!1)),t||(e.position.left=e.prevPosition.left,e.position.top=e.prevPosition.top,e.size.width=e.prevSize.width,e.size.height=e.prevSize.height)},stop:function(){var t=y(this).resizable("instance"),e=t.options,i=t.containerOffset,s=t.containerPosition,n=t.containerElement,o=y(t.helper),h=o.offset(),a=o.outerWidth()-t.sizeDiff.width,o=o.outerHeight()-t.sizeDiff.height;t._helper&&!e.animate&&/relative/.test(n.css("position"))&&y(this).css({left:h.left-s.left-i.left,width:a,height:o}),t._helper&&!e.animate&&/static/.test(n.css("position"))&&y(this).css({left:h.left-s.left-i.left,width:a,height:o})}}),y.ui.plugin.add("resizable","alsoResize",{start:function(){var t=y(this).resizable("instance").options;y(t.alsoResize).each(function(){var t=y(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.width()),height:parseFloat(t.height()),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,i){var e=y(this).resizable("instance"),s=e.options,n=e.originalSize,o=e.originalPosition,h={height:e.size.height-n.height||0,width:e.size.width-n.width||0,top:e.position.top-o.top||0,left:e.position.left-o.left||0};y(s.alsoResize).each(function(){var t=y(this),s=y(this).data("ui-resizable-alsoresize"),n={},e=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];y.each(e,function(t,e){var i=(s[e]||0)+(h[e]||0);i&&0<=i&&(n[e]=i||null)}),t.css(n)})},stop:function(){y(this).removeData("ui-resizable-alsoresize")}}),y.ui.plugin.add("resizable","ghost",{start:function(){var t=y(this).resizable("instance"),e=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!1!==y.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=y(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=y(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),y.ui.plugin.add("resizable","grid",{resize:function(){var t,e=y(this).resizable("instance"),i=e.options,s=e.size,n=e.originalSize,o=e.originalPosition,h=e.axis,a="number"==typeof i.grid?[i.grid,i.grid]:i.grid,r=a[0]||1,l=a[1]||1,u=Math.round((s.width-n.width)/r)*r,p=Math.round((s.height-n.height)/l)*l,d=n.width+u,c=n.height+p,f=i.maxWidth&&i.maxWidth<d,g=i.maxHeight&&i.maxHeight<c,m=i.minWidth&&i.minWidth>d,s=i.minHeight&&i.minHeight>c;i.grid=a,m&&(d+=r),s&&(c+=l),f&&(d-=r),g&&(c-=l),/^(se|s|e)$/.test(h)?(e.size.width=d,e.size.height=c):/^(ne)$/.test(h)?(e.size.width=d,e.size.height=c,e.position.top=o.top-p):/^(sw)$/.test(h)?(e.size.width=d,e.size.height=c,e.position.left=o.left-u):((c-l<=0||d-r<=0)&&(t=e._getPaddingPlusBorderDimensions(this)),0<c-l?(e.size.height=c,e.position.top=o.top-p):(c=l-t.height,e.size.height=c,e.position.top=o.top+n.height-c),0<d-r?(e.size.width=d,e.position.left=o.left-u):(d=r-t.width,e.size.width=d,e.position.left=o.left+n.width-d))}});y.ui.resizable});/**
+ * Copyright (c) 2007 Ariel Flesler - aflesler â—‹ gmail â€¢ com | https://github.com/flesler
+ * Licensed under MIT
+ * @author Ariel Flesler
+ * @version 2.1.2
+ */
+;(function(f){"use strict";"function"===typeof define&&define.amd?define(["jquery"],f):"undefined"!==typeof module&&module.exports?module.exports=f(require("jquery")):f(jQuery)})(function($){"use strict";function n(a){return!a.nodeName||-1!==$.inArray(a.nodeName.toLowerCase(),["iframe","#document","html","body"])}function h(a){return $.isFunction(a)||$.isPlainObject(a)?a:{top:a,left:a}}var p=$.scrollTo=function(a,d,b){return $(window).scrollTo(a,d,b)};p.defaults={axis:"xy",duration:0,limit:!0};$.fn.scrollTo=function(a,d,b){"object"=== typeof d&&(b=d,d=0);"function"===typeof b&&(b={onAfter:b});"max"===a&&(a=9E9);b=$.extend({},p.defaults,b);d=d||b.duration;var u=b.queue&&1<b.axis.length;u&&(d/=2);b.offset=h(b.offset);b.over=h(b.over);return this.each(function(){function k(a){var k=$.extend({},b,{queue:!0,duration:d,complete:a&&function(){a.call(q,e,b)}});r.animate(f,k)}if(null!==a){var l=n(this),q=l?this.contentWindow||window:this,r=$(q),e=a,f={},t;switch(typeof e){case "number":case "string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(e)){e= h(e);break}e=l?$(e):$(e,q);case "object":if(e.length===0)return;if(e.is||e.style)t=(e=$(e)).offset()}var v=$.isFunction(b.offset)&&b.offset(q,e)||b.offset;$.each(b.axis.split(""),function(a,c){var d="x"===c?"Left":"Top",m=d.toLowerCase(),g="scroll"+d,h=r[g](),n=p.max(q,c);t?(f[g]=t[m]+(l?0:h-r.offset()[m]),b.margin&&(f[g]-=parseInt(e.css("margin"+d),10)||0,f[g]-=parseInt(e.css("border"+d+"Width"),10)||0),f[g]+=v[m]||0,b.over[m]&&(f[g]+=e["x"===c?"width":"height"]()*b.over[m])):(d=e[m],f[g]=d.slice&& "%"===d.slice(-1)?parseFloat(d)/100*n:d);b.limit&&/^\d+$/.test(f[g])&&(f[g]=0>=f[g]?0:Math.min(f[g],n));!a&&1<b.axis.length&&(h===f[g]?f={}:u&&(k(b.onAfterFirst),f={}))});k(b.onAfter)}})};p.max=function(a,d){var b="x"===d?"Width":"Height",h="scroll"+b;if(!n(a))return a[h]-$(a)[b.toLowerCase()]();var b="client"+b,k=a.ownerDocument||a.document,l=k.documentElement,k=k.body;return Math.max(l[h],k[h])-Math.min(l[b],k[b])};$.Tween.propHooks.scrollLeft=$.Tween.propHooks.scrollTop={get:function(a){return $(a.elem)[a.prop]()}, set:function(a){var d=this.get(a);if(a.options.interrupt&&a._last&&a._last!==d)return $(a.elem).stop();var b=Math.round(a.now);d!==b&&($(a.elem)[a.prop](b),a._last=this.get(a))}};return p});
+/*!
+ PowerTip v1.3.1 (2018-04-15)
+ https://stevenbenner.github.io/jquery-powertip/
+ Copyright (c) 2018 Steven Benner (http://stevenbenner.com/).
+ Released under MIT license.
+ https://raw.github.com/stevenbenner/jquery-powertip/master/LICENSE.txt
+*/
+(function(root,factory){if(typeof define==="function"&&define.amd){define(["jquery"],factory)}else if(typeof module==="object"&&module.exports){module.exports=factory(require("jquery"))}else{factory(root.jQuery)}})(this,function($){var $document=$(document),$window=$(window),$body=$("body");var DATA_DISPLAYCONTROLLER="displayController",DATA_HASACTIVEHOVER="hasActiveHover",DATA_FORCEDOPEN="forcedOpen",DATA_HASMOUSEMOVE="hasMouseMove",DATA_MOUSEONTOTIP="mouseOnToPopup",DATA_ORIGINALTITLE="originalTitle",DATA_POWERTIP="powertip",DATA_POWERTIPJQ="powertipjq",DATA_POWERTIPTARGET="powertiptarget",EVENT_NAMESPACE=".powertip",RAD2DEG=180/Math.PI,MOUSE_EVENTS=["click","dblclick","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave","contextmenu"];var session={tooltips:null,isTipOpen:false,isFixedTipOpen:false,isClosing:false,tipOpenImminent:false,activeHover:null,currentX:0,currentY:0,previousX:0,previousY:0,desyncTimeout:null,closeDelayTimeout:null,mouseTrackingActive:false,delayInProgress:false,windowWidth:0,windowHeight:0,scrollTop:0,scrollLeft:0};var Collision={none:0,top:1,bottom:2,left:4,right:8};$.fn.powerTip=function(opts,arg){var targetElements=this,options,tipController;if(!targetElements.length){return targetElements}if($.type(opts)==="string"&&$.powerTip[opts]){return $.powerTip[opts].call(targetElements,targetElements,arg)}options=$.extend({},$.fn.powerTip.defaults,opts);tipController=new TooltipController(options);initTracking();targetElements.each(function elementSetup(){var $this=$(this),dataPowertip=$this.data(DATA_POWERTIP),dataElem=$this.data(DATA_POWERTIPJQ),dataTarget=$this.data(DATA_POWERTIPTARGET),title=$this.attr("title");if(!dataPowertip&&!dataTarget&&!dataElem&&title){$this.data(DATA_POWERTIP,title);$this.data(DATA_ORIGINALTITLE,title);$this.removeAttr("title")}$this.data(DATA_DISPLAYCONTROLLER,new DisplayController($this,options,tipController))});if(!options.manual){$.each(options.openEvents,function(idx,evt){if($.inArray(evt,options.closeEvents)>-1){targetElements.on(evt+EVENT_NAMESPACE,function elementToggle(event){$.powerTip.toggle(this,event)})}else{targetElements.on(evt+EVENT_NAMESPACE,function elementOpen(event){$.powerTip.show(this,event)})}});$.each(options.closeEvents,function(idx,evt){if($.inArray(evt,options.openEvents)<0){targetElements.on(evt+EVENT_NAMESPACE,function elementClose(event){$.powerTip.hide(this,!isMouseEvent(event))})}});targetElements.on("keydown"+EVENT_NAMESPACE,function elementKeyDown(event){if(event.keyCode===27){$.powerTip.hide(this,true)}})}return targetElements};$.fn.powerTip.defaults={fadeInTime:200,fadeOutTime:100,followMouse:false,popupId:"powerTip",popupClass:null,intentSensitivity:7,intentPollInterval:100,closeDelay:100,placement:"n",smartPlacement:false,offset:10,mouseOnToPopup:false,manual:false,openEvents:["mouseenter","focus"],closeEvents:["mouseleave","blur"]};$.fn.powerTip.smartPlacementLists={n:["n","ne","nw","s"],e:["e","ne","se","w","nw","sw","n","s","e"],s:["s","se","sw","n"],w:["w","nw","sw","e","ne","se","n","s","w"],nw:["nw","w","sw","n","s","se","nw"],ne:["ne","e","se","n","s","sw","ne"],sw:["sw","w","nw","s","n","ne","sw"],se:["se","e","ne","s","n","nw","se"],"nw-alt":["nw-alt","n","ne-alt","sw-alt","s","se-alt","w","e"],"ne-alt":["ne-alt","n","nw-alt","se-alt","s","sw-alt","e","w"],"sw-alt":["sw-alt","s","se-alt","nw-alt","n","ne-alt","w","e"],"se-alt":["se-alt","s","sw-alt","ne-alt","n","nw-alt","e","w"]};$.powerTip={show:function apiShowTip(element,event){if(isMouseEvent(event)){trackMouse(event);session.previousX=event.pageX;session.previousY=event.pageY;$(element).data(DATA_DISPLAYCONTROLLER).show()}else{$(element).first().data(DATA_DISPLAYCONTROLLER).show(true,true)}return element},reposition:function apiResetPosition(element){$(element).first().data(DATA_DISPLAYCONTROLLER).resetPosition();return element},hide:function apiCloseTip(element,immediate){var displayController;immediate=element?immediate:true;if(element){displayController=$(element).first().data(DATA_DISPLAYCONTROLLER)}else if(session.activeHover){displayController=session.activeHover.data(DATA_DISPLAYCONTROLLER)}if(displayController){displayController.hide(immediate)}return element},toggle:function apiToggle(element,event){if(session.activeHover&&session.activeHover.is(element)){$.powerTip.hide(element,!isMouseEvent(event))}else{$.powerTip.show(element,event)}return element}};$.powerTip.showTip=$.powerTip.show;$.powerTip.closeTip=$.powerTip.hide;function CSSCoordinates(){var me=this;me.top="auto";me.left="auto";me.right="auto";me.bottom="auto";me.set=function(property,value){if($.isNumeric(value)){me[property]=Math.round(value)}}}function DisplayController(element,options,tipController){var hoverTimer=null,myCloseDelay=null;function openTooltip(immediate,forceOpen){cancelTimer();if(!element.data(DATA_HASACTIVEHOVER)){if(!immediate){session.tipOpenImminent=true;hoverTimer=setTimeout(function intentDelay(){hoverTimer=null;checkForIntent()},options.intentPollInterval)}else{if(forceOpen){element.data(DATA_FORCEDOPEN,true)}closeAnyDelayed();tipController.showTip(element)}}else{cancelClose()}}function closeTooltip(disableDelay){if(myCloseDelay){myCloseDelay=session.closeDelayTimeout=clearTimeout(myCloseDelay);session.delayInProgress=false}cancelTimer();session.tipOpenImminent=false;if(element.data(DATA_HASACTIVEHOVER)){element.data(DATA_FORCEDOPEN,false);if(!disableDelay){session.delayInProgress=true;session.closeDelayTimeout=setTimeout(function closeDelay(){session.closeDelayTimeout=null;tipController.hideTip(element);session.delayInProgress=false;myCloseDelay=null},options.closeDelay);myCloseDelay=session.closeDelayTimeout}else{tipController.hideTip(element)}}}function checkForIntent(){var xDifference=Math.abs(session.previousX-session.currentX),yDifference=Math.abs(session.previousY-session.currentY),totalDifference=xDifference+yDifference;if(totalDifference<options.intentSensitivity){cancelClose();closeAnyDelayed();tipController.showTip(element)}else{session.previousX=session.currentX;session.previousY=session.currentY;openTooltip()}}function cancelTimer(stopClose){hoverTimer=clearTimeout(hoverTimer);if(session.closeDelayTimeout&&myCloseDelay===session.closeDelayTimeout||stopClose){cancelClose()}}function cancelClose(){session.closeDelayTimeout=clearTimeout(session.closeDelayTimeout);session.delayInProgress=false}function closeAnyDelayed(){if(session.delayInProgress&&session.activeHover&&!session.activeHover.is(element)){session.activeHover.data(DATA_DISPLAYCONTROLLER).hide(true)}}function repositionTooltip(){tipController.resetPosition(element)}this.show=openTooltip;this.hide=closeTooltip;this.cancel=cancelTimer;this.resetPosition=repositionTooltip}function PlacementCalculator(){function computePlacementCoords(element,placement,tipWidth,tipHeight,offset){var placementBase=placement.split("-")[0],coords=new CSSCoordinates,position;if(isSvgElement(element)){position=getSvgPlacement(element,placementBase)}else{position=getHtmlPlacement(element,placementBase)}switch(placement){case"n":coords.set("left",position.left-tipWidth/2);coords.set("bottom",session.windowHeight-position.top+offset);break;case"e":coords.set("left",position.left+offset);coords.set("top",position.top-tipHeight/2);break;case"s":coords.set("left",position.left-tipWidth/2);coords.set("top",position.top+offset);break;case"w":coords.set("top",position.top-tipHeight/2);coords.set("right",session.windowWidth-position.left+offset);break;case"nw":coords.set("bottom",session.windowHeight-position.top+offset);coords.set("right",session.windowWidth-position.left-20);break;case"nw-alt":coords.set("left",position.left);coords.set("bottom",session.windowHeight-position.top+offset);break;case"ne":coords.set("left",position.left-20);coords.set("bottom",session.windowHeight-position.top+offset);break;case"ne-alt":coords.set("bottom",session.windowHeight-position.top+offset);coords.set("right",session.windowWidth-position.left);break;case"sw":coords.set("top",position.top+offset);coords.set("right",session.windowWidth-position.left-20);break;case"sw-alt":coords.set("left",position.left);coords.set("top",position.top+offset);break;case"se":coords.set("left",position.left-20);coords.set("top",position.top+offset);break;case"se-alt":coords.set("top",position.top+offset);coords.set("right",session.windowWidth-position.left);break}return coords}function getHtmlPlacement(element,placement){var objectOffset=element.offset(),objectWidth=element.outerWidth(),objectHeight=element.outerHeight(),left,top;switch(placement){case"n":left=objectOffset.left+objectWidth/2;top=objectOffset.top;break;case"e":left=objectOffset.left+objectWidth;top=objectOffset.top+objectHeight/2;break;case"s":left=objectOffset.left+objectWidth/2;top=objectOffset.top+objectHeight;break;case"w":left=objectOffset.left;top=objectOffset.top+objectHeight/2;break;case"nw":left=objectOffset.left;top=objectOffset.top;break;case"ne":left=objectOffset.left+objectWidth;top=objectOffset.top;break;case"sw":left=objectOffset.left;top=objectOffset.top+objectHeight;break;case"se":left=objectOffset.left+objectWidth;top=objectOffset.top+objectHeight;break}return{top:top,left:left}}function getSvgPlacement(element,placement){var svgElement=element.closest("svg")[0],domElement=element[0],point=svgElement.createSVGPoint(),boundingBox=domElement.getBBox(),matrix=domElement.getScreenCTM(),halfWidth=boundingBox.width/2,halfHeight=boundingBox.height/2,placements=[],placementKeys=["nw","n","ne","e","se","s","sw","w"],coords,rotation,steps,x;function pushPlacement(){placements.push(point.matrixTransform(matrix))}point.x=boundingBox.x;point.y=boundingBox.y;pushPlacement();point.x+=halfWidth;pushPlacement();point.x+=halfWidth;pushPlacement();point.y+=halfHeight;pushPlacement();point.y+=halfHeight;pushPlacement();point.x-=halfWidth;pushPlacement();point.x-=halfWidth;pushPlacement();point.y-=halfHeight;pushPlacement();if(placements[0].y!==placements[1].y||placements[0].x!==placements[7].x){rotation=Math.atan2(matrix.b,matrix.a)*RAD2DEG;steps=Math.ceil((rotation%360-22.5)/45);if(steps<1){steps+=8}while(steps--){placementKeys.push(placementKeys.shift())}}for(x=0;x<placements.length;x++){if(placementKeys[x]===placement){coords=placements[x];break}}return{top:coords.y+session.scrollTop,left:coords.x+session.scrollLeft}}this.compute=computePlacementCoords}function TooltipController(options){var placementCalculator=new PlacementCalculator,tipElement=$("#"+options.popupId);if(tipElement.length===0){tipElement=$("<div/>",{id:options.popupId});if($body.length===0){$body=$("body")}$body.append(tipElement);session.tooltips=session.tooltips?session.tooltips.add(tipElement):tipElement}if(options.followMouse){if(!tipElement.data(DATA_HASMOUSEMOVE)){$document.on("mousemove"+EVENT_NAMESPACE,positionTipOnCursor);$window.on("scroll"+EVENT_NAMESPACE,positionTipOnCursor);tipElement.data(DATA_HASMOUSEMOVE,true)}}function beginShowTip(element){element.data(DATA_HASACTIVEHOVER,true);tipElement.queue(function queueTipInit(next){showTip(element);next()})}function showTip(element){var tipContent;if(!element.data(DATA_HASACTIVEHOVER)){return}if(session.isTipOpen){if(!session.isClosing){hideTip(session.activeHover)}tipElement.delay(100).queue(function queueTipAgain(next){showTip(element);next()});return}element.trigger("powerTipPreRender");tipContent=getTooltipContent(element);if(tipContent){tipElement.empty().append(tipContent)}else{return}element.trigger("powerTipRender");session.activeHover=element;session.isTipOpen=true;tipElement.data(DATA_MOUSEONTOTIP,options.mouseOnToPopup);tipElement.addClass(options.popupClass);if(!options.followMouse||element.data(DATA_FORCEDOPEN)){positionTipOnElement(element);session.isFixedTipOpen=true}else{positionTipOnCursor()}if(!element.data(DATA_FORCEDOPEN)&&!options.followMouse){$document.on("click"+EVENT_NAMESPACE,function documentClick(event){var target=event.target;if(target!==element[0]){if(options.mouseOnToPopup){if(target!==tipElement[0]&&!$.contains(tipElement[0],target)){$.powerTip.hide()}}else{$.powerTip.hide()}}})}if(options.mouseOnToPopup&&!options.manual){tipElement.on("mouseenter"+EVENT_NAMESPACE,function tipMouseEnter(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).cancel()}});tipElement.on("mouseleave"+EVENT_NAMESPACE,function tipMouseLeave(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).hide()}})}tipElement.fadeIn(options.fadeInTime,function fadeInCallback(){if(!session.desyncTimeout){session.desyncTimeout=setInterval(closeDesyncedTip,500)}element.trigger("powerTipOpen")})}function hideTip(element){session.isClosing=true;session.isTipOpen=false;session.desyncTimeout=clearInterval(session.desyncTimeout);element.data(DATA_HASACTIVEHOVER,false);element.data(DATA_FORCEDOPEN,false);$document.off("click"+EVENT_NAMESPACE);tipElement.off(EVENT_NAMESPACE);tipElement.fadeOut(options.fadeOutTime,function fadeOutCallback(){var coords=new CSSCoordinates;session.activeHover=null;session.isClosing=false;session.isFixedTipOpen=false;tipElement.removeClass();coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);tipElement.css(coords);element.trigger("powerTipClose")})}function positionTipOnCursor(){var tipWidth,tipHeight,coords,collisions,collisionCount;if(!session.isFixedTipOpen&&(session.isTipOpen||session.tipOpenImminent&&tipElement.data(DATA_HASMOUSEMOVE))){tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=new CSSCoordinates;coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);collisions=getViewportCollisions(coords,tipWidth,tipHeight);if(collisions!==Collision.none){collisionCount=countFlags(collisions);if(collisionCount===1){if(collisions===Collision.right){coords.set("left",session.scrollLeft+session.windowWidth-tipWidth)}else if(collisions===Collision.bottom){coords.set("top",session.scrollTop+session.windowHeight-tipHeight)}}else{coords.set("left",session.currentX-tipWidth-options.offset);coords.set("top",session.currentY-tipHeight-options.offset)}}tipElement.css(coords)}}function positionTipOnElement(element){var priorityList,finalPlacement;if(options.smartPlacement||options.followMouse&&element.data(DATA_FORCEDOPEN)){priorityList=$.fn.powerTip.smartPlacementLists[options.placement];$.each(priorityList,function(idx,pos){var collisions=getViewportCollisions(placeTooltip(element,pos),tipElement.outerWidth(),tipElement.outerHeight());finalPlacement=pos;return collisions!==Collision.none})}else{placeTooltip(element,options.placement);finalPlacement=options.placement}tipElement.removeClass("w nw sw e ne se n s w se-alt sw-alt ne-alt nw-alt");tipElement.addClass(finalPlacement)}function placeTooltip(element,placement){var iterationCount=0,tipWidth,tipHeight,coords=new CSSCoordinates;coords.set("top",0);coords.set("left",0);tipElement.css(coords);do{tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=placementCalculator.compute(element,placement,tipWidth,tipHeight,options.offset);tipElement.css(coords)}while(++iterationCount<=5&&(tipWidth!==tipElement.outerWidth()||tipHeight!==tipElement.outerHeight()));return coords}function closeDesyncedTip(){var isDesynced=false,hasDesyncableCloseEvent=$.grep(["mouseleave","mouseout","blur","focusout"],function(eventType){return $.inArray(eventType,options.closeEvents)!==-1}).length>0;if(session.isTipOpen&&!session.isClosing&&!session.delayInProgress&&hasDesyncableCloseEvent){if(session.activeHover.data(DATA_HASACTIVEHOVER)===false||session.activeHover.is(":disabled")){isDesynced=true}else if(!isMouseOver(session.activeHover)&&!session.activeHover.is(":focus")&&!session.activeHover.data(DATA_FORCEDOPEN)){if(tipElement.data(DATA_MOUSEONTOTIP)){if(!isMouseOver(tipElement)){isDesynced=true}}else{isDesynced=true}}if(isDesynced){hideTip(session.activeHover)}}}this.showTip=beginShowTip;this.hideTip=hideTip;this.resetPosition=positionTipOnElement}function isSvgElement(element){return Boolean(window.SVGElement&&element[0]instanceof SVGElement)}function isMouseEvent(event){return Boolean(event&&$.inArray(event.type,MOUSE_EVENTS)>-1&&typeof event.pageX==="number")}function initTracking(){if(!session.mouseTrackingActive){session.mouseTrackingActive=true;getViewportDimensions();$(getViewportDimensions);$document.on("mousemove"+EVENT_NAMESPACE,trackMouse);$window.on("resize"+EVENT_NAMESPACE,trackResize);$window.on("scroll"+EVENT_NAMESPACE,trackScroll)}}function getViewportDimensions(){session.scrollLeft=$window.scrollLeft();session.scrollTop=$window.scrollTop();session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackResize(){session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackScroll(){var x=$window.scrollLeft(),y=$window.scrollTop();if(x!==session.scrollLeft){session.currentX+=x-session.scrollLeft;session.scrollLeft=x}if(y!==session.scrollTop){session.currentY+=y-session.scrollTop;session.scrollTop=y}}function trackMouse(event){session.currentX=event.pageX;session.currentY=event.pageY}function isMouseOver(element){var elementPosition=element.offset(),elementBox=element[0].getBoundingClientRect(),elementWidth=elementBox.right-elementBox.left,elementHeight=elementBox.bottom-elementBox.top;return session.currentX>=elementPosition.left&&session.currentX<=elementPosition.left+elementWidth&&session.currentY>=elementPosition.top&&session.currentY<=elementPosition.top+elementHeight}function getTooltipContent(element){var tipText=element.data(DATA_POWERTIP),tipObject=element.data(DATA_POWERTIPJQ),tipTarget=element.data(DATA_POWERTIPTARGET),targetElement,content;if(tipText){if($.isFunction(tipText)){tipText=tipText.call(element[0])}content=tipText}else if(tipObject){if($.isFunction(tipObject)){tipObject=tipObject.call(element[0])}if(tipObject.length>0){content=tipObject.clone(true,true)}}else if(tipTarget){targetElement=$("#"+tipTarget);if(targetElement.length>0){content=targetElement.html()}}return content}function getViewportCollisions(coords,elementWidth,elementHeight){var viewportTop=session.scrollTop,viewportLeft=session.scrollLeft,viewportBottom=viewportTop+session.windowHeight,viewportRight=viewportLeft+session.windowWidth,collisions=Collision.none;if(coords.top<viewportTop||Math.abs(coords.bottom-session.windowHeight)-elementHeight<viewportTop){collisions|=Collision.top}if(coords.top+elementHeight>viewportBottom||Math.abs(coords.bottom-session.windowHeight)>viewportBottom){collisions|=Collision.bottom}if(coords.left<viewportLeft||coords.right+elementWidth>viewportRight){collisions|=Collision.left}if(coords.left+elementWidth>viewportRight||coords.right<viewportLeft){collisions|=Collision.right}return collisions}function countFlags(value){var count=0;while(value){value&=value-1;count++}return count}return $.powerTip});/*!
+ * jQuery UI Touch Punch 0.2.3
+ *
+ * Copyright 2011–2014, Dave Furfero
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ *
+ * Depends:
+ *  jquery.ui.widget.js
+ *  jquery.ui.mouse.js
+ */
+!function(a){function f(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);/*! SmartMenus jQuery Plugin - v1.1.0 - September 17, 2017
+ * http://www.smartmenus.org/
+ * Copyright Vasil Dinkov, Vadikom Web Ltd. http://vadikom.com; Licensed MIT */(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("jquery")):t(jQuery)})(function($){function initMouseDetection(t){var e=".smartmenus_mouse";if(mouseDetectionEnabled||t)mouseDetectionEnabled&&t&&($(document).off(e),mouseDetectionEnabled=!1);else{var i=!0,s=null,o={mousemove:function(t){var e={x:t.pageX,y:t.pageY,timeStamp:(new Date).getTime()};if(s){var o=Math.abs(s.x-e.x),a=Math.abs(s.y-e.y);if((o>0||a>0)&&2>=o&&2>=a&&300>=e.timeStamp-s.timeStamp&&(mouse=!0,i)){var n=$(t.target).closest("a");n.is("a")&&$.each(menuTrees,function(){return $.contains(this.$root[0],n[0])?(this.itemEnter({currentTarget:n[0]}),!1):void 0}),i=!1}}s=e}};o[touchEvents?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut"]=function(t){isTouchEvent(t.originalEvent)&&(mouse=!1)},$(document).on(getEventsNS(o,e)),mouseDetectionEnabled=!0}}function isTouchEvent(t){return!/^(4|mouse)$/.test(t.pointerType)}function getEventsNS(t,e){e||(e="");var i={};for(var s in t)i[s.split(" ").join(e+" ")+e]=t[s];return i}var menuTrees=[],mouse=!1,touchEvents="ontouchstart"in window,mouseDetectionEnabled=!1,requestAnimationFrame=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},cancelAnimationFrame=window.cancelAnimationFrame||function(t){clearTimeout(t)},canAnimate=!!$.fn.animate;return $.SmartMenus=function(t,e){this.$root=$(t),this.opts=e,this.rootId="",this.accessIdPrefix="",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.$touchScrollingSub=null,this.cssTransforms3d="perspective"in t.style||"webkitPerspective"in t.style,this.wasCollapsible=!1,this.init()},$.extend($.SmartMenus,{hideAll:function(){$.each(menuTrees,function(){this.menuHideAll()})},destroy:function(){for(;menuTrees.length;)menuTrees[0].destroy();initMouseDetection(!0)},prototype:{init:function(t){var e=this;if(!t){menuTrees.push(this),this.rootId=((new Date).getTime()+Math.random()+"").replace(/\D/g,""),this.accessIdPrefix="sm-"+this.rootId+"-",this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0);var i=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).on(getEventsNS({"mouseover focusin":$.proxy(this.rootOver,this),"mouseout focusout":$.proxy(this.rootOut,this),keydown:$.proxy(this.rootKeyDown,this)},i)).on(getEventsNS({mouseenter:$.proxy(this.itemEnter,this),mouseleave:$.proxy(this.itemLeave,this),mousedown:$.proxy(this.itemDown,this),focus:$.proxy(this.itemFocus,this),blur:$.proxy(this.itemBlur,this),click:$.proxy(this.itemClick,this)},i),"a"),i+=this.rootId,this.opts.hideOnClick&&$(document).on(getEventsNS({touchstart:$.proxy(this.docTouchStart,this),touchmove:$.proxy(this.docTouchMove,this),touchend:$.proxy(this.docTouchEnd,this),click:$.proxy(this.docClick,this)},i)),$(window).on(getEventsNS({"resize orientationchange":$.proxy(this.winResize,this)},i)),this.opts.subIndicators&&(this.$subArrow=$("<span/>").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),initMouseDetection()}if(this.$firstSub=this.$root.find("ul").each(function(){e.menuInit($(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0),this.opts.markCurrentItem){var s=/(index|default)\.[^#\?\/]*/i,o=/#.*/,a=window.location.href.replace(s,""),n=a.replace(o,"");this.$root.find("a").each(function(){var t=this.href.replace(s,""),i=$(this);(t==a||t==n)&&(i.addClass("current"),e.opts.markCurrentTree&&i.parentsUntil("[data-smartmenus-id]","ul").each(function(){$(this).dataSM("parent-a").addClass("current")}))})}this.wasCollapsible=this.isCollapsible()},destroy:function(t){if(!t){var e=".smartmenus";this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").off(e),e+=this.rootId,$(document).off(e),$(window).off(e),this.opts.subIndicators&&(this.$subArrow=null)}this.menuHideAll();var i=this;this.$root.find("ul").each(function(){var t=$(this);t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.dataSM("shown-before")&&((i.opts.subMenusMinWidth||i.opts.subMenusMaxWidth)&&t.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap"),t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})),0==(t.attr("id")||"").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded"),this.$root.find("a.has-submenu").each(function(){var t=$(this);0==t.attr("id").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),t||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),menuTrees.splice($.inArray(this,menuTrees),1))},disable:function(t){if(!this.disabled){if(this.menuHideAll(),!t&&!this.opts.isPopup&&this.$root.is(":visible")){var e=this.$root.offset();this.$disableOverlay=$('<div class="sm-jquery-disable-overlay"/>').css({position:"absolute",top:e.top,left:e.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(t){return this.$touchScrollingSub?(this.$touchScrollingSub=null,void 0):((this.visibleSubMenus.length&&!$.contains(this.$root[0],t.target)||$(t.target).closest("a").length)&&this.menuHideAll(),void 0)},docTouchEnd:function(){if(this.lastTouch){if(!(!this.visibleSubMenus.length||void 0!==this.lastTouch.x2&&this.lastTouch.x1!=this.lastTouch.x2||void 0!==this.lastTouch.y2&&this.lastTouch.y1!=this.lastTouch.y2||this.lastTouch.target&&$.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var t=this;this.hideTimeout=setTimeout(function(){t.menuHideAll()},350)}this.lastTouch=null}},docTouchMove:function(t){if(this.lastTouch){var e=t.originalEvent.touches[0];this.lastTouch.x2=e.pageX,this.lastTouch.y2=e.pageY}},docTouchStart:function(t){var e=t.originalEvent.touches[0];this.lastTouch={x1:e.pageX,y1:e.pageY,target:e.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(t){for(var e=$(t).closest("ul");e.dataSM("in-mega");)e=e.parent().closest("ul");return e[0]||null},getHeight:function(t){return this.getOffset(t,!0)},getOffset:function(t,e){var i;"none"==t.css("display")&&(i={position:t[0].style.position,visibility:t[0].style.visibility},t.css({position:"absolute",visibility:"hidden"}).show());var s=t[0].getBoundingClientRect&&t[0].getBoundingClientRect(),o=s&&(e?s.height||s.bottom-s.top:s.width||s.right-s.left);return o||0===o||(o=e?t[0].offsetHeight:t[0].offsetWidth),i&&t.hide().css(i),o},getStartZIndex:function(t){var e=parseInt(this[t?"$root":"$firstSub"].css("z-index"));return!t&&isNaN(e)&&(e=parseInt(this.$root.css("z-index"))),isNaN(e)?1:e},getTouchPoint:function(t){return t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t},getViewport:function(t){var e=t?"Height":"Width",i=document.documentElement["client"+e],s=window["inner"+e];return s&&(i=Math.min(i,s)),i},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){return this.getViewport()},getWidth:function(t){return this.getOffset(t)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(t){return this.handleEvents()&&!this.isLinkInMegaMenu(t)},isCollapsible:function(){return"static"==this.$firstSub.css("position")},isCSSOn:function(){return"inline"!=this.$firstLink.css("display")},isFixed:function(){var t="fixed"==this.$root.css("position");return t||this.$root.parentsUntil("body").each(function(){return"fixed"==$(this).css("position")?(t=!0,!1):void 0}),t},isLinkInMegaMenu:function(t){return $(this.getClosestMenu(t[0])).hasClass("mega-menu")},isTouchMode:function(){return!mouse||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(t,e){var i=t.closest("ul"),s=i.dataSM("level");if(s>1&&(!this.activatedItems[s-2]||this.activatedItems[s-2][0]!=i.dataSM("parent-a")[0])){var o=this;$(i.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(i).each(function(){o.itemActivate($(this).dataSM("parent-a"))})}if((!this.isCollapsible()||e)&&this.menuHideSubMenus(this.activatedItems[s-1]&&this.activatedItems[s-1][0]==t[0]?s:s-1),this.activatedItems[s-1]=t,this.$root.triggerHandler("activate.smapi",t[0])!==!1){var a=t.dataSM("sub");a&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(a)}},itemBlur:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&this.$root.triggerHandler("blur.smapi",e[0])},itemClick:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==e.closest("ul")[0])return this.$touchScrollingSub=null,t.stopPropagation(),!1;if(this.$root.triggerHandler("click.smapi",e[0])===!1)return!1;var i=$(t.target).is(".sub-arrow"),s=e.dataSM("sub"),o=s?2==s.dataSM("level"):!1,a=this.isCollapsible(),n=/toggle$/.test(this.opts.collapsibleBehavior),r=/link$/.test(this.opts.collapsibleBehavior),h=/^accordion/.test(this.opts.collapsibleBehavior);if(s&&!s.is(":visible")){if((!r||!a||i)&&(this.opts.showOnClick&&o&&(this.clickActivated=!0),this.itemActivate(e,h),s.is(":visible")))return this.focusActivated=!0,!1}else if(a&&(n||i))return this.itemActivate(e,h),this.menuHide(s),n&&(this.focusActivated=!1),!1;return this.opts.showOnClick&&o||e.hasClass("disabled")||this.$root.triggerHandler("select.smapi",e[0])===!1?!1:void 0}},itemDown:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&e.dataSM("mousedown",!0)},itemEnter:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var i=this;this.showTimeout=setTimeout(function(){i.itemActivate(e)},this.opts.showOnClick&&1==e.closest("ul").dataSM("level")?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",e[0])}},itemFocus:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(!this.focusActivated||this.isTouchMode()&&e.dataSM("mousedown")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==e[0]||this.itemActivate(e,!0),this.$root.triggerHandler("focus.smapi",e[0]))},itemLeave:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(this.isTouchMode()||(e[0].blur(),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0)),e.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.smapi",e[0]))},menuHide:function(t){if(this.$root.triggerHandler("beforehide.smapi",t[0])!==!1&&(canAnimate&&t.stop(!0,!0),"none"!=t.css("display"))){var e=function(){t.css("z-index","")};this.isCollapsible()?canAnimate&&this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,t,e):t.hide(this.opts.collapsibleHideDuration,e):canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,t,e):t.hide(this.opts.hideDuration,e),t.dataSM("scroll")&&(this.menuScrollStop(t),t.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).off(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()),t.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false"),t.attr({"aria-expanded":"false","aria-hidden":"true"});var i=t.dataSM("level");this.activatedItems.splice(i-1,1),this.visibleSubMenus.splice($.inArray(t,this.visibleSubMenus),1),this.$root.triggerHandler("hide.smapi",t[0])}},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var t=this.opts.isPopup?1:0,e=this.visibleSubMenus.length-1;e>=t;e--)this.menuHide(this.visibleSubMenus[e]);this.opts.isPopup&&(canAnimate&&this.$root.stop(!0,!0),this.$root.is(":visible")&&(canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration))),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(t){for(var e=this.activatedItems.length-1;e>=t;e--){var i=this.activatedItems[e].dataSM("sub");i&&this.menuHide(i)}},menuInit:function(t){if(!t.dataSM("in-mega")){t.hasClass("mega-menu")&&t.find("ul").dataSM("in-mega",!0);for(var e=2,i=t[0];(i=i.parentNode.parentNode)!=this.$root[0];)e++;var s=t.prevAll("a").eq(-1);s.length||(s=t.prevAll().find("a").eq(-1)),s.addClass("has-submenu").dataSM("sub",t),t.dataSM("parent-a",s).dataSM("level",e).parent().dataSM("sub",t);var o=s.attr("id")||this.accessIdPrefix+ ++this.idInc,a=t.attr("id")||this.accessIdPrefix+ ++this.idInc;s.attr({id:o,"aria-haspopup":"true","aria-controls":a,"aria-expanded":"false"}),t.attr({id:a,role:"group","aria-hidden":"true","aria-labelledby":o,"aria-expanded":"false"}),this.opts.subIndicators&&s[this.opts.subIndicatorsPos](this.$subArrow.clone())}},menuPosition:function(t){var e,i,s=t.dataSM("parent-a"),o=s.closest("li"),a=o.parent(),n=t.dataSM("level"),r=this.getWidth(t),h=this.getHeight(t),u=s.offset(),l=u.left,c=u.top,d=this.getWidth(s),m=this.getHeight(s),p=$(window),f=p.scrollLeft(),v=p.scrollTop(),b=this.getViewportWidth(),S=this.getViewportHeight(),g=a.parent().is("[data-sm-horizontal-sub]")||2==n&&!a.hasClass("sm-vertical"),M=this.opts.rightToLeftSubMenus&&!o.is("[data-sm-reverse]")||!this.opts.rightToLeftSubMenus&&o.is("[data-sm-reverse]"),w=2==n?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,T=2==n?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY;if(g?(e=M?d-r-w:w,i=this.opts.bottomToTopSubMenus?-h-T:m+T):(e=M?w-r:d-w,i=this.opts.bottomToTopSubMenus?m-T-h:T),this.opts.keepInViewport){var y=l+e,I=c+i;if(M&&f>y?e=g?f-y+e:d-w:!M&&y+r>f+b&&(e=g?f+b-r-y+e:w-r),g||(S>h&&I+h>v+S?i+=v+S-h-I:(h>=S||v>I)&&(i+=v-I)),g&&(I+h>v+S+.49||v>I)||!g&&h>S+.49){var x=this;t.dataSM("scroll-arrows")||t.dataSM("scroll-arrows",$([$('<span class="scroll-up"><span class="scroll-up-arrow"></span></span>')[0],$('<span class="scroll-down"><span class="scroll-down-arrow"></span></span>')[0]]).on({mouseenter:function(){t.dataSM("scroll").up=$(this).hasClass("scroll-up"),x.menuScroll(t)},mouseleave:function(e){x.menuScrollStop(t),x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(t){t.preventDefault()}}).insertAfter(t));var A=".smartmenus_scroll";if(t.dataSM("scroll",{y:this.cssTransforms3d?0:i-m,step:1,itemH:m,subH:h,arrowDownH:this.getHeight(t.dataSM("scroll-arrows").eq(1))}).on(getEventsNS({mouseover:function(e){x.menuScrollOver(t,e)},mouseout:function(e){x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(e){x.menuScrollMousewheel(t,e)}},A)).dataSM("scroll-arrows").css({top:"auto",left:"0",marginLeft:e+(parseInt(t.css("border-left-width"))||0),width:r-(parseInt(t.css("border-left-width"))||0)-(parseInt(t.css("border-right-width"))||0),zIndex:t.css("z-index")}).eq(g&&this.opts.bottomToTopSubMenus?0:1).show(),this.isFixed()){var C={};C[touchEvents?"touchstart touchmove touchend":"pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp"]=function(e){x.menuScrollTouch(t,e)},t.css({"touch-action":"none","-ms-touch-action":"none"}).on(getEventsNS(C,A))}}}t.css({top:"auto",left:"0",marginLeft:e,marginTop:i-m})},menuScroll:function(t,e,i){var s,o=t.dataSM("scroll"),a=t.dataSM("scroll-arrows"),n=o.up?o.upEnd:o.downEnd;if(!e&&o.momentum){if(o.momentum*=.92,s=o.momentum,.5>s)return this.menuScrollStop(t),void 0}else s=i||(e||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor(o.step));var r=t.dataSM("level");if(this.activatedItems[r-1]&&this.activatedItems[r-1].dataSM("sub")&&this.activatedItems[r-1].dataSM("sub").is(":visible")&&this.menuHideSubMenus(r-1),o.y=o.up&&o.y>=n||!o.up&&n>=o.y?o.y:Math.abs(n-o.y)>s?o.y+(o.up?s:-s):n,t.css(this.cssTransforms3d?{"-webkit-transform":"translate3d(0, "+o.y+"px, 0)",transform:"translate3d(0, "+o.y+"px, 0)"}:{marginTop:o.y}),mouse&&(o.up&&o.y>o.downEnd||!o.up&&o.y<o.upEnd)&&a.eq(o.up?1:0).show(),o.y==n)mouse&&a.eq(o.up?0:1).hide(),this.menuScrollStop(t);else if(!e){this.opts.scrollAccelerate&&o.step<this.opts.scrollStep&&(o.step+=.2);var h=this;this.scrollTimeout=requestAnimationFrame(function(){h.menuScroll(t)})}},menuScrollMousewheel:function(t,e){if(this.getClosestMenu(e.target)==t[0]){e=e.originalEvent;var i=(e.wheelDelta||-e.detail)>0;t.dataSM("scroll-arrows").eq(i?0:1).is(":visible")&&(t.dataSM("scroll").up=i,this.menuScroll(t,!0))}e.preventDefault()},menuScrollOut:function(t,e){mouse&&(/^scroll-(up|down)/.test((e.relatedTarget||"").className)||(t[0]==e.relatedTarget||$.contains(t[0],e.relatedTarget))&&this.getClosestMenu(e.relatedTarget)==t[0]||t.dataSM("scroll-arrows").css("visibility","hidden"))},menuScrollOver:function(t,e){if(mouse&&!/^scroll-(up|down)/.test(e.target.className)&&this.getClosestMenu(e.target)==t[0]){this.menuScrollRefreshData(t);var i=t.dataSM("scroll"),s=$(window).scrollTop()-t.dataSM("parent-a").offset().top-i.itemH;t.dataSM("scroll-arrows").eq(0).css("margin-top",s).end().eq(1).css("margin-top",s+this.getViewportHeight()-i.arrowDownH).end().css("visibility","visible")}},menuScrollRefreshData:function(t){var e=t.dataSM("scroll"),i=$(window).scrollTop()-t.dataSM("parent-a").offset().top-e.itemH;this.cssTransforms3d&&(i=-(parseFloat(t.css("margin-top"))-i)),$.extend(e,{upEnd:i,downEnd:i+this.getViewportHeight()-e.subH})},menuScrollStop:function(t){return this.scrollTimeout?(cancelAnimationFrame(this.scrollTimeout),this.scrollTimeout=0,t.dataSM("scroll").step=1,!0):void 0},menuScrollTouch:function(t,e){if(e=e.originalEvent,isTouchEvent(e)){var i=this.getTouchPoint(e);if(this.getClosestMenu(i.target)==t[0]){var s=t.dataSM("scroll");if(/(start|down)$/i.test(e.type))this.menuScrollStop(t)?(e.preventDefault(),this.$touchScrollingSub=t):this.$touchScrollingSub=null,this.menuScrollRefreshData(t),$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp});else if(/move$/i.test(e.type)){var o=void 0!==s.touchY?s.touchY:s.touchStartY;if(void 0!==o&&o!=i.pageY){this.$touchScrollingSub=t;var a=i.pageY>o;void 0!==s.up&&s.up!=a&&$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp}),$.extend(s,{up:a,touchY:i.pageY}),this.menuScroll(t,!0,Math.abs(i.pageY-o))}e.preventDefault()}else void 0!==s.touchY&&((s.momentum=15*Math.pow(Math.abs(i.pageY-s.touchStartY)/(e.timeStamp-s.touchStartTime),2))&&(this.menuScrollStop(t),this.menuScroll(t),e.preventDefault()),delete s.touchY)}}},menuShow:function(t){if((t.dataSM("beforefirstshowfired")||(t.dataSM("beforefirstshowfired",!0),this.$root.triggerHandler("beforefirstshow.smapi",t[0])!==!1))&&this.$root.triggerHandler("beforeshow.smapi",t[0])!==!1&&(t.dataSM("shown-before",!0),canAnimate&&t.stop(!0,!0),!t.is(":visible"))){var e=t.dataSM("parent-a"),i=this.isCollapsible();if((this.opts.keepHighlighted||i)&&e.addClass("highlighted"),i)t.removeClass("sm-nowrap").css({zIndex:"",width:"auto",minWidth:"",maxWidth:"",top:"",left:"",marginLeft:"",marginTop:""});else{if(t.css("z-index",this.zIndexInc=(this.zIndexInc||this.getStartZIndex())+1),(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth)&&(t.css({width:"auto",minWidth:"",maxWidth:""}).addClass("sm-nowrap"),this.opts.subMenusMinWidth&&t.css("min-width",this.opts.subMenusMinWidth),this.opts.subMenusMaxWidth)){var s=this.getWidth(t);t.css("max-width",this.opts.subMenusMaxWidth),s>this.getWidth(t)&&t.removeClass("sm-nowrap").css("width",this.opts.subMenusMaxWidth)}this.menuPosition(t)}var o=function(){t.css("overflow","")};i?canAnimate&&this.opts.collapsibleShowFunction?this.opts.collapsibleShowFunction.call(this,t,o):t.show(this.opts.collapsibleShowDuration,o):canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,t,o):t.show(this.opts.showDuration,o),e.attr("aria-expanded","true"),t.attr({"aria-expanded":"true","aria-hidden":"false"}),this.visibleSubMenus.push(t),this.$root.triggerHandler("show.smapi",t[0])}},popupHide:function(t){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},t?1:this.opts.hideTimeout)},popupShow:function(t,e){if(!this.opts.isPopup)return alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.'),void 0;if(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),this.$root.dataSM("shown-before",!0),canAnimate&&this.$root.stop(!0,!0),!this.$root.is(":visible")){this.$root.css({left:t,top:e});var i=this,s=function(){i.$root.css("overflow","")};canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,this.$root,s):this.$root.show(this.opts.showDuration,s),this.visibleSubMenus[0]=this.$root}},refresh:function(){this.destroy(!0),this.init(!0)},rootKeyDown:function(t){if(this.handleEvents())switch(t.keyCode){case 27:var e=this.activatedItems[0];if(e){this.menuHideAll(),e[0].focus();var i=e.dataSM("sub");i&&this.menuHide(i)}break;case 32:var s=$(t.target);if(s.is("a")&&this.handleItemEvents(s)){var i=s.dataSM("sub");i&&!i.is(":visible")&&(this.itemClick({currentTarget:t.target}),t.preventDefault())}}},rootOut:function(t){if(this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),!this.opts.showOnClick||!this.opts.hideOnClick)){var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},this.opts.hideTimeout)}},rootOver:function(t){this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0)},winResize:function(t){if(this.handleEvents()){if(!("onorientationchange"in window)||"orientationchange"==t.type){var e=this.isCollapsible();this.wasCollapsible&&e||(this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0].blur(),this.menuHideAll()),this.wasCollapsible=e}}else if(this.$disableOverlay){var i=this.$root.offset();this.$disableOverlay.css({top:i.top,left:i.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()})}}}}),$.fn.dataSM=function(t,e){return e?this.data(t+"_smartmenus",e):this.data(t+"_smartmenus")},$.fn.removeDataSM=function(t){return this.removeData(t+"_smartmenus")},$.fn.smartmenus=function(options){if("string"==typeof options){var args=arguments,method=options;return Array.prototype.shift.call(args),this.each(function(){var t=$(this).data("smartmenus");t&&t[method]&&t[method].apply(t,args)})}return this.each(function(){var dataOpts=$(this).data("sm-options")||null;if(dataOpts)try{dataOpts=eval("("+dataOpts+")")}catch(e){dataOpts=null,alert('ERROR\n\nSmartMenus jQuery init:\nInvalid "data-sm-options" attribute value syntax.')}new $.SmartMenus(this,$.extend({},$.fn.smartmenus.defaults,options,dataOpts))})},$.fn.smartmenus.defaults={isPopup:!1,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:"10em",subMenusMaxWidth:"20em",subIndicators:!0,subIndicatorsPos:"append",subIndicatorsText:"",scrollStep:30,scrollAccelerate:!0,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function(t,e){t.fadeOut(200,e)},collapsibleShowDuration:0,collapsibleShowFunction:function(t,e){t.slideDown(200,e)},collapsibleHideDuration:0,collapsibleHideFunction:function(t,e){t.slideUp(200,e)},showOnClick:!1,hideOnClick:!0,noMouseOver:!1,keepInViewport:!0,keepHighlighted:!0,markCurrentItem:!1,markCurrentTree:!0,rightToLeftSubMenus:!1,bottomToTopSubMenus:!1,collapsibleBehavior:"default"},$});
\ No newline at end of file
diff --git a/doc/html/libevent_8h.html b/doc/html/libevent_8h.html
new file mode 100644 (file)
index 0000000..d452f95
--- /dev/null
@@ -0,0 +1,133 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: libevent.h File Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('libevent_8h.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle"><div class="title">libevent.h File Reference</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><a href="libevent_8h_source.html">Go to the source code of this file.</a></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:ga195d269473332931fd0fede0bac3309e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__libevent_functions.html#ga195d269473332931fd0fede0bac3309e">natsLibevent_Init</a> (void)</td></tr>
+<tr class="memdesc:ga195d269473332931fd0fede0bac3309e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the adapter.  <a href="group__libevent_functions.html#ga195d269473332931fd0fede0bac3309e">More...</a><br /></td></tr>
+<tr class="separator:ga195d269473332931fd0fede0bac3309e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga30c00f21a5251ee9fde09c1f2b429cd2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__libevent_functions.html#ga30c00f21a5251ee9fde09c1f2b429cd2">natsLibevent_Attach</a> (void **userData, void *loop, <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <a class="el" href="nats_8h.html#af798865ac824e5959987de0fe8d07383">natsSock</a> socket)</td></tr>
+<tr class="memdesc:ga30c00f21a5251ee9fde09c1f2b429cd2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Attach a connection to the given event loop.  <a href="group__libevent_functions.html#ga30c00f21a5251ee9fde09c1f2b429cd2">More...</a><br /></td></tr>
+<tr class="separator:ga30c00f21a5251ee9fde09c1f2b429cd2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga8a14ce23b4f6ba3bf63369961f9a5552"><td class="memItemLeft" align="right" valign="top"><a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__libevent_functions.html#ga8a14ce23b4f6ba3bf63369961f9a5552">natsLibevent_Read</a> (void *userData, bool add)</td></tr>
+<tr class="memdesc:ga8a14ce23b4f6ba3bf63369961f9a5552"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start or stop polling on READ events.  <a href="group__libevent_functions.html#ga8a14ce23b4f6ba3bf63369961f9a5552">More...</a><br /></td></tr>
+<tr class="separator:ga8a14ce23b4f6ba3bf63369961f9a5552"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga7ac99f326a59e5663ff66f5023c87091"><td class="memItemLeft" align="right" valign="top"><a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__libevent_functions.html#ga7ac99f326a59e5663ff66f5023c87091">natsLibevent_Write</a> (void *userData, bool add)</td></tr>
+<tr class="memdesc:ga7ac99f326a59e5663ff66f5023c87091"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start or stop polling on WRITE events.  <a href="group__libevent_functions.html#ga7ac99f326a59e5663ff66f5023c87091">More...</a><br /></td></tr>
+<tr class="separator:ga7ac99f326a59e5663ff66f5023c87091"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaac76f5937329a8650f69c6bd8af36cd5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__libevent_functions.html#gaac76f5937329a8650f69c6bd8af36cd5">natsLibevent_Detach</a> (void *userData)</td></tr>
+<tr class="memdesc:gaac76f5937329a8650f69c6bd8af36cd5"><td class="mdescLeft">&#160;</td><td class="mdescRight">The connection is closed, it can be safely detached.  <a href="group__libevent_functions.html#gaac76f5937329a8650f69c6bd8af36cd5">More...</a><br /></td></tr>
+<tr class="separator:gaac76f5937329a8650f69c6bd8af36cd5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_085924db4bed469054a9264cf96b0d5e.html">adapters</a></li><li class="navelem"><a class="el" href="libevent_8h.html">libevent.h</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/libevent_8h.js b/doc/html/libevent_8h.js
new file mode 100644 (file)
index 0000000..751f61e
--- /dev/null
@@ -0,0 +1,8 @@
+var libevent_8h =
+[
+    [ "natsLibevent_Init", "group__libevent_functions.html#ga195d269473332931fd0fede0bac3309e", null ],
+    [ "natsLibevent_Attach", "group__libevent_functions.html#ga30c00f21a5251ee9fde09c1f2b429cd2", null ],
+    [ "natsLibevent_Read", "group__libevent_functions.html#ga8a14ce23b4f6ba3bf63369961f9a5552", null ],
+    [ "natsLibevent_Write", "group__libevent_functions.html#ga7ac99f326a59e5663ff66f5023c87091", null ],
+    [ "natsLibevent_Detach", "group__libevent_functions.html#gaac76f5937329a8650f69c6bd8af36cd5", null ]
+];
\ No newline at end of file
diff --git a/doc/html/libevent_8h_source.html b/doc/html/libevent_8h_source.html
new file mode 100644 (file)
index 0000000..78ba123
--- /dev/null
@@ -0,0 +1,307 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: libevent.h Source File</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('libevent_8h_source.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">libevent.h</div></div>
+</div><!--header-->
+<div class="contents">
+<a href="libevent_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">// Copyright 2016-2018 The NATS Authors</span></div>
+<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment">// Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div>
+<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment">// you may not use this file except in compliance with the License.</span></div>
+<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="comment">// You may obtain a copy of the License at</span></div>
+<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="comment">//</span></div>
+<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span><span class="comment">// http://www.apache.org/licenses/LICENSE-2.0</span></div>
+<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="comment">//</span></div>
+<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="comment">// Unless required by applicable law or agreed to in writing, software</span></div>
+<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="comment">// distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
+<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
+<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="comment">// See the License for the specific language governing permissions and</span></div>
+<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="comment">// limitations under the License.</span></div>
+<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span> </div>
+<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span><span class="preprocessor">#ifndef LIBEVENT_H_</span></div>
+<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span><span class="preprocessor">#define LIBEVENT_H_</span></div>
+<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span> </div>
+<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span><span class="preprocessor">#ifdef __cplusplus</span></div>
+<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
+<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span><span class="preprocessor">#endif</span></div>
+<div class="line"><a id="l00020" name="l00020"></a><span class="lineno">   20</span> </div>
+<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span><span class="preprocessor">#include &lt;event.h&gt;</span></div>
+<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span><span class="preprocessor">#include &lt;event2/thread.h&gt;</span></div>
+<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span><span class="preprocessor">#include &quot;../nats.h&quot;</span></div>
+<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span> </div>
+<div class="line"><a id="l00028" name="l00028"></a><span class="lineno">   28</span><span class="keyword">typedef</span> <span class="keyword">struct</span></div>
+<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span>{</div>
+<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span>    <a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a>      *nc;</div>
+<div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span>    <span class="keyword">struct </span>event_base   *loop;</div>
+<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span>    <span class="keyword">struct </span>event        *read;</div>
+<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span>    <span class="keyword">struct </span>event        *write;</div>
+<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span>    <span class="keyword">struct </span>event        *keepActive;</div>
+<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span> </div>
+<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span>} natsLibeventEvents;</div>
+<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span> </div>
+<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span><span class="comment">// Forward declarations</span></div>
+<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span><a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> <a class="code hl_function" href="group__libevent_functions.html#ga8a14ce23b4f6ba3bf63369961f9a5552">natsLibevent_Read</a>(<span class="keywordtype">void</span> *userData, <span class="keywordtype">bool</span> add);</div>
+<div class="line"><a id="l00040" name="l00040"></a><span class="lineno">   40</span><a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> <a class="code hl_function" href="group__libevent_functions.html#gaac76f5937329a8650f69c6bd8af36cd5">natsLibevent_Detach</a>(<span class="keywordtype">void</span> *userData);</div>
+<div class="line"><a id="l00041" name="l00041"></a><span class="lineno">   41</span> </div>
+<div class="line"><a id="l00057" name="l00057"></a><span class="lineno">   57</span><span class="keywordtype">void</span></div>
+<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"><a class="line" href="group__libevent_functions.html#ga195d269473332931fd0fede0bac3309e">   58</a></span><a class="code hl_function" href="group__libevent_functions.html#ga195d269473332931fd0fede0bac3309e">natsLibevent_Init</a>(<span class="keywordtype">void</span>)</div>
+<div class="line"><a id="l00059" name="l00059"></a><span class="lineno">   59</span>{</div>
+<div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span><span class="preprocessor">#if _WIN32</span></div>
+<div class="line"><a id="l00061" name="l00061"></a><span class="lineno">   61</span>    evthread_use_windows_threads();</div>
+<div class="line"><a id="l00062" name="l00062"></a><span class="lineno">   62</span><span class="preprocessor">#else</span></div>
+<div class="line"><a id="l00063" name="l00063"></a><span class="lineno">   63</span>    evthread_use_pthreads();</div>
+<div class="line"><a id="l00064" name="l00064"></a><span class="lineno">   64</span><span class="preprocessor">#endif</span></div>
+<div class="line"><a id="l00065" name="l00065"></a><span class="lineno">   65</span>}</div>
+<div class="line"><a id="l00066" name="l00066"></a><span class="lineno">   66</span> </div>
+<div class="line"><a id="l00067" name="l00067"></a><span class="lineno">   67</span><span class="keyword">static</span> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l00068" name="l00068"></a><span class="lineno">   68</span>natsLibevent_ProcessEvent(evutil_socket_t fd, <span class="keywordtype">short</span> event, <span class="keywordtype">void</span> *arg)</div>
+<div class="line"><a id="l00069" name="l00069"></a><span class="lineno">   69</span>{</div>
+<div class="line"><a id="l00070" name="l00070"></a><span class="lineno">   70</span>    natsLibeventEvents *nle = (natsLibeventEvents*) arg;</div>
+<div class="line"><a id="l00071" name="l00071"></a><span class="lineno">   71</span> </div>
+<div class="line"><a id="l00072" name="l00072"></a><span class="lineno">   72</span>    <span class="keywordflow">if</span> (event &amp; EV_READ)</div>
+<div class="line"><a id="l00073" name="l00073"></a><span class="lineno">   73</span>        <a class="code hl_function" href="group__conn_mgt_group.html#gaa89c06e30e19ff361125bfc9114d89a8">natsConnection_ProcessReadEvent</a>(nle-&gt;nc);</div>
+<div class="line"><a id="l00074" name="l00074"></a><span class="lineno">   74</span> </div>
+<div class="line"><a id="l00075" name="l00075"></a><span class="lineno">   75</span>    <span class="keywordflow">if</span> (event &amp; EV_WRITE)</div>
+<div class="line"><a id="l00076" name="l00076"></a><span class="lineno">   76</span>        <a class="code hl_function" href="group__conn_mgt_group.html#gad81b603b84c0180aefc6d5ebad7f2a47">natsConnection_ProcessWriteEvent</a>(nle-&gt;nc);</div>
+<div class="line"><a id="l00077" name="l00077"></a><span class="lineno">   77</span>}</div>
+<div class="line"><a id="l00078" name="l00078"></a><span class="lineno">   78</span> </div>
+<div class="line"><a id="l00079" name="l00079"></a><span class="lineno">   79</span><span class="keyword">static</span> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l00080" name="l00080"></a><span class="lineno">   80</span>keepAliveCb(evutil_socket_t fd, <span class="keywordtype">short</span> flags, <span class="keywordtype">void</span> * arg)</div>
+<div class="line"><a id="l00081" name="l00081"></a><span class="lineno">   81</span>{</div>
+<div class="line"><a id="l00082" name="l00082"></a><span class="lineno">   82</span>    <span class="comment">// do nothing...</span></div>
+<div class="line"><a id="l00083" name="l00083"></a><span class="lineno">   83</span>}</div>
+<div class="line"><a id="l00084" name="l00084"></a><span class="lineno">   84</span> </div>
+<div class="line"><a id="l00097" name="l00097"></a><span class="lineno">   97</span><a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"><a class="line" href="group__libevent_functions.html#ga30c00f21a5251ee9fde09c1f2b429cd2">   98</a></span><a class="code hl_function" href="group__libevent_functions.html#ga30c00f21a5251ee9fde09c1f2b429cd2">natsLibevent_Attach</a>(<span class="keywordtype">void</span> **userData, <span class="keywordtype">void</span> *loop, <a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <a class="code hl_typedef" href="nats_8h.html#af798865ac824e5959987de0fe8d07383">natsSock</a> socket)</div>
+<div class="line"><a id="l00099" name="l00099"></a><span class="lineno">   99</span>{</div>
+<div class="line"><a id="l00100" name="l00100"></a><span class="lineno">  100</span>    <span class="keyword">struct </span>event_base   *libeventLoop = (<span class="keyword">struct </span>event_base*) loop;</div>
+<div class="line"><a id="l00101" name="l00101"></a><span class="lineno">  101</span>    natsLibeventEvents  *nle          = (natsLibeventEvents*) (*userData);</div>
+<div class="line"><a id="l00102" name="l00102"></a><span class="lineno">  102</span>    <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>          s             = <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">NATS_OK</a>;</div>
+<div class="line"><a id="l00103" name="l00103"></a><span class="lineno">  103</span> </div>
+<div class="line"><a id="l00104" name="l00104"></a><span class="lineno">  104</span>    <span class="comment">// This is the first attach (when reconnecting, nle will be non-NULL).</span></div>
+<div class="line"><a id="l00105" name="l00105"></a><span class="lineno">  105</span>    <span class="keywordflow">if</span> (nle == NULL)</div>
+<div class="line"><a id="l00106" name="l00106"></a><span class="lineno">  106</span>    {</div>
+<div class="line"><a id="l00107" name="l00107"></a><span class="lineno">  107</span>        nle = (natsLibeventEvents*) calloc(1, <span class="keyword">sizeof</span>(natsLibeventEvents));</div>
+<div class="line"><a id="l00108" name="l00108"></a><span class="lineno">  108</span>        <span class="keywordflow">if</span> (nle == NULL)</div>
+<div class="line"><a id="l00109" name="l00109"></a><span class="lineno">  109</span>            <span class="keywordflow">return</span> <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a62ff6f5cc64399631defc0119731b514">NATS_NO_MEMORY</a>;</div>
+<div class="line"><a id="l00110" name="l00110"></a><span class="lineno">  110</span> </div>
+<div class="line"><a id="l00111" name="l00111"></a><span class="lineno">  111</span>        nle-&gt;nc   = nc;</div>
+<div class="line"><a id="l00112" name="l00112"></a><span class="lineno">  112</span>        nle-&gt;loop = libeventLoop;</div>
+<div class="line"><a id="l00113" name="l00113"></a><span class="lineno">  113</span> </div>
+<div class="line"><a id="l00114" name="l00114"></a><span class="lineno">  114</span>        nle-&gt;keepActive = event_new(nle-&gt;loop, -1, EV_PERSIST, keepAliveCb, NULL);</div>
+<div class="line"><a id="l00115" name="l00115"></a><span class="lineno">  115</span>        <span class="keywordflow">if</span> (nle-&gt;keepActive == NULL)</div>
+<div class="line"><a id="l00116" name="l00116"></a><span class="lineno">  116</span>            s = <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a62ff6f5cc64399631defc0119731b514">NATS_NO_MEMORY</a>;</div>
+<div class="line"><a id="l00117" name="l00117"></a><span class="lineno">  117</span> </div>
+<div class="line"><a id="l00118" name="l00118"></a><span class="lineno">  118</span>        <span class="keywordflow">if</span> (s == <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">NATS_OK</a>)</div>
+<div class="line"><a id="l00119" name="l00119"></a><span class="lineno">  119</span>        {</div>
+<div class="line"><a id="l00120" name="l00120"></a><span class="lineno">  120</span>            <span class="keyword">struct </span>timeval timeout;</div>
+<div class="line"><a id="l00121" name="l00121"></a><span class="lineno">  121</span> </div>
+<div class="line"><a id="l00122" name="l00122"></a><span class="lineno">  122</span>            timeout.tv_sec = 100000;</div>
+<div class="line"><a id="l00123" name="l00123"></a><span class="lineno">  123</span>            timeout.tv_usec = 0;</div>
+<div class="line"><a id="l00124" name="l00124"></a><span class="lineno">  124</span> </div>
+<div class="line"><a id="l00125" name="l00125"></a><span class="lineno">  125</span>            <span class="keywordflow">if</span> (event_add(nle-&gt;keepActive, &amp;timeout) != 0)</div>
+<div class="line"><a id="l00126" name="l00126"></a><span class="lineno">  126</span>                s = <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a40a08ae6ae17deaf390b1d0d7550791c">NATS_ERR</a>;</div>
+<div class="line"><a id="l00127" name="l00127"></a><span class="lineno">  127</span>        }</div>
+<div class="line"><a id="l00128" name="l00128"></a><span class="lineno">  128</span>    }</div>
+<div class="line"><a id="l00129" name="l00129"></a><span class="lineno">  129</span>    <span class="keywordflow">else</span></div>
+<div class="line"><a id="l00130" name="l00130"></a><span class="lineno">  130</span>    {</div>
+<div class="line"><a id="l00131" name="l00131"></a><span class="lineno">  131</span>        <span class="keywordflow">if</span> (nle-&gt;read != NULL)</div>
+<div class="line"><a id="l00132" name="l00132"></a><span class="lineno">  132</span>        {</div>
+<div class="line"><a id="l00133" name="l00133"></a><span class="lineno">  133</span>            event_free(nle-&gt;read);</div>
+<div class="line"><a id="l00134" name="l00134"></a><span class="lineno">  134</span>            nle-&gt;read = NULL;</div>
+<div class="line"><a id="l00135" name="l00135"></a><span class="lineno">  135</span>        }</div>
+<div class="line"><a id="l00136" name="l00136"></a><span class="lineno">  136</span>        <span class="keywordflow">if</span> (nle-&gt;write != NULL)</div>
+<div class="line"><a id="l00137" name="l00137"></a><span class="lineno">  137</span>        {</div>
+<div class="line"><a id="l00138" name="l00138"></a><span class="lineno">  138</span>            event_free(nle-&gt;write);</div>
+<div class="line"><a id="l00139" name="l00139"></a><span class="lineno">  139</span>            nle-&gt;write = NULL;</div>
+<div class="line"><a id="l00140" name="l00140"></a><span class="lineno">  140</span>        }</div>
+<div class="line"><a id="l00141" name="l00141"></a><span class="lineno">  141</span>    }</div>
+<div class="line"><a id="l00142" name="l00142"></a><span class="lineno">  142</span> </div>
+<div class="line"><a id="l00143" name="l00143"></a><span class="lineno">  143</span>    <span class="keywordflow">if</span> (s == <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">NATS_OK</a>)</div>
+<div class="line"><a id="l00144" name="l00144"></a><span class="lineno">  144</span>    {</div>
+<div class="line"><a id="l00145" name="l00145"></a><span class="lineno">  145</span>        nle-&gt;read = event_new(nle-&gt;loop, socket, EV_READ|EV_PERSIST,</div>
+<div class="line"><a id="l00146" name="l00146"></a><span class="lineno">  146</span>                              natsLibevent_ProcessEvent, (<span class="keywordtype">void</span>*) nle);</div>
+<div class="line"><a id="l00147" name="l00147"></a><span class="lineno">  147</span>        <a class="code hl_function" href="group__libevent_functions.html#ga8a14ce23b4f6ba3bf63369961f9a5552">natsLibevent_Read</a>((<span class="keywordtype">void</span>*) nle, <span class="keyword">true</span>);</div>
+<div class="line"><a id="l00148" name="l00148"></a><span class="lineno">  148</span> </div>
+<div class="line"><a id="l00149" name="l00149"></a><span class="lineno">  149</span>        nle-&gt;write = event_new(nle-&gt;loop, socket, EV_WRITE|EV_PERSIST,</div>
+<div class="line"><a id="l00150" name="l00150"></a><span class="lineno">  150</span>                               natsLibevent_ProcessEvent, (<span class="keywordtype">void</span>*) nle);</div>
+<div class="line"><a id="l00151" name="l00151"></a><span class="lineno">  151</span>    }</div>
+<div class="line"><a id="l00152" name="l00152"></a><span class="lineno">  152</span> </div>
+<div class="line"><a id="l00153" name="l00153"></a><span class="lineno">  153</span>    <span class="keywordflow">if</span> (s == <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">NATS_OK</a>)</div>
+<div class="line"><a id="l00154" name="l00154"></a><span class="lineno">  154</span>        *userData = (<span class="keywordtype">void</span>*) nle;</div>
+<div class="line"><a id="l00155" name="l00155"></a><span class="lineno">  155</span>    <span class="keywordflow">else</span></div>
+<div class="line"><a id="l00156" name="l00156"></a><span class="lineno">  156</span>        <a class="code hl_function" href="group__libevent_functions.html#gaac76f5937329a8650f69c6bd8af36cd5">natsLibevent_Detach</a>((<span class="keywordtype">void</span>*) nle);</div>
+<div class="line"><a id="l00157" name="l00157"></a><span class="lineno">  157</span> </div>
+<div class="line"><a id="l00158" name="l00158"></a><span class="lineno">  158</span>    <span class="keywordflow">return</span> s;</div>
+<div class="line"><a id="l00159" name="l00159"></a><span class="lineno">  159</span>}</div>
+<div class="line"><a id="l00160" name="l00160"></a><span class="lineno">  160</span> </div>
+<div class="line"><a id="l00169" name="l00169"></a><span class="lineno">  169</span><a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"><a class="line" href="group__libevent_functions.html#ga8a14ce23b4f6ba3bf63369961f9a5552">  170</a></span><a class="code hl_function" href="group__libevent_functions.html#ga8a14ce23b4f6ba3bf63369961f9a5552">natsLibevent_Read</a>(<span class="keywordtype">void</span> *userData, <span class="keywordtype">bool</span> add)</div>
+<div class="line"><a id="l00171" name="l00171"></a><span class="lineno">  171</span>{</div>
+<div class="line"><a id="l00172" name="l00172"></a><span class="lineno">  172</span>    natsLibeventEvents  *nle = (natsLibeventEvents*) userData;</div>
+<div class="line"><a id="l00173" name="l00173"></a><span class="lineno">  173</span>    <span class="keywordtype">int</span>                 res;</div>
+<div class="line"><a id="l00174" name="l00174"></a><span class="lineno">  174</span> </div>
+<div class="line"><a id="l00175" name="l00175"></a><span class="lineno">  175</span>    <span class="keywordflow">if</span> (add)</div>
+<div class="line"><a id="l00176" name="l00176"></a><span class="lineno">  176</span>        res = event_add(nle-&gt;read, NULL);</div>
+<div class="line"><a id="l00177" name="l00177"></a><span class="lineno">  177</span>    <span class="keywordflow">else</span></div>
+<div class="line"><a id="l00178" name="l00178"></a><span class="lineno">  178</span>        res = event_del_noblock(nle-&gt;read);</div>
+<div class="line"><a id="l00179" name="l00179"></a><span class="lineno">  179</span> </div>
+<div class="line"><a id="l00180" name="l00180"></a><span class="lineno">  180</span>    <span class="keywordflow">return</span> (res == 0 ? <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">NATS_OK</a> : <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a40a08ae6ae17deaf390b1d0d7550791c">NATS_ERR</a>);</div>
+<div class="line"><a id="l00181" name="l00181"></a><span class="lineno">  181</span>}</div>
+<div class="line"><a id="l00182" name="l00182"></a><span class="lineno">  182</span> </div>
+<div class="line"><a id="l00191" name="l00191"></a><span class="lineno">  191</span><a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"><a class="line" href="group__libevent_functions.html#ga7ac99f326a59e5663ff66f5023c87091">  192</a></span><a class="code hl_function" href="group__libevent_functions.html#ga7ac99f326a59e5663ff66f5023c87091">natsLibevent_Write</a>(<span class="keywordtype">void</span> *userData, <span class="keywordtype">bool</span> add)</div>
+<div class="line"><a id="l00193" name="l00193"></a><span class="lineno">  193</span>{</div>
+<div class="line"><a id="l00194" name="l00194"></a><span class="lineno">  194</span>    natsLibeventEvents  *nle = (natsLibeventEvents*) userData;</div>
+<div class="line"><a id="l00195" name="l00195"></a><span class="lineno">  195</span>    <span class="keywordtype">int</span>                 res;</div>
+<div class="line"><a id="l00196" name="l00196"></a><span class="lineno">  196</span> </div>
+<div class="line"><a id="l00197" name="l00197"></a><span class="lineno">  197</span>    <span class="keywordflow">if</span> (add)</div>
+<div class="line"><a id="l00198" name="l00198"></a><span class="lineno">  198</span>        res = event_add(nle-&gt;write, NULL);</div>
+<div class="line"><a id="l00199" name="l00199"></a><span class="lineno">  199</span>    <span class="keywordflow">else</span></div>
+<div class="line"><a id="l00200" name="l00200"></a><span class="lineno">  200</span>        res = event_del_noblock(nle-&gt;write);</div>
+<div class="line"><a id="l00201" name="l00201"></a><span class="lineno">  201</span> </div>
+<div class="line"><a id="l00202" name="l00202"></a><span class="lineno">  202</span>    <span class="keywordflow">return</span> (res == 0 ? <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">NATS_OK</a> : <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a40a08ae6ae17deaf390b1d0d7550791c">NATS_ERR</a>);</div>
+<div class="line"><a id="l00203" name="l00203"></a><span class="lineno">  203</span>}</div>
+<div class="line"><a id="l00204" name="l00204"></a><span class="lineno">  204</span> </div>
+<div class="line"><a id="l00213" name="l00213"></a><span class="lineno">  213</span><a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"><a class="line" href="group__libevent_functions.html#gaac76f5937329a8650f69c6bd8af36cd5">  214</a></span><a class="code hl_function" href="group__libevent_functions.html#gaac76f5937329a8650f69c6bd8af36cd5">natsLibevent_Detach</a>(<span class="keywordtype">void</span> *userData)</div>
+<div class="line"><a id="l00215" name="l00215"></a><span class="lineno">  215</span>{</div>
+<div class="line"><a id="l00216" name="l00216"></a><span class="lineno">  216</span>    natsLibeventEvents *nle = (natsLibeventEvents*) userData;</div>
+<div class="line"><a id="l00217" name="l00217"></a><span class="lineno">  217</span> </div>
+<div class="line"><a id="l00218" name="l00218"></a><span class="lineno">  218</span>    <span class="keywordflow">if</span> (nle-&gt;read != NULL)</div>
+<div class="line"><a id="l00219" name="l00219"></a><span class="lineno">  219</span>        event_free(nle-&gt;read);</div>
+<div class="line"><a id="l00220" name="l00220"></a><span class="lineno">  220</span>    <span class="keywordflow">if</span> (nle-&gt;write != NULL)</div>
+<div class="line"><a id="l00221" name="l00221"></a><span class="lineno">  221</span>        event_free(nle-&gt;write);</div>
+<div class="line"><a id="l00222" name="l00222"></a><span class="lineno">  222</span>    <span class="keywordflow">if</span> (nle-&gt;keepActive != NULL)</div>
+<div class="line"><a id="l00223" name="l00223"></a><span class="lineno">  223</span>    {</div>
+<div class="line"><a id="l00224" name="l00224"></a><span class="lineno">  224</span>        event_active(nle-&gt;keepActive, 0, 0);</div>
+<div class="line"><a id="l00225" name="l00225"></a><span class="lineno">  225</span>        event_free(nle-&gt;keepActive);</div>
+<div class="line"><a id="l00226" name="l00226"></a><span class="lineno">  226</span>    }</div>
+<div class="line"><a id="l00227" name="l00227"></a><span class="lineno">  227</span> </div>
+<div class="line"><a id="l00228" name="l00228"></a><span class="lineno">  228</span>    free(nle);</div>
+<div class="line"><a id="l00229" name="l00229"></a><span class="lineno">  229</span> </div>
+<div class="line"><a id="l00230" name="l00230"></a><span class="lineno">  230</span>    <span class="keywordflow">return</span> <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">NATS_OK</a>;</div>
+<div class="line"><a id="l00231" name="l00231"></a><span class="lineno">  231</span>}</div>
+<div class="line"><a id="l00232" name="l00232"></a><span class="lineno">  232</span> <span class="comment">// end of libeventFunctions</span></div>
+<div class="line"><a id="l00234" name="l00234"></a><span class="lineno">  234</span> </div>
+<div class="line"><a id="l00235" name="l00235"></a><span class="lineno">  235</span><span class="preprocessor">#ifdef __cplusplus</span></div>
+<div class="line"><a id="l00236" name="l00236"></a><span class="lineno">  236</span>}</div>
+<div class="line"><a id="l00237" name="l00237"></a><span class="lineno">  237</span><span class="preprocessor">#endif</span></div>
+<div class="line"><a id="l00238" name="l00238"></a><span class="lineno">  238</span> </div>
+<div class="line"><a id="l00239" name="l00239"></a><span class="lineno">  239</span><span class="preprocessor">#endif </span><span class="comment">/* LIBEVENT_H_ */</span><span class="preprocessor"></span></div>
+<div class="ttc" id="agroup__conn_mgt_group_html_gaa89c06e30e19ff361125bfc9114d89a8"><div class="ttname"><a href="group__conn_mgt_group.html#gaa89c06e30e19ff361125bfc9114d89a8">natsConnection_ProcessReadEvent</a></div><div class="ttdeci">NATS_EXTERN void natsConnection_ProcessReadEvent(natsConnection *nc)</div><div class="ttdoc">Process a read event when using external event loop.</div></div>
+<div class="ttc" id="agroup__conn_mgt_group_html_gad81b603b84c0180aefc6d5ebad7f2a47"><div class="ttname"><a href="group__conn_mgt_group.html#gad81b603b84c0180aefc6d5ebad7f2a47">natsConnection_ProcessWriteEvent</a></div><div class="ttdeci">NATS_EXTERN void natsConnection_ProcessWriteEvent(natsConnection *nc)</div><div class="ttdoc">Process a write event when using external event loop.</div></div>
+<div class="ttc" id="agroup__libevent_functions_html_ga195d269473332931fd0fede0bac3309e"><div class="ttname"><a href="group__libevent_functions.html#ga195d269473332931fd0fede0bac3309e">natsLibevent_Init</a></div><div class="ttdeci">void natsLibevent_Init(void)</div><div class="ttdoc">Initialize the adapter.</div><div class="ttdef"><b>Definition:</b> libevent.h:58</div></div>
+<div class="ttc" id="agroup__libevent_functions_html_ga30c00f21a5251ee9fde09c1f2b429cd2"><div class="ttname"><a href="group__libevent_functions.html#ga30c00f21a5251ee9fde09c1f2b429cd2">natsLibevent_Attach</a></div><div class="ttdeci">natsStatus natsLibevent_Attach(void **userData, void *loop, natsConnection *nc, natsSock socket)</div><div class="ttdoc">Attach a connection to the given event loop.</div><div class="ttdef"><b>Definition:</b> libevent.h:98</div></div>
+<div class="ttc" id="agroup__libevent_functions_html_ga7ac99f326a59e5663ff66f5023c87091"><div class="ttname"><a href="group__libevent_functions.html#ga7ac99f326a59e5663ff66f5023c87091">natsLibevent_Write</a></div><div class="ttdeci">natsStatus natsLibevent_Write(void *userData, bool add)</div><div class="ttdoc">Start or stop polling on WRITE events.</div><div class="ttdef"><b>Definition:</b> libevent.h:192</div></div>
+<div class="ttc" id="agroup__libevent_functions_html_ga8a14ce23b4f6ba3bf63369961f9a5552"><div class="ttname"><a href="group__libevent_functions.html#ga8a14ce23b4f6ba3bf63369961f9a5552">natsLibevent_Read</a></div><div class="ttdeci">natsStatus natsLibevent_Read(void *userData, bool add)</div><div class="ttdoc">Start or stop polling on READ events.</div><div class="ttdef"><b>Definition:</b> libevent.h:170</div></div>
+<div class="ttc" id="agroup__libevent_functions_html_gaac76f5937329a8650f69c6bd8af36cd5"><div class="ttname"><a href="group__libevent_functions.html#gaac76f5937329a8650f69c6bd8af36cd5">natsLibevent_Detach</a></div><div class="ttdeci">natsStatus natsLibevent_Detach(void *userData)</div><div class="ttdoc">The connection is closed, it can be safely detached.</div><div class="ttdef"><b>Definition:</b> libevent.h:214</div></div>
+<div class="ttc" id="agroup__types_group_html_gaf88dca0a18efb5c5e994d265a9f04aec"><div class="ttname"><a href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a></div><div class="ttdeci">struct __natsConnection natsConnection</div><div class="ttdoc">A connection to a NATS Server.</div><div class="ttdef"><b>Definition:</b> nats.h:152</div></div>
+<div class="ttc" id="anats_8h_html_af798865ac824e5959987de0fe8d07383"><div class="ttname"><a href="nats_8h.html#af798865ac824e5959987de0fe8d07383">natsSock</a></div><div class="ttdeci">int natsSock</div><div class="ttdef"><b>Definition:</b> nats.h:50</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div><div class="ttdeci">natsStatus</div><div class="ttdoc">Status returned by most of the APIs.</div><div class="ttdef"><b>Definition:</b> status.h:50</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80a40a08ae6ae17deaf390b1d0d7550791c"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a40a08ae6ae17deaf390b1d0d7550791c">NATS_ERR</a></div><div class="ttdeci">@ NATS_ERR</div><div class="ttdoc">Generic error.</div><div class="ttdef"><b>Definition:</b> status.h:53</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80a62ff6f5cc64399631defc0119731b514"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a62ff6f5cc64399631defc0119731b514">NATS_NO_MEMORY</a></div><div class="ttdeci">@ NATS_NO_MEMORY</div><div class="ttdef"><b>Definition:</b> status.h:102</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">NATS_OK</a></div><div class="ttdeci">@ NATS_OK</div><div class="ttdoc">Success.</div><div class="ttdef"><b>Definition:</b> status.h:51</div></div>
+</div><!-- fragment --></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_085924db4bed469054a9264cf96b0d5e.html">adapters</a></li><li class="navelem"><a class="el" href="libevent_8h.html">libevent.h</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/libuv_8h.html b/doc/html/libuv_8h.html
new file mode 100644 (file)
index 0000000..edd0bb3
--- /dev/null
@@ -0,0 +1,136 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: libuv.h File Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('libuv_8h.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle"><div class="title">libuv.h File Reference</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><a href="libuv_8h_source.html">Go to the source code of this file.</a></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:ga5d4b677cbe1cd132c37bc56dbfc6949e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__libuv_functions.html#ga5d4b677cbe1cd132c37bc56dbfc6949e">natsLibuv_Init</a> (void)</td></tr>
+<tr class="memdesc:ga5d4b677cbe1cd132c37bc56dbfc6949e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the adapter.  <a href="group__libuv_functions.html#ga5d4b677cbe1cd132c37bc56dbfc6949e">More...</a><br /></td></tr>
+<tr class="separator:ga5d4b677cbe1cd132c37bc56dbfc6949e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga1baf4a20b138dcf00807a8b830f4e02d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__libuv_functions.html#ga1baf4a20b138dcf00807a8b830f4e02d">natsLibuv_SetThreadLocalLoop</a> (uv_loop_t *loop)</td></tr>
+<tr class="memdesc:ga1baf4a20b138dcf00807a8b830f4e02d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Register the event loop with the thread running <code>uv_run()</code>.  <a href="group__libuv_functions.html#ga1baf4a20b138dcf00807a8b830f4e02d">More...</a><br /></td></tr>
+<tr class="separator:ga1baf4a20b138dcf00807a8b830f4e02d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga86ac71cffe752effd7397740d80c3c42"><td class="memItemLeft" align="right" valign="top"><a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__libuv_functions.html#ga86ac71cffe752effd7397740d80c3c42">natsLibuv_Attach</a> (void **userData, void *loop, <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <a class="el" href="nats_8h.html#af798865ac824e5959987de0fe8d07383">natsSock</a> socket)</td></tr>
+<tr class="memdesc:ga86ac71cffe752effd7397740d80c3c42"><td class="mdescLeft">&#160;</td><td class="mdescRight">Attach a connection to the given event loop.  <a href="group__libuv_functions.html#ga86ac71cffe752effd7397740d80c3c42">More...</a><br /></td></tr>
+<tr class="separator:ga86ac71cffe752effd7397740d80c3c42"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga85c722b2d2699a954362b20528f0aaac"><td class="memItemLeft" align="right" valign="top"><a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__libuv_functions.html#ga85c722b2d2699a954362b20528f0aaac">natsLibuv_Read</a> (void *userData, bool add)</td></tr>
+<tr class="memdesc:ga85c722b2d2699a954362b20528f0aaac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start or stop polling on READ events.  <a href="group__libuv_functions.html#ga85c722b2d2699a954362b20528f0aaac">More...</a><br /></td></tr>
+<tr class="separator:ga85c722b2d2699a954362b20528f0aaac"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gafaa633c9067f485f330b72644277b07d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__libuv_functions.html#gafaa633c9067f485f330b72644277b07d">natsLibuv_Write</a> (void *userData, bool add)</td></tr>
+<tr class="memdesc:gafaa633c9067f485f330b72644277b07d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start or stop polling on WRITE events.  <a href="group__libuv_functions.html#gafaa633c9067f485f330b72644277b07d">More...</a><br /></td></tr>
+<tr class="separator:gafaa633c9067f485f330b72644277b07d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga8df663525fb59b882a0f3bd563083dc7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__libuv_functions.html#ga8df663525fb59b882a0f3bd563083dc7">natsLibuv_Detach</a> (void *userData)</td></tr>
+<tr class="memdesc:ga8df663525fb59b882a0f3bd563083dc7"><td class="mdescLeft">&#160;</td><td class="mdescRight">The connection is closed, it can be safely detached.  <a href="group__libuv_functions.html#ga8df663525fb59b882a0f3bd563083dc7">More...</a><br /></td></tr>
+<tr class="separator:ga8df663525fb59b882a0f3bd563083dc7"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_085924db4bed469054a9264cf96b0d5e.html">adapters</a></li><li class="navelem"><a class="el" href="libuv_8h.html">libuv.h</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/libuv_8h.js b/doc/html/libuv_8h.js
new file mode 100644 (file)
index 0000000..06d6b7b
--- /dev/null
@@ -0,0 +1,9 @@
+var libuv_8h =
+[
+    [ "natsLibuv_Init", "group__libuv_functions.html#ga5d4b677cbe1cd132c37bc56dbfc6949e", null ],
+    [ "natsLibuv_SetThreadLocalLoop", "group__libuv_functions.html#ga1baf4a20b138dcf00807a8b830f4e02d", null ],
+    [ "natsLibuv_Attach", "group__libuv_functions.html#ga86ac71cffe752effd7397740d80c3c42", null ],
+    [ "natsLibuv_Read", "group__libuv_functions.html#ga85c722b2d2699a954362b20528f0aaac", null ],
+    [ "natsLibuv_Write", "group__libuv_functions.html#gafaa633c9067f485f330b72644277b07d", null ],
+    [ "natsLibuv_Detach", "group__libuv_functions.html#ga8df663525fb59b882a0f3bd563083dc7", null ]
+];
\ No newline at end of file
diff --git a/doc/html/libuv_8h_source.html b/doc/html/libuv_8h_source.html
new file mode 100644 (file)
index 0000000..d5820ed
--- /dev/null
@@ -0,0 +1,564 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: libuv.h Source File</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('libuv_8h_source.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">libuv.h</div></div>
+</div><!--header-->
+<div class="contents">
+<a href="libuv_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">// Copyright 2016-2018 The NATS Authors</span></div>
+<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment">// Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div>
+<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment">// you may not use this file except in compliance with the License.</span></div>
+<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="comment">// You may obtain a copy of the License at</span></div>
+<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="comment">//</span></div>
+<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span><span class="comment">// http://www.apache.org/licenses/LICENSE-2.0</span></div>
+<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="comment">//</span></div>
+<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="comment">// Unless required by applicable law or agreed to in writing, software</span></div>
+<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="comment">// distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
+<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
+<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="comment">// See the License for the specific language governing permissions and</span></div>
+<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="comment">// limitations under the License.</span></div>
+<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span> </div>
+<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span><span class="preprocessor">#ifndef LIBUV_H_</span></div>
+<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span><span class="preprocessor">#define LIBUV_H_</span></div>
+<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span> </div>
+<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span><span class="preprocessor">#ifdef __cplusplus</span></div>
+<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
+<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span><span class="preprocessor">#endif</span></div>
+<div class="line"><a id="l00020" name="l00020"></a><span class="lineno">   20</span> </div>
+<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span><span class="preprocessor">#ifndef _GNU_SOURCE</span></div>
+<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span><span class="preprocessor">#define _GNU_SOURCE</span></div>
+<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span><span class="preprocessor">#endif</span></div>
+<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span> </div>
+<div class="line"><a id="l00028" name="l00028"></a><span class="lineno">   28</span><span class="preprocessor">#define NATS_LIBUV_INCLUDE</span></div>
+<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span> </div>
+<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span><span class="preprocessor">#include &lt;uv.h&gt;</span></div>
+<div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span><span class="preprocessor">#include &quot;../nats.h&quot;</span></div>
+<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span> </div>
+<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span><span class="preprocessor">#define NATS_LIBUV_ATTACH   (1)</span></div>
+<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span><span class="preprocessor">#define NATS_LIBUV_READ     (2)</span></div>
+<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span><span class="preprocessor">#define NATS_LIBUV_WRITE    (3)</span></div>
+<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span><span class="preprocessor">#define NATS_LIBUV_DETACH   (4)</span></div>
+<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span> </div>
+<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span><span class="keyword">struct </span>__natsLibuvEvent;</div>
+<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span> </div>
+<div class="line"><a id="l00040" name="l00040"></a><span class="lineno">   40</span><span class="keyword">typedef</span> <span class="keyword">struct </span>__natsLibuvEvent</div>
+<div class="line"><a id="l00041" name="l00041"></a><span class="lineno">   41</span>{</div>
+<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span>    <span class="keywordtype">int</span>                     type;</div>
+<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span>    <span class="keywordtype">bool</span>                    add;</div>
+<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span>    <span class="keyword">struct </span>__natsLibuvEvent *next;</div>
+<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span> </div>
+<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span>} natsLibuvEvent;</div>
+<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span> </div>
+<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span><span class="keyword">typedef</span> <span class="keyword">struct</span></div>
+<div class="line"><a id="l00049" name="l00049"></a><span class="lineno">   49</span>{</div>
+<div class="line"><a id="l00050" name="l00050"></a><span class="lineno">   50</span>    <a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a>  *nc;</div>
+<div class="line"><a id="l00051" name="l00051"></a><span class="lineno">   51</span>    uv_loop_t       *loop;</div>
+<div class="line"><a id="l00052" name="l00052"></a><span class="lineno">   52</span>    uv_poll_t       *handle;</div>
+<div class="line"><a id="l00053" name="l00053"></a><span class="lineno">   53</span>    uv_async_t      *scheduler;</div>
+<div class="line"><a id="l00054" name="l00054"></a><span class="lineno">   54</span>    <span class="keywordtype">int</span>             events;</div>
+<div class="line"><a id="l00055" name="l00055"></a><span class="lineno">   55</span>    <a class="code hl_typedef" href="nats_8h.html#af798865ac824e5959987de0fe8d07383">natsSock</a>        socket;</div>
+<div class="line"><a id="l00056" name="l00056"></a><span class="lineno">   56</span>    uv_mutex_t      *lock;</div>
+<div class="line"><a id="l00057" name="l00057"></a><span class="lineno">   57</span>    natsLibuvEvent  *head;</div>
+<div class="line"><a id="l00058" name="l00058"></a><span class="lineno">   58</span>    natsLibuvEvent  *tail;</div>
+<div class="line"><a id="l00059" name="l00059"></a><span class="lineno">   59</span> </div>
+<div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span>} natsLibuvEvents;</div>
+<div class="line"><a id="l00061" name="l00061"></a><span class="lineno">   61</span> </div>
+<div class="line"><a id="l00062" name="l00062"></a><span class="lineno">   62</span><span class="comment">// Forward declarations</span></div>
+<div class="line"><a id="l00063" name="l00063"></a><span class="lineno">   63</span><a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> <a class="code hl_function" href="group__libuv_functions.html#ga8df663525fb59b882a0f3bd563083dc7">natsLibuv_Detach</a>(<span class="keywordtype">void</span> *userData);</div>
+<div class="line"><a id="l00064" name="l00064"></a><span class="lineno">   64</span> </div>
+<div class="line"><a id="l00069" name="l00069"></a><span class="lineno">   69</span><span class="keyword">static</span> uv_once_t    uvOnce = UV_ONCE_INIT;</div>
+<div class="line"><a id="l00070" name="l00070"></a><span class="lineno">   70</span><span class="keyword">static</span> uv_key_t     uvLoopThreadKey;</div>
+<div class="line"><a id="l00071" name="l00071"></a><span class="lineno">   71</span> </div>
+<div class="line"><a id="l00072" name="l00072"></a><span class="lineno">   72</span><span class="keyword">static</span> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l00073" name="l00073"></a><span class="lineno">   73</span>_initOnce(<span class="keywordtype">void</span>)</div>
+<div class="line"><a id="l00074" name="l00074"></a><span class="lineno">   74</span>{</div>
+<div class="line"><a id="l00075" name="l00075"></a><span class="lineno">   75</span>    <span class="keywordflow">if</span> (uv_key_create(&amp;uvLoopThreadKey) != 0)</div>
+<div class="line"><a id="l00076" name="l00076"></a><span class="lineno">   76</span>        abort();</div>
+<div class="line"><a id="l00077" name="l00077"></a><span class="lineno">   77</span>}</div>
+<div class="line"><a id="l00078" name="l00078"></a><span class="lineno">   78</span> </div>
+<div class="line"><a id="l00089" name="l00089"></a><span class="lineno">   89</span><span class="keywordtype">void</span></div>
+<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"><a class="line" href="group__libuv_functions.html#ga5d4b677cbe1cd132c37bc56dbfc6949e">   90</a></span><a class="code hl_function" href="group__libuv_functions.html#ga5d4b677cbe1cd132c37bc56dbfc6949e">natsLibuv_Init</a>(<span class="keywordtype">void</span>)</div>
+<div class="line"><a id="l00091" name="l00091"></a><span class="lineno">   91</span>{</div>
+<div class="line"><a id="l00092" name="l00092"></a><span class="lineno">   92</span>    uv_once(&amp;uvOnce, _initOnce);</div>
+<div class="line"><a id="l00093" name="l00093"></a><span class="lineno">   93</span>}</div>
+<div class="line"><a id="l00094" name="l00094"></a><span class="lineno">   94</span> </div>
+<div class="line"><a id="l00103" name="l00103"></a><span class="lineno">  103</span><span class="keywordtype">void</span></div>
+<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"><a class="line" href="group__libuv_functions.html#ga1baf4a20b138dcf00807a8b830f4e02d">  104</a></span><a class="code hl_function" href="group__libuv_functions.html#ga1baf4a20b138dcf00807a8b830f4e02d">natsLibuv_SetThreadLocalLoop</a>(uv_loop_t *loop)</div>
+<div class="line"><a id="l00105" name="l00105"></a><span class="lineno">  105</span>{</div>
+<div class="line"><a id="l00106" name="l00106"></a><span class="lineno">  106</span>    uv_key_set(&amp;uvLoopThreadKey, (<span class="keywordtype">void</span>*) loop);</div>
+<div class="line"><a id="l00107" name="l00107"></a><span class="lineno">  107</span>}</div>
+<div class="line"><a id="l00108" name="l00108"></a><span class="lineno">  108</span> </div>
+<div class="line"><a id="l00109" name="l00109"></a><span class="lineno">  109</span><span class="keyword">static</span> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l00110" name="l00110"></a><span class="lineno">  110</span>uvScheduleToEventLoop(natsLibuvEvents *nle, <span class="keywordtype">int</span> eventType, <span class="keywordtype">bool</span> add)</div>
+<div class="line"><a id="l00111" name="l00111"></a><span class="lineno">  111</span>{</div>
+<div class="line"><a id="l00112" name="l00112"></a><span class="lineno">  112</span>    natsLibuvEvent  *newEvent = NULL;</div>
+<div class="line"><a id="l00113" name="l00113"></a><span class="lineno">  113</span>    <span class="keywordtype">int</span>             res;</div>
+<div class="line"><a id="l00114" name="l00114"></a><span class="lineno">  114</span> </div>
+<div class="line"><a id="l00115" name="l00115"></a><span class="lineno">  115</span>    newEvent = (natsLibuvEvent*) malloc(<span class="keyword">sizeof</span>(natsLibuvEvent));</div>
+<div class="line"><a id="l00116" name="l00116"></a><span class="lineno">  116</span>    <span class="keywordflow">if</span> (newEvent == NULL)</div>
+<div class="line"><a id="l00117" name="l00117"></a><span class="lineno">  117</span>        <span class="keywordflow">return</span> <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a62ff6f5cc64399631defc0119731b514">NATS_NO_MEMORY</a>;</div>
+<div class="line"><a id="l00118" name="l00118"></a><span class="lineno">  118</span> </div>
+<div class="line"><a id="l00119" name="l00119"></a><span class="lineno">  119</span>    newEvent-&gt;type  = eventType;</div>
+<div class="line"><a id="l00120" name="l00120"></a><span class="lineno">  120</span>    newEvent-&gt;add   = add;</div>
+<div class="line"><a id="l00121" name="l00121"></a><span class="lineno">  121</span>    newEvent-&gt;next  = NULL;</div>
+<div class="line"><a id="l00122" name="l00122"></a><span class="lineno">  122</span> </div>
+<div class="line"><a id="l00123" name="l00123"></a><span class="lineno">  123</span>    uv_mutex_lock(nle-&gt;lock);</div>
+<div class="line"><a id="l00124" name="l00124"></a><span class="lineno">  124</span> </div>
+<div class="line"><a id="l00125" name="l00125"></a><span class="lineno">  125</span>    <span class="keywordflow">if</span> (nle-&gt;head == NULL)</div>
+<div class="line"><a id="l00126" name="l00126"></a><span class="lineno">  126</span>        nle-&gt;head = newEvent;</div>
+<div class="line"><a id="l00127" name="l00127"></a><span class="lineno">  127</span> </div>
+<div class="line"><a id="l00128" name="l00128"></a><span class="lineno">  128</span>    <span class="keywordflow">if</span> (nle-&gt;tail != NULL)</div>
+<div class="line"><a id="l00129" name="l00129"></a><span class="lineno">  129</span>        nle-&gt;tail-&gt;next = newEvent;</div>
+<div class="line"><a id="l00130" name="l00130"></a><span class="lineno">  130</span> </div>
+<div class="line"><a id="l00131" name="l00131"></a><span class="lineno">  131</span>    nle-&gt;tail = newEvent;</div>
+<div class="line"><a id="l00132" name="l00132"></a><span class="lineno">  132</span> </div>
+<div class="line"><a id="l00133" name="l00133"></a><span class="lineno">  133</span>    uv_mutex_unlock(nle-&gt;lock);</div>
+<div class="line"><a id="l00134" name="l00134"></a><span class="lineno">  134</span> </div>
+<div class="line"><a id="l00135" name="l00135"></a><span class="lineno">  135</span>    res = uv_async_send(nle-&gt;scheduler);</div>
+<div class="line"><a id="l00136" name="l00136"></a><span class="lineno">  136</span> </div>
+<div class="line"><a id="l00137" name="l00137"></a><span class="lineno">  137</span>    <span class="keywordflow">return</span> (res == 0 ? <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">NATS_OK</a> : <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a40a08ae6ae17deaf390b1d0d7550791c">NATS_ERR</a>);</div>
+<div class="line"><a id="l00138" name="l00138"></a><span class="lineno">  138</span>}</div>
+<div class="line"><a id="l00139" name="l00139"></a><span class="lineno">  139</span> </div>
+<div class="line"><a id="l00140" name="l00140"></a><span class="lineno">  140</span><span class="keyword">static</span> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l00141" name="l00141"></a><span class="lineno">  141</span>natsLibuvPoll(uv_poll_t* handle, <span class="keywordtype">int</span> status, <span class="keywordtype">int</span> events)</div>
+<div class="line"><a id="l00142" name="l00142"></a><span class="lineno">  142</span>{</div>
+<div class="line"><a id="l00143" name="l00143"></a><span class="lineno">  143</span>    natsLibuvEvents *nle = (natsLibuvEvents*)handle-&gt;data;</div>
+<div class="line"><a id="l00144" name="l00144"></a><span class="lineno">  144</span> </div>
+<div class="line"><a id="l00145" name="l00145"></a><span class="lineno">  145</span>    if (status != 0)</div>
+<div class="line"><a id="l00146" name="l00146"></a><span class="lineno">  146</span>    {</div>
+<div class="line"><a id="l00147" name="l00147"></a><span class="lineno">  147</span>        <span class="comment">// There was an error, try to process as a read event.</span></div>
+<div class="line"><a id="l00148" name="l00148"></a><span class="lineno">  148</span>        <span class="comment">// If we had an issue with the socket, this will cause</span></div>
+<div class="line"><a id="l00149" name="l00149"></a><span class="lineno">  149</span>        <span class="comment">// an auto-reconnect.</span></div>
+<div class="line"><a id="l00150" name="l00150"></a><span class="lineno">  150</span>        <a class="code hl_function" href="group__conn_mgt_group.html#gaa89c06e30e19ff361125bfc9114d89a8">natsConnection_ProcessReadEvent</a>(nle-&gt;nc);</div>
+<div class="line"><a id="l00151" name="l00151"></a><span class="lineno">  151</span>        <span class="keywordflow">return</span>;</div>
+<div class="line"><a id="l00152" name="l00152"></a><span class="lineno">  152</span>    }</div>
+<div class="line"><a id="l00153" name="l00153"></a><span class="lineno">  153</span> </div>
+<div class="line"><a id="l00154" name="l00154"></a><span class="lineno">  154</span>    <span class="keywordflow">if</span> (events &amp; UV_READABLE)</div>
+<div class="line"><a id="l00155" name="l00155"></a><span class="lineno">  155</span>        <a class="code hl_function" href="group__conn_mgt_group.html#gaa89c06e30e19ff361125bfc9114d89a8">natsConnection_ProcessReadEvent</a>(nle-&gt;nc);</div>
+<div class="line"><a id="l00156" name="l00156"></a><span class="lineno">  156</span> </div>
+<div class="line"><a id="l00157" name="l00157"></a><span class="lineno">  157</span>    <span class="keywordflow">if</span> (events &amp; UV_WRITABLE)</div>
+<div class="line"><a id="l00158" name="l00158"></a><span class="lineno">  158</span>        <a class="code hl_function" href="group__conn_mgt_group.html#gad81b603b84c0180aefc6d5ebad7f2a47">natsConnection_ProcessWriteEvent</a>(nle-&gt;nc);</div>
+<div class="line"><a id="l00159" name="l00159"></a><span class="lineno">  159</span>}</div>
+<div class="line"><a id="l00160" name="l00160"></a><span class="lineno">  160</span> </div>
+<div class="line"><a id="l00161" name="l00161"></a><span class="lineno">  161</span><span class="keyword">static</span> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l00162" name="l00162"></a><span class="lineno">  162</span>uvPollUpdate(natsLibuvEvents *nle, <span class="keywordtype">int</span> eventType, <span class="keywordtype">bool</span> add)</div>
+<div class="line"><a id="l00163" name="l00163"></a><span class="lineno">  163</span>{</div>
+<div class="line"><a id="l00164" name="l00164"></a><span class="lineno">  164</span>    <span class="keywordtype">int</span> res;</div>
+<div class="line"><a id="l00165" name="l00165"></a><span class="lineno">  165</span> </div>
+<div class="line"><a id="l00166" name="l00166"></a><span class="lineno">  166</span>    <span class="keywordflow">if</span> (eventType == NATS_LIBUV_READ)</div>
+<div class="line"><a id="l00167" name="l00167"></a><span class="lineno">  167</span>    {</div>
+<div class="line"><a id="l00168" name="l00168"></a><span class="lineno">  168</span>        <span class="keywordflow">if</span> (add)</div>
+<div class="line"><a id="l00169" name="l00169"></a><span class="lineno">  169</span>            nle-&gt;events |= UV_READABLE;</div>
+<div class="line"><a id="l00170" name="l00170"></a><span class="lineno">  170</span>        <span class="keywordflow">else</span></div>
+<div class="line"><a id="l00171" name="l00171"></a><span class="lineno">  171</span>            nle-&gt;events &amp;= ~UV_READABLE;</div>
+<div class="line"><a id="l00172" name="l00172"></a><span class="lineno">  172</span>    }</div>
+<div class="line"><a id="l00173" name="l00173"></a><span class="lineno">  173</span>    <span class="keywordflow">else</span></div>
+<div class="line"><a id="l00174" name="l00174"></a><span class="lineno">  174</span>    {</div>
+<div class="line"><a id="l00175" name="l00175"></a><span class="lineno">  175</span>        <span class="keywordflow">if</span> (add)</div>
+<div class="line"><a id="l00176" name="l00176"></a><span class="lineno">  176</span>            nle-&gt;events |= UV_WRITABLE;</div>
+<div class="line"><a id="l00177" name="l00177"></a><span class="lineno">  177</span>        <span class="keywordflow">else</span></div>
+<div class="line"><a id="l00178" name="l00178"></a><span class="lineno">  178</span>            nle-&gt;events &amp;= ~UV_WRITABLE;</div>
+<div class="line"><a id="l00179" name="l00179"></a><span class="lineno">  179</span>    }</div>
+<div class="line"><a id="l00180" name="l00180"></a><span class="lineno">  180</span> </div>
+<div class="line"><a id="l00181" name="l00181"></a><span class="lineno">  181</span>    <span class="keywordflow">if</span> (nle-&gt;events)</div>
+<div class="line"><a id="l00182" name="l00182"></a><span class="lineno">  182</span>        res = uv_poll_start(nle-&gt;handle, nle-&gt;events, natsLibuvPoll);</div>
+<div class="line"><a id="l00183" name="l00183"></a><span class="lineno">  183</span>    <span class="keywordflow">else</span></div>
+<div class="line"><a id="l00184" name="l00184"></a><span class="lineno">  184</span>        res = uv_poll_stop(nle-&gt;handle);</div>
+<div class="line"><a id="l00185" name="l00185"></a><span class="lineno">  185</span> </div>
+<div class="line"><a id="l00186" name="l00186"></a><span class="lineno">  186</span>    <span class="keywordflow">if</span> (res != 0)</div>
+<div class="line"><a id="l00187" name="l00187"></a><span class="lineno">  187</span>        <span class="keywordflow">return</span> <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a40a08ae6ae17deaf390b1d0d7550791c">NATS_ERR</a>;</div>
+<div class="line"><a id="l00188" name="l00188"></a><span class="lineno">  188</span> </div>
+<div class="line"><a id="l00189" name="l00189"></a><span class="lineno">  189</span>    <span class="keywordflow">return</span> <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">NATS_OK</a>;</div>
+<div class="line"><a id="l00190" name="l00190"></a><span class="lineno">  190</span>}</div>
+<div class="line"><a id="l00191" name="l00191"></a><span class="lineno">  191</span> </div>
+<div class="line"><a id="l00192" name="l00192"></a><span class="lineno">  192</span><span class="keyword">static</span> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l00193" name="l00193"></a><span class="lineno">  193</span>uvHandleClosedCb(uv_handle_t *handle)</div>
+<div class="line"><a id="l00194" name="l00194"></a><span class="lineno">  194</span>{</div>
+<div class="line"><a id="l00195" name="l00195"></a><span class="lineno">  195</span>    free(handle);</div>
+<div class="line"><a id="l00196" name="l00196"></a><span class="lineno">  196</span>}</div>
+<div class="line"><a id="l00197" name="l00197"></a><span class="lineno">  197</span> </div>
+<div class="line"><a id="l00198" name="l00198"></a><span class="lineno">  198</span><span class="keyword">static</span> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l00199" name="l00199"></a><span class="lineno">  199</span>uvAsyncAttach(natsLibuvEvents *nle)</div>
+<div class="line"><a id="l00200" name="l00200"></a><span class="lineno">  200</span>{</div>
+<div class="line"><a id="l00201" name="l00201"></a><span class="lineno">  201</span>    <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>  s = <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">NATS_OK</a>;</div>
+<div class="line"><a id="l00202" name="l00202"></a><span class="lineno">  202</span> </div>
+<div class="line"><a id="l00203" name="l00203"></a><span class="lineno">  203</span>    <span class="comment">// We are reconnecting, destroy the old handle, create a new one</span></div>
+<div class="line"><a id="l00204" name="l00204"></a><span class="lineno">  204</span>    <span class="keywordflow">if</span> (nle-&gt;handle != NULL)</div>
+<div class="line"><a id="l00205" name="l00205"></a><span class="lineno">  205</span>    {</div>
+<div class="line"><a id="l00206" name="l00206"></a><span class="lineno">  206</span>        uv_close((uv_handle_t*) nle-&gt;handle, uvHandleClosedCb);</div>
+<div class="line"><a id="l00207" name="l00207"></a><span class="lineno">  207</span>        nle-&gt;handle = NULL;</div>
+<div class="line"><a id="l00208" name="l00208"></a><span class="lineno">  208</span>    }</div>
+<div class="line"><a id="l00209" name="l00209"></a><span class="lineno">  209</span> </div>
+<div class="line"><a id="l00210" name="l00210"></a><span class="lineno">  210</span>    nle-&gt;handle = (uv_poll_t*) malloc(<span class="keyword">sizeof</span>(uv_poll_t));</div>
+<div class="line"><a id="l00211" name="l00211"></a><span class="lineno">  211</span>    <span class="keywordflow">if</span> (nle-&gt;handle == NULL)</div>
+<div class="line"><a id="l00212" name="l00212"></a><span class="lineno">  212</span>        s = <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a62ff6f5cc64399631defc0119731b514">NATS_NO_MEMORY</a>;</div>
+<div class="line"><a id="l00213" name="l00213"></a><span class="lineno">  213</span> </div>
+<div class="line"><a id="l00214" name="l00214"></a><span class="lineno">  214</span>    <span class="keywordflow">if</span> (s == <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">NATS_OK</a>)</div>
+<div class="line"><a id="l00215" name="l00215"></a><span class="lineno">  215</span>    {</div>
+<div class="line"><a id="l00216" name="l00216"></a><span class="lineno">  216</span><span class="preprocessor">#if UV_VERSION_MAJOR &lt;= 1</span></div>
+<div class="line"><a id="l00217" name="l00217"></a><span class="lineno">  217</span>        <span class="keywordflow">if</span> (uv_poll_init_socket(nle-&gt;loop, nle-&gt;handle, nle-&gt;socket) != 0)</div>
+<div class="line"><a id="l00218" name="l00218"></a><span class="lineno">  218</span>#<span class="keywordflow">else</span></div>
+<div class="line"><a id="l00219" name="l00219"></a><span class="lineno">  219</span>        <span class="keywordflow">if</span> (uv_poll_init(nle-&gt;loop, nle-&gt;handle, nle-&gt;socket) != 0)</div>
+<div class="line"><a id="l00220" name="l00220"></a><span class="lineno">  220</span>#endif</div>
+<div class="line"><a id="l00221" name="l00221"></a><span class="lineno">  221</span>            s = <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a40a08ae6ae17deaf390b1d0d7550791c">NATS_ERR</a>;</div>
+<div class="line"><a id="l00222" name="l00222"></a><span class="lineno">  222</span>    }</div>
+<div class="line"><a id="l00223" name="l00223"></a><span class="lineno">  223</span> </div>
+<div class="line"><a id="l00224" name="l00224"></a><span class="lineno">  224</span>    <span class="keywordflow">if</span> ((s == <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">NATS_OK</a>)</div>
+<div class="line"><a id="l00225" name="l00225"></a><span class="lineno">  225</span>        &amp;&amp; (nle-&gt;handle-&gt;data = (<span class="keywordtype">void</span>*) nle)</div>
+<div class="line"><a id="l00226" name="l00226"></a><span class="lineno">  226</span>        &amp;&amp; (uv_poll_start(nle-&gt;handle, UV_READABLE, natsLibuvPoll) != 0))</div>
+<div class="line"><a id="l00227" name="l00227"></a><span class="lineno">  227</span>    {</div>
+<div class="line"><a id="l00228" name="l00228"></a><span class="lineno">  228</span>        s = <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a40a08ae6ae17deaf390b1d0d7550791c">NATS_ERR</a>;</div>
+<div class="line"><a id="l00229" name="l00229"></a><span class="lineno">  229</span>    }</div>
+<div class="line"><a id="l00230" name="l00230"></a><span class="lineno">  230</span> </div>
+<div class="line"><a id="l00231" name="l00231"></a><span class="lineno">  231</span>    <span class="keywordflow">return</span> s;</div>
+<div class="line"><a id="l00232" name="l00232"></a><span class="lineno">  232</span>}</div>
+<div class="line"><a id="l00233" name="l00233"></a><span class="lineno">  233</span> </div>
+<div class="line"><a id="l00234" name="l00234"></a><span class="lineno">  234</span><span class="keyword">static</span> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l00235" name="l00235"></a><span class="lineno">  235</span>finalCloseCb(uv_handle_t* handle)</div>
+<div class="line"><a id="l00236" name="l00236"></a><span class="lineno">  236</span>{</div>
+<div class="line"><a id="l00237" name="l00237"></a><span class="lineno">  237</span>    natsLibuvEvents *nle = (natsLibuvEvents*)handle-&gt;data;</div>
+<div class="line"><a id="l00238" name="l00238"></a><span class="lineno">  238</span>    natsLibuvEvent  *event;</div>
+<div class="line"><a id="l00239" name="l00239"></a><span class="lineno">  239</span> </div>
+<div class="line"><a id="l00240" name="l00240"></a><span class="lineno">  240</span>    while ((event = nle-&gt;head) != NULL)</div>
+<div class="line"><a id="l00241" name="l00241"></a><span class="lineno">  241</span>    {</div>
+<div class="line"><a id="l00242" name="l00242"></a><span class="lineno">  242</span>        nle-&gt;head = <span class="keyword">event</span>-&gt;next;</div>
+<div class="line"><a id="l00243" name="l00243"></a><span class="lineno">  243</span>        free(event);</div>
+<div class="line"><a id="l00244" name="l00244"></a><span class="lineno">  244</span>    }</div>
+<div class="line"><a id="l00245" name="l00245"></a><span class="lineno">  245</span>    free(nle-&gt;handle);</div>
+<div class="line"><a id="l00246" name="l00246"></a><span class="lineno">  246</span>    free(nle-&gt;scheduler);</div>
+<div class="line"><a id="l00247" name="l00247"></a><span class="lineno">  247</span>    uv_mutex_destroy(nle-&gt;lock);</div>
+<div class="line"><a id="l00248" name="l00248"></a><span class="lineno">  248</span>    free(nle-&gt;lock);</div>
+<div class="line"><a id="l00249" name="l00249"></a><span class="lineno">  249</span>    free(nle);</div>
+<div class="line"><a id="l00250" name="l00250"></a><span class="lineno">  250</span>}</div>
+<div class="line"><a id="l00251" name="l00251"></a><span class="lineno">  251</span> </div>
+<div class="line"><a id="l00252" name="l00252"></a><span class="lineno">  252</span><span class="keyword">static</span> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l00253" name="l00253"></a><span class="lineno">  253</span>closeSchedulerCb(uv_handle_t* scheduler)</div>
+<div class="line"><a id="l00254" name="l00254"></a><span class="lineno">  254</span>{</div>
+<div class="line"><a id="l00255" name="l00255"></a><span class="lineno">  255</span>    natsLibuvEvents *nle = (natsLibuvEvents*) scheduler-&gt;data;</div>
+<div class="line"><a id="l00256" name="l00256"></a><span class="lineno">  256</span> </div>
+<div class="line"><a id="l00257" name="l00257"></a><span class="lineno">  257</span>    uv_close((uv_handle_t*) nle-&gt;handle, finalCloseCb);</div>
+<div class="line"><a id="l00258" name="l00258"></a><span class="lineno">  258</span>}</div>
+<div class="line"><a id="l00259" name="l00259"></a><span class="lineno">  259</span> </div>
+<div class="line"><a id="l00260" name="l00260"></a><span class="lineno">  260</span><span class="keyword">static</span> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l00261" name="l00261"></a><span class="lineno">  261</span>uvAsyncDetach(natsLibuvEvents *nle)</div>
+<div class="line"><a id="l00262" name="l00262"></a><span class="lineno">  262</span>{</div>
+<div class="line"><a id="l00263" name="l00263"></a><span class="lineno">  263</span>    uv_close((uv_handle_t*) nle-&gt;scheduler, closeSchedulerCb);</div>
+<div class="line"><a id="l00264" name="l00264"></a><span class="lineno">  264</span>}</div>
+<div class="line"><a id="l00265" name="l00265"></a><span class="lineno">  265</span> </div>
+<div class="line"><a id="l00266" name="l00266"></a><span class="lineno">  266</span><span class="keyword">static</span> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l00267" name="l00267"></a><span class="lineno">  267</span>uvAsyncCb(uv_async_t *handle)</div>
+<div class="line"><a id="l00268" name="l00268"></a><span class="lineno">  268</span>{</div>
+<div class="line"><a id="l00269" name="l00269"></a><span class="lineno">  269</span>    natsLibuvEvents *nle    = (natsLibuvEvents*) handle-&gt;data;</div>
+<div class="line"><a id="l00270" name="l00270"></a><span class="lineno">  270</span>    <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>      s       = <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">NATS_OK</a>;</div>
+<div class="line"><a id="l00271" name="l00271"></a><span class="lineno">  271</span>    natsLibuvEvent  *event  = NULL;</div>
+<div class="line"><a id="l00272" name="l00272"></a><span class="lineno">  272</span>    <span class="keywordtype">bool</span>            more    = <span class="keyword">false</span>;</div>
+<div class="line"><a id="l00273" name="l00273"></a><span class="lineno">  273</span> </div>
+<div class="line"><a id="l00274" name="l00274"></a><span class="lineno">  274</span>    while (1)</div>
+<div class="line"><a id="l00275" name="l00275"></a><span class="lineno">  275</span>    {</div>
+<div class="line"><a id="l00276" name="l00276"></a><span class="lineno">  276</span>        uv_mutex_lock(nle-&gt;lock);</div>
+<div class="line"><a id="l00277" name="l00277"></a><span class="lineno">  277</span> </div>
+<div class="line"><a id="l00278" name="l00278"></a><span class="lineno">  278</span>        <span class="keyword">event</span> = nle-&gt;head;</div>
+<div class="line"><a id="l00279" name="l00279"></a><span class="lineno">  279</span>        <span class="keywordflow">if</span> (event == NULL)</div>
+<div class="line"><a id="l00280" name="l00280"></a><span class="lineno">  280</span>        {</div>
+<div class="line"><a id="l00281" name="l00281"></a><span class="lineno">  281</span>            <span class="comment">// This is possible, even on entry of this function because</span></div>
+<div class="line"><a id="l00282" name="l00282"></a><span class="lineno">  282</span>            <span class="comment">// the callback is called when the handle is initialized.</span></div>
+<div class="line"><a id="l00283" name="l00283"></a><span class="lineno">  283</span>            uv_mutex_unlock(nle-&gt;lock);</div>
+<div class="line"><a id="l00284" name="l00284"></a><span class="lineno">  284</span>            <span class="keywordflow">return</span>;</div>
+<div class="line"><a id="l00285" name="l00285"></a><span class="lineno">  285</span>        }</div>
+<div class="line"><a id="l00286" name="l00286"></a><span class="lineno">  286</span> </div>
+<div class="line"><a id="l00287" name="l00287"></a><span class="lineno">  287</span>        nle-&gt;head = <span class="keyword">event</span>-&gt;next;</div>
+<div class="line"><a id="l00288" name="l00288"></a><span class="lineno">  288</span>        <span class="keywordflow">if</span> (event == nle-&gt;tail)</div>
+<div class="line"><a id="l00289" name="l00289"></a><span class="lineno">  289</span>            nle-&gt;tail = NULL;</div>
+<div class="line"><a id="l00290" name="l00290"></a><span class="lineno">  290</span> </div>
+<div class="line"><a id="l00291" name="l00291"></a><span class="lineno">  291</span>        more = (nle-&gt;head != NULL ? true : <span class="keyword">false</span>);</div>
+<div class="line"><a id="l00292" name="l00292"></a><span class="lineno">  292</span> </div>
+<div class="line"><a id="l00293" name="l00293"></a><span class="lineno">  293</span>        uv_mutex_unlock(nle-&gt;lock);</div>
+<div class="line"><a id="l00294" name="l00294"></a><span class="lineno">  294</span> </div>
+<div class="line"><a id="l00295" name="l00295"></a><span class="lineno">  295</span>        <span class="keywordflow">switch</span> (event-&gt;type)</div>
+<div class="line"><a id="l00296" name="l00296"></a><span class="lineno">  296</span>        {</div>
+<div class="line"><a id="l00297" name="l00297"></a><span class="lineno">  297</span>            <span class="keywordflow">case</span> NATS_LIBUV_ATTACH:</div>
+<div class="line"><a id="l00298" name="l00298"></a><span class="lineno">  298</span>            {</div>
+<div class="line"><a id="l00299" name="l00299"></a><span class="lineno">  299</span>                s = uvAsyncAttach(nle);</div>
+<div class="line"><a id="l00300" name="l00300"></a><span class="lineno">  300</span>                <span class="keywordflow">break</span>;</div>
+<div class="line"><a id="l00301" name="l00301"></a><span class="lineno">  301</span>            }</div>
+<div class="line"><a id="l00302" name="l00302"></a><span class="lineno">  302</span>            <span class="keywordflow">case</span> NATS_LIBUV_READ:</div>
+<div class="line"><a id="l00303" name="l00303"></a><span class="lineno">  303</span>            <span class="keywordflow">case</span> NATS_LIBUV_WRITE:</div>
+<div class="line"><a id="l00304" name="l00304"></a><span class="lineno">  304</span>            {</div>
+<div class="line"><a id="l00305" name="l00305"></a><span class="lineno">  305</span>                s = uvPollUpdate(nle, event-&gt;type, event-&gt;add);</div>
+<div class="line"><a id="l00306" name="l00306"></a><span class="lineno">  306</span>                <span class="keywordflow">break</span>;</div>
+<div class="line"><a id="l00307" name="l00307"></a><span class="lineno">  307</span>            }</div>
+<div class="line"><a id="l00308" name="l00308"></a><span class="lineno">  308</span>            <span class="keywordflow">case</span> NATS_LIBUV_DETACH:</div>
+<div class="line"><a id="l00309" name="l00309"></a><span class="lineno">  309</span>            {</div>
+<div class="line"><a id="l00310" name="l00310"></a><span class="lineno">  310</span>                uvAsyncDetach(nle);</div>
+<div class="line"><a id="l00311" name="l00311"></a><span class="lineno">  311</span>                <span class="keywordflow">break</span>;</div>
+<div class="line"><a id="l00312" name="l00312"></a><span class="lineno">  312</span>            }</div>
+<div class="line"><a id="l00313" name="l00313"></a><span class="lineno">  313</span>            <span class="keywordflow">default</span>:</div>
+<div class="line"><a id="l00314" name="l00314"></a><span class="lineno">  314</span>            {</div>
+<div class="line"><a id="l00315" name="l00315"></a><span class="lineno">  315</span>                s = <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a40a08ae6ae17deaf390b1d0d7550791c">NATS_ERR</a>;</div>
+<div class="line"><a id="l00316" name="l00316"></a><span class="lineno">  316</span>                <span class="keywordflow">break</span>;</div>
+<div class="line"><a id="l00317" name="l00317"></a><span class="lineno">  317</span>            }</div>
+<div class="line"><a id="l00318" name="l00318"></a><span class="lineno">  318</span>        }</div>
+<div class="line"><a id="l00319" name="l00319"></a><span class="lineno">  319</span> </div>
+<div class="line"><a id="l00320" name="l00320"></a><span class="lineno">  320</span>        free(event);</div>
+<div class="line"><a id="l00321" name="l00321"></a><span class="lineno">  321</span> </div>
+<div class="line"><a id="l00322" name="l00322"></a><span class="lineno">  322</span>        <span class="keywordflow">if</span> ((s != <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">NATS_OK</a>) || !more)</div>
+<div class="line"><a id="l00323" name="l00323"></a><span class="lineno">  323</span>            <span class="keywordflow">break</span>;</div>
+<div class="line"><a id="l00324" name="l00324"></a><span class="lineno">  324</span>    }</div>
+<div class="line"><a id="l00325" name="l00325"></a><span class="lineno">  325</span> </div>
+<div class="line"><a id="l00326" name="l00326"></a><span class="lineno">  326</span>    <span class="keywordflow">if</span> (s != <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">NATS_OK</a>)</div>
+<div class="line"><a id="l00327" name="l00327"></a><span class="lineno">  327</span>        <a class="code hl_function" href="group__conn_mgt_group.html#ga19e204d27a232e2d4334301fc002b2ed">natsConnection_Close</a>(nle-&gt;nc);</div>
+<div class="line"><a id="l00328" name="l00328"></a><span class="lineno">  328</span>}</div>
+<div class="line"><a id="l00329" name="l00329"></a><span class="lineno">  329</span> </div>
+<div class="line"><a id="l00342" name="l00342"></a><span class="lineno">  342</span><a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l00343" name="l00343"></a><span class="lineno"><a class="line" href="group__libuv_functions.html#ga86ac71cffe752effd7397740d80c3c42">  343</a></span><a class="code hl_function" href="group__libuv_functions.html#ga86ac71cffe752effd7397740d80c3c42">natsLibuv_Attach</a>(<span class="keywordtype">void</span> **userData, <span class="keywordtype">void</span> *loop, <a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <a class="code hl_typedef" href="nats_8h.html#af798865ac824e5959987de0fe8d07383">natsSock</a> socket)</div>
+<div class="line"><a id="l00344" name="l00344"></a><span class="lineno">  344</span>{</div>
+<div class="line"><a id="l00345" name="l00345"></a><span class="lineno">  345</span>    uv_loop_t       *uvLoop = (uv_loop_t*) loop;</div>
+<div class="line"><a id="l00346" name="l00346"></a><span class="lineno">  346</span>    <span class="keywordtype">bool</span>            sched   = <span class="keyword">false</span>;</div>
+<div class="line"><a id="l00347" name="l00347"></a><span class="lineno">  347</span>    natsLibuvEvents *nle    = (natsLibuvEvents*) (*userData);</div>
+<div class="line"><a id="l00348" name="l00348"></a><span class="lineno">  348</span>    <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>      s       = <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">NATS_OK</a>;</div>
+<div class="line"><a id="l00349" name="l00349"></a><span class="lineno">  349</span> </div>
+<div class="line"><a id="l00350" name="l00350"></a><span class="lineno">  350</span>    sched = ((uv_key_get(&amp;uvLoopThreadKey) != loop) ? <span class="keyword">true</span> : <span class="keyword">false</span>);</div>
+<div class="line"><a id="l00351" name="l00351"></a><span class="lineno">  351</span> </div>
+<div class="line"><a id="l00352" name="l00352"></a><span class="lineno">  352</span>    <span class="comment">// This is the first attach (when reconnecting, nle will be non-NULL).</span></div>
+<div class="line"><a id="l00353" name="l00353"></a><span class="lineno">  353</span>    <span class="keywordflow">if</span> (nle == NULL)</div>
+<div class="line"><a id="l00354" name="l00354"></a><span class="lineno">  354</span>    {</div>
+<div class="line"><a id="l00355" name="l00355"></a><span class="lineno">  355</span>        <span class="comment">// This has to run from the event loop!</span></div>
+<div class="line"><a id="l00356" name="l00356"></a><span class="lineno">  356</span>        <span class="keywordflow">if</span> (sched)</div>
+<div class="line"><a id="l00357" name="l00357"></a><span class="lineno">  357</span>            <span class="keywordflow">return</span> <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9bb78b4f245d2870040d25c450febd4b">NATS_ILLEGAL_STATE</a>;</div>
+<div class="line"><a id="l00358" name="l00358"></a><span class="lineno">  358</span> </div>
+<div class="line"><a id="l00359" name="l00359"></a><span class="lineno">  359</span>        nle = (natsLibuvEvents*) calloc(1, <span class="keyword">sizeof</span>(natsLibuvEvents));</div>
+<div class="line"><a id="l00360" name="l00360"></a><span class="lineno">  360</span>        <span class="keywordflow">if</span> (nle == NULL)</div>
+<div class="line"><a id="l00361" name="l00361"></a><span class="lineno">  361</span>            <span class="keywordflow">return</span> <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a62ff6f5cc64399631defc0119731b514">NATS_NO_MEMORY</a>;</div>
+<div class="line"><a id="l00362" name="l00362"></a><span class="lineno">  362</span> </div>
+<div class="line"><a id="l00363" name="l00363"></a><span class="lineno">  363</span>        nle-&gt;lock = (uv_mutex_t*) malloc(<span class="keyword">sizeof</span>(uv_mutex_t));</div>
+<div class="line"><a id="l00364" name="l00364"></a><span class="lineno">  364</span>        <span class="keywordflow">if</span> (nle-&gt;lock == NULL)</div>
+<div class="line"><a id="l00365" name="l00365"></a><span class="lineno">  365</span>            s = <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a62ff6f5cc64399631defc0119731b514">NATS_NO_MEMORY</a>;</div>
+<div class="line"><a id="l00366" name="l00366"></a><span class="lineno">  366</span> </div>
+<div class="line"><a id="l00367" name="l00367"></a><span class="lineno">  367</span>        <span class="keywordflow">if</span> ((s == <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">NATS_OK</a>) &amp;&amp; (uv_mutex_init(nle-&gt;lock) != 0))</div>
+<div class="line"><a id="l00368" name="l00368"></a><span class="lineno">  368</span>            s = <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a40a08ae6ae17deaf390b1d0d7550791c">NATS_ERR</a>;</div>
+<div class="line"><a id="l00369" name="l00369"></a><span class="lineno">  369</span> </div>
+<div class="line"><a id="l00370" name="l00370"></a><span class="lineno">  370</span>        <span class="keywordflow">if</span> ((s == <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">NATS_OK</a>)</div>
+<div class="line"><a id="l00371" name="l00371"></a><span class="lineno">  371</span>            &amp;&amp; ((nle-&gt;scheduler = (uv_async_t*) malloc(<span class="keyword">sizeof</span>(uv_async_t))) == NULL))</div>
+<div class="line"><a id="l00372" name="l00372"></a><span class="lineno">  372</span>        {</div>
+<div class="line"><a id="l00373" name="l00373"></a><span class="lineno">  373</span>            s = <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a62ff6f5cc64399631defc0119731b514">NATS_NO_MEMORY</a>;</div>
+<div class="line"><a id="l00374" name="l00374"></a><span class="lineno">  374</span>        }</div>
+<div class="line"><a id="l00375" name="l00375"></a><span class="lineno">  375</span> </div>
+<div class="line"><a id="l00376" name="l00376"></a><span class="lineno">  376</span>        <span class="keywordflow">if</span> ((s == <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">NATS_OK</a>)</div>
+<div class="line"><a id="l00377" name="l00377"></a><span class="lineno">  377</span>            &amp;&amp; (uv_async_init(uvLoop, nle-&gt;scheduler, uvAsyncCb) != 0))</div>
+<div class="line"><a id="l00378" name="l00378"></a><span class="lineno">  378</span>        {</div>
+<div class="line"><a id="l00379" name="l00379"></a><span class="lineno">  379</span>            s = <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a40a08ae6ae17deaf390b1d0d7550791c">NATS_ERR</a>;</div>
+<div class="line"><a id="l00380" name="l00380"></a><span class="lineno">  380</span>        }</div>
+<div class="line"><a id="l00381" name="l00381"></a><span class="lineno">  381</span> </div>
+<div class="line"><a id="l00382" name="l00382"></a><span class="lineno">  382</span>        <span class="keywordflow">if</span> (s == <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">NATS_OK</a>)</div>
+<div class="line"><a id="l00383" name="l00383"></a><span class="lineno">  383</span>        {</div>
+<div class="line"><a id="l00384" name="l00384"></a><span class="lineno">  384</span>            nle-&gt;nc              = nc;</div>
+<div class="line"><a id="l00385" name="l00385"></a><span class="lineno">  385</span>            nle-&gt;loop            = uvLoop;</div>
+<div class="line"><a id="l00386" name="l00386"></a><span class="lineno">  386</span>            nle-&gt;scheduler-&gt;data = (<span class="keywordtype">void</span>*) nle;</div>
+<div class="line"><a id="l00387" name="l00387"></a><span class="lineno">  387</span>        }</div>
+<div class="line"><a id="l00388" name="l00388"></a><span class="lineno">  388</span>    }</div>
+<div class="line"><a id="l00389" name="l00389"></a><span class="lineno">  389</span> </div>
+<div class="line"><a id="l00390" name="l00390"></a><span class="lineno">  390</span>    <span class="keywordflow">if</span> (s == <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">NATS_OK</a>)</div>
+<div class="line"><a id="l00391" name="l00391"></a><span class="lineno">  391</span>    {</div>
+<div class="line"><a id="l00392" name="l00392"></a><span class="lineno">  392</span>        nle-&gt;socket = socket;</div>
+<div class="line"><a id="l00393" name="l00393"></a><span class="lineno">  393</span>        nle-&gt;events = UV_READABLE;</div>
+<div class="line"><a id="l00394" name="l00394"></a><span class="lineno">  394</span> </div>
+<div class="line"><a id="l00395" name="l00395"></a><span class="lineno">  395</span>        <span class="keywordflow">if</span> (sched)</div>
+<div class="line"><a id="l00396" name="l00396"></a><span class="lineno">  396</span>            s = uvScheduleToEventLoop(nle, NATS_LIBUV_ATTACH, <span class="keyword">true</span>);</div>
+<div class="line"><a id="l00397" name="l00397"></a><span class="lineno">  397</span>        <span class="keywordflow">else</span></div>
+<div class="line"><a id="l00398" name="l00398"></a><span class="lineno">  398</span>            s = uvAsyncAttach(nle);</div>
+<div class="line"><a id="l00399" name="l00399"></a><span class="lineno">  399</span>    }</div>
+<div class="line"><a id="l00400" name="l00400"></a><span class="lineno">  400</span> </div>
+<div class="line"><a id="l00401" name="l00401"></a><span class="lineno">  401</span>    <span class="keywordflow">if</span> (s == <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">NATS_OK</a>)</div>
+<div class="line"><a id="l00402" name="l00402"></a><span class="lineno">  402</span>        *userData = (<span class="keywordtype">void</span>*) nle;</div>
+<div class="line"><a id="l00403" name="l00403"></a><span class="lineno">  403</span>    <span class="keywordflow">else</span></div>
+<div class="line"><a id="l00404" name="l00404"></a><span class="lineno">  404</span>        <a class="code hl_function" href="group__libuv_functions.html#ga8df663525fb59b882a0f3bd563083dc7">natsLibuv_Detach</a>((<span class="keywordtype">void</span>*) nle);</div>
+<div class="line"><a id="l00405" name="l00405"></a><span class="lineno">  405</span> </div>
+<div class="line"><a id="l00406" name="l00406"></a><span class="lineno">  406</span>    <span class="keywordflow">return</span> s;</div>
+<div class="line"><a id="l00407" name="l00407"></a><span class="lineno">  407</span>}</div>
+<div class="line"><a id="l00408" name="l00408"></a><span class="lineno">  408</span> </div>
+<div class="line"><a id="l00417" name="l00417"></a><span class="lineno">  417</span><a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l00418" name="l00418"></a><span class="lineno"><a class="line" href="group__libuv_functions.html#ga85c722b2d2699a954362b20528f0aaac">  418</a></span><a class="code hl_function" href="group__libuv_functions.html#ga85c722b2d2699a954362b20528f0aaac">natsLibuv_Read</a>(<span class="keywordtype">void</span> *userData, <span class="keywordtype">bool</span> add)</div>
+<div class="line"><a id="l00419" name="l00419"></a><span class="lineno">  419</span>{</div>
+<div class="line"><a id="l00420" name="l00420"></a><span class="lineno">  420</span>    natsLibuvEvents *nle = (natsLibuvEvents*) userData;</div>
+<div class="line"><a id="l00421" name="l00421"></a><span class="lineno">  421</span>    <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>      s    = <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">NATS_OK</a>;</div>
+<div class="line"><a id="l00422" name="l00422"></a><span class="lineno">  422</span>    <span class="keywordtype">bool</span>            sched;</div>
+<div class="line"><a id="l00423" name="l00423"></a><span class="lineno">  423</span> </div>
+<div class="line"><a id="l00424" name="l00424"></a><span class="lineno">  424</span>    sched = ((uv_key_get(&amp;uvLoopThreadKey) != nle-&gt;loop) ? <span class="keyword">true</span> : <span class="keyword">false</span>);</div>
+<div class="line"><a id="l00425" name="l00425"></a><span class="lineno">  425</span> </div>
+<div class="line"><a id="l00426" name="l00426"></a><span class="lineno">  426</span>    <span class="comment">// If this call is made from a different thread than the event loop&#39;s</span></div>
+<div class="line"><a id="l00427" name="l00427"></a><span class="lineno">  427</span>    <span class="comment">// thread, or if there are already scheduled events, then schedule</span></div>
+<div class="line"><a id="l00428" name="l00428"></a><span class="lineno">  428</span>    <span class="comment">// this new event.</span></div>
+<div class="line"><a id="l00429" name="l00429"></a><span class="lineno">  429</span> </div>
+<div class="line"><a id="l00430" name="l00430"></a><span class="lineno">  430</span>    <span class="comment">// We don&#39;t need to get the lock for nle-&gt;head because if sched is</span></div>
+<div class="line"><a id="l00431" name="l00431"></a><span class="lineno">  431</span>    <span class="comment">// false, we are in the event loop thread, which is the thread removing</span></div>
+<div class="line"><a id="l00432" name="l00432"></a><span class="lineno">  432</span>    <span class="comment">// events from the list. Also, all calls to the read/write/etc.. callbacks</span></div>
+<div class="line"><a id="l00433" name="l00433"></a><span class="lineno">  433</span>    <span class="comment">// are protected by the connection&#39;s lock in the NATS library.</span></div>
+<div class="line"><a id="l00434" name="l00434"></a><span class="lineno">  434</span>    <span class="keywordflow">if</span> (sched || (nle-&gt;head != NULL))</div>
+<div class="line"><a id="l00435" name="l00435"></a><span class="lineno">  435</span>        s = uvScheduleToEventLoop(nle, NATS_LIBUV_READ, add);</div>
+<div class="line"><a id="l00436" name="l00436"></a><span class="lineno">  436</span>    <span class="keywordflow">else</span></div>
+<div class="line"><a id="l00437" name="l00437"></a><span class="lineno">  437</span>        s = uvPollUpdate(nle, NATS_LIBUV_READ, add);</div>
+<div class="line"><a id="l00438" name="l00438"></a><span class="lineno">  438</span> </div>
+<div class="line"><a id="l00439" name="l00439"></a><span class="lineno">  439</span>    <span class="keywordflow">return</span> s;</div>
+<div class="line"><a id="l00440" name="l00440"></a><span class="lineno">  440</span>}</div>
+<div class="line"><a id="l00441" name="l00441"></a><span class="lineno">  441</span> </div>
+<div class="line"><a id="l00450" name="l00450"></a><span class="lineno">  450</span><a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l00451" name="l00451"></a><span class="lineno"><a class="line" href="group__libuv_functions.html#gafaa633c9067f485f330b72644277b07d">  451</a></span><a class="code hl_function" href="group__libuv_functions.html#gafaa633c9067f485f330b72644277b07d">natsLibuv_Write</a>(<span class="keywordtype">void</span> *userData, <span class="keywordtype">bool</span> add)</div>
+<div class="line"><a id="l00452" name="l00452"></a><span class="lineno">  452</span>{</div>
+<div class="line"><a id="l00453" name="l00453"></a><span class="lineno">  453</span>    natsLibuvEvents *nle = (natsLibuvEvents*) userData;</div>
+<div class="line"><a id="l00454" name="l00454"></a><span class="lineno">  454</span>    <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>      s    = <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">NATS_OK</a>;</div>
+<div class="line"><a id="l00455" name="l00455"></a><span class="lineno">  455</span>    <span class="keywordtype">bool</span>            sched;</div>
+<div class="line"><a id="l00456" name="l00456"></a><span class="lineno">  456</span> </div>
+<div class="line"><a id="l00457" name="l00457"></a><span class="lineno">  457</span>    sched = ((uv_key_get(&amp;uvLoopThreadKey) != nle-&gt;loop) ? <span class="keyword">true</span> : <span class="keyword">false</span>);</div>
+<div class="line"><a id="l00458" name="l00458"></a><span class="lineno">  458</span> </div>
+<div class="line"><a id="l00459" name="l00459"></a><span class="lineno">  459</span>    <span class="comment">// See comment in natsLibuvRead</span></div>
+<div class="line"><a id="l00460" name="l00460"></a><span class="lineno">  460</span>    <span class="keywordflow">if</span> (sched || (nle-&gt;head != NULL))</div>
+<div class="line"><a id="l00461" name="l00461"></a><span class="lineno">  461</span>        s = uvScheduleToEventLoop(nle, NATS_LIBUV_WRITE, add);</div>
+<div class="line"><a id="l00462" name="l00462"></a><span class="lineno">  462</span>    <span class="keywordflow">else</span></div>
+<div class="line"><a id="l00463" name="l00463"></a><span class="lineno">  463</span>        s = uvPollUpdate(nle, NATS_LIBUV_WRITE, add);</div>
+<div class="line"><a id="l00464" name="l00464"></a><span class="lineno">  464</span> </div>
+<div class="line"><a id="l00465" name="l00465"></a><span class="lineno">  465</span>    <span class="keywordflow">return</span> s;</div>
+<div class="line"><a id="l00466" name="l00466"></a><span class="lineno">  466</span>}</div>
+<div class="line"><a id="l00467" name="l00467"></a><span class="lineno">  467</span> </div>
+<div class="line"><a id="l00476" name="l00476"></a><span class="lineno">  476</span><a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l00477" name="l00477"></a><span class="lineno"><a class="line" href="group__libuv_functions.html#ga8df663525fb59b882a0f3bd563083dc7">  477</a></span><a class="code hl_function" href="group__libuv_functions.html#ga8df663525fb59b882a0f3bd563083dc7">natsLibuv_Detach</a>(<span class="keywordtype">void</span> *userData)</div>
+<div class="line"><a id="l00478" name="l00478"></a><span class="lineno">  478</span>{</div>
+<div class="line"><a id="l00479" name="l00479"></a><span class="lineno">  479</span>    natsLibuvEvents *nle = (natsLibuvEvents*) userData;</div>
+<div class="line"><a id="l00480" name="l00480"></a><span class="lineno">  480</span>    <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>      s    = <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">NATS_OK</a>;</div>
+<div class="line"><a id="l00481" name="l00481"></a><span class="lineno">  481</span>    <span class="keywordtype">bool</span>            sched;</div>
+<div class="line"><a id="l00482" name="l00482"></a><span class="lineno">  482</span> </div>
+<div class="line"><a id="l00483" name="l00483"></a><span class="lineno">  483</span>    sched = ((uv_key_get(&amp;uvLoopThreadKey) != nle-&gt;loop) ? <span class="keyword">true</span> : <span class="keyword">false</span>);</div>
+<div class="line"><a id="l00484" name="l00484"></a><span class="lineno">  484</span> </div>
+<div class="line"><a id="l00485" name="l00485"></a><span class="lineno">  485</span>    <span class="comment">// See comment in natsLibuvRead</span></div>
+<div class="line"><a id="l00486" name="l00486"></a><span class="lineno">  486</span>    <span class="keywordflow">if</span> (sched || (nle-&gt;head != NULL))</div>
+<div class="line"><a id="l00487" name="l00487"></a><span class="lineno">  487</span>        s = uvScheduleToEventLoop(nle, NATS_LIBUV_DETACH, <span class="keyword">true</span>);</div>
+<div class="line"><a id="l00488" name="l00488"></a><span class="lineno">  488</span>    <span class="keywordflow">else</span></div>
+<div class="line"><a id="l00489" name="l00489"></a><span class="lineno">  489</span>        uvAsyncDetach(nle);</div>
+<div class="line"><a id="l00490" name="l00490"></a><span class="lineno">  490</span> </div>
+<div class="line"><a id="l00491" name="l00491"></a><span class="lineno">  491</span>    <span class="keywordflow">return</span> s;</div>
+<div class="line"><a id="l00492" name="l00492"></a><span class="lineno">  492</span>}</div>
+<div class="line"><a id="l00493" name="l00493"></a><span class="lineno">  493</span> <span class="comment">// end of libuvFunctions</span></div>
+<div class="line"><a id="l00495" name="l00495"></a><span class="lineno">  495</span> </div>
+<div class="line"><a id="l00496" name="l00496"></a><span class="lineno">  496</span><span class="preprocessor">#ifdef __cplusplus</span></div>
+<div class="line"><a id="l00497" name="l00497"></a><span class="lineno">  497</span>}</div>
+<div class="line"><a id="l00498" name="l00498"></a><span class="lineno">  498</span><span class="preprocessor">#endif</span></div>
+<div class="line"><a id="l00499" name="l00499"></a><span class="lineno">  499</span> </div>
+<div class="line"><a id="l00500" name="l00500"></a><span class="lineno">  500</span><span class="preprocessor">#endif </span><span class="comment">/* LIBUV_H_ */</span><span class="preprocessor"></span></div>
+<div class="ttc" id="agroup__conn_mgt_group_html_ga19e204d27a232e2d4334301fc002b2ed"><div class="ttname"><a href="group__conn_mgt_group.html#ga19e204d27a232e2d4334301fc002b2ed">natsConnection_Close</a></div><div class="ttdeci">NATS_EXTERN void natsConnection_Close(natsConnection *nc)</div><div class="ttdoc">Closes the connection.</div></div>
+<div class="ttc" id="agroup__conn_mgt_group_html_gaa89c06e30e19ff361125bfc9114d89a8"><div class="ttname"><a href="group__conn_mgt_group.html#gaa89c06e30e19ff361125bfc9114d89a8">natsConnection_ProcessReadEvent</a></div><div class="ttdeci">NATS_EXTERN void natsConnection_ProcessReadEvent(natsConnection *nc)</div><div class="ttdoc">Process a read event when using external event loop.</div></div>
+<div class="ttc" id="agroup__conn_mgt_group_html_gad81b603b84c0180aefc6d5ebad7f2a47"><div class="ttname"><a href="group__conn_mgt_group.html#gad81b603b84c0180aefc6d5ebad7f2a47">natsConnection_ProcessWriteEvent</a></div><div class="ttdeci">NATS_EXTERN void natsConnection_ProcessWriteEvent(natsConnection *nc)</div><div class="ttdoc">Process a write event when using external event loop.</div></div>
+<div class="ttc" id="agroup__libuv_functions_html_ga1baf4a20b138dcf00807a8b830f4e02d"><div class="ttname"><a href="group__libuv_functions.html#ga1baf4a20b138dcf00807a8b830f4e02d">natsLibuv_SetThreadLocalLoop</a></div><div class="ttdeci">void natsLibuv_SetThreadLocalLoop(uv_loop_t *loop)</div><div class="ttdoc">Register the event loop with the thread running uv_run().</div><div class="ttdef"><b>Definition:</b> libuv.h:104</div></div>
+<div class="ttc" id="agroup__libuv_functions_html_ga5d4b677cbe1cd132c37bc56dbfc6949e"><div class="ttname"><a href="group__libuv_functions.html#ga5d4b677cbe1cd132c37bc56dbfc6949e">natsLibuv_Init</a></div><div class="ttdeci">void natsLibuv_Init(void)</div><div class="ttdoc">Initialize the adapter.</div><div class="ttdef"><b>Definition:</b> libuv.h:90</div></div>
+<div class="ttc" id="agroup__libuv_functions_html_ga85c722b2d2699a954362b20528f0aaac"><div class="ttname"><a href="group__libuv_functions.html#ga85c722b2d2699a954362b20528f0aaac">natsLibuv_Read</a></div><div class="ttdeci">natsStatus natsLibuv_Read(void *userData, bool add)</div><div class="ttdoc">Start or stop polling on READ events.</div><div class="ttdef"><b>Definition:</b> libuv.h:418</div></div>
+<div class="ttc" id="agroup__libuv_functions_html_ga86ac71cffe752effd7397740d80c3c42"><div class="ttname"><a href="group__libuv_functions.html#ga86ac71cffe752effd7397740d80c3c42">natsLibuv_Attach</a></div><div class="ttdeci">natsStatus natsLibuv_Attach(void **userData, void *loop, natsConnection *nc, natsSock socket)</div><div class="ttdoc">Attach a connection to the given event loop.</div><div class="ttdef"><b>Definition:</b> libuv.h:343</div></div>
+<div class="ttc" id="agroup__libuv_functions_html_ga8df663525fb59b882a0f3bd563083dc7"><div class="ttname"><a href="group__libuv_functions.html#ga8df663525fb59b882a0f3bd563083dc7">natsLibuv_Detach</a></div><div class="ttdeci">natsStatus natsLibuv_Detach(void *userData)</div><div class="ttdoc">The connection is closed, it can be safely detached.</div><div class="ttdef"><b>Definition:</b> libuv.h:477</div></div>
+<div class="ttc" id="agroup__libuv_functions_html_gafaa633c9067f485f330b72644277b07d"><div class="ttname"><a href="group__libuv_functions.html#gafaa633c9067f485f330b72644277b07d">natsLibuv_Write</a></div><div class="ttdeci">natsStatus natsLibuv_Write(void *userData, bool add)</div><div class="ttdoc">Start or stop polling on WRITE events.</div><div class="ttdef"><b>Definition:</b> libuv.h:451</div></div>
+<div class="ttc" id="agroup__types_group_html_gaf88dca0a18efb5c5e994d265a9f04aec"><div class="ttname"><a href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a></div><div class="ttdeci">struct __natsConnection natsConnection</div><div class="ttdoc">A connection to a NATS Server.</div><div class="ttdef"><b>Definition:</b> nats.h:152</div></div>
+<div class="ttc" id="anats_8h_html_af798865ac824e5959987de0fe8d07383"><div class="ttname"><a href="nats_8h.html#af798865ac824e5959987de0fe8d07383">natsSock</a></div><div class="ttdeci">int natsSock</div><div class="ttdef"><b>Definition:</b> nats.h:50</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div><div class="ttdeci">natsStatus</div><div class="ttdoc">Status returned by most of the APIs.</div><div class="ttdef"><b>Definition:</b> status.h:50</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80a40a08ae6ae17deaf390b1d0d7550791c"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a40a08ae6ae17deaf390b1d0d7550791c">NATS_ERR</a></div><div class="ttdeci">@ NATS_ERR</div><div class="ttdoc">Generic error.</div><div class="ttdef"><b>Definition:</b> status.h:53</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80a62ff6f5cc64399631defc0119731b514"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a62ff6f5cc64399631defc0119731b514">NATS_NO_MEMORY</a></div><div class="ttdeci">@ NATS_NO_MEMORY</div><div class="ttdef"><b>Definition:</b> status.h:102</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80a9bb78b4f245d2870040d25c450febd4b"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9bb78b4f245d2870040d25c450febd4b">NATS_ILLEGAL_STATE</a></div><div class="ttdeci">@ NATS_ILLEGAL_STATE</div><div class="ttdef"><b>Definition:</b> status.h:88</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">NATS_OK</a></div><div class="ttdeci">@ NATS_OK</div><div class="ttdoc">Success.</div><div class="ttdef"><b>Definition:</b> status.h:51</div></div>
+</div><!-- fragment --></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_085924db4bed469054a9264cf96b0d5e.html">adapters</a></li><li class="navelem"><a class="el" href="libuv_8h.html">libuv.h</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/menu.js b/doc/html/menu.js
new file mode 100644 (file)
index 0000000..b0b2693
--- /dev/null
@@ -0,0 +1,136 @@
+/*
+ @licstart  The following is the entire license notice for the JavaScript code in this file.
+
+ The MIT License (MIT)
+
+ Copyright (C) 1997-2020 by Dimitri van Heesch
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+ and associated documentation files (the "Software"), to deal in the Software without restriction,
+ including without limitation the rights to use, copy, modify, merge, publish, distribute,
+ sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all copies or
+ substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+ BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ @licend  The above is the entire license notice for the JavaScript code in this file
+ */
+function initMenu(relPath,searchEnabled,serverSide,searchPage,search) {
+  function makeTree(data,relPath) {
+    var result='';
+    if ('children' in data) {
+      result+='<ul>';
+      for (var i in data.children) {
+        var url;
+        var link;
+        link = data.children[i].url;
+        if (link.substring(0,1)=='^') {
+          url = link.substring(1);
+        } else {
+          url = relPath+link;
+        }
+        result+='<li><a href="'+url+'">'+
+                                data.children[i].text+'</a>'+
+                                makeTree(data.children[i],relPath)+'</li>';
+      }
+      result+='</ul>';
+    }
+    return result;
+  }
+  var searchBoxHtml;
+  if (searchEnabled) {
+    if (serverSide) {
+      searchBoxHtml='<div id="MSearchBox" class="MSearchBoxInactive">'+
+                 '<div class="left">'+
+                  '<form id="FSearchBox" action="'+relPath+searchPage+
+                    '" method="get"><span id="MSearchSelectExt">&#160;</span>'+
+                  '<input type="text" id="MSearchField" name="query" value="" placeholder="'+search+
+                    '" size="20" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)"'+
+                    ' onblur="searchBox.OnSearchFieldFocus(false)"/>'+
+                  '</form>'+
+                 '</div>'+
+                 '<div class="right"></div>'+
+                '</div>';
+    } else {
+      searchBoxHtml='<div id="MSearchBox" class="MSearchBoxInactive">'+
+                 '<span class="left">'+
+                  '<span id="MSearchSelect" onmouseover="return searchBox.OnSearchSelectShow()"'+
+                     ' onmouseout="return searchBox.OnSearchSelectHide()">&#160;</span>'+
+                  '<input type="text" id="MSearchField" value="" placeholder="'+search+
+                    '" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" '+
+                    'onblur="searchBox.OnSearchFieldFocus(false)" '+
+                    'onkeyup="searchBox.OnSearchFieldChange(event)"/>'+
+                 '</span>'+
+                 '<span class="right"><a id="MSearchClose" '+
+                  'href="javascript:searchBox.CloseResultsWindow()">'+
+                  '<img id="MSearchCloseImg" border="0" src="'+relPath+
+                  'search/close.svg" alt=""/></a>'+
+                 '</span>'+
+                '</div>';
+    }
+  }
+
+  $('#main-nav').before('<div class="sm sm-dox"><input id="main-menu-state" type="checkbox"/>'+
+                        '<label class="main-menu-btn" for="main-menu-state">'+
+                        '<span class="main-menu-btn-icon"></span> '+
+                        'Toggle main menu visibility</label>'+
+                        '<span id="searchBoxPos1" style="position:absolute;right:8px;top:8px;height:36px;"></span>'+
+                        '</div>');
+  $('#main-nav').append(makeTree(menudata,relPath));
+  $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu');
+  if (searchBoxHtml) {
+    $('#main-menu').append('<li id="searchBoxPos2" style="float:right"></li>');
+  }
+  var $mainMenuState = $('#main-menu-state');
+  var prevWidth = 0;
+  if ($mainMenuState.length) {
+    function initResizableIfExists() {
+      if (typeof initResizable==='function') initResizable();
+    }
+    // animate mobile menu
+    $mainMenuState.change(function(e) {
+      var $menu = $('#main-menu');
+      var options = { duration: 250, step: initResizableIfExists };
+      if (this.checked) {
+        options['complete'] = function() { $menu.css('display', 'block') };
+        $menu.hide().slideDown(options);
+      } else {
+        options['complete'] = function() { $menu.css('display', 'none') };
+        $menu.show().slideUp(options);
+      }
+    });
+    // set default menu visibility
+    function resetState() {
+      var $menu = $('#main-menu');
+      var $mainMenuState = $('#main-menu-state');
+      var newWidth = $(window).outerWidth();
+      if (newWidth!=prevWidth) {
+        if ($(window).outerWidth()<768) {
+          $mainMenuState.prop('checked',false); $menu.hide();
+          $('#searchBoxPos1').html(searchBoxHtml);
+          $('#searchBoxPos2').hide();
+        } else {
+          $menu.show();
+          $('#searchBoxPos1').empty();
+          $('#searchBoxPos2').html(searchBoxHtml);
+          $('#searchBoxPos2').show();
+        }
+        if (typeof searchBox!=='undefined') {
+          searchBox.CloseResultsWindow();
+        }
+        prevWidth = newWidth;
+      }
+    }
+    $(window).ready(function() { resetState(); initResizableIfExists(); });
+    $(window).resize(resetState);
+  }
+  $('#main-menu').smartmenus();
+}
+/* @license-end */
diff --git a/doc/html/menudata.js b/doc/html/menudata.js
new file mode 100644 (file)
index 0000000..b848bf9
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+ @licstart  The following is the entire license notice for the JavaScript code in this file.
+
+ The MIT License (MIT)
+
+ Copyright (C) 1997-2020 by Dimitri van Heesch
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+ and associated documentation files (the "Software"), to deal in the Software without restriction,
+ including without limitation the rights to use, copy, modify, merge, publish, distribute,
+ sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all copies or
+ substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+ BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ @licend  The above is the entire license notice for the JavaScript code in this file
+*/
+var menudata={children:[
+{text:"Main Page",url:"index.html"},
+{text:"Related Pages",url:"pages.html"},
+{text:"Modules",url:"modules.html"},
+{text:"Classes",url:"annotated.html",children:[
+{text:"Class List",url:"annotated.html"},
+{text:"Class Index",url:"classes.html"},
+{text:"Class Members",url:"functions.html",children:[
+{text:"All",url:"functions.html",children:[
+{text:"a",url:"functions.html#index_a"},
+{text:"b",url:"functions_b.html#index_b"},
+{text:"c",url:"functions_c.html#index_c"},
+{text:"d",url:"functions_d.html#index_d"},
+{text:"e",url:"functions_e.html#index_e"},
+{text:"f",url:"functions_f.html#index_f"},
+{text:"h",url:"functions_h.html#index_h"},
+{text:"i",url:"functions_i.html#index_i"},
+{text:"k",url:"functions_k.html#index_k"},
+{text:"l",url:"functions_l.html#index_l"},
+{text:"m",url:"functions_m.html#index_m"},
+{text:"n",url:"functions_n.html#index_n"},
+{text:"o",url:"functions_o.html#index_o"},
+{text:"p",url:"functions_p.html#index_p"},
+{text:"q",url:"functions_q.html#index_q"},
+{text:"r",url:"functions_r.html#index_r"},
+{text:"s",url:"functions_s.html#index_s"},
+{text:"t",url:"functions_t.html#index_t"},
+{text:"w",url:"functions_w.html#index_w"}]},
+{text:"Variables",url:"functions_vars.html",children:[
+{text:"a",url:"functions_vars.html#index_a"},
+{text:"b",url:"functions_vars_b.html#index_b"},
+{text:"c",url:"functions_vars_c.html#index_c"},
+{text:"d",url:"functions_vars_d.html#index_d"},
+{text:"e",url:"functions_vars_e.html#index_e"},
+{text:"f",url:"functions_vars_f.html#index_f"},
+{text:"h",url:"functions_vars_h.html#index_h"},
+{text:"i",url:"functions_vars_i.html#index_i"},
+{text:"k",url:"functions_vars_k.html#index_k"},
+{text:"l",url:"functions_vars_l.html#index_l"},
+{text:"m",url:"functions_vars_m.html#index_m"},
+{text:"n",url:"functions_vars_n.html#index_n"},
+{text:"o",url:"functions_vars_o.html#index_o"},
+{text:"p",url:"functions_vars_p.html#index_p"},
+{text:"q",url:"functions_vars_q.html#index_q"},
+{text:"r",url:"functions_vars_r.html#index_r"},
+{text:"s",url:"functions_vars_s.html#index_s"},
+{text:"t",url:"functions_vars_t.html#index_t"},
+{text:"w",url:"functions_vars_w.html#index_w"}]}]}]},
+{text:"Files",url:"files.html",children:[
+{text:"File List",url:"files.html"},
+{text:"File Members",url:"globals.html",children:[
+{text:"All",url:"globals.html",children:[
+{text:"j",url:"globals.html#index_j"},
+{text:"k",url:"globals_k.html#index_k"},
+{text:"n",url:"globals_n.html#index_n"},
+{text:"s",url:"globals_s.html#index_s"}]},
+{text:"Functions",url:"globals_func.html",children:[
+{text:"j",url:"globals_func.html#index_j"},
+{text:"k",url:"globals_func_k.html#index_k"},
+{text:"n",url:"globals_func_n.html#index_n"},
+{text:"s",url:"globals_func_s.html#index_s"}]},
+{text:"Typedefs",url:"globals_type.html",children:[
+{text:"j",url:"globals_type.html#index_j"},
+{text:"k",url:"globals_type.html#index_k"},
+{text:"n",url:"globals_type.html#index_n"},
+{text:"s",url:"globals_type.html#index_s"}]},
+{text:"Enumerations",url:"globals_enum.html"},
+{text:"Enumerator",url:"globals_eval.html",children:[
+{text:"j",url:"globals_eval.html#index_j"},
+{text:"k",url:"globals_eval.html#index_k"},
+{text:"n",url:"globals_eval.html#index_n"}]},
+{text:"Macros",url:"globals_defs.html"}]}]}]}
diff --git a/doc/html/modules.html b/doc/html/modules.html
new file mode 100644 (file)
index 0000000..585fc0c
--- /dev/null
@@ -0,0 +1,149 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Modules</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('modules.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">Modules</div></div>
+</div><!--header-->
+<div class="contents">
+<div class="textblock">Here is a list of all modules:</div><div class="directory">
+<div class="levels">[detail level <span onclick="javascript:toggleLevel(1);">1</span><span onclick="javascript:toggleLevel(2);">2</span><span onclick="javascript:toggleLevel(3);">3</span>]</div><table class="directory">
+<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><a class="el" href="group__types_group.html" target="_self">Types</a></td><td class="desc"></td></tr>
+<tr id="row_1_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><a class="el" href="group__callbacks_group.html" target="_self">Callbacks</a></td><td class="desc"></td></tr>
+<tr id="row_2_" class="even"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_2_" class="arrow" onclick="toggleFolder('2_')">&#9660;</span><a class="el" href="group__func_group.html" target="_self">Functions</a></td><td class="desc"></td></tr>
+<tr id="row_2_0_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a class="el" href="group__library_group.html" target="_self">Library</a></td><td class="desc"></td></tr>
+<tr id="row_2_1_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a class="el" href="group__status_group.html" target="_self">Status</a></td><td class="desc"></td></tr>
+<tr id="row_2_2_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a class="el" href="group__stats_group.html" target="_self">Statistics</a></td><td class="desc"></td></tr>
+<tr id="row_2_3_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a class="el" href="group__opts_group.html" target="_self">Options</a></td><td class="desc"></td></tr>
+<tr id="row_2_4_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a class="el" href="group__stan_conn_opts_group.html" target="_self">Streaming Connection Options</a></td><td class="desc"></td></tr>
+<tr id="row_2_5_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a class="el" href="group__stan_sub_opts_group.html" target="_self">Streaming Subscription Options</a></td><td class="desc"></td></tr>
+<tr id="row_2_6_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a class="el" href="group__inbox_group.html" target="_self">Inboxes</a></td><td class="desc"></td></tr>
+<tr id="row_2_7_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a class="el" href="group__msg_group.html" target="_self">Message</a></td><td class="desc"></td></tr>
+<tr id="row_2_8_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a class="el" href="group__stan_msg_group.html" target="_self">Streaming Message</a></td><td class="desc"></td></tr>
+<tr id="row_2_9_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_2_9_" class="arrow" onclick="toggleFolder('2_9_')">&#9660;</span><a class="el" href="group__conn_group.html" target="_self">Connection</a></td><td class="desc"></td></tr>
+<tr id="row_2_9_0_" class="odd"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><a class="el" href="group__conn_mgt_group.html" target="_self">Management</a></td><td class="desc"></td></tr>
+<tr id="row_2_9_1_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><a class="el" href="group__conn_pub_group.html" target="_self">Publishing</a></td><td class="desc"></td></tr>
+<tr id="row_2_9_2_" class="odd"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><a class="el" href="group__conn_sub_group.html" target="_self">Subscribing</a></td><td class="desc"></td></tr>
+<tr id="row_2_10_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a class="el" href="group__sub_group.html" target="_self">Subscription</a></td><td class="desc"></td></tr>
+<tr id="row_2_11_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_2_11_" class="arrow" onclick="toggleFolder('2_11_')">&#9660;</span><a class="el" href="group__stan_conn_group.html" target="_self">Streaming Connection</a></td><td class="desc"></td></tr>
+<tr id="row_2_11_0_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><a class="el" href="group__stan_conn_mgt_group.html" target="_self">Management</a></td><td class="desc"></td></tr>
+<tr id="row_2_11_1_" class="odd"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><a class="el" href="group__stan_conn_pub_group.html" target="_self">Publishing</a></td><td class="desc"></td></tr>
+<tr id="row_2_11_2_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><a class="el" href="group__stan_conn_sub_group.html" target="_self">Subscribing</a></td><td class="desc"></td></tr>
+<tr id="row_2_12_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><a class="el" href="group__stan_sub_group.html" target="_self">Streaming Subscription</a></td><td class="desc"></td></tr>
+<tr id="row_2_13_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_2_13_" class="arrow" onclick="toggleFolder('2_13_')">&#9660;</span><a class="el" href="group__js_group.html" target="_self">JetStream</a></td><td class="desc"></td></tr>
+<tr id="row_2_13_0_" class="odd"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><a class="el" href="group__js_assets_group.html" target="_self">JetStream Assets Management</a></td><td class="desc"></td></tr>
+<tr id="row_2_13_1_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><a class="el" href="group__js_pub_group.html" target="_self">Publishing</a></td><td class="desc"></td></tr>
+<tr id="row_2_13_2_" class="odd"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><a class="el" href="group__js_sub_group.html" target="_self">Subscribing</a></td><td class="desc"></td></tr>
+<tr id="row_2_13_3_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><a class="el" href="group__js_msg.html" target="_self">Messages</a></td><td class="desc"></td></tr>
+<tr id="row_2_14_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_2_14_" class="arrow" onclick="toggleFolder('2_14_')">&#9660;</span><a class="el" href="group__kv_group.html" target="_self">KeyValue store</a></td><td class="desc"></td></tr>
+<tr id="row_2_14_0_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><a class="el" href="group__kv_group_mgt.html" target="_self">KeyValue store management</a></td><td class="desc"></td></tr>
+<tr id="row_2_14_1_" class="odd"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><a class="el" href="group__kv_entry.html" target="_self">KeyValue store entries</a></td><td class="desc"></td></tr>
+<tr id="row_2_14_2_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><a class="el" href="group__kv_watcher.html" target="_self">KeyValue store watcher</a></td><td class="desc"></td></tr>
+<tr id="row_2_14_3_" class="odd"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><a class="el" href="group__kv_status.html" target="_self">KeyValue store status</a></td><td class="desc"></td></tr>
+<tr id="row_3_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><a class="el" href="group__wildcards_group.html" target="_self">Wildcards</a></td><td class="desc"></td></tr>
+<tr id="row_4_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><a class="el" href="group__env_variables_group.html" target="_self">Environment Variables</a></td><td class="desc"></td></tr>
+<tr id="row_5_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><a class="el" href="group__libevent_functions.html" target="_self">Libevent Adapter</a></td><td class="desc"></td></tr>
+<tr id="row_6_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><a class="el" href="group__libuv_functions.html" target="_self">Libuv Adapter</a></td><td class="desc"></td></tr>
+</table>
+</div><!-- directory -->
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/modules.js b/doc/html/modules.js
new file mode 100644 (file)
index 0000000..7114b25
--- /dev/null
@@ -0,0 +1,10 @@
+var modules =
+[
+    [ "Types", "group__types_group.html", "group__types_group" ],
+    [ "Callbacks", "group__callbacks_group.html", "group__callbacks_group" ],
+    [ "Functions", "group__func_group.html", "group__func_group" ],
+    [ "Wildcards", "group__wildcards_group.html", null ],
+    [ "Environment Variables", "group__env_variables_group.html", null ],
+    [ "Libevent Adapter", "group__libevent_functions.html", "group__libevent_functions" ],
+    [ "Libuv Adapter", "group__libuv_functions.html", "group__libuv_functions" ]
+];
\ No newline at end of file
diff --git a/doc/html/nats_8h.html b/doc/html/nats_8h.html
new file mode 100644 (file)
index 0000000..83a97b0
--- /dev/null
@@ -0,0 +1,1562 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: nats.h File Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('nats_8h.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#nested-classes">Classes</a> &#124;
+<a href="#define-members">Macros</a> &#124;
+<a href="#typedef-members">Typedefs</a> &#124;
+<a href="#enum-members">Enumerations</a> &#124;
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle"><div class="title">nats.h File Reference</div></div>
+</div><!--header-->
+<div class="contents">
+<div class="textblock"><code>#include &lt;stdlib.h&gt;</code><br />
+<code>#include &lt;stdint.h&gt;</code><br />
+<code>#include &lt;stdbool.h&gt;</code><br />
+<code>#include &lt;inttypes.h&gt;</code><br />
+<code>#include &lt;stdio.h&gt;</code><br />
+<code>#include &quot;<a class="el" href="status_8h_source.html">status.h</a>&quot;</code><br />
+<code>#include &quot;version.h&quot;</code><br />
+</div>
+<p><a href="nats_8h_source.html">Go to the source code of this file.</a></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
+Classes</h2></td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnats_msg_list.html">natsMsgList</a></td></tr>
+<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A list of NATS messages.  <a href="structnats_msg_list.html#details">More...</a><br /></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_pub_options.html">jsPubOptions</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_placement.html">jsPlacement</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_external_stream.html">jsExternalStream</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_source.html">jsStreamSource</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_re_publish.html">jsRePublish</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_lost_stream_data.html">jsLostStreamData</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_state_subject.html">jsStreamStateSubject</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_state_subjects.html">jsStreamStateSubjects</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_state.html">jsStreamState</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_peer_info.html">jsPeerInfo</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_cluster_info.html">jsClusterInfo</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_source_info.html">jsStreamSourceInfo</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_info.html">jsStreamInfo</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_info_list.html">jsStreamInfoList</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_names_list.html">jsStreamNamesList</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_sequence_mismatch.html">jsConsumerSequenceMismatch</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_sub_options.html">jsSubOptions</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_sequence_pair.html">jsSequencePair</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_sequence_info.html">jsSequenceInfo</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_info_list.html">jsConsumerInfoList</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_names_list.html">jsConsumerNamesList</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_a_p_i_stats.html">jsAPIStats</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_account_limits.html">jsAccountLimits</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_tier.html">jsTier</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_account_info.html">jsAccountInfo</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_msg_meta_data.html">jsMsgMetaData</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_pub_ack.html">jsPubAck</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_pub_ack_err.html">jsPubAckErr</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_direct_get_msg_options.html">jsDirectGetMsgOptions</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_fetch_request.html">jsFetchRequest</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_options.html">jsOptions</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_options_1_1js_options_publish_async.html">jsOptions::jsOptionsPublishAsync</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_options_1_1js_options_stream.html">jsOptions::jsOptionsStream</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html">jsOptions::jsOptionsStream::jsOptionsStreamPurge</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_info.html">jsOptions::jsOptionsStream::jsOptionsStreamInfo</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkv_config.html">kvConfig</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkv_watch_options.html">kvWatchOptions</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkv_purge_options.html">kvPurgeOptions</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkv_entry_list.html">kvEntryList</a></td></tr>
+<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A list of KeyValue store entries.  <a href="structkv_entry_list.html#details">More...</a><br /></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkv_keys_list.html">kvKeysList</a></td></tr>
+<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A list of KeyValue store keys.  <a href="structkv_keys_list.html#details">More...</a><br /></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
+Macros</h2></td></tr>
+<tr class="memitem:a3bc1b3fe7f64083e60c7c3b93f205bad"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a></td></tr>
+<tr class="memdesc:a3bc1b3fe7f64083e60c7c3b93f205bad"><td class="mdescLeft">&#160;</td><td class="mdescRight">Needed for shared library.  <a href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">More...</a><br /></td></tr>
+<tr class="separator:a3bc1b3fe7f64083e60c7c3b93f205bad"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a911c54900b46b968205871cd9f68d36c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nats_8h.html#a911c54900b46b968205871cd9f68d36c">NATS_DEFAULT_URL</a>&#160;&#160;&#160;&quot;nats://localhost:4222&quot;</td></tr>
+<tr class="memdesc:a911c54900b46b968205871cd9f68d36c"><td class="mdescLeft">&#160;</td><td class="mdescRight">The default <code>NATS Server</code> URL.  <a href="nats_8h.html#a911c54900b46b968205871cd9f68d36c">More...</a><br /></td></tr>
+<tr class="separator:a911c54900b46b968205871cd9f68d36c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a5ce9005964bd9cf0604a9ef1afa87ea4"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nats_8h.html#a5ce9005964bd9cf0604a9ef1afa87ea4">JSMsgSize</a>&#160;&#160;&#160;&quot;Nats-Msg-Size&quot;</td></tr>
+<tr class="memdesc:a5ce9005964bd9cf0604a9ef1afa87ea4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Message header for JetStream messages representing the message payload size.  <a href="nats_8h.html#a5ce9005964bd9cf0604a9ef1afa87ea4">More...</a><br /></td></tr>
+<tr class="separator:a5ce9005964bd9cf0604a9ef1afa87ea4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a3938efee417dc67ff2bcf62f913f9054"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nats_8h.html#a3938efee417dc67ff2bcf62f913f9054">JSMsgRollup</a>&#160;&#160;&#160;&quot;Nats-Rollup&quot;</td></tr>
+<tr class="memdesc:a3938efee417dc67ff2bcf62f913f9054"><td class="mdescLeft">&#160;</td><td class="mdescRight">Message header for JetStream message for rollup.  <a href="nats_8h.html#a3938efee417dc67ff2bcf62f913f9054">More...</a><br /></td></tr>
+<tr class="separator:a3938efee417dc67ff2bcf62f913f9054"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ad22dce8f66bae9b3e1027790d9c95c09"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nats_8h.html#ad22dce8f66bae9b3e1027790d9c95c09">JSMsgRollupSubject</a>&#160;&#160;&#160;&quot;sub&quot;</td></tr>
+<tr class="memdesc:ad22dce8f66bae9b3e1027790d9c95c09"><td class="mdescLeft">&#160;</td><td class="mdescRight">Message header value causing rollup per subject.  <a href="nats_8h.html#ad22dce8f66bae9b3e1027790d9c95c09">More...</a><br /></td></tr>
+<tr class="separator:ad22dce8f66bae9b3e1027790d9c95c09"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:acc62d11b7e67fe3feb74acdfa4a6e8ac"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nats_8h.html#acc62d11b7e67fe3feb74acdfa4a6e8ac">JSMsgRollupAll</a>&#160;&#160;&#160;&quot;all&quot;</td></tr>
+<tr class="memdesc:acc62d11b7e67fe3feb74acdfa4a6e8ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Message header value causing rollup for all subjects.  <a href="nats_8h.html#acc62d11b7e67fe3feb74acdfa4a6e8ac">More...</a><br /></td></tr>
+<tr class="separator:acc62d11b7e67fe3feb74acdfa4a6e8ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aa2f2c14de864839a2ff7ea34415d37e0"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nats_8h.html#aa2f2c14de864839a2ff7ea34415d37e0">JSStream</a>&#160;&#160;&#160;&quot;Nats-Stream&quot;</td></tr>
+<tr class="separator:aa2f2c14de864839a2ff7ea34415d37e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a1c0a11996b44abc16a4f444ee4c1cb94"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nats_8h.html#a1c0a11996b44abc16a4f444ee4c1cb94">JSSequence</a>&#160;&#160;&#160;&quot;Nats-Sequence&quot;</td></tr>
+<tr class="separator:a1c0a11996b44abc16a4f444ee4c1cb94"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ae18fb15ea8130a650e904e5153eb30d5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nats_8h.html#ae18fb15ea8130a650e904e5153eb30d5">JSLastSequence</a>&#160;&#160;&#160;&quot;Nats-Last-Sequence&quot;</td></tr>
+<tr class="separator:ae18fb15ea8130a650e904e5153eb30d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a5525cb01f8b0aec73cb13f3276449e0e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nats_8h.html#a5525cb01f8b0aec73cb13f3276449e0e">JSTimeStamp</a>&#160;&#160;&#160;&quot;Nats-Time-Stamp&quot;</td></tr>
+<tr class="separator:a5525cb01f8b0aec73cb13f3276449e0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a3776aa9985557f0c6e382b01d2e3f602"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nats_8h.html#a3776aa9985557f0c6e382b01d2e3f602">JSSubject</a>&#160;&#160;&#160;&quot;Nats-Subject&quot;</td></tr>
+<tr class="separator:a3776aa9985557f0c6e382b01d2e3f602"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
+Typedefs</h2></td></tr>
+<tr class="memitem:af798865ac824e5959987de0fe8d07383"><td class="memItemLeft" align="right" valign="top">typedef int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="nats_8h.html#af798865ac824e5959987de0fe8d07383">natsSock</a></td></tr>
+<tr class="separator:af798865ac824e5959987de0fe8d07383"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf88dca0a18efb5c5e994d265a9f04aec"><td class="memItemLeft" align="right" valign="top">typedef struct __natsConnection&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a></td></tr>
+<tr class="memdesc:gaf88dca0a18efb5c5e994d265a9f04aec"><td class="mdescLeft">&#160;</td><td class="mdescRight">A connection to a <code>NATS Server</code>.  <a href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">More...</a><br /></td></tr>
+<tr class="separator:gaf88dca0a18efb5c5e994d265a9f04aec"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga57a4b8c7109e2773878655722ce028aa"><td class="memItemLeft" align="right" valign="top">typedef struct __natsStatistics&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa">natsStatistics</a></td></tr>
+<tr class="memdesc:ga57a4b8c7109e2773878655722ce028aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Statistics of a <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a>.  <a href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa">More...</a><br /></td></tr>
+<tr class="separator:ga57a4b8c7109e2773878655722ce028aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga87158ec63b4f90f69e20451624ea01d8"><td class="memItemLeft" align="right" valign="top">typedef struct __natsSubscription&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a></td></tr>
+<tr class="memdesc:ga87158ec63b4f90f69e20451624ea01d8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Interest on a given subject.  <a href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">More...</a><br /></td></tr>
+<tr class="separator:ga87158ec63b4f90f69e20451624ea01d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gadcab54026c4ed78f344ce03ce31bb61a"><td class="memItemLeft" align="right" valign="top">typedef struct __natsMsg&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a></td></tr>
+<tr class="memdesc:gadcab54026c4ed78f344ce03ce31bb61a"><td class="mdescLeft">&#160;</td><td class="mdescRight">A structure holding a subject, optional reply and payload.  <a href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">More...</a><br /></td></tr>
+<tr class="separator:gadcab54026c4ed78f344ce03ce31bb61a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gabcc48b40a81fe302188f4ee06ea9c54e"><td class="memItemLeft" align="right" valign="top">typedef struct __natsOptions&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a></td></tr>
+<tr class="memdesc:gabcc48b40a81fe302188f4ee06ea9c54e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Way to configure a <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server.">natsConnection</a>.  <a href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">More...</a><br /></td></tr>
+<tr class="separator:gabcc48b40a81fe302188f4ee06ea9c54e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga206c3d4d6f4f6f96fd2cae53a3df31c1"><td class="memItemLeft" align="right" valign="top">typedef char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga206c3d4d6f4f6f96fd2cae53a3df31c1">natsInbox</a></td></tr>
+<tr class="memdesc:ga206c3d4d6f4f6f96fd2cae53a3df31c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unique subject often used for point-to-point communication.  <a href="group__types_group.html#ga206c3d4d6f4f6f96fd2cae53a3df31c1">More...</a><br /></td></tr>
+<tr class="separator:ga206c3d4d6f4f6f96fd2cae53a3df31c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gafd5523161ec3783e79719cb9a9a66b5b"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structnats_msg_list.html">natsMsgList</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gafd5523161ec3783e79719cb9a9a66b5b">natsMsgList</a></td></tr>
+<tr class="memdesc:gafd5523161ec3783e79719cb9a9a66b5b"><td class="mdescLeft">&#160;</td><td class="mdescRight">A list of NATS messages.  <a href="group__types_group.html#gafd5523161ec3783e79719cb9a9a66b5b">More...</a><br /></td></tr>
+<tr class="separator:gafd5523161ec3783e79719cb9a9a66b5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaaf12cdd24c6cc23a57c20466c92ff8c1"><td class="memItemLeft" align="right" valign="top">typedef struct __jsCtx&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a></td></tr>
+<tr class="separator:gaaf12cdd24c6cc23a57c20466c92ff8c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga7bbea3575d35dcdbfc9b766b04269eb7"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_pub_options.html">jsPubOptions</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga7bbea3575d35dcdbfc9b766b04269eb7">jsPubOptions</a></td></tr>
+<tr class="separator:ga7bbea3575d35dcdbfc9b766b04269eb7"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga49d1138fac9da8b85d00a367081e91c9"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_placement.html">jsPlacement</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga49d1138fac9da8b85d00a367081e91c9">jsPlacement</a></td></tr>
+<tr class="separator:ga49d1138fac9da8b85d00a367081e91c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaef6601477f6456bebc229f7f38982a6c"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_external_stream.html">jsExternalStream</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gaef6601477f6456bebc229f7f38982a6c">jsExternalStream</a></td></tr>
+<tr class="separator:gaef6601477f6456bebc229f7f38982a6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gab4c43c87d81917aab748a50eee028449"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_stream_source.html">jsStreamSource</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gab4c43c87d81917aab748a50eee028449">jsStreamSource</a></td></tr>
+<tr class="separator:gab4c43c87d81917aab748a50eee028449"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gab991313d33ce270a882e4d0756c138f6"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_re_publish.html">jsRePublish</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gab991313d33ce270a882e4d0756c138f6">jsRePublish</a></td></tr>
+<tr class="separator:gab991313d33ce270a882e4d0756c138f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga26fd6a73df327ca3c271e46ddefc8acf"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_stream_config.html">jsStreamConfig</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga26fd6a73df327ca3c271e46ddefc8acf">jsStreamConfig</a></td></tr>
+<tr class="separator:ga26fd6a73df327ca3c271e46ddefc8acf"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf80828510450faf84bbf456e94f5b784"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_lost_stream_data.html">jsLostStreamData</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gaf80828510450faf84bbf456e94f5b784">jsLostStreamData</a></td></tr>
+<tr class="separator:gaf80828510450faf84bbf456e94f5b784"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga55dce2fa9ecd215716cc9ceece7dfefa"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_stream_state_subject.html">jsStreamStateSubject</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga55dce2fa9ecd215716cc9ceece7dfefa">jsStreamStateSubject</a></td></tr>
+<tr class="separator:ga55dce2fa9ecd215716cc9ceece7dfefa"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gae8b57d9c40364f97a705f3e61a1156b0"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_stream_state_subjects.html">jsStreamStateSubjects</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gae8b57d9c40364f97a705f3e61a1156b0">jsStreamStateSubjects</a></td></tr>
+<tr class="separator:gae8b57d9c40364f97a705f3e61a1156b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2bfd6de6ffc84d767482b3dd57cb9271"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_stream_state.html">jsStreamState</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga2bfd6de6ffc84d767482b3dd57cb9271">jsStreamState</a></td></tr>
+<tr class="separator:ga2bfd6de6ffc84d767482b3dd57cb9271"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga1e938dab794089f9329d7b7ece8f3e9b"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_peer_info.html">jsPeerInfo</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga1e938dab794089f9329d7b7ece8f3e9b">jsPeerInfo</a></td></tr>
+<tr class="separator:ga1e938dab794089f9329d7b7ece8f3e9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaaf92318ce94a1ae3547c9a7af5a3f4f6"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_cluster_info.html">jsClusterInfo</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gaaf92318ce94a1ae3547c9a7af5a3f4f6">jsClusterInfo</a></td></tr>
+<tr class="separator:gaaf92318ce94a1ae3547c9a7af5a3f4f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gab2f33f57188a550f2f747d4f27bc24bd"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_stream_source_info.html">jsStreamSourceInfo</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gab2f33f57188a550f2f747d4f27bc24bd">jsStreamSourceInfo</a></td></tr>
+<tr class="separator:gab2f33f57188a550f2f747d4f27bc24bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2629c9454996edf7914be36a9e44921b"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_stream_info.html">jsStreamInfo</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga2629c9454996edf7914be36a9e44921b">jsStreamInfo</a></td></tr>
+<tr class="separator:ga2629c9454996edf7914be36a9e44921b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga1e54c2a1bc94834d1670875fc151f565"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_stream_info_list.html">jsStreamInfoList</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga1e54c2a1bc94834d1670875fc151f565">jsStreamInfoList</a></td></tr>
+<tr class="separator:ga1e54c2a1bc94834d1670875fc151f565"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf4d31a4dc83b2805422beafb1f8fa000"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_stream_names_list.html">jsStreamNamesList</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gaf4d31a4dc83b2805422beafb1f8fa000">jsStreamNamesList</a></td></tr>
+<tr class="separator:gaf4d31a4dc83b2805422beafb1f8fa000"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga0483b2197c0ddd9082b48c2dd3fe7cee"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga0483b2197c0ddd9082b48c2dd3fe7cee">jsConsumerConfig</a></td></tr>
+<tr class="separator:ga0483b2197c0ddd9082b48c2dd3fe7cee"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gace471cd2cef1df797b2a1c6b485049bd"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_consumer_sequence_mismatch.html">jsConsumerSequenceMismatch</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gace471cd2cef1df797b2a1c6b485049bd">jsConsumerSequenceMismatch</a></td></tr>
+<tr class="separator:gace471cd2cef1df797b2a1c6b485049bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaccfaac2079656ffd40d003e4de5d2280"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_sub_options.html">jsSubOptions</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gaccfaac2079656ffd40d003e4de5d2280">jsSubOptions</a></td></tr>
+<tr class="separator:gaccfaac2079656ffd40d003e4de5d2280"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga39011d30b295759b7f6ca0a7539dff8f"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_sequence_pair.html">jsSequencePair</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga39011d30b295759b7f6ca0a7539dff8f">jsSequencePair</a></td></tr>
+<tr class="separator:ga39011d30b295759b7f6ca0a7539dff8f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga27e1a5d5b513f9eb7d61a17db71f8003"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_sequence_info.html">jsSequenceInfo</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga27e1a5d5b513f9eb7d61a17db71f8003">jsSequenceInfo</a></td></tr>
+<tr class="separator:ga27e1a5d5b513f9eb7d61a17db71f8003"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2f21bb79884e56a5613d7fe76b11b1e5"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga2f21bb79884e56a5613d7fe76b11b1e5">jsConsumerInfo</a></td></tr>
+<tr class="separator:ga2f21bb79884e56a5613d7fe76b11b1e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gadad3bf72baae970662248d82d9b05d0a"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_consumer_info_list.html">jsConsumerInfoList</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gadad3bf72baae970662248d82d9b05d0a">jsConsumerInfoList</a></td></tr>
+<tr class="separator:gadad3bf72baae970662248d82d9b05d0a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gad00ab4381eec504ada3272aa9ff8adb2"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_consumer_names_list.html">jsConsumerNamesList</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gad00ab4381eec504ada3272aa9ff8adb2">jsConsumerNamesList</a></td></tr>
+<tr class="separator:gad00ab4381eec504ada3272aa9ff8adb2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gad057a0107367ce5727975f3daf63ff75"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_a_p_i_stats.html">jsAPIStats</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gad057a0107367ce5727975f3daf63ff75">jsAPIStats</a></td></tr>
+<tr class="separator:gad057a0107367ce5727975f3daf63ff75"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaa889f706cce285adb9cea8aba0b76866"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_account_limits.html">jsAccountLimits</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gaa889f706cce285adb9cea8aba0b76866">jsAccountLimits</a></td></tr>
+<tr class="separator:gaa889f706cce285adb9cea8aba0b76866"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga1d48d3eb36b50c9ab6d8477dccf247d8"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_tier.html">jsTier</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga1d48d3eb36b50c9ab6d8477dccf247d8">jsTier</a></td></tr>
+<tr class="separator:ga1d48d3eb36b50c9ab6d8477dccf247d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga57cdc53b29a4fedb5a4140b6e64a4fab"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_account_info.html">jsAccountInfo</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga57cdc53b29a4fedb5a4140b6e64a4fab">jsAccountInfo</a></td></tr>
+<tr class="separator:ga57cdc53b29a4fedb5a4140b6e64a4fab"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gace9595b1a5ce3f7a13670367fd293b4a"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_msg_meta_data.html">jsMsgMetaData</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gace9595b1a5ce3f7a13670367fd293b4a">jsMsgMetaData</a></td></tr>
+<tr class="separator:gace9595b1a5ce3f7a13670367fd293b4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf1d5e436c5d41c5b9b96d84e3d2bc86f"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_pub_ack.html">jsPubAck</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gaf1d5e436c5d41c5b9b96d84e3d2bc86f">jsPubAck</a></td></tr>
+<tr class="separator:gaf1d5e436c5d41c5b9b96d84e3d2bc86f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gadb7c287bc86b92765fbe45a066b96f40"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_pub_ack_err.html">jsPubAckErr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gadb7c287bc86b92765fbe45a066b96f40">jsPubAckErr</a></td></tr>
+<tr class="separator:gadb7c287bc86b92765fbe45a066b96f40"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga85123afa00d522a249a5b2a8abd7e063"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_direct_get_msg_options.html">jsDirectGetMsgOptions</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga85123afa00d522a249a5b2a8abd7e063">jsDirectGetMsgOptions</a></td></tr>
+<tr class="separator:ga85123afa00d522a249a5b2a8abd7e063"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf11e6664c1f335a5287af71c703935fa"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_fetch_request.html">jsFetchRequest</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gaf11e6664c1f335a5287af71c703935fa">jsFetchRequest</a></td></tr>
+<tr class="separator:gaf11e6664c1f335a5287af71c703935fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga0e3a3b7cf89e7dfa955f0f8f3f1eb6e5"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structjs_options.html">jsOptions</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga0e3a3b7cf89e7dfa955f0f8f3f1eb6e5">jsOptions</a></td></tr>
+<tr class="separator:ga0e3a3b7cf89e7dfa955f0f8f3f1eb6e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga054c05493dd3cfc5c3e7a665a424e54a"><td class="memItemLeft" align="right" valign="top">typedef struct __kvStore&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a></td></tr>
+<tr class="separator:ga054c05493dd3cfc5c3e7a665a424e54a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gad489fb4074f27427560ca71797db6191"><td class="memItemLeft" align="right" valign="top">typedef struct __kvEntry&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a></td></tr>
+<tr class="separator:gad489fb4074f27427560ca71797db6191"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gad3a0dd2dac950d5709ee5772b104fc80"><td class="memItemLeft" align="right" valign="top">typedef struct __kvStatus&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a></td></tr>
+<tr class="separator:gad3a0dd2dac950d5709ee5772b104fc80"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga526fa6d37e818784b94cdc1713f3a043"><td class="memItemLeft" align="right" valign="top">typedef struct __kvWatcher&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a></td></tr>
+<tr class="separator:ga526fa6d37e818784b94cdc1713f3a043"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga6d594b091b4bb46192336413066a8edf"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structkv_config.html">kvConfig</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga6d594b091b4bb46192336413066a8edf">kvConfig</a></td></tr>
+<tr class="separator:ga6d594b091b4bb46192336413066a8edf"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gac32f992fe797a1f7befc7dc3452640b6"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structkv_watch_options.html">kvWatchOptions</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gac32f992fe797a1f7befc7dc3452640b6">kvWatchOptions</a></td></tr>
+<tr class="separator:gac32f992fe797a1f7befc7dc3452640b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga90e8de23c4468005488bde690a2ffe9d"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structkv_purge_options.html">kvPurgeOptions</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga90e8de23c4468005488bde690a2ffe9d">kvPurgeOptions</a></td></tr>
+<tr class="separator:ga90e8de23c4468005488bde690a2ffe9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga0125d394a3cbae2a1713eed8fab7f78e"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structkv_entry_list.html">kvEntryList</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga0125d394a3cbae2a1713eed8fab7f78e">kvEntryList</a></td></tr>
+<tr class="memdesc:ga0125d394a3cbae2a1713eed8fab7f78e"><td class="mdescLeft">&#160;</td><td class="mdescRight">A list of KeyValue store entries.  <a href="group__types_group.html#ga0125d394a3cbae2a1713eed8fab7f78e">More...</a><br /></td></tr>
+<tr class="separator:ga0125d394a3cbae2a1713eed8fab7f78e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gab36492d9d4370337cfed80edce4144e0"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structkv_keys_list.html">kvKeysList</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gab36492d9d4370337cfed80edce4144e0">kvKeysList</a></td></tr>
+<tr class="memdesc:gab36492d9d4370337cfed80edce4144e0"><td class="mdescLeft">&#160;</td><td class="mdescRight">A list of KeyValue store keys.  <a href="group__types_group.html#gab36492d9d4370337cfed80edce4144e0">More...</a><br /></td></tr>
+<tr class="separator:gab36492d9d4370337cfed80edce4144e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga9e826493769d23086cfccefe95cdf64c"><td class="memItemLeft" align="right" valign="top">typedef struct __stanConnection&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a></td></tr>
+<tr class="memdesc:ga9e826493769d23086cfccefe95cdf64c"><td class="mdescLeft">&#160;</td><td class="mdescRight">A connection to a <code>NATS Streaming Server</code>.  <a href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">More...</a><br /></td></tr>
+<tr class="separator:ga9e826493769d23086cfccefe95cdf64c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gae4dae869fb614536f0f027c2e2660cc5"><td class="memItemLeft" align="right" valign="top">typedef struct __stanSubscription&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a></td></tr>
+<tr class="memdesc:gae4dae869fb614536f0f027c2e2660cc5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Interest on a given channel.  <a href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">More...</a><br /></td></tr>
+<tr class="separator:gae4dae869fb614536f0f027c2e2660cc5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2cf5db7703b42d97abe56a3e83b2a87d"><td class="memItemLeft" align="right" valign="top">typedef struct __stanMsg&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a></td></tr>
+<tr class="memdesc:ga2cf5db7703b42d97abe56a3e83b2a87d"><td class="mdescLeft">&#160;</td><td class="mdescRight">The Streaming message.  <a href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">More...</a><br /></td></tr>
+<tr class="separator:ga2cf5db7703b42d97abe56a3e83b2a87d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga13d64411878ba13a6ca39c915f2447c1"><td class="memItemLeft" align="right" valign="top">typedef struct __stanConnOptions&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a></td></tr>
+<tr class="memdesc:ga13d64411878ba13a6ca39c915f2447c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Way to configure a <a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c" title="A connection to a NATS Streaming Server.">stanConnection</a>.  <a href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">More...</a><br /></td></tr>
+<tr class="separator:ga13d64411878ba13a6ca39c915f2447c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga023712711f5c289663fc2223e83686d3"><td class="memItemLeft" align="right" valign="top">typedef struct __stanSubOptions&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a></td></tr>
+<tr class="memdesc:ga023712711f5c289663fc2223e83686d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Way to configure a <a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5" title="Interest on a given channel.">stanSubscription</a>.  <a href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">More...</a><br /></td></tr>
+<tr class="separator:ga023712711f5c289663fc2223e83686d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gad1a5ac566893e13dc8c81ac0e9c87afe"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe">natsMsgHandler</a>) (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, void *closure)</td></tr>
+<tr class="memdesc:gad1a5ac566893e13dc8c81ac0e9c87afe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback used to deliver messages to the application.  <a href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe">More...</a><br /></td></tr>
+<tr class="separator:gad1a5ac566893e13dc8c81ac0e9c87afe"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gacdef6aff3e47953f19e35857ab8e274c"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a>) (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, void *closure)</td></tr>
+<tr class="memdesc:gacdef6aff3e47953f19e35857ab8e274c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback used to notify the user of asynchronous connection events.  <a href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">More...</a><br /></td></tr>
+<tr class="separator:gacdef6aff3e47953f19e35857ab8e274c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga9e511dffa471dfb971b7dd2b12329626"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__callbacks_group.html#ga9e511dffa471dfb971b7dd2b12329626">natsErrHandler</a>) (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *subscription, <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> err, void *closure)</td></tr>
+<tr class="memdesc:ga9e511dffa471dfb971b7dd2b12329626"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback used to notify the user of errors encountered while processing inbound messages.  <a href="group__callbacks_group.html#ga9e511dffa471dfb971b7dd2b12329626">More...</a><br /></td></tr>
+<tr class="separator:ga9e511dffa471dfb971b7dd2b12329626"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga245eab0a01a485e40fba267f84ec037f"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__callbacks_group.html#ga245eab0a01a485e40fba267f84ec037f">natsEvLoop_Attach</a>) (void **userData, void *loop, <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <a class="el" href="nats_8h.html#af798865ac824e5959987de0fe8d07383">natsSock</a> socket)</td></tr>
+<tr class="memdesc:ga245eab0a01a485e40fba267f84ec037f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Attach this connection to the external event loop.  <a href="group__callbacks_group.html#ga245eab0a01a485e40fba267f84ec037f">More...</a><br /></td></tr>
+<tr class="separator:ga245eab0a01a485e40fba267f84ec037f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaea4c125ecfb43eaf43da20e8444c2aaa"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__callbacks_group.html#gaea4c125ecfb43eaf43da20e8444c2aaa">natsEvLoop_ReadAddRemove</a>) (void *userData, bool add)</td></tr>
+<tr class="memdesc:gaea4c125ecfb43eaf43da20e8444c2aaa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read event needs to be added or removed.  <a href="group__callbacks_group.html#gaea4c125ecfb43eaf43da20e8444c2aaa">More...</a><br /></td></tr>
+<tr class="separator:gaea4c125ecfb43eaf43da20e8444c2aaa"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2bb5dd2d821ca5bbc0488f7e6aceed17"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__callbacks_group.html#ga2bb5dd2d821ca5bbc0488f7e6aceed17">natsEvLoop_WriteAddRemove</a>) (void *userData, bool add)</td></tr>
+<tr class="memdesc:ga2bb5dd2d821ca5bbc0488f7e6aceed17"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write event needs to be added or removed.  <a href="group__callbacks_group.html#ga2bb5dd2d821ca5bbc0488f7e6aceed17">More...</a><br /></td></tr>
+<tr class="separator:ga2bb5dd2d821ca5bbc0488f7e6aceed17"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gab63dee7f7012ba11ae20b76dbc36f2d0"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__callbacks_group.html#gab63dee7f7012ba11ae20b76dbc36f2d0">natsEvLoop_Detach</a>) (void *userData)</td></tr>
+<tr class="memdesc:gab63dee7f7012ba11ae20b76dbc36f2d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Detach from the event loop.  <a href="group__callbacks_group.html#gab63dee7f7012ba11ae20b76dbc36f2d0">More...</a><br /></td></tr>
+<tr class="separator:gab63dee7f7012ba11ae20b76dbc36f2d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga258b30458134be90f17315c037f34b7b"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__callbacks_group.html#ga258b30458134be90f17315c037f34b7b">natsUserJWTHandler</a>) (char **userJWT, char **customErrTxt, void *closure)</td></tr>
+<tr class="memdesc:ga258b30458134be90f17315c037f34b7b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback used to fetch and return account signed user JWT.  <a href="group__callbacks_group.html#ga258b30458134be90f17315c037f34b7b">More...</a><br /></td></tr>
+<tr class="separator:ga258b30458134be90f17315c037f34b7b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gab786ffd670c86de0563559351305080b"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__callbacks_group.html#gab786ffd670c86de0563559351305080b">natsSignatureHandler</a>) (char **customErrTxt, unsigned char **signature, int *signatureLength, const char *nonce, void *closure)</td></tr>
+<tr class="memdesc:gab786ffd670c86de0563559351305080b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback used to sign a nonce sent by the server.  <a href="group__callbacks_group.html#gab786ffd670c86de0563559351305080b">More...</a><br /></td></tr>
+<tr class="separator:gab786ffd670c86de0563559351305080b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga4b02de70fe9380d184fd01d87527f499"><td class="memItemLeft" align="right" valign="top">typedef const char *(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__callbacks_group.html#ga4b02de70fe9380d184fd01d87527f499">natsTokenHandler</a>) (void *closure)</td></tr>
+<tr class="memdesc:ga4b02de70fe9380d184fd01d87527f499"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback used to build a token on connections and reconnections.  <a href="group__callbacks_group.html#ga4b02de70fe9380d184fd01d87527f499">More...</a><br /></td></tr>
+<tr class="separator:ga4b02de70fe9380d184fd01d87527f499"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga245131e64f1d0dff7edc8ed874a07e9a"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__callbacks_group.html#ga245131e64f1d0dff7edc8ed874a07e9a">natsOnCompleteCB</a>) (void *closure)</td></tr>
+<tr class="memdesc:ga245131e64f1d0dff7edc8ed874a07e9a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback used to notify that an object lifecycle is complete.  <a href="group__callbacks_group.html#ga245131e64f1d0dff7edc8ed874a07e9a">More...</a><br /></td></tr>
+<tr class="separator:ga245131e64f1d0dff7edc8ed874a07e9a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga3353d4b92851c52121f65aaf0684cba4"><td class="memItemLeft" align="right" valign="top">typedef int64_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__callbacks_group.html#ga3353d4b92851c52121f65aaf0684cba4">natsCustomReconnectDelayHandler</a>) (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, int attempts, void *closure)</td></tr>
+<tr class="memdesc:ga3353d4b92851c52121f65aaf0684cba4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback used to specify how long to wait between reconnects.  <a href="group__callbacks_group.html#ga3353d4b92851c52121f65aaf0684cba4">More...</a><br /></td></tr>
+<tr class="separator:ga3353d4b92851c52121f65aaf0684cba4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga954768cc1d3388bb6ab723e777647992"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__callbacks_group.html#ga954768cc1d3388bb6ab723e777647992">jsPubAckErrHandler</a>) (<a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="el" href="structjs_pub_ack_err.html">jsPubAckErr</a> *pae, void *closure)</td></tr>
+<tr class="memdesc:ga954768cc1d3388bb6ab723e777647992"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback used to process asynchronous publish errors from JetStream.  <a href="group__callbacks_group.html#ga954768cc1d3388bb6ab723e777647992">More...</a><br /></td></tr>
+<tr class="separator:ga954768cc1d3388bb6ab723e777647992"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga4f66e065bd918f02510d4c53d8a5b729"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__callbacks_group.html#ga4f66e065bd918f02510d4c53d8a5b729">jsPubAckHandler</a>) (<a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, <a class="el" href="structjs_pub_ack.html">jsPubAck</a> *pa, <a class="el" href="structjs_pub_ack_err.html">jsPubAckErr</a> *pae, void *closure)</td></tr>
+<tr class="memdesc:ga4f66e065bd918f02510d4c53d8a5b729"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback used to process asynchronous publish responses from JetStream.  <a href="group__callbacks_group.html#ga4f66e065bd918f02510d4c53d8a5b729">More...</a><br /></td></tr>
+<tr class="separator:ga4f66e065bd918f02510d4c53d8a5b729"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gad5d6a685731b3bf635995b7375af4d18"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__callbacks_group.html#gad5d6a685731b3bf635995b7375af4d18">stanPubAckHandler</a>) (const char *guid, const char *error, void *closure)</td></tr>
+<tr class="memdesc:gad5d6a685731b3bf635995b7375af4d18"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback used to notify of an asynchronous publish result.  <a href="group__callbacks_group.html#gad5d6a685731b3bf635995b7375af4d18">More...</a><br /></td></tr>
+<tr class="separator:gad5d6a685731b3bf635995b7375af4d18"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf7456e37fa14f1834d9048d3789e9409"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__callbacks_group.html#gaf7456e37fa14f1834d9048d3789e9409">stanMsgHandler</a>) (<a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *sc, <a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a> *sub, const char *channel, <a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a> *msg, void *closure)</td></tr>
+<tr class="memdesc:gaf7456e37fa14f1834d9048d3789e9409"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback used to deliver messages to the application.  <a href="group__callbacks_group.html#gaf7456e37fa14f1834d9048d3789e9409">More...</a><br /></td></tr>
+<tr class="separator:gaf7456e37fa14f1834d9048d3789e9409"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gac34092f6c698374f86ad349302bdd55c"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__callbacks_group.html#gac34092f6c698374f86ad349302bdd55c">stanConnectionLostHandler</a>) (<a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *sc, const char *errorTxt, void *closure)</td></tr>
+<tr class="memdesc:gac34092f6c698374f86ad349302bdd55c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback used to notify the user of the permanent loss of the connection.  <a href="group__callbacks_group.html#gac34092f6c698374f86ad349302bdd55c">More...</a><br /></td></tr>
+<tr class="separator:gac34092f6c698374f86ad349302bdd55c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="enum-members" name="enum-members"></a>
+Enumerations</h2></td></tr>
+<tr class="memitem:ga410f8fb053efa02b2ca1de0c02fa4b6d"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga410f8fb053efa02b2ca1de0c02fa4b6d">jsRetentionPolicy</a> { <a class="el" href="group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6da6a2aa02f32acec6526d81f6e974e690f">js_LimitsPolicy</a> = 0
+, <a class="el" href="group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6dae874de4a787cfbec4c6d0eb1a3f05ebd">js_InterestPolicy</a>
+, <a class="el" href="group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6daf7e6581e69572691b01d1294a3c3a478">js_WorkQueuePolicy</a>
+ }</td></tr>
+<tr class="separator:ga410f8fb053efa02b2ca1de0c02fa4b6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga7f88b7d482488398074f9d1419a9b8c2"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga7f88b7d482488398074f9d1419a9b8c2">jsDiscardPolicy</a> { <a class="el" href="group__types_group.html#gga7f88b7d482488398074f9d1419a9b8c2abb31b828421634f1e6a1ef9359bc91f6">js_DiscardOld</a> = 0
+, <a class="el" href="group__types_group.html#gga7f88b7d482488398074f9d1419a9b8c2a99d7f2d740af26c340c0a4e2b72fb6ab">js_DiscardNew</a>
+ }</td></tr>
+<tr class="separator:ga7f88b7d482488398074f9d1419a9b8c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga1802a53c79e667f093bba033b16adc98"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga1802a53c79e667f093bba033b16adc98">jsStorageType</a> { <a class="el" href="group__types_group.html#gga1802a53c79e667f093bba033b16adc98a1d9dad1854cf374b22e3688b98284dec">js_FileStorage</a> = 0
+, <a class="el" href="group__types_group.html#gga1802a53c79e667f093bba033b16adc98a428ed10448726ad01c1db77a7f748314">js_MemoryStorage</a>
+ }</td></tr>
+<tr class="separator:ga1802a53c79e667f093bba033b16adc98"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga117ed2c35f89ef3144540ed9cbadc818"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga117ed2c35f89ef3144540ed9cbadc818">jsDeliverPolicy</a> { <br />
+&#160;&#160;<a class="el" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818ac692ba1363103768ac4bb58695549758">js_DeliverAll</a> = 0
+, <a class="el" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818abbd81d6c4e0f17f30e2186f1335e991d">js_DeliverLast</a>
+, <a class="el" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a82b8d36e17391212398984f92db9c381">js_DeliverNew</a>
+, <a class="el" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a06299d9c8262a16306ba6cc16d293c5e">js_DeliverByStartSequence</a>
+, <br />
+&#160;&#160;<a class="el" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a33317133d42f21bf5919827a691543f6">js_DeliverByStartTime</a>
+, <a class="el" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818abb50ebcd2fbafe27038c966121b9407b">js_DeliverLastPerSubject</a>
+<br />
+ }</td></tr>
+<tr class="separator:ga117ed2c35f89ef3144540ed9cbadc818"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga8fcb50e6e7312834791f9e237d28e873"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga8fcb50e6e7312834791f9e237d28e873">jsAckPolicy</a> { <a class="el" href="group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873a02d46a6395933c55c95ee5194bb6b80e">js_AckExplicit</a> = 0
+, <a class="el" href="group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873afd91fe31cf57c68863ca3090b07c296c">js_AckNone</a>
+, <a class="el" href="group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873a1232af28bf4e4b82e962174f1432ed4a">js_AckAll</a>
+ }</td></tr>
+<tr class="separator:ga8fcb50e6e7312834791f9e237d28e873"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga8650faf52b0b6b23df376eebeb9d0354"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga8650faf52b0b6b23df376eebeb9d0354">jsReplayPolicy</a> { <a class="el" href="group__types_group.html#gga8650faf52b0b6b23df376eebeb9d0354a2c4a1e2b75f31dd69a89b541d75afa44">js_ReplayInstant</a> = 0
+, <a class="el" href="group__types_group.html#gga8650faf52b0b6b23df376eebeb9d0354a6ee3851dac5c90a61492193dd55931f5">js_ReplayOriginal</a>
+ }</td></tr>
+<tr class="separator:ga8650faf52b0b6b23df376eebeb9d0354"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga89db3bd6bf11af3ac5eb3ab560d16332"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__types_group.html#ga89db3bd6bf11af3ac5eb3ab560d16332">kvOperation</a> { <a class="el" href="group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332a0b7a6bef67e4220f5f0c4075f2ed16b6">kvOp_Unknown</a> = 0
+, <a class="el" href="group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332acc0e1da3c292cb7eb19d909c9dfd788a">kvOp_Put</a>
+, <a class="el" href="group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332a4efb91331f3307128c75af5b23362f83">kvOp_Delete</a>
+, <a class="el" href="group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332aee19ab8144bf518e251ea2004309b657">kvOp_Purge</a>
+ }</td></tr>
+<tr class="separator:ga89db3bd6bf11af3ac5eb3ab560d16332"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:ga4a26d4caecb23348f6eee862c95fee7d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__library_group.html#ga4a26d4caecb23348f6eee862c95fee7d">nats_Open</a> (int64_t lockSpinCount)</td></tr>
+<tr class="memdesc:ga4a26d4caecb23348f6eee862c95fee7d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the library.  <a href="group__library_group.html#ga4a26d4caecb23348f6eee862c95fee7d">More...</a><br /></td></tr>
+<tr class="separator:ga4a26d4caecb23348f6eee862c95fee7d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga0d8c3df1c0c4a3d340d8ff81355fb1e8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__library_group.html#ga0d8c3df1c0c4a3d340d8ff81355fb1e8">nats_GetVersion</a> (void)</td></tr>
+<tr class="memdesc:ga0d8c3df1c0c4a3d340d8ff81355fb1e8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the Library's version.  <a href="group__library_group.html#ga0d8c3df1c0c4a3d340d8ff81355fb1e8">More...</a><br /></td></tr>
+<tr class="separator:ga0d8c3df1c0c4a3d340d8ff81355fb1e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga5fbbaa19b0290b654d2669a05bd512e8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__library_group.html#ga5fbbaa19b0290b654d2669a05bd512e8">nats_GetVersionNumber</a> (void)</td></tr>
+<tr class="memdesc:ga5fbbaa19b0290b654d2669a05bd512e8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the Library's version as a number.  <a href="group__library_group.html#ga5fbbaa19b0290b654d2669a05bd512e8">More...</a><br /></td></tr>
+<tr class="separator:ga5fbbaa19b0290b654d2669a05bd512e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga8c2ad4df801bd9d11564587ed3a7081e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__library_group.html#ga8c2ad4df801bd9d11564587ed3a7081e">nats_CheckCompatibility</a> (void)</td></tr>
+<tr class="memdesc:ga8c2ad4df801bd9d11564587ed3a7081e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check that the header is compatible with the library.  <a href="group__library_group.html#ga8c2ad4df801bd9d11564587ed3a7081e">More...</a><br /></td></tr>
+<tr class="separator:ga8c2ad4df801bd9d11564587ed3a7081e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaa3c10ba3ae001595007ad0dc5dccc15e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__library_group.html#gaa3c10ba3ae001595007ad0dc5dccc15e">nats_Now</a> (void)</td></tr>
+<tr class="memdesc:gaa3c10ba3ae001595007ad0dc5dccc15e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gives the current time in milliseconds.  <a href="group__library_group.html#gaa3c10ba3ae001595007ad0dc5dccc15e">More...</a><br /></td></tr>
+<tr class="separator:gaa3c10ba3ae001595007ad0dc5dccc15e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gacf5e423920d6a647df3bbf7de39d5223"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__library_group.html#gacf5e423920d6a647df3bbf7de39d5223">nats_NowInNanoSeconds</a> (void)</td></tr>
+<tr class="memdesc:gacf5e423920d6a647df3bbf7de39d5223"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gives the current time in nanoseconds.  <a href="group__library_group.html#gacf5e423920d6a647df3bbf7de39d5223">More...</a><br /></td></tr>
+<tr class="separator:gacf5e423920d6a647df3bbf7de39d5223"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gad5040264cd4b1404956babf3c03a4f09"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__library_group.html#gad5040264cd4b1404956babf3c03a4f09">nats_Sleep</a> (int64_t sleepTime)</td></tr>
+<tr class="memdesc:gad5040264cd4b1404956babf3c03a4f09"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sleeps for a given number of milliseconds.  <a href="group__library_group.html#gad5040264cd4b1404956babf3c03a4f09">More...</a><br /></td></tr>
+<tr class="separator:gad5040264cd4b1404956babf3c03a4f09"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gadecfd49a58b581dbba40da77b195fd85"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__library_group.html#gadecfd49a58b581dbba40da77b195fd85">nats_GetLastError</a> (<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> *status)</td></tr>
+<tr class="memdesc:gadecfd49a58b581dbba40da77b195fd85"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the calling thread's last known error.  <a href="group__library_group.html#gadecfd49a58b581dbba40da77b195fd85">More...</a><br /></td></tr>
+<tr class="separator:gadecfd49a58b581dbba40da77b195fd85"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaca24172e1b97ca01cee29ca437f5702e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__library_group.html#gaca24172e1b97ca01cee29ca437f5702e">nats_GetLastErrorStack</a> (char *buffer, size_t bufLen)</td></tr>
+<tr class="memdesc:gaca24172e1b97ca01cee29ca437f5702e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the calling thread's last known error stack.  <a href="group__library_group.html#gaca24172e1b97ca01cee29ca437f5702e">More...</a><br /></td></tr>
+<tr class="separator:gaca24172e1b97ca01cee29ca437f5702e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga5fab3b18c4fe3630254483575f6066f4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__library_group.html#ga5fab3b18c4fe3630254483575f6066f4">nats_PrintLastErrorStack</a> (FILE *file)</td></tr>
+<tr class="memdesc:ga5fab3b18c4fe3630254483575f6066f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prints the calling thread's last known error stack into the file.  <a href="group__library_group.html#ga5fab3b18c4fe3630254483575f6066f4">More...</a><br /></td></tr>
+<tr class="separator:ga5fab3b18c4fe3630254483575f6066f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gab21e94ce7a7d226611ea2c05914cf19d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__library_group.html#gab21e94ce7a7d226611ea2c05914cf19d">nats_SetMessageDeliveryPoolSize</a> (int max)</td></tr>
+<tr class="memdesc:gab21e94ce7a7d226611ea2c05914cf19d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the maximum size of the global message delivery thread pool.  <a href="group__library_group.html#gab21e94ce7a7d226611ea2c05914cf19d">More...</a><br /></td></tr>
+<tr class="separator:gab21e94ce7a7d226611ea2c05914cf19d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gafe171baefa00a85b77205116e9f3e48a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__library_group.html#gafe171baefa00a85b77205116e9f3e48a">nats_ReleaseThreadMemory</a> (void)</td></tr>
+<tr class="memdesc:gafe171baefa00a85b77205116e9f3e48a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Release thread-local memory possibly allocated by the library.  <a href="group__library_group.html#gafe171baefa00a85b77205116e9f3e48a">More...</a><br /></td></tr>
+<tr class="separator:gafe171baefa00a85b77205116e9f3e48a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf781f246e2e0ab24623ca667c48dc3ba"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__library_group.html#gaf781f246e2e0ab24623ca667c48dc3ba">nats_Sign</a> (const char *encodedSeed, const char *input, unsigned char **signature, int *signatureLength)</td></tr>
+<tr class="memdesc:gaf781f246e2e0ab24623ca667c48dc3ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Signs a given text using the provided private key.  <a href="group__library_group.html#gaf781f246e2e0ab24623ca667c48dc3ba">More...</a><br /></td></tr>
+<tr class="separator:gaf781f246e2e0ab24623ca667c48dc3ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gae75131e0ce4e5b89d0f82ea7892f112e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__library_group.html#gae75131e0ce4e5b89d0f82ea7892f112e">nats_Close</a> (void)</td></tr>
+<tr class="memdesc:gae75131e0ce4e5b89d0f82ea7892f112e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tear down the library.  <a href="group__library_group.html#gae75131e0ce4e5b89d0f82ea7892f112e">More...</a><br /></td></tr>
+<tr class="separator:gae75131e0ce4e5b89d0f82ea7892f112e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf75bb5b38bf32e6a8f43e54068625903"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__library_group.html#gaf75bb5b38bf32e6a8f43e54068625903">nats_CloseAndWait</a> (int64_t timeout)</td></tr>
+<tr class="memdesc:gaf75bb5b38bf32e6a8f43e54068625903"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tear down the library and wait for all resources to be released.  <a href="group__library_group.html#gaf75bb5b38bf32e6a8f43e54068625903">More...</a><br /></td></tr>
+<tr class="separator:gaf75bb5b38bf32e6a8f43e54068625903"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga4a83c4a08f1e4dd9451c1a88b6a4254e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__status_group.html#ga4a83c4a08f1e4dd9451c1a88b6a4254e">natsStatus_GetText</a> (<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> s)</td></tr>
+<tr class="memdesc:ga4a83c4a08f1e4dd9451c1a88b6a4254e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the text corresponding to a <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80" title="Status returned by most of the APIs.">natsStatus</a>.  <a href="group__status_group.html#ga4a83c4a08f1e4dd9451c1a88b6a4254e">More...</a><br /></td></tr>
+<tr class="separator:ga4a83c4a08f1e4dd9451c1a88b6a4254e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gafa923df029168f4991b77ffdd9e24877"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stats_group.html#gafa923df029168f4991b77ffdd9e24877">natsStatistics_Create</a> (<a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa">natsStatistics</a> **newStats)</td></tr>
+<tr class="memdesc:gafa923df029168f4991b77ffdd9e24877"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a <a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa" title="Statistics of a natsConnection.">natsStatistics</a> object.  <a href="group__stats_group.html#gafa923df029168f4991b77ffdd9e24877">More...</a><br /></td></tr>
+<tr class="separator:gafa923df029168f4991b77ffdd9e24877"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gad85f5ffb4272713f6cc6d988e6d4e75f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stats_group.html#gad85f5ffb4272713f6cc6d988e6d4e75f">natsStatistics_GetCounts</a> (const <a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa">natsStatistics</a> *stats, uint64_t *inMsgs, uint64_t *inBytes, uint64_t *outMsgs, uint64_t *outBytes, uint64_t *reconnects)</td></tr>
+<tr class="memdesc:gad85f5ffb4272713f6cc6d988e6d4e75f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Extracts the various statistics values.  <a href="group__stats_group.html#gad85f5ffb4272713f6cc6d988e6d4e75f">More...</a><br /></td></tr>
+<tr class="separator:gad85f5ffb4272713f6cc6d988e6d4e75f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga26a04e77af8fc160adf7c33088dcf59c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stats_group.html#ga26a04e77af8fc160adf7c33088dcf59c">natsStatistics_Destroy</a> (<a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa">natsStatistics</a> *stats)</td></tr>
+<tr class="memdesc:ga26a04e77af8fc160adf7c33088dcf59c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the <a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa" title="Statistics of a natsConnection.">natsStatistics</a> object.  <a href="group__stats_group.html#ga26a04e77af8fc160adf7c33088dcf59c">More...</a><br /></td></tr>
+<tr class="separator:ga26a04e77af8fc160adf7c33088dcf59c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga61d4a0cf2fbf7d13cc910e5a00c575be"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga61d4a0cf2fbf7d13cc910e5a00c575be">natsOptions_Create</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> **newOpts)</td></tr>
+<tr class="memdesc:ga61d4a0cf2fbf7d13cc910e5a00c575be"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object.  <a href="group__opts_group.html#ga61d4a0cf2fbf7d13cc910e5a00c575be">More...</a><br /></td></tr>
+<tr class="separator:ga61d4a0cf2fbf7d13cc910e5a00c575be"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga3f7e760214417c7d87541ecb9ab5bea5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga3f7e760214417c7d87541ecb9ab5bea5">natsOptions_SetURL</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *url)</td></tr>
+<tr class="memdesc:ga3f7e760214417c7d87541ecb9ab5bea5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the URL to connect to.  <a href="group__opts_group.html#ga3f7e760214417c7d87541ecb9ab5bea5">More...</a><br /></td></tr>
+<tr class="separator:ga3f7e760214417c7d87541ecb9ab5bea5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gacb7e964ae54b74d972d72e118b7b8bdf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gacb7e964ae54b74d972d72e118b7b8bdf">natsOptions_SetServers</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char **servers, int serversCount)</td></tr>
+<tr class="memdesc:gacb7e964ae54b74d972d72e118b7b8bdf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the list of servers to try to (re)connect to.  <a href="group__opts_group.html#gacb7e964ae54b74d972d72e118b7b8bdf">More...</a><br /></td></tr>
+<tr class="separator:gacb7e964ae54b74d972d72e118b7b8bdf"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga5b99da7dd74aac3be962f323c3863d9e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga5b99da7dd74aac3be962f323c3863d9e">natsOptions_SetUserInfo</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *user, const char *password)</td></tr>
+<tr class="memdesc:ga5b99da7dd74aac3be962f323c3863d9e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the user name/password to use when not specified in the URL.  <a href="group__opts_group.html#ga5b99da7dd74aac3be962f323c3863d9e">More...</a><br /></td></tr>
+<tr class="separator:ga5b99da7dd74aac3be962f323c3863d9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gad58a5b9dabadeebda30e952ff7b39193"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gad58a5b9dabadeebda30e952ff7b39193">natsOptions_SetToken</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *token)</td></tr>
+<tr class="memdesc:gad58a5b9dabadeebda30e952ff7b39193"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the token to use when not specified in the URL.  <a href="group__opts_group.html#gad58a5b9dabadeebda30e952ff7b39193">More...</a><br /></td></tr>
+<tr class="separator:gad58a5b9dabadeebda30e952ff7b39193"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga23a3b1f022112e98ddccb18b247b4426"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga23a3b1f022112e98ddccb18b247b4426">natsOptions_SetTokenHandler</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <a class="el" href="group__callbacks_group.html#ga4b02de70fe9380d184fd01d87527f499">natsTokenHandler</a> tokenCb, void *closure)</td></tr>
+<tr class="memdesc:ga23a3b1f022112e98ddccb18b247b4426"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the tokenCb to use whenever a token is needed.  <a href="group__opts_group.html#ga23a3b1f022112e98ddccb18b247b4426">More...</a><br /></td></tr>
+<tr class="separator:ga23a3b1f022112e98ddccb18b247b4426"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaabf8763b931dcf389c83fd95d760a413"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gaabf8763b931dcf389c83fd95d760a413">natsOptions_SetNoRandomize</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool noRandomize)</td></tr>
+<tr class="memdesc:gaabf8763b931dcf389c83fd95d760a413"><td class="mdescLeft">&#160;</td><td class="mdescRight">Indicate if the servers list should be randomized.  <a href="group__opts_group.html#gaabf8763b931dcf389c83fd95d760a413">More...</a><br /></td></tr>
+<tr class="separator:gaabf8763b931dcf389c83fd95d760a413"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga17cd7fe41176cd98aca1184fa9352ad9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga17cd7fe41176cd98aca1184fa9352ad9">natsOptions_SetTimeout</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int64_t timeout)</td></tr>
+<tr class="memdesc:ga17cd7fe41176cd98aca1184fa9352ad9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the (re)connect process timeout.  <a href="group__opts_group.html#ga17cd7fe41176cd98aca1184fa9352ad9">More...</a><br /></td></tr>
+<tr class="separator:ga17cd7fe41176cd98aca1184fa9352ad9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga1c529d347be0fe2eec17c7f4698e283e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga1c529d347be0fe2eec17c7f4698e283e">natsOptions_SetName</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *name)</td></tr>
+<tr class="memdesc:ga1c529d347be0fe2eec17c7f4698e283e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the name.  <a href="group__opts_group.html#ga1c529d347be0fe2eec17c7f4698e283e">More...</a><br /></td></tr>
+<tr class="separator:ga1c529d347be0fe2eec17c7f4698e283e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaa1f09416d443fa7a6af6b695da563eba"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gaa1f09416d443fa7a6af6b695da563eba">natsOptions_SetSecure</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool secure)</td></tr>
+<tr class="memdesc:gaa1f09416d443fa7a6af6b695da563eba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the secure mode.  <a href="group__opts_group.html#gaa1f09416d443fa7a6af6b695da563eba">More...</a><br /></td></tr>
+<tr class="separator:gaa1f09416d443fa7a6af6b695da563eba"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2cd6563694a439b3949a31fd81103099"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga2cd6563694a439b3949a31fd81103099">natsOptions_LoadCATrustedCertificates</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *fileName)</td></tr>
+<tr class="memdesc:ga2cd6563694a439b3949a31fd81103099"><td class="mdescLeft">&#160;</td><td class="mdescRight">Loads the trusted CA certificates from a file.  <a href="group__opts_group.html#ga2cd6563694a439b3949a31fd81103099">More...</a><br /></td></tr>
+<tr class="separator:ga2cd6563694a439b3949a31fd81103099"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gafb30794fc2ae74b9e0bd8fb609b901c8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gafb30794fc2ae74b9e0bd8fb609b901c8">natsOptions_SetCATrustedCertificates</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *certificates)</td></tr>
+<tr class="memdesc:gafb30794fc2ae74b9e0bd8fb609b901c8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the trusted CA certificates from memory.  <a href="group__opts_group.html#gafb30794fc2ae74b9e0bd8fb609b901c8">More...</a><br /></td></tr>
+<tr class="separator:gafb30794fc2ae74b9e0bd8fb609b901c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga36943e2ba53d05407cdabc4e7e96484b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga36943e2ba53d05407cdabc4e7e96484b">natsOptions_LoadCertificatesChain</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *certsFileName, const char *keyFileName)</td></tr>
+<tr class="memdesc:ga36943e2ba53d05407cdabc4e7e96484b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Loads the certificate chain from a file, using the given key.  <a href="group__opts_group.html#ga36943e2ba53d05407cdabc4e7e96484b">More...</a><br /></td></tr>
+<tr class="separator:ga36943e2ba53d05407cdabc4e7e96484b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gae98f0f9034e93941767ab1ae6eec2c0c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gae98f0f9034e93941767ab1ae6eec2c0c">natsOptions_SetCertificatesChain</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *cert, const char *key)</td></tr>
+<tr class="memdesc:gae98f0f9034e93941767ab1ae6eec2c0c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the client certificate and key.  <a href="group__opts_group.html#gae98f0f9034e93941767ab1ae6eec2c0c">More...</a><br /></td></tr>
+<tr class="separator:gae98f0f9034e93941767ab1ae6eec2c0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga5698f020e8eb3e7440eb073fe08ef62c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga5698f020e8eb3e7440eb073fe08ef62c">natsOptions_SetCiphers</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *ciphers)</td></tr>
+<tr class="memdesc:ga5698f020e8eb3e7440eb073fe08ef62c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the list of available ciphers.  <a href="group__opts_group.html#ga5698f020e8eb3e7440eb073fe08ef62c">More...</a><br /></td></tr>
+<tr class="separator:ga5698f020e8eb3e7440eb073fe08ef62c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2b7f144b011d8ce62941b608a8f324f0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga2b7f144b011d8ce62941b608a8f324f0">natsOptions_SetCipherSuites</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *ciphers)</td></tr>
+<tr class="memdesc:ga2b7f144b011d8ce62941b608a8f324f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the list of available ciphers for TLSv1.3.  <a href="group__opts_group.html#ga2b7f144b011d8ce62941b608a8f324f0">More...</a><br /></td></tr>
+<tr class="separator:ga2b7f144b011d8ce62941b608a8f324f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga0ba43ba9930df385e4781b12be9f2851"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga0ba43ba9930df385e4781b12be9f2851">natsOptions_SetExpectedHostname</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *hostname)</td></tr>
+<tr class="memdesc:ga0ba43ba9930df385e4781b12be9f2851"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the server certificate's expected hostname.  <a href="group__opts_group.html#ga0ba43ba9930df385e4781b12be9f2851">More...</a><br /></td></tr>
+<tr class="separator:ga0ba43ba9930df385e4781b12be9f2851"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga6f804ec44adc299989fe623570679da3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga6f804ec44adc299989fe623570679da3">natsOptions_SkipServerVerification</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool skip)</td></tr>
+<tr class="memdesc:ga6f804ec44adc299989fe623570679da3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Switch server certificate verification.  <a href="group__opts_group.html#ga6f804ec44adc299989fe623570679da3">More...</a><br /></td></tr>
+<tr class="separator:ga6f804ec44adc299989fe623570679da3"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaa16bfd09ef318af18c27a0e199681b69"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gaa16bfd09ef318af18c27a0e199681b69">natsOptions_SetVerbose</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool verbose)</td></tr>
+<tr class="memdesc:gaa16bfd09ef318af18c27a0e199681b69"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the verbose mode.  <a href="group__opts_group.html#gaa16bfd09ef318af18c27a0e199681b69">More...</a><br /></td></tr>
+<tr class="separator:gaa16bfd09ef318af18c27a0e199681b69"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga26f166af20de98bec67bc6cc916f769e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga26f166af20de98bec67bc6cc916f769e">natsOptions_SetPedantic</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool pedantic)</td></tr>
+<tr class="memdesc:ga26f166af20de98bec67bc6cc916f769e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the pedantic mode.  <a href="group__opts_group.html#ga26f166af20de98bec67bc6cc916f769e">More...</a><br /></td></tr>
+<tr class="separator:ga26f166af20de98bec67bc6cc916f769e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gae68fb615835364c0809555e8dc93f57e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gae68fb615835364c0809555e8dc93f57e">natsOptions_SetPingInterval</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int64_t interval)</td></tr>
+<tr class="memdesc:gae68fb615835364c0809555e8dc93f57e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the ping interval.  <a href="group__opts_group.html#gae68fb615835364c0809555e8dc93f57e">More...</a><br /></td></tr>
+<tr class="separator:gae68fb615835364c0809555e8dc93f57e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaaff89c3f41627f4b2929dbc9b82d265b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gaaff89c3f41627f4b2929dbc9b82d265b">natsOptions_SetMaxPingsOut</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int maxPingsOut)</td></tr>
+<tr class="memdesc:gaaff89c3f41627f4b2929dbc9b82d265b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the limit of outstanding <code>PING</code>s without corresponding <code>PONG</code>s.  <a href="group__opts_group.html#gaaff89c3f41627f4b2929dbc9b82d265b">More...</a><br /></td></tr>
+<tr class="separator:gaaff89c3f41627f4b2929dbc9b82d265b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga1a3e3abfd7ddd8aff247df8f332bbda3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga1a3e3abfd7ddd8aff247df8f332bbda3">natsOptions_SetIOBufSize</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int ioBufSize)</td></tr>
+<tr class="memdesc:ga1a3e3abfd7ddd8aff247df8f332bbda3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the size of the internal read/write buffers.  <a href="group__opts_group.html#ga1a3e3abfd7ddd8aff247df8f332bbda3">More...</a><br /></td></tr>
+<tr class="separator:ga1a3e3abfd7ddd8aff247df8f332bbda3"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga3d1d3cb2f2a0e23d27dd60e96d1cc91b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga3d1d3cb2f2a0e23d27dd60e96d1cc91b">natsOptions_SetAllowReconnect</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool allow)</td></tr>
+<tr class="memdesc:ga3d1d3cb2f2a0e23d27dd60e96d1cc91b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Indicates if the connection will be allowed to reconnect.  <a href="group__opts_group.html#ga3d1d3cb2f2a0e23d27dd60e96d1cc91b">More...</a><br /></td></tr>
+<tr class="separator:ga3d1d3cb2f2a0e23d27dd60e96d1cc91b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gab54cd2719c0b64eebd6c7b83dd2908a0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gab54cd2719c0b64eebd6c7b83dd2908a0">natsOptions_SetMaxReconnect</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int maxReconnect)</td></tr>
+<tr class="memdesc:gab54cd2719c0b64eebd6c7b83dd2908a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the maximum number of reconnect attempts.  <a href="group__opts_group.html#gab54cd2719c0b64eebd6c7b83dd2908a0">More...</a><br /></td></tr>
+<tr class="separator:gab54cd2719c0b64eebd6c7b83dd2908a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2730f4e16e318a2ef8de98dbf6ede807"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga2730f4e16e318a2ef8de98dbf6ede807">natsOptions_SetReconnectWait</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int64_t reconnectWait)</td></tr>
+<tr class="memdesc:ga2730f4e16e318a2ef8de98dbf6ede807"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the time between reconnect attempts.  <a href="group__opts_group.html#ga2730f4e16e318a2ef8de98dbf6ede807">More...</a><br /></td></tr>
+<tr class="separator:ga2730f4e16e318a2ef8de98dbf6ede807"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga8f3df57ed8ae418d3ae6678ae5e2a5d2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga8f3df57ed8ae418d3ae6678ae5e2a5d2">natsOptions_SetReconnectJitter</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int64_t jitter, int64_t jitterTLS)</td></tr>
+<tr class="memdesc:ga8f3df57ed8ae418d3ae6678ae5e2a5d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the upper bound of a random delay added to reconnect wait.  <a href="group__opts_group.html#ga8f3df57ed8ae418d3ae6678ae5e2a5d2">More...</a><br /></td></tr>
+<tr class="separator:ga8f3df57ed8ae418d3ae6678ae5e2a5d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga3593165aa113d6736e0226ddc56b3e9d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga3593165aa113d6736e0226ddc56b3e9d">natsOptions_SetCustomReconnectDelay</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <a class="el" href="group__callbacks_group.html#ga3353d4b92851c52121f65aaf0684cba4">natsCustomReconnectDelayHandler</a> cb, void *closure)</td></tr>
+<tr class="memdesc:ga3593165aa113d6736e0226ddc56b3e9d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the handler to invoke when the library needs to wait before the next reconnect attempts.  <a href="group__opts_group.html#ga3593165aa113d6736e0226ddc56b3e9d">More...</a><br /></td></tr>
+<tr class="separator:ga3593165aa113d6736e0226ddc56b3e9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaa0d4b7ece8477cb9879f0dafff3456a5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gaa0d4b7ece8477cb9879f0dafff3456a5">natsOptions_SetReconnectBufSize</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int reconnectBufSize)</td></tr>
+<tr class="memdesc:gaa0d4b7ece8477cb9879f0dafff3456a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the size of the backing buffer used during reconnect.  <a href="group__opts_group.html#gaa0d4b7ece8477cb9879f0dafff3456a5">More...</a><br /></td></tr>
+<tr class="separator:gaa0d4b7ece8477cb9879f0dafff3456a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga95510436eee06f9992ded96a44795c40"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga95510436eee06f9992ded96a44795c40">natsOptions_SetMaxPendingMsgs</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int maxPending)</td></tr>
+<tr class="memdesc:ga95510436eee06f9992ded96a44795c40"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the maximum number of pending messages per subscription.  <a href="group__opts_group.html#ga95510436eee06f9992ded96a44795c40">More...</a><br /></td></tr>
+<tr class="separator:ga95510436eee06f9992ded96a44795c40"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga127ec7a8196b453947a7fa9a64096cbd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga127ec7a8196b453947a7fa9a64096cbd">natsOptions_SetErrorHandler</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <a class="el" href="group__callbacks_group.html#ga9e511dffa471dfb971b7dd2b12329626">natsErrHandler</a> errHandler, void *closure)</td></tr>
+<tr class="memdesc:ga127ec7a8196b453947a7fa9a64096cbd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the error handler for asynchronous events.  <a href="group__opts_group.html#ga127ec7a8196b453947a7fa9a64096cbd">More...</a><br /></td></tr>
+<tr class="separator:ga127ec7a8196b453947a7fa9a64096cbd"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga44410242e73134e5bb51ef27904a9253"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga44410242e73134e5bb51ef27904a9253">natsOptions_SetClosedCB</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <a class="el" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a> closedCb, void *closure)</td></tr>
+<tr class="memdesc:ga44410242e73134e5bb51ef27904a9253"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the callback to be invoked when a connection to a server is permanently lost.  <a href="group__opts_group.html#ga44410242e73134e5bb51ef27904a9253">More...</a><br /></td></tr>
+<tr class="separator:ga44410242e73134e5bb51ef27904a9253"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gadc8dc0cedd91bda71d544f3dedc4a039"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gadc8dc0cedd91bda71d544f3dedc4a039">natsOptions_SetDisconnectedCB</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <a class="el" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a> disconnectedCb, void *closure)</td></tr>
+<tr class="memdesc:gadc8dc0cedd91bda71d544f3dedc4a039"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the callback to be invoked when the connection to a server is lost.  <a href="group__opts_group.html#gadc8dc0cedd91bda71d544f3dedc4a039">More...</a><br /></td></tr>
+<tr class="separator:gadc8dc0cedd91bda71d544f3dedc4a039"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga26a48c8529fffa5f5d1a61c030979980"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga26a48c8529fffa5f5d1a61c030979980">natsOptions_SetReconnectedCB</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <a class="el" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a> reconnectedCb, void *closure)</td></tr>
+<tr class="memdesc:ga26a48c8529fffa5f5d1a61c030979980"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the callback to be invoked when the connection has reconnected.  <a href="group__opts_group.html#ga26a48c8529fffa5f5d1a61c030979980">More...</a><br /></td></tr>
+<tr class="separator:ga26a48c8529fffa5f5d1a61c030979980"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gab5baab507c974402ab0d8c5e8227ee65"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gab5baab507c974402ab0d8c5e8227ee65">natsOptions_SetDiscoveredServersCB</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <a class="el" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a> discoveredServersCb, void *closure)</td></tr>
+<tr class="memdesc:gab5baab507c974402ab0d8c5e8227ee65"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the callback to be invoked when new servers are discovered.  <a href="group__opts_group.html#gab5baab507c974402ab0d8c5e8227ee65">More...</a><br /></td></tr>
+<tr class="separator:gab5baab507c974402ab0d8c5e8227ee65"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga7e4172084520708b8c9f28e73174461c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga7e4172084520708b8c9f28e73174461c">natsOptions_SetIgnoreDiscoveredServers</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool ignore)</td></tr>
+<tr class="memdesc:ga7e4172084520708b8c9f28e73174461c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets if the library should ignore or not discovered servers.  <a href="group__opts_group.html#ga7e4172084520708b8c9f28e73174461c">More...</a><br /></td></tr>
+<tr class="separator:ga7e4172084520708b8c9f28e73174461c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga54dea2ffeb33779771652a7a14fc4adc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga54dea2ffeb33779771652a7a14fc4adc">natsOptions_SetLameDuckModeCB</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <a class="el" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a> lameDuckCb, void *closure)</td></tr>
+<tr class="memdesc:ga54dea2ffeb33779771652a7a14fc4adc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the callback to be invoked when server enters lame duck mode.  <a href="group__opts_group.html#ga54dea2ffeb33779771652a7a14fc4adc">More...</a><br /></td></tr>
+<tr class="separator:ga54dea2ffeb33779771652a7a14fc4adc"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gab09491bad908dedcb323c780280733ff"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gab09491bad908dedcb323c780280733ff">natsOptions_SetEventLoop</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, void *loop, <a class="el" href="group__callbacks_group.html#ga245eab0a01a485e40fba267f84ec037f">natsEvLoop_Attach</a> attachCb, <a class="el" href="group__callbacks_group.html#gaea4c125ecfb43eaf43da20e8444c2aaa">natsEvLoop_ReadAddRemove</a> readCb, <a class="el" href="group__callbacks_group.html#ga2bb5dd2d821ca5bbc0488f7e6aceed17">natsEvLoop_WriteAddRemove</a> writeCb, <a class="el" href="group__callbacks_group.html#gab63dee7f7012ba11ae20b76dbc36f2d0">natsEvLoop_Detach</a> detachCb)</td></tr>
+<tr class="memdesc:gab09491bad908dedcb323c780280733ff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the external event loop and associated callbacks.  <a href="group__opts_group.html#gab09491bad908dedcb323c780280733ff">More...</a><br /></td></tr>
+<tr class="separator:gab09491bad908dedcb323c780280733ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gabf060c92648b50c069f0abe7cbb06f1c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gabf060c92648b50c069f0abe7cbb06f1c">natsOptions_UseGlobalMessageDelivery</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool global)</td></tr>
+<tr class="memdesc:gabf060c92648b50c069f0abe7cbb06f1c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Switch on/off the use of a central message delivery thread pool.  <a href="group__opts_group.html#gabf060c92648b50c069f0abe7cbb06f1c">More...</a><br /></td></tr>
+<tr class="separator:gabf060c92648b50c069f0abe7cbb06f1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga7ca713c7532eff4d41a492e95b8822cf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga7ca713c7532eff4d41a492e95b8822cf">natsOptions_IPResolutionOrder</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int order)</td></tr>
+<tr class="memdesc:ga7ca713c7532eff4d41a492e95b8822cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Dictates the order in which host name are resolved during connect.  <a href="group__opts_group.html#ga7ca713c7532eff4d41a492e95b8822cf">More...</a><br /></td></tr>
+<tr class="separator:ga7ca713c7532eff4d41a492e95b8822cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga8f06568cc3319a5a0eef9f80282034ca"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga8f06568cc3319a5a0eef9f80282034ca">natsOptions_SetSendAsap</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool sendAsap)</td></tr>
+<tr class="memdesc:ga8f06568cc3319a5a0eef9f80282034ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets if Publish calls should send data right away.  <a href="group__opts_group.html#ga8f06568cc3319a5a0eef9f80282034ca">More...</a><br /></td></tr>
+<tr class="separator:ga8f06568cc3319a5a0eef9f80282034ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga70aa85319933d78c0076cc862fa3e5a6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga70aa85319933d78c0076cc862fa3e5a6">natsOptions_UseOldRequestStyle</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool useOldStyle)</td></tr>
+<tr class="memdesc:ga70aa85319933d78c0076cc862fa3e5a6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Switches the use of old style requests.  <a href="group__opts_group.html#ga70aa85319933d78c0076cc862fa3e5a6">More...</a><br /></td></tr>
+<tr class="separator:ga70aa85319933d78c0076cc862fa3e5a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gadef4376a5e608cbc8c1a9e2b6335dc79"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gadef4376a5e608cbc8c1a9e2b6335dc79">natsOptions_SetFailRequestsOnDisconnect</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool failRequests)</td></tr>
+<tr class="memdesc:gadef4376a5e608cbc8c1a9e2b6335dc79"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fails pending requests on disconnect event.  <a href="group__opts_group.html#gadef4376a5e608cbc8c1a9e2b6335dc79">More...</a><br /></td></tr>
+<tr class="separator:gadef4376a5e608cbc8c1a9e2b6335dc79"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga4f694b87039cedaa65cd25656b14d1a3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga4f694b87039cedaa65cd25656b14d1a3">natsOptions_SetNoEcho</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool noEcho)</td></tr>
+<tr class="memdesc:ga4f694b87039cedaa65cd25656b14d1a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets if connection receives its own messages.  <a href="group__opts_group.html#ga4f694b87039cedaa65cd25656b14d1a3">More...</a><br /></td></tr>
+<tr class="separator:ga4f694b87039cedaa65cd25656b14d1a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga20946800d024b7089e73d63454d1c19f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga20946800d024b7089e73d63454d1c19f">natsOptions_SetRetryOnFailedConnect</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool retry, <a class="el" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a> connectedCb, void *closure)</td></tr>
+<tr class="memdesc:ga20946800d024b7089e73d63454d1c19f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Indicates if initial connect failure should be retried or not.  <a href="group__opts_group.html#ga20946800d024b7089e73d63454d1c19f">More...</a><br /></td></tr>
+<tr class="separator:ga20946800d024b7089e73d63454d1c19f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga60117450fc1f7b6f81bab455aeed7515"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga60117450fc1f7b6f81bab455aeed7515">natsOptions_SetUserCredentialsCallbacks</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <a class="el" href="group__callbacks_group.html#ga258b30458134be90f17315c037f34b7b">natsUserJWTHandler</a> ujwtCB, void *ujwtClosure, <a class="el" href="group__callbacks_group.html#gab786ffd670c86de0563559351305080b">natsSignatureHandler</a> sigCB, void *sigClosure)</td></tr>
+<tr class="memdesc:ga60117450fc1f7b6f81bab455aeed7515"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the callbacks to fetch user JWT and sign server's nonce.  <a href="group__opts_group.html#ga60117450fc1f7b6f81bab455aeed7515">More...</a><br /></td></tr>
+<tr class="separator:ga60117450fc1f7b6f81bab455aeed7515"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga59b47f7b7a19085cf8eaada9bfe5606e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga59b47f7b7a19085cf8eaada9bfe5606e">natsOptions_SetUserCredentialsFromFiles</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *userOrChainedFile, const char *seedFile)</td></tr>
+<tr class="memdesc:ga59b47f7b7a19085cf8eaada9bfe5606e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the file(s) to use to fetch user JWT and seed required to sign nonce.  <a href="group__opts_group.html#ga59b47f7b7a19085cf8eaada9bfe5606e">More...</a><br /></td></tr>
+<tr class="separator:ga59b47f7b7a19085cf8eaada9bfe5606e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga0290eac4665569c850468d9f00e246a0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga0290eac4665569c850468d9f00e246a0">natsOptions_SetNKey</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *pubKey, <a class="el" href="group__callbacks_group.html#gab786ffd670c86de0563559351305080b">natsSignatureHandler</a> sigCB, void *sigClosure)</td></tr>
+<tr class="memdesc:ga0290eac4665569c850468d9f00e246a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the NKey public key and signature callback.  <a href="group__opts_group.html#ga0290eac4665569c850468d9f00e246a0">More...</a><br /></td></tr>
+<tr class="separator:ga0290eac4665569c850468d9f00e246a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga696f02e0493c00d3c1eafff45b62b68e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga696f02e0493c00d3c1eafff45b62b68e">natsOptions_SetNKeyFromSeed</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *pubKey, const char *seedFile)</td></tr>
+<tr class="memdesc:ga696f02e0493c00d3c1eafff45b62b68e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the NKey public key and its seed file.  <a href="group__opts_group.html#ga696f02e0493c00d3c1eafff45b62b68e">More...</a><br /></td></tr>
+<tr class="separator:ga696f02e0493c00d3c1eafff45b62b68e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaafda5fb8d9ee3a17bd475ceaecfac218"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gaafda5fb8d9ee3a17bd475ceaecfac218">natsOptions_SetWriteDeadline</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int64_t deadline)</td></tr>
+<tr class="memdesc:gaafda5fb8d9ee3a17bd475ceaecfac218"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the write deadline.  <a href="group__opts_group.html#gaafda5fb8d9ee3a17bd475ceaecfac218">More...</a><br /></td></tr>
+<tr class="separator:gaafda5fb8d9ee3a17bd475ceaecfac218"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga192465163abb87ad48a843b45cdf9984"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga192465163abb87ad48a843b45cdf9984">natsOptions_DisableNoResponders</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool disabled)</td></tr>
+<tr class="memdesc:ga192465163abb87ad48a843b45cdf9984"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable/Disable the "no responders" feature.  <a href="group__opts_group.html#ga192465163abb87ad48a843b45cdf9984">More...</a><br /></td></tr>
+<tr class="separator:ga192465163abb87ad48a843b45cdf9984"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gac5173473a731a4a36d15346fedddf91f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gac5173473a731a4a36d15346fedddf91f">natsOptions_SetCustomInboxPrefix</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *inboxPrefix)</td></tr>
+<tr class="memdesc:gac5173473a731a4a36d15346fedddf91f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets a custom inbox prefix.  <a href="group__opts_group.html#gac5173473a731a4a36d15346fedddf91f">More...</a><br /></td></tr>
+<tr class="separator:gac5173473a731a4a36d15346fedddf91f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga93d8068cd6fff53b7f8e1c403db45eb9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga93d8068cd6fff53b7f8e1c403db45eb9">natsOptions_Destroy</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts)</td></tr>
+<tr class="memdesc:ga93d8068cd6fff53b7f8e1c403db45eb9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys a <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection.">natsOptions</a> object.  <a href="group__opts_group.html#ga93d8068cd6fff53b7f8e1c403db45eb9">More...</a><br /></td></tr>
+<tr class="separator:ga93d8068cd6fff53b7f8e1c403db45eb9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaff52a1ce90253b4bdbb0005fca4f71b6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_opts_group.html#gaff52a1ce90253b4bdbb0005fca4f71b6">stanConnOptions_Create</a> (<a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> **newOpts)</td></tr>
+<tr class="memdesc:gaff52a1ce90253b4bdbb0005fca4f71b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a <a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1" title="Way to configure a stanConnection.">stanConnOptions</a> object.  <a href="group__stan_conn_opts_group.html#gaff52a1ce90253b4bdbb0005fca4f71b6">More...</a><br /></td></tr>
+<tr class="separator:gaff52a1ce90253b4bdbb0005fca4f71b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga3c6d511fc1e1febcdf5344960de5a0b3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_opts_group.html#ga3c6d511fc1e1febcdf5344960de5a0b3">stanConnOptions_SetURL</a> (<a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *opts, const char *url)</td></tr>
+<tr class="memdesc:ga3c6d511fc1e1febcdf5344960de5a0b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the URL to connect to.  <a href="group__stan_conn_opts_group.html#ga3c6d511fc1e1febcdf5344960de5a0b3">More...</a><br /></td></tr>
+<tr class="separator:ga3c6d511fc1e1febcdf5344960de5a0b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gae3fc9a4daa7f85367811a313857337b4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_opts_group.html#gae3fc9a4daa7f85367811a313857337b4">stanConnOptions_SetNATSOptions</a> (<a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *opts, <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *nOpts)</td></tr>
+<tr class="memdesc:gae3fc9a4daa7f85367811a313857337b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the NATS Options to use to create the connection.  <a href="group__stan_conn_opts_group.html#gae3fc9a4daa7f85367811a313857337b4">More...</a><br /></td></tr>
+<tr class="separator:gae3fc9a4daa7f85367811a313857337b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga66c72c482696d9ceca71fced7cbb1264"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_opts_group.html#ga66c72c482696d9ceca71fced7cbb1264">stanConnOptions_SetConnectionWait</a> (<a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *opts, int64_t wait)</td></tr>
+<tr class="memdesc:ga66c72c482696d9ceca71fced7cbb1264"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the timeout for establishing a connection.  <a href="group__stan_conn_opts_group.html#ga66c72c482696d9ceca71fced7cbb1264">More...</a><br /></td></tr>
+<tr class="separator:ga66c72c482696d9ceca71fced7cbb1264"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga36f2ee441562dcf619d6e020b823fc96"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_opts_group.html#ga36f2ee441562dcf619d6e020b823fc96">stanConnOptions_SetPubAckWait</a> (<a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *opts, int64_t wait)</td></tr>
+<tr class="memdesc:ga36f2ee441562dcf619d6e020b823fc96"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the timeout for waiting for an ACK for a published message.  <a href="group__stan_conn_opts_group.html#ga36f2ee441562dcf619d6e020b823fc96">More...</a><br /></td></tr>
+<tr class="separator:ga36f2ee441562dcf619d6e020b823fc96"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga07105d1d00878bba19f47243b2c88402"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_opts_group.html#ga07105d1d00878bba19f47243b2c88402">stanConnOptions_SetDiscoveryPrefix</a> (<a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *opts, const char *prefix)</td></tr>
+<tr class="memdesc:ga07105d1d00878bba19f47243b2c88402"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the subject prefix the library sends the connect request to.  <a href="group__stan_conn_opts_group.html#ga07105d1d00878bba19f47243b2c88402">More...</a><br /></td></tr>
+<tr class="separator:ga07105d1d00878bba19f47243b2c88402"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga29eee1be7eff749aeac3bab60d1b0405"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_opts_group.html#ga29eee1be7eff749aeac3bab60d1b0405">stanConnOptions_SetMaxPubAcksInflight</a> (<a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *opts, int maxPubAcksInflight, float percentage)</td></tr>
+<tr class="memdesc:ga29eee1be7eff749aeac3bab60d1b0405"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the maximum number of published messages without outstanding ACKs from the server.  <a href="group__stan_conn_opts_group.html#ga29eee1be7eff749aeac3bab60d1b0405">More...</a><br /></td></tr>
+<tr class="separator:ga29eee1be7eff749aeac3bab60d1b0405"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gad835223f08fbeae2a3c7a34d3fa1550b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_opts_group.html#gad835223f08fbeae2a3c7a34d3fa1550b">stanConnOptions_SetPings</a> (<a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *opts, int interval, int maxOut)</td></tr>
+<tr class="memdesc:gad835223f08fbeae2a3c7a34d3fa1550b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the ping interval and max out values.  <a href="group__stan_conn_opts_group.html#gad835223f08fbeae2a3c7a34d3fa1550b">More...</a><br /></td></tr>
+<tr class="separator:gad835223f08fbeae2a3c7a34d3fa1550b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga19ba15c8001aa835b261eea3a309e6d3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_opts_group.html#ga19ba15c8001aa835b261eea3a309e6d3">stanConnOptions_SetConnectionLostHandler</a> (<a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *opts, <a class="el" href="group__callbacks_group.html#gac34092f6c698374f86ad349302bdd55c">stanConnectionLostHandler</a> handler, void *closure)</td></tr>
+<tr class="memdesc:ga19ba15c8001aa835b261eea3a309e6d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the connection lost handler.  <a href="group__stan_conn_opts_group.html#ga19ba15c8001aa835b261eea3a309e6d3">More...</a><br /></td></tr>
+<tr class="separator:ga19ba15c8001aa835b261eea3a309e6d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga83fd0a29b136cbfb643be642eb2fa726"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_opts_group.html#ga83fd0a29b136cbfb643be642eb2fa726">stanConnOptions_Destroy</a> (<a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *opts)</td></tr>
+<tr class="memdesc:ga83fd0a29b136cbfb643be642eb2fa726"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys a <a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1" title="Way to configure a stanConnection.">stanConnOptions</a> object.  <a href="group__stan_conn_opts_group.html#ga83fd0a29b136cbfb643be642eb2fa726">More...</a><br /></td></tr>
+<tr class="separator:ga83fd0a29b136cbfb643be642eb2fa726"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gad87a2cef4f4ddf64696f9864773c37cf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_opts_group.html#gad87a2cef4f4ddf64696f9864773c37cf">stanSubOptions_Create</a> (<a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> **newOpts)</td></tr>
+<tr class="memdesc:gad87a2cef4f4ddf64696f9864773c37cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3" title="Way to configure a stanSubscription.">stanSubOptions</a> object.  <a href="group__stan_sub_opts_group.html#gad87a2cef4f4ddf64696f9864773c37cf">More...</a><br /></td></tr>
+<tr class="separator:gad87a2cef4f4ddf64696f9864773c37cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaa018bceba99ef3726157e87c6918ab14"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_opts_group.html#gaa018bceba99ef3726157e87c6918ab14">stanSubOptions_SetDurableName</a> (<a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts, const char *durableName)</td></tr>
+<tr class="memdesc:gaa018bceba99ef3726157e87c6918ab14"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the Durable Name for this subscription.  <a href="group__stan_sub_opts_group.html#gaa018bceba99ef3726157e87c6918ab14">More...</a><br /></td></tr>
+<tr class="separator:gaa018bceba99ef3726157e87c6918ab14"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gafbb4e6c74978c4e8f30f016c20cc2bdf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_opts_group.html#gafbb4e6c74978c4e8f30f016c20cc2bdf">stanSubOptions_SetAckWait</a> (<a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts, int64_t wait)</td></tr>
+<tr class="memdesc:gafbb4e6c74978c4e8f30f016c20cc2bdf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the timeout for waiting for an ACK from the cluster's point of view for delivered messages.  <a href="group__stan_sub_opts_group.html#gafbb4e6c74978c4e8f30f016c20cc2bdf">More...</a><br /></td></tr>
+<tr class="separator:gafbb4e6c74978c4e8f30f016c20cc2bdf"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga35efbdea888e00440c500845064931c0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_opts_group.html#ga35efbdea888e00440c500845064931c0">stanSubOptions_SetMaxInflight</a> (<a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts, int maxInflight)</td></tr>
+<tr class="memdesc:ga35efbdea888e00440c500845064931c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the the maximum number of messages the cluster will send without an ACK.  <a href="group__stan_sub_opts_group.html#ga35efbdea888e00440c500845064931c0">More...</a><br /></td></tr>
+<tr class="separator:ga35efbdea888e00440c500845064931c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga6cb7f6e1ac697d16959f9042eeb84dc1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_opts_group.html#ga6cb7f6e1ac697d16959f9042eeb84dc1">stanSubOptions_StartAtSequence</a> (<a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts, uint64_t seq)</td></tr>
+<tr class="memdesc:ga6cb7f6e1ac697d16959f9042eeb84dc1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the desired start position based on the given sequence number.  <a href="group__stan_sub_opts_group.html#ga6cb7f6e1ac697d16959f9042eeb84dc1">More...</a><br /></td></tr>
+<tr class="separator:ga6cb7f6e1ac697d16959f9042eeb84dc1"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaafd7a553486eea3c9d309da0744a3608"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_opts_group.html#gaafd7a553486eea3c9d309da0744a3608">stanSubOptions_StartAtTime</a> (<a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts, int64_t time)</td></tr>
+<tr class="memdesc:gaafd7a553486eea3c9d309da0744a3608"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the desired start position based on the given time.  <a href="group__stan_sub_opts_group.html#gaafd7a553486eea3c9d309da0744a3608">More...</a><br /></td></tr>
+<tr class="separator:gaafd7a553486eea3c9d309da0744a3608"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga27d9175901997b8468997019746599b5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_opts_group.html#ga27d9175901997b8468997019746599b5">stanSubOptions_StartAtTimeDelta</a> (<a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts, int64_t delta)</td></tr>
+<tr class="memdesc:ga27d9175901997b8468997019746599b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the desired start position based on the given delta.  <a href="group__stan_sub_opts_group.html#ga27d9175901997b8468997019746599b5">More...</a><br /></td></tr>
+<tr class="separator:ga27d9175901997b8468997019746599b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga856a74e31f3307faf988747c1f88717c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_opts_group.html#ga856a74e31f3307faf988747c1f88717c">stanSubOptions_StartWithLastReceived</a> (<a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts)</td></tr>
+<tr class="memdesc:ga856a74e31f3307faf988747c1f88717c"><td class="mdescLeft">&#160;</td><td class="mdescRight">The subscription should start with the last message in the channel.  <a href="group__stan_sub_opts_group.html#ga856a74e31f3307faf988747c1f88717c">More...</a><br /></td></tr>
+<tr class="separator:ga856a74e31f3307faf988747c1f88717c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gab09b81358e93199a4631eb06f1ec179f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_opts_group.html#gab09b81358e93199a4631eb06f1ec179f">stanSubOptions_DeliverAllAvailable</a> (<a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts)</td></tr>
+<tr class="memdesc:gab09b81358e93199a4631eb06f1ec179f"><td class="mdescLeft">&#160;</td><td class="mdescRight">The subscription should start with the first message in the channel.  <a href="group__stan_sub_opts_group.html#gab09b81358e93199a4631eb06f1ec179f">More...</a><br /></td></tr>
+<tr class="separator:gab09b81358e93199a4631eb06f1ec179f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga6f49ae2629e49d2bfa35990cf030bf83"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_opts_group.html#ga6f49ae2629e49d2bfa35990cf030bf83">stanSubOptions_SetManualAckMode</a> (<a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts, bool manual)</td></tr>
+<tr class="memdesc:ga6f49ae2629e49d2bfa35990cf030bf83"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the subscription's acknowledgment mode.  <a href="group__stan_sub_opts_group.html#ga6f49ae2629e49d2bfa35990cf030bf83">More...</a><br /></td></tr>
+<tr class="separator:ga6f49ae2629e49d2bfa35990cf030bf83"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga1b56877d0a6729e148c9c288e2b88e3f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_opts_group.html#ga1b56877d0a6729e148c9c288e2b88e3f">stanSubOptions_Destroy</a> (<a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts)</td></tr>
+<tr class="memdesc:ga1b56877d0a6729e148c9c288e2b88e3f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys a <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3" title="Way to configure a stanSubscription.">stanSubOptions</a> object.  <a href="group__stan_sub_opts_group.html#ga1b56877d0a6729e148c9c288e2b88e3f">More...</a><br /></td></tr>
+<tr class="separator:ga1b56877d0a6729e148c9c288e2b88e3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaa1ec779a0b7ead54b78da05533848b6d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__inbox_group.html#gaa1ec779a0b7ead54b78da05533848b6d">natsInbox_Create</a> (<a class="el" href="group__types_group.html#ga206c3d4d6f4f6f96fd2cae53a3df31c1">natsInbox</a> **newInbox)</td></tr>
+<tr class="memdesc:gaa1ec779a0b7ead54b78da05533848b6d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates an inbox.  <a href="group__inbox_group.html#gaa1ec779a0b7ead54b78da05533848b6d">More...</a><br /></td></tr>
+<tr class="separator:gaa1ec779a0b7ead54b78da05533848b6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gabd6444fb8f28afb9c2b6645945f46cfe"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__inbox_group.html#gabd6444fb8f28afb9c2b6645945f46cfe">natsInbox_Destroy</a> (<a class="el" href="group__types_group.html#ga206c3d4d6f4f6f96fd2cae53a3df31c1">natsInbox</a> *inbox)</td></tr>
+<tr class="memdesc:gabd6444fb8f28afb9c2b6645945f46cfe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the inbox.  <a href="group__inbox_group.html#gabd6444fb8f28afb9c2b6645945f46cfe">More...</a><br /></td></tr>
+<tr class="separator:gabd6444fb8f28afb9c2b6645945f46cfe"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga1a091d24f939d881bf04fba78b8995c2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msg_group.html#ga1a091d24f939d881bf04fba78b8995c2">natsMsgList_Destroy</a> (<a class="el" href="structnats_msg_list.html">natsMsgList</a> *list)</td></tr>
+<tr class="memdesc:ga1a091d24f939d881bf04fba78b8995c2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys this list of messages.  <a href="group__msg_group.html#ga1a091d24f939d881bf04fba78b8995c2">More...</a><br /></td></tr>
+<tr class="separator:ga1a091d24f939d881bf04fba78b8995c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga098e4fec1c5a71c00a0d092fbd6d1a21"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msg_group.html#ga098e4fec1c5a71c00a0d092fbd6d1a21">natsMsg_Create</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **newMsg, const char *subj, const char *reply, const char *data, int dataLen)</td></tr>
+<tr class="memdesc:ga098e4fec1c5a71c00a0d092fbd6d1a21"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a> object.  <a href="group__msg_group.html#ga098e4fec1c5a71c00a0d092fbd6d1a21">More...</a><br /></td></tr>
+<tr class="separator:ga098e4fec1c5a71c00a0d092fbd6d1a21"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gad7cad38946648e3047aa0665a3dd230a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msg_group.html#gad7cad38946648e3047aa0665a3dd230a">natsMsg_GetSubject</a> (const <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg)</td></tr>
+<tr class="memdesc:gad7cad38946648e3047aa0665a3dd230a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the subject set in this message.  <a href="group__msg_group.html#gad7cad38946648e3047aa0665a3dd230a">More...</a><br /></td></tr>
+<tr class="separator:gad7cad38946648e3047aa0665a3dd230a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga880535362c91b3e405792aa66ff945b6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msg_group.html#ga880535362c91b3e405792aa66ff945b6">natsMsg_GetReply</a> (const <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg)</td></tr>
+<tr class="memdesc:ga880535362c91b3e405792aa66ff945b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the reply set in this message.  <a href="group__msg_group.html#ga880535362c91b3e405792aa66ff945b6">More...</a><br /></td></tr>
+<tr class="separator:ga880535362c91b3e405792aa66ff945b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga523364451fd92534e754054266196e59"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msg_group.html#ga523364451fd92534e754054266196e59">natsMsg_GetData</a> (const <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg)</td></tr>
+<tr class="memdesc:ga523364451fd92534e754054266196e59"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the message payload.  <a href="group__msg_group.html#ga523364451fd92534e754054266196e59">More...</a><br /></td></tr>
+<tr class="separator:ga523364451fd92534e754054266196e59"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga25b69066ae50287e178aaf4f70f7d3de"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msg_group.html#ga25b69066ae50287e178aaf4f70f7d3de">natsMsg_GetDataLength</a> (const <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg)</td></tr>
+<tr class="memdesc:ga25b69066ae50287e178aaf4f70f7d3de"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the message length.  <a href="group__msg_group.html#ga25b69066ae50287e178aaf4f70f7d3de">More...</a><br /></td></tr>
+<tr class="separator:ga25b69066ae50287e178aaf4f70f7d3de"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf30b47d4217c9335919f05536e379af8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msg_group.html#gaf30b47d4217c9335919f05536e379af8">natsMsgHeader_Set</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, const char *key, const char *value)</td></tr>
+<tr class="memdesc:gaf30b47d4217c9335919f05536e379af8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the header entries associated with <code>key</code> to the single element <code>value</code>.  <a href="group__msg_group.html#gaf30b47d4217c9335919f05536e379af8">More...</a><br /></td></tr>
+<tr class="separator:gaf30b47d4217c9335919f05536e379af8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2b641ec3b1745604d7de1102e472254b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msg_group.html#ga2b641ec3b1745604d7de1102e472254b">natsMsgHeader_Add</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, const char *key, const char *value)</td></tr>
+<tr class="memdesc:ga2b641ec3b1745604d7de1102e472254b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add <code>value</code> to the header associated with <code>key</code>.  <a href="group__msg_group.html#ga2b641ec3b1745604d7de1102e472254b">More...</a><br /></td></tr>
+<tr class="separator:ga2b641ec3b1745604d7de1102e472254b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gab3349f0b0ce721b340d5c0753c90ee18"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msg_group.html#gab3349f0b0ce721b340d5c0753c90ee18">natsMsgHeader_Get</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, const char *key, const char **value)</td></tr>
+<tr class="memdesc:gab3349f0b0ce721b340d5c0753c90ee18"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the header entry associated with <code>key</code>.  <a href="group__msg_group.html#gab3349f0b0ce721b340d5c0753c90ee18">More...</a><br /></td></tr>
+<tr class="separator:gab3349f0b0ce721b340d5c0753c90ee18"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gae1ce9c9d82d151a3ea9dc03da048f66f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msg_group.html#gae1ce9c9d82d151a3ea9dc03da048f66f">natsMsgHeader_Values</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, const char *key, const char ***values, int *count)</td></tr>
+<tr class="memdesc:gae1ce9c9d82d151a3ea9dc03da048f66f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get all header values associated with <code>key</code>.  <a href="group__msg_group.html#gae1ce9c9d82d151a3ea9dc03da048f66f">More...</a><br /></td></tr>
+<tr class="separator:gae1ce9c9d82d151a3ea9dc03da048f66f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga6ee8a007111ada293dd24ff0bab02491"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msg_group.html#ga6ee8a007111ada293dd24ff0bab02491">natsMsgHeader_Keys</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, const char ***keys, int *count)</td></tr>
+<tr class="memdesc:ga6ee8a007111ada293dd24ff0bab02491"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get all header keys.  <a href="group__msg_group.html#ga6ee8a007111ada293dd24ff0bab02491">More...</a><br /></td></tr>
+<tr class="separator:ga6ee8a007111ada293dd24ff0bab02491"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gac78ca02dc93d05cae837ced6386408f1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msg_group.html#gac78ca02dc93d05cae837ced6386408f1">natsMsgHeader_Delete</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, const char *key)</td></tr>
+<tr class="memdesc:gac78ca02dc93d05cae837ced6386408f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete the value(s) associated with <code>key</code>.  <a href="group__msg_group.html#gac78ca02dc93d05cae837ced6386408f1">More...</a><br /></td></tr>
+<tr class="separator:gac78ca02dc93d05cae837ced6386408f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga43aa4a8e4b93725b4876ee2677e19c7b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msg_group.html#ga43aa4a8e4b93725b4876ee2677e19c7b">natsMsg_IsNoResponders</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg)</td></tr>
+<tr class="memdesc:ga43aa4a8e4b93725b4876ee2677e19c7b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Indicates if this message is a "no responders" message from the server.  <a href="group__msg_group.html#ga43aa4a8e4b93725b4876ee2677e19c7b">More...</a><br /></td></tr>
+<tr class="separator:ga43aa4a8e4b93725b4876ee2677e19c7b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga9e9590018284939f43f60964283f33ae"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msg_group.html#ga9e9590018284939f43f60964283f33ae">natsMsg_Destroy</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg)</td></tr>
+<tr class="memdesc:ga9e9590018284939f43f60964283f33ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the message object.  <a href="group__msg_group.html#ga9e9590018284939f43f60964283f33ae">More...</a><br /></td></tr>
+<tr class="separator:ga9e9590018284939f43f60964283f33ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga98b66ff73447e1d7e329edbfcde782b5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_msg_group.html#ga98b66ff73447e1d7e329edbfcde782b5">stanMsg_GetSequence</a> (const <a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a> *msg)</td></tr>
+<tr class="memdesc:ga98b66ff73447e1d7e329edbfcde782b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the message's sequence number.  <a href="group__stan_msg_group.html#ga98b66ff73447e1d7e329edbfcde782b5">More...</a><br /></td></tr>
+<tr class="separator:ga98b66ff73447e1d7e329edbfcde782b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2fa524b11e9621cf46ca9b1a3ca66452"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_msg_group.html#ga2fa524b11e9621cf46ca9b1a3ca66452">stanMsg_GetTimestamp</a> (const <a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a> *msg)</td></tr>
+<tr class="memdesc:ga2fa524b11e9621cf46ca9b1a3ca66452"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the message's timestamp.  <a href="group__stan_msg_group.html#ga2fa524b11e9621cf46ca9b1a3ca66452">More...</a><br /></td></tr>
+<tr class="separator:ga2fa524b11e9621cf46ca9b1a3ca66452"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga8e537d014b89d9d7da7906b2ee75d5c0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_msg_group.html#ga8e537d014b89d9d7da7906b2ee75d5c0">stanMsg_IsRedelivered</a> (const <a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a> *msg)</td></tr>
+<tr class="memdesc:ga8e537d014b89d9d7da7906b2ee75d5c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the message's redelivered flag.  <a href="group__stan_msg_group.html#ga8e537d014b89d9d7da7906b2ee75d5c0">More...</a><br /></td></tr>
+<tr class="separator:ga8e537d014b89d9d7da7906b2ee75d5c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2f27fbfb79a46c52e079f670c59e1260"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_msg_group.html#ga2f27fbfb79a46c52e079f670c59e1260">stanMsg_GetData</a> (const <a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a> *msg)</td></tr>
+<tr class="memdesc:ga2f27fbfb79a46c52e079f670c59e1260"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the message payload.  <a href="group__stan_msg_group.html#ga2f27fbfb79a46c52e079f670c59e1260">More...</a><br /></td></tr>
+<tr class="separator:ga2f27fbfb79a46c52e079f670c59e1260"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga7d1e394a686bc25ab7376b7f28b9e777"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_msg_group.html#ga7d1e394a686bc25ab7376b7f28b9e777">stanMsg_GetDataLength</a> (const <a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a> *msg)</td></tr>
+<tr class="memdesc:ga7d1e394a686bc25ab7376b7f28b9e777"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the message length.  <a href="group__stan_msg_group.html#ga7d1e394a686bc25ab7376b7f28b9e777">More...</a><br /></td></tr>
+<tr class="separator:ga7d1e394a686bc25ab7376b7f28b9e777"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gacd0059fb499963f5b2eae18053e5f74f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_msg_group.html#gacd0059fb499963f5b2eae18053e5f74f">stanMsg_Destroy</a> (<a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a> *msg)</td></tr>
+<tr class="memdesc:gacd0059fb499963f5b2eae18053e5f74f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the message object.  <a href="group__stan_msg_group.html#gacd0059fb499963f5b2eae18053e5f74f">More...</a><br /></td></tr>
+<tr class="separator:gacd0059fb499963f5b2eae18053e5f74f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga740be1ba16a8570eb98ef6755ebf52ce"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga740be1ba16a8570eb98ef6755ebf52ce">natsConnection_Connect</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> **nc, <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *options)</td></tr>
+<tr class="memdesc:ga740be1ba16a8570eb98ef6755ebf52ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connects to a <code>NATS Server</code> using the provided options.  <a href="group__conn_mgt_group.html#ga740be1ba16a8570eb98ef6755ebf52ce">More...</a><br /></td></tr>
+<tr class="separator:ga740be1ba16a8570eb98ef6755ebf52ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaa89c06e30e19ff361125bfc9114d89a8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#gaa89c06e30e19ff361125bfc9114d89a8">natsConnection_ProcessReadEvent</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
+<tr class="memdesc:gaa89c06e30e19ff361125bfc9114d89a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process a read event when using external event loop.  <a href="group__conn_mgt_group.html#gaa89c06e30e19ff361125bfc9114d89a8">More...</a><br /></td></tr>
+<tr class="separator:gaa89c06e30e19ff361125bfc9114d89a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gad81b603b84c0180aefc6d5ebad7f2a47"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#gad81b603b84c0180aefc6d5ebad7f2a47">natsConnection_ProcessWriteEvent</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
+<tr class="memdesc:gad81b603b84c0180aefc6d5ebad7f2a47"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process a write event when using external event loop.  <a href="group__conn_mgt_group.html#gad81b603b84c0180aefc6d5ebad7f2a47">More...</a><br /></td></tr>
+<tr class="separator:gad81b603b84c0180aefc6d5ebad7f2a47"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gafb83c8d7970ba68be0e6c40c38cdfde4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#gafb83c8d7970ba68be0e6c40c38cdfde4">natsConnection_ConnectTo</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> **nc, const char *urls)</td></tr>
+<tr class="memdesc:gafb83c8d7970ba68be0e6c40c38cdfde4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connects to a <code>NATS Server</code> using any of the URL from the given list.  <a href="group__conn_mgt_group.html#gafb83c8d7970ba68be0e6c40c38cdfde4">More...</a><br /></td></tr>
+<tr class="separator:gafb83c8d7970ba68be0e6c40c38cdfde4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga530f0f1c75c58a81aae1a59f15b46d9f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga530f0f1c75c58a81aae1a59f15b46d9f">natsConnection_IsClosed</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
+<tr class="memdesc:ga530f0f1c75c58a81aae1a59f15b46d9f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test if connection has been closed.  <a href="group__conn_mgt_group.html#ga530f0f1c75c58a81aae1a59f15b46d9f">More...</a><br /></td></tr>
+<tr class="separator:ga530f0f1c75c58a81aae1a59f15b46d9f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga5aa349fc3895dde772671b324b07a688"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga5aa349fc3895dde772671b324b07a688">natsConnection_IsReconnecting</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
+<tr class="memdesc:ga5aa349fc3895dde772671b324b07a688"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test if connection is reconnecting.  <a href="group__conn_mgt_group.html#ga5aa349fc3895dde772671b324b07a688">More...</a><br /></td></tr>
+<tr class="separator:ga5aa349fc3895dde772671b324b07a688"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga15a0f8aa9a6f621535d01593a4c8edd5"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga15a0f8aa9a6f621535d01593a4c8edd5">natsConnection_IsDraining</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
+<tr class="memdesc:ga15a0f8aa9a6f621535d01593a4c8edd5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test if connection is draining.  <a href="group__conn_mgt_group.html#ga15a0f8aa9a6f621535d01593a4c8edd5">More...</a><br /></td></tr>
+<tr class="separator:ga15a0f8aa9a6f621535d01593a4c8edd5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga33fa209522e5e0226b5b7c7d720a3b98"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51">natsConnStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga33fa209522e5e0226b5b7c7d720a3b98">natsConnection_Status</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
+<tr class="memdesc:ga33fa209522e5e0226b5b7c7d720a3b98"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the current state of the connection.  <a href="group__conn_mgt_group.html#ga33fa209522e5e0226b5b7c7d720a3b98">More...</a><br /></td></tr>
+<tr class="separator:ga33fa209522e5e0226b5b7c7d720a3b98"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga0433159e518540ff874c4026fe9cd0c5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga0433159e518540ff874c4026fe9cd0c5">natsConnection_Buffered</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
+<tr class="memdesc:ga0433159e518540ff874c4026fe9cd0c5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of bytes to be sent to the server.  <a href="group__conn_mgt_group.html#ga0433159e518540ff874c4026fe9cd0c5">More...</a><br /></td></tr>
+<tr class="separator:ga0433159e518540ff874c4026fe9cd0c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga1c98f8d89bb8e20ea8621e860a90267f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga1c98f8d89bb8e20ea8621e860a90267f">natsConnection_Flush</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
+<tr class="memdesc:ga1c98f8d89bb8e20ea8621e860a90267f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Flushes the connection.  <a href="group__conn_mgt_group.html#ga1c98f8d89bb8e20ea8621e860a90267f">More...</a><br /></td></tr>
+<tr class="separator:ga1c98f8d89bb8e20ea8621e860a90267f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga85915ef0c8b87993be1b076099d6a7c1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga85915ef0c8b87993be1b076099d6a7c1">natsConnection_FlushTimeout</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, int64_t timeout)</td></tr>
+<tr class="memdesc:ga85915ef0c8b87993be1b076099d6a7c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Flushes the connection with a given timeout.  <a href="group__conn_mgt_group.html#ga85915ef0c8b87993be1b076099d6a7c1">More...</a><br /></td></tr>
+<tr class="separator:ga85915ef0c8b87993be1b076099d6a7c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga68e7149f7ff1cc4989b3f795fa7e76d9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga68e7149f7ff1cc4989b3f795fa7e76d9">natsConnection_GetMaxPayload</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
+<tr class="memdesc:ga68e7149f7ff1cc4989b3f795fa7e76d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the maximum message payload.  <a href="group__conn_mgt_group.html#ga68e7149f7ff1cc4989b3f795fa7e76d9">More...</a><br /></td></tr>
+<tr class="separator:ga68e7149f7ff1cc4989b3f795fa7e76d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga68821a8ae1176096b5afef7fdc7947ec"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga68821a8ae1176096b5afef7fdc7947ec">natsConnection_GetStats</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa">natsStatistics</a> *stats)</td></tr>
+<tr class="memdesc:ga68821a8ae1176096b5afef7fdc7947ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the connection statistics.  <a href="group__conn_mgt_group.html#ga68821a8ae1176096b5afef7fdc7947ec">More...</a><br /></td></tr>
+<tr class="separator:ga68821a8ae1176096b5afef7fdc7947ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf623280407c43ade02285005f0642e6d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#gaf623280407c43ade02285005f0642e6d">natsConnection_GetConnectedUrl</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, char *buffer, size_t bufferSize)</td></tr>
+<tr class="memdesc:gaf623280407c43ade02285005f0642e6d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the URL of the currently connected server.  <a href="group__conn_mgt_group.html#gaf623280407c43ade02285005f0642e6d">More...</a><br /></td></tr>
+<tr class="separator:gaf623280407c43ade02285005f0642e6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga48cee9ea1cdc9fc2770de2f9f0fd1ccf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga48cee9ea1cdc9fc2770de2f9f0fd1ccf">natsConnection_GetConnectedServerId</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, char *buffer, size_t bufferSize)</td></tr>
+<tr class="memdesc:ga48cee9ea1cdc9fc2770de2f9f0fd1ccf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the server Id.  <a href="group__conn_mgt_group.html#ga48cee9ea1cdc9fc2770de2f9f0fd1ccf">More...</a><br /></td></tr>
+<tr class="separator:ga48cee9ea1cdc9fc2770de2f9f0fd1ccf"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf4ee7262e35e44c40ad5dfe9240db76b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#gaf4ee7262e35e44c40ad5dfe9240db76b">natsConnection_GetServers</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, char ***servers, int *count)</td></tr>
+<tr class="memdesc:gaf4ee7262e35e44c40ad5dfe9240db76b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the list of server URLs known to this connection.  <a href="group__conn_mgt_group.html#gaf4ee7262e35e44c40ad5dfe9240db76b">More...</a><br /></td></tr>
+<tr class="separator:gaf4ee7262e35e44c40ad5dfe9240db76b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gad25c77be0873495412c90a73fe450708"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#gad25c77be0873495412c90a73fe450708">natsConnection_GetDiscoveredServers</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, char ***servers, int *count)</td></tr>
+<tr class="memdesc:gad25c77be0873495412c90a73fe450708"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the list of discovered server URLs.  <a href="group__conn_mgt_group.html#gad25c77be0873495412c90a73fe450708">More...</a><br /></td></tr>
+<tr class="separator:gad25c77be0873495412c90a73fe450708"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gab6cfa9cb6857ae10f096a94f5e244e63"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#gab6cfa9cb6857ae10f096a94f5e244e63">natsConnection_GetLastError</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, const char **lastError)</td></tr>
+<tr class="memdesc:gab6cfa9cb6857ae10f096a94f5e244e63"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the last connection error.  <a href="group__conn_mgt_group.html#gab6cfa9cb6857ae10f096a94f5e244e63">More...</a><br /></td></tr>
+<tr class="separator:gab6cfa9cb6857ae10f096a94f5e244e63"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga747513ba6ab63fdf9a72bfc8025a14ba"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga747513ba6ab63fdf9a72bfc8025a14ba">natsConnection_GetClientID</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, uint64_t *cid)</td></tr>
+<tr class="memdesc:ga747513ba6ab63fdf9a72bfc8025a14ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the current client ID assigned by the server.  <a href="group__conn_mgt_group.html#ga747513ba6ab63fdf9a72bfc8025a14ba">More...</a><br /></td></tr>
+<tr class="separator:ga747513ba6ab63fdf9a72bfc8025a14ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga59bdc4ad9fea2053f5d3841f6b83f88b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga59bdc4ad9fea2053f5d3841f6b83f88b">natsConnection_Drain</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
+<tr class="memdesc:ga59bdc4ad9fea2053f5d3841f6b83f88b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Drains the connection with default timeout.  <a href="group__conn_mgt_group.html#ga59bdc4ad9fea2053f5d3841f6b83f88b">More...</a><br /></td></tr>
+<tr class="separator:ga59bdc4ad9fea2053f5d3841f6b83f88b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gae06fe6f5933f216d6d93645a122a7dd4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#gae06fe6f5933f216d6d93645a122a7dd4">natsConnection_DrainTimeout</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, int64_t timeout)</td></tr>
+<tr class="memdesc:gae06fe6f5933f216d6d93645a122a7dd4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Drains the connection with given timeout.  <a href="group__conn_mgt_group.html#gae06fe6f5933f216d6d93645a122a7dd4">More...</a><br /></td></tr>
+<tr class="separator:gae06fe6f5933f216d6d93645a122a7dd4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga6960cfdbaac3b8759784f352d4c264f8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga6960cfdbaac3b8759784f352d4c264f8">natsConnection_Sign</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, const unsigned char *message, int messageLen, unsigned char sig[64])</td></tr>
+<tr class="memdesc:ga6960cfdbaac3b8759784f352d4c264f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Signs any 'message' using the connection's user credentials.  <a href="group__conn_mgt_group.html#ga6960cfdbaac3b8759784f352d4c264f8">More...</a><br /></td></tr>
+<tr class="separator:ga6960cfdbaac3b8759784f352d4c264f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gadafcfeeeac2733c7119981ab97b7103d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#gadafcfeeeac2733c7119981ab97b7103d">natsConnection_GetClientIP</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, char **ip)</td></tr>
+<tr class="memdesc:gadafcfeeeac2733c7119981ab97b7103d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the client's IP address as reported by the server.  <a href="group__conn_mgt_group.html#gadafcfeeeac2733c7119981ab97b7103d">More...</a><br /></td></tr>
+<tr class="separator:gadafcfeeeac2733c7119981ab97b7103d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaa3fd27e6e7d8131e679d4f10e201c435"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#gaa3fd27e6e7d8131e679d4f10e201c435">natsConnection_GetRTT</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, int64_t *rtt)</td></tr>
+<tr class="memdesc:gaa3fd27e6e7d8131e679d4f10e201c435"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the round trip time between this client and the server.  <a href="group__conn_mgt_group.html#gaa3fd27e6e7d8131e679d4f10e201c435">More...</a><br /></td></tr>
+<tr class="separator:gaa3fd27e6e7d8131e679d4f10e201c435"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gad765b80ae8e1a06a7a942cccf29f042a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#gad765b80ae8e1a06a7a942cccf29f042a">natsConnection_HasHeaderSupport</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
+<tr class="memdesc:gad765b80ae8e1a06a7a942cccf29f042a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns if the connection to current server supports headers.  <a href="group__conn_mgt_group.html#gad765b80ae8e1a06a7a942cccf29f042a">More...</a><br /></td></tr>
+<tr class="separator:gad765b80ae8e1a06a7a942cccf29f042a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga761095a42374b4dafa178df7d7652dd5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga761095a42374b4dafa178df7d7652dd5">natsConnection_GetLocalIPAndPort</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, char **ip, int *port)</td></tr>
+<tr class="memdesc:ga761095a42374b4dafa178df7d7652dd5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the connection local IP and port.  <a href="group__conn_mgt_group.html#ga761095a42374b4dafa178df7d7652dd5">More...</a><br /></td></tr>
+<tr class="separator:ga761095a42374b4dafa178df7d7652dd5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga19e204d27a232e2d4334301fc002b2ed"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga19e204d27a232e2d4334301fc002b2ed">natsConnection_Close</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
+<tr class="memdesc:ga19e204d27a232e2d4334301fc002b2ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Closes the connection.  <a href="group__conn_mgt_group.html#ga19e204d27a232e2d4334301fc002b2ed">More...</a><br /></td></tr>
+<tr class="separator:ga19e204d27a232e2d4334301fc002b2ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gafda2f702276fb0ac301efac10df09495"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#gafda2f702276fb0ac301efac10df09495">natsConnection_Destroy</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
+<tr class="memdesc:gafda2f702276fb0ac301efac10df09495"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the connection object.  <a href="group__conn_mgt_group.html#gafda2f702276fb0ac301efac10df09495">More...</a><br /></td></tr>
+<tr class="separator:gafda2f702276fb0ac301efac10df09495"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gac0b9f7759ecc39b8d77807b94254f9b4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_pub_group.html#gac0b9f7759ecc39b8d77807b94254f9b4">natsConnection_Publish</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, const char *subj, const void *data, int dataLen)</td></tr>
+<tr class="memdesc:gac0b9f7759ecc39b8d77807b94254f9b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Publishes data on a subject.  <a href="group__conn_pub_group.html#gac0b9f7759ecc39b8d77807b94254f9b4">More...</a><br /></td></tr>
+<tr class="separator:gac0b9f7759ecc39b8d77807b94254f9b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gad09a717c20de4cf0e2a21dcfd9ce6c64"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_pub_group.html#gad09a717c20de4cf0e2a21dcfd9ce6c64">natsConnection_PublishString</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, const char *subj, const char *str)</td></tr>
+<tr class="memdesc:gad09a717c20de4cf0e2a21dcfd9ce6c64"><td class="mdescLeft">&#160;</td><td class="mdescRight">Publishes a string on a subject.  <a href="group__conn_pub_group.html#gad09a717c20de4cf0e2a21dcfd9ce6c64">More...</a><br /></td></tr>
+<tr class="separator:gad09a717c20de4cf0e2a21dcfd9ce6c64"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga74511acd87385931112c45c48c2a14ba"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_pub_group.html#ga74511acd87385931112c45c48c2a14ba">natsConnection_PublishMsg</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg)</td></tr>
+<tr class="memdesc:ga74511acd87385931112c45c48c2a14ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Publishes a message on a subject.  <a href="group__conn_pub_group.html#ga74511acd87385931112c45c48c2a14ba">More...</a><br /></td></tr>
+<tr class="separator:ga74511acd87385931112c45c48c2a14ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaaaa3d75ffec2dcdc6bf905cdb1eee59e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_pub_group.html#gaaaa3d75ffec2dcdc6bf905cdb1eee59e">natsConnection_PublishRequest</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, const char *subj, const char *reply, const void *data, int dataLen)</td></tr>
+<tr class="memdesc:gaaaa3d75ffec2dcdc6bf905cdb1eee59e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Publishes data on a subject expecting replies on the given reply.  <a href="group__conn_pub_group.html#gaaaa3d75ffec2dcdc6bf905cdb1eee59e">More...</a><br /></td></tr>
+<tr class="separator:gaaaa3d75ffec2dcdc6bf905cdb1eee59e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaafca9a8294e81a5a9979e762931e56c5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_pub_group.html#gaafca9a8294e81a5a9979e762931e56c5">natsConnection_PublishRequestString</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, const char *subj, const char *reply, const char *str)</td></tr>
+<tr class="memdesc:gaafca9a8294e81a5a9979e762931e56c5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Publishes a string on a subject expecting replies on the given reply.  <a href="group__conn_pub_group.html#gaafca9a8294e81a5a9979e762931e56c5">More...</a><br /></td></tr>
+<tr class="separator:gaafca9a8294e81a5a9979e762931e56c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf4b4a022f9c21fc269b87c000330c5a7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_pub_group.html#gaf4b4a022f9c21fc269b87c000330c5a7">natsConnection_Request</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **replyMsg, <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, const char *subj, const void *data, int dataLen, int64_t timeout)</td></tr>
+<tr class="memdesc:gaf4b4a022f9c21fc269b87c000330c5a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends a request and waits for a reply.  <a href="group__conn_pub_group.html#gaf4b4a022f9c21fc269b87c000330c5a7">More...</a><br /></td></tr>
+<tr class="separator:gaf4b4a022f9c21fc269b87c000330c5a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga4bb5105df6a3efd2088e6be0fdf6b31f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_pub_group.html#ga4bb5105df6a3efd2088e6be0fdf6b31f">natsConnection_RequestString</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **replyMsg, <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, const char *subj, const char *str, int64_t timeout)</td></tr>
+<tr class="memdesc:ga4bb5105df6a3efd2088e6be0fdf6b31f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends a request (as a string) and waits for a reply.  <a href="group__conn_pub_group.html#ga4bb5105df6a3efd2088e6be0fdf6b31f">More...</a><br /></td></tr>
+<tr class="separator:ga4bb5105df6a3efd2088e6be0fdf6b31f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga052de4b75b3b69ccd8d20eb4861b801d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_pub_group.html#ga052de4b75b3b69ccd8d20eb4861b801d">natsConnection_RequestMsg</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **replyMsg, <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *requestMsg, int64_t timeout)</td></tr>
+<tr class="memdesc:ga052de4b75b3b69ccd8d20eb4861b801d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends a request based on the given <code>requestMsg</code> and waits for a reply.  <a href="group__conn_pub_group.html#ga052de4b75b3b69ccd8d20eb4861b801d">More...</a><br /></td></tr>
+<tr class="separator:ga052de4b75b3b69ccd8d20eb4861b801d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaefab965b5645798d47f9244f2b3fe3fb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_sub_group.html#gaefab965b5645798d47f9244f2b3fe3fb">natsConnection_Subscribe</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **sub, <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, const char *subject, <a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe">natsMsgHandler</a> cb, void *cbClosure)</td></tr>
+<tr class="memdesc:gaefab965b5645798d47f9244f2b3fe3fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates an asynchronous subscription.  <a href="group__conn_sub_group.html#gaefab965b5645798d47f9244f2b3fe3fb">More...</a><br /></td></tr>
+<tr class="separator:gaefab965b5645798d47f9244f2b3fe3fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gacb2c83b58b7909715424cbc327fdd404"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_sub_group.html#gacb2c83b58b7909715424cbc327fdd404">natsConnection_SubscribeTimeout</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **sub, <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, const char *subject, int64_t timeout, <a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe">natsMsgHandler</a> cb, void *cbClosure)</td></tr>
+<tr class="memdesc:gacb2c83b58b7909715424cbc327fdd404"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates an asynchronous subscription with a timeout.  <a href="group__conn_sub_group.html#gacb2c83b58b7909715424cbc327fdd404">More...</a><br /></td></tr>
+<tr class="separator:gacb2c83b58b7909715424cbc327fdd404"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga17574d5165f7e285462e3d3b2709edf4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_sub_group.html#ga17574d5165f7e285462e3d3b2709edf4">natsConnection_SubscribeSync</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **sub, <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, const char *subject)</td></tr>
+<tr class="memdesc:ga17574d5165f7e285462e3d3b2709edf4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a synchronous subcription.  <a href="group__conn_sub_group.html#ga17574d5165f7e285462e3d3b2709edf4">More...</a><br /></td></tr>
+<tr class="separator:ga17574d5165f7e285462e3d3b2709edf4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga3c9fee2775130786ef62f1cbeb191a48"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_sub_group.html#ga3c9fee2775130786ef62f1cbeb191a48">natsConnection_QueueSubscribe</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **sub, <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, const char *subject, const char *queueGroup, <a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe">natsMsgHandler</a> cb, void *cbClosure)</td></tr>
+<tr class="memdesc:ga3c9fee2775130786ef62f1cbeb191a48"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates an asynchronous queue subscriber.  <a href="group__conn_sub_group.html#ga3c9fee2775130786ef62f1cbeb191a48">More...</a><br /></td></tr>
+<tr class="separator:ga3c9fee2775130786ef62f1cbeb191a48"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga96fa115fd5b2ef7658884da80714b91c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_sub_group.html#ga96fa115fd5b2ef7658884da80714b91c">natsConnection_QueueSubscribeTimeout</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **sub, <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, const char *subject, const char *queueGroup, int64_t timeout, <a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe">natsMsgHandler</a> cb, void *cbClosure)</td></tr>
+<tr class="memdesc:ga96fa115fd5b2ef7658884da80714b91c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates an asynchronous queue subscriber with a timeout.  <a href="group__conn_sub_group.html#ga96fa115fd5b2ef7658884da80714b91c">More...</a><br /></td></tr>
+<tr class="separator:ga96fa115fd5b2ef7658884da80714b91c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga68630ea7c4bbdc7f8cd62058b41fb476"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_sub_group.html#ga68630ea7c4bbdc7f8cd62058b41fb476">natsConnection_QueueSubscribeSync</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **sub, <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, const char *subject, const char *queueGroup)</td></tr>
+<tr class="memdesc:ga68630ea7c4bbdc7f8cd62058b41fb476"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a synchronous queue subscriber.  <a href="group__conn_sub_group.html#ga68630ea7c4bbdc7f8cd62058b41fb476">More...</a><br /></td></tr>
+<tr class="separator:ga68630ea7c4bbdc7f8cd62058b41fb476"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga38f1e41fc7619101fc4aa52014dd5428"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga38f1e41fc7619101fc4aa52014dd5428">natsSubscription_NoDeliveryDelay</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub)</td></tr>
+<tr class="memdesc:ga38f1e41fc7619101fc4aa52014dd5428"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables the No Delivery Delay mode.  <a href="group__sub_group.html#ga38f1e41fc7619101fc4aa52014dd5428">More...</a><br /></td></tr>
+<tr class="separator:ga38f1e41fc7619101fc4aa52014dd5428"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga6538a5d78dfb0f16514b94c8e74c11af"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga6538a5d78dfb0f16514b94c8e74c11af">natsSubscription_NextMsg</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **nextMsg, <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int64_t timeout)</td></tr>
+<tr class="memdesc:ga6538a5d78dfb0f16514b94c8e74c11af"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the next available message.  <a href="group__sub_group.html#ga6538a5d78dfb0f16514b94c8e74c11af">More...</a><br /></td></tr>
+<tr class="separator:ga6538a5d78dfb0f16514b94c8e74c11af"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaee87f8be0e6c2a4693ba2cea070583ba"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#gaee87f8be0e6c2a4693ba2cea070583ba">natsSubscription_Unsubscribe</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub)</td></tr>
+<tr class="memdesc:gaee87f8be0e6c2a4693ba2cea070583ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unsubscribes.  <a href="group__sub_group.html#gaee87f8be0e6c2a4693ba2cea070583ba">More...</a><br /></td></tr>
+<tr class="separator:gaee87f8be0e6c2a4693ba2cea070583ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga09f285de2746a6e27fc66efd60bd3116"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga09f285de2746a6e27fc66efd60bd3116">natsSubscription_AutoUnsubscribe</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int max)</td></tr>
+<tr class="memdesc:ga09f285de2746a6e27fc66efd60bd3116"><td class="mdescLeft">&#160;</td><td class="mdescRight">Auto-Unsubscribes.  <a href="group__sub_group.html#ga09f285de2746a6e27fc66efd60bd3116">More...</a><br /></td></tr>
+<tr class="separator:ga09f285de2746a6e27fc66efd60bd3116"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga8a37b2d5290da3aecc05483d79e7e254"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga8a37b2d5290da3aecc05483d79e7e254">natsSubscription_QueuedMsgs</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, uint64_t *queuedMsgs)</td></tr>
+<tr class="memdesc:ga8a37b2d5290da3aecc05483d79e7e254"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the number of pending messages.  <a href="group__sub_group.html#ga8a37b2d5290da3aecc05483d79e7e254">More...</a><br /></td></tr>
+<tr class="separator:ga8a37b2d5290da3aecc05483d79e7e254"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga5a029a784c0a7f8b5800b48cc995db20"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga5a029a784c0a7f8b5800b48cc995db20">natsSubscription_GetID</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub)</td></tr>
+<tr class="memdesc:ga5a029a784c0a7f8b5800b48cc995db20"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the subscription id.  <a href="group__sub_group.html#ga5a029a784c0a7f8b5800b48cc995db20">More...</a><br /></td></tr>
+<tr class="separator:ga5a029a784c0a7f8b5800b48cc995db20"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gadd4872b9fc5678a73f9ab04ce8428432"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#gadd4872b9fc5678a73f9ab04ce8428432">natsSubscription_GetSubject</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub)</td></tr>
+<tr class="memdesc:gadd4872b9fc5678a73f9ab04ce8428432"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the subject name.  <a href="group__sub_group.html#gadd4872b9fc5678a73f9ab04ce8428432">More...</a><br /></td></tr>
+<tr class="separator:gadd4872b9fc5678a73f9ab04ce8428432"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga68a7cea89e75c529a7dd3bb77303dda4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga68a7cea89e75c529a7dd3bb77303dda4">natsSubscription_SetPendingLimits</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int msgLimit, int bytesLimit)</td></tr>
+<tr class="memdesc:ga68a7cea89e75c529a7dd3bb77303dda4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the limit for pending messages and bytes.  <a href="group__sub_group.html#ga68a7cea89e75c529a7dd3bb77303dda4">More...</a><br /></td></tr>
+<tr class="separator:ga68a7cea89e75c529a7dd3bb77303dda4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga786bb458981274fe717f266bd3b96d96"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga786bb458981274fe717f266bd3b96d96">natsSubscription_GetPendingLimits</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int *msgLimit, int *bytesLimit)</td></tr>
+<tr class="memdesc:ga786bb458981274fe717f266bd3b96d96"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the current limit for pending messages and bytes.  <a href="group__sub_group.html#ga786bb458981274fe717f266bd3b96d96">More...</a><br /></td></tr>
+<tr class="separator:ga786bb458981274fe717f266bd3b96d96"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaca6262e2ef842caa701a9f233db72707"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#gaca6262e2ef842caa701a9f233db72707">natsSubscription_GetPending</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int *msgs, int *bytes)</td></tr>
+<tr class="memdesc:gaca6262e2ef842caa701a9f233db72707"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of pending messages and bytes.  <a href="group__sub_group.html#gaca6262e2ef842caa701a9f233db72707">More...</a><br /></td></tr>
+<tr class="separator:gaca6262e2ef842caa701a9f233db72707"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga476b7276d0b7f9946834d2bb2423e955"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga476b7276d0b7f9946834d2bb2423e955">natsSubscription_GetDelivered</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int64_t *msgs)</td></tr>
+<tr class="memdesc:ga476b7276d0b7f9946834d2bb2423e955"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of delivered messages.  <a href="group__sub_group.html#ga476b7276d0b7f9946834d2bb2423e955">More...</a><br /></td></tr>
+<tr class="separator:ga476b7276d0b7f9946834d2bb2423e955"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga24f1636869e26661ce62c9c9f4d80823"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga24f1636869e26661ce62c9c9f4d80823">natsSubscription_GetDropped</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int64_t *msgs)</td></tr>
+<tr class="memdesc:ga24f1636869e26661ce62c9c9f4d80823"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of dropped messages.  <a href="group__sub_group.html#ga24f1636869e26661ce62c9c9f4d80823">More...</a><br /></td></tr>
+<tr class="separator:ga24f1636869e26661ce62c9c9f4d80823"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga0abc5d9afbc6b0c9c5adaf533904c968"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga0abc5d9afbc6b0c9c5adaf533904c968">natsSubscription_GetMaxPending</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int *msgs, int *bytes)</td></tr>
+<tr class="memdesc:ga0abc5d9afbc6b0c9c5adaf533904c968"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the maximum number of pending messages and bytes.  <a href="group__sub_group.html#ga0abc5d9afbc6b0c9c5adaf533904c968">More...</a><br /></td></tr>
+<tr class="separator:ga0abc5d9afbc6b0c9c5adaf533904c968"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gafe31911d8372db401d33856465421710"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#gafe31911d8372db401d33856465421710">natsSubscription_ClearMaxPending</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub)</td></tr>
+<tr class="memdesc:gafe31911d8372db401d33856465421710"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears the statistics regarding the maximum pending values.  <a href="group__sub_group.html#gafe31911d8372db401d33856465421710">More...</a><br /></td></tr>
+<tr class="separator:gafe31911d8372db401d33856465421710"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga12b60cdb3aca7329edebc480ae86bfab"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga12b60cdb3aca7329edebc480ae86bfab">natsSubscription_GetStats</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int *pendingMsgs, int *pendingBytes, int *maxPendingMsgs, int *maxPendingBytes, int64_t *deliveredMsgs, int64_t *droppedMsgs)</td></tr>
+<tr class="memdesc:ga12b60cdb3aca7329edebc480ae86bfab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get various statistics from this subscription.  <a href="group__sub_group.html#ga12b60cdb3aca7329edebc480ae86bfab">More...</a><br /></td></tr>
+<tr class="separator:ga12b60cdb3aca7329edebc480ae86bfab"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga5e6454bbc7a90b9694112d45bd8de903"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga5e6454bbc7a90b9694112d45bd8de903">natsSubscription_IsValid</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub)</td></tr>
+<tr class="memdesc:ga5e6454bbc7a90b9694112d45bd8de903"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks the validity of the subscription.  <a href="group__sub_group.html#ga5e6454bbc7a90b9694112d45bd8de903">More...</a><br /></td></tr>
+<tr class="separator:ga5e6454bbc7a90b9694112d45bd8de903"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga26c9736289d326fb7d6df7e2a0df72ab"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga26c9736289d326fb7d6df7e2a0df72ab">natsSubscription_Drain</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub)</td></tr>
+<tr class="memdesc:ga26c9736289d326fb7d6df7e2a0df72ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Drains the subscription with a default timeout.  <a href="group__sub_group.html#ga26c9736289d326fb7d6df7e2a0df72ab">More...</a><br /></td></tr>
+<tr class="separator:ga26c9736289d326fb7d6df7e2a0df72ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga9c26a3f9584e7804060a48ec1b7e2a68"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga9c26a3f9584e7804060a48ec1b7e2a68">natsSubscription_DrainTimeout</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int64_t timeout)</td></tr>
+<tr class="memdesc:ga9c26a3f9584e7804060a48ec1b7e2a68"><td class="mdescLeft">&#160;</td><td class="mdescRight">Drains the subscription with the specified timeout.  <a href="group__sub_group.html#ga9c26a3f9584e7804060a48ec1b7e2a68">More...</a><br /></td></tr>
+<tr class="separator:ga9c26a3f9584e7804060a48ec1b7e2a68"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga0408c9b6e4ad4078ac0267656ace222d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga0408c9b6e4ad4078ac0267656ace222d">natsSubscription_WaitForDrainCompletion</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int64_t timeout)</td></tr>
+<tr class="memdesc:ga0408c9b6e4ad4078ac0267656ace222d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Blocks until the drain operation completes.  <a href="group__sub_group.html#ga0408c9b6e4ad4078ac0267656ace222d">More...</a><br /></td></tr>
+<tr class="separator:ga0408c9b6e4ad4078ac0267656ace222d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga9834bd02f67a25ac084d5ad71e146019"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga9834bd02f67a25ac084d5ad71e146019">natsSubscription_DrainCompletionStatus</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub)</td></tr>
+<tr class="memdesc:ga9834bd02f67a25ac084d5ad71e146019"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the status of the drain after completion.  <a href="group__sub_group.html#ga9834bd02f67a25ac084d5ad71e146019">More...</a><br /></td></tr>
+<tr class="separator:ga9834bd02f67a25ac084d5ad71e146019"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaea632f845d473e7461b134c0e7bf4077"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#gaea632f845d473e7461b134c0e7bf4077">natsSubscription_SetOnCompleteCB</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, <a class="el" href="group__callbacks_group.html#ga245131e64f1d0dff7edc8ed874a07e9a">natsOnCompleteCB</a> cb, void *closure)</td></tr>
+<tr class="memdesc:gaea632f845d473e7461b134c0e7bf4077"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets a completion callback.  <a href="group__sub_group.html#gaea632f845d473e7461b134c0e7bf4077">More...</a><br /></td></tr>
+<tr class="separator:gaea632f845d473e7461b134c0e7bf4077"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga50a95dd96e9b714201679a015d62832f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sub_group.html#ga50a95dd96e9b714201679a015d62832f">natsSubscription_Destroy</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub)</td></tr>
+<tr class="memdesc:ga50a95dd96e9b714201679a015d62832f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the subscription.  <a href="group__sub_group.html#ga50a95dd96e9b714201679a015d62832f">More...</a><br /></td></tr>
+<tr class="separator:ga50a95dd96e9b714201679a015d62832f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga35e0e6e5e3b7f3818a3ac3600efb8f8f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_mgt_group.html#ga35e0e6e5e3b7f3818a3ac3600efb8f8f">stanConnection_Connect</a> (<a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> **sc, const char *clusterID, const char *clientID, <a class="el" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *options)</td></tr>
+<tr class="memdesc:ga35e0e6e5e3b7f3818a3ac3600efb8f8f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connects to a <code>NATS Streaming Server</code> using the provided options.  <a href="group__stan_conn_mgt_group.html#ga35e0e6e5e3b7f3818a3ac3600efb8f8f">More...</a><br /></td></tr>
+<tr class="separator:ga35e0e6e5e3b7f3818a3ac3600efb8f8f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga166ec494a55c9b1f9ebafd2294e05ff6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_mgt_group.html#ga166ec494a55c9b1f9ebafd2294e05ff6">stanConnection_GetNATSConnection</a> (<a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *sc, <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> **nc)</td></tr>
+<tr class="memdesc:ga166ec494a55c9b1f9ebafd2294e05ff6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the underlying NATS Connection.  <a href="group__stan_conn_mgt_group.html#ga166ec494a55c9b1f9ebafd2294e05ff6">More...</a><br /></td></tr>
+<tr class="separator:ga166ec494a55c9b1f9ebafd2294e05ff6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2e56a93825e1214a5ab688860e2a8ce6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_mgt_group.html#ga2e56a93825e1214a5ab688860e2a8ce6">stanConnection_ReleaseNATSConnection</a> (<a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *sc)</td></tr>
+<tr class="memdesc:ga2e56a93825e1214a5ab688860e2a8ce6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Releases the NATS Connection.  <a href="group__stan_conn_mgt_group.html#ga2e56a93825e1214a5ab688860e2a8ce6">More...</a><br /></td></tr>
+<tr class="separator:ga2e56a93825e1214a5ab688860e2a8ce6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga4952a7f65a53fdb5ca1c26b1a1656f1d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_mgt_group.html#ga4952a7f65a53fdb5ca1c26b1a1656f1d">stanConnection_Close</a> (<a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *sc)</td></tr>
+<tr class="memdesc:ga4952a7f65a53fdb5ca1c26b1a1656f1d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Closes the connection.  <a href="group__stan_conn_mgt_group.html#ga4952a7f65a53fdb5ca1c26b1a1656f1d">More...</a><br /></td></tr>
+<tr class="separator:ga4952a7f65a53fdb5ca1c26b1a1656f1d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaea095eec18fdf04e06de16711f8b1a04"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_mgt_group.html#gaea095eec18fdf04e06de16711f8b1a04">stanConnection_Destroy</a> (<a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *sc)</td></tr>
+<tr class="memdesc:gaea095eec18fdf04e06de16711f8b1a04"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the connection object.  <a href="group__stan_conn_mgt_group.html#gaea095eec18fdf04e06de16711f8b1a04">More...</a><br /></td></tr>
+<tr class="separator:gaea095eec18fdf04e06de16711f8b1a04"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga24f3f7f709b15fe53e1edaeead08fc7d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_pub_group.html#ga24f3f7f709b15fe53e1edaeead08fc7d">stanConnection_Publish</a> (<a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *sc, const char *channel, const void *data, int dataLen)</td></tr>
+<tr class="memdesc:ga24f3f7f709b15fe53e1edaeead08fc7d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Publishes data on a channel.  <a href="group__stan_conn_pub_group.html#ga24f3f7f709b15fe53e1edaeead08fc7d">More...</a><br /></td></tr>
+<tr class="separator:ga24f3f7f709b15fe53e1edaeead08fc7d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga0c4d1e4615f8ac834f0a4021f75d39f0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_pub_group.html#ga0c4d1e4615f8ac834f0a4021f75d39f0">stanConnection_PublishAsync</a> (<a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *sc, const char *channel, const void *data, int dataLen, <a class="el" href="group__callbacks_group.html#gad5d6a685731b3bf635995b7375af4d18">stanPubAckHandler</a> ah, void *ahClosure)</td></tr>
+<tr class="memdesc:ga0c4d1e4615f8ac834f0a4021f75d39f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Asynchronously publishes data on a channel.  <a href="group__stan_conn_pub_group.html#ga0c4d1e4615f8ac834f0a4021f75d39f0">More...</a><br /></td></tr>
+<tr class="separator:ga0c4d1e4615f8ac834f0a4021f75d39f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gae545358fdc493baf6d29429a8156781f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_sub_group.html#gae545358fdc493baf6d29429a8156781f">stanConnection_Subscribe</a> (<a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a> **sub, <a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *sc, const char *channel, <a class="el" href="group__callbacks_group.html#gaf7456e37fa14f1834d9048d3789e9409">stanMsgHandler</a> cb, void *cbClosure, <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *options)</td></tr>
+<tr class="memdesc:gae545358fdc493baf6d29429a8156781f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a subscription.  <a href="group__stan_conn_sub_group.html#gae545358fdc493baf6d29429a8156781f">More...</a><br /></td></tr>
+<tr class="separator:gae545358fdc493baf6d29429a8156781f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga17d42bf9a4fa39470561a1a668e6b4a2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_conn_sub_group.html#ga17d42bf9a4fa39470561a1a668e6b4a2">stanConnection_QueueSubscribe</a> (<a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a> **sub, <a class="el" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *sc, const char *channel, const char *queueGroup, <a class="el" href="group__callbacks_group.html#gaf7456e37fa14f1834d9048d3789e9409">stanMsgHandler</a> cb, void *cbClosure, <a class="el" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *options)</td></tr>
+<tr class="memdesc:ga17d42bf9a4fa39470561a1a668e6b4a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a queue subscription.  <a href="group__stan_conn_sub_group.html#ga17d42bf9a4fa39470561a1a668e6b4a2">More...</a><br /></td></tr>
+<tr class="separator:ga17d42bf9a4fa39470561a1a668e6b4a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga7b039908ec45cfc2c16ec61ba8daca9d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_group.html#ga7b039908ec45cfc2c16ec61ba8daca9d">stanSubscription_SetOnCompleteCB</a> (<a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a> *sub, <a class="el" href="group__callbacks_group.html#ga245131e64f1d0dff7edc8ed874a07e9a">natsOnCompleteCB</a> cb, void *closure)</td></tr>
+<tr class="memdesc:ga7b039908ec45cfc2c16ec61ba8daca9d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets a completion callback.  <a href="group__stan_sub_group.html#ga7b039908ec45cfc2c16ec61ba8daca9d">More...</a><br /></td></tr>
+<tr class="separator:ga7b039908ec45cfc2c16ec61ba8daca9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga3a1cca9fa3ea54fcf7a43fd1335a26d3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_group.html#ga3a1cca9fa3ea54fcf7a43fd1335a26d3">stanSubscription_AckMsg</a> (<a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a> *sub, <a class="el" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a> *msg)</td></tr>
+<tr class="memdesc:ga3a1cca9fa3ea54fcf7a43fd1335a26d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Acknowledge a message.  <a href="group__stan_sub_group.html#ga3a1cca9fa3ea54fcf7a43fd1335a26d3">More...</a><br /></td></tr>
+<tr class="separator:ga3a1cca9fa3ea54fcf7a43fd1335a26d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gafa428a7e0f6800216cb06fd738bd235e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_group.html#gafa428a7e0f6800216cb06fd738bd235e">stanSubscription_Unsubscribe</a> (<a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a> *sub)</td></tr>
+<tr class="memdesc:gafa428a7e0f6800216cb06fd738bd235e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Permanently remove a subscription.  <a href="group__stan_sub_group.html#gafa428a7e0f6800216cb06fd738bd235e">More...</a><br /></td></tr>
+<tr class="separator:gafa428a7e0f6800216cb06fd738bd235e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gacfa3a7b4fa333c84acfa7521fbbb5bcc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_group.html#gacfa3a7b4fa333c84acfa7521fbbb5bcc">stanSubscription_Close</a> (<a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a> *sub)</td></tr>
+<tr class="memdesc:gacfa3a7b4fa333c84acfa7521fbbb5bcc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Closes the subscription.  <a href="group__stan_sub_group.html#gacfa3a7b4fa333c84acfa7521fbbb5bcc">More...</a><br /></td></tr>
+<tr class="separator:gacfa3a7b4fa333c84acfa7521fbbb5bcc"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga3f6ce924f6a1830a55e30e9910aad4ba"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__stan_sub_group.html#ga3f6ce924f6a1830a55e30e9910aad4ba">stanSubscription_Destroy</a> (<a class="el" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a> *sub)</td></tr>
+<tr class="memdesc:ga3f6ce924f6a1830a55e30e9910aad4ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the subscription.  <a href="group__stan_sub_group.html#ga3f6ce924f6a1830a55e30e9910aad4ba">More...</a><br /></td></tr>
+<tr class="separator:ga3f6ce924f6a1830a55e30e9910aad4ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga855ff9a04888d696785cc5ede96112e4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_group.html#ga855ff9a04888d696785cc5ede96112e4">jsOptions_Init</a> (<a class="el" href="structjs_options.html">jsOptions</a> *opts)</td></tr>
+<tr class="memdesc:ga855ff9a04888d696785cc5ede96112e4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a streaming context options structure.  <a href="group__js_group.html#ga855ff9a04888d696785cc5ede96112e4">More...</a><br /></td></tr>
+<tr class="separator:ga855ff9a04888d696785cc5ede96112e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga8ed08b0fe1074b1e490291f0af2cb03f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_group.html#ga8ed08b0fe1074b1e490291f0af2cb03f">natsConnection_JetStream</a> (<a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> **js, <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <a class="el" href="structjs_options.html">jsOptions</a> *opts)</td></tr>
+<tr class="memdesc:ga8ed08b0fe1074b1e490291f0af2cb03f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a new JetStream context.  <a href="group__js_group.html#ga8ed08b0fe1074b1e490291f0af2cb03f">More...</a><br /></td></tr>
+<tr class="separator:ga8ed08b0fe1074b1e490291f0af2cb03f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gacfa6ce3e60ea540e3331a09a7f3dc856"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_group.html#gacfa6ce3e60ea540e3331a09a7f3dc856">jsCtx_Destroy</a> (<a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js)</td></tr>
+<tr class="memdesc:gacfa6ce3e60ea540e3331a09a7f3dc856"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the JetStream context.  <a href="group__js_group.html#gacfa6ce3e60ea540e3331a09a7f3dc856">More...</a><br /></td></tr>
+<tr class="separator:gacfa6ce3e60ea540e3331a09a7f3dc856"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gac230f71dbdc4d10bc7471d01763881d6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#gac230f71dbdc4d10bc7471d01763881d6">jsStreamConfig_Init</a> (<a class="el" href="structjs_stream_config.html">jsStreamConfig</a> *cfg)</td></tr>
+<tr class="memdesc:gac230f71dbdc4d10bc7471d01763881d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a streaming configuration structure.  <a href="group__js_assets_group.html#gac230f71dbdc4d10bc7471d01763881d6">More...</a><br /></td></tr>
+<tr class="separator:gac230f71dbdc4d10bc7471d01763881d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga223691e6831072a0b8f8103a778293b0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga223691e6831072a0b8f8103a778293b0">jsPlacement_Init</a> (<a class="el" href="structjs_placement.html">jsPlacement</a> *placement)</td></tr>
+<tr class="memdesc:ga223691e6831072a0b8f8103a778293b0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a placement configuration structure.  <a href="group__js_assets_group.html#ga223691e6831072a0b8f8103a778293b0">More...</a><br /></td></tr>
+<tr class="separator:ga223691e6831072a0b8f8103a778293b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga7fe8e0bf98a38eb59372e7cd78aaaf56"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga7fe8e0bf98a38eb59372e7cd78aaaf56">jsStreamSource_Init</a> (<a class="el" href="structjs_stream_source.html">jsStreamSource</a> *source)</td></tr>
+<tr class="memdesc:ga7fe8e0bf98a38eb59372e7cd78aaaf56"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a stream source configuration structure.  <a href="group__js_assets_group.html#ga7fe8e0bf98a38eb59372e7cd78aaaf56">More...</a><br /></td></tr>
+<tr class="separator:ga7fe8e0bf98a38eb59372e7cd78aaaf56"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga81aebebcd79922104720da51e95020d4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga81aebebcd79922104720da51e95020d4">jsExternalStream_Init</a> (<a class="el" href="structjs_external_stream.html">jsExternalStream</a> *external)</td></tr>
+<tr class="memdesc:ga81aebebcd79922104720da51e95020d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes an external stream configuration structure.  <a href="group__js_assets_group.html#ga81aebebcd79922104720da51e95020d4">More...</a><br /></td></tr>
+<tr class="separator:ga81aebebcd79922104720da51e95020d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga388bfeaa5a78ebf6ce7c15c6e3a7156b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga388bfeaa5a78ebf6ce7c15c6e3a7156b">jsRePublish_Init</a> (<a class="el" href="structjs_re_publish.html">jsRePublish</a> *rp)</td></tr>
+<tr class="memdesc:ga388bfeaa5a78ebf6ce7c15c6e3a7156b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a republish structure.  <a href="group__js_assets_group.html#ga388bfeaa5a78ebf6ce7c15c6e3a7156b">More...</a><br /></td></tr>
+<tr class="separator:ga388bfeaa5a78ebf6ce7c15c6e3a7156b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga5efc5136d33ba52161e6732f88f1ee75"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga5efc5136d33ba52161e6732f88f1ee75">js_AddStream</a> (<a class="el" href="structjs_stream_info.html">jsStreamInfo</a> **si, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="el" href="structjs_stream_config.html">jsStreamConfig</a> *cfg, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:ga5efc5136d33ba52161e6732f88f1ee75"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a stream.  <a href="group__js_assets_group.html#ga5efc5136d33ba52161e6732f88f1ee75">More...</a><br /></td></tr>
+<tr class="separator:ga5efc5136d33ba52161e6732f88f1ee75"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga75a5c44304e24481c67e17fbccc15c31"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga75a5c44304e24481c67e17fbccc15c31">js_UpdateStream</a> (<a class="el" href="structjs_stream_info.html">jsStreamInfo</a> **si, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="el" href="structjs_stream_config.html">jsStreamConfig</a> *cfg, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:ga75a5c44304e24481c67e17fbccc15c31"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates a stream.  <a href="group__js_assets_group.html#ga75a5c44304e24481c67e17fbccc15c31">More...</a><br /></td></tr>
+<tr class="separator:ga75a5c44304e24481c67e17fbccc15c31"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga5a6a886c18a79caa403908bf7f7ef125"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga5a6a886c18a79caa403908bf7f7ef125">js_PurgeStream</a> (<a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *stream, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:ga5a6a886c18a79caa403908bf7f7ef125"><td class="mdescLeft">&#160;</td><td class="mdescRight">Purges a stream.  <a href="group__js_assets_group.html#ga5a6a886c18a79caa403908bf7f7ef125">More...</a><br /></td></tr>
+<tr class="separator:ga5a6a886c18a79caa403908bf7f7ef125"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga397e55a0b3b6d36c9bf746eee3842172"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga397e55a0b3b6d36c9bf746eee3842172">js_DeleteStream</a> (<a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *stream, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:ga397e55a0b3b6d36c9bf746eee3842172"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deletes a stream.  <a href="group__js_assets_group.html#ga397e55a0b3b6d36c9bf746eee3842172">More...</a><br /></td></tr>
+<tr class="separator:ga397e55a0b3b6d36c9bf746eee3842172"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga9fe289ae172f83e53ca1b1b747744c1f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga9fe289ae172f83e53ca1b1b747744c1f">js_GetMsg</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **msg, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *stream, uint64_t seq, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:ga9fe289ae172f83e53ca1b1b747744c1f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves a JetStream message from the stream by sequence.  <a href="group__js_assets_group.html#ga9fe289ae172f83e53ca1b1b747744c1f">More...</a><br /></td></tr>
+<tr class="separator:ga9fe289ae172f83e53ca1b1b747744c1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga6835b53da27d5721eddb3698e582cf0c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga6835b53da27d5721eddb3698e582cf0c">js_GetLastMsg</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **msg, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *stream, const char *subject, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:ga6835b53da27d5721eddb3698e582cf0c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the last JetStream message from the stream for a given subject.  <a href="group__js_assets_group.html#ga6835b53da27d5721eddb3698e582cf0c">More...</a><br /></td></tr>
+<tr class="separator:ga6835b53da27d5721eddb3698e582cf0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga8d835d47aed9c84ce3b8dcfea469f4cb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga8d835d47aed9c84ce3b8dcfea469f4cb">jsDirectGetMsgOptions_Init</a> (<a class="el" href="structjs_direct_get_msg_options.html">jsDirectGetMsgOptions</a> *opts)</td></tr>
+<tr class="memdesc:ga8d835d47aed9c84ce3b8dcfea469f4cb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a direct get message options structure.  <a href="group__js_assets_group.html#ga8d835d47aed9c84ce3b8dcfea469f4cb">More...</a><br /></td></tr>
+<tr class="separator:ga8d835d47aed9c84ce3b8dcfea469f4cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga62c250cecc650b1eed0fa1691893e2ae"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga62c250cecc650b1eed0fa1691893e2ae">js_DirectGetMsg</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **msg, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *stream, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="structjs_direct_get_msg_options.html">jsDirectGetMsgOptions</a> *dgOpts)</td></tr>
+<tr class="memdesc:ga62c250cecc650b1eed0fa1691893e2ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves directly a JetStream message based on provided options.  <a href="group__js_assets_group.html#ga62c250cecc650b1eed0fa1691893e2ae">More...</a><br /></td></tr>
+<tr class="separator:ga62c250cecc650b1eed0fa1691893e2ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaeba5d45abbe811c0e40830c5f26c78fd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#gaeba5d45abbe811c0e40830c5f26c78fd">js_DeleteMsg</a> (<a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *stream, uint64_t seq, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:gaeba5d45abbe811c0e40830c5f26c78fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deletes a message from the stream.  <a href="group__js_assets_group.html#gaeba5d45abbe811c0e40830c5f26c78fd">More...</a><br /></td></tr>
+<tr class="separator:gaeba5d45abbe811c0e40830c5f26c78fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga7158f73e183462e9a15e9802e1746ff0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga7158f73e183462e9a15e9802e1746ff0">js_EraseMsg</a> (<a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *stream, uint64_t seq, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:ga7158f73e183462e9a15e9802e1746ff0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Erases a message from the stream.  <a href="group__js_assets_group.html#ga7158f73e183462e9a15e9802e1746ff0">More...</a><br /></td></tr>
+<tr class="separator:ga7158f73e183462e9a15e9802e1746ff0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga94cb23a35516b7779de28fcbb263180a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga94cb23a35516b7779de28fcbb263180a">js_GetStreamInfo</a> (<a class="el" href="structjs_stream_info.html">jsStreamInfo</a> **si, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *stream, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:ga94cb23a35516b7779de28fcbb263180a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retreives information from a stream.  <a href="group__js_assets_group.html#ga94cb23a35516b7779de28fcbb263180a">More...</a><br /></td></tr>
+<tr class="separator:ga94cb23a35516b7779de28fcbb263180a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga8ee87ef86e94be42685941abe9638bbd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga8ee87ef86e94be42685941abe9638bbd">jsStreamInfo_Destroy</a> (<a class="el" href="structjs_stream_info.html">jsStreamInfo</a> *si)</td></tr>
+<tr class="memdesc:ga8ee87ef86e94be42685941abe9638bbd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the stream information object.  <a href="group__js_assets_group.html#ga8ee87ef86e94be42685941abe9638bbd">More...</a><br /></td></tr>
+<tr class="separator:ga8ee87ef86e94be42685941abe9638bbd"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga531d91de372f0dffb8d64abecf88b0c0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga531d91de372f0dffb8d64abecf88b0c0">js_Streams</a> (<a class="el" href="structjs_stream_info_list.html">jsStreamInfoList</a> **list, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:ga531d91de372f0dffb8d64abecf88b0c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the list of all available streams.  <a href="group__js_assets_group.html#ga531d91de372f0dffb8d64abecf88b0c0">More...</a><br /></td></tr>
+<tr class="separator:ga531d91de372f0dffb8d64abecf88b0c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga38cdcc339eb8976d23296b99aa37d629"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga38cdcc339eb8976d23296b99aa37d629">jsStreamInfoList_Destroy</a> (<a class="el" href="structjs_stream_info_list.html">jsStreamInfoList</a> *list)</td></tr>
+<tr class="memdesc:ga38cdcc339eb8976d23296b99aa37d629"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the stream information list object.  <a href="group__js_assets_group.html#ga38cdcc339eb8976d23296b99aa37d629">More...</a><br /></td></tr>
+<tr class="separator:ga38cdcc339eb8976d23296b99aa37d629"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gac3dfc87863dbbb3c959ecde4bce905bc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#gac3dfc87863dbbb3c959ecde4bce905bc">js_StreamNames</a> (<a class="el" href="structjs_stream_names_list.html">jsStreamNamesList</a> **list, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:gac3dfc87863dbbb3c959ecde4bce905bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the list of all available stream names.  <a href="group__js_assets_group.html#gac3dfc87863dbbb3c959ecde4bce905bc">More...</a><br /></td></tr>
+<tr class="separator:gac3dfc87863dbbb3c959ecde4bce905bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf8644f281d4e24893a6a170b4f7faa65"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#gaf8644f281d4e24893a6a170b4f7faa65">jsStreamNamesList_Destroy</a> (<a class="el" href="structjs_stream_names_list.html">jsStreamNamesList</a> *list)</td></tr>
+<tr class="memdesc:gaf8644f281d4e24893a6a170b4f7faa65"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the stream names list object.  <a href="group__js_assets_group.html#gaf8644f281d4e24893a6a170b4f7faa65">More...</a><br /></td></tr>
+<tr class="separator:gaf8644f281d4e24893a6a170b4f7faa65"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga3381bb05c05bf4a8979adde68d37dd66"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga3381bb05c05bf4a8979adde68d37dd66">jsConsumerConfig_Init</a> (<a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a> *cc)</td></tr>
+<tr class="memdesc:ga3381bb05c05bf4a8979adde68d37dd66"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a consumer configuration structure.  <a href="group__js_assets_group.html#ga3381bb05c05bf4a8979adde68d37dd66">More...</a><br /></td></tr>
+<tr class="separator:ga3381bb05c05bf4a8979adde68d37dd66"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf2efb63db150e782d9007090b49d4115"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#gaf2efb63db150e782d9007090b49d4115">js_AddConsumer</a> (<a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a> **ci, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *stream, <a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a> *cfg, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:gaf2efb63db150e782d9007090b49d4115"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds a JetStream consumer.  <a href="group__js_assets_group.html#gaf2efb63db150e782d9007090b49d4115">More...</a><br /></td></tr>
+<tr class="separator:gaf2efb63db150e782d9007090b49d4115"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gad13ec256e24710bb237995814871e554"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#gad13ec256e24710bb237995814871e554">js_UpdateConsumer</a> (<a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a> **ci, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *stream, <a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a> *cfg, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:gad13ec256e24710bb237995814871e554"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates a JetStream consumer.  <a href="group__js_assets_group.html#gad13ec256e24710bb237995814871e554">More...</a><br /></td></tr>
+<tr class="separator:gad13ec256e24710bb237995814871e554"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2dda04757b4ab27a794b64f8d727fe23"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga2dda04757b4ab27a794b64f8d727fe23">js_GetConsumerInfo</a> (<a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a> **ci, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *stream, const char *consumer, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:ga2dda04757b4ab27a794b64f8d727fe23"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves information about a consumer.  <a href="group__js_assets_group.html#ga2dda04757b4ab27a794b64f8d727fe23">More...</a><br /></td></tr>
+<tr class="separator:ga2dda04757b4ab27a794b64f8d727fe23"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga52fbc61759b11494db91f348a733c490"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga52fbc61759b11494db91f348a733c490">js_DeleteConsumer</a> (<a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *stream, const char *consumer, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:ga52fbc61759b11494db91f348a733c490"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deletes a consumer.  <a href="group__js_assets_group.html#ga52fbc61759b11494db91f348a733c490">More...</a><br /></td></tr>
+<tr class="separator:ga52fbc61759b11494db91f348a733c490"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga9c1d5ed2f24ba836c10e415231f80088"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga9c1d5ed2f24ba836c10e415231f80088">jsConsumerInfo_Destroy</a> (<a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a> *ci)</td></tr>
+<tr class="memdesc:ga9c1d5ed2f24ba836c10e415231f80088"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the consumer information object.  <a href="group__js_assets_group.html#ga9c1d5ed2f24ba836c10e415231f80088">More...</a><br /></td></tr>
+<tr class="separator:ga9c1d5ed2f24ba836c10e415231f80088"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf28097ede3e9ba9926fb00856e63ffd9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#gaf28097ede3e9ba9926fb00856e63ffd9">js_Consumers</a> (<a class="el" href="structjs_consumer_info_list.html">jsConsumerInfoList</a> **list, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *stream, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:gaf28097ede3e9ba9926fb00856e63ffd9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the list of all available consumers for a stream.  <a href="group__js_assets_group.html#gaf28097ede3e9ba9926fb00856e63ffd9">More...</a><br /></td></tr>
+<tr class="separator:gaf28097ede3e9ba9926fb00856e63ffd9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga421de40d8e91658353111c3f2ea90ec8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga421de40d8e91658353111c3f2ea90ec8">jsConsumerInfoList_Destroy</a> (<a class="el" href="structjs_consumer_info_list.html">jsConsumerInfoList</a> *list)</td></tr>
+<tr class="memdesc:ga421de40d8e91658353111c3f2ea90ec8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the consumer information list object.  <a href="group__js_assets_group.html#ga421de40d8e91658353111c3f2ea90ec8">More...</a><br /></td></tr>
+<tr class="separator:ga421de40d8e91658353111c3f2ea90ec8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga690d19af55d12b82c8523d1861cef8d0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga690d19af55d12b82c8523d1861cef8d0">js_ConsumerNames</a> (<a class="el" href="structjs_consumer_names_list.html">jsConsumerNamesList</a> **list, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *stream, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:ga690d19af55d12b82c8523d1861cef8d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the list of all available consumer names for a stream.  <a href="group__js_assets_group.html#ga690d19af55d12b82c8523d1861cef8d0">More...</a><br /></td></tr>
+<tr class="separator:ga690d19af55d12b82c8523d1861cef8d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2ced0d190131460bf4608ab893dffc50"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga2ced0d190131460bf4608ab893dffc50">jsConsumerNamesList_Destroy</a> (<a class="el" href="structjs_consumer_names_list.html">jsConsumerNamesList</a> *list)</td></tr>
+<tr class="memdesc:ga2ced0d190131460bf4608ab893dffc50"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the consumer names list object.  <a href="group__js_assets_group.html#ga2ced0d190131460bf4608ab893dffc50">More...</a><br /></td></tr>
+<tr class="separator:ga2ced0d190131460bf4608ab893dffc50"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gac8965dcfc6b465fbc323aa552c606c46"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#gac8965dcfc6b465fbc323aa552c606c46">js_GetAccountInfo</a> (<a class="el" href="structjs_account_info.html">jsAccountInfo</a> **ai, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:gac8965dcfc6b465fbc323aa552c606c46"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves information about the JetStream usage from an account.  <a href="group__js_assets_group.html#gac8965dcfc6b465fbc323aa552c606c46">More...</a><br /></td></tr>
+<tr class="separator:gac8965dcfc6b465fbc323aa552c606c46"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga7c8664b38fcce8497746367d35e5f60b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_assets_group.html#ga7c8664b38fcce8497746367d35e5f60b">jsAccountInfo_Destroy</a> (<a class="el" href="structjs_account_info.html">jsAccountInfo</a> *ai)</td></tr>
+<tr class="memdesc:ga7c8664b38fcce8497746367d35e5f60b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the account information object.  <a href="group__js_assets_group.html#ga7c8664b38fcce8497746367d35e5f60b">More...</a><br /></td></tr>
+<tr class="separator:ga7c8664b38fcce8497746367d35e5f60b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf09f333a8675a8060c5ede07a6bdeef9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_pub_group.html#gaf09f333a8675a8060c5ede07a6bdeef9">jsPubOptions_Init</a> (<a class="el" href="structjs_pub_options.html">jsPubOptions</a> *opts)</td></tr>
+<tr class="memdesc:gaf09f333a8675a8060c5ede07a6bdeef9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a publish options structure.  <a href="group__js_pub_group.html#gaf09f333a8675a8060c5ede07a6bdeef9">More...</a><br /></td></tr>
+<tr class="separator:gaf09f333a8675a8060c5ede07a6bdeef9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gac6ba005531c82d9f0efa88dd6b458477"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_pub_group.html#gac6ba005531c82d9f0efa88dd6b458477">js_Publish</a> (<a class="el" href="structjs_pub_ack.html">jsPubAck</a> **pubAck, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *subj, const void *data, int dataLen, <a class="el" href="structjs_pub_options.html">jsPubOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:gac6ba005531c82d9f0efa88dd6b458477"><td class="mdescLeft">&#160;</td><td class="mdescRight">Publishes data on a subject to JetStream.  <a href="group__js_pub_group.html#gac6ba005531c82d9f0efa88dd6b458477">More...</a><br /></td></tr>
+<tr class="separator:gac6ba005531c82d9f0efa88dd6b458477"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2aceeb82fac3621aea843dd246732bdd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_pub_group.html#ga2aceeb82fac3621aea843dd246732bdd">js_PublishMsg</a> (<a class="el" href="structjs_pub_ack.html">jsPubAck</a> **pubAck, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, <a class="el" href="structjs_pub_options.html">jsPubOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:ga2aceeb82fac3621aea843dd246732bdd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Publishes a message to JetStream.  <a href="group__js_pub_group.html#ga2aceeb82fac3621aea843dd246732bdd">More...</a><br /></td></tr>
+<tr class="separator:ga2aceeb82fac3621aea843dd246732bdd"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaac130840b6db9109e72cf6ad9186dfc4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_pub_group.html#gaac130840b6db9109e72cf6ad9186dfc4">jsPubAck_Destroy</a> (<a class="el" href="structjs_pub_ack.html">jsPubAck</a> *pubAck)</td></tr>
+<tr class="memdesc:gaac130840b6db9109e72cf6ad9186dfc4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the publish acknowledgment object.  <a href="group__js_pub_group.html#gaac130840b6db9109e72cf6ad9186dfc4">More...</a><br /></td></tr>
+<tr class="separator:gaac130840b6db9109e72cf6ad9186dfc4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga069dfd6f0f3d96f1ff8bf2372e59900c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_pub_group.html#ga069dfd6f0f3d96f1ff8bf2372e59900c">js_PublishAsync</a> (<a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *subj, const void *data, int dataLen, <a class="el" href="structjs_pub_options.html">jsPubOptions</a> *opts)</td></tr>
+<tr class="memdesc:ga069dfd6f0f3d96f1ff8bf2372e59900c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Publishes data to JetStream but does not wait for a <a class="el" href="structjs_pub_ack.html">jsPubAck</a>.  <a href="group__js_pub_group.html#ga069dfd6f0f3d96f1ff8bf2372e59900c">More...</a><br /></td></tr>
+<tr class="separator:ga069dfd6f0f3d96f1ff8bf2372e59900c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gab7e4139a48c5ee4d2155cbb43142e873"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_pub_group.html#gab7e4139a48c5ee4d2155cbb43142e873">js_PublishMsgAsync</a> (<a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **msg, <a class="el" href="structjs_pub_options.html">jsPubOptions</a> *opts)</td></tr>
+<tr class="memdesc:gab7e4139a48c5ee4d2155cbb43142e873"><td class="mdescLeft">&#160;</td><td class="mdescRight">Publishes a message to JetStream but does not wait for a <a class="el" href="structjs_pub_ack.html">jsPubAck</a>.  <a href="group__js_pub_group.html#gab7e4139a48c5ee4d2155cbb43142e873">More...</a><br /></td></tr>
+<tr class="separator:gab7e4139a48c5ee4d2155cbb43142e873"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga24813ee9a58f00c0f21d10ab9c93b81d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_pub_group.html#ga24813ee9a58f00c0f21d10ab9c93b81d">js_PublishAsyncComplete</a> (<a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="el" href="structjs_pub_options.html">jsPubOptions</a> *opts)</td></tr>
+<tr class="memdesc:ga24813ee9a58f00c0f21d10ab9c93b81d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wait for all outstanding messages to be acknowledged.  <a href="group__js_pub_group.html#ga24813ee9a58f00c0f21d10ab9c93b81d">More...</a><br /></td></tr>
+<tr class="separator:ga24813ee9a58f00c0f21d10ab9c93b81d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2ac95a3450f77f8074fae3f2fbe7e54c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_pub_group.html#ga2ac95a3450f77f8074fae3f2fbe7e54c">js_PublishAsyncGetPendingList</a> (<a class="el" href="structnats_msg_list.html">natsMsgList</a> *pending, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js)</td></tr>
+<tr class="memdesc:ga2ac95a3450f77f8074fae3f2fbe7e54c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the list of pending messages published asynchronously.  <a href="group__js_pub_group.html#ga2ac95a3450f77f8074fae3f2fbe7e54c">More...</a><br /></td></tr>
+<tr class="separator:ga2ac95a3450f77f8074fae3f2fbe7e54c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga472adb949d1af9d8f07bda99f5d7f3f8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_sub_group.html#ga472adb949d1af9d8f07bda99f5d7f3f8">jsSubOptions_Init</a> (<a class="el" href="structjs_sub_options.html">jsSubOptions</a> *opts)</td></tr>
+<tr class="memdesc:ga472adb949d1af9d8f07bda99f5d7f3f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a subscribe options structure.  <a href="group__js_sub_group.html#ga472adb949d1af9d8f07bda99f5d7f3f8">More...</a><br /></td></tr>
+<tr class="separator:ga472adb949d1af9d8f07bda99f5d7f3f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaa686c6efd84ef963de1925108e896515"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_sub_group.html#gaa686c6efd84ef963de1925108e896515">js_Subscribe</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **sub, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *subject, <a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe">natsMsgHandler</a> cb, void *cbClosure, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="structjs_sub_options.html">jsSubOptions</a> *subOpts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:gaa686c6efd84ef963de1925108e896515"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an asynchronous subscription.  <a href="group__js_sub_group.html#gaa686c6efd84ef963de1925108e896515">More...</a><br /></td></tr>
+<tr class="separator:gaa686c6efd84ef963de1925108e896515"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gabacb010031e535f9fb6e2167337e8adf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_sub_group.html#gabacb010031e535f9fb6e2167337e8adf">js_SubscribeSync</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **sub, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *subject, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="structjs_sub_options.html">jsSubOptions</a> *subOpts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:gabacb010031e535f9fb6e2167337e8adf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a synchronous subscription.  <a href="group__js_sub_group.html#gabacb010031e535f9fb6e2167337e8adf">More...</a><br /></td></tr>
+<tr class="separator:gabacb010031e535f9fb6e2167337e8adf"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaaeaddb73857aa4eb4901eec945ed27cd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_sub_group.html#gaaeaddb73857aa4eb4901eec945ed27cd">js_PullSubscribe</a> (<a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **sub, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *subject, const char *durable, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="structjs_sub_options.html">jsSubOptions</a> *subOpts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:gaaeaddb73857aa4eb4901eec945ed27cd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a pull subscriber.  <a href="group__js_sub_group.html#gaaeaddb73857aa4eb4901eec945ed27cd">More...</a><br /></td></tr>
+<tr class="separator:gaaeaddb73857aa4eb4901eec945ed27cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gafc5e0d2269bd23b4d5fb7f3b05278e50"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_sub_group.html#gafc5e0d2269bd23b4d5fb7f3b05278e50">natsSubscription_Fetch</a> (<a class="el" href="structnats_msg_list.html">natsMsgList</a> *list, <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int batch, int64_t timeout, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:gafc5e0d2269bd23b4d5fb7f3b05278e50"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fetches messages for a pull subscription.  <a href="group__js_sub_group.html#gafc5e0d2269bd23b4d5fb7f3b05278e50">More...</a><br /></td></tr>
+<tr class="separator:gafc5e0d2269bd23b4d5fb7f3b05278e50"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga1c3a62de8cd4855ae61ea4f67417a43b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_sub_group.html#ga1c3a62de8cd4855ae61ea4f67417a43b">jsFetchRequest_Init</a> (<a class="el" href="structjs_fetch_request.html">jsFetchRequest</a> *request)</td></tr>
+<tr class="memdesc:ga1c3a62de8cd4855ae61ea4f67417a43b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a fetch request options structure.  <a href="group__js_sub_group.html#ga1c3a62de8cd4855ae61ea4f67417a43b">More...</a><br /></td></tr>
+<tr class="separator:ga1c3a62de8cd4855ae61ea4f67417a43b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga676292505e7fde8688cfd886b79a10ed"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_sub_group.html#ga676292505e7fde8688cfd886b79a10ed">natsSubscription_FetchRequest</a> (<a class="el" href="structnats_msg_list.html">natsMsgList</a> *list, <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, <a class="el" href="structjs_fetch_request.html">jsFetchRequest</a> *request)</td></tr>
+<tr class="memdesc:ga676292505e7fde8688cfd886b79a10ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fetches messages for a pull subscription with a complete request configuration.  <a href="group__js_sub_group.html#ga676292505e7fde8688cfd886b79a10ed">More...</a><br /></td></tr>
+<tr class="separator:ga676292505e7fde8688cfd886b79a10ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaae716a1431db065744c079b71a9f4c2e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_sub_group.html#gaae716a1431db065744c079b71a9f4c2e">natsSubscription_GetConsumerInfo</a> (<a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a> **ci, <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:gaae716a1431db065744c079b71a9f4c2e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a> associated with this subscription.  <a href="group__js_sub_group.html#gaae716a1431db065744c079b71a9f4c2e">More...</a><br /></td></tr>
+<tr class="separator:gaae716a1431db065744c079b71a9f4c2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga0daed9f0d2d00cb14314ecc180a6fa84"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_sub_group.html#ga0daed9f0d2d00cb14314ecc180a6fa84">natsSubscription_GetSequenceMismatch</a> (<a class="el" href="structjs_consumer_sequence_mismatch.html">jsConsumerSequenceMismatch</a> *csm, <a class="el" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub)</td></tr>
+<tr class="memdesc:ga0daed9f0d2d00cb14314ecc180a6fa84"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the consumer sequence mismatch information.  <a href="group__js_sub_group.html#ga0daed9f0d2d00cb14314ecc180a6fa84">More...</a><br /></td></tr>
+<tr class="separator:ga0daed9f0d2d00cb14314ecc180a6fa84"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gacf48e59038fab35849e9dc6f8fcf6328"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_msg.html#gacf48e59038fab35849e9dc6f8fcf6328">natsMsg_GetMetaData</a> (<a class="el" href="structjs_msg_meta_data.html">jsMsgMetaData</a> **new_meta, <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg)</td></tr>
+<tr class="memdesc:gacf48e59038fab35849e9dc6f8fcf6328"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns metadata from this JetStream message.  <a href="group__js_msg.html#gacf48e59038fab35849e9dc6f8fcf6328">More...</a><br /></td></tr>
+<tr class="separator:gacf48e59038fab35849e9dc6f8fcf6328"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf9bf92294342bcb27053de7038606d12"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_msg.html#gaf9bf92294342bcb27053de7038606d12">jsMsgMetaData_Destroy</a> (<a class="el" href="structjs_msg_meta_data.html">jsMsgMetaData</a> *meta)</td></tr>
+<tr class="memdesc:gaf9bf92294342bcb27053de7038606d12"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the message metadata object.  <a href="group__js_msg.html#gaf9bf92294342bcb27053de7038606d12">More...</a><br /></td></tr>
+<tr class="separator:gaf9bf92294342bcb27053de7038606d12"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gae454fb7e7097a3cd3362cb49ef8a3c84"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_msg.html#gae454fb7e7097a3cd3362cb49ef8a3c84">natsMsg_Ack</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, <a class="el" href="structjs_options.html">jsOptions</a> *opts)</td></tr>
+<tr class="memdesc:gae454fb7e7097a3cd3362cb49ef8a3c84"><td class="mdescLeft">&#160;</td><td class="mdescRight">Acknowledges a message.  <a href="group__js_msg.html#gae454fb7e7097a3cd3362cb49ef8a3c84">More...</a><br /></td></tr>
+<tr class="separator:gae454fb7e7097a3cd3362cb49ef8a3c84"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gafb899ebf8e89b3a858fe20f7853635a7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_msg.html#gafb899ebf8e89b3a858fe20f7853635a7">natsMsg_AckSync</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, <a class="el" href="structjs_options.html">jsOptions</a> *opts, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode)</td></tr>
+<tr class="memdesc:gafb899ebf8e89b3a858fe20f7853635a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Acknowledges a message and wait for a confirmation.  <a href="group__js_msg.html#gafb899ebf8e89b3a858fe20f7853635a7">More...</a><br /></td></tr>
+<tr class="separator:gafb899ebf8e89b3a858fe20f7853635a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gac271b874154301da9759f9ac05768b47"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_msg.html#gac271b874154301da9759f9ac05768b47">natsMsg_Nak</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, <a class="el" href="structjs_options.html">jsOptions</a> *opts)</td></tr>
+<tr class="memdesc:gac271b874154301da9759f9ac05768b47"><td class="mdescLeft">&#160;</td><td class="mdescRight">Negatively acknowledges a message.  <a href="group__js_msg.html#gac271b874154301da9759f9ac05768b47">More...</a><br /></td></tr>
+<tr class="separator:gac271b874154301da9759f9ac05768b47"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gac0697389fa60a3c4725e53cd23ada7bd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_msg.html#gac0697389fa60a3c4725e53cd23ada7bd">natsMsg_NakWithDelay</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, int64_t delay, <a class="el" href="structjs_options.html">jsOptions</a> *opts)</td></tr>
+<tr class="memdesc:gac0697389fa60a3c4725e53cd23ada7bd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Negatively acknowledges a message.  <a href="group__js_msg.html#gac0697389fa60a3c4725e53cd23ada7bd">More...</a><br /></td></tr>
+<tr class="separator:gac0697389fa60a3c4725e53cd23ada7bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gae1e0beb19cd76e2f69e6415c41c9bb39"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_msg.html#gae1e0beb19cd76e2f69e6415c41c9bb39">natsMsg_InProgress</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, <a class="el" href="structjs_options.html">jsOptions</a> *opts)</td></tr>
+<tr class="memdesc:gae1e0beb19cd76e2f69e6415c41c9bb39"><td class="mdescLeft">&#160;</td><td class="mdescRight">Resets redelivery timer on the server.  <a href="group__js_msg.html#gae1e0beb19cd76e2f69e6415c41c9bb39">More...</a><br /></td></tr>
+<tr class="separator:gae1e0beb19cd76e2f69e6415c41c9bb39"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gae84d21e4388255e9d990e53c9f67e7c4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_msg.html#gae84d21e4388255e9d990e53c9f67e7c4">natsMsg_Term</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, <a class="el" href="structjs_options.html">jsOptions</a> *opts)</td></tr>
+<tr class="memdesc:gae84d21e4388255e9d990e53c9f67e7c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Abandon this message.  <a href="group__js_msg.html#gae84d21e4388255e9d990e53c9f67e7c4">More...</a><br /></td></tr>
+<tr class="separator:gae84d21e4388255e9d990e53c9f67e7c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga819be2990ec20b964aa574b5331d7f2e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_msg.html#ga819be2990ec20b964aa574b5331d7f2e">natsMsg_GetSequence</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg)</td></tr>
+<tr class="memdesc:ga819be2990ec20b964aa574b5331d7f2e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the sequence number of this JetStream message.  <a href="group__js_msg.html#ga819be2990ec20b964aa574b5331d7f2e">More...</a><br /></td></tr>
+<tr class="separator:ga819be2990ec20b964aa574b5331d7f2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gab4850497c5481f5ec6eb1fcdb43646f5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__js_msg.html#gab4850497c5481f5ec6eb1fcdb43646f5">natsMsg_GetTime</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg)</td></tr>
+<tr class="memdesc:gab4850497c5481f5ec6eb1fcdb43646f5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the timestamp (in UTC) of this JetStream message.  <a href="group__js_msg.html#gab4850497c5481f5ec6eb1fcdb43646f5">More...</a><br /></td></tr>
+<tr class="separator:gab4850497c5481f5ec6eb1fcdb43646f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga16d4c27d8ac62bb86ba601bc40f53172"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group_mgt.html#ga16d4c27d8ac62bb86ba601bc40f53172">kvConfig_Init</a> (<a class="el" href="structkv_config.html">kvConfig</a> *cfg)</td></tr>
+<tr class="memdesc:ga16d4c27d8ac62bb86ba601bc40f53172"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a KeyValue configuration structure.  <a href="group__kv_group_mgt.html#ga16d4c27d8ac62bb86ba601bc40f53172">More...</a><br /></td></tr>
+<tr class="separator:ga16d4c27d8ac62bb86ba601bc40f53172"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gabc445bfe87112e56a6c73872fec6893e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group_mgt.html#gabc445bfe87112e56a6c73872fec6893e">js_CreateKeyValue</a> (<a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> **new_kv, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="el" href="structkv_config.html">kvConfig</a> *cfg)</td></tr>
+<tr class="memdesc:gabc445bfe87112e56a6c73872fec6893e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a KeyValue store with a given configuration.  <a href="group__kv_group_mgt.html#gabc445bfe87112e56a6c73872fec6893e">More...</a><br /></td></tr>
+<tr class="separator:gabc445bfe87112e56a6c73872fec6893e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga54e6c109a7c633e431b3eded286e00f6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group_mgt.html#ga54e6c109a7c633e431b3eded286e00f6">js_KeyValue</a> (<a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> **new_kv, <a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *bucket)</td></tr>
+<tr class="memdesc:ga54e6c109a7c633e431b3eded286e00f6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Looks-up and binds to an existing KeyValue store.  <a href="group__kv_group_mgt.html#ga54e6c109a7c633e431b3eded286e00f6">More...</a><br /></td></tr>
+<tr class="separator:ga54e6c109a7c633e431b3eded286e00f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga6bc715319560bc28359679fcdcead937"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group_mgt.html#ga6bc715319560bc28359679fcdcead937">js_DeleteKeyValue</a> (<a class="el" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, const char *bucket)</td></tr>
+<tr class="memdesc:ga6bc715319560bc28359679fcdcead937"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deletes a KeyValue store.  <a href="group__kv_group_mgt.html#ga6bc715319560bc28359679fcdcead937">More...</a><br /></td></tr>
+<tr class="separator:ga6bc715319560bc28359679fcdcead937"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gab0d6bdbfabd27af67eaeb36cec0787da"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group_mgt.html#gab0d6bdbfabd27af67eaeb36cec0787da">kvStore_Destroy</a> (<a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv)</td></tr>
+<tr class="memdesc:gab0d6bdbfabd27af67eaeb36cec0787da"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys a KeyValue store object.  <a href="group__kv_group_mgt.html#gab0d6bdbfabd27af67eaeb36cec0787da">More...</a><br /></td></tr>
+<tr class="separator:gab0d6bdbfabd27af67eaeb36cec0787da"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gadedbb410cce499afb535eb6641c32ca7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_entry.html#gadedbb410cce499afb535eb6641c32ca7">kvEntry_Bucket</a> (<a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *e)</td></tr>
+<tr class="memdesc:gadedbb410cce499afb535eb6641c32ca7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the name of the bucket the data was loaded from.  <a href="group__kv_entry.html#gadedbb410cce499afb535eb6641c32ca7">More...</a><br /></td></tr>
+<tr class="separator:gadedbb410cce499afb535eb6641c32ca7"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gab455f32b0abfb1361dab4b5e7d98042a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_entry.html#gab455f32b0abfb1361dab4b5e7d98042a">kvEntry_Key</a> (<a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *e)</td></tr>
+<tr class="memdesc:gab455f32b0abfb1361dab4b5e7d98042a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the name of the key that was retrieved.  <a href="group__kv_entry.html#gab455f32b0abfb1361dab4b5e7d98042a">More...</a><br /></td></tr>
+<tr class="separator:gab455f32b0abfb1361dab4b5e7d98042a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga28077f81d71a30cbce2dc81e5c9574fc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_entry.html#ga28077f81d71a30cbce2dc81e5c9574fc">kvEntry_Value</a> (<a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *e)</td></tr>
+<tr class="memdesc:ga28077f81d71a30cbce2dc81e5c9574fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the value for this key.  <a href="group__kv_entry.html#ga28077f81d71a30cbce2dc81e5c9574fc">More...</a><br /></td></tr>
+<tr class="separator:ga28077f81d71a30cbce2dc81e5c9574fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf7ccc866865903f231e0431754ed2415"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_entry.html#gaf7ccc866865903f231e0431754ed2415">kvEntry_ValueLen</a> (<a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *e)</td></tr>
+<tr class="memdesc:gaf7ccc866865903f231e0431754ed2415"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the value length for this key.  <a href="group__kv_entry.html#gaf7ccc866865903f231e0431754ed2415">More...</a><br /></td></tr>
+<tr class="separator:gaf7ccc866865903f231e0431754ed2415"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga7ff6220915726600545357e31226fb65"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_entry.html#ga7ff6220915726600545357e31226fb65">kvEntry_ValueString</a> (<a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *e)</td></tr>
+<tr class="memdesc:ga7ff6220915726600545357e31226fb65"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the value, as a string, for this key.  <a href="group__kv_entry.html#ga7ff6220915726600545357e31226fb65">More...</a><br /></td></tr>
+<tr class="separator:ga7ff6220915726600545357e31226fb65"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2d58abf81cb577e21a76f9c77568409f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_entry.html#ga2d58abf81cb577e21a76f9c77568409f">kvEntry_Revision</a> (<a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *e)</td></tr>
+<tr class="memdesc:ga2d58abf81cb577e21a76f9c77568409f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the unique sequence for this value.  <a href="group__kv_entry.html#ga2d58abf81cb577e21a76f9c77568409f">More...</a><br /></td></tr>
+<tr class="separator:ga2d58abf81cb577e21a76f9c77568409f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga31ef3a2e3a7df6cf4dbb0a762737800a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_entry.html#ga31ef3a2e3a7df6cf4dbb0a762737800a">kvEntry_Created</a> (<a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *e)</td></tr>
+<tr class="memdesc:ga31ef3a2e3a7df6cf4dbb0a762737800a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the time (in UTC) the data was put in the bucket.  <a href="group__kv_entry.html#ga31ef3a2e3a7df6cf4dbb0a762737800a">More...</a><br /></td></tr>
+<tr class="separator:ga31ef3a2e3a7df6cf4dbb0a762737800a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga233a2d75895cfd0140cf77757592cf47"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_entry.html#ga233a2d75895cfd0140cf77757592cf47">kvEntry_Delta</a> (<a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *e)</td></tr>
+<tr class="memdesc:ga233a2d75895cfd0140cf77757592cf47"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the distance from the latest value.  <a href="group__kv_entry.html#ga233a2d75895cfd0140cf77757592cf47">More...</a><br /></td></tr>
+<tr class="separator:ga233a2d75895cfd0140cf77757592cf47"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga088fd67d3d384ad7a7ddfc82535becea"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="group__types_group.html#ga89db3bd6bf11af3ac5eb3ab560d16332">kvOperation</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_entry.html#ga088fd67d3d384ad7a7ddfc82535becea">kvEntry_Operation</a> (<a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *e)</td></tr>
+<tr class="memdesc:ga088fd67d3d384ad7a7ddfc82535becea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the type of operation of this value.  <a href="group__kv_entry.html#ga088fd67d3d384ad7a7ddfc82535becea">More...</a><br /></td></tr>
+<tr class="separator:ga088fd67d3d384ad7a7ddfc82535becea"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga8359ffcdeefb9c5821e6442d0d5ee388"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_entry.html#ga8359ffcdeefb9c5821e6442d0d5ee388">kvEntry_Destroy</a> (<a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *e)</td></tr>
+<tr class="memdesc:ga8359ffcdeefb9c5821e6442d0d5ee388"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the KeyValue entry object.  <a href="group__kv_entry.html#ga8359ffcdeefb9c5821e6442d0d5ee388">More...</a><br /></td></tr>
+<tr class="separator:ga8359ffcdeefb9c5821e6442d0d5ee388"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2db86f80d6bfce1bdbedf1b9da22913c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#ga2db86f80d6bfce1bdbedf1b9da22913c">kvStore_Get</a> (<a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> **new_entry, <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, const char *key)</td></tr>
+<tr class="memdesc:ga2db86f80d6bfce1bdbedf1b9da22913c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the latest entry for the key.  <a href="group__kv_group.html#ga2db86f80d6bfce1bdbedf1b9da22913c">More...</a><br /></td></tr>
+<tr class="separator:ga2db86f80d6bfce1bdbedf1b9da22913c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga9bf43431bb8264a3ea1f0df401afbe1a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#ga9bf43431bb8264a3ea1f0df401afbe1a">kvStore_GetRevision</a> (<a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> **new_entry, <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, const char *key, uint64_t revision)</td></tr>
+<tr class="memdesc:ga9bf43431bb8264a3ea1f0df401afbe1a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the entry at the specific revision for the key.  <a href="group__kv_group.html#ga9bf43431bb8264a3ea1f0df401afbe1a">More...</a><br /></td></tr>
+<tr class="separator:ga9bf43431bb8264a3ea1f0df401afbe1a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga1fdf7a1d3acf96e475184790589a401e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#ga1fdf7a1d3acf96e475184790589a401e">kvStore_Put</a> (uint64_t *rev, <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, const char *key, const void *data, int len)</td></tr>
+<tr class="memdesc:ga1fdf7a1d3acf96e475184790589a401e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Places the new value for the key into the store.  <a href="group__kv_group.html#ga1fdf7a1d3acf96e475184790589a401e">More...</a><br /></td></tr>
+<tr class="separator:ga1fdf7a1d3acf96e475184790589a401e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga84ebd66a95ce857765d4a16ec35daba9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#ga84ebd66a95ce857765d4a16ec35daba9">kvStore_PutString</a> (uint64_t *rev, <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, const char *key, const char *data)</td></tr>
+<tr class="memdesc:ga84ebd66a95ce857765d4a16ec35daba9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Places the new value (as a string) for the key into the store.  <a href="group__kv_group.html#ga84ebd66a95ce857765d4a16ec35daba9">More...</a><br /></td></tr>
+<tr class="separator:ga84ebd66a95ce857765d4a16ec35daba9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga5289f7cd3999cfb46fb1fcb83178aec6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#ga5289f7cd3999cfb46fb1fcb83178aec6">kvStore_Create</a> (uint64_t *rev, <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, const char *key, const void *data, int len)</td></tr>
+<tr class="memdesc:ga5289f7cd3999cfb46fb1fcb83178aec6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Places the value for the key into the store if and only if the key does not exist.  <a href="group__kv_group.html#ga5289f7cd3999cfb46fb1fcb83178aec6">More...</a><br /></td></tr>
+<tr class="separator:ga5289f7cd3999cfb46fb1fcb83178aec6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga5726ad2e6205d2f6749be013138218ca"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#ga5726ad2e6205d2f6749be013138218ca">kvStore_CreateString</a> (uint64_t *rev, <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, const char *key, const char *data)</td></tr>
+<tr class="memdesc:ga5726ad2e6205d2f6749be013138218ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Places the value (as a string) for the key into the store if and only if the key does not exist.  <a href="group__kv_group.html#ga5726ad2e6205d2f6749be013138218ca">More...</a><br /></td></tr>
+<tr class="separator:ga5726ad2e6205d2f6749be013138218ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gae0c593bb2ef94ae60e775617c9423038"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#gae0c593bb2ef94ae60e775617c9423038">kvStore_Update</a> (uint64_t *rev, <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, const char *key, const void *data, int len, uint64_t last)</td></tr>
+<tr class="memdesc:gae0c593bb2ef94ae60e775617c9423038"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates the value for the key into the store if and only if the latest revision matches.  <a href="group__kv_group.html#gae0c593bb2ef94ae60e775617c9423038">More...</a><br /></td></tr>
+<tr class="separator:gae0c593bb2ef94ae60e775617c9423038"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga13ed70f15cd1485cd15f96bcc4b7ad1c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#ga13ed70f15cd1485cd15f96bcc4b7ad1c">kvStore_UpdateString</a> (uint64_t *rev, <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, const char *key, const char *data, uint64_t last)</td></tr>
+<tr class="memdesc:ga13ed70f15cd1485cd15f96bcc4b7ad1c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates the value (as a string) for the key into the store if and only if the latest revision matches.  <a href="group__kv_group.html#ga13ed70f15cd1485cd15f96bcc4b7ad1c">More...</a><br /></td></tr>
+<tr class="separator:ga13ed70f15cd1485cd15f96bcc4b7ad1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga68101d46739ca894fd7c56c8661c08d8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#ga68101d46739ca894fd7c56c8661c08d8">kvStore_Delete</a> (<a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, const char *key)</td></tr>
+<tr class="memdesc:ga68101d46739ca894fd7c56c8661c08d8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deletes a key by placing a delete marker and leaving all revisions.  <a href="group__kv_group.html#ga68101d46739ca894fd7c56c8661c08d8">More...</a><br /></td></tr>
+<tr class="separator:ga68101d46739ca894fd7c56c8661c08d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga3d5fa3d895d0d3041440105b244e9ca9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#ga3d5fa3d895d0d3041440105b244e9ca9">kvStore_Purge</a> (<a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, const char *key, <a class="el" href="structkv_purge_options.html">kvPurgeOptions</a> *opts)</td></tr>
+<tr class="memdesc:ga3d5fa3d895d0d3041440105b244e9ca9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deletes a key by placing a purge marker and removing all revisions.  <a href="group__kv_group.html#ga3d5fa3d895d0d3041440105b244e9ca9">More...</a><br /></td></tr>
+<tr class="separator:ga3d5fa3d895d0d3041440105b244e9ca9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga762fd5de8cde683e46a6736a51e575f5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#ga762fd5de8cde683e46a6736a51e575f5">kvWatchOptions_Init</a> (<a class="el" href="structkv_watch_options.html">kvWatchOptions</a> *opts)</td></tr>
+<tr class="memdesc:ga762fd5de8cde683e46a6736a51e575f5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a KeyValue watcher options structure.  <a href="group__kv_group.html#ga762fd5de8cde683e46a6736a51e575f5">More...</a><br /></td></tr>
+<tr class="separator:ga762fd5de8cde683e46a6736a51e575f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga243113fd7df34ce104850ab888f04021"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#ga243113fd7df34ce104850ab888f04021">kvPurgeOptions_Init</a> (<a class="el" href="structkv_purge_options.html">kvPurgeOptions</a> *opts)</td></tr>
+<tr class="memdesc:ga243113fd7df34ce104850ab888f04021"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a KeyValue purge options structure.  <a href="group__kv_group.html#ga243113fd7df34ce104850ab888f04021">More...</a><br /></td></tr>
+<tr class="separator:ga243113fd7df34ce104850ab888f04021"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga34ab74b229ff88e64301ea53a274da69"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#ga34ab74b229ff88e64301ea53a274da69">kvStore_PurgeDeletes</a> (<a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, <a class="el" href="structkv_purge_options.html">kvPurgeOptions</a> *opts)</td></tr>
+<tr class="memdesc:ga34ab74b229ff88e64301ea53a274da69"><td class="mdescLeft">&#160;</td><td class="mdescRight">Purge and removes delete markers.  <a href="group__kv_group.html#ga34ab74b229ff88e64301ea53a274da69">More...</a><br /></td></tr>
+<tr class="separator:ga34ab74b229ff88e64301ea53a274da69"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga30feca870f580c7b9d2ad07a740505b2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#ga30feca870f580c7b9d2ad07a740505b2">kvStore_Watch</a> (<a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> **new_watcher, <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, const char *keys, <a class="el" href="structkv_watch_options.html">kvWatchOptions</a> *opts)</td></tr>
+<tr class="memdesc:ga30feca870f580c7b9d2ad07a740505b2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a watcher for any updates to keys that match the <code>keys</code> argument.  <a href="group__kv_group.html#ga30feca870f580c7b9d2ad07a740505b2">More...</a><br /></td></tr>
+<tr class="separator:ga30feca870f580c7b9d2ad07a740505b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaf011f1dd6813391c65664e982747602e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#gaf011f1dd6813391c65664e982747602e">kvStore_WatchAll</a> (<a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> **new_watcher, <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, <a class="el" href="structkv_watch_options.html">kvWatchOptions</a> *opts)</td></tr>
+<tr class="memdesc:gaf011f1dd6813391c65664e982747602e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a watcher for any updates to any keys of the KeyValue store bucket.  <a href="group__kv_group.html#gaf011f1dd6813391c65664e982747602e">More...</a><br /></td></tr>
+<tr class="separator:gaf011f1dd6813391c65664e982747602e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga6030fc2a672ae868f7603587245b9d5a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#ga6030fc2a672ae868f7603587245b9d5a">kvStore_Keys</a> (<a class="el" href="structkv_keys_list.html">kvKeysList</a> *list, <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, <a class="el" href="structkv_watch_options.html">kvWatchOptions</a> *opts)</td></tr>
+<tr class="memdesc:ga6030fc2a672ae868f7603587245b9d5a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns all keys in the bucket.  <a href="group__kv_group.html#ga6030fc2a672ae868f7603587245b9d5a">More...</a><br /></td></tr>
+<tr class="separator:ga6030fc2a672ae868f7603587245b9d5a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga02ccd58bc5062f6ce6f94bf05e3dfe45"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#ga02ccd58bc5062f6ce6f94bf05e3dfe45">kvKeysList_Destroy</a> (<a class="el" href="structkv_keys_list.html">kvKeysList</a> *list)</td></tr>
+<tr class="memdesc:ga02ccd58bc5062f6ce6f94bf05e3dfe45"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys this list of KeyValue store key strings.  <a href="group__kv_group.html#ga02ccd58bc5062f6ce6f94bf05e3dfe45">More...</a><br /></td></tr>
+<tr class="separator:ga02ccd58bc5062f6ce6f94bf05e3dfe45"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga5aa57345313cee85b020e50c22023fb5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#ga5aa57345313cee85b020e50c22023fb5">kvStore_History</a> (<a class="el" href="structkv_entry_list.html">kvEntryList</a> *list, <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, const char *key, <a class="el" href="structkv_watch_options.html">kvWatchOptions</a> *opts)</td></tr>
+<tr class="memdesc:ga5aa57345313cee85b020e50c22023fb5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns all historical entries for the key.  <a href="group__kv_group.html#ga5aa57345313cee85b020e50c22023fb5">More...</a><br /></td></tr>
+<tr class="separator:ga5aa57345313cee85b020e50c22023fb5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gae783352ab81e22aa3173057d117518e6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#gae783352ab81e22aa3173057d117518e6">kvEntryList_Destroy</a> (<a class="el" href="structkv_entry_list.html">kvEntryList</a> *list)</td></tr>
+<tr class="memdesc:gae783352ab81e22aa3173057d117518e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys this list of KeyValue store entries.  <a href="group__kv_group.html#gae783352ab81e22aa3173057d117518e6">More...</a><br /></td></tr>
+<tr class="separator:gae783352ab81e22aa3173057d117518e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gad28fdf9aae16bba308cda799fca13281"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#gad28fdf9aae16bba308cda799fca13281">kvStore_Bucket</a> (<a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv)</td></tr>
+<tr class="memdesc:gad28fdf9aae16bba308cda799fca13281"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the bucket name of this KeyValue store object.  <a href="group__kv_group.html#gad28fdf9aae16bba308cda799fca13281">More...</a><br /></td></tr>
+<tr class="separator:gad28fdf9aae16bba308cda799fca13281"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gadf75e99cc28bc9c2d6eac7c9f7398c27"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_group.html#gadf75e99cc28bc9c2d6eac7c9f7398c27">kvStore_Status</a> (<a class="el" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a> **new_status, <a class="el" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv)</td></tr>
+<tr class="memdesc:gadf75e99cc28bc9c2d6eac7c9f7398c27"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the status and configuration of a bucket.  <a href="group__kv_group.html#gadf75e99cc28bc9c2d6eac7c9f7398c27">More...</a><br /></td></tr>
+<tr class="separator:gadf75e99cc28bc9c2d6eac7c9f7398c27"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga562c216a0199c30455af4c2da46000e5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_watcher.html#ga562c216a0199c30455af4c2da46000e5">kvWatcher_Next</a> (<a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> **new_entry, <a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> *w, int64_t timeout)</td></tr>
+<tr class="memdesc:ga562c216a0199c30455af4c2da46000e5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the next entry for this watcher.  <a href="group__kv_watcher.html#ga562c216a0199c30455af4c2da46000e5">More...</a><br /></td></tr>
+<tr class="separator:ga562c216a0199c30455af4c2da46000e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga73adf44114fedd62ef75ebd81839b65e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_watcher.html#ga73adf44114fedd62ef75ebd81839b65e">kvWatcher_Stop</a> (<a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> *w)</td></tr>
+<tr class="memdesc:ga73adf44114fedd62ef75ebd81839b65e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stops the watcher.  <a href="group__kv_watcher.html#ga73adf44114fedd62ef75ebd81839b65e">More...</a><br /></td></tr>
+<tr class="separator:ga73adf44114fedd62ef75ebd81839b65e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga21bc39fa795f7c4f392bd6d4e66ea1d9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_watcher.html#ga21bc39fa795f7c4f392bd6d4e66ea1d9">kvWatcher_Destroy</a> (<a class="el" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> *w)</td></tr>
+<tr class="memdesc:ga21bc39fa795f7c4f392bd6d4e66ea1d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the KeyValue watcher object.  <a href="group__kv_watcher.html#ga21bc39fa795f7c4f392bd6d4e66ea1d9">More...</a><br /></td></tr>
+<tr class="separator:ga21bc39fa795f7c4f392bd6d4e66ea1d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga1acec36db32207f21e15afc26bb5af1c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_status.html#ga1acec36db32207f21e15afc26bb5af1c">kvStatus_Bucket</a> (<a class="el" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a> *sts)</td></tr>
+<tr class="memdesc:ga1acec36db32207f21e15afc26bb5af1c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the bucket name.  <a href="group__kv_status.html#ga1acec36db32207f21e15afc26bb5af1c">More...</a><br /></td></tr>
+<tr class="separator:ga1acec36db32207f21e15afc26bb5af1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga2016af3c73841d8b226361e764dce158"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_status.html#ga2016af3c73841d8b226361e764dce158">kvStatus_Values</a> (<a class="el" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a> *sts)</td></tr>
+<tr class="memdesc:ga2016af3c73841d8b226361e764dce158"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns how many messages are in the bucket, including historical values.  <a href="group__kv_status.html#ga2016af3c73841d8b226361e764dce158">More...</a><br /></td></tr>
+<tr class="separator:ga2016af3c73841d8b226361e764dce158"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gada6f22b5659b184762cea4f45d369ee5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_status.html#gada6f22b5659b184762cea4f45d369ee5">kvStatus_History</a> (<a class="el" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a> *sts)</td></tr>
+<tr class="memdesc:gada6f22b5659b184762cea4f45d369ee5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the configured history kept per key.  <a href="group__kv_status.html#gada6f22b5659b184762cea4f45d369ee5">More...</a><br /></td></tr>
+<tr class="separator:gada6f22b5659b184762cea4f45d369ee5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:gaa747ad0a6182ec7a47fb47018c33d1c1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_status.html#gaa747ad0a6182ec7a47fb47018c33d1c1">kvStatus_TTL</a> (<a class="el" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a> *sts)</td></tr>
+<tr class="memdesc:gaa747ad0a6182ec7a47fb47018c33d1c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns how long the bucket keeps values for.  <a href="group__kv_status.html#gaa747ad0a6182ec7a47fb47018c33d1c1">More...</a><br /></td></tr>
+<tr class="separator:gaa747ad0a6182ec7a47fb47018c33d1c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga86b114f4dac9f06df86101f84bd497b2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_status.html#ga86b114f4dac9f06df86101f84bd497b2">kvStatus_Replicas</a> (<a class="el" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a> *sts)</td></tr>
+<tr class="memdesc:ga86b114f4dac9f06df86101f84bd497b2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of replicas to keep for a bucket.  <a href="group__kv_status.html#ga86b114f4dac9f06df86101f84bd497b2">More...</a><br /></td></tr>
+<tr class="separator:ga86b114f4dac9f06df86101f84bd497b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ga5eb3d824c1873af705beee4798246a08"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kv_status.html#ga5eb3d824c1873af705beee4798246a08">kvStatus_Destroy</a> (<a class="el" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a> *sts)</td></tr>
+<tr class="memdesc:ga5eb3d824c1873af705beee4798246a08"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the KeyValue status object.  <a href="group__kv_status.html#ga5eb3d824c1873af705beee4798246a08">More...</a><br /></td></tr>
+<tr class="separator:ga5eb3d824c1873af705beee4798246a08"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<h2 class="groupheader">Macro Definition Documentation</h2>
+<a id="a3bc1b3fe7f64083e60c7c3b93f205bad" name="a3bc1b3fe7f64083e60c7c3b93f205bad"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a3bc1b3fe7f64083e60c7c3b93f205bad">&#9670;&#160;</a></span>NATS_EXTERN</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">#define NATS_EXTERN</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Based on the platform this is compiled on, it will resolve to the appropriate instruction so that objects are properly exported when building the shared library. </p>
+
+</div>
+</div>
+<a id="a911c54900b46b968205871cd9f68d36c" name="a911c54900b46b968205871cd9f68d36c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a911c54900b46b968205871cd9f68d36c">&#9670;&#160;</a></span>NATS_DEFAULT_URL</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">#define NATS_DEFAULT_URL&#160;&#160;&#160;&quot;nats://localhost:4222&quot;</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This is the default URL a <code>NATS Server</code>, running with default listen port, can be reached at. </p>
+
+</div>
+</div>
+<a id="a5ce9005964bd9cf0604a9ef1afa87ea4" name="a5ce9005964bd9cf0604a9ef1afa87ea4"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a5ce9005964bd9cf0604a9ef1afa87ea4">&#9670;&#160;</a></span>JSMsgSize</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">#define JSMsgSize&#160;&#160;&#160;&quot;Nats-Msg-Size&quot;</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >When creating a JetStream consumer, if the <code>HeadersOnly</code> boolean is specified, the subscription will receive messages with headers only (no message payload), and a header of this name containing the size of the message payload that was omitted.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a> </dd></dl>
+
+</div>
+</div>
+<a id="a3938efee417dc67ff2bcf62f913f9054" name="a3938efee417dc67ff2bcf62f913f9054"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a3938efee417dc67ff2bcf62f913f9054">&#9670;&#160;</a></span>JSMsgRollup</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">#define JSMsgRollup&#160;&#160;&#160;&quot;Nats-Rollup&quot;</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >If message is sent to a stream's subject with this header set, and the stream is configured with <code>AllowRollup</code> option, then the server will insert this message and delete all previous messages in the stream.</p>
+<p >If the header is set to <a class="el" href="nats_8h.html#ad22dce8f66bae9b3e1027790d9c95c09" title="Message header value causing rollup per subject.">JSMsgRollupSubject</a>, then only messages on the specific subject this message is sent to are deleted.</p>
+<p >If the header is set to <a class="el" href="nats_8h.html#acc62d11b7e67fe3feb74acdfa4a6e8ac" title="Message header value causing rollup for all subjects.">JSMsgRollupAll</a>, then all messages on all subjects are deleted. </p>
+
+</div>
+</div>
+<a id="ad22dce8f66bae9b3e1027790d9c95c09" name="ad22dce8f66bae9b3e1027790d9c95c09"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ad22dce8f66bae9b3e1027790d9c95c09">&#9670;&#160;</a></span>JSMsgRollupSubject</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">#define JSMsgRollupSubject&#160;&#160;&#160;&quot;sub&quot;</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This is a possible value for the <a class="el" href="nats_8h.html#a3938efee417dc67ff2bcf62f913f9054" title="Message header for JetStream message for rollup.">JSMsgRollup</a> header indicating that only messages for the subject the rollup message is sent will be removed.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="nats_8h.html#a3938efee417dc67ff2bcf62f913f9054" title="Message header for JetStream message for rollup.">JSMsgRollup</a> </dd></dl>
+
+</div>
+</div>
+<a id="acc62d11b7e67fe3feb74acdfa4a6e8ac" name="acc62d11b7e67fe3feb74acdfa4a6e8ac"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#acc62d11b7e67fe3feb74acdfa4a6e8ac">&#9670;&#160;</a></span>JSMsgRollupAll</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">#define JSMsgRollupAll&#160;&#160;&#160;&quot;all&quot;</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This is a possible value for the <a class="el" href="nats_8h.html#a3938efee417dc67ff2bcf62f913f9054" title="Message header for JetStream message for rollup.">JSMsgRollup</a> header indicating that all messages for all subjects will be removed.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="nats_8h.html#a3938efee417dc67ff2bcf62f913f9054" title="Message header for JetStream message for rollup.">JSMsgRollup</a> </dd></dl>
+
+</div>
+</div>
+<a id="aa2f2c14de864839a2ff7ea34415d37e0" name="aa2f2c14de864839a2ff7ea34415d37e0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aa2f2c14de864839a2ff7ea34415d37e0">&#9670;&#160;</a></span>JSStream</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">#define JSStream&#160;&#160;&#160;&quot;Nats-Stream&quot;</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a1c0a11996b44abc16a4f444ee4c1cb94" name="a1c0a11996b44abc16a4f444ee4c1cb94"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a1c0a11996b44abc16a4f444ee4c1cb94">&#9670;&#160;</a></span>JSSequence</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">#define JSSequence&#160;&#160;&#160;&quot;Nats-Sequence&quot;</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ae18fb15ea8130a650e904e5153eb30d5" name="ae18fb15ea8130a650e904e5153eb30d5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ae18fb15ea8130a650e904e5153eb30d5">&#9670;&#160;</a></span>JSLastSequence</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">#define JSLastSequence&#160;&#160;&#160;&quot;Nats-Last-Sequence&quot;</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a5525cb01f8b0aec73cb13f3276449e0e" name="a5525cb01f8b0aec73cb13f3276449e0e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a5525cb01f8b0aec73cb13f3276449e0e">&#9670;&#160;</a></span>JSTimeStamp</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">#define JSTimeStamp&#160;&#160;&#160;&quot;Nats-Time-Stamp&quot;</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a3776aa9985557f0c6e382b01d2e3f602" name="a3776aa9985557f0c6e382b01d2e3f602"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a3776aa9985557f0c6e382b01d2e3f602">&#9670;&#160;</a></span>JSSubject</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">#define JSSubject&#160;&#160;&#160;&quot;Nats-Subject&quot;</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<h2 class="groupheader">Typedef Documentation</h2>
+<a id="af798865ac824e5959987de0fe8d07383" name="af798865ac824e5959987de0fe8d07383"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#af798865ac824e5959987de0fe8d07383">&#9670;&#160;</a></span>natsSock</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">typedef int <a class="el" href="nats_8h.html#af798865ac824e5959987de0fe8d07383">natsSock</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="nats_8h.html">nats.h</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/nats_8h.js b/doc/html/nats_8h.js
new file mode 100644 (file)
index 0000000..e011497
--- /dev/null
@@ -0,0 +1,429 @@
+var nats_8h =
+[
+    [ "jsOptions::jsOptionsPublishAsync", "structjs_options_1_1js_options_publish_async.html", "structjs_options_1_1js_options_publish_async" ],
+    [ "jsOptions::jsOptionsStream", "structjs_options_1_1js_options_stream.html", "structjs_options_1_1js_options_stream" ],
+    [ "jsOptions::jsOptionsStream::jsOptionsStreamPurge", "structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html", "structjs_options_1_1js_options_stream_1_1js_options_stream_purge" ],
+    [ "jsOptions::jsOptionsStream::jsOptionsStreamInfo", "structjs_options_1_1js_options_stream_1_1js_options_stream_info.html", "structjs_options_1_1js_options_stream_1_1js_options_stream_info" ],
+    [ "NATS_EXTERN", "nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad", null ],
+    [ "NATS_DEFAULT_URL", "nats_8h.html#a911c54900b46b968205871cd9f68d36c", null ],
+    [ "JSMsgSize", "nats_8h.html#a5ce9005964bd9cf0604a9ef1afa87ea4", null ],
+    [ "JSMsgRollup", "nats_8h.html#a3938efee417dc67ff2bcf62f913f9054", null ],
+    [ "JSMsgRollupSubject", "nats_8h.html#ad22dce8f66bae9b3e1027790d9c95c09", null ],
+    [ "JSMsgRollupAll", "nats_8h.html#acc62d11b7e67fe3feb74acdfa4a6e8ac", null ],
+    [ "JSStream", "nats_8h.html#aa2f2c14de864839a2ff7ea34415d37e0", null ],
+    [ "JSSequence", "nats_8h.html#a1c0a11996b44abc16a4f444ee4c1cb94", null ],
+    [ "JSLastSequence", "nats_8h.html#ae18fb15ea8130a650e904e5153eb30d5", null ],
+    [ "JSTimeStamp", "nats_8h.html#a5525cb01f8b0aec73cb13f3276449e0e", null ],
+    [ "JSSubject", "nats_8h.html#a3776aa9985557f0c6e382b01d2e3f602", null ],
+    [ "natsSock", "nats_8h.html#af798865ac824e5959987de0fe8d07383", null ],
+    [ "natsConnection", "group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec", null ],
+    [ "natsStatistics", "group__types_group.html#ga57a4b8c7109e2773878655722ce028aa", null ],
+    [ "natsSubscription", "group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8", null ],
+    [ "natsMsg", "group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a", null ],
+    [ "natsOptions", "group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e", null ],
+    [ "natsInbox", "group__types_group.html#ga206c3d4d6f4f6f96fd2cae53a3df31c1", null ],
+    [ "natsMsgList", "group__types_group.html#gafd5523161ec3783e79719cb9a9a66b5b", null ],
+    [ "jsCtx", "group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1", null ],
+    [ "jsPubOptions", "group__types_group.html#ga7bbea3575d35dcdbfc9b766b04269eb7", null ],
+    [ "jsPlacement", "group__types_group.html#ga49d1138fac9da8b85d00a367081e91c9", null ],
+    [ "jsExternalStream", "group__types_group.html#gaef6601477f6456bebc229f7f38982a6c", null ],
+    [ "jsStreamSource", "group__types_group.html#gab4c43c87d81917aab748a50eee028449", null ],
+    [ "jsRePublish", "group__types_group.html#gab991313d33ce270a882e4d0756c138f6", null ],
+    [ "jsStreamConfig", "group__types_group.html#ga26fd6a73df327ca3c271e46ddefc8acf", null ],
+    [ "jsLostStreamData", "group__types_group.html#gaf80828510450faf84bbf456e94f5b784", null ],
+    [ "jsStreamStateSubject", "group__types_group.html#ga55dce2fa9ecd215716cc9ceece7dfefa", null ],
+    [ "jsStreamStateSubjects", "group__types_group.html#gae8b57d9c40364f97a705f3e61a1156b0", null ],
+    [ "jsStreamState", "group__types_group.html#ga2bfd6de6ffc84d767482b3dd57cb9271", null ],
+    [ "jsPeerInfo", "group__types_group.html#ga1e938dab794089f9329d7b7ece8f3e9b", null ],
+    [ "jsClusterInfo", "group__types_group.html#gaaf92318ce94a1ae3547c9a7af5a3f4f6", null ],
+    [ "jsStreamSourceInfo", "group__types_group.html#gab2f33f57188a550f2f747d4f27bc24bd", null ],
+    [ "jsStreamInfo", "group__types_group.html#ga2629c9454996edf7914be36a9e44921b", null ],
+    [ "jsStreamInfoList", "group__types_group.html#ga1e54c2a1bc94834d1670875fc151f565", null ],
+    [ "jsStreamNamesList", "group__types_group.html#gaf4d31a4dc83b2805422beafb1f8fa000", null ],
+    [ "jsConsumerConfig", "group__types_group.html#ga0483b2197c0ddd9082b48c2dd3fe7cee", null ],
+    [ "jsConsumerSequenceMismatch", "group__types_group.html#gace471cd2cef1df797b2a1c6b485049bd", null ],
+    [ "jsSubOptions", "group__types_group.html#gaccfaac2079656ffd40d003e4de5d2280", null ],
+    [ "jsSequencePair", "group__types_group.html#ga39011d30b295759b7f6ca0a7539dff8f", null ],
+    [ "jsSequenceInfo", "group__types_group.html#ga27e1a5d5b513f9eb7d61a17db71f8003", null ],
+    [ "jsConsumerInfo", "group__types_group.html#ga2f21bb79884e56a5613d7fe76b11b1e5", null ],
+    [ "jsConsumerInfoList", "group__types_group.html#gadad3bf72baae970662248d82d9b05d0a", null ],
+    [ "jsConsumerNamesList", "group__types_group.html#gad00ab4381eec504ada3272aa9ff8adb2", null ],
+    [ "jsAPIStats", "group__types_group.html#gad057a0107367ce5727975f3daf63ff75", null ],
+    [ "jsAccountLimits", "group__types_group.html#gaa889f706cce285adb9cea8aba0b76866", null ],
+    [ "jsTier", "group__types_group.html#ga1d48d3eb36b50c9ab6d8477dccf247d8", null ],
+    [ "jsAccountInfo", "group__types_group.html#ga57cdc53b29a4fedb5a4140b6e64a4fab", null ],
+    [ "jsMsgMetaData", "group__types_group.html#gace9595b1a5ce3f7a13670367fd293b4a", null ],
+    [ "jsPubAck", "group__types_group.html#gaf1d5e436c5d41c5b9b96d84e3d2bc86f", null ],
+    [ "jsPubAckErr", "group__types_group.html#gadb7c287bc86b92765fbe45a066b96f40", null ],
+    [ "jsDirectGetMsgOptions", "group__types_group.html#ga85123afa00d522a249a5b2a8abd7e063", null ],
+    [ "jsFetchRequest", "group__types_group.html#gaf11e6664c1f335a5287af71c703935fa", null ],
+    [ "jsOptions", "group__types_group.html#ga0e3a3b7cf89e7dfa955f0f8f3f1eb6e5", null ],
+    [ "kvStore", "group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a", null ],
+    [ "kvEntry", "group__types_group.html#gad489fb4074f27427560ca71797db6191", null ],
+    [ "kvStatus", "group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80", null ],
+    [ "kvWatcher", "group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043", null ],
+    [ "kvConfig", "group__types_group.html#ga6d594b091b4bb46192336413066a8edf", null ],
+    [ "kvWatchOptions", "group__types_group.html#gac32f992fe797a1f7befc7dc3452640b6", null ],
+    [ "kvPurgeOptions", "group__types_group.html#ga90e8de23c4468005488bde690a2ffe9d", null ],
+    [ "kvEntryList", "group__types_group.html#ga0125d394a3cbae2a1713eed8fab7f78e", null ],
+    [ "kvKeysList", "group__types_group.html#gab36492d9d4370337cfed80edce4144e0", null ],
+    [ "stanConnection", "group__types_group.html#ga9e826493769d23086cfccefe95cdf64c", null ],
+    [ "stanSubscription", "group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5", null ],
+    [ "stanMsg", "group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d", null ],
+    [ "stanConnOptions", "group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1", null ],
+    [ "stanSubOptions", "group__types_group.html#ga023712711f5c289663fc2223e83686d3", null ],
+    [ "natsMsgHandler", "group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe", null ],
+    [ "natsConnectionHandler", "group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c", null ],
+    [ "natsErrHandler", "group__callbacks_group.html#ga9e511dffa471dfb971b7dd2b12329626", null ],
+    [ "natsEvLoop_Attach", "group__callbacks_group.html#ga245eab0a01a485e40fba267f84ec037f", null ],
+    [ "natsEvLoop_ReadAddRemove", "group__callbacks_group.html#gaea4c125ecfb43eaf43da20e8444c2aaa", null ],
+    [ "natsEvLoop_WriteAddRemove", "group__callbacks_group.html#ga2bb5dd2d821ca5bbc0488f7e6aceed17", null ],
+    [ "natsEvLoop_Detach", "group__callbacks_group.html#gab63dee7f7012ba11ae20b76dbc36f2d0", null ],
+    [ "natsUserJWTHandler", "group__callbacks_group.html#ga258b30458134be90f17315c037f34b7b", null ],
+    [ "natsSignatureHandler", "group__callbacks_group.html#gab786ffd670c86de0563559351305080b", null ],
+    [ "natsTokenHandler", "group__callbacks_group.html#ga4b02de70fe9380d184fd01d87527f499", null ],
+    [ "natsOnCompleteCB", "group__callbacks_group.html#ga245131e64f1d0dff7edc8ed874a07e9a", null ],
+    [ "natsCustomReconnectDelayHandler", "group__callbacks_group.html#ga3353d4b92851c52121f65aaf0684cba4", null ],
+    [ "jsPubAckErrHandler", "group__callbacks_group.html#ga954768cc1d3388bb6ab723e777647992", null ],
+    [ "jsPubAckHandler", "group__callbacks_group.html#ga4f66e065bd918f02510d4c53d8a5b729", null ],
+    [ "stanPubAckHandler", "group__callbacks_group.html#gad5d6a685731b3bf635995b7375af4d18", null ],
+    [ "stanMsgHandler", "group__callbacks_group.html#gaf7456e37fa14f1834d9048d3789e9409", null ],
+    [ "stanConnectionLostHandler", "group__callbacks_group.html#gac34092f6c698374f86ad349302bdd55c", null ],
+    [ "jsRetentionPolicy", "group__types_group.html#ga410f8fb053efa02b2ca1de0c02fa4b6d", [
+      [ "js_LimitsPolicy", "group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6da6a2aa02f32acec6526d81f6e974e690f", null ],
+      [ "js_InterestPolicy", "group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6dae874de4a787cfbec4c6d0eb1a3f05ebd", null ],
+      [ "js_WorkQueuePolicy", "group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6daf7e6581e69572691b01d1294a3c3a478", null ]
+    ] ],
+    [ "jsDiscardPolicy", "group__types_group.html#ga7f88b7d482488398074f9d1419a9b8c2", [
+      [ "js_DiscardOld", "group__types_group.html#gga7f88b7d482488398074f9d1419a9b8c2abb31b828421634f1e6a1ef9359bc91f6", null ],
+      [ "js_DiscardNew", "group__types_group.html#gga7f88b7d482488398074f9d1419a9b8c2a99d7f2d740af26c340c0a4e2b72fb6ab", null ]
+    ] ],
+    [ "jsStorageType", "group__types_group.html#ga1802a53c79e667f093bba033b16adc98", [
+      [ "js_FileStorage", "group__types_group.html#gga1802a53c79e667f093bba033b16adc98a1d9dad1854cf374b22e3688b98284dec", null ],
+      [ "js_MemoryStorage", "group__types_group.html#gga1802a53c79e667f093bba033b16adc98a428ed10448726ad01c1db77a7f748314", null ]
+    ] ],
+    [ "jsDeliverPolicy", "group__types_group.html#ga117ed2c35f89ef3144540ed9cbadc818", [
+      [ "js_DeliverAll", "group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818ac692ba1363103768ac4bb58695549758", null ],
+      [ "js_DeliverLast", "group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818abbd81d6c4e0f17f30e2186f1335e991d", null ],
+      [ "js_DeliverNew", "group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a82b8d36e17391212398984f92db9c381", null ],
+      [ "js_DeliverByStartSequence", "group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a06299d9c8262a16306ba6cc16d293c5e", null ],
+      [ "js_DeliverByStartTime", "group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a33317133d42f21bf5919827a691543f6", null ],
+      [ "js_DeliverLastPerSubject", "group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818abb50ebcd2fbafe27038c966121b9407b", null ]
+    ] ],
+    [ "jsAckPolicy", "group__types_group.html#ga8fcb50e6e7312834791f9e237d28e873", [
+      [ "js_AckExplicit", "group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873a02d46a6395933c55c95ee5194bb6b80e", null ],
+      [ "js_AckNone", "group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873afd91fe31cf57c68863ca3090b07c296c", null ],
+      [ "js_AckAll", "group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873a1232af28bf4e4b82e962174f1432ed4a", null ]
+    ] ],
+    [ "jsReplayPolicy", "group__types_group.html#ga8650faf52b0b6b23df376eebeb9d0354", [
+      [ "js_ReplayInstant", "group__types_group.html#gga8650faf52b0b6b23df376eebeb9d0354a2c4a1e2b75f31dd69a89b541d75afa44", null ],
+      [ "js_ReplayOriginal", "group__types_group.html#gga8650faf52b0b6b23df376eebeb9d0354a6ee3851dac5c90a61492193dd55931f5", null ]
+    ] ],
+    [ "kvOperation", "group__types_group.html#ga89db3bd6bf11af3ac5eb3ab560d16332", [
+      [ "kvOp_Unknown", "group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332a0b7a6bef67e4220f5f0c4075f2ed16b6", null ],
+      [ "kvOp_Put", "group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332acc0e1da3c292cb7eb19d909c9dfd788a", null ],
+      [ "kvOp_Delete", "group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332a4efb91331f3307128c75af5b23362f83", null ],
+      [ "kvOp_Purge", "group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332aee19ab8144bf518e251ea2004309b657", null ]
+    ] ],
+    [ "nats_Open", "group__library_group.html#ga4a26d4caecb23348f6eee862c95fee7d", null ],
+    [ "nats_GetVersion", "group__library_group.html#ga0d8c3df1c0c4a3d340d8ff81355fb1e8", null ],
+    [ "nats_GetVersionNumber", "group__library_group.html#ga5fbbaa19b0290b654d2669a05bd512e8", null ],
+    [ "nats_CheckCompatibility", "group__library_group.html#ga8c2ad4df801bd9d11564587ed3a7081e", null ],
+    [ "nats_Now", "group__library_group.html#gaa3c10ba3ae001595007ad0dc5dccc15e", null ],
+    [ "nats_NowInNanoSeconds", "group__library_group.html#gacf5e423920d6a647df3bbf7de39d5223", null ],
+    [ "nats_Sleep", "group__library_group.html#gad5040264cd4b1404956babf3c03a4f09", null ],
+    [ "nats_GetLastError", "group__library_group.html#gadecfd49a58b581dbba40da77b195fd85", null ],
+    [ "nats_GetLastErrorStack", "group__library_group.html#gaca24172e1b97ca01cee29ca437f5702e", null ],
+    [ "nats_PrintLastErrorStack", "group__library_group.html#ga5fab3b18c4fe3630254483575f6066f4", null ],
+    [ "nats_SetMessageDeliveryPoolSize", "group__library_group.html#gab21e94ce7a7d226611ea2c05914cf19d", null ],
+    [ "nats_ReleaseThreadMemory", "group__library_group.html#gafe171baefa00a85b77205116e9f3e48a", null ],
+    [ "nats_Sign", "group__library_group.html#gaf781f246e2e0ab24623ca667c48dc3ba", null ],
+    [ "nats_Close", "group__library_group.html#gae75131e0ce4e5b89d0f82ea7892f112e", null ],
+    [ "nats_CloseAndWait", "group__library_group.html#gaf75bb5b38bf32e6a8f43e54068625903", null ],
+    [ "natsStatus_GetText", "group__status_group.html#ga4a83c4a08f1e4dd9451c1a88b6a4254e", null ],
+    [ "natsStatistics_Create", "group__stats_group.html#gafa923df029168f4991b77ffdd9e24877", null ],
+    [ "natsStatistics_GetCounts", "group__stats_group.html#gad85f5ffb4272713f6cc6d988e6d4e75f", null ],
+    [ "natsStatistics_Destroy", "group__stats_group.html#ga26a04e77af8fc160adf7c33088dcf59c", null ],
+    [ "natsOptions_Create", "group__opts_group.html#ga61d4a0cf2fbf7d13cc910e5a00c575be", null ],
+    [ "natsOptions_SetURL", "group__opts_group.html#ga3f7e760214417c7d87541ecb9ab5bea5", null ],
+    [ "natsOptions_SetServers", "group__opts_group.html#gacb7e964ae54b74d972d72e118b7b8bdf", null ],
+    [ "natsOptions_SetUserInfo", "group__opts_group.html#ga5b99da7dd74aac3be962f323c3863d9e", null ],
+    [ "natsOptions_SetToken", "group__opts_group.html#gad58a5b9dabadeebda30e952ff7b39193", null ],
+    [ "natsOptions_SetTokenHandler", "group__opts_group.html#ga23a3b1f022112e98ddccb18b247b4426", null ],
+    [ "natsOptions_SetNoRandomize", "group__opts_group.html#gaabf8763b931dcf389c83fd95d760a413", null ],
+    [ "natsOptions_SetTimeout", "group__opts_group.html#ga17cd7fe41176cd98aca1184fa9352ad9", null ],
+    [ "natsOptions_SetName", "group__opts_group.html#ga1c529d347be0fe2eec17c7f4698e283e", null ],
+    [ "natsOptions_SetSecure", "group__opts_group.html#gaa1f09416d443fa7a6af6b695da563eba", null ],
+    [ "natsOptions_LoadCATrustedCertificates", "group__opts_group.html#ga2cd6563694a439b3949a31fd81103099", null ],
+    [ "natsOptions_SetCATrustedCertificates", "group__opts_group.html#gafb30794fc2ae74b9e0bd8fb609b901c8", null ],
+    [ "natsOptions_LoadCertificatesChain", "group__opts_group.html#ga36943e2ba53d05407cdabc4e7e96484b", null ],
+    [ "natsOptions_SetCertificatesChain", "group__opts_group.html#gae98f0f9034e93941767ab1ae6eec2c0c", null ],
+    [ "natsOptions_SetCiphers", "group__opts_group.html#ga5698f020e8eb3e7440eb073fe08ef62c", null ],
+    [ "natsOptions_SetCipherSuites", "group__opts_group.html#ga2b7f144b011d8ce62941b608a8f324f0", null ],
+    [ "natsOptions_SetExpectedHostname", "group__opts_group.html#ga0ba43ba9930df385e4781b12be9f2851", null ],
+    [ "natsOptions_SkipServerVerification", "group__opts_group.html#ga6f804ec44adc299989fe623570679da3", null ],
+    [ "natsOptions_SetVerbose", "group__opts_group.html#gaa16bfd09ef318af18c27a0e199681b69", null ],
+    [ "natsOptions_SetPedantic", "group__opts_group.html#ga26f166af20de98bec67bc6cc916f769e", null ],
+    [ "natsOptions_SetPingInterval", "group__opts_group.html#gae68fb615835364c0809555e8dc93f57e", null ],
+    [ "natsOptions_SetMaxPingsOut", "group__opts_group.html#gaaff89c3f41627f4b2929dbc9b82d265b", null ],
+    [ "natsOptions_SetIOBufSize", "group__opts_group.html#ga1a3e3abfd7ddd8aff247df8f332bbda3", null ],
+    [ "natsOptions_SetAllowReconnect", "group__opts_group.html#ga3d1d3cb2f2a0e23d27dd60e96d1cc91b", null ],
+    [ "natsOptions_SetMaxReconnect", "group__opts_group.html#gab54cd2719c0b64eebd6c7b83dd2908a0", null ],
+    [ "natsOptions_SetReconnectWait", "group__opts_group.html#ga2730f4e16e318a2ef8de98dbf6ede807", null ],
+    [ "natsOptions_SetReconnectJitter", "group__opts_group.html#ga8f3df57ed8ae418d3ae6678ae5e2a5d2", null ],
+    [ "natsOptions_SetCustomReconnectDelay", "group__opts_group.html#ga3593165aa113d6736e0226ddc56b3e9d", null ],
+    [ "natsOptions_SetReconnectBufSize", "group__opts_group.html#gaa0d4b7ece8477cb9879f0dafff3456a5", null ],
+    [ "natsOptions_SetMaxPendingMsgs", "group__opts_group.html#ga95510436eee06f9992ded96a44795c40", null ],
+    [ "natsOptions_SetErrorHandler", "group__opts_group.html#ga127ec7a8196b453947a7fa9a64096cbd", null ],
+    [ "natsOptions_SetClosedCB", "group__opts_group.html#ga44410242e73134e5bb51ef27904a9253", null ],
+    [ "natsOptions_SetDisconnectedCB", "group__opts_group.html#gadc8dc0cedd91bda71d544f3dedc4a039", null ],
+    [ "natsOptions_SetReconnectedCB", "group__opts_group.html#ga26a48c8529fffa5f5d1a61c030979980", null ],
+    [ "natsOptions_SetDiscoveredServersCB", "group__opts_group.html#gab5baab507c974402ab0d8c5e8227ee65", null ],
+    [ "natsOptions_SetIgnoreDiscoveredServers", "group__opts_group.html#ga7e4172084520708b8c9f28e73174461c", null ],
+    [ "natsOptions_SetLameDuckModeCB", "group__opts_group.html#ga54dea2ffeb33779771652a7a14fc4adc", null ],
+    [ "natsOptions_SetEventLoop", "group__opts_group.html#gab09491bad908dedcb323c780280733ff", null ],
+    [ "natsOptions_UseGlobalMessageDelivery", "group__opts_group.html#gabf060c92648b50c069f0abe7cbb06f1c", null ],
+    [ "natsOptions_IPResolutionOrder", "group__opts_group.html#ga7ca713c7532eff4d41a492e95b8822cf", null ],
+    [ "natsOptions_SetSendAsap", "group__opts_group.html#ga8f06568cc3319a5a0eef9f80282034ca", null ],
+    [ "natsOptions_UseOldRequestStyle", "group__opts_group.html#ga70aa85319933d78c0076cc862fa3e5a6", null ],
+    [ "natsOptions_SetFailRequestsOnDisconnect", "group__opts_group.html#gadef4376a5e608cbc8c1a9e2b6335dc79", null ],
+    [ "natsOptions_SetNoEcho", "group__opts_group.html#ga4f694b87039cedaa65cd25656b14d1a3", null ],
+    [ "natsOptions_SetRetryOnFailedConnect", "group__opts_group.html#ga20946800d024b7089e73d63454d1c19f", null ],
+    [ "natsOptions_SetUserCredentialsCallbacks", "group__opts_group.html#ga60117450fc1f7b6f81bab455aeed7515", null ],
+    [ "natsOptions_SetUserCredentialsFromFiles", "group__opts_group.html#ga59b47f7b7a19085cf8eaada9bfe5606e", null ],
+    [ "natsOptions_SetNKey", "group__opts_group.html#ga0290eac4665569c850468d9f00e246a0", null ],
+    [ "natsOptions_SetNKeyFromSeed", "group__opts_group.html#ga696f02e0493c00d3c1eafff45b62b68e", null ],
+    [ "natsOptions_SetWriteDeadline", "group__opts_group.html#gaafda5fb8d9ee3a17bd475ceaecfac218", null ],
+    [ "natsOptions_DisableNoResponders", "group__opts_group.html#ga192465163abb87ad48a843b45cdf9984", null ],
+    [ "natsOptions_SetCustomInboxPrefix", "group__opts_group.html#gac5173473a731a4a36d15346fedddf91f", null ],
+    [ "natsOptions_Destroy", "group__opts_group.html#ga93d8068cd6fff53b7f8e1c403db45eb9", null ],
+    [ "stanConnOptions_Create", "group__stan_conn_opts_group.html#gaff52a1ce90253b4bdbb0005fca4f71b6", null ],
+    [ "stanConnOptions_SetURL", "group__stan_conn_opts_group.html#ga3c6d511fc1e1febcdf5344960de5a0b3", null ],
+    [ "stanConnOptions_SetNATSOptions", "group__stan_conn_opts_group.html#gae3fc9a4daa7f85367811a313857337b4", null ],
+    [ "stanConnOptions_SetConnectionWait", "group__stan_conn_opts_group.html#ga66c72c482696d9ceca71fced7cbb1264", null ],
+    [ "stanConnOptions_SetPubAckWait", "group__stan_conn_opts_group.html#ga36f2ee441562dcf619d6e020b823fc96", null ],
+    [ "stanConnOptions_SetDiscoveryPrefix", "group__stan_conn_opts_group.html#ga07105d1d00878bba19f47243b2c88402", null ],
+    [ "stanConnOptions_SetMaxPubAcksInflight", "group__stan_conn_opts_group.html#ga29eee1be7eff749aeac3bab60d1b0405", null ],
+    [ "stanConnOptions_SetPings", "group__stan_conn_opts_group.html#gad835223f08fbeae2a3c7a34d3fa1550b", null ],
+    [ "stanConnOptions_SetConnectionLostHandler", "group__stan_conn_opts_group.html#ga19ba15c8001aa835b261eea3a309e6d3", null ],
+    [ "stanConnOptions_Destroy", "group__stan_conn_opts_group.html#ga83fd0a29b136cbfb643be642eb2fa726", null ],
+    [ "stanSubOptions_Create", "group__stan_sub_opts_group.html#gad87a2cef4f4ddf64696f9864773c37cf", null ],
+    [ "stanSubOptions_SetDurableName", "group__stan_sub_opts_group.html#gaa018bceba99ef3726157e87c6918ab14", null ],
+    [ "stanSubOptions_SetAckWait", "group__stan_sub_opts_group.html#gafbb4e6c74978c4e8f30f016c20cc2bdf", null ],
+    [ "stanSubOptions_SetMaxInflight", "group__stan_sub_opts_group.html#ga35efbdea888e00440c500845064931c0", null ],
+    [ "stanSubOptions_StartAtSequence", "group__stan_sub_opts_group.html#ga6cb7f6e1ac697d16959f9042eeb84dc1", null ],
+    [ "stanSubOptions_StartAtTime", "group__stan_sub_opts_group.html#gaafd7a553486eea3c9d309da0744a3608", null ],
+    [ "stanSubOptions_StartAtTimeDelta", "group__stan_sub_opts_group.html#ga27d9175901997b8468997019746599b5", null ],
+    [ "stanSubOptions_StartWithLastReceived", "group__stan_sub_opts_group.html#ga856a74e31f3307faf988747c1f88717c", null ],
+    [ "stanSubOptions_DeliverAllAvailable", "group__stan_sub_opts_group.html#gab09b81358e93199a4631eb06f1ec179f", null ],
+    [ "stanSubOptions_SetManualAckMode", "group__stan_sub_opts_group.html#ga6f49ae2629e49d2bfa35990cf030bf83", null ],
+    [ "stanSubOptions_Destroy", "group__stan_sub_opts_group.html#ga1b56877d0a6729e148c9c288e2b88e3f", null ],
+    [ "natsInbox_Create", "group__inbox_group.html#gaa1ec779a0b7ead54b78da05533848b6d", null ],
+    [ "natsInbox_Destroy", "group__inbox_group.html#gabd6444fb8f28afb9c2b6645945f46cfe", null ],
+    [ "natsMsgList_Destroy", "group__msg_group.html#ga1a091d24f939d881bf04fba78b8995c2", null ],
+    [ "natsMsg_Create", "group__msg_group.html#ga098e4fec1c5a71c00a0d092fbd6d1a21", null ],
+    [ "natsMsg_GetSubject", "group__msg_group.html#gad7cad38946648e3047aa0665a3dd230a", null ],
+    [ "natsMsg_GetReply", "group__msg_group.html#ga880535362c91b3e405792aa66ff945b6", null ],
+    [ "natsMsg_GetData", "group__msg_group.html#ga523364451fd92534e754054266196e59", null ],
+    [ "natsMsg_GetDataLength", "group__msg_group.html#ga25b69066ae50287e178aaf4f70f7d3de", null ],
+    [ "natsMsgHeader_Set", "group__msg_group.html#gaf30b47d4217c9335919f05536e379af8", null ],
+    [ "natsMsgHeader_Add", "group__msg_group.html#ga2b641ec3b1745604d7de1102e472254b", null ],
+    [ "natsMsgHeader_Get", "group__msg_group.html#gab3349f0b0ce721b340d5c0753c90ee18", null ],
+    [ "natsMsgHeader_Values", "group__msg_group.html#gae1ce9c9d82d151a3ea9dc03da048f66f", null ],
+    [ "natsMsgHeader_Keys", "group__msg_group.html#ga6ee8a007111ada293dd24ff0bab02491", null ],
+    [ "natsMsgHeader_Delete", "group__msg_group.html#gac78ca02dc93d05cae837ced6386408f1", null ],
+    [ "natsMsg_IsNoResponders", "group__msg_group.html#ga43aa4a8e4b93725b4876ee2677e19c7b", null ],
+    [ "natsMsg_Destroy", "group__msg_group.html#ga9e9590018284939f43f60964283f33ae", null ],
+    [ "stanMsg_GetSequence", "group__stan_msg_group.html#ga98b66ff73447e1d7e329edbfcde782b5", null ],
+    [ "stanMsg_GetTimestamp", "group__stan_msg_group.html#ga2fa524b11e9621cf46ca9b1a3ca66452", null ],
+    [ "stanMsg_IsRedelivered", "group__stan_msg_group.html#ga8e537d014b89d9d7da7906b2ee75d5c0", null ],
+    [ "stanMsg_GetData", "group__stan_msg_group.html#ga2f27fbfb79a46c52e079f670c59e1260", null ],
+    [ "stanMsg_GetDataLength", "group__stan_msg_group.html#ga7d1e394a686bc25ab7376b7f28b9e777", null ],
+    [ "stanMsg_Destroy", "group__stan_msg_group.html#gacd0059fb499963f5b2eae18053e5f74f", null ],
+    [ "natsConnection_Connect", "group__conn_mgt_group.html#ga740be1ba16a8570eb98ef6755ebf52ce", null ],
+    [ "natsConnection_ProcessReadEvent", "group__conn_mgt_group.html#gaa89c06e30e19ff361125bfc9114d89a8", null ],
+    [ "natsConnection_ProcessWriteEvent", "group__conn_mgt_group.html#gad81b603b84c0180aefc6d5ebad7f2a47", null ],
+    [ "natsConnection_ConnectTo", "group__conn_mgt_group.html#gafb83c8d7970ba68be0e6c40c38cdfde4", null ],
+    [ "natsConnection_IsClosed", "group__conn_mgt_group.html#ga530f0f1c75c58a81aae1a59f15b46d9f", null ],
+    [ "natsConnection_IsReconnecting", "group__conn_mgt_group.html#ga5aa349fc3895dde772671b324b07a688", null ],
+    [ "natsConnection_IsDraining", "group__conn_mgt_group.html#ga15a0f8aa9a6f621535d01593a4c8edd5", null ],
+    [ "natsConnection_Status", "group__conn_mgt_group.html#ga33fa209522e5e0226b5b7c7d720a3b98", null ],
+    [ "natsConnection_Buffered", "group__conn_mgt_group.html#ga0433159e518540ff874c4026fe9cd0c5", null ],
+    [ "natsConnection_Flush", "group__conn_mgt_group.html#ga1c98f8d89bb8e20ea8621e860a90267f", null ],
+    [ "natsConnection_FlushTimeout", "group__conn_mgt_group.html#ga85915ef0c8b87993be1b076099d6a7c1", null ],
+    [ "natsConnection_GetMaxPayload", "group__conn_mgt_group.html#ga68e7149f7ff1cc4989b3f795fa7e76d9", null ],
+    [ "natsConnection_GetStats", "group__conn_mgt_group.html#ga68821a8ae1176096b5afef7fdc7947ec", null ],
+    [ "natsConnection_GetConnectedUrl", "group__conn_mgt_group.html#gaf623280407c43ade02285005f0642e6d", null ],
+    [ "natsConnection_GetConnectedServerId", "group__conn_mgt_group.html#ga48cee9ea1cdc9fc2770de2f9f0fd1ccf", null ],
+    [ "natsConnection_GetServers", "group__conn_mgt_group.html#gaf4ee7262e35e44c40ad5dfe9240db76b", null ],
+    [ "natsConnection_GetDiscoveredServers", "group__conn_mgt_group.html#gad25c77be0873495412c90a73fe450708", null ],
+    [ "natsConnection_GetLastError", "group__conn_mgt_group.html#gab6cfa9cb6857ae10f096a94f5e244e63", null ],
+    [ "natsConnection_GetClientID", "group__conn_mgt_group.html#ga747513ba6ab63fdf9a72bfc8025a14ba", null ],
+    [ "natsConnection_Drain", "group__conn_mgt_group.html#ga59bdc4ad9fea2053f5d3841f6b83f88b", null ],
+    [ "natsConnection_DrainTimeout", "group__conn_mgt_group.html#gae06fe6f5933f216d6d93645a122a7dd4", null ],
+    [ "natsConnection_Sign", "group__conn_mgt_group.html#ga6960cfdbaac3b8759784f352d4c264f8", null ],
+    [ "natsConnection_GetClientIP", "group__conn_mgt_group.html#gadafcfeeeac2733c7119981ab97b7103d", null ],
+    [ "natsConnection_GetRTT", "group__conn_mgt_group.html#gaa3fd27e6e7d8131e679d4f10e201c435", null ],
+    [ "natsConnection_HasHeaderSupport", "group__conn_mgt_group.html#gad765b80ae8e1a06a7a942cccf29f042a", null ],
+    [ "natsConnection_GetLocalIPAndPort", "group__conn_mgt_group.html#ga761095a42374b4dafa178df7d7652dd5", null ],
+    [ "natsConnection_Close", "group__conn_mgt_group.html#ga19e204d27a232e2d4334301fc002b2ed", null ],
+    [ "natsConnection_Destroy", "group__conn_mgt_group.html#gafda2f702276fb0ac301efac10df09495", null ],
+    [ "natsConnection_Publish", "group__conn_pub_group.html#gac0b9f7759ecc39b8d77807b94254f9b4", null ],
+    [ "natsConnection_PublishString", "group__conn_pub_group.html#gad09a717c20de4cf0e2a21dcfd9ce6c64", null ],
+    [ "natsConnection_PublishMsg", "group__conn_pub_group.html#ga74511acd87385931112c45c48c2a14ba", null ],
+    [ "natsConnection_PublishRequest", "group__conn_pub_group.html#gaaaa3d75ffec2dcdc6bf905cdb1eee59e", null ],
+    [ "natsConnection_PublishRequestString", "group__conn_pub_group.html#gaafca9a8294e81a5a9979e762931e56c5", null ],
+    [ "natsConnection_Request", "group__conn_pub_group.html#gaf4b4a022f9c21fc269b87c000330c5a7", null ],
+    [ "natsConnection_RequestString", "group__conn_pub_group.html#ga4bb5105df6a3efd2088e6be0fdf6b31f", null ],
+    [ "natsConnection_RequestMsg", "group__conn_pub_group.html#ga052de4b75b3b69ccd8d20eb4861b801d", null ],
+    [ "natsConnection_Subscribe", "group__conn_sub_group.html#gaefab965b5645798d47f9244f2b3fe3fb", null ],
+    [ "natsConnection_SubscribeTimeout", "group__conn_sub_group.html#gacb2c83b58b7909715424cbc327fdd404", null ],
+    [ "natsConnection_SubscribeSync", "group__conn_sub_group.html#ga17574d5165f7e285462e3d3b2709edf4", null ],
+    [ "natsConnection_QueueSubscribe", "group__conn_sub_group.html#ga3c9fee2775130786ef62f1cbeb191a48", null ],
+    [ "natsConnection_QueueSubscribeTimeout", "group__conn_sub_group.html#ga96fa115fd5b2ef7658884da80714b91c", null ],
+    [ "natsConnection_QueueSubscribeSync", "group__conn_sub_group.html#ga68630ea7c4bbdc7f8cd62058b41fb476", null ],
+    [ "natsSubscription_NoDeliveryDelay", "group__sub_group.html#ga38f1e41fc7619101fc4aa52014dd5428", null ],
+    [ "natsSubscription_NextMsg", "group__sub_group.html#ga6538a5d78dfb0f16514b94c8e74c11af", null ],
+    [ "natsSubscription_Unsubscribe", "group__sub_group.html#gaee87f8be0e6c2a4693ba2cea070583ba", null ],
+    [ "natsSubscription_AutoUnsubscribe", "group__sub_group.html#ga09f285de2746a6e27fc66efd60bd3116", null ],
+    [ "natsSubscription_QueuedMsgs", "group__sub_group.html#ga8a37b2d5290da3aecc05483d79e7e254", null ],
+    [ "natsSubscription_GetID", "group__sub_group.html#ga5a029a784c0a7f8b5800b48cc995db20", null ],
+    [ "natsSubscription_GetSubject", "group__sub_group.html#gadd4872b9fc5678a73f9ab04ce8428432", null ],
+    [ "natsSubscription_SetPendingLimits", "group__sub_group.html#ga68a7cea89e75c529a7dd3bb77303dda4", null ],
+    [ "natsSubscription_GetPendingLimits", "group__sub_group.html#ga786bb458981274fe717f266bd3b96d96", null ],
+    [ "natsSubscription_GetPending", "group__sub_group.html#gaca6262e2ef842caa701a9f233db72707", null ],
+    [ "natsSubscription_GetDelivered", "group__sub_group.html#ga476b7276d0b7f9946834d2bb2423e955", null ],
+    [ "natsSubscription_GetDropped", "group__sub_group.html#ga24f1636869e26661ce62c9c9f4d80823", null ],
+    [ "natsSubscription_GetMaxPending", "group__sub_group.html#ga0abc5d9afbc6b0c9c5adaf533904c968", null ],
+    [ "natsSubscription_ClearMaxPending", "group__sub_group.html#gafe31911d8372db401d33856465421710", null ],
+    [ "natsSubscription_GetStats", "group__sub_group.html#ga12b60cdb3aca7329edebc480ae86bfab", null ],
+    [ "natsSubscription_IsValid", "group__sub_group.html#ga5e6454bbc7a90b9694112d45bd8de903", null ],
+    [ "natsSubscription_Drain", "group__sub_group.html#ga26c9736289d326fb7d6df7e2a0df72ab", null ],
+    [ "natsSubscription_DrainTimeout", "group__sub_group.html#ga9c26a3f9584e7804060a48ec1b7e2a68", null ],
+    [ "natsSubscription_WaitForDrainCompletion", "group__sub_group.html#ga0408c9b6e4ad4078ac0267656ace222d", null ],
+    [ "natsSubscription_DrainCompletionStatus", "group__sub_group.html#ga9834bd02f67a25ac084d5ad71e146019", null ],
+    [ "natsSubscription_SetOnCompleteCB", "group__sub_group.html#gaea632f845d473e7461b134c0e7bf4077", null ],
+    [ "natsSubscription_Destroy", "group__sub_group.html#ga50a95dd96e9b714201679a015d62832f", null ],
+    [ "stanConnection_Connect", "group__stan_conn_mgt_group.html#ga35e0e6e5e3b7f3818a3ac3600efb8f8f", null ],
+    [ "stanConnection_GetNATSConnection", "group__stan_conn_mgt_group.html#ga166ec494a55c9b1f9ebafd2294e05ff6", null ],
+    [ "stanConnection_ReleaseNATSConnection", "group__stan_conn_mgt_group.html#ga2e56a93825e1214a5ab688860e2a8ce6", null ],
+    [ "stanConnection_Close", "group__stan_conn_mgt_group.html#ga4952a7f65a53fdb5ca1c26b1a1656f1d", null ],
+    [ "stanConnection_Destroy", "group__stan_conn_mgt_group.html#gaea095eec18fdf04e06de16711f8b1a04", null ],
+    [ "stanConnection_Publish", "group__stan_conn_pub_group.html#ga24f3f7f709b15fe53e1edaeead08fc7d", null ],
+    [ "stanConnection_PublishAsync", "group__stan_conn_pub_group.html#ga0c4d1e4615f8ac834f0a4021f75d39f0", null ],
+    [ "stanConnection_Subscribe", "group__stan_conn_sub_group.html#gae545358fdc493baf6d29429a8156781f", null ],
+    [ "stanConnection_QueueSubscribe", "group__stan_conn_sub_group.html#ga17d42bf9a4fa39470561a1a668e6b4a2", null ],
+    [ "stanSubscription_SetOnCompleteCB", "group__stan_sub_group.html#ga7b039908ec45cfc2c16ec61ba8daca9d", null ],
+    [ "stanSubscription_AckMsg", "group__stan_sub_group.html#ga3a1cca9fa3ea54fcf7a43fd1335a26d3", null ],
+    [ "stanSubscription_Unsubscribe", "group__stan_sub_group.html#gafa428a7e0f6800216cb06fd738bd235e", null ],
+    [ "stanSubscription_Close", "group__stan_sub_group.html#gacfa3a7b4fa333c84acfa7521fbbb5bcc", null ],
+    [ "stanSubscription_Destroy", "group__stan_sub_group.html#ga3f6ce924f6a1830a55e30e9910aad4ba", null ],
+    [ "jsOptions_Init", "group__js_group.html#ga855ff9a04888d696785cc5ede96112e4", null ],
+    [ "natsConnection_JetStream", "group__js_group.html#ga8ed08b0fe1074b1e490291f0af2cb03f", null ],
+    [ "jsCtx_Destroy", "group__js_group.html#gacfa6ce3e60ea540e3331a09a7f3dc856", null ],
+    [ "jsStreamConfig_Init", "group__js_assets_group.html#gac230f71dbdc4d10bc7471d01763881d6", null ],
+    [ "jsPlacement_Init", "group__js_assets_group.html#ga223691e6831072a0b8f8103a778293b0", null ],
+    [ "jsStreamSource_Init", "group__js_assets_group.html#ga7fe8e0bf98a38eb59372e7cd78aaaf56", null ],
+    [ "jsExternalStream_Init", "group__js_assets_group.html#ga81aebebcd79922104720da51e95020d4", null ],
+    [ "jsRePublish_Init", "group__js_assets_group.html#ga388bfeaa5a78ebf6ce7c15c6e3a7156b", null ],
+    [ "js_AddStream", "group__js_assets_group.html#ga5efc5136d33ba52161e6732f88f1ee75", null ],
+    [ "js_UpdateStream", "group__js_assets_group.html#ga75a5c44304e24481c67e17fbccc15c31", null ],
+    [ "js_PurgeStream", "group__js_assets_group.html#ga5a6a886c18a79caa403908bf7f7ef125", null ],
+    [ "js_DeleteStream", "group__js_assets_group.html#ga397e55a0b3b6d36c9bf746eee3842172", null ],
+    [ "js_GetMsg", "group__js_assets_group.html#ga9fe289ae172f83e53ca1b1b747744c1f", null ],
+    [ "js_GetLastMsg", "group__js_assets_group.html#ga6835b53da27d5721eddb3698e582cf0c", null ],
+    [ "jsDirectGetMsgOptions_Init", "group__js_assets_group.html#ga8d835d47aed9c84ce3b8dcfea469f4cb", null ],
+    [ "js_DirectGetMsg", "group__js_assets_group.html#ga62c250cecc650b1eed0fa1691893e2ae", null ],
+    [ "js_DeleteMsg", "group__js_assets_group.html#gaeba5d45abbe811c0e40830c5f26c78fd", null ],
+    [ "js_EraseMsg", "group__js_assets_group.html#ga7158f73e183462e9a15e9802e1746ff0", null ],
+    [ "js_GetStreamInfo", "group__js_assets_group.html#ga94cb23a35516b7779de28fcbb263180a", null ],
+    [ "jsStreamInfo_Destroy", "group__js_assets_group.html#ga8ee87ef86e94be42685941abe9638bbd", null ],
+    [ "js_Streams", "group__js_assets_group.html#ga531d91de372f0dffb8d64abecf88b0c0", null ],
+    [ "jsStreamInfoList_Destroy", "group__js_assets_group.html#ga38cdcc339eb8976d23296b99aa37d629", null ],
+    [ "js_StreamNames", "group__js_assets_group.html#gac3dfc87863dbbb3c959ecde4bce905bc", null ],
+    [ "jsStreamNamesList_Destroy", "group__js_assets_group.html#gaf8644f281d4e24893a6a170b4f7faa65", null ],
+    [ "jsConsumerConfig_Init", "group__js_assets_group.html#ga3381bb05c05bf4a8979adde68d37dd66", null ],
+    [ "js_AddConsumer", "group__js_assets_group.html#gaf2efb63db150e782d9007090b49d4115", null ],
+    [ "js_UpdateConsumer", "group__js_assets_group.html#gad13ec256e24710bb237995814871e554", null ],
+    [ "js_GetConsumerInfo", "group__js_assets_group.html#ga2dda04757b4ab27a794b64f8d727fe23", null ],
+    [ "js_DeleteConsumer", "group__js_assets_group.html#ga52fbc61759b11494db91f348a733c490", null ],
+    [ "jsConsumerInfo_Destroy", "group__js_assets_group.html#ga9c1d5ed2f24ba836c10e415231f80088", null ],
+    [ "js_Consumers", "group__js_assets_group.html#gaf28097ede3e9ba9926fb00856e63ffd9", null ],
+    [ "jsConsumerInfoList_Destroy", "group__js_assets_group.html#ga421de40d8e91658353111c3f2ea90ec8", null ],
+    [ "js_ConsumerNames", "group__js_assets_group.html#ga690d19af55d12b82c8523d1861cef8d0", null ],
+    [ "jsConsumerNamesList_Destroy", "group__js_assets_group.html#ga2ced0d190131460bf4608ab893dffc50", null ],
+    [ "js_GetAccountInfo", "group__js_assets_group.html#gac8965dcfc6b465fbc323aa552c606c46", null ],
+    [ "jsAccountInfo_Destroy", "group__js_assets_group.html#ga7c8664b38fcce8497746367d35e5f60b", null ],
+    [ "jsPubOptions_Init", "group__js_pub_group.html#gaf09f333a8675a8060c5ede07a6bdeef9", null ],
+    [ "js_Publish", "group__js_pub_group.html#gac6ba005531c82d9f0efa88dd6b458477", null ],
+    [ "js_PublishMsg", "group__js_pub_group.html#ga2aceeb82fac3621aea843dd246732bdd", null ],
+    [ "jsPubAck_Destroy", "group__js_pub_group.html#gaac130840b6db9109e72cf6ad9186dfc4", null ],
+    [ "js_PublishAsync", "group__js_pub_group.html#ga069dfd6f0f3d96f1ff8bf2372e59900c", null ],
+    [ "js_PublishMsgAsync", "group__js_pub_group.html#gab7e4139a48c5ee4d2155cbb43142e873", null ],
+    [ "js_PublishAsyncComplete", "group__js_pub_group.html#ga24813ee9a58f00c0f21d10ab9c93b81d", null ],
+    [ "js_PublishAsyncGetPendingList", "group__js_pub_group.html#ga2ac95a3450f77f8074fae3f2fbe7e54c", null ],
+    [ "jsSubOptions_Init", "group__js_sub_group.html#ga472adb949d1af9d8f07bda99f5d7f3f8", null ],
+    [ "js_Subscribe", "group__js_sub_group.html#gaa686c6efd84ef963de1925108e896515", null ],
+    [ "js_SubscribeSync", "group__js_sub_group.html#gabacb010031e535f9fb6e2167337e8adf", null ],
+    [ "js_PullSubscribe", "group__js_sub_group.html#gaaeaddb73857aa4eb4901eec945ed27cd", null ],
+    [ "natsSubscription_Fetch", "group__js_sub_group.html#gafc5e0d2269bd23b4d5fb7f3b05278e50", null ],
+    [ "jsFetchRequest_Init", "group__js_sub_group.html#ga1c3a62de8cd4855ae61ea4f67417a43b", null ],
+    [ "natsSubscription_FetchRequest", "group__js_sub_group.html#ga676292505e7fde8688cfd886b79a10ed", null ],
+    [ "natsSubscription_GetConsumerInfo", "group__js_sub_group.html#gaae716a1431db065744c079b71a9f4c2e", null ],
+    [ "natsSubscription_GetSequenceMismatch", "group__js_sub_group.html#ga0daed9f0d2d00cb14314ecc180a6fa84", null ],
+    [ "natsMsg_GetMetaData", "group__js_msg.html#gacf48e59038fab35849e9dc6f8fcf6328", null ],
+    [ "jsMsgMetaData_Destroy", "group__js_msg.html#gaf9bf92294342bcb27053de7038606d12", null ],
+    [ "natsMsg_Ack", "group__js_msg.html#gae454fb7e7097a3cd3362cb49ef8a3c84", null ],
+    [ "natsMsg_AckSync", "group__js_msg.html#gafb899ebf8e89b3a858fe20f7853635a7", null ],
+    [ "natsMsg_Nak", "group__js_msg.html#gac271b874154301da9759f9ac05768b47", null ],
+    [ "natsMsg_NakWithDelay", "group__js_msg.html#gac0697389fa60a3c4725e53cd23ada7bd", null ],
+    [ "natsMsg_InProgress", "group__js_msg.html#gae1e0beb19cd76e2f69e6415c41c9bb39", null ],
+    [ "natsMsg_Term", "group__js_msg.html#gae84d21e4388255e9d990e53c9f67e7c4", null ],
+    [ "natsMsg_GetSequence", "group__js_msg.html#ga819be2990ec20b964aa574b5331d7f2e", null ],
+    [ "natsMsg_GetTime", "group__js_msg.html#gab4850497c5481f5ec6eb1fcdb43646f5", null ],
+    [ "kvConfig_Init", "group__kv_group_mgt.html#ga16d4c27d8ac62bb86ba601bc40f53172", null ],
+    [ "js_CreateKeyValue", "group__kv_group_mgt.html#gabc445bfe87112e56a6c73872fec6893e", null ],
+    [ "js_KeyValue", "group__kv_group_mgt.html#ga54e6c109a7c633e431b3eded286e00f6", null ],
+    [ "js_DeleteKeyValue", "group__kv_group_mgt.html#ga6bc715319560bc28359679fcdcead937", null ],
+    [ "kvStore_Destroy", "group__kv_group_mgt.html#gab0d6bdbfabd27af67eaeb36cec0787da", null ],
+    [ "kvEntry_Bucket", "group__kv_entry.html#gadedbb410cce499afb535eb6641c32ca7", null ],
+    [ "kvEntry_Key", "group__kv_entry.html#gab455f32b0abfb1361dab4b5e7d98042a", null ],
+    [ "kvEntry_Value", "group__kv_entry.html#ga28077f81d71a30cbce2dc81e5c9574fc", null ],
+    [ "kvEntry_ValueLen", "group__kv_entry.html#gaf7ccc866865903f231e0431754ed2415", null ],
+    [ "kvEntry_ValueString", "group__kv_entry.html#ga7ff6220915726600545357e31226fb65", null ],
+    [ "kvEntry_Revision", "group__kv_entry.html#ga2d58abf81cb577e21a76f9c77568409f", null ],
+    [ "kvEntry_Created", "group__kv_entry.html#ga31ef3a2e3a7df6cf4dbb0a762737800a", null ],
+    [ "kvEntry_Delta", "group__kv_entry.html#ga233a2d75895cfd0140cf77757592cf47", null ],
+    [ "kvEntry_Operation", "group__kv_entry.html#ga088fd67d3d384ad7a7ddfc82535becea", null ],
+    [ "kvEntry_Destroy", "group__kv_entry.html#ga8359ffcdeefb9c5821e6442d0d5ee388", null ],
+    [ "kvStore_Get", "group__kv_group.html#ga2db86f80d6bfce1bdbedf1b9da22913c", null ],
+    [ "kvStore_GetRevision", "group__kv_group.html#ga9bf43431bb8264a3ea1f0df401afbe1a", null ],
+    [ "kvStore_Put", "group__kv_group.html#ga1fdf7a1d3acf96e475184790589a401e", null ],
+    [ "kvStore_PutString", "group__kv_group.html#ga84ebd66a95ce857765d4a16ec35daba9", null ],
+    [ "kvStore_Create", "group__kv_group.html#ga5289f7cd3999cfb46fb1fcb83178aec6", null ],
+    [ "kvStore_CreateString", "group__kv_group.html#ga5726ad2e6205d2f6749be013138218ca", null ],
+    [ "kvStore_Update", "group__kv_group.html#gae0c593bb2ef94ae60e775617c9423038", null ],
+    [ "kvStore_UpdateString", "group__kv_group.html#ga13ed70f15cd1485cd15f96bcc4b7ad1c", null ],
+    [ "kvStore_Delete", "group__kv_group.html#ga68101d46739ca894fd7c56c8661c08d8", null ],
+    [ "kvStore_Purge", "group__kv_group.html#ga3d5fa3d895d0d3041440105b244e9ca9", null ],
+    [ "kvWatchOptions_Init", "group__kv_group.html#ga762fd5de8cde683e46a6736a51e575f5", null ],
+    [ "kvPurgeOptions_Init", "group__kv_group.html#ga243113fd7df34ce104850ab888f04021", null ],
+    [ "kvStore_PurgeDeletes", "group__kv_group.html#ga34ab74b229ff88e64301ea53a274da69", null ],
+    [ "kvStore_Watch", "group__kv_group.html#ga30feca870f580c7b9d2ad07a740505b2", null ],
+    [ "kvStore_WatchAll", "group__kv_group.html#gaf011f1dd6813391c65664e982747602e", null ],
+    [ "kvStore_Keys", "group__kv_group.html#ga6030fc2a672ae868f7603587245b9d5a", null ],
+    [ "kvKeysList_Destroy", "group__kv_group.html#ga02ccd58bc5062f6ce6f94bf05e3dfe45", null ],
+    [ "kvStore_History", "group__kv_group.html#ga5aa57345313cee85b020e50c22023fb5", null ],
+    [ "kvEntryList_Destroy", "group__kv_group.html#gae783352ab81e22aa3173057d117518e6", null ],
+    [ "kvStore_Bucket", "group__kv_group.html#gad28fdf9aae16bba308cda799fca13281", null ],
+    [ "kvStore_Status", "group__kv_group.html#gadf75e99cc28bc9c2d6eac7c9f7398c27", null ],
+    [ "kvWatcher_Next", "group__kv_watcher.html#ga562c216a0199c30455af4c2da46000e5", null ],
+    [ "kvWatcher_Stop", "group__kv_watcher.html#ga73adf44114fedd62ef75ebd81839b65e", null ],
+    [ "kvWatcher_Destroy", "group__kv_watcher.html#ga21bc39fa795f7c4f392bd6d4e66ea1d9", null ],
+    [ "kvStatus_Bucket", "group__kv_status.html#ga1acec36db32207f21e15afc26bb5af1c", null ],
+    [ "kvStatus_Values", "group__kv_status.html#ga2016af3c73841d8b226361e764dce158", null ],
+    [ "kvStatus_History", "group__kv_status.html#gada6f22b5659b184762cea4f45d369ee5", null ],
+    [ "kvStatus_TTL", "group__kv_status.html#gaa747ad0a6182ec7a47fb47018c33d1c1", null ],
+    [ "kvStatus_Replicas", "group__kv_status.html#ga86b114f4dac9f06df86101f84bd497b2", null ],
+    [ "kvStatus_Destroy", "group__kv_status.html#ga5eb3d824c1873af705beee4798246a08", null ]
+];
\ No newline at end of file
diff --git a/doc/html/nats_8h_source.html b/doc/html/nats_8h_source.html
new file mode 100644 (file)
index 0000000..a5fc279
--- /dev/null
@@ -0,0 +1,2545 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: nats.h Source File</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('nats_8h_source.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">nats.h</div></div>
+</div><!--header-->
+<div class="contents">
+<a href="nats_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">// Copyright 2015-2022 The NATS Authors</span></div>
+<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment">// Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div>
+<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment">// you may not use this file except in compliance with the License.</span></div>
+<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="comment">// You may obtain a copy of the License at</span></div>
+<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="comment">//</span></div>
+<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span><span class="comment">// http://www.apache.org/licenses/LICENSE-2.0</span></div>
+<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="comment">//</span></div>
+<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="comment">// Unless required by applicable law or agreed to in writing, software</span></div>
+<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="comment">// distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
+<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
+<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="comment">// See the License for the specific language governing permissions and</span></div>
+<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="comment">// limitations under the License.</span></div>
+<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span> </div>
+<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span><span class="preprocessor">#ifndef NATS_H_</span></div>
+<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span><span class="preprocessor">#define NATS_H_</span></div>
+<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span> </div>
+<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span><span class="preprocessor">#ifdef __cplusplus</span></div>
+<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
+<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span><span class="preprocessor">#endif</span></div>
+<div class="line"><a id="l00020" name="l00020"></a><span class="lineno">   20</span> </div>
+<div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span><span class="preprocessor">#include &lt;stdlib.h&gt;</span></div>
+<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span><span class="preprocessor">#include &lt;stdint.h&gt;</span></div>
+<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span><span class="preprocessor">#include &lt;stdbool.h&gt;</span></div>
+<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span><span class="preprocessor">#include &lt;inttypes.h&gt;</span></div>
+<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span><span class="preprocessor">#include &lt;stdio.h&gt;</span></div>
+<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span> </div>
+<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span><span class="preprocessor">#include &quot;<a class="code" href="status_8h.html">status.h</a>&quot;</span></div>
+<div class="line"><a id="l00028" name="l00028"></a><span class="lineno">   28</span><span class="preprocessor">#include &quot;version.h&quot;</span></div>
+<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span> </div>
+<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span><span class="preprocessor">#if defined(_WIN32)</span></div>
+<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span><span class="preprocessor">  #include &lt;winsock2.h&gt;</span></div>
+<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span><span class="preprocessor">  #if defined(nats_EXPORTS)</span></div>
+<div class="line"><a id="l00040" name="l00040"></a><span class="lineno">   40</span><span class="preprocessor">    #define NATS_EXTERN __declspec(dllexport)</span></div>
+<div class="line"><a id="l00041" name="l00041"></a><span class="lineno">   41</span><span class="preprocessor">  #elif defined(nats_IMPORTS)</span></div>
+<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span><span class="preprocessor">    #define NATS_EXTERN __declspec(dllimport)</span></div>
+<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span><span class="preprocessor">  #else</span></div>
+<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span><span class="preprocessor">    #define NATS_EXTERN</span></div>
+<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span><span class="preprocessor">  #endif</span></div>
+<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span> </div>
+<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span>  <span class="keyword">typedef</span> SOCKET      <a class="code hl_typedef" href="nats_8h.html#af798865ac824e5959987de0fe8d07383">natsSock</a>;</div>
+<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span><span class="preprocessor">#else</span></div>
+<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"><a class="line" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">   49</a></span><span class="preprocessor">  #define NATS_EXTERN</span></div>
+<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"><a class="line" href="nats_8h.html#af798865ac824e5959987de0fe8d07383">   50</a></span>  <span class="keyword">typedef</span> <span class="keywordtype">int</span>         <a class="code hl_typedef" href="nats_8h.html#af798865ac824e5959987de0fe8d07383">natsSock</a>;</div>
+<div class="line"><a id="l00051" name="l00051"></a><span class="lineno">   51</span><span class="preprocessor">#endif</span></div>
+<div class="line"><a id="l00052" name="l00052"></a><span class="lineno">   52</span> </div>
+<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"><a class="line" href="nats_8h.html#a911c54900b46b968205871cd9f68d36c">   86</a></span><span class="preprocessor">#define NATS_DEFAULT_URL &quot;nats://localhost:4222&quot;</span></div>
+<div class="line"><a id="l00087" name="l00087"></a><span class="lineno">   87</span> </div>
+<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"><a class="line" href="nats_8h.html#a5ce9005964bd9cf0604a9ef1afa87ea4">   97</a></span><span class="preprocessor"> #define JSMsgSize    &quot;Nats-Msg-Size&quot;</span></div>
+<div class="line"><a id="l00098" name="l00098"></a><span class="lineno">   98</span> </div>
+<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"><a class="line" href="nats_8h.html#a3938efee417dc67ff2bcf62f913f9054">  111</a></span><span class="preprocessor"> #define JSMsgRollup            &quot;Nats-Rollup&quot;</span></div>
+<div class="line"><a id="l00112" name="l00112"></a><span class="lineno">  112</span> </div>
+<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"><a class="line" href="nats_8h.html#ad22dce8f66bae9b3e1027790d9c95c09">  120</a></span><span class="preprocessor"> #define JSMsgRollupSubject     &quot;sub&quot;</span></div>
+<div class="line"><a id="l00121" name="l00121"></a><span class="lineno">  121</span> </div>
+<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"><a class="line" href="nats_8h.html#acc62d11b7e67fe3feb74acdfa4a6e8ac">  129</a></span><span class="preprocessor"> #define JSMsgRollupAll         &quot;all&quot;</span></div>
+<div class="line"><a id="l00130" name="l00130"></a><span class="lineno">  130</span> </div>
+<div class="line"><a id="l00131" name="l00131"></a><span class="lineno">  131</span> <span class="comment">// Headers for republished messages and direct get.</span></div>
+<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"><a class="line" href="nats_8h.html#aa2f2c14de864839a2ff7ea34415d37e0">  132</a></span><span class="preprocessor"> #define JSStream       &quot;Nats-Stream&quot;</span></div>
+<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"><a class="line" href="nats_8h.html#a1c0a11996b44abc16a4f444ee4c1cb94">  133</a></span><span class="preprocessor"> #define JSSequence     &quot;Nats-Sequence&quot;</span></div>
+<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"><a class="line" href="nats_8h.html#ae18fb15ea8130a650e904e5153eb30d5">  134</a></span><span class="preprocessor"> #define JSLastSequence &quot;Nats-Last-Sequence&quot;</span></div>
+<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"><a class="line" href="nats_8h.html#a5525cb01f8b0aec73cb13f3276449e0e">  135</a></span><span class="preprocessor"> #define JSTimeStamp    &quot;Nats-Time-Stamp&quot;</span></div>
+<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"><a class="line" href="nats_8h.html#a3776aa9985557f0c6e382b01d2e3f602">  136</a></span><span class="preprocessor"> #define JSSubject      &quot;Nats-Subject&quot;</span></div>
+<div class="line"><a id="l00137" name="l00137"></a><span class="lineno">  137</span> </div>
+<div class="line"><a id="l00138" name="l00138"></a><span class="lineno">  138</span><span class="comment">//</span></div>
+<div class="line"><a id="l00139" name="l00139"></a><span class="lineno">  139</span><span class="comment">// Types.</span></div>
+<div class="line"><a id="l00140" name="l00140"></a><span class="lineno">  140</span><span class="comment">//</span></div>
+<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"><a class="line" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">  152</a></span><span class="comment"></span><span class="keyword">typedef</span> <span class="keyword">struct </span>__natsConnection     <a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a>;</div>
+<div class="line"><a id="l00153" name="l00153"></a><span class="lineno">  153</span> </div>
+<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"><a class="line" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa">  159</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span>__natsStatistics     <a class="code hl_typedef" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa">natsStatistics</a>;</div>
+<div class="line"><a id="l00160" name="l00160"></a><span class="lineno">  160</span> </div>
+<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"><a class="line" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">  165</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span>__natsSubscription   <a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a>;</div>
+<div class="line"><a id="l00166" name="l00166"></a><span class="lineno">  166</span> </div>
+<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"><a class="line" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">  172</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span>__natsMsg            <a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a>;</div>
+<div class="line"><a id="l00173" name="l00173"></a><span class="lineno">  173</span> </div>
+<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"><a class="line" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">  178</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span>__natsOptions        <a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a>;</div>
+<div class="line"><a id="l00179" name="l00179"></a><span class="lineno">  179</span> </div>
+<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"><a class="line" href="group__types_group.html#ga206c3d4d6f4f6f96fd2cae53a3df31c1">  187</a></span><span class="keyword">typedef</span> <span class="keywordtype">char</span>                        <a class="code hl_typedef" href="group__types_group.html#ga206c3d4d6f4f6f96fd2cae53a3df31c1">natsInbox</a>;</div>
+<div class="line"><a id="l00188" name="l00188"></a><span class="lineno">  188</span> </div>
+<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"><a class="line" href="structnats_msg_list.html">  212</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structnats_msg_list.html">natsMsgList</a></div>
+<div class="line"><a id="l00213" name="l00213"></a><span class="lineno">  213</span>{</div>
+<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"><a class="line" href="structnats_msg_list.html#aa123668879f1c9c11c9be7bd81a205c5">  214</a></span>        <a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a>         **<a class="code hl_variable" href="structnats_msg_list.html#aa123668879f1c9c11c9be7bd81a205c5">Msgs</a>;</div>
+<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"><a class="line" href="structnats_msg_list.html#a5c48bf6b9e7f1d889d7ad31694911750">  215</a></span>        <span class="keywordtype">int</span>             <a class="code hl_variable" href="structnats_msg_list.html#a5c48bf6b9e7f1d889d7ad31694911750">Count</a>;</div>
+<div class="line"><a id="l00216" name="l00216"></a><span class="lineno">  216</span> </div>
+<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"><a class="line" href="group__types_group.html#gafd5523161ec3783e79719cb9a9a66b5b">  217</a></span>} <a class="code hl_struct" href="structnats_msg_list.html">natsMsgList</a>;</div>
+<div class="line"><a id="l00218" name="l00218"></a><span class="lineno">  218</span> </div>
+<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"><a class="line" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">  227</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span>__jsCtx                  <a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a>;</div>
+<div class="line"><a id="l00228" name="l00228"></a><span class="lineno">  228</span> </div>
+<div class="line"><a id="l00244" name="l00244"></a><span class="lineno"><a class="line" href="structjs_pub_options.html">  244</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structjs_pub_options.html">jsPubOptions</a></div>
+<div class="line"><a id="l00245" name="l00245"></a><span class="lineno">  245</span>{</div>
+<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"><a class="line" href="structjs_pub_options.html#a1b242c9311b904a2e5337417b5c6d143">  246</a></span>        int64_t         <a class="code hl_variable" href="structjs_pub_options.html#a1b242c9311b904a2e5337417b5c6d143">MaxWait</a>;                </div>
+<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"><a class="line" href="structjs_pub_options.html#ac8708487360b784f7dd5d7a21e5617c0">  247</a></span>        <span class="keyword">const</span> <span class="keywordtype">char</span>      *<a class="code hl_variable" href="structjs_pub_options.html#ac8708487360b784f7dd5d7a21e5617c0">MsgId</a>;                 </div>
+<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"><a class="line" href="structjs_pub_options.html#ac7ac74d2557d772c3092288dacf3711f">  248</a></span>        <span class="keyword">const</span> <span class="keywordtype">char</span>      *<a class="code hl_variable" href="structjs_pub_options.html#ac7ac74d2557d772c3092288dacf3711f">ExpectStream</a>;          </div>
+<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"><a class="line" href="structjs_pub_options.html#a095391b33a261586fc02eaf013b65e61">  249</a></span>        <span class="keyword">const</span> <span class="keywordtype">char</span>      *<a class="code hl_variable" href="structjs_pub_options.html#a095391b33a261586fc02eaf013b65e61">ExpectLastMsgId</a>;       </div>
+<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"><a class="line" href="structjs_pub_options.html#a3b02b60b05caa6d242079a4c26b181bf">  250</a></span>        uint64_t        <a class="code hl_variable" href="structjs_pub_options.html#a3b02b60b05caa6d242079a4c26b181bf">ExpectLastSeq</a>;          </div>
+<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"><a class="line" href="structjs_pub_options.html#aeefec1d2c7644562d23b87e55bf2e253">  251</a></span>        uint64_t        <a class="code hl_variable" href="structjs_pub_options.html#aeefec1d2c7644562d23b87e55bf2e253">ExpectLastSubjectSeq</a>;   </div>
+<div class="line"><a id="l00252" name="l00252"></a><span class="lineno"><a class="line" href="structjs_pub_options.html#a740a7edee8c832a75b75fded6046ba90">  252</a></span>        <span class="keywordtype">bool</span>            <a class="code hl_variable" href="structjs_pub_options.html#a740a7edee8c832a75b75fded6046ba90">ExpectNoMessage</a>;        </div>
+<div class="line"><a id="l00253" name="l00253"></a><span class="lineno">  253</span> </div>
+<div class="line"><a id="l00254" name="l00254"></a><span class="lineno"><a class="line" href="group__types_group.html#ga7bbea3575d35dcdbfc9b766b04269eb7">  254</a></span>} <a class="code hl_struct" href="structjs_pub_options.html">jsPubOptions</a>;</div>
+<div class="line"><a id="l00255" name="l00255"></a><span class="lineno">  255</span> </div>
+<div class="line"><a id="l00259" name="l00259"></a><span class="lineno"><a class="line" href="group__types_group.html#ga410f8fb053efa02b2ca1de0c02fa4b6d">  259</a></span><span class="keyword">typedef</span> <span class="keyword">enum</span></div>
+<div class="line"><a id="l00260" name="l00260"></a><span class="lineno">  260</span>{</div>
+<div class="line"><a id="l00261" name="l00261"></a><span class="lineno"><a class="line" href="group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6da6a2aa02f32acec6526d81f6e974e690f">  261</a></span>        <a class="code hl_enumvalue" href="group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6da6a2aa02f32acec6526d81f6e974e690f">js_LimitsPolicy</a> = 0,    </div>
+<div class="line"><a id="l00262" name="l00262"></a><span class="lineno"><a class="line" href="group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6dae874de4a787cfbec4c6d0eb1a3f05ebd">  262</a></span>        <a class="code hl_enumvalue" href="group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6dae874de4a787cfbec4c6d0eb1a3f05ebd">js_InterestPolicy</a>,      </div>
+<div class="line"><a id="l00263" name="l00263"></a><span class="lineno"><a class="line" href="group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6daf7e6581e69572691b01d1294a3c3a478">  263</a></span>        <a class="code hl_enumvalue" href="group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6daf7e6581e69572691b01d1294a3c3a478">js_WorkQueuePolicy</a>,     </div>
+<div class="line"><a id="l00264" name="l00264"></a><span class="lineno">  264</span> </div>
+<div class="line"><a id="l00265" name="l00265"></a><span class="lineno">  265</span>} <a class="code hl_enumeration" href="group__types_group.html#ga410f8fb053efa02b2ca1de0c02fa4b6d">jsRetentionPolicy</a>;</div>
+<div class="line"><a id="l00266" name="l00266"></a><span class="lineno">  266</span> </div>
+<div class="line"><a id="l00270" name="l00270"></a><span class="lineno"><a class="line" href="group__types_group.html#ga7f88b7d482488398074f9d1419a9b8c2">  270</a></span><span class="keyword">typedef</span> <span class="keyword">enum</span></div>
+<div class="line"><a id="l00271" name="l00271"></a><span class="lineno">  271</span>{</div>
+<div class="line"><a id="l00272" name="l00272"></a><span class="lineno"><a class="line" href="group__types_group.html#gga7f88b7d482488398074f9d1419a9b8c2abb31b828421634f1e6a1ef9359bc91f6">  272</a></span>        <a class="code hl_enumvalue" href="group__types_group.html#gga7f88b7d482488398074f9d1419a9b8c2abb31b828421634f1e6a1ef9359bc91f6">js_DiscardOld</a> = 0,  </div>
+<div class="line"><a id="l00273" name="l00273"></a><span class="lineno"><a class="line" href="group__types_group.html#gga7f88b7d482488398074f9d1419a9b8c2a99d7f2d740af26c340c0a4e2b72fb6ab">  273</a></span>        <a class="code hl_enumvalue" href="group__types_group.html#gga7f88b7d482488398074f9d1419a9b8c2a99d7f2d740af26c340c0a4e2b72fb6ab">js_DiscardNew</a>,      </div>
+<div class="line"><a id="l00274" name="l00274"></a><span class="lineno">  274</span> </div>
+<div class="line"><a id="l00275" name="l00275"></a><span class="lineno">  275</span>} <a class="code hl_enumeration" href="group__types_group.html#ga7f88b7d482488398074f9d1419a9b8c2">jsDiscardPolicy</a>;</div>
+<div class="line"><a id="l00276" name="l00276"></a><span class="lineno">  276</span> </div>
+<div class="line"><a id="l00280" name="l00280"></a><span class="lineno"><a class="line" href="group__types_group.html#ga1802a53c79e667f093bba033b16adc98">  280</a></span><span class="keyword">typedef</span> <span class="keyword">enum</span></div>
+<div class="line"><a id="l00281" name="l00281"></a><span class="lineno">  281</span>{</div>
+<div class="line"><a id="l00282" name="l00282"></a><span class="lineno"><a class="line" href="group__types_group.html#gga1802a53c79e667f093bba033b16adc98a1d9dad1854cf374b22e3688b98284dec">  282</a></span>        <a class="code hl_enumvalue" href="group__types_group.html#gga1802a53c79e667f093bba033b16adc98a1d9dad1854cf374b22e3688b98284dec">js_FileStorage</a> = 0, </div>
+<div class="line"><a id="l00283" name="l00283"></a><span class="lineno"><a class="line" href="group__types_group.html#gga1802a53c79e667f093bba033b16adc98a428ed10448726ad01c1db77a7f748314">  283</a></span>        <a class="code hl_enumvalue" href="group__types_group.html#gga1802a53c79e667f093bba033b16adc98a428ed10448726ad01c1db77a7f748314">js_MemoryStorage</a>,   </div>
+<div class="line"><a id="l00284" name="l00284"></a><span class="lineno">  284</span> </div>
+<div class="line"><a id="l00285" name="l00285"></a><span class="lineno">  285</span>} <a class="code hl_enumeration" href="group__types_group.html#ga1802a53c79e667f093bba033b16adc98">jsStorageType</a>;</div>
+<div class="line"><a id="l00286" name="l00286"></a><span class="lineno">  286</span> </div>
+<div class="line"><a id="l00290" name="l00290"></a><span class="lineno"><a class="line" href="group__types_group.html#ga117ed2c35f89ef3144540ed9cbadc818">  290</a></span><span class="keyword">typedef</span> <span class="keyword">enum</span></div>
+<div class="line"><a id="l00291" name="l00291"></a><span class="lineno">  291</span>{</div>
+<div class="line"><a id="l00292" name="l00292"></a><span class="lineno"><a class="line" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818ac692ba1363103768ac4bb58695549758">  292</a></span>        <a class="code hl_enumvalue" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818ac692ba1363103768ac4bb58695549758">js_DeliverAll</a> = 0,          </div>
+<div class="line"><a id="l00293" name="l00293"></a><span class="lineno"><a class="line" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818abbd81d6c4e0f17f30e2186f1335e991d">  293</a></span>        <a class="code hl_enumvalue" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818abbd81d6c4e0f17f30e2186f1335e991d">js_DeliverLast</a>,             </div>
+<div class="line"><a id="l00294" name="l00294"></a><span class="lineno"><a class="line" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a82b8d36e17391212398984f92db9c381">  294</a></span>        <a class="code hl_enumvalue" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a82b8d36e17391212398984f92db9c381">js_DeliverNew</a>,              </div>
+<div class="line"><a id="l00295" name="l00295"></a><span class="lineno"><a class="line" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a06299d9c8262a16306ba6cc16d293c5e">  295</a></span>        <a class="code hl_enumvalue" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a06299d9c8262a16306ba6cc16d293c5e">js_DeliverByStartSequence</a>,  </div>
+<div class="line"><a id="l00296" name="l00296"></a><span class="lineno"><a class="line" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a33317133d42f21bf5919827a691543f6">  296</a></span>        <a class="code hl_enumvalue" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a33317133d42f21bf5919827a691543f6">js_DeliverByStartTime</a>,      </div>
+<div class="line"><a id="l00297" name="l00297"></a><span class="lineno"><a class="line" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818abb50ebcd2fbafe27038c966121b9407b">  297</a></span>        <a class="code hl_enumvalue" href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818abb50ebcd2fbafe27038c966121b9407b">js_DeliverLastPerSubject</a>,   </div>
+<div class="line"><a id="l00298" name="l00298"></a><span class="lineno">  298</span> </div>
+<div class="line"><a id="l00299" name="l00299"></a><span class="lineno">  299</span>} <a class="code hl_enumeration" href="group__types_group.html#ga117ed2c35f89ef3144540ed9cbadc818">jsDeliverPolicy</a>;</div>
+<div class="line"><a id="l00300" name="l00300"></a><span class="lineno">  300</span> </div>
+<div class="line"><a id="l00304" name="l00304"></a><span class="lineno"><a class="line" href="group__types_group.html#ga8fcb50e6e7312834791f9e237d28e873">  304</a></span><span class="keyword">typedef</span> <span class="keyword">enum</span></div>
+<div class="line"><a id="l00305" name="l00305"></a><span class="lineno">  305</span>{</div>
+<div class="line"><a id="l00306" name="l00306"></a><span class="lineno"><a class="line" href="group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873a02d46a6395933c55c95ee5194bb6b80e">  306</a></span>        <a class="code hl_enumvalue" href="group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873a02d46a6395933c55c95ee5194bb6b80e">js_AckExplicit</a> = 0,     </div>
+<div class="line"><a id="l00307" name="l00307"></a><span class="lineno"><a class="line" href="group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873afd91fe31cf57c68863ca3090b07c296c">  307</a></span>        <a class="code hl_enumvalue" href="group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873afd91fe31cf57c68863ca3090b07c296c">js_AckNone</a>,             </div>
+<div class="line"><a id="l00308" name="l00308"></a><span class="lineno"><a class="line" href="group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873a1232af28bf4e4b82e962174f1432ed4a">  308</a></span>        <a class="code hl_enumvalue" href="group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873a1232af28bf4e4b82e962174f1432ed4a">js_AckAll</a>,              </div>
+<div class="line"><a id="l00309" name="l00309"></a><span class="lineno">  309</span> </div>
+<div class="line"><a id="l00310" name="l00310"></a><span class="lineno">  310</span> </div>
+<div class="line"><a id="l00311" name="l00311"></a><span class="lineno">  311</span>} <a class="code hl_enumeration" href="group__types_group.html#ga8fcb50e6e7312834791f9e237d28e873">jsAckPolicy</a>;</div>
+<div class="line"><a id="l00312" name="l00312"></a><span class="lineno">  312</span> </div>
+<div class="line"><a id="l00316" name="l00316"></a><span class="lineno"><a class="line" href="group__types_group.html#ga8650faf52b0b6b23df376eebeb9d0354">  316</a></span><span class="keyword">typedef</span> <span class="keyword">enum</span></div>
+<div class="line"><a id="l00317" name="l00317"></a><span class="lineno">  317</span>{</div>
+<div class="line"><a id="l00318" name="l00318"></a><span class="lineno"><a class="line" href="group__types_group.html#gga8650faf52b0b6b23df376eebeb9d0354a2c4a1e2b75f31dd69a89b541d75afa44">  318</a></span>        <a class="code hl_enumvalue" href="group__types_group.html#gga8650faf52b0b6b23df376eebeb9d0354a2c4a1e2b75f31dd69a89b541d75afa44">js_ReplayInstant</a> = 0,   </div>
+<div class="line"><a id="l00319" name="l00319"></a><span class="lineno"><a class="line" href="group__types_group.html#gga8650faf52b0b6b23df376eebeb9d0354a6ee3851dac5c90a61492193dd55931f5">  319</a></span>        <a class="code hl_enumvalue" href="group__types_group.html#gga8650faf52b0b6b23df376eebeb9d0354a6ee3851dac5c90a61492193dd55931f5">js_ReplayOriginal</a>,      </div>
+<div class="line"><a id="l00320" name="l00320"></a><span class="lineno">  320</span> </div>
+<div class="line"><a id="l00321" name="l00321"></a><span class="lineno">  321</span>} <a class="code hl_enumeration" href="group__types_group.html#ga8650faf52b0b6b23df376eebeb9d0354">jsReplayPolicy</a>;</div>
+<div class="line"><a id="l00322" name="l00322"></a><span class="lineno">  322</span> </div>
+<div class="line"><a id="l00323" name="l00323"></a><span class="lineno">  323</span> </div>
+<div class="line"><a id="l00335" name="l00335"></a><span class="lineno"><a class="line" href="structjs_placement.html">  335</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structjs_placement.html">jsPlacement</a></div>
+<div class="line"><a id="l00336" name="l00336"></a><span class="lineno">  336</span>{</div>
+<div class="line"><a id="l00337" name="l00337"></a><span class="lineno"><a class="line" href="structjs_placement.html#ad8c83588d57f0e30959cfb6f3d5d61bf">  337</a></span>        <span class="keyword">const</span> <span class="keywordtype">char</span>      *<a class="code hl_variable" href="structjs_placement.html#ad8c83588d57f0e30959cfb6f3d5d61bf">Cluster</a>;</div>
+<div class="line"><a id="l00338" name="l00338"></a><span class="lineno"><a class="line" href="structjs_placement.html#af078a85b744b9ff3771bb2da6005b90d">  338</a></span>        <span class="keyword">const</span> <span class="keywordtype">char</span>      **<a class="code hl_variable" href="structjs_placement.html#af078a85b744b9ff3771bb2da6005b90d">Tags</a>;</div>
+<div class="line"><a id="l00339" name="l00339"></a><span class="lineno"><a class="line" href="structjs_placement.html#a35644f07531409518521b1b4fa28c9e3">  339</a></span>        <span class="keywordtype">int</span>             <a class="code hl_variable" href="structjs_placement.html#a35644f07531409518521b1b4fa28c9e3">TagsLen</a>;</div>
+<div class="line"><a id="l00340" name="l00340"></a><span class="lineno">  340</span> </div>
+<div class="line"><a id="l00341" name="l00341"></a><span class="lineno"><a class="line" href="group__types_group.html#ga49d1138fac9da8b85d00a367081e91c9">  341</a></span>} <a class="code hl_struct" href="structjs_placement.html">jsPlacement</a>;</div>
+<div class="line"><a id="l00342" name="l00342"></a><span class="lineno">  342</span> </div>
+<div class="line"><a id="l00352" name="l00352"></a><span class="lineno"><a class="line" href="structjs_external_stream.html">  352</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structjs_external_stream.html">jsExternalStream</a></div>
+<div class="line"><a id="l00353" name="l00353"></a><span class="lineno">  353</span>{</div>
+<div class="line"><a id="l00354" name="l00354"></a><span class="lineno"><a class="line" href="structjs_external_stream.html#a2eaf2c0c3e77c269f44e254af8b24e96">  354</a></span>        <span class="keyword">const</span> <span class="keywordtype">char</span>      *<a class="code hl_variable" href="structjs_external_stream.html#a2eaf2c0c3e77c269f44e254af8b24e96">APIPrefix</a>;</div>
+<div class="line"><a id="l00355" name="l00355"></a><span class="lineno"><a class="line" href="structjs_external_stream.html#a26ca427f3c5be1cae579ddccc16432d3">  355</a></span>        <span class="keyword">const</span> <span class="keywordtype">char</span>      *<a class="code hl_variable" href="structjs_external_stream.html#a26ca427f3c5be1cae579ddccc16432d3">DeliverPrefix</a>;</div>
+<div class="line"><a id="l00356" name="l00356"></a><span class="lineno">  356</span> </div>
+<div class="line"><a id="l00357" name="l00357"></a><span class="lineno"><a class="line" href="group__types_group.html#gaef6601477f6456bebc229f7f38982a6c">  357</a></span>} <a class="code hl_struct" href="structjs_external_stream.html">jsExternalStream</a>;</div>
+<div class="line"><a id="l00358" name="l00358"></a><span class="lineno">  358</span> </div>
+<div class="line"><a id="l00371" name="l00371"></a><span class="lineno"><a class="line" href="structjs_stream_source.html">  371</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structjs_stream_source.html">jsStreamSource</a></div>
+<div class="line"><a id="l00372" name="l00372"></a><span class="lineno">  372</span>{</div>
+<div class="line"><a id="l00373" name="l00373"></a><span class="lineno"><a class="line" href="structjs_stream_source.html#a7d9e5c064866b3f0b5601193c5885ec3">  373</a></span>        <span class="keyword">const</span> <span class="keywordtype">char</span>              *<a class="code hl_variable" href="structjs_stream_source.html#a7d9e5c064866b3f0b5601193c5885ec3">Name</a>;</div>
+<div class="line"><a id="l00374" name="l00374"></a><span class="lineno"><a class="line" href="structjs_stream_source.html#ad6948b7a34c202f324b6d2beb32fe5ed">  374</a></span>        uint64_t                <a class="code hl_variable" href="structjs_stream_source.html#ad6948b7a34c202f324b6d2beb32fe5ed">OptStartSeq</a>;</div>
+<div class="line"><a id="l00375" name="l00375"></a><span class="lineno"><a class="line" href="structjs_stream_source.html#a67eb1dac41b2d826a923cfb23baa24a5">  375</a></span>        int64_t                 <a class="code hl_variable" href="structjs_stream_source.html#a67eb1dac41b2d826a923cfb23baa24a5">OptStartTime</a>;   </div>
+<div class="line"><a id="l00376" name="l00376"></a><span class="lineno"><a class="line" href="structjs_stream_source.html#af787b51dde9d77626f33860564eb08c3">  376</a></span>        <span class="keyword">const</span> <span class="keywordtype">char</span>              *<a class="code hl_variable" href="structjs_stream_source.html#af787b51dde9d77626f33860564eb08c3">FilterSubject</a>;</div>
+<div class="line"><a id="l00377" name="l00377"></a><span class="lineno"><a class="line" href="structjs_stream_source.html#a295458d156af5373bb3f5ab06612a888">  377</a></span>        <a class="code hl_struct" href="structjs_external_stream.html">jsExternalStream</a>        *<a class="code hl_variable" href="structjs_stream_source.html#a295458d156af5373bb3f5ab06612a888">External</a>;</div>
+<div class="line"><a id="l00378" name="l00378"></a><span class="lineno">  378</span> </div>
+<div class="line"><a id="l00379" name="l00379"></a><span class="lineno"><a class="line" href="group__types_group.html#gab4c43c87d81917aab748a50eee028449">  379</a></span>} <a class="code hl_struct" href="structjs_stream_source.html">jsStreamSource</a>;</div>
+<div class="line"><a id="l00380" name="l00380"></a><span class="lineno">  380</span> </div>
+<div class="line"><a id="l00384" name="l00384"></a><span class="lineno"><a class="line" href="structjs_re_publish.html">  384</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structjs_re_publish.html">jsRePublish</a></div>
+<div class="line"><a id="l00385" name="l00385"></a><span class="lineno">  385</span>{</div>
+<div class="line"><a id="l00386" name="l00386"></a><span class="lineno"><a class="line" href="structjs_re_publish.html#a1acb593929fd69bbe0f4dc8300dfaeb2">  386</a></span>        <span class="keyword">const</span> <span class="keywordtype">char</span>              *<a class="code hl_variable" href="structjs_re_publish.html#a1acb593929fd69bbe0f4dc8300dfaeb2">Source</a>;</div>
+<div class="line"><a id="l00387" name="l00387"></a><span class="lineno"><a class="line" href="structjs_re_publish.html#a662b2e57d237b171b2b61509f7e1023a">  387</a></span>        <span class="keyword">const</span> <span class="keywordtype">char</span>              *<a class="code hl_variable" href="structjs_re_publish.html#a662b2e57d237b171b2b61509f7e1023a">Destination</a>;</div>
+<div class="line"><a id="l00388" name="l00388"></a><span class="lineno"><a class="line" href="structjs_re_publish.html#a16ebc4cdae4a407cf4e32aad212888db">  388</a></span>        <span class="keywordtype">bool</span>                    <a class="code hl_variable" href="structjs_re_publish.html#a16ebc4cdae4a407cf4e32aad212888db">HeadersOnly</a>;</div>
+<div class="line"><a id="l00389" name="l00389"></a><span class="lineno">  389</span> </div>
+<div class="line"><a id="l00390" name="l00390"></a><span class="lineno"><a class="line" href="group__types_group.html#gab991313d33ce270a882e4d0756c138f6">  390</a></span>} <a class="code hl_struct" href="structjs_re_publish.html">jsRePublish</a>;</div>
+<div class="line"><a id="l00391" name="l00391"></a><span class="lineno">  391</span> </div>
+<div class="line"><a id="l00468" name="l00468"></a><span class="lineno"><a class="line" href="structjs_stream_config.html">  468</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structjs_stream_config.html">jsStreamConfig</a> {</div>
+<div class="line"><a id="l00469" name="l00469"></a><span class="lineno"><a class="line" href="structjs_stream_config.html#a7fe3d5086f1c660a6999ae40ecd370e5">  469</a></span>        <span class="keyword">const</span> <span class="keywordtype">char</span>              *<a class="code hl_variable" href="structjs_stream_config.html#a7fe3d5086f1c660a6999ae40ecd370e5">Name</a>;</div>
+<div class="line"><a id="l00470" name="l00470"></a><span class="lineno"><a class="line" href="structjs_stream_config.html#a4f9f422d2e9e7389860291ab19bd7f10">  470</a></span>        <span class="keyword">const</span> <span class="keywordtype">char</span>              *<a class="code hl_variable" href="structjs_stream_config.html#a4f9f422d2e9e7389860291ab19bd7f10">Description</a>;</div>
+<div class="line"><a id="l00471" name="l00471"></a><span class="lineno"><a class="line" href="structjs_stream_config.html#a0c5f3354073dbe72650e3db7f59a47af">  471</a></span>        <span class="keyword">const</span> <span class="keywordtype">char</span>              **<a class="code hl_variable" href="structjs_stream_config.html#a0c5f3354073dbe72650e3db7f59a47af">Subjects</a>;</div>
+<div class="line"><a id="l00472" name="l00472"></a><span class="lineno"><a class="line" href="structjs_stream_config.html#ab2186aae798df6c222b3fa69e31597e1">  472</a></span>        <span class="keywordtype">int</span>                     <a class="code hl_variable" href="structjs_stream_config.html#ab2186aae798df6c222b3fa69e31597e1">SubjectsLen</a>;</div>
+<div class="line"><a id="l00473" name="l00473"></a><span class="lineno"><a class="line" href="structjs_stream_config.html#a5ebc95b76afafa5e7a129953ba1bb3c7">  473</a></span>        <a class="code hl_enumeration" href="group__types_group.html#ga410f8fb053efa02b2ca1de0c02fa4b6d">jsRetentionPolicy</a>       <a class="code hl_variable" href="structjs_stream_config.html#a5ebc95b76afafa5e7a129953ba1bb3c7">Retention</a>;</div>
+<div class="line"><a id="l00474" name="l00474"></a><span class="lineno"><a class="line" href="structjs_stream_config.html#a7338c82c8cbfcd5f4bfb7ad34b1d8395">  474</a></span>        int64_t                 <a class="code hl_variable" href="structjs_stream_config.html#a7338c82c8cbfcd5f4bfb7ad34b1d8395">MaxConsumers</a>;</div>
+<div class="line"><a id="l00475" name="l00475"></a><span class="lineno"><a class="line" href="structjs_stream_config.html#a60a5184d1d97b056dbb31ac6a5b3d82d">  475</a></span>        int64_t                 <a class="code hl_variable" href="structjs_stream_config.html#a60a5184d1d97b056dbb31ac6a5b3d82d">MaxMsgs</a>;</div>
+<div class="line"><a id="l00476" name="l00476"></a><span class="lineno"><a class="line" href="structjs_stream_config.html#ad75e47d4293441bd5ddbc5eaf01e0451">  476</a></span>        int64_t                 <a class="code hl_variable" href="structjs_stream_config.html#ad75e47d4293441bd5ddbc5eaf01e0451">MaxBytes</a>;</div>
+<div class="line"><a id="l00477" name="l00477"></a><span class="lineno"><a class="line" href="structjs_stream_config.html#aa538765ad97d343d60212ebd9894661e">  477</a></span>        int64_t                 <a class="code hl_variable" href="structjs_stream_config.html#aa538765ad97d343d60212ebd9894661e">MaxAge</a>;</div>
+<div class="line"><a id="l00478" name="l00478"></a><span class="lineno"><a class="line" href="structjs_stream_config.html#aa167c7547d13bf2a01510a375ad38340">  478</a></span>        int64_t                 <a class="code hl_variable" href="structjs_stream_config.html#aa167c7547d13bf2a01510a375ad38340">MaxMsgsPerSubject</a>;</div>
+<div class="line"><a id="l00479" name="l00479"></a><span class="lineno"><a class="line" href="structjs_stream_config.html#a93a2336a57b6bfb792d530fd13a90641">  479</a></span>        int32_t                 <a class="code hl_variable" href="structjs_stream_config.html#a93a2336a57b6bfb792d530fd13a90641">MaxMsgSize</a>;</div>
+<div class="line"><a id="l00480" name="l00480"></a><span class="lineno"><a class="line" href="structjs_stream_config.html#a0b44ea5251ef20bf5b5658bcfbea832d">  480</a></span>        <a class="code hl_enumeration" href="group__types_group.html#ga7f88b7d482488398074f9d1419a9b8c2">jsDiscardPolicy</a>         <a class="code hl_variable" href="structjs_stream_config.html#a0b44ea5251ef20bf5b5658bcfbea832d">Discard</a>;</div>
+<div class="line"><a id="l00481" name="l00481"></a><span class="lineno"><a class="line" href="structjs_stream_config.html#a59c34091f336eafa77da2991c852c0d8">  481</a></span>        <a class="code hl_enumeration" href="group__types_group.html#ga1802a53c79e667f093bba033b16adc98">jsStorageType</a>           <a class="code hl_variable" href="structjs_stream_config.html#a59c34091f336eafa77da2991c852c0d8">Storage</a>;</div>
+<div class="line"><a id="l00482" name="l00482"></a><span class="lineno"><a class="line" href="structjs_stream_config.html#adbf2c948cf8091b149603b918ef49ffc">  482</a></span>        int64_t                 <a class="code hl_variable" href="structjs_stream_config.html#adbf2c948cf8091b149603b918ef49ffc">Replicas</a>;</div>
+<div class="line"><a id="l00483" name="l00483"></a><span class="lineno"><a class="line" href="structjs_stream_config.html#a8e358fbc569a1c6d49c704e6dbdf8609">  483</a></span>        <span class="keywordtype">bool</span>                    <a class="code hl_variable" href="structjs_stream_config.html#a8e358fbc569a1c6d49c704e6dbdf8609">NoAck</a>;</div>
+<div class="line"><a id="l00484" name="l00484"></a><span class="lineno"><a class="line" href="structjs_stream_config.html#a50f866f0e73c4ff0a5f43b354a059fa9">  484</a></span>        <span class="keyword">const</span> <span class="keywordtype">char</span>              *<a class="code hl_variable" href="structjs_stream_config.html#a50f866f0e73c4ff0a5f43b354a059fa9">Template</a>;</div>
+<div class="line"><a id="l00485" name="l00485"></a><span class="lineno"><a class="line" href="structjs_stream_config.html#a9e0ff10273d0182f885615b4f7d1cc20">  485</a></span>        int64_t                 <a class="code hl_variable" href="structjs_stream_config.html#a9e0ff10273d0182f885615b4f7d1cc20">Duplicates</a>;</div>
+<div class="line"><a id="l00486" name="l00486"></a><span class="lineno"><a class="line" href="structjs_stream_config.html#acee6c66afc78d79c2f518eed89177efb">  486</a></span>        <a class="code hl_struct" href="structjs_placement.html">jsPlacement</a>             *<a class="code hl_variable" href="structjs_stream_config.html#acee6c66afc78d79c2f518eed89177efb">Placement</a>;</div>
+<div class="line"><a id="l00487" name="l00487"></a><span class="lineno"><a class="line" href="structjs_stream_config.html#acdba5b22e4e60fd81a54769a7d09bc51">  487</a></span>        <a class="code hl_struct" href="structjs_stream_source.html">jsStreamSource</a>          *<a class="code hl_variable" href="structjs_stream_config.html#acdba5b22e4e60fd81a54769a7d09bc51">Mirror</a>;</div>
+<div class="line"><a id="l00488" name="l00488"></a><span class="lineno"><a class="line" href="structjs_stream_config.html#a8f0ee08922e5b2108082b5b9e4a6284b">  488</a></span>        <a class="code hl_struct" href="structjs_stream_source.html">jsStreamSource</a>          **<a class="code hl_variable" href="structjs_stream_config.html#a8f0ee08922e5b2108082b5b9e4a6284b">Sources</a>;</div>
+<div class="line"><a id="l00489" name="l00489"></a><span class="lineno"><a class="line" href="structjs_stream_config.html#a34960d6acc710c2f32b563f4bb7c9c0a">  489</a></span>        <span class="keywordtype">int</span>                     <a class="code hl_variable" href="structjs_stream_config.html#a34960d6acc710c2f32b563f4bb7c9c0a">SourcesLen</a>;</div>
+<div class="line"><a id="l00490" name="l00490"></a><span class="lineno"><a class="line" href="structjs_stream_config.html#aede3fd2ab13d230eda14c96f9997e1b7">  490</a></span>        <span class="keywordtype">bool</span>                    <a class="code hl_variable" href="structjs_stream_config.html#aede3fd2ab13d230eda14c96f9997e1b7">Sealed</a>;         </div>
+<div class="line"><a id="l00491" name="l00491"></a><span class="lineno"><a class="line" href="structjs_stream_config.html#af2d42dd29b9a35257937aeeb53c9f287">  491</a></span>        <span class="keywordtype">bool</span>                    <a class="code hl_variable" href="structjs_stream_config.html#af2d42dd29b9a35257937aeeb53c9f287">DenyDelete</a>;     </div>
+<div class="line"><a id="l00492" name="l00492"></a><span class="lineno"><a class="line" href="structjs_stream_config.html#a575ffbaa85b0300032963296b090583a">  492</a></span>        <span class="keywordtype">bool</span>                    <a class="code hl_variable" href="structjs_stream_config.html#a575ffbaa85b0300032963296b090583a">DenyPurge</a>;      </div>
+<div class="line"><a id="l00497" name="l00497"></a><span class="lineno"><a class="line" href="structjs_stream_config.html#aba71cdb342181f52bb9f7ff5f770a1fa">  497</a></span>        <span class="keywordtype">bool</span>                    <a class="code hl_variable" href="structjs_stream_config.html#aba71cdb342181f52bb9f7ff5f770a1fa">AllowRollup</a>;</div>
+<div class="line"><a id="l00498" name="l00498"></a><span class="lineno">  498</span> </div>
+<div class="line"><a id="l00499" name="l00499"></a><span class="lineno">  499</span>        <span class="comment">// Allow republish of the message after being sequenced and stored.</span></div>
+<div class="line"><a id="l00500" name="l00500"></a><span class="lineno"><a class="line" href="structjs_stream_config.html#a95ab0061b6e935b129a4a9c133e6b11c">  500</a></span>        <a class="code hl_struct" href="structjs_re_publish.html">jsRePublish</a>             *<a class="code hl_variable" href="structjs_stream_config.html#a95ab0061b6e935b129a4a9c133e6b11c">RePublish</a>;</div>
+<div class="line"><a id="l00501" name="l00501"></a><span class="lineno">  501</span> </div>
+<div class="line"><a id="l00502" name="l00502"></a><span class="lineno">  502</span>        <span class="comment">// Allow higher performance, direct access to get individual messages. E.g. KeyValue</span></div>
+<div class="line"><a id="l00503" name="l00503"></a><span class="lineno"><a class="line" href="structjs_stream_config.html#a28630f6f07ca02553c5d5718d7c29721">  503</a></span>        <span class="keywordtype">bool</span>                    <a class="code hl_variable" href="structjs_stream_config.html#a28630f6f07ca02553c5d5718d7c29721">AllowDirect</a>;</div>
+<div class="line"><a id="l00504" name="l00504"></a><span class="lineno">  504</span>        <span class="comment">// Allow higher performance and unified direct access for mirrors as well.</span></div>
+<div class="line"><a id="l00505" name="l00505"></a><span class="lineno"><a class="line" href="structjs_stream_config.html#a9d67ddcc7c54c345dd60ed5e59234f1e">  505</a></span>        <span class="keywordtype">bool</span>                    <a class="code hl_variable" href="structjs_stream_config.html#a9d67ddcc7c54c345dd60ed5e59234f1e">MirrorDirect</a>;</div>
+<div class="line"><a id="l00506" name="l00506"></a><span class="lineno">  506</span> </div>
+<div class="line"><a id="l00507" name="l00507"></a><span class="lineno">  507</span>        <span class="comment">// Allow KV like semantics to also discard new on a per subject basis</span></div>
+<div class="line"><a id="l00508" name="l00508"></a><span class="lineno"><a class="line" href="structjs_stream_config.html#a3fb7d5e1a09829fe742749da880afe4a">  508</a></span>        <span class="keywordtype">bool</span>                    <a class="code hl_variable" href="structjs_stream_config.html#a3fb7d5e1a09829fe742749da880afe4a">DiscardNewPerSubject</a>;</div>
+<div class="line"><a id="l00509" name="l00509"></a><span class="lineno">  509</span> </div>
+<div class="line"><a id="l00510" name="l00510"></a><span class="lineno"><a class="line" href="group__types_group.html#ga26fd6a73df327ca3c271e46ddefc8acf">  510</a></span>} <a class="code hl_struct" href="structjs_stream_config.html">jsStreamConfig</a>;</div>
+<div class="line"><a id="l00511" name="l00511"></a><span class="lineno">  511</span> </div>
+<div class="line"><a id="l00515" name="l00515"></a><span class="lineno"><a class="line" href="structjs_lost_stream_data.html">  515</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structjs_lost_stream_data.html">jsLostStreamData</a></div>
+<div class="line"><a id="l00516" name="l00516"></a><span class="lineno">  516</span>{</div>
+<div class="line"><a id="l00517" name="l00517"></a><span class="lineno"><a class="line" href="structjs_lost_stream_data.html#a5d2e87697526033c842a7f955776dfda">  517</a></span>        uint64_t                *<a class="code hl_variable" href="structjs_lost_stream_data.html#a5d2e87697526033c842a7f955776dfda">Msgs</a>;</div>
+<div class="line"><a id="l00518" name="l00518"></a><span class="lineno"><a class="line" href="structjs_lost_stream_data.html#abdc373ed7fc9b7cf161c13da1913fc9a">  518</a></span>        <span class="keywordtype">int</span>                     <a class="code hl_variable" href="structjs_lost_stream_data.html#abdc373ed7fc9b7cf161c13da1913fc9a">MsgsLen</a>;</div>
+<div class="line"><a id="l00519" name="l00519"></a><span class="lineno"><a class="line" href="structjs_lost_stream_data.html#a841fcadca3f66e9170a51080dc1acf30">  519</a></span>        uint64_t                <a class="code hl_variable" href="structjs_lost_stream_data.html#a841fcadca3f66e9170a51080dc1acf30">Bytes</a>;</div>
+<div class="line"><a id="l00520" name="l00520"></a><span class="lineno">  520</span> </div>
+<div class="line"><a id="l00521" name="l00521"></a><span class="lineno"><a class="line" href="group__types_group.html#gaf80828510450faf84bbf456e94f5b784">  521</a></span>} <a class="code hl_struct" href="structjs_lost_stream_data.html">jsLostStreamData</a>;</div>
+<div class="line"><a id="l00522" name="l00522"></a><span class="lineno">  522</span> </div>
+<div class="line"><a id="l00528" name="l00528"></a><span class="lineno"><a class="line" href="structjs_stream_state_subject.html">  528</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structjs_stream_state_subject.html">jsStreamStateSubject</a></div>
+<div class="line"><a id="l00529" name="l00529"></a><span class="lineno">  529</span>{</div>
+<div class="line"><a id="l00530" name="l00530"></a><span class="lineno"><a class="line" href="structjs_stream_state_subject.html#aa766824a7f8b69db592971af3262640e">  530</a></span>        <span class="keyword">const</span> <span class="keywordtype">char</span>              *<a class="code hl_variable" href="structjs_stream_state_subject.html#aa766824a7f8b69db592971af3262640e">Subject</a>;</div>
+<div class="line"><a id="l00531" name="l00531"></a><span class="lineno"><a class="line" href="structjs_stream_state_subject.html#a8b9b2edc5afe82b7b3bc7dbdd67a4384">  531</a></span>        uint64_t                <a class="code hl_variable" href="structjs_stream_state_subject.html#a8b9b2edc5afe82b7b3bc7dbdd67a4384">Msgs</a>;</div>
+<div class="line"><a id="l00532" name="l00532"></a><span class="lineno">  532</span> </div>
+<div class="line"><a id="l00533" name="l00533"></a><span class="lineno"><a class="line" href="group__types_group.html#ga55dce2fa9ecd215716cc9ceece7dfefa">  533</a></span>} <a class="code hl_struct" href="structjs_stream_state_subject.html">jsStreamStateSubject</a>;</div>
+<div class="line"><a id="l00534" name="l00534"></a><span class="lineno">  534</span> </div>
+<div class="line"><a id="l00564" name="l00564"></a><span class="lineno"><a class="line" href="structjs_stream_state_subjects.html">  564</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structjs_stream_state_subjects.html">jsStreamStateSubjects</a></div>
+<div class="line"><a id="l00565" name="l00565"></a><span class="lineno">  565</span>{</div>
+<div class="line"><a id="l00566" name="l00566"></a><span class="lineno"><a class="line" href="structjs_stream_state_subjects.html#aef3d1e886b16961daa84c43650fa80c0">  566</a></span>        <a class="code hl_struct" href="structjs_stream_state_subject.html">jsStreamStateSubject</a>    *<a class="code hl_variable" href="structjs_stream_state_subjects.html#aef3d1e886b16961daa84c43650fa80c0">List</a>;</div>
+<div class="line"><a id="l00567" name="l00567"></a><span class="lineno"><a class="line" href="structjs_stream_state_subjects.html#ab88e2026f518b6cdffd3901b5e5cd374">  567</a></span>        <span class="keywordtype">int</span>                     <a class="code hl_variable" href="structjs_stream_state_subjects.html#ab88e2026f518b6cdffd3901b5e5cd374">Count</a>;</div>
+<div class="line"><a id="l00568" name="l00568"></a><span class="lineno">  568</span> </div>
+<div class="line"><a id="l00569" name="l00569"></a><span class="lineno"><a class="line" href="group__types_group.html#gae8b57d9c40364f97a705f3e61a1156b0">  569</a></span>} <a class="code hl_struct" href="structjs_stream_state_subjects.html">jsStreamStateSubjects</a>;</div>
+<div class="line"><a id="l00570" name="l00570"></a><span class="lineno">  570</span> </div>
+<div class="line"><a id="l00577" name="l00577"></a><span class="lineno"><a class="line" href="structjs_stream_state.html">  577</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structjs_stream_state.html">jsStreamState</a></div>
+<div class="line"><a id="l00578" name="l00578"></a><span class="lineno">  578</span>{</div>
+<div class="line"><a id="l00579" name="l00579"></a><span class="lineno"><a class="line" href="structjs_stream_state.html#a495269fe83c6bbf2023cca94add0a888">  579</a></span>        uint64_t                <a class="code hl_variable" href="structjs_stream_state.html#a495269fe83c6bbf2023cca94add0a888">Msgs</a>;</div>
+<div class="line"><a id="l00580" name="l00580"></a><span class="lineno"><a class="line" href="structjs_stream_state.html#ae603fa6ecfb63c93b61272b7d1b8fb4d">  580</a></span>        uint64_t                <a class="code hl_variable" href="structjs_stream_state.html#ae603fa6ecfb63c93b61272b7d1b8fb4d">Bytes</a>;</div>
+<div class="line"><a id="l00581" name="l00581"></a><span class="lineno"><a class="line" href="structjs_stream_state.html#a55bb6719163acef7fdb6d0bc3ae8d5da">  581</a></span>        uint64_t                <a class="code hl_variable" href="structjs_stream_state.html#a55bb6719163acef7fdb6d0bc3ae8d5da">FirstSeq</a>;</div>
+<div class="line"><a id="l00582" name="l00582"></a><span class="lineno"><a class="line" href="structjs_stream_state.html#afb7a708022faff518c060b33e99b04b0">  582</a></span>        int64_t                 <a class="code hl_variable" href="structjs_stream_state.html#afb7a708022faff518c060b33e99b04b0">FirstTime</a>;      </div>
+<div class="line"><a id="l00583" name="l00583"></a><span class="lineno"><a class="line" href="structjs_stream_state.html#a22da809fe7a1ec3101841e86d6708827">  583</a></span>        uint64_t                <a class="code hl_variable" href="structjs_stream_state.html#a22da809fe7a1ec3101841e86d6708827">LastSeq</a>;</div>
+<div class="line"><a id="l00584" name="l00584"></a><span class="lineno"><a class="line" href="structjs_stream_state.html#a67cbd0d8b43d8c05c8b4cd6b0e44dab0">  584</a></span>        int64_t                 <a class="code hl_variable" href="structjs_stream_state.html#a67cbd0d8b43d8c05c8b4cd6b0e44dab0">LastTime</a>;       </div>
+<div class="line"><a id="l00585" name="l00585"></a><span class="lineno"><a class="line" href="structjs_stream_state.html#aaa43db17641826e7c6ecc1954f641960">  585</a></span>        int64_t                 <a class="code hl_variable" href="structjs_stream_state.html#aaa43db17641826e7c6ecc1954f641960">NumSubjects</a>;</div>
+<div class="line"><a id="l00586" name="l00586"></a><span class="lineno"><a class="line" href="structjs_stream_state.html#a4af56e8bee7262ab050f2a25114c5909">  586</a></span>        <a class="code hl_struct" href="structjs_stream_state_subjects.html">jsStreamStateSubjects</a>   *<a class="code hl_variable" href="structjs_stream_state.html#a4af56e8bee7262ab050f2a25114c5909">Subjects</a>;</div>
+<div class="line"><a id="l00587" name="l00587"></a><span class="lineno"><a class="line" href="structjs_stream_state.html#acbec2f01830b56cb4c0bf54ae5170e51">  587</a></span>        uint64_t                <a class="code hl_variable" href="structjs_stream_state.html#acbec2f01830b56cb4c0bf54ae5170e51">NumDeleted</a>;</div>
+<div class="line"><a id="l00588" name="l00588"></a><span class="lineno"><a class="line" href="structjs_stream_state.html#abcf4d3c581c06d820f1ad21d640bef3f">  588</a></span>        uint64_t                *<a class="code hl_variable" href="structjs_stream_state.html#abcf4d3c581c06d820f1ad21d640bef3f">Deleted</a>;</div>
+<div class="line"><a id="l00589" name="l00589"></a><span class="lineno"><a class="line" href="structjs_stream_state.html#a34a08a64c97269165630bf2e0c78c2c0">  589</a></span>        <span class="keywordtype">int</span>                     <a class="code hl_variable" href="structjs_stream_state.html#a34a08a64c97269165630bf2e0c78c2c0">DeletedLen</a>;</div>
+<div class="line"><a id="l00590" name="l00590"></a><span class="lineno"><a class="line" href="structjs_stream_state.html#a1adf8991f31fc4db9d6907a0316f8eec">  590</a></span>        <a class="code hl_struct" href="structjs_lost_stream_data.html">jsLostStreamData</a>        *<a class="code hl_variable" href="structjs_stream_state.html#a1adf8991f31fc4db9d6907a0316f8eec">Lost</a>;</div>
+<div class="line"><a id="l00591" name="l00591"></a><span class="lineno"><a class="line" href="structjs_stream_state.html#a27f4cfb85c0f1b0c5c7ad5275bd25d85">  591</a></span>        int64_t                 <a class="code hl_variable" href="structjs_stream_state.html#a27f4cfb85c0f1b0c5c7ad5275bd25d85">Consumers</a>;</div>
+<div class="line"><a id="l00592" name="l00592"></a><span class="lineno">  592</span> </div>
+<div class="line"><a id="l00593" name="l00593"></a><span class="lineno"><a class="line" href="group__types_group.html#ga2bfd6de6ffc84d767482b3dd57cb9271">  593</a></span>} <a class="code hl_struct" href="structjs_stream_state.html">jsStreamState</a>;</div>
+<div class="line"><a id="l00594" name="l00594"></a><span class="lineno">  594</span> </div>
+<div class="line"><a id="l00599" name="l00599"></a><span class="lineno"><a class="line" href="structjs_peer_info.html">  599</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structjs_peer_info.html">jsPeerInfo</a></div>
+<div class="line"><a id="l00600" name="l00600"></a><span class="lineno">  600</span>{</div>
+<div class="line"><a id="l00601" name="l00601"></a><span class="lineno"><a class="line" href="structjs_peer_info.html#abf29230ce03a1c14d50227663e07de6a">  601</a></span>        <span class="keywordtype">char</span>        *<a class="code hl_variable" href="structjs_peer_info.html#abf29230ce03a1c14d50227663e07de6a">Name</a>;</div>
+<div class="line"><a id="l00602" name="l00602"></a><span class="lineno"><a class="line" href="structjs_peer_info.html#ad8cecd039a8ad1c68daba89007b055d4">  602</a></span>        <span class="keywordtype">bool</span>        <a class="code hl_variable" href="structjs_peer_info.html#ad8cecd039a8ad1c68daba89007b055d4">Current</a>;</div>
+<div class="line"><a id="l00603" name="l00603"></a><span class="lineno"><a class="line" href="structjs_peer_info.html#a3f3e09c5996858ec5faca2dc7fa5224e">  603</a></span>        <span class="keywordtype">bool</span>        <a class="code hl_variable" href="structjs_peer_info.html#a3f3e09c5996858ec5faca2dc7fa5224e">Offline</a>;</div>
+<div class="line"><a id="l00604" name="l00604"></a><span class="lineno"><a class="line" href="structjs_peer_info.html#a8441d023932c388953197f7ea39402fe">  604</a></span>        int64_t     <a class="code hl_variable" href="structjs_peer_info.html#a8441d023932c388953197f7ea39402fe">Active</a>;</div>
+<div class="line"><a id="l00605" name="l00605"></a><span class="lineno"><a class="line" href="structjs_peer_info.html#a49a2623963dad653a6d7996c750056c9">  605</a></span>        uint64_t    <a class="code hl_variable" href="structjs_peer_info.html#a49a2623963dad653a6d7996c750056c9">Lag</a>;</div>
+<div class="line"><a id="l00606" name="l00606"></a><span class="lineno">  606</span> </div>
+<div class="line"><a id="l00607" name="l00607"></a><span class="lineno"><a class="line" href="group__types_group.html#ga1e938dab794089f9329d7b7ece8f3e9b">  607</a></span>} <a class="code hl_struct" href="structjs_peer_info.html">jsPeerInfo</a>;</div>
+<div class="line"><a id="l00608" name="l00608"></a><span class="lineno">  608</span> </div>
+<div class="line"><a id="l00613" name="l00613"></a><span class="lineno"><a class="line" href="structjs_cluster_info.html">  613</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structjs_cluster_info.html">jsClusterInfo</a></div>
+<div class="line"><a id="l00614" name="l00614"></a><span class="lineno">  614</span>{</div>
+<div class="line"><a id="l00615" name="l00615"></a><span class="lineno"><a class="line" href="structjs_cluster_info.html#a2e13d7ec417574100c938c4df78e5484">  615</a></span>        <span class="keywordtype">char</span>            *<a class="code hl_variable" href="structjs_cluster_info.html#a2e13d7ec417574100c938c4df78e5484">Name</a>;</div>
+<div class="line"><a id="l00616" name="l00616"></a><span class="lineno"><a class="line" href="structjs_cluster_info.html#af7d85652b52f56fa1eedce8f45fe6a19">  616</a></span>        <span class="keywordtype">char</span>            *<a class="code hl_variable" href="structjs_cluster_info.html#af7d85652b52f56fa1eedce8f45fe6a19">Leader</a>;</div>
+<div class="line"><a id="l00617" name="l00617"></a><span class="lineno"><a class="line" href="structjs_cluster_info.html#a8dfcae3bc348a5b595b509e3f3d3500b">  617</a></span>        <a class="code hl_struct" href="structjs_peer_info.html">jsPeerInfo</a>      **<a class="code hl_variable" href="structjs_cluster_info.html#a8dfcae3bc348a5b595b509e3f3d3500b">Replicas</a>;</div>
+<div class="line"><a id="l00618" name="l00618"></a><span class="lineno"><a class="line" href="structjs_cluster_info.html#a237a639579def1345e02f1490a510ed5">  618</a></span>        <span class="keywordtype">int</span>             <a class="code hl_variable" href="structjs_cluster_info.html#a237a639579def1345e02f1490a510ed5">ReplicasLen</a>;</div>
+<div class="line"><a id="l00619" name="l00619"></a><span class="lineno">  619</span> </div>
+<div class="line"><a id="l00620" name="l00620"></a><span class="lineno"><a class="line" href="group__types_group.html#gaaf92318ce94a1ae3547c9a7af5a3f4f6">  620</a></span>} <a class="code hl_struct" href="structjs_cluster_info.html">jsClusterInfo</a>;</div>
+<div class="line"><a id="l00621" name="l00621"></a><span class="lineno">  621</span> </div>
+<div class="line"><a id="l00625" name="l00625"></a><span class="lineno"><a class="line" href="structjs_stream_source_info.html">  625</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structjs_stream_source_info.html">jsStreamSourceInfo</a></div>
+<div class="line"><a id="l00626" name="l00626"></a><span class="lineno">  626</span>{</div>
+<div class="line"><a id="l00627" name="l00627"></a><span class="lineno"><a class="line" href="structjs_stream_source_info.html#a6db3c6ff8a465a45f8bd5c7bdf5f6c04">  627</a></span>        <span class="keywordtype">char</span>                    *<a class="code hl_variable" href="structjs_stream_source_info.html#a6db3c6ff8a465a45f8bd5c7bdf5f6c04">Name</a>;</div>
+<div class="line"><a id="l00628" name="l00628"></a><span class="lineno"><a class="line" href="structjs_stream_source_info.html#a7eb19dd2637079fd1e970a2b38d33e05">  628</a></span>        <a class="code hl_struct" href="structjs_external_stream.html">jsExternalStream</a>        *<a class="code hl_variable" href="structjs_stream_source_info.html#a7eb19dd2637079fd1e970a2b38d33e05">External</a>;</div>
+<div class="line"><a id="l00629" name="l00629"></a><span class="lineno"><a class="line" href="structjs_stream_source_info.html#ab2ee0ca3ecd98c2df6d4e9bd88686863">  629</a></span>        uint64_t                <a class="code hl_variable" href="structjs_stream_source_info.html#ab2ee0ca3ecd98c2df6d4e9bd88686863">Lag</a>;</div>
+<div class="line"><a id="l00630" name="l00630"></a><span class="lineno"><a class="line" href="structjs_stream_source_info.html#a28b8cc0a9d487672955d3a3fa03de247">  630</a></span>        int64_t                 <a class="code hl_variable" href="structjs_stream_source_info.html#a28b8cc0a9d487672955d3a3fa03de247">Active</a>;</div>
+<div class="line"><a id="l00631" name="l00631"></a><span class="lineno">  631</span> </div>
+<div class="line"><a id="l00632" name="l00632"></a><span class="lineno"><a class="line" href="group__types_group.html#gab2f33f57188a550f2f747d4f27bc24bd">  632</a></span>} <a class="code hl_struct" href="structjs_stream_source_info.html">jsStreamSourceInfo</a>;</div>
+<div class="line"><a id="l00633" name="l00633"></a><span class="lineno">  633</span> </div>
+<div class="line"><a id="l00640" name="l00640"></a><span class="lineno"><a class="line" href="structjs_stream_info.html">  640</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structjs_stream_info.html">jsStreamInfo</a></div>
+<div class="line"><a id="l00641" name="l00641"></a><span class="lineno">  641</span>{</div>
+<div class="line"><a id="l00642" name="l00642"></a><span class="lineno"><a class="line" href="structjs_stream_info.html#adcc402d28e0ee443419e9b549da233c6">  642</a></span>        <a class="code hl_struct" href="structjs_stream_config.html">jsStreamConfig</a>          *<a class="code hl_variable" href="structjs_stream_info.html#adcc402d28e0ee443419e9b549da233c6">Config</a>;</div>
+<div class="line"><a id="l00643" name="l00643"></a><span class="lineno"><a class="line" href="structjs_stream_info.html#a578ce52a275c690dd4627c1d119c7838">  643</a></span>        int64_t                 <a class="code hl_variable" href="structjs_stream_info.html#a578ce52a275c690dd4627c1d119c7838">Created</a>;        </div>
+<div class="line"><a id="l00644" name="l00644"></a><span class="lineno"><a class="line" href="structjs_stream_info.html#a766ac56dec3bd19fa5b9861fb5f64397">  644</a></span>        <a class="code hl_struct" href="structjs_stream_state.html">jsStreamState</a>           <a class="code hl_variable" href="structjs_stream_info.html#a766ac56dec3bd19fa5b9861fb5f64397">State</a>;</div>
+<div class="line"><a id="l00645" name="l00645"></a><span class="lineno"><a class="line" href="structjs_stream_info.html#a8d10d6fdc3f713ac726c72cae06a209a">  645</a></span>        <a class="code hl_struct" href="structjs_cluster_info.html">jsClusterInfo</a>           *<a class="code hl_variable" href="structjs_stream_info.html#a8d10d6fdc3f713ac726c72cae06a209a">Cluster</a>;</div>
+<div class="line"><a id="l00646" name="l00646"></a><span class="lineno"><a class="line" href="structjs_stream_info.html#ab71aae7e4f6c62e2a09a3a52c9e4fa2a">  646</a></span>        <a class="code hl_struct" href="structjs_stream_source_info.html">jsStreamSourceInfo</a>      *<a class="code hl_variable" href="structjs_stream_info.html#ab71aae7e4f6c62e2a09a3a52c9e4fa2a">Mirror</a>;</div>
+<div class="line"><a id="l00647" name="l00647"></a><span class="lineno"><a class="line" href="structjs_stream_info.html#a2e7ca48a93fe57265609e7e0cd3fa386">  647</a></span>        <a class="code hl_struct" href="structjs_stream_source_info.html">jsStreamSourceInfo</a>      **<a class="code hl_variable" href="structjs_stream_info.html#a2e7ca48a93fe57265609e7e0cd3fa386">Sources</a>;</div>
+<div class="line"><a id="l00648" name="l00648"></a><span class="lineno"><a class="line" href="structjs_stream_info.html#af14110cb1f8e16e3dade8d9f7c2fd672">  648</a></span>        <span class="keywordtype">int</span>                     <a class="code hl_variable" href="structjs_stream_info.html#af14110cb1f8e16e3dade8d9f7c2fd672">SourcesLen</a>;</div>
+<div class="line"><a id="l00649" name="l00649"></a><span class="lineno">  649</span> </div>
+<div class="line"><a id="l00650" name="l00650"></a><span class="lineno"><a class="line" href="group__types_group.html#ga2629c9454996edf7914be36a9e44921b">  650</a></span>} <a class="code hl_struct" href="structjs_stream_info.html">jsStreamInfo</a>;</div>
+<div class="line"><a id="l00651" name="l00651"></a><span class="lineno">  651</span> </div>
+<div class="line"><a id="l00659" name="l00659"></a><span class="lineno"><a class="line" href="structjs_stream_info_list.html">  659</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structjs_stream_info_list.html">jsStreamInfoList</a></div>
+<div class="line"><a id="l00660" name="l00660"></a><span class="lineno">  660</span>{</div>
+<div class="line"><a id="l00661" name="l00661"></a><span class="lineno"><a class="line" href="structjs_stream_info_list.html#a7b096ee7a25363f231f56419a244daef">  661</a></span>        <a class="code hl_struct" href="structjs_stream_info.html">jsStreamInfo</a>    **<a class="code hl_variable" href="structjs_stream_info_list.html#a7b096ee7a25363f231f56419a244daef">List</a>;</div>
+<div class="line"><a id="l00662" name="l00662"></a><span class="lineno"><a class="line" href="structjs_stream_info_list.html#a8bc8490af12bb4f7a245605aecde62c2">  662</a></span>        <span class="keywordtype">int</span>             <a class="code hl_variable" href="structjs_stream_info_list.html#a8bc8490af12bb4f7a245605aecde62c2">Count</a>;</div>
+<div class="line"><a id="l00663" name="l00663"></a><span class="lineno">  663</span> </div>
+<div class="line"><a id="l00664" name="l00664"></a><span class="lineno"><a class="line" href="group__types_group.html#ga1e54c2a1bc94834d1670875fc151f565">  664</a></span>} <a class="code hl_struct" href="structjs_stream_info_list.html">jsStreamInfoList</a>;</div>
+<div class="line"><a id="l00665" name="l00665"></a><span class="lineno">  665</span> </div>
+<div class="line"><a id="l00673" name="l00673"></a><span class="lineno"><a class="line" href="structjs_stream_names_list.html">  673</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structjs_stream_names_list.html">jsStreamNamesList</a></div>
+<div class="line"><a id="l00674" name="l00674"></a><span class="lineno">  674</span>{</div>
+<div class="line"><a id="l00675" name="l00675"></a><span class="lineno"><a class="line" href="structjs_stream_names_list.html#a1875a7e449759dfc2a40b0eb74de0acf">  675</a></span>        <span class="keywordtype">char</span>    **<a class="code hl_variable" href="structjs_stream_names_list.html#a1875a7e449759dfc2a40b0eb74de0acf">List</a>;</div>
+<div class="line"><a id="l00676" name="l00676"></a><span class="lineno"><a class="line" href="structjs_stream_names_list.html#ab1385b6333537306d0462946c26cde4f">  676</a></span>        <span class="keywordtype">int</span>     <a class="code hl_variable" href="structjs_stream_names_list.html#ab1385b6333537306d0462946c26cde4f">Count</a>;</div>
+<div class="line"><a id="l00677" name="l00677"></a><span class="lineno">  677</span> </div>
+<div class="line"><a id="l00678" name="l00678"></a><span class="lineno"><a class="line" href="group__types_group.html#gaf4d31a4dc83b2805422beafb1f8fa000">  678</a></span>} <a class="code hl_struct" href="structjs_stream_names_list.html">jsStreamNamesList</a>;</div>
+<div class="line"><a id="l00679" name="l00679"></a><span class="lineno">  679</span> </div>
+<div class="line"><a id="l00716" name="l00716"></a><span class="lineno"><a class="line" href="structjs_consumer_config.html">  716</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structjs_consumer_config.html">jsConsumerConfig</a></div>
+<div class="line"><a id="l00717" name="l00717"></a><span class="lineno">  717</span>{</div>
+<div class="line"><a id="l00718" name="l00718"></a><span class="lineno"><a class="line" href="structjs_consumer_config.html#a201217d93cfed17eb4d3e2d9579b826a">  718</a></span>        <span class="keyword">const</span> <span class="keywordtype">char</span>              *<a class="code hl_variable" href="structjs_consumer_config.html#a201217d93cfed17eb4d3e2d9579b826a">Name</a>;</div>
+<div class="line"><a id="l00719" name="l00719"></a><span class="lineno"><a class="line" href="structjs_consumer_config.html#a36cf121162cf0b40edf051991d851ee0">  719</a></span>        <span class="keyword">const</span> <span class="keywordtype">char</span>              *<a class="code hl_variable" href="structjs_consumer_config.html#a36cf121162cf0b40edf051991d851ee0">Durable</a>;</div>
+<div class="line"><a id="l00720" name="l00720"></a><span class="lineno"><a class="line" href="structjs_consumer_config.html#a36a14d666d99bdade87a5e21a25491d6">  720</a></span>        <span class="keyword">const</span> <span class="keywordtype">char</span>              *<a class="code hl_variable" href="structjs_consumer_config.html#a36a14d666d99bdade87a5e21a25491d6">Description</a>;</div>
+<div class="line"><a id="l00721" name="l00721"></a><span class="lineno"><a class="line" href="structjs_consumer_config.html#a364127e68bf0d3bf13efdc0b416667f4">  721</a></span>        <a class="code hl_enumeration" href="group__types_group.html#ga117ed2c35f89ef3144540ed9cbadc818">jsDeliverPolicy</a>         <a class="code hl_variable" href="structjs_consumer_config.html#a364127e68bf0d3bf13efdc0b416667f4">DeliverPolicy</a>;</div>
+<div class="line"><a id="l00722" name="l00722"></a><span class="lineno"><a class="line" href="structjs_consumer_config.html#a2f0243899885dc97f304f48ca52b5356">  722</a></span>        uint64_t                <a class="code hl_variable" href="structjs_consumer_config.html#a2f0243899885dc97f304f48ca52b5356">OptStartSeq</a>;</div>
+<div class="line"><a id="l00723" name="l00723"></a><span class="lineno"><a class="line" href="structjs_consumer_config.html#a802ea3bf0669395bee28611f4ecede80">  723</a></span>        int64_t                 <a class="code hl_variable" href="structjs_consumer_config.html#a802ea3bf0669395bee28611f4ecede80">OptStartTime</a>;           </div>
+<div class="line"><a id="l00724" name="l00724"></a><span class="lineno"><a class="line" href="structjs_consumer_config.html#a8a311af614dfae1b0f4e4af7db467aab">  724</a></span>        <a class="code hl_enumeration" href="group__types_group.html#ga8fcb50e6e7312834791f9e237d28e873">jsAckPolicy</a>             <a class="code hl_variable" href="structjs_consumer_config.html#a8a311af614dfae1b0f4e4af7db467aab">AckPolicy</a>;</div>
+<div class="line"><a id="l00725" name="l00725"></a><span class="lineno"><a class="line" href="structjs_consumer_config.html#a651a94b9b78668dde830dc7869610e67">  725</a></span>        int64_t                 <a class="code hl_variable" href="structjs_consumer_config.html#a651a94b9b78668dde830dc7869610e67">AckWait</a>;</div>
+<div class="line"><a id="l00726" name="l00726"></a><span class="lineno"><a class="line" href="structjs_consumer_config.html#ad47e15e1d6a4a8b0b155f9d3d5873c95">  726</a></span>        int64_t                 <a class="code hl_variable" href="structjs_consumer_config.html#ad47e15e1d6a4a8b0b155f9d3d5873c95">MaxDeliver</a>;</div>
+<div class="line"><a id="l00727" name="l00727"></a><span class="lineno"><a class="line" href="structjs_consumer_config.html#aa2d0aff64a2c46122d0f0fe89e8ae011">  727</a></span>        int64_t                 *<a class="code hl_variable" href="structjs_consumer_config.html#aa2d0aff64a2c46122d0f0fe89e8ae011">BackOff</a>;               </div>
+<div class="line"><a id="l00728" name="l00728"></a><span class="lineno"><a class="line" href="structjs_consumer_config.html#ad2f6ca3f2d0f977aedb8687c462c1cfc">  728</a></span>        <span class="keywordtype">int</span>                     <a class="code hl_variable" href="structjs_consumer_config.html#ad2f6ca3f2d0f977aedb8687c462c1cfc">BackOffLen</a>;</div>
+<div class="line"><a id="l00729" name="l00729"></a><span class="lineno"><a class="line" href="structjs_consumer_config.html#af56ab7708b11e85e0b9115d152d281ca">  729</a></span>        <span class="keyword">const</span> <span class="keywordtype">char</span>              *<a class="code hl_variable" href="structjs_consumer_config.html#af56ab7708b11e85e0b9115d152d281ca">FilterSubject</a>;</div>
+<div class="line"><a id="l00730" name="l00730"></a><span class="lineno"><a class="line" href="structjs_consumer_config.html#ade510daf7c5d67553d2cd20b64ab9939">  730</a></span>        <a class="code hl_enumeration" href="group__types_group.html#ga8650faf52b0b6b23df376eebeb9d0354">jsReplayPolicy</a>          <a class="code hl_variable" href="structjs_consumer_config.html#ade510daf7c5d67553d2cd20b64ab9939">ReplayPolicy</a>;</div>
+<div class="line"><a id="l00731" name="l00731"></a><span class="lineno"><a class="line" href="structjs_consumer_config.html#a351b388a36ccb7978e6e85a6f4fc0816">  731</a></span>        uint64_t                <a class="code hl_variable" href="structjs_consumer_config.html#a351b388a36ccb7978e6e85a6f4fc0816">RateLimit</a>;</div>
+<div class="line"><a id="l00732" name="l00732"></a><span class="lineno"><a class="line" href="structjs_consumer_config.html#a43f40b8eef0074b4146fb945b4645584">  732</a></span>        <span class="keyword">const</span> <span class="keywordtype">char</span>              *<a class="code hl_variable" href="structjs_consumer_config.html#a43f40b8eef0074b4146fb945b4645584">SampleFrequency</a>;</div>
+<div class="line"><a id="l00733" name="l00733"></a><span class="lineno"><a class="line" href="structjs_consumer_config.html#a8472d49fae908ab0291b4d62c8411b76">  733</a></span>        int64_t                 <a class="code hl_variable" href="structjs_consumer_config.html#a8472d49fae908ab0291b4d62c8411b76">MaxWaiting</a>;</div>
+<div class="line"><a id="l00734" name="l00734"></a><span class="lineno"><a class="line" href="structjs_consumer_config.html#aeb2336d480e3885385d1b08410e89892">  734</a></span>        int64_t                 <a class="code hl_variable" href="structjs_consumer_config.html#aeb2336d480e3885385d1b08410e89892">MaxAckPending</a>;</div>
+<div class="line"><a id="l00735" name="l00735"></a><span class="lineno"><a class="line" href="structjs_consumer_config.html#a484c64b6c54f6f758f54315470ed20d0">  735</a></span>        <span class="keywordtype">bool</span>                    <a class="code hl_variable" href="structjs_consumer_config.html#a484c64b6c54f6f758f54315470ed20d0">FlowControl</a>;</div>
+<div class="line"><a id="l00736" name="l00736"></a><span class="lineno"><a class="line" href="structjs_consumer_config.html#ac439828c3bedb8826a1e92de13280d53">  736</a></span>        int64_t                 <a class="code hl_variable" href="structjs_consumer_config.html#ac439828c3bedb8826a1e92de13280d53">Heartbeat</a>;              </div>
+<div class="line"><a id="l00737" name="l00737"></a><span class="lineno"><a class="line" href="structjs_consumer_config.html#a30d4142bac47ab6dc583c5ee193704e6">  737</a></span>        <span class="keywordtype">bool</span>                    <a class="code hl_variable" href="structjs_consumer_config.html#a30d4142bac47ab6dc583c5ee193704e6">HeadersOnly</a>;</div>
+<div class="line"><a id="l00738" name="l00738"></a><span class="lineno">  738</span> </div>
+<div class="line"><a id="l00739" name="l00739"></a><span class="lineno">  739</span>        <span class="comment">// Pull based options.</span></div>
+<div class="line"><a id="l00740" name="l00740"></a><span class="lineno"><a class="line" href="structjs_consumer_config.html#a4e86deefe08854b9a82b4908397aad32">  740</a></span>        int64_t                 <a class="code hl_variable" href="structjs_consumer_config.html#a4e86deefe08854b9a82b4908397aad32">MaxRequestBatch</a>;        </div>
+<div class="line"><a id="l00741" name="l00741"></a><span class="lineno"><a class="line" href="structjs_consumer_config.html#aa71aa3dfe5826466be301097b1bae04d">  741</a></span>        int64_t                 <a class="code hl_variable" href="structjs_consumer_config.html#aa71aa3dfe5826466be301097b1bae04d">MaxRequestExpires</a>;      </div>
+<div class="line"><a id="l00742" name="l00742"></a><span class="lineno"><a class="line" href="structjs_consumer_config.html#a74a026cdd92c538bcf84297f4468bb21">  742</a></span>        int64_t                 <a class="code hl_variable" href="structjs_consumer_config.html#a74a026cdd92c538bcf84297f4468bb21">MaxRequestMaxBytes</a>;     </div>
+<div class="line"><a id="l00743" name="l00743"></a><span class="lineno">  743</span> </div>
+<div class="line"><a id="l00744" name="l00744"></a><span class="lineno">  744</span>        <span class="comment">// Push based options.</span></div>
+<div class="line"><a id="l00745" name="l00745"></a><span class="lineno"><a class="line" href="structjs_consumer_config.html#a95aa4184ed77f69b7674756572da1ded">  745</a></span>        <span class="keyword">const</span> <span class="keywordtype">char</span>              *<a class="code hl_variable" href="structjs_consumer_config.html#a95aa4184ed77f69b7674756572da1ded">DeliverSubject</a>;</div>
+<div class="line"><a id="l00746" name="l00746"></a><span class="lineno"><a class="line" href="structjs_consumer_config.html#ae0765f3b5effe365187d3cf809c6ed3c">  746</a></span>        <span class="keyword">const</span> <span class="keywordtype">char</span>              *<a class="code hl_variable" href="structjs_consumer_config.html#ae0765f3b5effe365187d3cf809c6ed3c">DeliverGroup</a>;</div>
+<div class="line"><a id="l00747" name="l00747"></a><span class="lineno">  747</span> </div>
+<div class="line"><a id="l00748" name="l00748"></a><span class="lineno">  748</span>        <span class="comment">// Ephemeral inactivity threshold.</span></div>
+<div class="line"><a id="l00749" name="l00749"></a><span class="lineno"><a class="line" href="structjs_consumer_config.html#af6376a6009124c25d7016bc548f3855d">  749</a></span>        int64_t                 <a class="code hl_variable" href="structjs_consumer_config.html#af6376a6009124c25d7016bc548f3855d">InactiveThreshold</a>;      </div>
+<div class="line"><a id="l00750" name="l00750"></a><span class="lineno">  750</span> </div>
+<div class="line"><a id="l00751" name="l00751"></a><span class="lineno">  751</span>        <span class="comment">// Generally inherited by parent stream and other markers, now can be configured directly.</span></div>
+<div class="line"><a id="l00752" name="l00752"></a><span class="lineno"><a class="line" href="structjs_consumer_config.html#acfba6d6ecb6323fd8ffe6c0bb4fbffae">  752</a></span>        int64_t                 <a class="code hl_variable" href="structjs_consumer_config.html#acfba6d6ecb6323fd8ffe6c0bb4fbffae">Replicas</a>;</div>
+<div class="line"><a id="l00753" name="l00753"></a><span class="lineno">  753</span>        <span class="comment">// Force memory storage.</span></div>
+<div class="line"><a id="l00754" name="l00754"></a><span class="lineno"><a class="line" href="structjs_consumer_config.html#a046177256938d6a601c629f9fd82f888">  754</a></span>        <span class="keywordtype">bool</span>                    <a class="code hl_variable" href="structjs_consumer_config.html#a046177256938d6a601c629f9fd82f888">MemoryStorage</a>;</div>
+<div class="line"><a id="l00755" name="l00755"></a><span class="lineno">  755</span> </div>
+<div class="line"><a id="l00756" name="l00756"></a><span class="lineno"><a class="line" href="group__types_group.html#ga0483b2197c0ddd9082b48c2dd3fe7cee">  756</a></span>} <a class="code hl_struct" href="structjs_consumer_config.html">jsConsumerConfig</a>;</div>
+<div class="line"><a id="l00757" name="l00757"></a><span class="lineno">  757</span> </div>
+<div class="line"><a id="l00775" name="l00775"></a><span class="lineno"><a class="line" href="structjs_consumer_sequence_mismatch.html">  775</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structjs_consumer_sequence_mismatch.html">jsConsumerSequenceMismatch</a></div>
+<div class="line"><a id="l00776" name="l00776"></a><span class="lineno">  776</span>{</div>
+<div class="line"><a id="l00777" name="l00777"></a><span class="lineno"><a class="line" href="structjs_consumer_sequence_mismatch.html#aad6a17af1719c023c38a6fd254b73f8e">  777</a></span>        uint64_t        <a class="code hl_variable" href="structjs_consumer_sequence_mismatch.html#aad6a17af1719c023c38a6fd254b73f8e">Stream</a>;         </div>
+<div class="line"><a id="l00778" name="l00778"></a><span class="lineno"><a class="line" href="structjs_consumer_sequence_mismatch.html#adb383429dadb1ab0e1f7d013bc546a28">  778</a></span>        uint64_t        <a class="code hl_variable" href="structjs_consumer_sequence_mismatch.html#adb383429dadb1ab0e1f7d013bc546a28">ConsumerClient</a>; </div>
+<div class="line"><a id="l00779" name="l00779"></a><span class="lineno"><a class="line" href="structjs_consumer_sequence_mismatch.html#ac1df353001d853c8a56cef9f82fb831c">  779</a></span>        uint64_t        <a class="code hl_variable" href="structjs_consumer_sequence_mismatch.html#ac1df353001d853c8a56cef9f82fb831c">ConsumerServer</a>; </div>
+<div class="line"><a id="l00780" name="l00780"></a><span class="lineno">  780</span> </div>
+<div class="line"><a id="l00781" name="l00781"></a><span class="lineno"><a class="line" href="group__types_group.html#gace471cd2cef1df797b2a1c6b485049bd">  781</a></span>} <a class="code hl_struct" href="structjs_consumer_sequence_mismatch.html">jsConsumerSequenceMismatch</a>;</div>
+<div class="line"><a id="l00782" name="l00782"></a><span class="lineno">  782</span> </div>
+<div class="line"><a id="l00798" name="l00798"></a><span class="lineno"><a class="line" href="structjs_sub_options.html">  798</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structjs_sub_options.html">jsSubOptions</a></div>
+<div class="line"><a id="l00799" name="l00799"></a><span class="lineno">  799</span>{</div>
+<div class="line"><a id="l00806" name="l00806"></a><span class="lineno"><a class="line" href="structjs_sub_options.html#a856a6af4a7ff5aa2e736338091e69484">  806</a></span>        <span class="keyword">const</span> <span class="keywordtype">char</span>              *<a class="code hl_variable" href="structjs_sub_options.html#a856a6af4a7ff5aa2e736338091e69484">Stream</a>;        </div>
+<div class="line"><a id="l00816" name="l00816"></a><span class="lineno"><a class="line" href="structjs_sub_options.html#a7aa5b8439ed288b858943f28c291cb36">  816</a></span>        <span class="keyword">const</span> <span class="keywordtype">char</span>              *<a class="code hl_variable" href="structjs_sub_options.html#a7aa5b8439ed288b858943f28c291cb36">Consumer</a>;      </div>
+<div class="line"><a id="l00831" name="l00831"></a><span class="lineno"><a class="line" href="structjs_sub_options.html#aaf4b620d112a31f51a20389c5405805d">  831</a></span>        <span class="keyword">const</span> <span class="keywordtype">char</span>              *<a class="code hl_variable" href="structjs_sub_options.html#aaf4b620d112a31f51a20389c5405805d">Queue</a>;         </div>
+<div class="line"><a id="l00844" name="l00844"></a><span class="lineno"><a class="line" href="structjs_sub_options.html#a21a905c49dfab61729d8674702d196b2">  844</a></span>        <span class="keywordtype">bool</span>                    <a class="code hl_variable" href="structjs_sub_options.html#a21a905c49dfab61729d8674702d196b2">ManualAck</a>;      </div>
+<div class="line"><a id="l00849" name="l00849"></a><span class="lineno"><a class="line" href="structjs_sub_options.html#acab25d71a2efe26bb3b084071435c2b5">  849</a></span>        <a class="code hl_struct" href="structjs_consumer_config.html">jsConsumerConfig</a>        <a class="code hl_variable" href="structjs_sub_options.html#acab25d71a2efe26bb3b084071435c2b5">Config</a>;         </div>
+<div class="line"><a id="l00856" name="l00856"></a><span class="lineno"><a class="line" href="structjs_sub_options.html#a95c5d2db8ca97d644042d436de119be4">  856</a></span>        <span class="keywordtype">bool</span>                    <a class="code hl_variable" href="structjs_sub_options.html#a95c5d2db8ca97d644042d436de119be4">Ordered</a>;        </div>
+<div class="line"><a id="l00857" name="l00857"></a><span class="lineno">  857</span> </div>
+<div class="line"><a id="l00858" name="l00858"></a><span class="lineno"><a class="line" href="group__types_group.html#gaccfaac2079656ffd40d003e4de5d2280">  858</a></span>} <a class="code hl_struct" href="structjs_sub_options.html">jsSubOptions</a>;</div>
+<div class="line"><a id="l00859" name="l00859"></a><span class="lineno">  859</span> </div>
+<div class="line"><a id="l00863" name="l00863"></a><span class="lineno"><a class="line" href="structjs_sequence_pair.html">  863</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structjs_sequence_pair.html">jsSequencePair</a></div>
+<div class="line"><a id="l00864" name="l00864"></a><span class="lineno">  864</span>{</div>
+<div class="line"><a id="l00865" name="l00865"></a><span class="lineno"><a class="line" href="structjs_sequence_pair.html#a6d205effd29f8994f0028bfaf2e8d816">  865</a></span>        uint64_t        <a class="code hl_variable" href="structjs_sequence_pair.html#a6d205effd29f8994f0028bfaf2e8d816">Consumer</a>;</div>
+<div class="line"><a id="l00866" name="l00866"></a><span class="lineno"><a class="line" href="structjs_sequence_pair.html#ab051e0815302c48ba6122bd18d9d76f7">  866</a></span>        uint64_t        <a class="code hl_variable" href="structjs_sequence_pair.html#ab051e0815302c48ba6122bd18d9d76f7">Stream</a>;</div>
+<div class="line"><a id="l00867" name="l00867"></a><span class="lineno">  867</span> </div>
+<div class="line"><a id="l00868" name="l00868"></a><span class="lineno"><a class="line" href="group__types_group.html#ga39011d30b295759b7f6ca0a7539dff8f">  868</a></span>} <a class="code hl_struct" href="structjs_sequence_pair.html">jsSequencePair</a>;</div>
+<div class="line"><a id="l00869" name="l00869"></a><span class="lineno">  869</span> </div>
+<div class="line"><a id="l00873" name="l00873"></a><span class="lineno"><a class="line" href="structjs_sequence_info.html">  873</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structjs_sequence_info.html">jsSequenceInfo</a></div>
+<div class="line"><a id="l00874" name="l00874"></a><span class="lineno">  874</span>{</div>
+<div class="line"><a id="l00875" name="l00875"></a><span class="lineno"><a class="line" href="structjs_sequence_info.html#ae4416a5d766e07db207e563668edd06f">  875</a></span>        uint64_t        <a class="code hl_variable" href="structjs_sequence_info.html#ae4416a5d766e07db207e563668edd06f">Consumer</a>;</div>
+<div class="line"><a id="l00876" name="l00876"></a><span class="lineno"><a class="line" href="structjs_sequence_info.html#ab52c55c1d0edd20e064870b490b4b990">  876</a></span>        uint64_t        <a class="code hl_variable" href="structjs_sequence_info.html#ab52c55c1d0edd20e064870b490b4b990">Stream</a>;</div>
+<div class="line"><a id="l00877" name="l00877"></a><span class="lineno"><a class="line" href="structjs_sequence_info.html#a4e94c91650b7db253645515fee4c3b05">  877</a></span>        int64_t         <a class="code hl_variable" href="structjs_sequence_info.html#a4e94c91650b7db253645515fee4c3b05">Last</a>;           </div>
+<div class="line"><a id="l00878" name="l00878"></a><span class="lineno">  878</span> </div>
+<div class="line"><a id="l00879" name="l00879"></a><span class="lineno"><a class="line" href="group__types_group.html#ga27e1a5d5b513f9eb7d61a17db71f8003">  879</a></span>} <a class="code hl_struct" href="structjs_sequence_info.html">jsSequenceInfo</a>;</div>
+<div class="line"><a id="l00880" name="l00880"></a><span class="lineno">  880</span> </div>
+<div class="line"><a id="l00887" name="l00887"></a><span class="lineno"><a class="line" href="structjs_consumer_info.html">  887</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structjs_consumer_info.html">jsConsumerInfo</a></div>
+<div class="line"><a id="l00888" name="l00888"></a><span class="lineno">  888</span>{</div>
+<div class="line"><a id="l00889" name="l00889"></a><span class="lineno"><a class="line" href="structjs_consumer_info.html#a8f21939613163a7c0ebfb521aa471260">  889</a></span>        <span class="keywordtype">char</span>                    *<a class="code hl_variable" href="structjs_consumer_info.html#a8f21939613163a7c0ebfb521aa471260">Stream</a>;</div>
+<div class="line"><a id="l00890" name="l00890"></a><span class="lineno"><a class="line" href="structjs_consumer_info.html#a9359aea7cd05a27b2a15f8a35cdb1008">  890</a></span>        <span class="keywordtype">char</span>                    *<a class="code hl_variable" href="structjs_consumer_info.html#a9359aea7cd05a27b2a15f8a35cdb1008">Name</a>;</div>
+<div class="line"><a id="l00891" name="l00891"></a><span class="lineno"><a class="line" href="structjs_consumer_info.html#a670d38f2e9ba5c354ca3560a8064d00c">  891</a></span>        int64_t                 <a class="code hl_variable" href="structjs_consumer_info.html#a670d38f2e9ba5c354ca3560a8064d00c">Created</a>;                </div>
+<div class="line"><a id="l00892" name="l00892"></a><span class="lineno"><a class="line" href="structjs_consumer_info.html#a2f63940ca1f024ad3840418c2f6a1ae1">  892</a></span>        <a class="code hl_struct" href="structjs_consumer_config.html">jsConsumerConfig</a>        *<a class="code hl_variable" href="structjs_consumer_info.html#a2f63940ca1f024ad3840418c2f6a1ae1">Config</a>;</div>
+<div class="line"><a id="l00893" name="l00893"></a><span class="lineno"><a class="line" href="structjs_consumer_info.html#a15f2d68fbf126acc1907ba9462ad9ee9">  893</a></span>        <a class="code hl_struct" href="structjs_sequence_info.html">jsSequenceInfo</a>          <a class="code hl_variable" href="structjs_consumer_info.html#a15f2d68fbf126acc1907ba9462ad9ee9">Delivered</a>;</div>
+<div class="line"><a id="l00894" name="l00894"></a><span class="lineno"><a class="line" href="structjs_consumer_info.html#ab69c36ae092df9b0663b675a5abbab55">  894</a></span>        <a class="code hl_struct" href="structjs_sequence_info.html">jsSequenceInfo</a>          <a class="code hl_variable" href="structjs_consumer_info.html#ab69c36ae092df9b0663b675a5abbab55">AckFloor</a>;</div>
+<div class="line"><a id="l00895" name="l00895"></a><span class="lineno"><a class="line" href="structjs_consumer_info.html#a882bebeb7af80fcce088afdf2c98de50">  895</a></span>        int64_t                 <a class="code hl_variable" href="structjs_consumer_info.html#a882bebeb7af80fcce088afdf2c98de50">NumAckPending</a>;</div>
+<div class="line"><a id="l00896" name="l00896"></a><span class="lineno"><a class="line" href="structjs_consumer_info.html#a932bf14ebb9ce167af8975e3b1f8d001">  896</a></span>        int64_t                 <a class="code hl_variable" href="structjs_consumer_info.html#a932bf14ebb9ce167af8975e3b1f8d001">NumRedelivered</a>;</div>
+<div class="line"><a id="l00897" name="l00897"></a><span class="lineno"><a class="line" href="structjs_consumer_info.html#a57e4a4139310c50a1f3d51af67197af0">  897</a></span>        int64_t                 <a class="code hl_variable" href="structjs_consumer_info.html#a57e4a4139310c50a1f3d51af67197af0">NumWaiting</a>;</div>
+<div class="line"><a id="l00898" name="l00898"></a><span class="lineno"><a class="line" href="structjs_consumer_info.html#aeaefd5a500996013b1ce13d8872e869b">  898</a></span>        uint64_t                <a class="code hl_variable" href="structjs_consumer_info.html#aeaefd5a500996013b1ce13d8872e869b">NumPending</a>;</div>
+<div class="line"><a id="l00899" name="l00899"></a><span class="lineno"><a class="line" href="structjs_consumer_info.html#a6f4401563a9fd102226d82cdc6136e32">  899</a></span>        <a class="code hl_struct" href="structjs_cluster_info.html">jsClusterInfo</a>           *<a class="code hl_variable" href="structjs_consumer_info.html#a6f4401563a9fd102226d82cdc6136e32">Cluster</a>;</div>
+<div class="line"><a id="l00900" name="l00900"></a><span class="lineno"><a class="line" href="structjs_consumer_info.html#a31282cdc72000a91af03f89899740bfa">  900</a></span>        <span class="keywordtype">bool</span>                    <a class="code hl_variable" href="structjs_consumer_info.html#a31282cdc72000a91af03f89899740bfa">PushBound</a>;</div>
+<div class="line"><a id="l00901" name="l00901"></a><span class="lineno">  901</span> </div>
+<div class="line"><a id="l00902" name="l00902"></a><span class="lineno"><a class="line" href="group__types_group.html#ga2f21bb79884e56a5613d7fe76b11b1e5">  902</a></span>} <a class="code hl_struct" href="structjs_consumer_info.html">jsConsumerInfo</a>;</div>
+<div class="line"><a id="l00903" name="l00903"></a><span class="lineno">  903</span> </div>
+<div class="line"><a id="l00911" name="l00911"></a><span class="lineno"><a class="line" href="structjs_consumer_info_list.html">  911</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structjs_consumer_info_list.html">jsConsumerInfoList</a></div>
+<div class="line"><a id="l00912" name="l00912"></a><span class="lineno">  912</span>{</div>
+<div class="line"><a id="l00913" name="l00913"></a><span class="lineno"><a class="line" href="structjs_consumer_info_list.html#a75354882af5e11959b198a70bde14db8">  913</a></span>        <a class="code hl_struct" href="structjs_consumer_info.html">jsConsumerInfo</a>  **<a class="code hl_variable" href="structjs_consumer_info_list.html#a75354882af5e11959b198a70bde14db8">List</a>;</div>
+<div class="line"><a id="l00914" name="l00914"></a><span class="lineno"><a class="line" href="structjs_consumer_info_list.html#a813c908362a6426a929133f7c0d3395f">  914</a></span>        <span class="keywordtype">int</span>             <a class="code hl_variable" href="structjs_consumer_info_list.html#a813c908362a6426a929133f7c0d3395f">Count</a>;</div>
+<div class="line"><a id="l00915" name="l00915"></a><span class="lineno">  915</span> </div>
+<div class="line"><a id="l00916" name="l00916"></a><span class="lineno"><a class="line" href="group__types_group.html#gadad3bf72baae970662248d82d9b05d0a">  916</a></span>} <a class="code hl_struct" href="structjs_consumer_info_list.html">jsConsumerInfoList</a>;</div>
+<div class="line"><a id="l00917" name="l00917"></a><span class="lineno">  917</span> </div>
+<div class="line"><a id="l00925" name="l00925"></a><span class="lineno"><a class="line" href="structjs_consumer_names_list.html">  925</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structjs_consumer_names_list.html">jsConsumerNamesList</a></div>
+<div class="line"><a id="l00926" name="l00926"></a><span class="lineno">  926</span>{</div>
+<div class="line"><a id="l00927" name="l00927"></a><span class="lineno"><a class="line" href="structjs_consumer_names_list.html#aa4b3cf17902a2d580cc3a230bfa5d309">  927</a></span>        <span class="keywordtype">char</span>    **<a class="code hl_variable" href="structjs_consumer_names_list.html#aa4b3cf17902a2d580cc3a230bfa5d309">List</a>;</div>
+<div class="line"><a id="l00928" name="l00928"></a><span class="lineno"><a class="line" href="structjs_consumer_names_list.html#a0bccbad8ac5d335a0ed89970a58900fb">  928</a></span>        <span class="keywordtype">int</span>     <a class="code hl_variable" href="structjs_consumer_names_list.html#a0bccbad8ac5d335a0ed89970a58900fb">Count</a>;</div>
+<div class="line"><a id="l00929" name="l00929"></a><span class="lineno">  929</span> </div>
+<div class="line"><a id="l00930" name="l00930"></a><span class="lineno"><a class="line" href="group__types_group.html#gad00ab4381eec504ada3272aa9ff8adb2">  930</a></span>} <a class="code hl_struct" href="structjs_consumer_names_list.html">jsConsumerNamesList</a>;</div>
+<div class="line"><a id="l00931" name="l00931"></a><span class="lineno">  931</span> </div>
+<div class="line"><a id="l00935" name="l00935"></a><span class="lineno"><a class="line" href="structjs_a_p_i_stats.html">  935</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structjs_a_p_i_stats.html">jsAPIStats</a></div>
+<div class="line"><a id="l00936" name="l00936"></a><span class="lineno">  936</span>{</div>
+<div class="line"><a id="l00937" name="l00937"></a><span class="lineno"><a class="line" href="structjs_a_p_i_stats.html#a1545170bebb347d0ea1254f51c3027cf">  937</a></span>        uint64_t <a class="code hl_variable" href="structjs_a_p_i_stats.html#a1545170bebb347d0ea1254f51c3027cf">Total</a>;</div>
+<div class="line"><a id="l00938" name="l00938"></a><span class="lineno"><a class="line" href="structjs_a_p_i_stats.html#a84e85ad9d94dbe9afd1101388574255d">  938</a></span>        uint64_t <a class="code hl_variable" href="structjs_a_p_i_stats.html#a84e85ad9d94dbe9afd1101388574255d">Errors</a>;</div>
+<div class="line"><a id="l00939" name="l00939"></a><span class="lineno">  939</span> </div>
+<div class="line"><a id="l00940" name="l00940"></a><span class="lineno"><a class="line" href="group__types_group.html#gad057a0107367ce5727975f3daf63ff75">  940</a></span>} <a class="code hl_struct" href="structjs_a_p_i_stats.html">jsAPIStats</a>;</div>
+<div class="line"><a id="l00941" name="l00941"></a><span class="lineno">  941</span> </div>
+<div class="line"><a id="l00945" name="l00945"></a><span class="lineno"><a class="line" href="structjs_account_limits.html">  945</a></span><span class="keyword">typedef</span> <span class="keyword">struct  </span><a class="code hl_struct" href="structjs_account_limits.html">jsAccountLimits</a></div>
+<div class="line"><a id="l00946" name="l00946"></a><span class="lineno">  946</span>{</div>
+<div class="line"><a id="l00947" name="l00947"></a><span class="lineno"><a class="line" href="structjs_account_limits.html#a7bfc63e6f49ce724663ee534c5efdfa4">  947</a></span>        int64_t <a class="code hl_variable" href="structjs_account_limits.html#a7bfc63e6f49ce724663ee534c5efdfa4">MaxMemory</a>;</div>
+<div class="line"><a id="l00948" name="l00948"></a><span class="lineno"><a class="line" href="structjs_account_limits.html#a6fff014c46739410ecf298b0cf643b30">  948</a></span>        int64_t <a class="code hl_variable" href="structjs_account_limits.html#a6fff014c46739410ecf298b0cf643b30">MaxStore</a>;</div>
+<div class="line"><a id="l00949" name="l00949"></a><span class="lineno"><a class="line" href="structjs_account_limits.html#a4710a10950857a322c2a3ad6f946ded2">  949</a></span>        int64_t <a class="code hl_variable" href="structjs_account_limits.html#a4710a10950857a322c2a3ad6f946ded2">MaxStreams</a>;</div>
+<div class="line"><a id="l00950" name="l00950"></a><span class="lineno"><a class="line" href="structjs_account_limits.html#a6169f29101d51d48eed0803b719e6338">  950</a></span>        int64_t <a class="code hl_variable" href="structjs_account_limits.html#a6169f29101d51d48eed0803b719e6338">MaxConsumers</a>;</div>
+<div class="line"><a id="l00951" name="l00951"></a><span class="lineno"><a class="line" href="structjs_account_limits.html#a4abf1972690c20d73bd314f2059e8013">  951</a></span>        int64_t <a class="code hl_variable" href="structjs_account_limits.html#a4abf1972690c20d73bd314f2059e8013">MaxAckPending</a>;</div>
+<div class="line"><a id="l00952" name="l00952"></a><span class="lineno"><a class="line" href="structjs_account_limits.html#a38875d969274b0f0fcefc6b04ce56eb8">  952</a></span>        int64_t <a class="code hl_variable" href="structjs_account_limits.html#a38875d969274b0f0fcefc6b04ce56eb8">MemoryMaxStreamBytes</a>;</div>
+<div class="line"><a id="l00953" name="l00953"></a><span class="lineno"><a class="line" href="structjs_account_limits.html#a8cca06ab72b715c02a6a2c72b59f6a52">  953</a></span>        int64_t <a class="code hl_variable" href="structjs_account_limits.html#a8cca06ab72b715c02a6a2c72b59f6a52">StoreMaxStreamBytes</a>;</div>
+<div class="line"><a id="l00954" name="l00954"></a><span class="lineno"><a class="line" href="structjs_account_limits.html#a858edf99ee1c60354bdba4e59293fb6a">  954</a></span>        <span class="keywordtype">bool</span>    <a class="code hl_variable" href="structjs_account_limits.html#a858edf99ee1c60354bdba4e59293fb6a">MaxBytesRequired</a>;</div>
+<div class="line"><a id="l00955" name="l00955"></a><span class="lineno">  955</span> </div>
+<div class="line"><a id="l00956" name="l00956"></a><span class="lineno"><a class="line" href="group__types_group.html#gaa889f706cce285adb9cea8aba0b76866">  956</a></span>} <a class="code hl_struct" href="structjs_account_limits.html">jsAccountLimits</a>;</div>
+<div class="line"><a id="l00957" name="l00957"></a><span class="lineno">  957</span> </div>
+<div class="line"><a id="l00958" name="l00958"></a><span class="lineno"><a class="line" href="structjs_tier.html">  958</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structjs_tier.html">jsTier</a></div>
+<div class="line"><a id="l00959" name="l00959"></a><span class="lineno">  959</span>{</div>
+<div class="line"><a id="l00960" name="l00960"></a><span class="lineno"><a class="line" href="structjs_tier.html#a1ed542b9acccbe7761839f33c43053a6">  960</a></span>        <span class="keyword">const</span> <span class="keywordtype">char</span>              *<a class="code hl_variable" href="structjs_tier.html#a1ed542b9acccbe7761839f33c43053a6">Name</a>;</div>
+<div class="line"><a id="l00961" name="l00961"></a><span class="lineno"><a class="line" href="structjs_tier.html#aeff4a4cb86e10d8d7749d6ff69f97ed1">  961</a></span>        uint64_t                <a class="code hl_variable" href="structjs_tier.html#aeff4a4cb86e10d8d7749d6ff69f97ed1">Memory</a>;</div>
+<div class="line"><a id="l00962" name="l00962"></a><span class="lineno"><a class="line" href="structjs_tier.html#ab16c426e1c35d8c0fd6c460c43580a39">  962</a></span>        uint64_t                <a class="code hl_variable" href="structjs_tier.html#ab16c426e1c35d8c0fd6c460c43580a39">Store</a>;</div>
+<div class="line"><a id="l00963" name="l00963"></a><span class="lineno"><a class="line" href="structjs_tier.html#a3f9234fde387faf3775d841aa797a6ea">  963</a></span>        int64_t                 <a class="code hl_variable" href="structjs_tier.html#a3f9234fde387faf3775d841aa797a6ea">Streams</a>;</div>
+<div class="line"><a id="l00964" name="l00964"></a><span class="lineno"><a class="line" href="structjs_tier.html#ac33ce862c041572d10184e7fa0dd0bfe">  964</a></span>        int64_t                 <a class="code hl_variable" href="structjs_tier.html#ac33ce862c041572d10184e7fa0dd0bfe">Consumers</a>;</div>
+<div class="line"><a id="l00965" name="l00965"></a><span class="lineno"><a class="line" href="structjs_tier.html#af2edbabd5e078b1e31dd73d44fd507d3">  965</a></span>        <a class="code hl_struct" href="structjs_account_limits.html">jsAccountLimits</a>         <a class="code hl_variable" href="structjs_tier.html#af2edbabd5e078b1e31dd73d44fd507d3">Limits</a>;</div>
+<div class="line"><a id="l00966" name="l00966"></a><span class="lineno">  966</span> </div>
+<div class="line"><a id="l00967" name="l00967"></a><span class="lineno"><a class="line" href="group__types_group.html#ga1d48d3eb36b50c9ab6d8477dccf247d8">  967</a></span>} <a class="code hl_struct" href="structjs_tier.html">jsTier</a>;</div>
+<div class="line"><a id="l00968" name="l00968"></a><span class="lineno">  968</span> </div>
+<div class="line"><a id="l00972" name="l00972"></a><span class="lineno"><a class="line" href="structjs_account_info.html">  972</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structjs_account_info.html">jsAccountInfo</a></div>
+<div class="line"><a id="l00973" name="l00973"></a><span class="lineno">  973</span>{</div>
+<div class="line"><a id="l00974" name="l00974"></a><span class="lineno"><a class="line" href="structjs_account_info.html#a448578d621e878267ad5f1792002a665">  974</a></span>        uint64_t                <a class="code hl_variable" href="structjs_account_info.html#a448578d621e878267ad5f1792002a665">Memory</a>;</div>
+<div class="line"><a id="l00975" name="l00975"></a><span class="lineno"><a class="line" href="structjs_account_info.html#ad1c254c5b8f11f57062a4e2d5fb10ae3">  975</a></span>        uint64_t                <a class="code hl_variable" href="structjs_account_info.html#ad1c254c5b8f11f57062a4e2d5fb10ae3">Store</a>;</div>
+<div class="line"><a id="l00976" name="l00976"></a><span class="lineno"><a class="line" href="structjs_account_info.html#a17317abf03effdcdedc2003fca8adc71">  976</a></span>        int64_t                 <a class="code hl_variable" href="structjs_account_info.html#a17317abf03effdcdedc2003fca8adc71">Streams</a>;</div>
+<div class="line"><a id="l00977" name="l00977"></a><span class="lineno"><a class="line" href="structjs_account_info.html#a1237c3f19a42a3203825971b429312e9">  977</a></span>        int64_t                 <a class="code hl_variable" href="structjs_account_info.html#a1237c3f19a42a3203825971b429312e9">Consumers</a>;</div>
+<div class="line"><a id="l00978" name="l00978"></a><span class="lineno"><a class="line" href="structjs_account_info.html#ab6ba03298e1863132550b9b08d06048c">  978</a></span>        <span class="keywordtype">char</span>                    *<a class="code hl_variable" href="structjs_account_info.html#ab6ba03298e1863132550b9b08d06048c">Domain</a>;</div>
+<div class="line"><a id="l00979" name="l00979"></a><span class="lineno"><a class="line" href="structjs_account_info.html#a94ab71c69b7883c2731ae8741ddc1e94">  979</a></span>        <a class="code hl_struct" href="structjs_a_p_i_stats.html">jsAPIStats</a>              <a class="code hl_variable" href="structjs_account_info.html#a94ab71c69b7883c2731ae8741ddc1e94">API</a>;</div>
+<div class="line"><a id="l00980" name="l00980"></a><span class="lineno"><a class="line" href="structjs_account_info.html#aad93cf4bb6c1fbb09ae8545c03f315a9">  980</a></span>        <a class="code hl_struct" href="structjs_account_limits.html">jsAccountLimits</a>         <a class="code hl_variable" href="structjs_account_info.html#aad93cf4bb6c1fbb09ae8545c03f315a9">Limits</a>;</div>
+<div class="line"><a id="l00981" name="l00981"></a><span class="lineno"><a class="line" href="structjs_account_info.html#ab654d5c7456bb62df1808deb32a620fc">  981</a></span>        <a class="code hl_struct" href="structjs_tier.html">jsTier</a>                  **<a class="code hl_variable" href="structjs_account_info.html#ab654d5c7456bb62df1808deb32a620fc">Tiers</a>;</div>
+<div class="line"><a id="l00982" name="l00982"></a><span class="lineno"><a class="line" href="structjs_account_info.html#a21c14ca283400c684b18e61a534b6724">  982</a></span>        <span class="keywordtype">int</span>                     <a class="code hl_variable" href="structjs_account_info.html#a21c14ca283400c684b18e61a534b6724">TiersLen</a>;</div>
+<div class="line"><a id="l00983" name="l00983"></a><span class="lineno">  983</span> </div>
+<div class="line"><a id="l00984" name="l00984"></a><span class="lineno"><a class="line" href="group__types_group.html#ga57cdc53b29a4fedb5a4140b6e64a4fab">  984</a></span>} <a class="code hl_struct" href="structjs_account_info.html">jsAccountInfo</a>;</div>
+<div class="line"><a id="l00985" name="l00985"></a><span class="lineno">  985</span> </div>
+<div class="line"><a id="l00993" name="l00993"></a><span class="lineno"><a class="line" href="structjs_msg_meta_data.html">  993</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structjs_msg_meta_data.html">jsMsgMetaData</a></div>
+<div class="line"><a id="l00994" name="l00994"></a><span class="lineno">  994</span>{</div>
+<div class="line"><a id="l00995" name="l00995"></a><span class="lineno"><a class="line" href="structjs_msg_meta_data.html#a23d5fd1992033164c73d5c2a16a4e321">  995</a></span>        <a class="code hl_struct" href="structjs_sequence_pair.html">jsSequencePair</a>  <a class="code hl_variable" href="structjs_msg_meta_data.html#a23d5fd1992033164c73d5c2a16a4e321">Sequence</a>;</div>
+<div class="line"><a id="l00996" name="l00996"></a><span class="lineno"><a class="line" href="structjs_msg_meta_data.html#a9a50965fac061a9728b160702d3f56ff">  996</a></span>        uint64_t        <a class="code hl_variable" href="structjs_msg_meta_data.html#a9a50965fac061a9728b160702d3f56ff">NumDelivered</a>;</div>
+<div class="line"><a id="l00997" name="l00997"></a><span class="lineno"><a class="line" href="structjs_msg_meta_data.html#a02f1bbd37e9650ed6bfda0210f038e30">  997</a></span>        uint64_t        <a class="code hl_variable" href="structjs_msg_meta_data.html#a02f1bbd37e9650ed6bfda0210f038e30">NumPending</a>;</div>
+<div class="line"><a id="l00998" name="l00998"></a><span class="lineno"><a class="line" href="structjs_msg_meta_data.html#abab9ed5600a3629ea6d6c78170d7d5e9">  998</a></span>        int64_t         <a class="code hl_variable" href="structjs_msg_meta_data.html#abab9ed5600a3629ea6d6c78170d7d5e9">Timestamp</a>;</div>
+<div class="line"><a id="l00999" name="l00999"></a><span class="lineno"><a class="line" href="structjs_msg_meta_data.html#a32e2a9438d2dc769f7f64d2f8897abc4">  999</a></span>        <span class="keywordtype">char</span>            *<a class="code hl_variable" href="structjs_msg_meta_data.html#a32e2a9438d2dc769f7f64d2f8897abc4">Stream</a>;</div>
+<div class="line"><a id="l01000" name="l01000"></a><span class="lineno"><a class="line" href="structjs_msg_meta_data.html#a6dcc2a442984b0ca070b3d8077192127"> 1000</a></span>        <span class="keywordtype">char</span>            *<a class="code hl_variable" href="structjs_msg_meta_data.html#a6dcc2a442984b0ca070b3d8077192127">Consumer</a>;</div>
+<div class="line"><a id="l01001" name="l01001"></a><span class="lineno"><a class="line" href="structjs_msg_meta_data.html#a388e38ccea591181436d199dc7c2f8ea"> 1001</a></span>        <span class="keywordtype">char</span>            *<a class="code hl_variable" href="structjs_msg_meta_data.html#a388e38ccea591181436d199dc7c2f8ea">Domain</a>;</div>
+<div class="line"><a id="l01002" name="l01002"></a><span class="lineno"> 1002</span> </div>
+<div class="line"><a id="l01003" name="l01003"></a><span class="lineno"><a class="line" href="group__types_group.html#gace9595b1a5ce3f7a13670367fd293b4a"> 1003</a></span>} <a class="code hl_struct" href="structjs_msg_meta_data.html">jsMsgMetaData</a>;</div>
+<div class="line"><a id="l01004" name="l01004"></a><span class="lineno"> 1004</span> </div>
+<div class="line"><a id="l01008" name="l01008"></a><span class="lineno"><a class="line" href="structjs_pub_ack.html"> 1008</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structjs_pub_ack.html">jsPubAck</a></div>
+<div class="line"><a id="l01009" name="l01009"></a><span class="lineno"> 1009</span>{</div>
+<div class="line"><a id="l01010" name="l01010"></a><span class="lineno"><a class="line" href="structjs_pub_ack.html#a4fd5e6cdb7217d72c553afcc75358893"> 1010</a></span>        <span class="keywordtype">char</span>            *<a class="code hl_variable" href="structjs_pub_ack.html#a4fd5e6cdb7217d72c553afcc75358893">Stream</a>;</div>
+<div class="line"><a id="l01011" name="l01011"></a><span class="lineno"><a class="line" href="structjs_pub_ack.html#a01d302d5e1a2e71487a8c74c3fed1691"> 1011</a></span>        uint64_t        <a class="code hl_variable" href="structjs_pub_ack.html#a01d302d5e1a2e71487a8c74c3fed1691">Sequence</a>;</div>
+<div class="line"><a id="l01012" name="l01012"></a><span class="lineno"><a class="line" href="structjs_pub_ack.html#a0b73200c0b035db3c9c96421706d51b0"> 1012</a></span>        <span class="keywordtype">char</span>            *<a class="code hl_variable" href="structjs_pub_ack.html#a0b73200c0b035db3c9c96421706d51b0">Domain</a>;</div>
+<div class="line"><a id="l01013" name="l01013"></a><span class="lineno"><a class="line" href="structjs_pub_ack.html#a0381a49ff62e8fac7a52cad6a5eb7243"> 1013</a></span>        <span class="keywordtype">bool</span>            <a class="code hl_variable" href="structjs_pub_ack.html#a0381a49ff62e8fac7a52cad6a5eb7243">Duplicate</a>;</div>
+<div class="line"><a id="l01014" name="l01014"></a><span class="lineno"> 1014</span> </div>
+<div class="line"><a id="l01015" name="l01015"></a><span class="lineno"><a class="line" href="group__types_group.html#gaf1d5e436c5d41c5b9b96d84e3d2bc86f"> 1015</a></span>} <a class="code hl_struct" href="structjs_pub_ack.html">jsPubAck</a>;</div>
+<div class="line"><a id="l01016" name="l01016"></a><span class="lineno"> 1016</span> </div>
+<div class="line"><a id="l01021" name="l01021"></a><span class="lineno"><a class="line" href="structjs_pub_ack_err.html"> 1021</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structjs_pub_ack_err.html">jsPubAckErr</a></div>
+<div class="line"><a id="l01022" name="l01022"></a><span class="lineno"> 1022</span>{</div>
+<div class="line"><a id="l01023" name="l01023"></a><span class="lineno"><a class="line" href="structjs_pub_ack_err.html#a156ca2f779d132ffa8c519124cf9739b"> 1023</a></span>        <a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a>         *<a class="code hl_variable" href="structjs_pub_ack_err.html#a156ca2f779d132ffa8c519124cf9739b">Msg</a>;</div>
+<div class="line"><a id="l01024" name="l01024"></a><span class="lineno"><a class="line" href="structjs_pub_ack_err.html#a406e39e818f93bc59ac18cbdf035baf5"> 1024</a></span>        <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>      <a class="code hl_variable" href="structjs_pub_ack_err.html#a406e39e818f93bc59ac18cbdf035baf5">Err</a>;</div>
+<div class="line"><a id="l01025" name="l01025"></a><span class="lineno"><a class="line" href="structjs_pub_ack_err.html#aa558fd192cc6d6c02ad891445ec5aa8a"> 1025</a></span>        <a class="code hl_enumeration" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a>       <a class="code hl_variable" href="structjs_pub_ack_err.html#aa558fd192cc6d6c02ad891445ec5aa8a">ErrCode</a>;</div>
+<div class="line"><a id="l01026" name="l01026"></a><span class="lineno"><a class="line" href="structjs_pub_ack_err.html#ad1a85e6ff4046d7df33c1e24323ddc87"> 1026</a></span>        <span class="keyword">const</span> <span class="keywordtype">char</span>      *<a class="code hl_variable" href="structjs_pub_ack_err.html#ad1a85e6ff4046d7df33c1e24323ddc87">ErrText</a>;</div>
+<div class="line"><a id="l01027" name="l01027"></a><span class="lineno"> 1027</span> </div>
+<div class="line"><a id="l01028" name="l01028"></a><span class="lineno"><a class="line" href="group__types_group.html#gadb7c287bc86b92765fbe45a066b96f40"> 1028</a></span>} <a class="code hl_struct" href="structjs_pub_ack_err.html">jsPubAckErr</a>;</div>
+<div class="line"><a id="l01029" name="l01029"></a><span class="lineno"> 1029</span> </div>
+<div class="line"><a id="l01030" name="l01030"></a><span class="lineno"> 1030</span><span class="preprocessor">#ifndef BUILD_IN_DOXYGEN</span></div>
+<div class="line"><a id="l01031" name="l01031"></a><span class="lineno"> 1031</span><span class="comment">// Forward declarations</span></div>
+<div class="line"><a id="l01032" name="l01032"></a><span class="lineno"> 1032</span><span class="keyword">typedef</span> void (*<a class="code hl_typedef" href="group__callbacks_group.html#ga954768cc1d3388bb6ab723e777647992">jsPubAckErrHandler</a>)(<a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="code hl_struct" href="structjs_pub_ack_err.html">jsPubAckErr</a> *pae, <span class="keywordtype">void</span> *closure);</div>
+<div class="line"><a id="l01033" name="l01033"></a><span class="lineno"> 1033</span><span class="keyword">typedef</span> void (*<a class="code hl_typedef" href="group__callbacks_group.html#ga4f66e065bd918f02510d4c53d8a5b729">jsPubAckHandler</a>)(<a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, <a class="code hl_struct" href="structjs_pub_ack.html">jsPubAck</a> *pa, <a class="code hl_struct" href="structjs_pub_ack_err.html">jsPubAckErr</a> *pae, <span class="keywordtype">void</span> *closure);</div>
+<div class="line"><a id="l01034" name="l01034"></a><span class="lineno"> 1034</span><span class="preprocessor">#endif</span></div>
+<div class="line"><a id="l01035" name="l01035"></a><span class="lineno"> 1035</span> </div>
+<div class="line"><a id="l01045" name="l01045"></a><span class="lineno"><a class="line" href="structjs_direct_get_msg_options.html"> 1045</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structjs_direct_get_msg_options.html">jsDirectGetMsgOptions</a></div>
+<div class="line"><a id="l01046" name="l01046"></a><span class="lineno"> 1046</span>{</div>
+<div class="line"><a id="l01047" name="l01047"></a><span class="lineno"><a class="line" href="structjs_direct_get_msg_options.html#a60211d7499cfecdd6e61e6c73af1a2f5"> 1047</a></span>        uint64_t        <a class="code hl_variable" href="structjs_direct_get_msg_options.html#a60211d7499cfecdd6e61e6c73af1a2f5">Sequence</a>;               </div>
+<div class="line"><a id="l01048" name="l01048"></a><span class="lineno"><a class="line" href="structjs_direct_get_msg_options.html#a16ce7908a3d1690b8ae8bc22350ac238"> 1048</a></span>        <span class="keyword">const</span> <span class="keywordtype">char</span>      *<a class="code hl_variable" href="structjs_direct_get_msg_options.html#a16ce7908a3d1690b8ae8bc22350ac238">NextBySubject</a>;         </div>
+<div class="line"><a id="l01049" name="l01049"></a><span class="lineno"><a class="line" href="structjs_direct_get_msg_options.html#aae968f31cdda96fa3c5e9374a36b9630"> 1049</a></span>        <span class="keyword">const</span> <span class="keywordtype">char</span>      *<a class="code hl_variable" href="structjs_direct_get_msg_options.html#aae968f31cdda96fa3c5e9374a36b9630">LastBySubject</a>;         </div>
+<div class="line"><a id="l01050" name="l01050"></a><span class="lineno"> 1050</span> </div>
+<div class="line"><a id="l01051" name="l01051"></a><span class="lineno"><a class="line" href="group__types_group.html#ga85123afa00d522a249a5b2a8abd7e063"> 1051</a></span>} <a class="code hl_struct" href="structjs_direct_get_msg_options.html">jsDirectGetMsgOptions</a>;</div>
+<div class="line"><a id="l01052" name="l01052"></a><span class="lineno"> 1052</span> </div>
+<div class="line"><a id="l01058" name="l01058"></a><span class="lineno"><a class="line" href="structjs_fetch_request.html"> 1058</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structjs_fetch_request.html">jsFetchRequest</a></div>
+<div class="line"><a id="l01059" name="l01059"></a><span class="lineno"> 1059</span>{</div>
+<div class="line"><a id="l01060" name="l01060"></a><span class="lineno"><a class="line" href="structjs_fetch_request.html#ac3351138ce8ac3b321ac1eb78887116e"> 1060</a></span>        int64_t         <a class="code hl_variable" href="structjs_fetch_request.html#ac3351138ce8ac3b321ac1eb78887116e">Expires</a>;        </div>
+<div class="line"><a id="l01061" name="l01061"></a><span class="lineno"><a class="line" href="structjs_fetch_request.html#a84f06b60e25decb2674996f0cb315f63"> 1061</a></span>        <span class="keywordtype">int</span>             <a class="code hl_variable" href="structjs_fetch_request.html#a84f06b60e25decb2674996f0cb315f63">Batch</a>;          </div>
+<div class="line"><a id="l01062" name="l01062"></a><span class="lineno"><a class="line" href="structjs_fetch_request.html#a3298db691c2ecb9725cc029e2c35d6d1"> 1062</a></span>        int64_t         <a class="code hl_variable" href="structjs_fetch_request.html#a3298db691c2ecb9725cc029e2c35d6d1">MaxBytes</a>;       </div>
+<div class="line"><a id="l01063" name="l01063"></a><span class="lineno"><a class="line" href="structjs_fetch_request.html#ae251eebb1998a39fe3b898302b58293d"> 1063</a></span>        <span class="keywordtype">bool</span>            <a class="code hl_variable" href="structjs_fetch_request.html#ae251eebb1998a39fe3b898302b58293d">NoWait</a>;         </div>
+<div class="line"><a id="l01064" name="l01064"></a><span class="lineno"><a class="line" href="structjs_fetch_request.html#ae8e73c7cc2e2a2d2502407c9b1522496"> 1064</a></span>        int64_t         <a class="code hl_variable" href="structjs_fetch_request.html#ae8e73c7cc2e2a2d2502407c9b1522496">Heartbeat</a>;      </div>
+<div class="line"><a id="l01065" name="l01065"></a><span class="lineno"> 1065</span> </div>
+<div class="line"><a id="l01066" name="l01066"></a><span class="lineno"><a class="line" href="group__types_group.html#gaf11e6664c1f335a5287af71c703935fa"> 1066</a></span>} <a class="code hl_struct" href="structjs_fetch_request.html">jsFetchRequest</a>;</div>
+<div class="line"><a id="l01067" name="l01067"></a><span class="lineno"> 1067</span> </div>
+<div class="line"><a id="l01073" name="l01073"></a><span class="lineno"><a class="line" href="structjs_options.html"> 1073</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structjs_options.html">jsOptions</a></div>
+<div class="line"><a id="l01074" name="l01074"></a><span class="lineno"> 1074</span>{</div>
+<div class="line"><a id="l01075" name="l01075"></a><span class="lineno"><a class="line" href="structjs_options.html#ab06e45296fccf0fe6152e083e38d916f"> 1075</a></span>        <span class="keyword">const</span> <span class="keywordtype">char</span>              *<a class="code hl_variable" href="structjs_options.html#ab06e45296fccf0fe6152e083e38d916f">Prefix</a>;                        </div>
+<div class="line"><a id="l01076" name="l01076"></a><span class="lineno"><a class="line" href="structjs_options.html#ae4df6c9c01c0ea9ab0e6d5a6ec8af74e"> 1076</a></span>        <span class="keyword">const</span> <span class="keywordtype">char</span>              *<a class="code hl_variable" href="structjs_options.html#ae4df6c9c01c0ea9ab0e6d5a6ec8af74e">Domain</a>;                        </div>
+<div class="line"><a id="l01077" name="l01077"></a><span class="lineno"><a class="line" href="structjs_options.html#a7fd42e1f83da5861e716137c16f8b72f"> 1077</a></span>        int64_t                 <a class="code hl_variable" href="structjs_options.html#a7fd42e1f83da5861e716137c16f8b72f">Wait</a>;                           </div>
+<div class="line"><a id="l01078" name="l01078"></a><span class="lineno"> 1078</span> </div>
+<div class="line"><a id="l01082" name="l01082"></a><span class="lineno"><a class="line" href="structjs_options_1_1js_options_publish_async.html"> 1082</a></span>        <span class="keyword">struct </span><a class="code hl_struct" href="structjs_options_1_1js_options_publish_async.html">jsOptionsPublishAsync</a></div>
+<div class="line"><a id="l01083" name="l01083"></a><span class="lineno"> 1083</span>        {</div>
+<div class="line"><a id="l01084" name="l01084"></a><span class="lineno"><a class="line" href="structjs_options_1_1js_options_publish_async.html#add8dd21cbab2d5df19688c26365fe4d1"> 1084</a></span>                int64_t                 <a class="code hl_variable" href="structjs_options_1_1js_options_publish_async.html#add8dd21cbab2d5df19688c26365fe4d1">MaxPending</a>;             </div>
+<div class="line"><a id="l01085" name="l01085"></a><span class="lineno"> 1085</span> </div>
+<div class="line"><a id="l01086" name="l01086"></a><span class="lineno"> 1086</span>                <span class="comment">// If jsPubAckHandler is specified, the callback will be invoked</span></div>
+<div class="line"><a id="l01087" name="l01087"></a><span class="lineno"> 1087</span>                <span class="comment">// for every asynchronous published message, either as a positive</span></div>
+<div class="line"><a id="l01088" name="l01088"></a><span class="lineno"> 1088</span>                <span class="comment">// result, or with the error encountered when publishing that</span></div>
+<div class="line"><a id="l01089" name="l01089"></a><span class="lineno"> 1089</span>                <span class="comment">// message. If this callback is specified, ErrHandler (see below)</span></div>
+<div class="line"><a id="l01090" name="l01090"></a><span class="lineno"> 1090</span>                <span class="comment">// will be ignored.</span></div>
+<div class="line"><a id="l01091" name="l01091"></a><span class="lineno"><a class="line" href="structjs_options_1_1js_options_publish_async.html#a508140119f40a2c056d4ee8c0cd55df9"> 1091</a></span>                <a class="code hl_typedef" href="group__callbacks_group.html#ga4f66e065bd918f02510d4c53d8a5b729">jsPubAckHandler</a>         <a class="code hl_variable" href="structjs_options_1_1js_options_publish_async.html#a508140119f40a2c056d4ee8c0cd55df9">AckHandler</a>;             </div>
+<div class="line"><a id="l01092" name="l01092"></a><span class="lineno"><a class="line" href="structjs_options_1_1js_options_publish_async.html#a60c95f10797c04ea2e625759c6936ec9"> 1092</a></span>                <span class="keywordtype">void</span>                    *<a class="code hl_variable" href="structjs_options_1_1js_options_publish_async.html#a60c95f10797c04ea2e625759c6936ec9">AckHandlerClosure</a>;     </div>
+<div class="line"><a id="l01093" name="l01093"></a><span class="lineno"> 1093</span> </div>
+<div class="line"><a id="l01094" name="l01094"></a><span class="lineno"> 1094</span>                <span class="comment">// This callback is invoked for messages published asynchronously</span></div>
+<div class="line"><a id="l01095" name="l01095"></a><span class="lineno"> 1095</span>                <span class="comment">// when an error is returned by the server or if the library has</span></div>
+<div class="line"><a id="l01096" name="l01096"></a><span class="lineno"> 1096</span>                <span class="comment">// timed-out waiting for an acknowledgment back from the server</span></div>
+<div class="line"><a id="l01097" name="l01097"></a><span class="lineno"> 1097</span>                <span class="comment">// (if publish uses the jsPubOptions.MaxWait).</span></div>
+<div class="line"><a id="l01098" name="l01098"></a><span class="lineno"><a class="line" href="structjs_options_1_1js_options_publish_async.html#a0a180995c49990ca277e449b7d43616b"> 1098</a></span>                <a class="code hl_typedef" href="group__callbacks_group.html#ga954768cc1d3388bb6ab723e777647992">jsPubAckErrHandler</a>      <a class="code hl_variable" href="structjs_options_1_1js_options_publish_async.html#a0a180995c49990ca277e449b7d43616b">ErrHandler</a>;             </div>
+<div class="line"><a id="l01099" name="l01099"></a><span class="lineno"><a class="line" href="structjs_options_1_1js_options_publish_async.html#a784a0029c30e82ff37c39ae6c276bc81"> 1099</a></span>                <span class="keywordtype">void</span>                    *<a class="code hl_variable" href="structjs_options_1_1js_options_publish_async.html#a784a0029c30e82ff37c39ae6c276bc81">ErrHandlerClosure</a>;     </div>
+<div class="line"><a id="l01100" name="l01100"></a><span class="lineno"> 1100</span> </div>
+<div class="line"><a id="l01101" name="l01101"></a><span class="lineno"><a class="line" href="structjs_options_1_1js_options_publish_async.html#ada58fefe0ed40157b5f5d44b9dd175f9"> 1101</a></span>                int64_t                 <a class="code hl_variable" href="structjs_options_1_1js_options_publish_async.html#ada58fefe0ed40157b5f5d44b9dd175f9">StallWait</a>;              </div>
+<div class="line"><a id="l01102" name="l01102"></a><span class="lineno"> 1102</span> </div>
+<div class="line"><a id="l01103" name="l01103"></a><span class="lineno"><a class="line" href="structjs_options.html#a5ce5c11cc9b9df2b6bc47cd77d7b1dc4"> 1103</a></span>        } <a class="code hl_variable" href="structjs_options.html#a5ce5c11cc9b9df2b6bc47cd77d7b1dc4">PublishAsync</a>;</div>
+<div class="line"><a id="l01104" name="l01104"></a><span class="lineno"> 1104</span> </div>
+<div class="line"><a id="l01111" name="l01111"></a><span class="lineno"><a class="line" href="structjs_options_1_1js_options_stream.html"> 1111</a></span>        <span class="keyword">struct </span><a class="code hl_struct" href="structjs_options_1_1js_options_stream.html">jsOptionsStream</a></div>
+<div class="line"><a id="l01112" name="l01112"></a><span class="lineno"> 1112</span>        {</div>
+<div class="line"><a id="l01122" name="l01122"></a><span class="lineno"><a class="line" href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html"> 1122</a></span>                <span class="keyword">struct </span><a class="code hl_struct" href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html">jsOptionsStreamPurge</a></div>
+<div class="line"><a id="l01123" name="l01123"></a><span class="lineno"> 1123</span>                {</div>
+<div class="line"><a id="l01124" name="l01124"></a><span class="lineno"><a class="line" href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#aa99e6ee3bef1c22243f01544181315fe"> 1124</a></span>                        <span class="keyword">const</span> <span class="keywordtype">char</span>      *<a class="code hl_variable" href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#aa99e6ee3bef1c22243f01544181315fe">Subject</a>;       </div>
+<div class="line"><a id="l01125" name="l01125"></a><span class="lineno"><a class="line" href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#a0d61e5d3c9c518f455549086ababe7f6"> 1125</a></span>                        uint64_t        <a class="code hl_variable" href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#a0d61e5d3c9c518f455549086ababe7f6">Sequence</a>;       </div>
+<div class="line"><a id="l01126" name="l01126"></a><span class="lineno"><a class="line" href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#a882c1ce1e636817450893caa72aa4eda"> 1126</a></span>                        uint64_t        <a class="code hl_variable" href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#a882c1ce1e636817450893caa72aa4eda">Keep</a>;           </div>
+<div class="line"><a id="l01127" name="l01127"></a><span class="lineno"> 1127</span> </div>
+<div class="line"><a id="l01128" name="l01128"></a><span class="lineno"><a class="line" href="structjs_options_1_1js_options_stream.html#afe680264223b434ca6959f9e122af029"> 1128</a></span>                } <a class="code hl_variable" href="structjs_options_1_1js_options_stream.html#afe680264223b434ca6959f9e122af029">Purge</a>;                                </div>
+<div class="line"><a id="l01129" name="l01129"></a><span class="lineno"> 1129</span> </div>
+<div class="line"><a id="l01133" name="l01133"></a><span class="lineno"><a class="line" href="structjs_options_1_1js_options_stream_1_1js_options_stream_info.html"> 1133</a></span>                <span class="keyword">struct </span><a class="code hl_struct" href="structjs_options_1_1js_options_stream_1_1js_options_stream_info.html">jsOptionsStreamInfo</a></div>
+<div class="line"><a id="l01134" name="l01134"></a><span class="lineno"> 1134</span>                {</div>
+<div class="line"><a id="l01135" name="l01135"></a><span class="lineno"><a class="line" href="structjs_options_1_1js_options_stream_1_1js_options_stream_info.html#a73f847afe18f56eaaf6788900270bef7"> 1135</a></span>                        <span class="keywordtype">bool</span>            <a class="code hl_variable" href="structjs_options_1_1js_options_stream_1_1js_options_stream_info.html#a73f847afe18f56eaaf6788900270bef7">DeletedDetails</a>;         </div>
+<div class="line"><a id="l01136" name="l01136"></a><span class="lineno"><a class="line" href="structjs_options_1_1js_options_stream_1_1js_options_stream_info.html#af874e0f5aa15fb2a41504631ed786e6d"> 1136</a></span>                        <span class="keyword">const</span> <span class="keywordtype">char</span>      *<a class="code hl_variable" href="structjs_options_1_1js_options_stream_1_1js_options_stream_info.html#af874e0f5aa15fb2a41504631ed786e6d">SubjectsFilter</a>;        </div>
+<div class="line"><a id="l01137" name="l01137"></a><span class="lineno"> 1137</span> </div>
+<div class="line"><a id="l01138" name="l01138"></a><span class="lineno"><a class="line" href="structjs_options_1_1js_options_stream.html#a2ca89c298b4df1f5e3e0a44e205c789c"> 1138</a></span>                } <a class="code hl_variable" href="structjs_options_1_1js_options_stream.html#a2ca89c298b4df1f5e3e0a44e205c789c">Info</a>;                                 </div>
+<div class="line"><a id="l01139" name="l01139"></a><span class="lineno"> 1139</span> </div>
+<div class="line"><a id="l01140" name="l01140"></a><span class="lineno"><a class="line" href="structjs_options.html#ae50544ee0ef8dd7d02ef9802805807ae"> 1140</a></span>        } <a class="code hl_variable" href="structjs_options.html#ae50544ee0ef8dd7d02ef9802805807ae">Stream</a>;                                       </div>
+<div class="line"><a id="l01141" name="l01141"></a><span class="lineno"> 1141</span> </div>
+<div class="line"><a id="l01142" name="l01142"></a><span class="lineno"><a class="line" href="group__types_group.html#ga0e3a3b7cf89e7dfa955f0f8f3f1eb6e5"> 1142</a></span>} <a class="code hl_struct" href="structjs_options.html">jsOptions</a>;</div>
+<div class="line"><a id="l01143" name="l01143"></a><span class="lineno"> 1143</span> </div>
+<div class="line"><a id="l01147" name="l01147"></a><span class="lineno"><a class="line" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a"> 1147</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span>__kvStore                <a class="code hl_typedef" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a>;</div>
+<div class="line"><a id="l01148" name="l01148"></a><span class="lineno"> 1148</span> </div>
+<div class="line"><a id="l01152" name="l01152"></a><span class="lineno"><a class="line" href="group__types_group.html#gad489fb4074f27427560ca71797db6191"> 1152</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span>__kvEntry                <a class="code hl_typedef" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a>;</div>
+<div class="line"><a id="l01153" name="l01153"></a><span class="lineno"> 1153</span> </div>
+<div class="line"><a id="l01157" name="l01157"></a><span class="lineno"><a class="line" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80"> 1157</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span>__kvStatus               <a class="code hl_typedef" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a>;</div>
+<div class="line"><a id="l01158" name="l01158"></a><span class="lineno"> 1158</span> </div>
+<div class="line"><a id="l01162" name="l01162"></a><span class="lineno"><a class="line" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043"> 1162</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span>__kvWatcher              <a class="code hl_typedef" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a>;</div>
+<div class="line"><a id="l01163" name="l01163"></a><span class="lineno"> 1163</span> </div>
+<div class="line"><a id="l01167" name="l01167"></a><span class="lineno"><a class="line" href="group__types_group.html#ga89db3bd6bf11af3ac5eb3ab560d16332"> 1167</a></span><span class="keyword">typedef</span> <span class="keyword">enum</span></div>
+<div class="line"><a id="l01168" name="l01168"></a><span class="lineno"> 1168</span>{</div>
+<div class="line"><a id="l01169" name="l01169"></a><span class="lineno"><a class="line" href="group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332a0b7a6bef67e4220f5f0c4075f2ed16b6"> 1169</a></span>        <a class="code hl_enumvalue" href="group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332a0b7a6bef67e4220f5f0c4075f2ed16b6">kvOp_Unknown</a> = 0,</div>
+<div class="line"><a id="l01170" name="l01170"></a><span class="lineno"><a class="line" href="group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332acc0e1da3c292cb7eb19d909c9dfd788a"> 1170</a></span>        <a class="code hl_enumvalue" href="group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332acc0e1da3c292cb7eb19d909c9dfd788a">kvOp_Put</a>,</div>
+<div class="line"><a id="l01171" name="l01171"></a><span class="lineno"><a class="line" href="group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332a4efb91331f3307128c75af5b23362f83"> 1171</a></span>        <a class="code hl_enumvalue" href="group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332a4efb91331f3307128c75af5b23362f83">kvOp_Delete</a>,</div>
+<div class="line"><a id="l01172" name="l01172"></a><span class="lineno"><a class="line" href="group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332aee19ab8144bf518e251ea2004309b657"> 1172</a></span>        <a class="code hl_enumvalue" href="group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332aee19ab8144bf518e251ea2004309b657">kvOp_Purge</a>,</div>
+<div class="line"><a id="l01173" name="l01173"></a><span class="lineno"> 1173</span> </div>
+<div class="line"><a id="l01174" name="l01174"></a><span class="lineno"> 1174</span>} <a class="code hl_enumeration" href="group__types_group.html#ga89db3bd6bf11af3ac5eb3ab560d16332">kvOperation</a>;</div>
+<div class="line"><a id="l01175" name="l01175"></a><span class="lineno"> 1175</span> </div>
+<div class="line"><a id="l01181" name="l01181"></a><span class="lineno"><a class="line" href="structkv_config.html"> 1181</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structkv_config.html">kvConfig</a></div>
+<div class="line"><a id="l01182" name="l01182"></a><span class="lineno"> 1182</span>{</div>
+<div class="line"><a id="l01183" name="l01183"></a><span class="lineno"><a class="line" href="structkv_config.html#a11b636da727c17566d5ab1274f69fee5"> 1183</a></span>        <span class="keyword">const</span> <span class="keywordtype">char</span>      *<a class="code hl_variable" href="structkv_config.html#a11b636da727c17566d5ab1274f69fee5">Bucket</a>;</div>
+<div class="line"><a id="l01184" name="l01184"></a><span class="lineno"><a class="line" href="structkv_config.html#a941e9cad2bab67f093bf4d9567b4749a"> 1184</a></span>        <span class="keyword">const</span> <span class="keywordtype">char</span>      *<a class="code hl_variable" href="structkv_config.html#a941e9cad2bab67f093bf4d9567b4749a">Description</a>;</div>
+<div class="line"><a id="l01185" name="l01185"></a><span class="lineno"><a class="line" href="structkv_config.html#a281156a9df0130abad7f3b2728ac35a5"> 1185</a></span>        int32_t         <a class="code hl_variable" href="structkv_config.html#a281156a9df0130abad7f3b2728ac35a5">MaxValueSize</a>;</div>
+<div class="line"><a id="l01186" name="l01186"></a><span class="lineno"><a class="line" href="structkv_config.html#a0ec6b3afbfdaa33436e2ae748e986e98"> 1186</a></span>        uint8_t         <a class="code hl_variable" href="structkv_config.html#a0ec6b3afbfdaa33436e2ae748e986e98">History</a>;</div>
+<div class="line"><a id="l01187" name="l01187"></a><span class="lineno"><a class="line" href="structkv_config.html#ad2f5503e2f2522cb52e0ba1b86983dba"> 1187</a></span>        int64_t         <a class="code hl_variable" href="structkv_config.html#ad2f5503e2f2522cb52e0ba1b86983dba">TTL</a>;</div>
+<div class="line"><a id="l01188" name="l01188"></a><span class="lineno"><a class="line" href="structkv_config.html#a1bc37777aa91b8b57a70e7647670cd12"> 1188</a></span>        int64_t         <a class="code hl_variable" href="structkv_config.html#a1bc37777aa91b8b57a70e7647670cd12">MaxBytes</a>;</div>
+<div class="line"><a id="l01189" name="l01189"></a><span class="lineno"><a class="line" href="structkv_config.html#ad5db9a58224d93ab86b4cfc4c46f1897"> 1189</a></span>        <a class="code hl_enumeration" href="group__types_group.html#ga1802a53c79e667f093bba033b16adc98">jsStorageType</a>   <a class="code hl_variable" href="structkv_config.html#ad5db9a58224d93ab86b4cfc4c46f1897">StorageType</a>;</div>
+<div class="line"><a id="l01190" name="l01190"></a><span class="lineno"><a class="line" href="structkv_config.html#a48f0f70383eff868321f9c94ae1a87cd"> 1190</a></span>        <span class="keywordtype">int</span>             <a class="code hl_variable" href="structkv_config.html#a48f0f70383eff868321f9c94ae1a87cd">Replicas</a>;</div>
+<div class="line"><a id="l01191" name="l01191"></a><span class="lineno"><a class="line" href="structkv_config.html#ae172d3e442eef1a57cd7cf266d9e8951"> 1191</a></span>        <a class="code hl_struct" href="structjs_re_publish.html">jsRePublish</a>     *<a class="code hl_variable" href="structkv_config.html#ae172d3e442eef1a57cd7cf266d9e8951">RePublish</a>;</div>
+<div class="line"><a id="l01192" name="l01192"></a><span class="lineno"> 1192</span> </div>
+<div class="line"><a id="l01193" name="l01193"></a><span class="lineno"><a class="line" href="group__types_group.html#ga6d594b091b4bb46192336413066a8edf"> 1193</a></span>} <a class="code hl_struct" href="structkv_config.html">kvConfig</a>;</div>
+<div class="line"><a id="l01194" name="l01194"></a><span class="lineno"> 1194</span> </div>
+<div class="line"><a id="l01200" name="l01200"></a><span class="lineno"><a class="line" href="structkv_watch_options.html"> 1200</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structkv_watch_options.html">kvWatchOptions</a></div>
+<div class="line"><a id="l01201" name="l01201"></a><span class="lineno"> 1201</span>{</div>
+<div class="line"><a id="l01202" name="l01202"></a><span class="lineno"><a class="line" href="structkv_watch_options.html#a0535edd21b26affc0057575bafc21a07"> 1202</a></span>        <span class="keywordtype">bool</span>            <a class="code hl_variable" href="structkv_watch_options.html#a0535edd21b26affc0057575bafc21a07">IgnoreDeletes</a>;</div>
+<div class="line"><a id="l01203" name="l01203"></a><span class="lineno"><a class="line" href="structkv_watch_options.html#a08274f08ae96e14d9ded326e4e665649"> 1203</a></span>        <span class="keywordtype">bool</span>            <a class="code hl_variable" href="structkv_watch_options.html#a08274f08ae96e14d9ded326e4e665649">IncludeHistory</a>;</div>
+<div class="line"><a id="l01204" name="l01204"></a><span class="lineno"><a class="line" href="structkv_watch_options.html#ac9094bce4f3c6513431ba32fb49e5605"> 1204</a></span>        <span class="keywordtype">bool</span>            <a class="code hl_variable" href="structkv_watch_options.html#ac9094bce4f3c6513431ba32fb49e5605">MetaOnly</a>;</div>
+<div class="line"><a id="l01205" name="l01205"></a><span class="lineno"><a class="line" href="structkv_watch_options.html#a56183d56585697d058c7eeb20bdddb66"> 1205</a></span>        int64_t         <a class="code hl_variable" href="structkv_watch_options.html#a56183d56585697d058c7eeb20bdddb66">Timeout</a>;        </div>
+<div class="line"><a id="l01206" name="l01206"></a><span class="lineno"> 1206</span> </div>
+<div class="line"><a id="l01207" name="l01207"></a><span class="lineno"><a class="line" href="group__types_group.html#gac32f992fe797a1f7befc7dc3452640b6"> 1207</a></span>} <a class="code hl_struct" href="structkv_watch_options.html">kvWatchOptions</a>;</div>
+<div class="line"><a id="l01208" name="l01208"></a><span class="lineno"> 1208</span> </div>
+<div class="line"><a id="l01214" name="l01214"></a><span class="lineno"><a class="line" href="structkv_purge_options.html"> 1214</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structkv_purge_options.html">kvPurgeOptions</a></div>
+<div class="line"><a id="l01215" name="l01215"></a><span class="lineno"> 1215</span>{</div>
+<div class="line"><a id="l01216" name="l01216"></a><span class="lineno"> 1216</span>        <span class="comment">// How long to wait (in milliseconds) for some operations to complete.</span></div>
+<div class="line"><a id="l01217" name="l01217"></a><span class="lineno"><a class="line" href="structkv_purge_options.html#a245c2def0f3aabe617219772cf7680a8"> 1217</a></span>        int64_t         <a class="code hl_variable" href="structkv_purge_options.html#a245c2def0f3aabe617219772cf7680a8">Timeout</a>;</div>
+<div class="line"><a id="l01218" name="l01218"></a><span class="lineno"> 1218</span> </div>
+<div class="line"><a id="l01219" name="l01219"></a><span class="lineno"> 1219</span>        <span class="comment">// When calling kvStore_PurgeDeletes(), all keys that have a delete or</span></div>
+<div class="line"><a id="l01220" name="l01220"></a><span class="lineno"> 1220</span>        <span class="comment">// purge marker as the last entry are gathered and then those keys</span></div>
+<div class="line"><a id="l01221" name="l01221"></a><span class="lineno"> 1221</span>        <span class="comment">// are purged of their content, including the marker.</span></div>
+<div class="line"><a id="l01222" name="l01222"></a><span class="lineno"> 1222</span>        <span class="comment">// Starting with NATS C client v3.3.0, if this option is not specified,</span></div>
+<div class="line"><a id="l01223" name="l01223"></a><span class="lineno"> 1223</span>        <span class="comment">// only the markers older than 30 minutes will be deleted. Use this</span></div>
+<div class="line"><a id="l01224" name="l01224"></a><span class="lineno"> 1224</span>        <span class="comment">// option to set the limit or a negative value to force removal of</span></div>
+<div class="line"><a id="l01225" name="l01225"></a><span class="lineno"> 1225</span>        <span class="comment">// markers regardless of their age.</span></div>
+<div class="line"><a id="l01226" name="l01226"></a><span class="lineno"> 1226</span>        <span class="comment">// The value is expressed as a time in nanoseconds.</span></div>
+<div class="line"><a id="l01227" name="l01227"></a><span class="lineno"><a class="line" href="structkv_purge_options.html#a47fed1e95073666cbe441aba7c149da6"> 1227</a></span>        int64_t         <a class="code hl_variable" href="structkv_purge_options.html#a47fed1e95073666cbe441aba7c149da6">DeleteMarkersOlderThan</a>;</div>
+<div class="line"><a id="l01228" name="l01228"></a><span class="lineno"> 1228</span> </div>
+<div class="line"><a id="l01229" name="l01229"></a><span class="lineno"><a class="line" href="group__types_group.html#ga90e8de23c4468005488bde690a2ffe9d"> 1229</a></span>} <a class="code hl_struct" href="structkv_purge_options.html">kvPurgeOptions</a>;</div>
+<div class="line"><a id="l01230" name="l01230"></a><span class="lineno"> 1230</span> </div>
+<div class="line"><a id="l01248" name="l01248"></a><span class="lineno"><a class="line" href="structkv_entry_list.html"> 1248</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structkv_entry_list.html">kvEntryList</a></div>
+<div class="line"><a id="l01249" name="l01249"></a><span class="lineno"> 1249</span>{</div>
+<div class="line"><a id="l01250" name="l01250"></a><span class="lineno"><a class="line" href="structkv_entry_list.html#a179d4d3e5844d005be1ed9134b969a50"> 1250</a></span>        <a class="code hl_typedef" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a>         **<a class="code hl_variable" href="structkv_entry_list.html#a179d4d3e5844d005be1ed9134b969a50">Entries</a>;</div>
+<div class="line"><a id="l01251" name="l01251"></a><span class="lineno"><a class="line" href="structkv_entry_list.html#a82da55d42e1a6862d3b0034dfc6f321f"> 1251</a></span>        <span class="keywordtype">int</span>             <a class="code hl_variable" href="structkv_entry_list.html#a82da55d42e1a6862d3b0034dfc6f321f">Count</a>;</div>
+<div class="line"><a id="l01252" name="l01252"></a><span class="lineno"> 1252</span> </div>
+<div class="line"><a id="l01253" name="l01253"></a><span class="lineno"><a class="line" href="group__types_group.html#ga0125d394a3cbae2a1713eed8fab7f78e"> 1253</a></span>} <a class="code hl_struct" href="structkv_entry_list.html">kvEntryList</a>;</div>
+<div class="line"><a id="l01254" name="l01254"></a><span class="lineno"> 1254</span> </div>
+<div class="line"><a id="l01272" name="l01272"></a><span class="lineno"><a class="line" href="structkv_keys_list.html"> 1272</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structkv_keys_list.html">kvKeysList</a></div>
+<div class="line"><a id="l01273" name="l01273"></a><span class="lineno"> 1273</span>{</div>
+<div class="line"><a id="l01274" name="l01274"></a><span class="lineno"><a class="line" href="structkv_keys_list.html#aa5cb40820a1a927375215e0a94ecfc18"> 1274</a></span>        <span class="keywordtype">char</span>            **<a class="code hl_variable" href="structkv_keys_list.html#aa5cb40820a1a927375215e0a94ecfc18">Keys</a>;</div>
+<div class="line"><a id="l01275" name="l01275"></a><span class="lineno"><a class="line" href="structkv_keys_list.html#a625f7b34784e024a538359efd9a97265"> 1275</a></span>        <span class="keywordtype">int</span>             <a class="code hl_variable" href="structkv_keys_list.html#a625f7b34784e024a538359efd9a97265">Count</a>;</div>
+<div class="line"><a id="l01276" name="l01276"></a><span class="lineno"> 1276</span> </div>
+<div class="line"><a id="l01277" name="l01277"></a><span class="lineno"><a class="line" href="group__types_group.html#gab36492d9d4370337cfed80edce4144e0"> 1277</a></span>} <a class="code hl_struct" href="structkv_keys_list.html">kvKeysList</a>;</div>
+<div class="line"><a id="l01278" name="l01278"></a><span class="lineno"> 1278</span> </div>
+<div class="line"><a id="l01279" name="l01279"></a><span class="lineno"> 1279</span><span class="preprocessor">#if defined(NATS_HAS_STREAMING)</span></div>
+<div class="line"><a id="l01284" name="l01284"></a><span class="lineno"><a class="line" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c"> 1284</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span>__stanConnection     <a class="code hl_typedef" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a>;</div>
+<div class="line"><a id="l01285" name="l01285"></a><span class="lineno"> 1285</span> </div>
+<div class="line"><a id="l01290" name="l01290"></a><span class="lineno"><a class="line" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5"> 1290</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span>__stanSubscription   <a class="code hl_typedef" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a>;</div>
+<div class="line"><a id="l01291" name="l01291"></a><span class="lineno"> 1291</span> </div>
+<div class="line"><a id="l01296" name="l01296"></a><span class="lineno"><a class="line" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d"> 1296</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span>__stanMsg            <a class="code hl_typedef" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a>;</div>
+<div class="line"><a id="l01297" name="l01297"></a><span class="lineno"> 1297</span> </div>
+<div class="line"><a id="l01302" name="l01302"></a><span class="lineno"><a class="line" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1"> 1302</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span>__stanConnOptions    <a class="code hl_typedef" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a>;</div>
+<div class="line"><a id="l01303" name="l01303"></a><span class="lineno"> 1303</span> </div>
+<div class="line"><a id="l01308" name="l01308"></a><span class="lineno"><a class="line" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3"> 1308</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span>__stanSubOptions     <a class="code hl_typedef" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a>;</div>
+<div class="line"><a id="l01309" name="l01309"></a><span class="lineno"> 1309</span><span class="preprocessor">#endif</span></div>
+<div class="line"><a id="l01310" name="l01310"></a><span class="lineno"> 1310</span> <span class="comment">// end of typesGroup</span></div>
+<div class="line"><a id="l01312" name="l01312"></a><span class="lineno"> 1312</span> </div>
+<div class="line"><a id="l01313" name="l01313"></a><span class="lineno"> 1313</span><span class="comment">//</span></div>
+<div class="line"><a id="l01314" name="l01314"></a><span class="lineno"> 1314</span><span class="comment">// Callbacks.</span></div>
+<div class="line"><a id="l01315" name="l01315"></a><span class="lineno"> 1315</span><span class="comment">//</span></div>
+<div class="line"><a id="l01316" name="l01316"></a><span class="lineno"> 1316</span> </div>
+<div class="line"><a id="l01339" name="l01339"></a><span class="lineno"><a class="line" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe"> 1339</a></span><span class="keyword">typedef</span> void (*<a class="code hl_typedef" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe">natsMsgHandler</a>)(</div>
+<div class="line"><a id="l01340" name="l01340"></a><span class="lineno"> 1340</span>        <a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, <a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, <span class="keywordtype">void</span> *closure);</div>
+<div class="line"><a id="l01341" name="l01341"></a><span class="lineno"> 1341</span> </div>
+<div class="line"><a id="l01355" name="l01355"></a><span class="lineno"><a class="line" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c"> 1355</a></span><span class="keyword">typedef</span> void (*<a class="code hl_typedef" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a>)(</div>
+<div class="line"><a id="l01356" name="l01356"></a><span class="lineno"> 1356</span>        <a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a>  *nc, <span class="keywordtype">void</span> *closure);</div>
+<div class="line"><a id="l01357" name="l01357"></a><span class="lineno"> 1357</span> </div>
+<div class="line"><a id="l01364" name="l01364"></a><span class="lineno"><a class="line" href="group__callbacks_group.html#ga9e511dffa471dfb971b7dd2b12329626"> 1364</a></span><span class="keyword">typedef</span> void (*<a class="code hl_typedef" href="group__callbacks_group.html#ga9e511dffa471dfb971b7dd2b12329626">natsErrHandler</a>)(</div>
+<div class="line"><a id="l01365" name="l01365"></a><span class="lineno"> 1365</span>        <a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *subscription, <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> err,</div>
+<div class="line"><a id="l01366" name="l01366"></a><span class="lineno"> 1366</span>        <span class="keywordtype">void</span> *closure);</div>
+<div class="line"><a id="l01367" name="l01367"></a><span class="lineno"> 1367</span> </div>
+<div class="line"><a id="l01381" name="l01381"></a><span class="lineno"><a class="line" href="group__callbacks_group.html#ga245eab0a01a485e40fba267f84ec037f"> 1381</a></span><span class="keyword">typedef</span> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> (*<a class="code hl_typedef" href="group__callbacks_group.html#ga245eab0a01a485e40fba267f84ec037f">natsEvLoop_Attach</a>)(</div>
+<div class="line"><a id="l01382" name="l01382"></a><span class="lineno"> 1382</span>        <span class="keywordtype">void</span>            **userData,</div>
+<div class="line"><a id="l01383" name="l01383"></a><span class="lineno"> 1383</span>        <span class="keywordtype">void</span>            *loop,</div>
+<div class="line"><a id="l01384" name="l01384"></a><span class="lineno"> 1384</span>        <a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a>  *nc,</div>
+<div class="line"><a id="l01385" name="l01385"></a><span class="lineno"> 1385</span>        <a class="code hl_typedef" href="nats_8h.html#af798865ac824e5959987de0fe8d07383">natsSock</a>        socket);</div>
+<div class="line"><a id="l01386" name="l01386"></a><span class="lineno"> 1386</span> </div>
+<div class="line"><a id="l01396" name="l01396"></a><span class="lineno"><a class="line" href="group__callbacks_group.html#gaea4c125ecfb43eaf43da20e8444c2aaa"> 1396</a></span><span class="keyword">typedef</span> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> (*<a class="code hl_typedef" href="group__callbacks_group.html#gaea4c125ecfb43eaf43da20e8444c2aaa">natsEvLoop_ReadAddRemove</a>)(</div>
+<div class="line"><a id="l01397" name="l01397"></a><span class="lineno"> 1397</span>        <span class="keywordtype">void</span>            *userData,</div>
+<div class="line"><a id="l01398" name="l01398"></a><span class="lineno"> 1398</span>        <span class="keywordtype">bool</span>            add);</div>
+<div class="line"><a id="l01399" name="l01399"></a><span class="lineno"> 1399</span> </div>
+<div class="line"><a id="l01409" name="l01409"></a><span class="lineno"><a class="line" href="group__callbacks_group.html#ga2bb5dd2d821ca5bbc0488f7e6aceed17"> 1409</a></span><span class="keyword">typedef</span> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> (*<a class="code hl_typedef" href="group__callbacks_group.html#ga2bb5dd2d821ca5bbc0488f7e6aceed17">natsEvLoop_WriteAddRemove</a>)(</div>
+<div class="line"><a id="l01410" name="l01410"></a><span class="lineno"> 1410</span>        <span class="keywordtype">void</span>            *userData,</div>
+<div class="line"><a id="l01411" name="l01411"></a><span class="lineno"> 1411</span>        <span class="keywordtype">bool</span>            add);</div>
+<div class="line"><a id="l01412" name="l01412"></a><span class="lineno"> 1412</span> </div>
+<div class="line"><a id="l01420" name="l01420"></a><span class="lineno"><a class="line" href="group__callbacks_group.html#gab63dee7f7012ba11ae20b76dbc36f2d0"> 1420</a></span><span class="keyword">typedef</span> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> (*<a class="code hl_typedef" href="group__callbacks_group.html#gab63dee7f7012ba11ae20b76dbc36f2d0">natsEvLoop_Detach</a>)(</div>
+<div class="line"><a id="l01421" name="l01421"></a><span class="lineno"> 1421</span>        <span class="keywordtype">void</span>            *userData);</div>
+<div class="line"><a id="l01422" name="l01422"></a><span class="lineno"> 1422</span> </div>
+<div class="line"><a id="l01444" name="l01444"></a><span class="lineno"><a class="line" href="group__callbacks_group.html#ga258b30458134be90f17315c037f34b7b"> 1444</a></span><span class="keyword">typedef</span> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> (*<a class="code hl_typedef" href="group__callbacks_group.html#ga258b30458134be90f17315c037f34b7b">natsUserJWTHandler</a>)(</div>
+<div class="line"><a id="l01445" name="l01445"></a><span class="lineno"> 1445</span>        <span class="keywordtype">char</span>            **userJWT,</div>
+<div class="line"><a id="l01446" name="l01446"></a><span class="lineno"> 1446</span>        <span class="keywordtype">char</span>            **customErrTxt,</div>
+<div class="line"><a id="l01447" name="l01447"></a><span class="lineno"> 1447</span>        <span class="keywordtype">void</span>            *closure);</div>
+<div class="line"><a id="l01448" name="l01448"></a><span class="lineno"> 1448</span> </div>
+<div class="line"><a id="l01449" name="l01449"></a><span class="lineno"> 1449</span> </div>
+<div class="line"><a id="l01475" name="l01475"></a><span class="lineno"><a class="line" href="group__callbacks_group.html#gab786ffd670c86de0563559351305080b"> 1475</a></span><span class="keyword">typedef</span> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> (*<a class="code hl_typedef" href="group__callbacks_group.html#gab786ffd670c86de0563559351305080b">natsSignatureHandler</a>)(</div>
+<div class="line"><a id="l01476" name="l01476"></a><span class="lineno"> 1476</span>        <span class="keywordtype">char</span>            **customErrTxt,</div>
+<div class="line"><a id="l01477" name="l01477"></a><span class="lineno"> 1477</span>        <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>   **signature,</div>
+<div class="line"><a id="l01478" name="l01478"></a><span class="lineno"> 1478</span>        <span class="keywordtype">int</span>             *signatureLength,</div>
+<div class="line"><a id="l01479" name="l01479"></a><span class="lineno"> 1479</span>        <span class="keyword">const</span> <span class="keywordtype">char</span>      *nonce,</div>
+<div class="line"><a id="l01480" name="l01480"></a><span class="lineno"> 1480</span>        <span class="keywordtype">void</span>            *closure);</div>
+<div class="line"><a id="l01481" name="l01481"></a><span class="lineno"> 1481</span> </div>
+<div class="line"><a id="l01490" name="l01490"></a><span class="lineno"><a class="line" href="group__callbacks_group.html#ga4b02de70fe9380d184fd01d87527f499"> 1490</a></span><span class="keyword">typedef</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* (*natsTokenHandler)(<span class="keywordtype">void</span> *closure);</div>
+<div class="line"><a id="l01491" name="l01491"></a><span class="lineno"> 1491</span> </div>
+<div class="line"><a id="l01492" name="l01492"></a><span class="lineno"> 1492</span> </div>
+<div class="line"><a id="l01500" name="l01500"></a><span class="lineno"><a class="line" href="group__callbacks_group.html#ga245131e64f1d0dff7edc8ed874a07e9a"> 1500</a></span><span class="keyword">typedef</span> void (*<a class="code hl_typedef" href="group__callbacks_group.html#ga245131e64f1d0dff7edc8ed874a07e9a">natsOnCompleteCB</a>)(<span class="keywordtype">void</span> *closure);</div>
+<div class="line"><a id="l01501" name="l01501"></a><span class="lineno"> 1501</span> </div>
+<div class="line"><a id="l01522" name="l01522"></a><span class="lineno"><a class="line" href="group__callbacks_group.html#ga3353d4b92851c52121f65aaf0684cba4"> 1522</a></span><span class="keyword">typedef</span> int64_t (*<a class="code hl_typedef" href="group__callbacks_group.html#ga3353d4b92851c52121f65aaf0684cba4">natsCustomReconnectDelayHandler</a>)(<a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <span class="keywordtype">int</span> attempts, <span class="keywordtype">void</span> *closure);</div>
+<div class="line"><a id="l01523" name="l01523"></a><span class="lineno"> 1523</span> </div>
+<div class="line"><a id="l01524" name="l01524"></a><span class="lineno"> 1524</span><span class="preprocessor">#ifdef BUILD_IN_DOXYGEN</span></div>
+<div class="line"><a id="l01558" name="l01558"></a><span class="lineno"><a class="line" href="group__callbacks_group.html#ga954768cc1d3388bb6ab723e777647992"> 1558</a></span><span class="keyword">typedef</span> void (*<a class="code hl_typedef" href="group__callbacks_group.html#ga954768cc1d3388bb6ab723e777647992">jsPubAckErrHandler</a>)(<a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="code hl_struct" href="structjs_pub_ack_err.html">jsPubAckErr</a> *pae, <span class="keywordtype">void</span> *closure);</div>
+<div class="line"><a id="l01559" name="l01559"></a><span class="lineno"> 1559</span> </div>
+<div class="line"><a id="l01601" name="l01601"></a><span class="lineno"><a class="line" href="group__callbacks_group.html#ga4f66e065bd918f02510d4c53d8a5b729"> 1601</a></span><span class="keyword">typedef</span> void (*<a class="code hl_typedef" href="group__callbacks_group.html#ga4f66e065bd918f02510d4c53d8a5b729">jsPubAckHandler</a>)(<a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, <a class="code hl_struct" href="structjs_pub_ack.html">jsPubAck</a> *pa, <a class="code hl_struct" href="structjs_pub_ack_err.html">jsPubAckErr</a> *pae, <span class="keywordtype">void</span> *closure);</div>
+<div class="line"><a id="l01602" name="l01602"></a><span class="lineno"> 1602</span><span class="preprocessor">#endif</span></div>
+<div class="line"><a id="l01603" name="l01603"></a><span class="lineno"> 1603</span> </div>
+<div class="line"><a id="l01604" name="l01604"></a><span class="lineno"> 1604</span><span class="preprocessor">#if defined(NATS_HAS_STREAMING)</span></div>
+<div class="line"><a id="l01613" name="l01613"></a><span class="lineno"><a class="line" href="group__callbacks_group.html#gad5d6a685731b3bf635995b7375af4d18"> 1613</a></span><span class="keyword">typedef</span> void (*<a class="code hl_typedef" href="group__callbacks_group.html#gad5d6a685731b3bf635995b7375af4d18">stanPubAckHandler</a>)(<span class="keyword">const</span> <span class="keywordtype">char</span> *guid, <span class="keyword">const</span> <span class="keywordtype">char</span> *error, <span class="keywordtype">void</span> *closure);</div>
+<div class="line"><a id="l01614" name="l01614"></a><span class="lineno"> 1614</span> </div>
+<div class="line"><a id="l01624" name="l01624"></a><span class="lineno"><a class="line" href="group__callbacks_group.html#gaf7456e37fa14f1834d9048d3789e9409"> 1624</a></span><span class="keyword">typedef</span> void (*<a class="code hl_typedef" href="group__callbacks_group.html#gaf7456e37fa14f1834d9048d3789e9409">stanMsgHandler</a>)(</div>
+<div class="line"><a id="l01625" name="l01625"></a><span class="lineno"> 1625</span>        <a class="code hl_typedef" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *sc, <a class="code hl_typedef" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a> *sub, <span class="keyword">const</span> <span class="keywordtype">char</span> *channel, <a class="code hl_typedef" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a> *msg, <span class="keywordtype">void</span> *closure);</div>
+<div class="line"><a id="l01626" name="l01626"></a><span class="lineno"> 1626</span> </div>
+<div class="line"><a id="l01633" name="l01633"></a><span class="lineno"><a class="line" href="group__callbacks_group.html#gac34092f6c698374f86ad349302bdd55c"> 1633</a></span><span class="keyword">typedef</span> void (*<a class="code hl_typedef" href="group__callbacks_group.html#gac34092f6c698374f86ad349302bdd55c">stanConnectionLostHandler</a>)(</div>
+<div class="line"><a id="l01634" name="l01634"></a><span class="lineno"> 1634</span>        <a class="code hl_typedef" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *sc, <span class="keyword">const</span> <span class="keywordtype">char</span>* errorTxt, <span class="keywordtype">void</span> *closure);</div>
+<div class="line"><a id="l01635" name="l01635"></a><span class="lineno"> 1635</span><span class="preprocessor">#endif</span></div>
+<div class="line"><a id="l01636" name="l01636"></a><span class="lineno"> 1636</span> <span class="comment">// end of callbacksGroup</span></div>
+<div class="line"><a id="l01638" name="l01638"></a><span class="lineno"> 1638</span> </div>
+<div class="line"><a id="l01639" name="l01639"></a><span class="lineno"> 1639</span><span class="comment">//</span></div>
+<div class="line"><a id="l01640" name="l01640"></a><span class="lineno"> 1640</span><span class="comment">// Functions.</span></div>
+<div class="line"><a id="l01641" name="l01641"></a><span class="lineno"> 1641</span><span class="comment">//</span></div>
+<div class="line"><a id="l01667" name="l01667"></a><span class="lineno"> 1667</span><span class="comment"></span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l01668" name="l01668"></a><span class="lineno"><a class="line" href="group__library_group.html#ga4a26d4caecb23348f6eee862c95fee7d"> 1668</a></span><a class="code hl_function" href="group__library_group.html#ga4a26d4caecb23348f6eee862c95fee7d">nats_Open</a>(int64_t lockSpinCount);</div>
+<div class="line"><a id="l01669" name="l01669"></a><span class="lineno"> 1669</span> </div>
+<div class="line"><a id="l01670" name="l01670"></a><span class="lineno"> 1670</span> </div>
+<div class="line"><a id="l01675" name="l01675"></a><span class="lineno"> 1675</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keyword">const</span> <span class="keywordtype">char</span>*</div>
+<div class="line"><a id="l01676" name="l01676"></a><span class="lineno"><a class="line" href="group__library_group.html#ga0d8c3df1c0c4a3d340d8ff81355fb1e8"> 1676</a></span><a class="code hl_function" href="group__library_group.html#ga0d8c3df1c0c4a3d340d8ff81355fb1e8">nats_GetVersion</a>(<span class="keywordtype">void</span>);</div>
+<div class="line"><a id="l01677" name="l01677"></a><span class="lineno"> 1677</span> </div>
+<div class="line"><a id="l01685" name="l01685"></a><span class="lineno"> 1685</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> uint32_t</div>
+<div class="line"><a id="l01686" name="l01686"></a><span class="lineno"><a class="line" href="group__library_group.html#ga5fbbaa19b0290b654d2669a05bd512e8"> 1686</a></span><a class="code hl_function" href="group__library_group.html#ga5fbbaa19b0290b654d2669a05bd512e8">nats_GetVersionNumber</a>(<span class="keywordtype">void</span>);</div>
+<div class="line"><a id="l01687" name="l01687"></a><span class="lineno"> 1687</span> </div>
+<div class="line"><a id="l01688" name="l01688"></a><span class="lineno"> 1688</span><span class="preprocessor">#ifdef BUILD_IN_DOXYGEN</span></div>
+<div class="line"><a id="l01703" name="l01703"></a><span class="lineno"><a class="line" href="group__library_group.html#ga8c2ad4df801bd9d11564587ed3a7081e"> 1703</a></span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">bool</span> <a class="code hl_function" href="group__library_group.html#ga8c2ad4df801bd9d11564587ed3a7081e">nats_CheckCompatibility</a>(<span class="keywordtype">void</span>);</div>
+<div class="line"><a id="l01704" name="l01704"></a><span class="lineno"> 1704</span><span class="preprocessor">#else</span></div>
+<div class="line"><a id="l01705" name="l01705"></a><span class="lineno"> 1705</span> </div>
+<div class="line"><a id="l01706" name="l01706"></a><span class="lineno"> 1706</span><span class="preprocessor">#define nats_CheckCompatibility() nats_CheckCompatibilityImpl(NATS_VERSION_REQUIRED_NUMBER, \</span></div>
+<div class="line"><a id="l01707" name="l01707"></a><span class="lineno"> 1707</span><span class="preprocessor">                                                              NATS_VERSION_NUMBER, \</span></div>
+<div class="line"><a id="l01708" name="l01708"></a><span class="lineno"> 1708</span><span class="preprocessor">                                                              NATS_VERSION_STRING)</span></div>
+<div class="line"><a id="l01709" name="l01709"></a><span class="lineno"> 1709</span> </div>
+<div class="line"><a id="l01710" name="l01710"></a><span class="lineno"> 1710</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">bool</span></div>
+<div class="line"><a id="l01711" name="l01711"></a><span class="lineno"> 1711</span>nats_CheckCompatibilityImpl(uint32_t reqVerNumber, uint32_t verNumber, <span class="keyword">const</span> <span class="keywordtype">char</span> *verString);</div>
+<div class="line"><a id="l01712" name="l01712"></a><span class="lineno"> 1712</span> </div>
+<div class="line"><a id="l01713" name="l01713"></a><span class="lineno"> 1713</span><span class="preprocessor">#endif</span></div>
+<div class="line"><a id="l01714" name="l01714"></a><span class="lineno"> 1714</span> </div>
+<div class="line"><a id="l01719" name="l01719"></a><span class="lineno"> 1719</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t</div>
+<div class="line"><a id="l01720" name="l01720"></a><span class="lineno"><a class="line" href="group__library_group.html#gaa3c10ba3ae001595007ad0dc5dccc15e"> 1720</a></span><a class="code hl_function" href="group__library_group.html#gaa3c10ba3ae001595007ad0dc5dccc15e">nats_Now</a>(<span class="keywordtype">void</span>);</div>
+<div class="line"><a id="l01721" name="l01721"></a><span class="lineno"> 1721</span> </div>
+<div class="line"><a id="l01727" name="l01727"></a><span class="lineno"> 1727</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t</div>
+<div class="line"><a id="l01728" name="l01728"></a><span class="lineno"><a class="line" href="group__library_group.html#gacf5e423920d6a647df3bbf7de39d5223"> 1728</a></span><a class="code hl_function" href="group__library_group.html#gacf5e423920d6a647df3bbf7de39d5223">nats_NowInNanoSeconds</a>(<span class="keywordtype">void</span>);</div>
+<div class="line"><a id="l01729" name="l01729"></a><span class="lineno"> 1729</span> </div>
+<div class="line"><a id="l01737" name="l01737"></a><span class="lineno"> 1737</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l01738" name="l01738"></a><span class="lineno"><a class="line" href="group__library_group.html#gad5040264cd4b1404956babf3c03a4f09"> 1738</a></span><a class="code hl_function" href="group__library_group.html#gad5040264cd4b1404956babf3c03a4f09">nats_Sleep</a>(int64_t sleepTime);</div>
+<div class="line"><a id="l01739" name="l01739"></a><span class="lineno"> 1739</span> </div>
+<div class="line"><a id="l01752" name="l01752"></a><span class="lineno"> 1752</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keyword">const</span> <span class="keywordtype">char</span>*</div>
+<div class="line"><a id="l01753" name="l01753"></a><span class="lineno"><a class="line" href="group__library_group.html#gadecfd49a58b581dbba40da77b195fd85"> 1753</a></span><a class="code hl_function" href="group__library_group.html#gadecfd49a58b581dbba40da77b195fd85">nats_GetLastError</a>(<a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> *status);</div>
+<div class="line"><a id="l01754" name="l01754"></a><span class="lineno"> 1754</span> </div>
+<div class="line"><a id="l01763" name="l01763"></a><span class="lineno"> 1763</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l01764" name="l01764"></a><span class="lineno"><a class="line" href="group__library_group.html#gaca24172e1b97ca01cee29ca437f5702e"> 1764</a></span><a class="code hl_function" href="group__library_group.html#gaca24172e1b97ca01cee29ca437f5702e">nats_GetLastErrorStack</a>(<span class="keywordtype">char</span> *buffer, <span class="keywordtype">size_t</span> bufLen);</div>
+<div class="line"><a id="l01765" name="l01765"></a><span class="lineno"> 1765</span> </div>
+<div class="line"><a id="l01786" name="l01786"></a><span class="lineno"> 1786</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l01787" name="l01787"></a><span class="lineno"><a class="line" href="group__library_group.html#ga5fab3b18c4fe3630254483575f6066f4"> 1787</a></span><a class="code hl_function" href="group__library_group.html#ga5fab3b18c4fe3630254483575f6066f4">nats_PrintLastErrorStack</a>(FILE *file);</div>
+<div class="line"><a id="l01788" name="l01788"></a><span class="lineno"> 1788</span> </div>
+<div class="line"><a id="l01818" name="l01818"></a><span class="lineno"> 1818</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l01819" name="l01819"></a><span class="lineno"><a class="line" href="group__library_group.html#gab21e94ce7a7d226611ea2c05914cf19d"> 1819</a></span><a class="code hl_function" href="group__library_group.html#gab21e94ce7a7d226611ea2c05914cf19d">nats_SetMessageDeliveryPoolSize</a>(<span class="keywordtype">int</span> max);</div>
+<div class="line"><a id="l01820" name="l01820"></a><span class="lineno"> 1820</span> </div>
+<div class="line"><a id="l01831" name="l01831"></a><span class="lineno"> 1831</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l01832" name="l01832"></a><span class="lineno"><a class="line" href="group__library_group.html#gafe171baefa00a85b77205116e9f3e48a"> 1832</a></span><a class="code hl_function" href="group__library_group.html#gafe171baefa00a85b77205116e9f3e48a">nats_ReleaseThreadMemory</a>(<span class="keywordtype">void</span>);</div>
+<div class="line"><a id="l01833" name="l01833"></a><span class="lineno"> 1833</span> </div>
+<div class="line"><a id="l01858" name="l01858"></a><span class="lineno"> 1858</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l01859" name="l01859"></a><span class="lineno"><a class="line" href="group__library_group.html#gaf781f246e2e0ab24623ca667c48dc3ba"> 1859</a></span><a class="code hl_function" href="group__library_group.html#gaf781f246e2e0ab24623ca667c48dc3ba">nats_Sign</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>    *encodedSeed,</div>
+<div class="line"><a id="l01860" name="l01860"></a><span class="lineno"> 1860</span>          <span class="keyword">const</span> <span class="keywordtype">char</span>    *input,</div>
+<div class="line"><a id="l01861" name="l01861"></a><span class="lineno"> 1861</span>          <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> **signature,</div>
+<div class="line"><a id="l01862" name="l01862"></a><span class="lineno"> 1862</span>          <span class="keywordtype">int</span>           *signatureLength);</div>
+<div class="line"><a id="l01863" name="l01863"></a><span class="lineno"> 1863</span> </div>
+<div class="line"><a id="l01884" name="l01884"></a><span class="lineno"> 1884</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l01885" name="l01885"></a><span class="lineno"><a class="line" href="group__library_group.html#gae75131e0ce4e5b89d0f82ea7892f112e"> 1885</a></span><a class="code hl_function" href="group__library_group.html#gae75131e0ce4e5b89d0f82ea7892f112e">nats_Close</a>(<span class="keywordtype">void</span>);</div>
+<div class="line"><a id="l01886" name="l01886"></a><span class="lineno"> 1886</span> </div>
+<div class="line"><a id="l01932" name="l01932"></a><span class="lineno"> 1932</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l01933" name="l01933"></a><span class="lineno"><a class="line" href="group__library_group.html#gaf75bb5b38bf32e6a8f43e54068625903"> 1933</a></span><a class="code hl_function" href="group__library_group.html#gaf75bb5b38bf32e6a8f43e54068625903">nats_CloseAndWait</a>(int64_t timeout);</div>
+<div class="line"><a id="l01934" name="l01934"></a><span class="lineno"> 1934</span> <span class="comment">// end of libraryGroup</span></div>
+<div class="line"><a id="l01936" name="l01936"></a><span class="lineno"> 1936</span> </div>
+<div class="line"><a id="l01952" name="l01952"></a><span class="lineno"> 1952</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keyword">const</span> <span class="keywordtype">char</span>*</div>
+<div class="line"><a id="l01953" name="l01953"></a><span class="lineno"><a class="line" href="group__status_group.html#ga4a83c4a08f1e4dd9451c1a88b6a4254e"> 1953</a></span><a class="code hl_function" href="group__status_group.html#ga4a83c4a08f1e4dd9451c1a88b6a4254e">natsStatus_GetText</a>(<a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> s);</div>
+<div class="line"><a id="l01954" name="l01954"></a><span class="lineno"> 1954</span> <span class="comment">// end of statusGroup</span></div>
+<div class="line"><a id="l01956" name="l01956"></a><span class="lineno"> 1956</span> </div>
+<div class="line"><a id="l01974" name="l01974"></a><span class="lineno"> 1974</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l01975" name="l01975"></a><span class="lineno"><a class="line" href="group__stats_group.html#gafa923df029168f4991b77ffdd9e24877"> 1975</a></span><a class="code hl_function" href="group__stats_group.html#gafa923df029168f4991b77ffdd9e24877">natsStatistics_Create</a>(<a class="code hl_typedef" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa">natsStatistics</a> **newStats);</div>
+<div class="line"><a id="l01976" name="l01976"></a><span class="lineno"> 1976</span> </div>
+<div class="line"><a id="l01993" name="l01993"></a><span class="lineno"> 1993</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l01994" name="l01994"></a><span class="lineno"><a class="line" href="group__stats_group.html#gad85f5ffb4272713f6cc6d988e6d4e75f"> 1994</a></span><a class="code hl_function" href="group__stats_group.html#gad85f5ffb4272713f6cc6d988e6d4e75f">natsStatistics_GetCounts</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa">natsStatistics</a> *stats,</div>
+<div class="line"><a id="l01995" name="l01995"></a><span class="lineno"> 1995</span>                         uint64_t *inMsgs, uint64_t *inBytes,</div>
+<div class="line"><a id="l01996" name="l01996"></a><span class="lineno"> 1996</span>                         uint64_t *outMsgs, uint64_t *outBytes,</div>
+<div class="line"><a id="l01997" name="l01997"></a><span class="lineno"> 1997</span>                         uint64_t *reconnects);</div>
+<div class="line"><a id="l01998" name="l01998"></a><span class="lineno"> 1998</span> </div>
+<div class="line"><a id="l02005" name="l02005"></a><span class="lineno"> 2005</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l02006" name="l02006"></a><span class="lineno"><a class="line" href="group__stats_group.html#ga26a04e77af8fc160adf7c33088dcf59c"> 2006</a></span><a class="code hl_function" href="group__stats_group.html#ga26a04e77af8fc160adf7c33088dcf59c">natsStatistics_Destroy</a>(<a class="code hl_typedef" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa">natsStatistics</a> *stats);</div>
+<div class="line"><a id="l02007" name="l02007"></a><span class="lineno"> 2007</span> <span class="comment">// end of statsGroup</span></div>
+<div class="line"><a id="l02009" name="l02009"></a><span class="lineno"> 2009</span> </div>
+<div class="line"><a id="l02034" name="l02034"></a><span class="lineno"> 2034</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02035" name="l02035"></a><span class="lineno"><a class="line" href="group__opts_group.html#ga61d4a0cf2fbf7d13cc910e5a00c575be"> 2035</a></span><a class="code hl_function" href="group__opts_group.html#ga61d4a0cf2fbf7d13cc910e5a00c575be">natsOptions_Create</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> **newOpts);</div>
+<div class="line"><a id="l02036" name="l02036"></a><span class="lineno"> 2036</span> </div>
+<div class="line"><a id="l02057" name="l02057"></a><span class="lineno"> 2057</span><span class="comment">/*</span></div>
+<div class="line"><a id="l02058" name="l02058"></a><span class="lineno"> 2058</span><span class="comment"> * The above is for doxygen. The proper syntax for username/password</span></div>
+<div class="line"><a id="l02059" name="l02059"></a><span class="lineno"> 2059</span><span class="comment"> * is without the &#39;\&#39; character:</span></div>
+<div class="line"><a id="l02060" name="l02060"></a><span class="lineno"> 2060</span><span class="comment"> *</span></div>
+<div class="line"><a id="l02061" name="l02061"></a><span class="lineno"> 2061</span><span class="comment"> * nats://localhost:4222</span></div>
+<div class="line"><a id="l02062" name="l02062"></a><span class="lineno"> 2062</span><span class="comment"> * nats://user@localhost:4222</span></div>
+<div class="line"><a id="l02063" name="l02063"></a><span class="lineno"> 2063</span><span class="comment"> * nats://user:password@localhost:4222</span></div>
+<div class="line"><a id="l02064" name="l02064"></a><span class="lineno"> 2064</span><span class="comment"> */</span></div>
+<div class="line"><a id="l02065" name="l02065"></a><span class="lineno"> 2065</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02066" name="l02066"></a><span class="lineno"><a class="line" href="group__opts_group.html#ga3f7e760214417c7d87541ecb9ab5bea5"> 2066</a></span><a class="code hl_function" href="group__opts_group.html#ga3f7e760214417c7d87541ecb9ab5bea5">natsOptions_SetURL</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <span class="keyword">const</span> <span class="keywordtype">char</span> *url);</div>
+<div class="line"><a id="l02067" name="l02067"></a><span class="lineno"> 2067</span> </div>
+<div class="line"><a id="l02082" name="l02082"></a><span class="lineno"> 2082</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02083" name="l02083"></a><span class="lineno"><a class="line" href="group__opts_group.html#gacb7e964ae54b74d972d72e118b7b8bdf"> 2083</a></span><a class="code hl_function" href="group__opts_group.html#gacb7e964ae54b74d972d72e118b7b8bdf">natsOptions_SetServers</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <span class="keyword">const</span> <span class="keywordtype">char</span>** servers, <span class="keywordtype">int</span> serversCount);</div>
+<div class="line"><a id="l02084" name="l02084"></a><span class="lineno"> 2084</span> </div>
+<div class="line"><a id="l02110" name="l02110"></a><span class="lineno"> 2110</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02111" name="l02111"></a><span class="lineno"><a class="line" href="group__opts_group.html#ga5b99da7dd74aac3be962f323c3863d9e"> 2111</a></span><a class="code hl_function" href="group__opts_group.html#ga5b99da7dd74aac3be962f323c3863d9e">natsOptions_SetUserInfo</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <span class="keyword">const</span> <span class="keywordtype">char</span> *user, <span class="keyword">const</span> <span class="keywordtype">char</span> *password);</div>
+<div class="line"><a id="l02112" name="l02112"></a><span class="lineno"> 2112</span> </div>
+<div class="line"><a id="l02137" name="l02137"></a><span class="lineno"> 2137</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02138" name="l02138"></a><span class="lineno"><a class="line" href="group__opts_group.html#gad58a5b9dabadeebda30e952ff7b39193"> 2138</a></span><a class="code hl_function" href="group__opts_group.html#gad58a5b9dabadeebda30e952ff7b39193">natsOptions_SetToken</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <span class="keyword">const</span> <span class="keywordtype">char</span> *token);</div>
+<div class="line"><a id="l02139" name="l02139"></a><span class="lineno"> 2139</span> </div>
+<div class="line"><a id="l02155" name="l02155"></a><span class="lineno"> 2155</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02156" name="l02156"></a><span class="lineno"><a class="line" href="group__opts_group.html#ga23a3b1f022112e98ddccb18b247b4426"> 2156</a></span><a class="code hl_function" href="group__opts_group.html#ga23a3b1f022112e98ddccb18b247b4426">natsOptions_SetTokenHandler</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <a class="code hl_typedef" href="group__callbacks_group.html#ga4b02de70fe9380d184fd01d87527f499">natsTokenHandler</a> tokenCb,</div>
+<div class="line"><a id="l02157" name="l02157"></a><span class="lineno"> 2157</span>                            <span class="keywordtype">void</span> *closure);</div>
+<div class="line"><a id="l02158" name="l02158"></a><span class="lineno"> 2158</span> </div>
+<div class="line"><a id="l02168" name="l02168"></a><span class="lineno"> 2168</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02169" name="l02169"></a><span class="lineno"><a class="line" href="group__opts_group.html#gaabf8763b931dcf389c83fd95d760a413"> 2169</a></span><a class="code hl_function" href="group__opts_group.html#gaabf8763b931dcf389c83fd95d760a413">natsOptions_SetNoRandomize</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <span class="keywordtype">bool</span> noRandomize);</div>
+<div class="line"><a id="l02170" name="l02170"></a><span class="lineno"> 2170</span> </div>
+<div class="line"><a id="l02183" name="l02183"></a><span class="lineno"> 2183</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02184" name="l02184"></a><span class="lineno"><a class="line" href="group__opts_group.html#ga17cd7fe41176cd98aca1184fa9352ad9"> 2184</a></span><a class="code hl_function" href="group__opts_group.html#ga17cd7fe41176cd98aca1184fa9352ad9">natsOptions_SetTimeout</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int64_t timeout);</div>
+<div class="line"><a id="l02185" name="l02185"></a><span class="lineno"> 2185</span> </div>
+<div class="line"><a id="l02193" name="l02193"></a><span class="lineno"> 2193</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02194" name="l02194"></a><span class="lineno"><a class="line" href="group__opts_group.html#ga1c529d347be0fe2eec17c7f4698e283e"> 2194</a></span><a class="code hl_function" href="group__opts_group.html#ga1c529d347be0fe2eec17c7f4698e283e">natsOptions_SetName</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <span class="keyword">const</span> <span class="keywordtype">char</span> *name);</div>
+<div class="line"><a id="l02195" name="l02195"></a><span class="lineno"> 2195</span> </div>
+<div class="line"><a id="l02205" name="l02205"></a><span class="lineno"> 2205</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02206" name="l02206"></a><span class="lineno"><a class="line" href="group__opts_group.html#gaa1f09416d443fa7a6af6b695da563eba"> 2206</a></span><a class="code hl_function" href="group__opts_group.html#gaa1f09416d443fa7a6af6b695da563eba">natsOptions_SetSecure</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <span class="keywordtype">bool</span> secure);</div>
+<div class="line"><a id="l02207" name="l02207"></a><span class="lineno"> 2207</span> </div>
+<div class="line"><a id="l02221" name="l02221"></a><span class="lineno"> 2221</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02222" name="l02222"></a><span class="lineno"><a class="line" href="group__opts_group.html#ga2cd6563694a439b3949a31fd81103099"> 2222</a></span><a class="code hl_function" href="group__opts_group.html#ga2cd6563694a439b3949a31fd81103099">natsOptions_LoadCATrustedCertificates</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <span class="keyword">const</span> <span class="keywordtype">char</span> *fileName);</div>
+<div class="line"><a id="l02223" name="l02223"></a><span class="lineno"> 2223</span> </div>
+<div class="line"><a id="l02249" name="l02249"></a><span class="lineno"> 2249</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02250" name="l02250"></a><span class="lineno"><a class="line" href="group__opts_group.html#gafb30794fc2ae74b9e0bd8fb609b901c8"> 2250</a></span><a class="code hl_function" href="group__opts_group.html#gafb30794fc2ae74b9e0bd8fb609b901c8">natsOptions_SetCATrustedCertificates</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <span class="keyword">const</span> <span class="keywordtype">char</span> *certificates);</div>
+<div class="line"><a id="l02251" name="l02251"></a><span class="lineno"> 2251</span> </div>
+<div class="line"><a id="l02266" name="l02266"></a><span class="lineno"> 2266</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02267" name="l02267"></a><span class="lineno"><a class="line" href="group__opts_group.html#ga36943e2ba53d05407cdabc4e7e96484b"> 2267</a></span><a class="code hl_function" href="group__opts_group.html#ga36943e2ba53d05407cdabc4e7e96484b">natsOptions_LoadCertificatesChain</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts,</div>
+<div class="line"><a id="l02268" name="l02268"></a><span class="lineno"> 2268</span>                                  <span class="keyword">const</span> <span class="keywordtype">char</span> *certsFileName,</div>
+<div class="line"><a id="l02269" name="l02269"></a><span class="lineno"> 2269</span>                                  <span class="keyword">const</span> <span class="keywordtype">char</span> *keyFileName);</div>
+<div class="line"><a id="l02270" name="l02270"></a><span class="lineno"> 2270</span> </div>
+<div class="line"><a id="l02282" name="l02282"></a><span class="lineno"> 2282</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02283" name="l02283"></a><span class="lineno"><a class="line" href="group__opts_group.html#gae98f0f9034e93941767ab1ae6eec2c0c"> 2283</a></span><a class="code hl_function" href="group__opts_group.html#gae98f0f9034e93941767ab1ae6eec2c0c">natsOptions_SetCertificatesChain</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts,</div>
+<div class="line"><a id="l02284" name="l02284"></a><span class="lineno"> 2284</span>                                 <span class="keyword">const</span> <span class="keywordtype">char</span> *cert,</div>
+<div class="line"><a id="l02285" name="l02285"></a><span class="lineno"> 2285</span>                                 <span class="keyword">const</span> <span class="keywordtype">char</span> *key);</div>
+<div class="line"><a id="l02286" name="l02286"></a><span class="lineno"> 2286</span> </div>
+<div class="line"><a id="l02302" name="l02302"></a><span class="lineno"> 2302</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02303" name="l02303"></a><span class="lineno"><a class="line" href="group__opts_group.html#ga5698f020e8eb3e7440eb073fe08ef62c"> 2303</a></span><a class="code hl_function" href="group__opts_group.html#ga5698f020e8eb3e7440eb073fe08ef62c">natsOptions_SetCiphers</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <span class="keyword">const</span> <span class="keywordtype">char</span> *ciphers);</div>
+<div class="line"><a id="l02304" name="l02304"></a><span class="lineno"> 2304</span> </div>
+<div class="line"><a id="l02318" name="l02318"></a><span class="lineno"> 2318</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02319" name="l02319"></a><span class="lineno"><a class="line" href="group__opts_group.html#ga2b7f144b011d8ce62941b608a8f324f0"> 2319</a></span><a class="code hl_function" href="group__opts_group.html#ga2b7f144b011d8ce62941b608a8f324f0">natsOptions_SetCipherSuites</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <span class="keyword">const</span> <span class="keywordtype">char</span> *ciphers);</div>
+<div class="line"><a id="l02320" name="l02320"></a><span class="lineno"> 2320</span> </div>
+<div class="line"><a id="l02330" name="l02330"></a><span class="lineno"> 2330</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02331" name="l02331"></a><span class="lineno"><a class="line" href="group__opts_group.html#ga0ba43ba9930df385e4781b12be9f2851"> 2331</a></span><a class="code hl_function" href="group__opts_group.html#ga0ba43ba9930df385e4781b12be9f2851">natsOptions_SetExpectedHostname</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <span class="keyword">const</span> <span class="keywordtype">char</span> *hostname);</div>
+<div class="line"><a id="l02332" name="l02332"></a><span class="lineno"> 2332</span> </div>
+<div class="line"><a id="l02343" name="l02343"></a><span class="lineno"> 2343</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02344" name="l02344"></a><span class="lineno"><a class="line" href="group__opts_group.html#ga6f804ec44adc299989fe623570679da3"> 2344</a></span><a class="code hl_function" href="group__opts_group.html#ga6f804ec44adc299989fe623570679da3">natsOptions_SkipServerVerification</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <span class="keywordtype">bool</span> skip);</div>
+<div class="line"><a id="l02345" name="l02345"></a><span class="lineno"> 2345</span> </div>
+<div class="line"><a id="l02356" name="l02356"></a><span class="lineno"> 2356</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02357" name="l02357"></a><span class="lineno"><a class="line" href="group__opts_group.html#gaa16bfd09ef318af18c27a0e199681b69"> 2357</a></span><a class="code hl_function" href="group__opts_group.html#gaa16bfd09ef318af18c27a0e199681b69">natsOptions_SetVerbose</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <span class="keywordtype">bool</span> verbose);</div>
+<div class="line"><a id="l02358" name="l02358"></a><span class="lineno"> 2358</span> </div>
+<div class="line"><a id="l02369" name="l02369"></a><span class="lineno"> 2369</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02370" name="l02370"></a><span class="lineno"><a class="line" href="group__opts_group.html#ga26f166af20de98bec67bc6cc916f769e"> 2370</a></span><a class="code hl_function" href="group__opts_group.html#ga26f166af20de98bec67bc6cc916f769e">natsOptions_SetPedantic</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <span class="keywordtype">bool</span> pedantic);</div>
+<div class="line"><a id="l02371" name="l02371"></a><span class="lineno"> 2371</span> </div>
+<div class="line"><a id="l02381" name="l02381"></a><span class="lineno"> 2381</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02382" name="l02382"></a><span class="lineno"><a class="line" href="group__opts_group.html#gae68fb615835364c0809555e8dc93f57e"> 2382</a></span><a class="code hl_function" href="group__opts_group.html#gae68fb615835364c0809555e8dc93f57e">natsOptions_SetPingInterval</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int64_t interval);</div>
+<div class="line"><a id="l02383" name="l02383"></a><span class="lineno"> 2383</span> </div>
+<div class="line"><a id="l02395" name="l02395"></a><span class="lineno"> 2395</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02396" name="l02396"></a><span class="lineno"><a class="line" href="group__opts_group.html#gaaff89c3f41627f4b2929dbc9b82d265b"> 2396</a></span><a class="code hl_function" href="group__opts_group.html#gaaff89c3f41627f4b2929dbc9b82d265b">natsOptions_SetMaxPingsOut</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <span class="keywordtype">int</span> maxPingsOut);</div>
+<div class="line"><a id="l02397" name="l02397"></a><span class="lineno"> 2397</span> </div>
+<div class="line"><a id="l02409" name="l02409"></a><span class="lineno"> 2409</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02410" name="l02410"></a><span class="lineno"><a class="line" href="group__opts_group.html#ga1a3e3abfd7ddd8aff247df8f332bbda3"> 2410</a></span><a class="code hl_function" href="group__opts_group.html#ga1a3e3abfd7ddd8aff247df8f332bbda3">natsOptions_SetIOBufSize</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <span class="keywordtype">int</span> ioBufSize);</div>
+<div class="line"><a id="l02411" name="l02411"></a><span class="lineno"> 2411</span> </div>
+<div class="line"><a id="l02423" name="l02423"></a><span class="lineno"> 2423</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02424" name="l02424"></a><span class="lineno"><a class="line" href="group__opts_group.html#ga3d1d3cb2f2a0e23d27dd60e96d1cc91b"> 2424</a></span><a class="code hl_function" href="group__opts_group.html#ga3d1d3cb2f2a0e23d27dd60e96d1cc91b">natsOptions_SetAllowReconnect</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <span class="keywordtype">bool</span> allow);</div>
+<div class="line"><a id="l02425" name="l02425"></a><span class="lineno"> 2425</span> </div>
+<div class="line"><a id="l02433" name="l02433"></a><span class="lineno"> 2433</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02434" name="l02434"></a><span class="lineno"><a class="line" href="group__opts_group.html#gab54cd2719c0b64eebd6c7b83dd2908a0"> 2434</a></span><a class="code hl_function" href="group__opts_group.html#gab54cd2719c0b64eebd6c7b83dd2908a0">natsOptions_SetMaxReconnect</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <span class="keywordtype">int</span> maxReconnect);</div>
+<div class="line"><a id="l02435" name="l02435"></a><span class="lineno"> 2435</span> </div>
+<div class="line"><a id="l02449" name="l02449"></a><span class="lineno"> 2449</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02450" name="l02450"></a><span class="lineno"><a class="line" href="group__opts_group.html#ga2730f4e16e318a2ef8de98dbf6ede807"> 2450</a></span><a class="code hl_function" href="group__opts_group.html#ga2730f4e16e318a2ef8de98dbf6ede807">natsOptions_SetReconnectWait</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int64_t reconnectWait);</div>
+<div class="line"><a id="l02451" name="l02451"></a><span class="lineno"> 2451</span> </div>
+<div class="line"><a id="l02475" name="l02475"></a><span class="lineno"> 2475</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02476" name="l02476"></a><span class="lineno"><a class="line" href="group__opts_group.html#ga8f3df57ed8ae418d3ae6678ae5e2a5d2"> 2476</a></span><a class="code hl_function" href="group__opts_group.html#ga8f3df57ed8ae418d3ae6678ae5e2a5d2">natsOptions_SetReconnectJitter</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int64_t jitter, int64_t jitterTLS);</div>
+<div class="line"><a id="l02477" name="l02477"></a><span class="lineno"> 2477</span> </div>
+<div class="line"><a id="l02496" name="l02496"></a><span class="lineno"> 2496</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02497" name="l02497"></a><span class="lineno"><a class="line" href="group__opts_group.html#ga3593165aa113d6736e0226ddc56b3e9d"> 2497</a></span><a class="code hl_function" href="group__opts_group.html#ga3593165aa113d6736e0226ddc56b3e9d">natsOptions_SetCustomReconnectDelay</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts,</div>
+<div class="line"><a id="l02498" name="l02498"></a><span class="lineno"> 2498</span>                                    <a class="code hl_typedef" href="group__callbacks_group.html#ga3353d4b92851c52121f65aaf0684cba4">natsCustomReconnectDelayHandler</a> cb,</div>
+<div class="line"><a id="l02499" name="l02499"></a><span class="lineno"> 2499</span>                                    <span class="keywordtype">void</span> *closure);</div>
+<div class="line"><a id="l02500" name="l02500"></a><span class="lineno"> 2500</span> </div>
+<div class="line"><a id="l02513" name="l02513"></a><span class="lineno"> 2513</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02514" name="l02514"></a><span class="lineno"><a class="line" href="group__opts_group.html#gaa0d4b7ece8477cb9879f0dafff3456a5"> 2514</a></span><a class="code hl_function" href="group__opts_group.html#gaa0d4b7ece8477cb9879f0dafff3456a5">natsOptions_SetReconnectBufSize</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <span class="keywordtype">int</span> reconnectBufSize);</div>
+<div class="line"><a id="l02515" name="l02515"></a><span class="lineno"> 2515</span> </div>
+<div class="line"><a id="l02529" name="l02529"></a><span class="lineno"> 2529</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02530" name="l02530"></a><span class="lineno"><a class="line" href="group__opts_group.html#ga95510436eee06f9992ded96a44795c40"> 2530</a></span><a class="code hl_function" href="group__opts_group.html#ga95510436eee06f9992ded96a44795c40">natsOptions_SetMaxPendingMsgs</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <span class="keywordtype">int</span> maxPending);</div>
+<div class="line"><a id="l02531" name="l02531"></a><span class="lineno"> 2531</span> </div>
+<div class="line"><a id="l02546" name="l02546"></a><span class="lineno"> 2546</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02547" name="l02547"></a><span class="lineno"><a class="line" href="group__opts_group.html#ga127ec7a8196b453947a7fa9a64096cbd"> 2547</a></span><a class="code hl_function" href="group__opts_group.html#ga127ec7a8196b453947a7fa9a64096cbd">natsOptions_SetErrorHandler</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <a class="code hl_typedef" href="group__callbacks_group.html#ga9e511dffa471dfb971b7dd2b12329626">natsErrHandler</a> errHandler,</div>
+<div class="line"><a id="l02548" name="l02548"></a><span class="lineno"> 2548</span>                            <span class="keywordtype">void</span> *closure);</div>
+<div class="line"><a id="l02549" name="l02549"></a><span class="lineno"> 2549</span> </div>
+<div class="line"><a id="l02562" name="l02562"></a><span class="lineno"> 2562</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02563" name="l02563"></a><span class="lineno"><a class="line" href="group__opts_group.html#ga44410242e73134e5bb51ef27904a9253"> 2563</a></span><a class="code hl_function" href="group__opts_group.html#ga44410242e73134e5bb51ef27904a9253">natsOptions_SetClosedCB</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <a class="code hl_typedef" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a> closedCb,</div>
+<div class="line"><a id="l02564" name="l02564"></a><span class="lineno"> 2564</span>                        <span class="keywordtype">void</span> *closure);</div>
+<div class="line"><a id="l02565" name="l02565"></a><span class="lineno"> 2565</span> </div>
+<div class="line"><a id="l02582" name="l02582"></a><span class="lineno"> 2582</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02583" name="l02583"></a><span class="lineno"><a class="line" href="group__opts_group.html#gadc8dc0cedd91bda71d544f3dedc4a039"> 2583</a></span><a class="code hl_function" href="group__opts_group.html#gadc8dc0cedd91bda71d544f3dedc4a039">natsOptions_SetDisconnectedCB</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts,</div>
+<div class="line"><a id="l02584" name="l02584"></a><span class="lineno"> 2584</span>                              <a class="code hl_typedef" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a> disconnectedCb,</div>
+<div class="line"><a id="l02585" name="l02585"></a><span class="lineno"> 2585</span>                              <span class="keywordtype">void</span> *closure);</div>
+<div class="line"><a id="l02586" name="l02586"></a><span class="lineno"> 2586</span> </div>
+<div class="line"><a id="l02602" name="l02602"></a><span class="lineno"> 2602</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02603" name="l02603"></a><span class="lineno"><a class="line" href="group__opts_group.html#ga26a48c8529fffa5f5d1a61c030979980"> 2603</a></span><a class="code hl_function" href="group__opts_group.html#ga26a48c8529fffa5f5d1a61c030979980">natsOptions_SetReconnectedCB</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts,</div>
+<div class="line"><a id="l02604" name="l02604"></a><span class="lineno"> 2604</span>                             <a class="code hl_typedef" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a> reconnectedCb,</div>
+<div class="line"><a id="l02605" name="l02605"></a><span class="lineno"> 2605</span>                             <span class="keywordtype">void</span> *closure);</div>
+<div class="line"><a id="l02606" name="l02606"></a><span class="lineno"> 2606</span> </div>
+<div class="line"><a id="l02621" name="l02621"></a><span class="lineno"> 2621</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02622" name="l02622"></a><span class="lineno"><a class="line" href="group__opts_group.html#gab5baab507c974402ab0d8c5e8227ee65"> 2622</a></span><a class="code hl_function" href="group__opts_group.html#gab5baab507c974402ab0d8c5e8227ee65">natsOptions_SetDiscoveredServersCB</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts,</div>
+<div class="line"><a id="l02623" name="l02623"></a><span class="lineno"> 2623</span>                                   <a class="code hl_typedef" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a> discoveredServersCb,</div>
+<div class="line"><a id="l02624" name="l02624"></a><span class="lineno"> 2624</span>                                   <span class="keywordtype">void</span> *closure);</div>
+<div class="line"><a id="l02625" name="l02625"></a><span class="lineno"> 2625</span> </div>
+<div class="line"><a id="l02639" name="l02639"></a><span class="lineno"> 2639</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02640" name="l02640"></a><span class="lineno"><a class="line" href="group__opts_group.html#ga7e4172084520708b8c9f28e73174461c"> 2640</a></span><a class="code hl_function" href="group__opts_group.html#ga7e4172084520708b8c9f28e73174461c">natsOptions_SetIgnoreDiscoveredServers</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <span class="keywordtype">bool</span> ignore);</div>
+<div class="line"><a id="l02641" name="l02641"></a><span class="lineno"> 2641</span> </div>
+<div class="line"><a id="l02658" name="l02658"></a><span class="lineno"> 2658</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02659" name="l02659"></a><span class="lineno"><a class="line" href="group__opts_group.html#ga54dea2ffeb33779771652a7a14fc4adc"> 2659</a></span><a class="code hl_function" href="group__opts_group.html#ga54dea2ffeb33779771652a7a14fc4adc">natsOptions_SetLameDuckModeCB</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts,</div>
+<div class="line"><a id="l02660" name="l02660"></a><span class="lineno"> 2660</span>                              <a class="code hl_typedef" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a> lameDuckCb,</div>
+<div class="line"><a id="l02661" name="l02661"></a><span class="lineno"> 2661</span>                              <span class="keywordtype">void</span> *closure);</div>
+<div class="line"><a id="l02662" name="l02662"></a><span class="lineno"> 2662</span> </div>
+<div class="line"><a id="l02680" name="l02680"></a><span class="lineno"> 2680</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02681" name="l02681"></a><span class="lineno"><a class="line" href="group__opts_group.html#gab09491bad908dedcb323c780280733ff"> 2681</a></span><a class="code hl_function" href="group__opts_group.html#gab09491bad908dedcb323c780280733ff">natsOptions_SetEventLoop</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts,</div>
+<div class="line"><a id="l02682" name="l02682"></a><span class="lineno"> 2682</span>                         <span class="keywordtype">void</span> *loop,</div>
+<div class="line"><a id="l02683" name="l02683"></a><span class="lineno"> 2683</span>                         <a class="code hl_typedef" href="group__callbacks_group.html#ga245eab0a01a485e40fba267f84ec037f">natsEvLoop_Attach</a>          attachCb,</div>
+<div class="line"><a id="l02684" name="l02684"></a><span class="lineno"> 2684</span>                         <a class="code hl_typedef" href="group__callbacks_group.html#gaea4c125ecfb43eaf43da20e8444c2aaa">natsEvLoop_ReadAddRemove</a>   readCb,</div>
+<div class="line"><a id="l02685" name="l02685"></a><span class="lineno"> 2685</span>                         <a class="code hl_typedef" href="group__callbacks_group.html#ga2bb5dd2d821ca5bbc0488f7e6aceed17">natsEvLoop_WriteAddRemove</a>  writeCb,</div>
+<div class="line"><a id="l02686" name="l02686"></a><span class="lineno"> 2686</span>                         <a class="code hl_typedef" href="group__callbacks_group.html#gab63dee7f7012ba11ae20b76dbc36f2d0">natsEvLoop_Detach</a>          detachCb);</div>
+<div class="line"><a id="l02687" name="l02687"></a><span class="lineno"> 2687</span> </div>
+<div class="line"><a id="l02710" name="l02710"></a><span class="lineno"> 2710</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02711" name="l02711"></a><span class="lineno"><a class="line" href="group__opts_group.html#gabf060c92648b50c069f0abe7cbb06f1c"> 2711</a></span><a class="code hl_function" href="group__opts_group.html#gabf060c92648b50c069f0abe7cbb06f1c">natsOptions_UseGlobalMessageDelivery</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <span class="keywordtype">bool</span> global);</div>
+<div class="line"><a id="l02712" name="l02712"></a><span class="lineno"> 2712</span> </div>
+<div class="line"><a id="l02735" name="l02735"></a><span class="lineno"> 2735</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02736" name="l02736"></a><span class="lineno"><a class="line" href="group__opts_group.html#ga7ca713c7532eff4d41a492e95b8822cf"> 2736</a></span><a class="code hl_function" href="group__opts_group.html#ga7ca713c7532eff4d41a492e95b8822cf">natsOptions_IPResolutionOrder</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <span class="keywordtype">int</span> order);</div>
+<div class="line"><a id="l02737" name="l02737"></a><span class="lineno"> 2737</span> </div>
+<div class="line"><a id="l02765" name="l02765"></a><span class="lineno"> 2765</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02766" name="l02766"></a><span class="lineno"><a class="line" href="group__opts_group.html#ga8f06568cc3319a5a0eef9f80282034ca"> 2766</a></span><a class="code hl_function" href="group__opts_group.html#ga8f06568cc3319a5a0eef9f80282034ca">natsOptions_SetSendAsap</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <span class="keywordtype">bool</span> sendAsap);</div>
+<div class="line"><a id="l02767" name="l02767"></a><span class="lineno"> 2767</span> </div>
+<div class="line"><a id="l02777" name="l02777"></a><span class="lineno"> 2777</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02778" name="l02778"></a><span class="lineno"><a class="line" href="group__opts_group.html#ga70aa85319933d78c0076cc862fa3e5a6"> 2778</a></span><a class="code hl_function" href="group__opts_group.html#ga70aa85319933d78c0076cc862fa3e5a6">natsOptions_UseOldRequestStyle</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <span class="keywordtype">bool</span> useOldStyle);</div>
+<div class="line"><a id="l02779" name="l02779"></a><span class="lineno"> 2779</span> </div>
+<div class="line"><a id="l02794" name="l02794"></a><span class="lineno"> 2794</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02795" name="l02795"></a><span class="lineno"><a class="line" href="group__opts_group.html#gadef4376a5e608cbc8c1a9e2b6335dc79"> 2795</a></span><a class="code hl_function" href="group__opts_group.html#gadef4376a5e608cbc8c1a9e2b6335dc79">natsOptions_SetFailRequestsOnDisconnect</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <span class="keywordtype">bool</span> failRequests);</div>
+<div class="line"><a id="l02796" name="l02796"></a><span class="lineno"> 2796</span> </div>
+<div class="line"><a id="l02815" name="l02815"></a><span class="lineno"> 2815</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02816" name="l02816"></a><span class="lineno"><a class="line" href="group__opts_group.html#ga4f694b87039cedaa65cd25656b14d1a3"> 2816</a></span><a class="code hl_function" href="group__opts_group.html#ga4f694b87039cedaa65cd25656b14d1a3">natsOptions_SetNoEcho</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <span class="keywordtype">bool</span> noEcho);</div>
+<div class="line"><a id="l02817" name="l02817"></a><span class="lineno"> 2817</span> </div>
+<div class="line"><a id="l02871" name="l02871"></a><span class="lineno"> 2871</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02872" name="l02872"></a><span class="lineno"><a class="line" href="group__opts_group.html#ga20946800d024b7089e73d63454d1c19f"> 2872</a></span><a class="code hl_function" href="group__opts_group.html#ga20946800d024b7089e73d63454d1c19f">natsOptions_SetRetryOnFailedConnect</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <span class="keywordtype">bool</span> retry,</div>
+<div class="line"><a id="l02873" name="l02873"></a><span class="lineno"> 2873</span>        <a class="code hl_typedef" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a> connectedCb, <span class="keywordtype">void</span>* closure);</div>
+<div class="line"><a id="l02874" name="l02874"></a><span class="lineno"> 2874</span> </div>
+<div class="line"><a id="l02903" name="l02903"></a><span class="lineno"> 2903</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02904" name="l02904"></a><span class="lineno"><a class="line" href="group__opts_group.html#ga60117450fc1f7b6f81bab455aeed7515"> 2904</a></span><a class="code hl_function" href="group__opts_group.html#ga60117450fc1f7b6f81bab455aeed7515">natsOptions_SetUserCredentialsCallbacks</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts,</div>
+<div class="line"><a id="l02905" name="l02905"></a><span class="lineno"> 2905</span>                                        <a class="code hl_typedef" href="group__callbacks_group.html#ga258b30458134be90f17315c037f34b7b">natsUserJWTHandler</a>      ujwtCB,</div>
+<div class="line"><a id="l02906" name="l02906"></a><span class="lineno"> 2906</span>                                        <span class="keywordtype">void</span>                    *ujwtClosure,</div>
+<div class="line"><a id="l02907" name="l02907"></a><span class="lineno"> 2907</span>                                        <a class="code hl_typedef" href="group__callbacks_group.html#gab786ffd670c86de0563559351305080b">natsSignatureHandler</a>    sigCB,</div>
+<div class="line"><a id="l02908" name="l02908"></a><span class="lineno"> 2908</span>                                        <span class="keywordtype">void</span>                    *sigClosure);</div>
+<div class="line"><a id="l02909" name="l02909"></a><span class="lineno"> 2909</span> </div>
+<div class="line"><a id="l02948" name="l02948"></a><span class="lineno"> 2948</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02949" name="l02949"></a><span class="lineno"><a class="line" href="group__opts_group.html#ga59b47f7b7a19085cf8eaada9bfe5606e"> 2949</a></span><a class="code hl_function" href="group__opts_group.html#ga59b47f7b7a19085cf8eaada9bfe5606e">natsOptions_SetUserCredentialsFromFiles</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts,</div>
+<div class="line"><a id="l02950" name="l02950"></a><span class="lineno"> 2950</span>                                        <span class="keyword">const</span> <span class="keywordtype">char</span> *userOrChainedFile,</div>
+<div class="line"><a id="l02951" name="l02951"></a><span class="lineno"> 2951</span>                                        <span class="keyword">const</span> <span class="keywordtype">char</span> *seedFile);</div>
+<div class="line"><a id="l02952" name="l02952"></a><span class="lineno"> 2952</span> </div>
+<div class="line"><a id="l02976" name="l02976"></a><span class="lineno"> 2976</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l02977" name="l02977"></a><span class="lineno"><a class="line" href="group__opts_group.html#ga0290eac4665569c850468d9f00e246a0"> 2977</a></span><a class="code hl_function" href="group__opts_group.html#ga0290eac4665569c850468d9f00e246a0">natsOptions_SetNKey</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a>             *opts,</div>
+<div class="line"><a id="l02978" name="l02978"></a><span class="lineno"> 2978</span>                    <span class="keyword">const</span> <span class="keywordtype">char</span>              *pubKey,</div>
+<div class="line"><a id="l02979" name="l02979"></a><span class="lineno"> 2979</span>                    <a class="code hl_typedef" href="group__callbacks_group.html#gab786ffd670c86de0563559351305080b">natsSignatureHandler</a>    sigCB,</div>
+<div class="line"><a id="l02980" name="l02980"></a><span class="lineno"> 2980</span>                    <span class="keywordtype">void</span>                    *sigClosure);</div>
+<div class="line"><a id="l02981" name="l02981"></a><span class="lineno"> 2981</span> </div>
+<div class="line"><a id="l03006" name="l03006"></a><span class="lineno"> 3006</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l03007" name="l03007"></a><span class="lineno"><a class="line" href="group__opts_group.html#ga696f02e0493c00d3c1eafff45b62b68e"> 3007</a></span><a class="code hl_function" href="group__opts_group.html#ga696f02e0493c00d3c1eafff45b62b68e">natsOptions_SetNKeyFromSeed</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts,</div>
+<div class="line"><a id="l03008" name="l03008"></a><span class="lineno"> 3008</span>                            <span class="keyword">const</span> <span class="keywordtype">char</span>  *pubKey,</div>
+<div class="line"><a id="l03009" name="l03009"></a><span class="lineno"> 3009</span>                            <span class="keyword">const</span> <span class="keywordtype">char</span>  *seedFile);</div>
+<div class="line"><a id="l03010" name="l03010"></a><span class="lineno"> 3010</span> </div>
+<div class="line"><a id="l03024" name="l03024"></a><span class="lineno"> 3024</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l03025" name="l03025"></a><span class="lineno"><a class="line" href="group__opts_group.html#gaafda5fb8d9ee3a17bd475ceaecfac218"> 3025</a></span><a class="code hl_function" href="group__opts_group.html#gaafda5fb8d9ee3a17bd475ceaecfac218">natsOptions_SetWriteDeadline</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int64_t deadline);</div>
+<div class="line"><a id="l03026" name="l03026"></a><span class="lineno"> 3026</span> </div>
+<div class="line"><a id="l03061" name="l03061"></a><span class="lineno"> 3061</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l03062" name="l03062"></a><span class="lineno"><a class="line" href="group__opts_group.html#ga192465163abb87ad48a843b45cdf9984"> 3062</a></span><a class="code hl_function" href="group__opts_group.html#ga192465163abb87ad48a843b45cdf9984">natsOptions_DisableNoResponders</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <span class="keywordtype">bool</span> disabled);</div>
+<div class="line"><a id="l03063" name="l03063"></a><span class="lineno"> 3063</span> </div>
+<div class="line"><a id="l03079" name="l03079"></a><span class="lineno"> 3079</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l03080" name="l03080"></a><span class="lineno"><a class="line" href="group__opts_group.html#gac5173473a731a4a36d15346fedddf91f"> 3080</a></span><a class="code hl_function" href="group__opts_group.html#gac5173473a731a4a36d15346fedddf91f">natsOptions_SetCustomInboxPrefix</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <span class="keyword">const</span> <span class="keywordtype">char</span> *inboxPrefix);</div>
+<div class="line"><a id="l03081" name="l03081"></a><span class="lineno"> 3081</span> </div>
+<div class="line"><a id="l03089" name="l03089"></a><span class="lineno"> 3089</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l03090" name="l03090"></a><span class="lineno"><a class="line" href="group__opts_group.html#ga93d8068cd6fff53b7f8e1c403db45eb9"> 3090</a></span><a class="code hl_function" href="group__opts_group.html#ga93d8068cd6fff53b7f8e1c403db45eb9">natsOptions_Destroy</a>(<a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts);</div>
+<div class="line"><a id="l03091" name="l03091"></a><span class="lineno"> 3091</span> <span class="comment">// end of optsGroup</span></div>
+<div class="line"><a id="l03093" name="l03093"></a><span class="lineno"> 3093</span> </div>
+<div class="line"><a id="l03094" name="l03094"></a><span class="lineno"> 3094</span><span class="preprocessor">#if defined(NATS_HAS_STREAMING)</span></div>
+<div class="line"><a id="l03128" name="l03128"></a><span class="lineno"> 3128</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l03129" name="l03129"></a><span class="lineno"><a class="line" href="group__stan_conn_opts_group.html#gaff52a1ce90253b4bdbb0005fca4f71b6"> 3129</a></span><a class="code hl_function" href="group__stan_conn_opts_group.html#gaff52a1ce90253b4bdbb0005fca4f71b6">stanConnOptions_Create</a>(<a class="code hl_typedef" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> **newOpts);</div>
+<div class="line"><a id="l03130" name="l03130"></a><span class="lineno"> 3130</span> </div>
+<div class="line"><a id="l03152" name="l03152"></a><span class="lineno"> 3152</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l03153" name="l03153"></a><span class="lineno"><a class="line" href="group__stan_conn_opts_group.html#ga3c6d511fc1e1febcdf5344960de5a0b3"> 3153</a></span><a class="code hl_function" href="group__stan_conn_opts_group.html#ga3c6d511fc1e1febcdf5344960de5a0b3">stanConnOptions_SetURL</a>(<a class="code hl_typedef" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *opts, <span class="keyword">const</span> <span class="keywordtype">char</span> *url);</div>
+<div class="line"><a id="l03154" name="l03154"></a><span class="lineno"> 3154</span> </div>
+<div class="line"><a id="l03171" name="l03171"></a><span class="lineno"> 3171</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l03172" name="l03172"></a><span class="lineno"><a class="line" href="group__stan_conn_opts_group.html#gae3fc9a4daa7f85367811a313857337b4"> 3172</a></span><a class="code hl_function" href="group__stan_conn_opts_group.html#gae3fc9a4daa7f85367811a313857337b4">stanConnOptions_SetNATSOptions</a>(<a class="code hl_typedef" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *opts, <a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *nOpts);</div>
+<div class="line"><a id="l03173" name="l03173"></a><span class="lineno"> 3173</span> </div>
+<div class="line"><a id="l03183" name="l03183"></a><span class="lineno"> 3183</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l03184" name="l03184"></a><span class="lineno"><a class="line" href="group__stan_conn_opts_group.html#ga66c72c482696d9ceca71fced7cbb1264"> 3184</a></span><a class="code hl_function" href="group__stan_conn_opts_group.html#ga66c72c482696d9ceca71fced7cbb1264">stanConnOptions_SetConnectionWait</a>(<a class="code hl_typedef" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *opts, int64_t wait);</div>
+<div class="line"><a id="l03185" name="l03185"></a><span class="lineno"> 3185</span> </div>
+<div class="line"><a id="l03195" name="l03195"></a><span class="lineno"> 3195</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l03196" name="l03196"></a><span class="lineno"><a class="line" href="group__stan_conn_opts_group.html#ga36f2ee441562dcf619d6e020b823fc96"> 3196</a></span><a class="code hl_function" href="group__stan_conn_opts_group.html#ga36f2ee441562dcf619d6e020b823fc96">stanConnOptions_SetPubAckWait</a>(<a class="code hl_typedef" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *opts, int64_t wait);</div>
+<div class="line"><a id="l03197" name="l03197"></a><span class="lineno"> 3197</span> </div>
+<div class="line"><a id="l03205" name="l03205"></a><span class="lineno"> 3205</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l03206" name="l03206"></a><span class="lineno"><a class="line" href="group__stan_conn_opts_group.html#ga07105d1d00878bba19f47243b2c88402"> 3206</a></span><a class="code hl_function" href="group__stan_conn_opts_group.html#ga07105d1d00878bba19f47243b2c88402">stanConnOptions_SetDiscoveryPrefix</a>(<a class="code hl_typedef" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *opts, <span class="keyword">const</span> <span class="keywordtype">char</span> *prefix);</div>
+<div class="line"><a id="l03207" name="l03207"></a><span class="lineno"> 3207</span> </div>
+<div class="line"><a id="l03208" name="l03208"></a><span class="lineno"> 3208</span> </div>
+<div class="line"><a id="l03223" name="l03223"></a><span class="lineno"> 3223</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l03224" name="l03224"></a><span class="lineno"><a class="line" href="group__stan_conn_opts_group.html#ga29eee1be7eff749aeac3bab60d1b0405"> 3224</a></span><a class="code hl_function" href="group__stan_conn_opts_group.html#ga29eee1be7eff749aeac3bab60d1b0405">stanConnOptions_SetMaxPubAcksInflight</a>(<a class="code hl_typedef" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *opts, <span class="keywordtype">int</span> maxPubAcksInflight, <span class="keywordtype">float</span> percentage);</div>
+<div class="line"><a id="l03225" name="l03225"></a><span class="lineno"> 3225</span> </div>
+<div class="line"><a id="l03241" name="l03241"></a><span class="lineno"> 3241</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l03242" name="l03242"></a><span class="lineno"><a class="line" href="group__stan_conn_opts_group.html#gad835223f08fbeae2a3c7a34d3fa1550b"> 3242</a></span><a class="code hl_function" href="group__stan_conn_opts_group.html#gad835223f08fbeae2a3c7a34d3fa1550b">stanConnOptions_SetPings</a>(<a class="code hl_typedef" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *opts, <span class="keywordtype">int</span> interval, <span class="keywordtype">int</span> maxOut);</div>
+<div class="line"><a id="l03243" name="l03243"></a><span class="lineno"> 3243</span> </div>
+<div class="line"><a id="l03254" name="l03254"></a><span class="lineno"> 3254</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l03255" name="l03255"></a><span class="lineno"><a class="line" href="group__stan_conn_opts_group.html#ga19ba15c8001aa835b261eea3a309e6d3"> 3255</a></span><a class="code hl_function" href="group__stan_conn_opts_group.html#ga19ba15c8001aa835b261eea3a309e6d3">stanConnOptions_SetConnectionLostHandler</a>(<a class="code hl_typedef" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *opts, <a class="code hl_typedef" href="group__callbacks_group.html#gac34092f6c698374f86ad349302bdd55c">stanConnectionLostHandler</a> handler, <span class="keywordtype">void</span> *closure);</div>
+<div class="line"><a id="l03256" name="l03256"></a><span class="lineno"> 3256</span> </div>
+<div class="line"><a id="l03264" name="l03264"></a><span class="lineno"> 3264</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l03265" name="l03265"></a><span class="lineno"><a class="line" href="group__stan_conn_opts_group.html#ga83fd0a29b136cbfb643be642eb2fa726"> 3265</a></span><a class="code hl_function" href="group__stan_conn_opts_group.html#ga83fd0a29b136cbfb643be642eb2fa726">stanConnOptions_Destroy</a>(<a class="code hl_typedef" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *opts);</div>
+<div class="line"><a id="l03266" name="l03266"></a><span class="lineno"> 3266</span> <span class="comment">// end of stanConnOptsGroup</span></div>
+<div class="line"><a id="l03268" name="l03268"></a><span class="lineno"> 3268</span> </div>
+<div class="line"><a id="l03299" name="l03299"></a><span class="lineno"> 3299</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l03300" name="l03300"></a><span class="lineno"><a class="line" href="group__stan_sub_opts_group.html#gad87a2cef4f4ddf64696f9864773c37cf"> 3300</a></span><a class="code hl_function" href="group__stan_sub_opts_group.html#gad87a2cef4f4ddf64696f9864773c37cf">stanSubOptions_Create</a>(<a class="code hl_typedef" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> **newOpts);</div>
+<div class="line"><a id="l03301" name="l03301"></a><span class="lineno"> 3301</span> </div>
+<div class="line"><a id="l03320" name="l03320"></a><span class="lineno"> 3320</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l03321" name="l03321"></a><span class="lineno"><a class="line" href="group__stan_sub_opts_group.html#gaa018bceba99ef3726157e87c6918ab14"> 3321</a></span><a class="code hl_function" href="group__stan_sub_opts_group.html#gaa018bceba99ef3726157e87c6918ab14">stanSubOptions_SetDurableName</a>(<a class="code hl_typedef" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts, <span class="keyword">const</span> <span class="keywordtype">char</span> *durableName);</div>
+<div class="line"><a id="l03322" name="l03322"></a><span class="lineno"> 3322</span> </div>
+<div class="line"><a id="l03336" name="l03336"></a><span class="lineno"> 3336</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l03337" name="l03337"></a><span class="lineno"><a class="line" href="group__stan_sub_opts_group.html#gafbb4e6c74978c4e8f30f016c20cc2bdf"> 3337</a></span><a class="code hl_function" href="group__stan_sub_opts_group.html#gafbb4e6c74978c4e8f30f016c20cc2bdf">stanSubOptions_SetAckWait</a>(<a class="code hl_typedef" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts, int64_t wait);</div>
+<div class="line"><a id="l03338" name="l03338"></a><span class="lineno"> 3338</span> </div>
+<div class="line"><a id="l03350" name="l03350"></a><span class="lineno"> 3350</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l03351" name="l03351"></a><span class="lineno"><a class="line" href="group__stan_sub_opts_group.html#ga35efbdea888e00440c500845064931c0"> 3351</a></span><a class="code hl_function" href="group__stan_sub_opts_group.html#ga35efbdea888e00440c500845064931c0">stanSubOptions_SetMaxInflight</a>(<a class="code hl_typedef" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts, <span class="keywordtype">int</span> maxInflight);</div>
+<div class="line"><a id="l03352" name="l03352"></a><span class="lineno"> 3352</span> </div>
+<div class="line"><a id="l03368" name="l03368"></a><span class="lineno"> 3368</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l03369" name="l03369"></a><span class="lineno"><a class="line" href="group__stan_sub_opts_group.html#ga6cb7f6e1ac697d16959f9042eeb84dc1"> 3369</a></span><a class="code hl_function" href="group__stan_sub_opts_group.html#ga6cb7f6e1ac697d16959f9042eeb84dc1">stanSubOptions_StartAtSequence</a>(<a class="code hl_typedef" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts, uint64_t seq);</div>
+<div class="line"><a id="l03370" name="l03370"></a><span class="lineno"> 3370</span> </div>
+<div class="line"><a id="l03385" name="l03385"></a><span class="lineno"> 3385</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l03386" name="l03386"></a><span class="lineno"><a class="line" href="group__stan_sub_opts_group.html#gaafd7a553486eea3c9d309da0744a3608"> 3386</a></span><a class="code hl_function" href="group__stan_sub_opts_group.html#gaafd7a553486eea3c9d309da0744a3608">stanSubOptions_StartAtTime</a>(<a class="code hl_typedef" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts, int64_t time);</div>
+<div class="line"><a id="l03387" name="l03387"></a><span class="lineno"> 3387</span> </div>
+<div class="line"><a id="l03399" name="l03399"></a><span class="lineno"> 3399</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l03400" name="l03400"></a><span class="lineno"><a class="line" href="group__stan_sub_opts_group.html#ga27d9175901997b8468997019746599b5"> 3400</a></span><a class="code hl_function" href="group__stan_sub_opts_group.html#ga27d9175901997b8468997019746599b5">stanSubOptions_StartAtTimeDelta</a>(<a class="code hl_typedef" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts, int64_t delta);</div>
+<div class="line"><a id="l03401" name="l03401"></a><span class="lineno"> 3401</span> </div>
+<div class="line"><a id="l03410" name="l03410"></a><span class="lineno"> 3410</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l03411" name="l03411"></a><span class="lineno"><a class="line" href="group__stan_sub_opts_group.html#ga856a74e31f3307faf988747c1f88717c"> 3411</a></span><a class="code hl_function" href="group__stan_sub_opts_group.html#ga856a74e31f3307faf988747c1f88717c">stanSubOptions_StartWithLastReceived</a>(<a class="code hl_typedef" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts);</div>
+<div class="line"><a id="l03412" name="l03412"></a><span class="lineno"> 3412</span> </div>
+<div class="line"><a id="l03420" name="l03420"></a><span class="lineno"> 3420</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l03421" name="l03421"></a><span class="lineno"><a class="line" href="group__stan_sub_opts_group.html#gab09b81358e93199a4631eb06f1ec179f"> 3421</a></span><a class="code hl_function" href="group__stan_sub_opts_group.html#gab09b81358e93199a4631eb06f1ec179f">stanSubOptions_DeliverAllAvailable</a>(<a class="code hl_typedef" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts);</div>
+<div class="line"><a id="l03422" name="l03422"></a><span class="lineno"> 3422</span> </div>
+<div class="line"><a id="l03437" name="l03437"></a><span class="lineno"> 3437</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l03438" name="l03438"></a><span class="lineno"><a class="line" href="group__stan_sub_opts_group.html#ga6f49ae2629e49d2bfa35990cf030bf83"> 3438</a></span><a class="code hl_function" href="group__stan_sub_opts_group.html#ga6f49ae2629e49d2bfa35990cf030bf83">stanSubOptions_SetManualAckMode</a>(<a class="code hl_typedef" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts, <span class="keywordtype">bool</span> manual);</div>
+<div class="line"><a id="l03439" name="l03439"></a><span class="lineno"> 3439</span> </div>
+<div class="line"><a id="l03447" name="l03447"></a><span class="lineno"> 3447</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l03448" name="l03448"></a><span class="lineno"><a class="line" href="group__stan_sub_opts_group.html#ga1b56877d0a6729e148c9c288e2b88e3f"> 3448</a></span><a class="code hl_function" href="group__stan_sub_opts_group.html#ga1b56877d0a6729e148c9c288e2b88e3f">stanSubOptions_Destroy</a>(<a class="code hl_typedef" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *opts);</div>
+<div class="line"><a id="l03449" name="l03449"></a><span class="lineno"> 3449</span> <span class="comment">// end of stanSubOptsGroup</span></div>
+<div class="line"><a id="l03451" name="l03451"></a><span class="lineno"> 3451</span><span class="preprocessor">#endif</span></div>
+<div class="line"><a id="l03452" name="l03452"></a><span class="lineno"> 3452</span> </div>
+<div class="line"><a id="l03472" name="l03472"></a><span class="lineno"> 3472</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l03473" name="l03473"></a><span class="lineno"><a class="line" href="group__inbox_group.html#gaa1ec779a0b7ead54b78da05533848b6d"> 3473</a></span><a class="code hl_function" href="group__inbox_group.html#gaa1ec779a0b7ead54b78da05533848b6d">natsInbox_Create</a>(<a class="code hl_typedef" href="group__types_group.html#ga206c3d4d6f4f6f96fd2cae53a3df31c1">natsInbox</a> **newInbox);</div>
+<div class="line"><a id="l03474" name="l03474"></a><span class="lineno"> 3474</span> </div>
+<div class="line"><a id="l03481" name="l03481"></a><span class="lineno"> 3481</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l03482" name="l03482"></a><span class="lineno"><a class="line" href="group__inbox_group.html#gabd6444fb8f28afb9c2b6645945f46cfe"> 3482</a></span><a class="code hl_function" href="group__inbox_group.html#gabd6444fb8f28afb9c2b6645945f46cfe">natsInbox_Destroy</a>(<a class="code hl_typedef" href="group__types_group.html#ga206c3d4d6f4f6f96fd2cae53a3df31c1">natsInbox</a> *inbox);</div>
+<div class="line"><a id="l03483" name="l03483"></a><span class="lineno"> 3483</span> <span class="comment">// end of inboxGroup</span></div>
+<div class="line"><a id="l03485" name="l03485"></a><span class="lineno"> 3485</span> </div>
+<div class="line"><a id="l03504" name="l03504"></a><span class="lineno"> 3504</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l03505" name="l03505"></a><span class="lineno"><a class="line" href="group__msg_group.html#ga1a091d24f939d881bf04fba78b8995c2"> 3505</a></span><a class="code hl_function" href="group__msg_group.html#ga1a091d24f939d881bf04fba78b8995c2">natsMsgList_Destroy</a>(<a class="code hl_struct" href="structnats_msg_list.html">natsMsgList</a> *list);</div>
+<div class="line"><a id="l03506" name="l03506"></a><span class="lineno"> 3506</span> </div>
+<div class="line"><a id="l03524" name="l03524"></a><span class="lineno"> 3524</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l03525" name="l03525"></a><span class="lineno"><a class="line" href="group__msg_group.html#ga098e4fec1c5a71c00a0d092fbd6d1a21"> 3525</a></span><a class="code hl_function" href="group__msg_group.html#ga098e4fec1c5a71c00a0d092fbd6d1a21">natsMsg_Create</a>(<a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **newMsg, <span class="keyword">const</span> <span class="keywordtype">char</span> *subj, <span class="keyword">const</span> <span class="keywordtype">char</span> *reply,</div>
+<div class="line"><a id="l03526" name="l03526"></a><span class="lineno"> 3526</span>               <span class="keyword">const</span> <span class="keywordtype">char</span> *data, <span class="keywordtype">int</span> dataLen);</div>
+<div class="line"><a id="l03527" name="l03527"></a><span class="lineno"> 3527</span> </div>
+<div class="line"><a id="l03536" name="l03536"></a><span class="lineno"> 3536</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keyword">const</span> <span class="keywordtype">char</span>*</div>
+<div class="line"><a id="l03537" name="l03537"></a><span class="lineno"><a class="line" href="group__msg_group.html#gad7cad38946648e3047aa0665a3dd230a"> 3537</a></span><a class="code hl_function" href="group__msg_group.html#gad7cad38946648e3047aa0665a3dd230a">natsMsg_GetSubject</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg);</div>
+<div class="line"><a id="l03538" name="l03538"></a><span class="lineno"> 3538</span> </div>
+<div class="line"><a id="l03548" name="l03548"></a><span class="lineno"> 3548</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keyword">const</span> <span class="keywordtype">char</span>*</div>
+<div class="line"><a id="l03549" name="l03549"></a><span class="lineno"><a class="line" href="group__msg_group.html#ga880535362c91b3e405792aa66ff945b6"> 3549</a></span><a class="code hl_function" href="group__msg_group.html#ga880535362c91b3e405792aa66ff945b6">natsMsg_GetReply</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg);</div>
+<div class="line"><a id="l03550" name="l03550"></a><span class="lineno"> 3550</span> </div>
+<div class="line"><a id="l03566" name="l03566"></a><span class="lineno"> 3566</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keyword">const</span> <span class="keywordtype">char</span>*</div>
+<div class="line"><a id="l03567" name="l03567"></a><span class="lineno"><a class="line" href="group__msg_group.html#ga523364451fd92534e754054266196e59"> 3567</a></span><a class="code hl_function" href="group__msg_group.html#ga523364451fd92534e754054266196e59">natsMsg_GetData</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg);</div>
+<div class="line"><a id="l03568" name="l03568"></a><span class="lineno"> 3568</span> </div>
+<div class="line"><a id="l03575" name="l03575"></a><span class="lineno"> 3575</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">int</span></div>
+<div class="line"><a id="l03576" name="l03576"></a><span class="lineno"><a class="line" href="group__msg_group.html#ga25b69066ae50287e178aaf4f70f7d3de"> 3576</a></span><a class="code hl_function" href="group__msg_group.html#ga25b69066ae50287e178aaf4f70f7d3de">natsMsg_GetDataLength</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg);</div>
+<div class="line"><a id="l03577" name="l03577"></a><span class="lineno"> 3577</span> </div>
+<div class="line"><a id="l03593" name="l03593"></a><span class="lineno"> 3593</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l03594" name="l03594"></a><span class="lineno"><a class="line" href="group__msg_group.html#gaf30b47d4217c9335919f05536e379af8"> 3594</a></span><a class="code hl_function" href="group__msg_group.html#gaf30b47d4217c9335919f05536e379af8">natsMsgHeader_Set</a>(<a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, <span class="keyword">const</span> <span class="keywordtype">char</span> *key, <span class="keyword">const</span> <span class="keywordtype">char</span> *value);</div>
+<div class="line"><a id="l03595" name="l03595"></a><span class="lineno"> 3595</span> </div>
+<div class="line"><a id="l03611" name="l03611"></a><span class="lineno"> 3611</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l03612" name="l03612"></a><span class="lineno"><a class="line" href="group__msg_group.html#ga2b641ec3b1745604d7de1102e472254b"> 3612</a></span><a class="code hl_function" href="group__msg_group.html#ga2b641ec3b1745604d7de1102e472254b">natsMsgHeader_Add</a>(<a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, <span class="keyword">const</span> <span class="keywordtype">char</span> *key, <span class="keyword">const</span> <span class="keywordtype">char</span> *value);</div>
+<div class="line"><a id="l03613" name="l03613"></a><span class="lineno"> 3613</span> </div>
+<div class="line"><a id="l03632" name="l03632"></a><span class="lineno"> 3632</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l03633" name="l03633"></a><span class="lineno"><a class="line" href="group__msg_group.html#gab3349f0b0ce721b340d5c0753c90ee18"> 3633</a></span><a class="code hl_function" href="group__msg_group.html#gab3349f0b0ce721b340d5c0753c90ee18">natsMsgHeader_Get</a>(<a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, <span class="keyword">const</span> <span class="keywordtype">char</span> *key, <span class="keyword">const</span> <span class="keywordtype">char</span> **value);</div>
+<div class="line"><a id="l03634" name="l03634"></a><span class="lineno"> 3634</span> </div>
+<div class="line"><a id="l03668" name="l03668"></a><span class="lineno"> 3668</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l03669" name="l03669"></a><span class="lineno"><a class="line" href="group__msg_group.html#gae1ce9c9d82d151a3ea9dc03da048f66f"> 3669</a></span><a class="code hl_function" href="group__msg_group.html#gae1ce9c9d82d151a3ea9dc03da048f66f">natsMsgHeader_Values</a>(<a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, <span class="keyword">const</span> <span class="keywordtype">char</span> *key, <span class="keyword">const</span> <span class="keywordtype">char</span>* **values, <span class="keywordtype">int</span> *count);</div>
+<div class="line"><a id="l03670" name="l03670"></a><span class="lineno"> 3670</span> </div>
+<div class="line"><a id="l03700" name="l03700"></a><span class="lineno"> 3700</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l03701" name="l03701"></a><span class="lineno"><a class="line" href="group__msg_group.html#ga6ee8a007111ada293dd24ff0bab02491"> 3701</a></span><a class="code hl_function" href="group__msg_group.html#ga6ee8a007111ada293dd24ff0bab02491">natsMsgHeader_Keys</a>(<a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, <span class="keyword">const</span> <span class="keywordtype">char</span>* **keys, <span class="keywordtype">int</span> *count);</div>
+<div class="line"><a id="l03702" name="l03702"></a><span class="lineno"> 3702</span> </div>
+<div class="line"><a id="l03716" name="l03716"></a><span class="lineno"> 3716</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l03717" name="l03717"></a><span class="lineno"><a class="line" href="group__msg_group.html#gac78ca02dc93d05cae837ced6386408f1"> 3717</a></span><a class="code hl_function" href="group__msg_group.html#gac78ca02dc93d05cae837ced6386408f1">natsMsgHeader_Delete</a>(<a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, <span class="keyword">const</span> <span class="keywordtype">char</span> *key);</div>
+<div class="line"><a id="l03718" name="l03718"></a><span class="lineno"> 3718</span> </div>
+<div class="line"><a id="l03744" name="l03744"></a><span class="lineno"> 3744</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">bool</span></div>
+<div class="line"><a id="l03745" name="l03745"></a><span class="lineno"><a class="line" href="group__msg_group.html#ga43aa4a8e4b93725b4876ee2677e19c7b"> 3745</a></span><a class="code hl_function" href="group__msg_group.html#ga43aa4a8e4b93725b4876ee2677e19c7b">natsMsg_IsNoResponders</a>(<a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg);</div>
+<div class="line"><a id="l03746" name="l03746"></a><span class="lineno"> 3746</span> </div>
+<div class="line"><a id="l03753" name="l03753"></a><span class="lineno"> 3753</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l03754" name="l03754"></a><span class="lineno"><a class="line" href="group__msg_group.html#ga9e9590018284939f43f60964283f33ae"> 3754</a></span><a class="code hl_function" href="group__msg_group.html#ga9e9590018284939f43f60964283f33ae">natsMsg_Destroy</a>(<a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg);</div>
+<div class="line"><a id="l03755" name="l03755"></a><span class="lineno"> 3755</span> <span class="comment">// end of msgGroup</span></div>
+<div class="line"><a id="l03757" name="l03757"></a><span class="lineno"> 3757</span> </div>
+<div class="line"><a id="l03758" name="l03758"></a><span class="lineno"> 3758</span><span class="preprocessor">#if defined(NATS_HAS_STREAMING)</span></div>
+<div class="line"><a id="l03771" name="l03771"></a><span class="lineno"> 3771</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> uint64_t</div>
+<div class="line"><a id="l03772" name="l03772"></a><span class="lineno"><a class="line" href="group__stan_msg_group.html#ga98b66ff73447e1d7e329edbfcde782b5"> 3772</a></span><a class="code hl_function" href="group__stan_msg_group.html#ga98b66ff73447e1d7e329edbfcde782b5">stanMsg_GetSequence</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a> *msg);</div>
+<div class="line"><a id="l03773" name="l03773"></a><span class="lineno"> 3773</span> </div>
+<div class="line"><a id="l03780" name="l03780"></a><span class="lineno"> 3780</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t</div>
+<div class="line"><a id="l03781" name="l03781"></a><span class="lineno"><a class="line" href="group__stan_msg_group.html#ga2fa524b11e9621cf46ca9b1a3ca66452"> 3781</a></span><a class="code hl_function" href="group__stan_msg_group.html#ga2fa524b11e9621cf46ca9b1a3ca66452">stanMsg_GetTimestamp</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a> *msg);</div>
+<div class="line"><a id="l03782" name="l03782"></a><span class="lineno"> 3782</span> </div>
+<div class="line"><a id="l03791" name="l03791"></a><span class="lineno"> 3791</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">bool</span></div>
+<div class="line"><a id="l03792" name="l03792"></a><span class="lineno"><a class="line" href="group__stan_msg_group.html#ga8e537d014b89d9d7da7906b2ee75d5c0"> 3792</a></span><a class="code hl_function" href="group__stan_msg_group.html#ga8e537d014b89d9d7da7906b2ee75d5c0">stanMsg_IsRedelivered</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a> *msg);</div>
+<div class="line"><a id="l03793" name="l03793"></a><span class="lineno"> 3793</span> </div>
+<div class="line"><a id="l03809" name="l03809"></a><span class="lineno"> 3809</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keyword">const</span> <span class="keywordtype">char</span>*</div>
+<div class="line"><a id="l03810" name="l03810"></a><span class="lineno"><a class="line" href="group__stan_msg_group.html#ga2f27fbfb79a46c52e079f670c59e1260"> 3810</a></span><a class="code hl_function" href="group__stan_msg_group.html#ga2f27fbfb79a46c52e079f670c59e1260">stanMsg_GetData</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a> *msg);</div>
+<div class="line"><a id="l03811" name="l03811"></a><span class="lineno"> 3811</span> </div>
+<div class="line"><a id="l03818" name="l03818"></a><span class="lineno"> 3818</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">int</span></div>
+<div class="line"><a id="l03819" name="l03819"></a><span class="lineno"><a class="line" href="group__stan_msg_group.html#ga7d1e394a686bc25ab7376b7f28b9e777"> 3819</a></span><a class="code hl_function" href="group__stan_msg_group.html#ga7d1e394a686bc25ab7376b7f28b9e777">stanMsg_GetDataLength</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a> *msg);</div>
+<div class="line"><a id="l03820" name="l03820"></a><span class="lineno"> 3820</span> </div>
+<div class="line"><a id="l03827" name="l03827"></a><span class="lineno"> 3827</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l03828" name="l03828"></a><span class="lineno"><a class="line" href="group__stan_msg_group.html#gacd0059fb499963f5b2eae18053e5f74f"> 3828</a></span><a class="code hl_function" href="group__stan_msg_group.html#gacd0059fb499963f5b2eae18053e5f74f">stanMsg_Destroy</a>(<a class="code hl_typedef" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a> *msg);</div>
+<div class="line"><a id="l03829" name="l03829"></a><span class="lineno"> 3829</span> <span class="comment">// end of stanMsgGroup</span></div>
+<div class="line"><a id="l03831" name="l03831"></a><span class="lineno"> 3831</span><span class="preprocessor">#endif</span></div>
+<div class="line"><a id="l03832" name="l03832"></a><span class="lineno"> 3832</span> </div>
+<div class="line"><a id="l03863" name="l03863"></a><span class="lineno"> 3863</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l03864" name="l03864"></a><span class="lineno"><a class="line" href="group__conn_mgt_group.html#ga740be1ba16a8570eb98ef6755ebf52ce"> 3864</a></span><a class="code hl_function" href="group__conn_mgt_group.html#ga740be1ba16a8570eb98ef6755ebf52ce">natsConnection_Connect</a>(<a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> **nc, <a class="code hl_typedef" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *options);</div>
+<div class="line"><a id="l03865" name="l03865"></a><span class="lineno"> 3865</span> </div>
+<div class="line"><a id="l03876" name="l03876"></a><span class="lineno"> 3876</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l03877" name="l03877"></a><span class="lineno"><a class="line" href="group__conn_mgt_group.html#gaa89c06e30e19ff361125bfc9114d89a8"> 3877</a></span><a class="code hl_function" href="group__conn_mgt_group.html#gaa89c06e30e19ff361125bfc9114d89a8">natsConnection_ProcessReadEvent</a>(<a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc);</div>
+<div class="line"><a id="l03878" name="l03878"></a><span class="lineno"> 3878</span> </div>
+<div class="line"><a id="l03889" name="l03889"></a><span class="lineno"> 3889</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l03890" name="l03890"></a><span class="lineno"><a class="line" href="group__conn_mgt_group.html#gad81b603b84c0180aefc6d5ebad7f2a47"> 3890</a></span><a class="code hl_function" href="group__conn_mgt_group.html#gad81b603b84c0180aefc6d5ebad7f2a47">natsConnection_ProcessWriteEvent</a>(<a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc);</div>
+<div class="line"><a id="l03891" name="l03891"></a><span class="lineno"> 3891</span> </div>
+<div class="line"><a id="l03910" name="l03910"></a><span class="lineno"> 3910</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l03911" name="l03911"></a><span class="lineno"><a class="line" href="group__conn_mgt_group.html#gafb83c8d7970ba68be0e6c40c38cdfde4"> 3911</a></span><a class="code hl_function" href="group__conn_mgt_group.html#gafb83c8d7970ba68be0e6c40c38cdfde4">natsConnection_ConnectTo</a>(<a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> **nc, <span class="keyword">const</span> <span class="keywordtype">char</span> *urls);</div>
+<div class="line"><a id="l03912" name="l03912"></a><span class="lineno"> 3912</span> </div>
+<div class="line"><a id="l03919" name="l03919"></a><span class="lineno"> 3919</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">bool</span></div>
+<div class="line"><a id="l03920" name="l03920"></a><span class="lineno"><a class="line" href="group__conn_mgt_group.html#ga530f0f1c75c58a81aae1a59f15b46d9f"> 3920</a></span><a class="code hl_function" href="group__conn_mgt_group.html#ga530f0f1c75c58a81aae1a59f15b46d9f">natsConnection_IsClosed</a>(<a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc);</div>
+<div class="line"><a id="l03921" name="l03921"></a><span class="lineno"> 3921</span> </div>
+<div class="line"><a id="l03928" name="l03928"></a><span class="lineno"> 3928</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">bool</span></div>
+<div class="line"><a id="l03929" name="l03929"></a><span class="lineno"><a class="line" href="group__conn_mgt_group.html#ga5aa349fc3895dde772671b324b07a688"> 3929</a></span><a class="code hl_function" href="group__conn_mgt_group.html#ga5aa349fc3895dde772671b324b07a688">natsConnection_IsReconnecting</a>(<a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc);</div>
+<div class="line"><a id="l03930" name="l03930"></a><span class="lineno"> 3930</span> </div>
+<div class="line"><a id="l03937" name="l03937"></a><span class="lineno"> 3937</span><span class="keywordtype">bool</span></div>
+<div class="line"><a id="l03938" name="l03938"></a><span class="lineno"><a class="line" href="group__conn_mgt_group.html#ga15a0f8aa9a6f621535d01593a4c8edd5"> 3938</a></span><a class="code hl_function" href="group__conn_mgt_group.html#ga15a0f8aa9a6f621535d01593a4c8edd5">natsConnection_IsDraining</a>(<a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc);</div>
+<div class="line"><a id="l03939" name="l03939"></a><span class="lineno"> 3939</span> </div>
+<div class="line"><a id="l03948" name="l03948"></a><span class="lineno"> 3948</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51">natsConnStatus</a></div>
+<div class="line"><a id="l03949" name="l03949"></a><span class="lineno"><a class="line" href="group__conn_mgt_group.html#ga33fa209522e5e0226b5b7c7d720a3b98"> 3949</a></span><a class="code hl_function" href="group__conn_mgt_group.html#ga33fa209522e5e0226b5b7c7d720a3b98">natsConnection_Status</a>(<a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc);</div>
+<div class="line"><a id="l03950" name="l03950"></a><span class="lineno"> 3950</span> </div>
+<div class="line"><a id="l03962" name="l03962"></a><span class="lineno"> 3962</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">int</span></div>
+<div class="line"><a id="l03963" name="l03963"></a><span class="lineno"><a class="line" href="group__conn_mgt_group.html#ga0433159e518540ff874c4026fe9cd0c5"> 3963</a></span><a class="code hl_function" href="group__conn_mgt_group.html#ga0433159e518540ff874c4026fe9cd0c5">natsConnection_Buffered</a>(<a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc);</div>
+<div class="line"><a id="l03964" name="l03964"></a><span class="lineno"> 3964</span> </div>
+<div class="line"><a id="l03980" name="l03980"></a><span class="lineno"> 3980</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l03981" name="l03981"></a><span class="lineno"><a class="line" href="group__conn_mgt_group.html#ga1c98f8d89bb8e20ea8621e860a90267f"> 3981</a></span><a class="code hl_function" href="group__conn_mgt_group.html#ga1c98f8d89bb8e20ea8621e860a90267f">natsConnection_Flush</a>(<a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc);</div>
+<div class="line"><a id="l03982" name="l03982"></a><span class="lineno"> 3982</span> </div>
+<div class="line"><a id="l03995" name="l03995"></a><span class="lineno"> 3995</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l03996" name="l03996"></a><span class="lineno"><a class="line" href="group__conn_mgt_group.html#ga85915ef0c8b87993be1b076099d6a7c1"> 3996</a></span><a class="code hl_function" href="group__conn_mgt_group.html#ga85915ef0c8b87993be1b076099d6a7c1">natsConnection_FlushTimeout</a>(<a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, int64_t timeout);</div>
+<div class="line"><a id="l03997" name="l03997"></a><span class="lineno"> 3997</span> </div>
+<div class="line"><a id="l04007" name="l04007"></a><span class="lineno"> 4007</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t</div>
+<div class="line"><a id="l04008" name="l04008"></a><span class="lineno"><a class="line" href="group__conn_mgt_group.html#ga68e7149f7ff1cc4989b3f795fa7e76d9"> 4008</a></span><a class="code hl_function" href="group__conn_mgt_group.html#ga68e7149f7ff1cc4989b3f795fa7e76d9">natsConnection_GetMaxPayload</a>(<a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc);</div>
+<div class="line"><a id="l04009" name="l04009"></a><span class="lineno"> 4009</span> </div>
+<div class="line"><a id="l04019" name="l04019"></a><span class="lineno"> 4019</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04020" name="l04020"></a><span class="lineno"><a class="line" href="group__conn_mgt_group.html#ga68821a8ae1176096b5afef7fdc7947ec"> 4020</a></span><a class="code hl_function" href="group__conn_mgt_group.html#ga68821a8ae1176096b5afef7fdc7947ec">natsConnection_GetStats</a>(<a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <a class="code hl_typedef" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa">natsStatistics</a> *stats);</div>
+<div class="line"><a id="l04021" name="l04021"></a><span class="lineno"> 4021</span> </div>
+<div class="line"><a id="l04031" name="l04031"></a><span class="lineno"> 4031</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04032" name="l04032"></a><span class="lineno"><a class="line" href="group__conn_mgt_group.html#gaf623280407c43ade02285005f0642e6d"> 4032</a></span><a class="code hl_function" href="group__conn_mgt_group.html#gaf623280407c43ade02285005f0642e6d">natsConnection_GetConnectedUrl</a>(<a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <span class="keywordtype">char</span> *buffer, <span class="keywordtype">size_t</span> bufferSize);</div>
+<div class="line"><a id="l04033" name="l04033"></a><span class="lineno"> 4033</span> </div>
+<div class="line"><a id="l04043" name="l04043"></a><span class="lineno"> 4043</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04044" name="l04044"></a><span class="lineno"><a class="line" href="group__conn_mgt_group.html#ga48cee9ea1cdc9fc2770de2f9f0fd1ccf"> 4044</a></span><a class="code hl_function" href="group__conn_mgt_group.html#ga48cee9ea1cdc9fc2770de2f9f0fd1ccf">natsConnection_GetConnectedServerId</a>(<a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <span class="keywordtype">char</span> *buffer, <span class="keywordtype">size_t</span> bufferSize);</div>
+<div class="line"><a id="l04045" name="l04045"></a><span class="lineno"> 4045</span> </div>
+<div class="line"><a id="l04066" name="l04066"></a><span class="lineno"> 4066</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04067" name="l04067"></a><span class="lineno"><a class="line" href="group__conn_mgt_group.html#gaf4ee7262e35e44c40ad5dfe9240db76b"> 4067</a></span><a class="code hl_function" href="group__conn_mgt_group.html#gaf4ee7262e35e44c40ad5dfe9240db76b">natsConnection_GetServers</a>(<a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <span class="keywordtype">char</span> ***servers, <span class="keywordtype">int</span> *count);</div>
+<div class="line"><a id="l04068" name="l04068"></a><span class="lineno"> 4068</span> </div>
+<div class="line"><a id="l04089" name="l04089"></a><span class="lineno"> 4089</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04090" name="l04090"></a><span class="lineno"><a class="line" href="group__conn_mgt_group.html#gad25c77be0873495412c90a73fe450708"> 4090</a></span><a class="code hl_function" href="group__conn_mgt_group.html#gad25c77be0873495412c90a73fe450708">natsConnection_GetDiscoveredServers</a>(<a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <span class="keywordtype">char</span> ***servers, <span class="keywordtype">int</span> *count);</div>
+<div class="line"><a id="l04091" name="l04091"></a><span class="lineno"> 4091</span> </div>
+<div class="line"><a id="l04104" name="l04104"></a><span class="lineno"> 4104</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04105" name="l04105"></a><span class="lineno"><a class="line" href="group__conn_mgt_group.html#gab6cfa9cb6857ae10f096a94f5e244e63"> 4105</a></span><a class="code hl_function" href="group__conn_mgt_group.html#gab6cfa9cb6857ae10f096a94f5e244e63">natsConnection_GetLastError</a>(<a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <span class="keyword">const</span> <span class="keywordtype">char</span> **lastError);</div>
+<div class="line"><a id="l04106" name="l04106"></a><span class="lineno"> 4106</span> </div>
+<div class="line"><a id="l04120" name="l04120"></a><span class="lineno"> 4120</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04121" name="l04121"></a><span class="lineno"><a class="line" href="group__conn_mgt_group.html#ga747513ba6ab63fdf9a72bfc8025a14ba"> 4121</a></span><a class="code hl_function" href="group__conn_mgt_group.html#ga747513ba6ab63fdf9a72bfc8025a14ba">natsConnection_GetClientID</a>(<a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, uint64_t *cid);</div>
+<div class="line"><a id="l04122" name="l04122"></a><span class="lineno"> 4122</span> </div>
+<div class="line"><a id="l04141" name="l04141"></a><span class="lineno"> 4141</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04142" name="l04142"></a><span class="lineno"><a class="line" href="group__conn_mgt_group.html#ga59bdc4ad9fea2053f5d3841f6b83f88b"> 4142</a></span><a class="code hl_function" href="group__conn_mgt_group.html#ga59bdc4ad9fea2053f5d3841f6b83f88b">natsConnection_Drain</a>(<a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc);</div>
+<div class="line"><a id="l04143" name="l04143"></a><span class="lineno"> 4143</span> </div>
+<div class="line"><a id="l04161" name="l04161"></a><span class="lineno"> 4161</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04162" name="l04162"></a><span class="lineno"><a class="line" href="group__conn_mgt_group.html#gae06fe6f5933f216d6d93645a122a7dd4"> 4162</a></span><a class="code hl_function" href="group__conn_mgt_group.html#gae06fe6f5933f216d6d93645a122a7dd4">natsConnection_DrainTimeout</a>(<a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, int64_t timeout);</div>
+<div class="line"><a id="l04163" name="l04163"></a><span class="lineno"> 4163</span> </div>
+<div class="line"><a id="l04176" name="l04176"></a><span class="lineno"> 4176</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04177" name="l04177"></a><span class="lineno"><a class="line" href="group__conn_mgt_group.html#ga6960cfdbaac3b8759784f352d4c264f8"> 4177</a></span><a class="code hl_function" href="group__conn_mgt_group.html#ga6960cfdbaac3b8759784f352d4c264f8">natsConnection_Sign</a>(<a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc,</div>
+<div class="line"><a id="l04178" name="l04178"></a><span class="lineno"> 4178</span>                    <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *message, <span class="keywordtype">int</span> messageLen,</div>
+<div class="line"><a id="l04179" name="l04179"></a><span class="lineno"> 4179</span>                    <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> sig[64]);</div>
+<div class="line"><a id="l04180" name="l04180"></a><span class="lineno"> 4180</span> </div>
+<div class="line"><a id="l04199" name="l04199"></a><span class="lineno"> 4199</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04200" name="l04200"></a><span class="lineno"><a class="line" href="group__conn_mgt_group.html#gadafcfeeeac2733c7119981ab97b7103d"> 4200</a></span><a class="code hl_function" href="group__conn_mgt_group.html#gadafcfeeeac2733c7119981ab97b7103d">natsConnection_GetClientIP</a>(<a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <span class="keywordtype">char</span> **ip);</div>
+<div class="line"><a id="l04201" name="l04201"></a><span class="lineno"> 4201</span> </div>
+<div class="line"><a id="l04212" name="l04212"></a><span class="lineno"> 4212</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04213" name="l04213"></a><span class="lineno"><a class="line" href="group__conn_mgt_group.html#gaa3fd27e6e7d8131e679d4f10e201c435"> 4213</a></span><a class="code hl_function" href="group__conn_mgt_group.html#gaa3fd27e6e7d8131e679d4f10e201c435">natsConnection_GetRTT</a>(<a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, int64_t *rtt);</div>
+<div class="line"><a id="l04214" name="l04214"></a><span class="lineno"> 4214</span> </div>
+<div class="line"><a id="l04222" name="l04222"></a><span class="lineno"> 4222</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04223" name="l04223"></a><span class="lineno"><a class="line" href="group__conn_mgt_group.html#gad765b80ae8e1a06a7a942cccf29f042a"> 4223</a></span><a class="code hl_function" href="group__conn_mgt_group.html#gad765b80ae8e1a06a7a942cccf29f042a">natsConnection_HasHeaderSupport</a>(<a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc);</div>
+<div class="line"><a id="l04224" name="l04224"></a><span class="lineno"> 4224</span> </div>
+<div class="line"><a id="l04244" name="l04244"></a><span class="lineno"> 4244</span><a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04245" name="l04245"></a><span class="lineno"><a class="line" href="group__conn_mgt_group.html#ga761095a42374b4dafa178df7d7652dd5"> 4245</a></span><a class="code hl_function" href="group__conn_mgt_group.html#ga761095a42374b4dafa178df7d7652dd5">natsConnection_GetLocalIPAndPort</a>(<a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <span class="keywordtype">char</span> **ip, <span class="keywordtype">int</span> *port);</div>
+<div class="line"><a id="l04246" name="l04246"></a><span class="lineno"> 4246</span> </div>
+<div class="line"><a id="l04256" name="l04256"></a><span class="lineno"> 4256</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l04257" name="l04257"></a><span class="lineno"><a class="line" href="group__conn_mgt_group.html#ga19e204d27a232e2d4334301fc002b2ed"> 4257</a></span><a class="code hl_function" href="group__conn_mgt_group.html#ga19e204d27a232e2d4334301fc002b2ed">natsConnection_Close</a>(<a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc);</div>
+<div class="line"><a id="l04258" name="l04258"></a><span class="lineno"> 4258</span> </div>
+<div class="line"><a id="l04266" name="l04266"></a><span class="lineno"> 4266</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l04267" name="l04267"></a><span class="lineno"><a class="line" href="group__conn_mgt_group.html#gafda2f702276fb0ac301efac10df09495"> 4267</a></span><a class="code hl_function" href="group__conn_mgt_group.html#gafda2f702276fb0ac301efac10df09495">natsConnection_Destroy</a>(<a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc);</div>
+<div class="line"><a id="l04268" name="l04268"></a><span class="lineno"> 4268</span> <span class="comment">// end of connMgtGroup</span></div>
+<div class="line"><a id="l04270" name="l04270"></a><span class="lineno"> 4270</span> </div>
+<div class="line"><a id="l04287" name="l04287"></a><span class="lineno"> 4287</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04288" name="l04288"></a><span class="lineno"><a class="line" href="group__conn_pub_group.html#gac0b9f7759ecc39b8d77807b94254f9b4"> 4288</a></span><a class="code hl_function" href="group__conn_pub_group.html#gac0b9f7759ecc39b8d77807b94254f9b4">natsConnection_Publish</a>(<a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <span class="keyword">const</span> <span class="keywordtype">char</span> *subj,</div>
+<div class="line"><a id="l04289" name="l04289"></a><span class="lineno"> 4289</span>                       <span class="keyword">const</span> <span class="keywordtype">void</span> *data, <span class="keywordtype">int</span> dataLen);</div>
+<div class="line"><a id="l04290" name="l04290"></a><span class="lineno"> 4290</span> </div>
+<div class="line"><a id="l04305" name="l04305"></a><span class="lineno"> 4305</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04306" name="l04306"></a><span class="lineno"><a class="line" href="group__conn_pub_group.html#gad09a717c20de4cf0e2a21dcfd9ce6c64"> 4306</a></span><a class="code hl_function" href="group__conn_pub_group.html#gad09a717c20de4cf0e2a21dcfd9ce6c64">natsConnection_PublishString</a>(<a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <span class="keyword">const</span> <span class="keywordtype">char</span> *subj,</div>
+<div class="line"><a id="l04307" name="l04307"></a><span class="lineno"> 4307</span>                             <span class="keyword">const</span> <span class="keywordtype">char</span> *str);</div>
+<div class="line"><a id="l04308" name="l04308"></a><span class="lineno"> 4308</span> </div>
+<div class="line"><a id="l04319" name="l04319"></a><span class="lineno"> 4319</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04320" name="l04320"></a><span class="lineno"><a class="line" href="group__conn_pub_group.html#ga74511acd87385931112c45c48c2a14ba"> 4320</a></span><a class="code hl_function" href="group__conn_pub_group.html#ga74511acd87385931112c45c48c2a14ba">natsConnection_PublishMsg</a>(<a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg);</div>
+<div class="line"><a id="l04321" name="l04321"></a><span class="lineno"> 4321</span> </div>
+<div class="line"><a id="l04334" name="l04334"></a><span class="lineno"> 4334</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04335" name="l04335"></a><span class="lineno"><a class="line" href="group__conn_pub_group.html#gaaaa3d75ffec2dcdc6bf905cdb1eee59e"> 4335</a></span><a class="code hl_function" href="group__conn_pub_group.html#gaaaa3d75ffec2dcdc6bf905cdb1eee59e">natsConnection_PublishRequest</a>(<a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <span class="keyword">const</span> <span class="keywordtype">char</span> *subj,</div>
+<div class="line"><a id="l04336" name="l04336"></a><span class="lineno"> 4336</span>                              <span class="keyword">const</span> <span class="keywordtype">char</span> *reply, <span class="keyword">const</span> <span class="keywordtype">void</span> *data, <span class="keywordtype">int</span> dataLen);</div>
+<div class="line"><a id="l04337" name="l04337"></a><span class="lineno"> 4337</span> </div>
+<div class="line"><a id="l04354" name="l04354"></a><span class="lineno"> 4354</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04355" name="l04355"></a><span class="lineno"><a class="line" href="group__conn_pub_group.html#gaafca9a8294e81a5a9979e762931e56c5"> 4355</a></span><a class="code hl_function" href="group__conn_pub_group.html#gaafca9a8294e81a5a9979e762931e56c5">natsConnection_PublishRequestString</a>(<a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <span class="keyword">const</span> <span class="keywordtype">char</span> *subj,</div>
+<div class="line"><a id="l04356" name="l04356"></a><span class="lineno"> 4356</span>                                    <span class="keyword">const</span> <span class="keywordtype">char</span> *reply, <span class="keyword">const</span> <span class="keywordtype">char</span> *str);</div>
+<div class="line"><a id="l04357" name="l04357"></a><span class="lineno"> 4357</span> </div>
+<div class="line"><a id="l04375" name="l04375"></a><span class="lineno"> 4375</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04376" name="l04376"></a><span class="lineno"><a class="line" href="group__conn_pub_group.html#gaf4b4a022f9c21fc269b87c000330c5a7"> 4376</a></span><a class="code hl_function" href="group__conn_pub_group.html#gaf4b4a022f9c21fc269b87c000330c5a7">natsConnection_Request</a>(<a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **replyMsg, <a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <span class="keyword">const</span> <span class="keywordtype">char</span> *subj,</div>
+<div class="line"><a id="l04377" name="l04377"></a><span class="lineno"> 4377</span>                       <span class="keyword">const</span> <span class="keywordtype">void</span> *data, <span class="keywordtype">int</span> dataLen, int64_t timeout);</div>
+<div class="line"><a id="l04378" name="l04378"></a><span class="lineno"> 4378</span> </div>
+<div class="line"><a id="l04400" name="l04400"></a><span class="lineno"> 4400</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04401" name="l04401"></a><span class="lineno"><a class="line" href="group__conn_pub_group.html#ga4bb5105df6a3efd2088e6be0fdf6b31f"> 4401</a></span><a class="code hl_function" href="group__conn_pub_group.html#ga4bb5105df6a3efd2088e6be0fdf6b31f">natsConnection_RequestString</a>(<a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **replyMsg, <a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc,</div>
+<div class="line"><a id="l04402" name="l04402"></a><span class="lineno"> 4402</span>                             <span class="keyword">const</span> <span class="keywordtype">char</span> *subj, <span class="keyword">const</span> <span class="keywordtype">char</span> *str,</div>
+<div class="line"><a id="l04403" name="l04403"></a><span class="lineno"> 4403</span>                             int64_t timeout);</div>
+<div class="line"><a id="l04404" name="l04404"></a><span class="lineno"> 4404</span> </div>
+<div class="line"><a id="l04419" name="l04419"></a><span class="lineno"> 4419</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04420" name="l04420"></a><span class="lineno"><a class="line" href="group__conn_pub_group.html#ga052de4b75b3b69ccd8d20eb4861b801d"> 4420</a></span><a class="code hl_function" href="group__conn_pub_group.html#ga052de4b75b3b69ccd8d20eb4861b801d">natsConnection_RequestMsg</a>(<a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **replyMsg, <a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc,</div>
+<div class="line"><a id="l04421" name="l04421"></a><span class="lineno"> 4421</span>                          <a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *requestMsg, int64_t timeout);</div>
+<div class="line"><a id="l04422" name="l04422"></a><span class="lineno"> 4422</span> <span class="comment">// end of connPubGroup</span></div>
+<div class="line"><a id="l04424" name="l04424"></a><span class="lineno"> 4424</span> </div>
+<div class="line"><a id="l04445" name="l04445"></a><span class="lineno"> 4445</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04446" name="l04446"></a><span class="lineno"><a class="line" href="group__conn_sub_group.html#gaefab965b5645798d47f9244f2b3fe3fb"> 4446</a></span><a class="code hl_function" href="group__conn_sub_group.html#gaefab965b5645798d47f9244f2b3fe3fb">natsConnection_Subscribe</a>(<a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **sub, <a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc,</div>
+<div class="line"><a id="l04447" name="l04447"></a><span class="lineno"> 4447</span>                         <span class="keyword">const</span> <span class="keywordtype">char</span> *subject, <a class="code hl_typedef" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe">natsMsgHandler</a> cb,</div>
+<div class="line"><a id="l04448" name="l04448"></a><span class="lineno"> 4448</span>                         <span class="keywordtype">void</span> *cbClosure);</div>
+<div class="line"><a id="l04449" name="l04449"></a><span class="lineno"> 4449</span> </div>
+<div class="line"><a id="l04480" name="l04480"></a><span class="lineno"> 4480</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04481" name="l04481"></a><span class="lineno"><a class="line" href="group__conn_sub_group.html#gacb2c83b58b7909715424cbc327fdd404"> 4481</a></span><a class="code hl_function" href="group__conn_sub_group.html#gacb2c83b58b7909715424cbc327fdd404">natsConnection_SubscribeTimeout</a>(<a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **sub, <a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc,</div>
+<div class="line"><a id="l04482" name="l04482"></a><span class="lineno"> 4482</span>                                <span class="keyword">const</span> <span class="keywordtype">char</span> *subject, int64_t timeout,</div>
+<div class="line"><a id="l04483" name="l04483"></a><span class="lineno"> 4483</span>                                <a class="code hl_typedef" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe">natsMsgHandler</a> cb, <span class="keywordtype">void</span> *cbClosure);</div>
+<div class="line"><a id="l04484" name="l04484"></a><span class="lineno"> 4484</span> </div>
+<div class="line"><a id="l04495" name="l04495"></a><span class="lineno"> 4495</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04496" name="l04496"></a><span class="lineno"><a class="line" href="group__conn_sub_group.html#ga17574d5165f7e285462e3d3b2709edf4"> 4496</a></span><a class="code hl_function" href="group__conn_sub_group.html#ga17574d5165f7e285462e3d3b2709edf4">natsConnection_SubscribeSync</a>(<a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **sub, <a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc,</div>
+<div class="line"><a id="l04497" name="l04497"></a><span class="lineno"> 4497</span>                             <span class="keyword">const</span> <span class="keywordtype">char</span> *subject);</div>
+<div class="line"><a id="l04498" name="l04498"></a><span class="lineno"> 4498</span> </div>
+<div class="line"><a id="l04516" name="l04516"></a><span class="lineno"> 4516</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04517" name="l04517"></a><span class="lineno"><a class="line" href="group__conn_sub_group.html#ga3c9fee2775130786ef62f1cbeb191a48"> 4517</a></span><a class="code hl_function" href="group__conn_sub_group.html#ga3c9fee2775130786ef62f1cbeb191a48">natsConnection_QueueSubscribe</a>(<a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **sub, <a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc,</div>
+<div class="line"><a id="l04518" name="l04518"></a><span class="lineno"> 4518</span>                              <span class="keyword">const</span> <span class="keywordtype">char</span> *subject, <span class="keyword">const</span> <span class="keywordtype">char</span> *queueGroup,</div>
+<div class="line"><a id="l04519" name="l04519"></a><span class="lineno"> 4519</span>                              <a class="code hl_typedef" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe">natsMsgHandler</a> cb, <span class="keywordtype">void</span> *cbClosure);</div>
+<div class="line"><a id="l04520" name="l04520"></a><span class="lineno"> 4520</span> </div>
+<div class="line"><a id="l04553" name="l04553"></a><span class="lineno"> 4553</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04554" name="l04554"></a><span class="lineno"><a class="line" href="group__conn_sub_group.html#ga96fa115fd5b2ef7658884da80714b91c"> 4554</a></span><a class="code hl_function" href="group__conn_sub_group.html#ga96fa115fd5b2ef7658884da80714b91c">natsConnection_QueueSubscribeTimeout</a>(<a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **sub, <a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc,</div>
+<div class="line"><a id="l04555" name="l04555"></a><span class="lineno"> 4555</span>                   <span class="keyword">const</span> <span class="keywordtype">char</span> *subject, <span class="keyword">const</span> <span class="keywordtype">char</span> *queueGroup,</div>
+<div class="line"><a id="l04556" name="l04556"></a><span class="lineno"> 4556</span>                   int64_t timeout, <a class="code hl_typedef" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe">natsMsgHandler</a> cb, <span class="keywordtype">void</span> *cbClosure);</div>
+<div class="line"><a id="l04557" name="l04557"></a><span class="lineno"> 4557</span> </div>
+<div class="line"><a id="l04569" name="l04569"></a><span class="lineno"> 4569</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04570" name="l04570"></a><span class="lineno"><a class="line" href="group__conn_sub_group.html#ga68630ea7c4bbdc7f8cd62058b41fb476"> 4570</a></span><a class="code hl_function" href="group__conn_sub_group.html#ga68630ea7c4bbdc7f8cd62058b41fb476">natsConnection_QueueSubscribeSync</a>(<a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **sub, <a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc,</div>
+<div class="line"><a id="l04571" name="l04571"></a><span class="lineno"> 4571</span>                                  <span class="keyword">const</span> <span class="keywordtype">char</span> *subject, <span class="keyword">const</span> <span class="keywordtype">char</span> *queueGroup);</div>
+<div class="line"><a id="l04572" name="l04572"></a><span class="lineno"> 4572</span> <span class="comment">// end of connSubGroup</span></div>
+<div class="line"><a id="l04574" name="l04574"></a><span class="lineno"> 4574</span> <span class="comment">// end of connGroup</span></div>
+<div class="line"><a id="l04576" name="l04576"></a><span class="lineno"> 4576</span> </div>
+<div class="line"><a id="l04595" name="l04595"></a><span class="lineno"> 4595</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04596" name="l04596"></a><span class="lineno"><a class="line" href="group__sub_group.html#ga38f1e41fc7619101fc4aa52014dd5428"> 4596</a></span><a class="code hl_function" href="group__sub_group.html#ga38f1e41fc7619101fc4aa52014dd5428">natsSubscription_NoDeliveryDelay</a>(<a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub);</div>
+<div class="line"><a id="l04597" name="l04597"></a><span class="lineno"> 4597</span> </div>
+<div class="line"><a id="l04620" name="l04620"></a><span class="lineno"> 4620</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04621" name="l04621"></a><span class="lineno"><a class="line" href="group__sub_group.html#ga6538a5d78dfb0f16514b94c8e74c11af"> 4621</a></span><a class="code hl_function" href="group__sub_group.html#ga6538a5d78dfb0f16514b94c8e74c11af">natsSubscription_NextMsg</a>(<a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **nextMsg, <a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub,</div>
+<div class="line"><a id="l04622" name="l04622"></a><span class="lineno"> 4622</span>                         int64_t timeout);</div>
+<div class="line"><a id="l04623" name="l04623"></a><span class="lineno"> 4623</span> </div>
+<div class="line"><a id="l04632" name="l04632"></a><span class="lineno"> 4632</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04633" name="l04633"></a><span class="lineno"><a class="line" href="group__sub_group.html#gaee87f8be0e6c2a4693ba2cea070583ba"> 4633</a></span><a class="code hl_function" href="group__sub_group.html#gaee87f8be0e6c2a4693ba2cea070583ba">natsSubscription_Unsubscribe</a>(<a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub);</div>
+<div class="line"><a id="l04634" name="l04634"></a><span class="lineno"> 4634</span> </div>
+<div class="line"><a id="l04646" name="l04646"></a><span class="lineno"> 4646</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04647" name="l04647"></a><span class="lineno"><a class="line" href="group__sub_group.html#ga09f285de2746a6e27fc66efd60bd3116"> 4647</a></span><a class="code hl_function" href="group__sub_group.html#ga09f285de2746a6e27fc66efd60bd3116">natsSubscription_AutoUnsubscribe</a>(<a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, <span class="keywordtype">int</span> max);</div>
+<div class="line"><a id="l04648" name="l04648"></a><span class="lineno"> 4648</span> </div>
+<div class="line"><a id="l04658" name="l04658"></a><span class="lineno"> 4658</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04659" name="l04659"></a><span class="lineno"><a class="line" href="group__sub_group.html#ga8a37b2d5290da3aecc05483d79e7e254"> 4659</a></span><a class="code hl_function" href="group__sub_group.html#ga8a37b2d5290da3aecc05483d79e7e254">natsSubscription_QueuedMsgs</a>(<a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, uint64_t *queuedMsgs);</div>
+<div class="line"><a id="l04660" name="l04660"></a><span class="lineno"> 4660</span> </div>
+<div class="line"><a id="l04669" name="l04669"></a><span class="lineno"> 4669</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t</div>
+<div class="line"><a id="l04670" name="l04670"></a><span class="lineno"><a class="line" href="group__sub_group.html#ga5a029a784c0a7f8b5800b48cc995db20"> 4670</a></span><a class="code hl_function" href="group__sub_group.html#ga5a029a784c0a7f8b5800b48cc995db20">natsSubscription_GetID</a>(<a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a>* sub);</div>
+<div class="line"><a id="l04671" name="l04671"></a><span class="lineno"> 4671</span> </div>
+<div class="line"><a id="l04682" name="l04682"></a><span class="lineno"> 4682</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keyword">const</span> <span class="keywordtype">char</span>*</div>
+<div class="line"><a id="l04683" name="l04683"></a><span class="lineno"><a class="line" href="group__sub_group.html#gadd4872b9fc5678a73f9ab04ce8428432"> 4683</a></span><a class="code hl_function" href="group__sub_group.html#gadd4872b9fc5678a73f9ab04ce8428432">natsSubscription_GetSubject</a>(<a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a>* sub);</div>
+<div class="line"><a id="l04684" name="l04684"></a><span class="lineno"> 4684</span> </div>
+<div class="line"><a id="l04705" name="l04705"></a><span class="lineno"> 4705</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04706" name="l04706"></a><span class="lineno"><a class="line" href="group__sub_group.html#ga68a7cea89e75c529a7dd3bb77303dda4"> 4706</a></span><a class="code hl_function" href="group__sub_group.html#ga68a7cea89e75c529a7dd3bb77303dda4">natsSubscription_SetPendingLimits</a>(<a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, <span class="keywordtype">int</span> msgLimit, <span class="keywordtype">int</span> bytesLimit);</div>
+<div class="line"><a id="l04707" name="l04707"></a><span class="lineno"> 4707</span> </div>
+<div class="line"><a id="l04727" name="l04727"></a><span class="lineno"> 4727</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04728" name="l04728"></a><span class="lineno"><a class="line" href="group__sub_group.html#ga786bb458981274fe717f266bd3b96d96"> 4728</a></span><a class="code hl_function" href="group__sub_group.html#ga786bb458981274fe717f266bd3b96d96">natsSubscription_GetPendingLimits</a>(<a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, <span class="keywordtype">int</span> *msgLimit, <span class="keywordtype">int</span> *bytesLimit);</div>
+<div class="line"><a id="l04729" name="l04729"></a><span class="lineno"> 4729</span> </div>
+<div class="line"><a id="l04744" name="l04744"></a><span class="lineno"> 4744</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04745" name="l04745"></a><span class="lineno"><a class="line" href="group__sub_group.html#gaca6262e2ef842caa701a9f233db72707"> 4745</a></span><a class="code hl_function" href="group__sub_group.html#gaca6262e2ef842caa701a9f233db72707">natsSubscription_GetPending</a>(<a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, <span class="keywordtype">int</span> *msgs, <span class="keywordtype">int</span> *bytes);</div>
+<div class="line"><a id="l04746" name="l04746"></a><span class="lineno"> 4746</span> </div>
+<div class="line"><a id="l04755" name="l04755"></a><span class="lineno"> 4755</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04756" name="l04756"></a><span class="lineno"><a class="line" href="group__sub_group.html#ga476b7276d0b7f9946834d2bb2423e955"> 4756</a></span><a class="code hl_function" href="group__sub_group.html#ga476b7276d0b7f9946834d2bb2423e955">natsSubscription_GetDelivered</a>(<a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int64_t *msgs);</div>
+<div class="line"><a id="l04757" name="l04757"></a><span class="lineno"> 4757</span> </div>
+<div class="line"><a id="l04773" name="l04773"></a><span class="lineno"> 4773</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04774" name="l04774"></a><span class="lineno"><a class="line" href="group__sub_group.html#ga24f1636869e26661ce62c9c9f4d80823"> 4774</a></span><a class="code hl_function" href="group__sub_group.html#ga24f1636869e26661ce62c9c9f4d80823">natsSubscription_GetDropped</a>(<a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int64_t *msgs);</div>
+<div class="line"><a id="l04775" name="l04775"></a><span class="lineno"> 4775</span> </div>
+<div class="line"><a id="l04788" name="l04788"></a><span class="lineno"> 4788</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04789" name="l04789"></a><span class="lineno"><a class="line" href="group__sub_group.html#ga0abc5d9afbc6b0c9c5adaf533904c968"> 4789</a></span><a class="code hl_function" href="group__sub_group.html#ga0abc5d9afbc6b0c9c5adaf533904c968">natsSubscription_GetMaxPending</a>(<a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, <span class="keywordtype">int</span> *msgs, <span class="keywordtype">int</span> *bytes);</div>
+<div class="line"><a id="l04790" name="l04790"></a><span class="lineno"> 4790</span> </div>
+<div class="line"><a id="l04797" name="l04797"></a><span class="lineno"> 4797</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04798" name="l04798"></a><span class="lineno"><a class="line" href="group__sub_group.html#gafe31911d8372db401d33856465421710"> 4798</a></span><a class="code hl_function" href="group__sub_group.html#gafe31911d8372db401d33856465421710">natsSubscription_ClearMaxPending</a>(<a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub);</div>
+<div class="line"><a id="l04799" name="l04799"></a><span class="lineno"> 4799</span> </div>
+<div class="line"><a id="l04826" name="l04826"></a><span class="lineno"> 4826</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04827" name="l04827"></a><span class="lineno"><a class="line" href="group__sub_group.html#ga12b60cdb3aca7329edebc480ae86bfab"> 4827</a></span><a class="code hl_function" href="group__sub_group.html#ga12b60cdb3aca7329edebc480ae86bfab">natsSubscription_GetStats</a>(<a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub,</div>
+<div class="line"><a id="l04828" name="l04828"></a><span class="lineno"> 4828</span>                          <span class="keywordtype">int</span>     *pendingMsgs,</div>
+<div class="line"><a id="l04829" name="l04829"></a><span class="lineno"> 4829</span>                          <span class="keywordtype">int</span>     *pendingBytes,</div>
+<div class="line"><a id="l04830" name="l04830"></a><span class="lineno"> 4830</span>                          <span class="keywordtype">int</span>     *maxPendingMsgs,</div>
+<div class="line"><a id="l04831" name="l04831"></a><span class="lineno"> 4831</span>                          <span class="keywordtype">int</span>     *maxPendingBytes,</div>
+<div class="line"><a id="l04832" name="l04832"></a><span class="lineno"> 4832</span>                          int64_t *deliveredMsgs,</div>
+<div class="line"><a id="l04833" name="l04833"></a><span class="lineno"> 4833</span>                          int64_t *droppedMsgs);</div>
+<div class="line"><a id="l04834" name="l04834"></a><span class="lineno"> 4834</span> </div>
+<div class="line"><a id="l04843" name="l04843"></a><span class="lineno"> 4843</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">bool</span></div>
+<div class="line"><a id="l04844" name="l04844"></a><span class="lineno"><a class="line" href="group__sub_group.html#ga5e6454bbc7a90b9694112d45bd8de903"> 4844</a></span><a class="code hl_function" href="group__sub_group.html#ga5e6454bbc7a90b9694112d45bd8de903">natsSubscription_IsValid</a>(<a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub);</div>
+<div class="line"><a id="l04845" name="l04845"></a><span class="lineno"> 4845</span> </div>
+<div class="line"><a id="l04863" name="l04863"></a><span class="lineno"> 4863</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04864" name="l04864"></a><span class="lineno"><a class="line" href="group__sub_group.html#ga26c9736289d326fb7d6df7e2a0df72ab"> 4864</a></span><a class="code hl_function" href="group__sub_group.html#ga26c9736289d326fb7d6df7e2a0df72ab">natsSubscription_Drain</a>(<a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub);</div>
+<div class="line"><a id="l04865" name="l04865"></a><span class="lineno"> 4865</span> </div>
+<div class="line"><a id="l04916" name="l04916"></a><span class="lineno"> 4916</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04917" name="l04917"></a><span class="lineno"><a class="line" href="group__sub_group.html#ga9c26a3f9584e7804060a48ec1b7e2a68"> 4917</a></span><a class="code hl_function" href="group__sub_group.html#ga9c26a3f9584e7804060a48ec1b7e2a68">natsSubscription_DrainTimeout</a>(<a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int64_t timeout);</div>
+<div class="line"><a id="l04918" name="l04918"></a><span class="lineno"> 4918</span> </div>
+<div class="line"><a id="l04941" name="l04941"></a><span class="lineno"> 4941</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04942" name="l04942"></a><span class="lineno"><a class="line" href="group__sub_group.html#ga0408c9b6e4ad4078ac0267656ace222d"> 4942</a></span><a class="code hl_function" href="group__sub_group.html#ga0408c9b6e4ad4078ac0267656ace222d">natsSubscription_WaitForDrainCompletion</a>(<a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, int64_t timeout);</div>
+<div class="line"><a id="l04943" name="l04943"></a><span class="lineno"> 4943</span> </div>
+<div class="line"><a id="l04969" name="l04969"></a><span class="lineno"> 4969</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l04970" name="l04970"></a><span class="lineno"><a class="line" href="group__sub_group.html#ga9834bd02f67a25ac084d5ad71e146019"> 4970</a></span><a class="code hl_function" href="group__sub_group.html#ga9834bd02f67a25ac084d5ad71e146019">natsSubscription_DrainCompletionStatus</a>(<a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub);</div>
+<div class="line"><a id="l04971" name="l04971"></a><span class="lineno"> 4971</span> </div>
+<div class="line"><a id="l05000" name="l05000"></a><span class="lineno"> 5000</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05001" name="l05001"></a><span class="lineno"><a class="line" href="group__sub_group.html#gaea632f845d473e7461b134c0e7bf4077"> 5001</a></span><a class="code hl_function" href="group__sub_group.html#gaea632f845d473e7461b134c0e7bf4077">natsSubscription_SetOnCompleteCB</a>(<a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, <a class="code hl_typedef" href="group__callbacks_group.html#ga245131e64f1d0dff7edc8ed874a07e9a">natsOnCompleteCB</a> cb, <span class="keywordtype">void</span> *closure);</div>
+<div class="line"><a id="l05002" name="l05002"></a><span class="lineno"> 5002</span> </div>
+<div class="line"><a id="l05010" name="l05010"></a><span class="lineno"> 5010</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l05011" name="l05011"></a><span class="lineno"><a class="line" href="group__sub_group.html#ga50a95dd96e9b714201679a015d62832f"> 5011</a></span><a class="code hl_function" href="group__sub_group.html#ga50a95dd96e9b714201679a015d62832f">natsSubscription_Destroy</a>(<a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub);</div>
+<div class="line"><a id="l05012" name="l05012"></a><span class="lineno"> 5012</span> <span class="comment">// end of subGroup</span></div>
+<div class="line"><a id="l05014" name="l05014"></a><span class="lineno"> 5014</span> </div>
+<div class="line"><a id="l05015" name="l05015"></a><span class="lineno"> 5015</span><span class="preprocessor">#if defined(NATS_HAS_STREAMING)</span></div>
+<div class="line"><a id="l05056" name="l05056"></a><span class="lineno"> 5056</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05057" name="l05057"></a><span class="lineno"><a class="line" href="group__stan_conn_mgt_group.html#ga35e0e6e5e3b7f3818a3ac3600efb8f8f"> 5057</a></span><a class="code hl_function" href="group__stan_conn_mgt_group.html#ga35e0e6e5e3b7f3818a3ac3600efb8f8f">stanConnection_Connect</a>(<a class="code hl_typedef" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> **sc, <span class="keyword">const</span> <span class="keywordtype">char</span> *clusterID, <span class="keyword">const</span> <span class="keywordtype">char</span> *clientID,</div>
+<div class="line"><a id="l05058" name="l05058"></a><span class="lineno"> 5058</span>                       <a class="code hl_typedef" href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a> *options);</div>
+<div class="line"><a id="l05059" name="l05059"></a><span class="lineno"> 5059</span> </div>
+<div class="line"><a id="l05082" name="l05082"></a><span class="lineno"> 5082</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05083" name="l05083"></a><span class="lineno"><a class="line" href="group__stan_conn_mgt_group.html#ga166ec494a55c9b1f9ebafd2294e05ff6"> 5083</a></span><a class="code hl_function" href="group__stan_conn_mgt_group.html#ga166ec494a55c9b1f9ebafd2294e05ff6">stanConnection_GetNATSConnection</a>(<a class="code hl_typedef" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *sc, <a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> **nc);</div>
+<div class="line"><a id="l05084" name="l05084"></a><span class="lineno"> 5084</span> </div>
+<div class="line"><a id="l05109" name="l05109"></a><span class="lineno"> 5109</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l05110" name="l05110"></a><span class="lineno"><a class="line" href="group__stan_conn_mgt_group.html#ga2e56a93825e1214a5ab688860e2a8ce6"> 5110</a></span><a class="code hl_function" href="group__stan_conn_mgt_group.html#ga2e56a93825e1214a5ab688860e2a8ce6">stanConnection_ReleaseNATSConnection</a>(<a class="code hl_typedef" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *sc);</div>
+<div class="line"><a id="l05111" name="l05111"></a><span class="lineno"> 5111</span> </div>
+<div class="line"><a id="l05122" name="l05122"></a><span class="lineno"> 5122</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05123" name="l05123"></a><span class="lineno"><a class="line" href="group__stan_conn_mgt_group.html#ga4952a7f65a53fdb5ca1c26b1a1656f1d"> 5123</a></span><a class="code hl_function" href="group__stan_conn_mgt_group.html#ga4952a7f65a53fdb5ca1c26b1a1656f1d">stanConnection_Close</a>(<a class="code hl_typedef" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *sc);</div>
+<div class="line"><a id="l05124" name="l05124"></a><span class="lineno"> 5124</span> </div>
+<div class="line"><a id="l05132" name="l05132"></a><span class="lineno"> 5132</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05133" name="l05133"></a><span class="lineno"><a class="line" href="group__stan_conn_mgt_group.html#gaea095eec18fdf04e06de16711f8b1a04"> 5133</a></span><a class="code hl_function" href="group__stan_conn_mgt_group.html#gaea095eec18fdf04e06de16711f8b1a04">stanConnection_Destroy</a>(<a class="code hl_typedef" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *sc);</div>
+<div class="line"><a id="l05134" name="l05134"></a><span class="lineno"> 5134</span> <span class="comment">// end of stanConnMgtGroup</span></div>
+<div class="line"><a id="l05136" name="l05136"></a><span class="lineno"> 5136</span> </div>
+<div class="line"><a id="l05153" name="l05153"></a><span class="lineno"> 5153</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05154" name="l05154"></a><span class="lineno"><a class="line" href="group__stan_conn_pub_group.html#ga24f3f7f709b15fe53e1edaeead08fc7d"> 5154</a></span><a class="code hl_function" href="group__stan_conn_pub_group.html#ga24f3f7f709b15fe53e1edaeead08fc7d">stanConnection_Publish</a>(<a class="code hl_typedef" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *sc, <span class="keyword">const</span> <span class="keywordtype">char</span> *channel,</div>
+<div class="line"><a id="l05155" name="l05155"></a><span class="lineno"> 5155</span>                       <span class="keyword">const</span> <span class="keywordtype">void</span> *data, <span class="keywordtype">int</span> dataLen);</div>
+<div class="line"><a id="l05156" name="l05156"></a><span class="lineno"> 5156</span> </div>
+<div class="line"><a id="l05180" name="l05180"></a><span class="lineno"> 5180</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05181" name="l05181"></a><span class="lineno"><a class="line" href="group__stan_conn_pub_group.html#ga0c4d1e4615f8ac834f0a4021f75d39f0"> 5181</a></span><a class="code hl_function" href="group__stan_conn_pub_group.html#ga0c4d1e4615f8ac834f0a4021f75d39f0">stanConnection_PublishAsync</a>(<a class="code hl_typedef" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *sc, <span class="keyword">const</span> <span class="keywordtype">char</span> *channel,</div>
+<div class="line"><a id="l05182" name="l05182"></a><span class="lineno"> 5182</span>                            <span class="keyword">const</span> <span class="keywordtype">void</span> *data, <span class="keywordtype">int</span> dataLen,</div>
+<div class="line"><a id="l05183" name="l05183"></a><span class="lineno"> 5183</span>                            <a class="code hl_typedef" href="group__callbacks_group.html#gad5d6a685731b3bf635995b7375af4d18">stanPubAckHandler</a> ah, <span class="keywordtype">void</span> *ahClosure);</div>
+<div class="line"><a id="l05184" name="l05184"></a><span class="lineno"> 5184</span> <span class="comment">// end of stanConnPubGroup</span></div>
+<div class="line"><a id="l05186" name="l05186"></a><span class="lineno"> 5186</span> </div>
+<div class="line"><a id="l05209" name="l05209"></a><span class="lineno"> 5209</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05210" name="l05210"></a><span class="lineno"><a class="line" href="group__stan_conn_sub_group.html#gae545358fdc493baf6d29429a8156781f"> 5210</a></span><a class="code hl_function" href="group__stan_conn_sub_group.html#gae545358fdc493baf6d29429a8156781f">stanConnection_Subscribe</a>(<a class="code hl_typedef" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a> **sub, <a class="code hl_typedef" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *sc,</div>
+<div class="line"><a id="l05211" name="l05211"></a><span class="lineno"> 5211</span>                         <span class="keyword">const</span> <span class="keywordtype">char</span> *channel, <a class="code hl_typedef" href="group__callbacks_group.html#gaf7456e37fa14f1834d9048d3789e9409">stanMsgHandler</a> cb,</div>
+<div class="line"><a id="l05212" name="l05212"></a><span class="lineno"> 5212</span>                         <span class="keywordtype">void</span> *cbClosure, <a class="code hl_typedef" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *options);</div>
+<div class="line"><a id="l05213" name="l05213"></a><span class="lineno"> 5213</span> </div>
+<div class="line"><a id="l05233" name="l05233"></a><span class="lineno"> 5233</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05234" name="l05234"></a><span class="lineno"><a class="line" href="group__stan_conn_sub_group.html#ga17d42bf9a4fa39470561a1a668e6b4a2"> 5234</a></span><a class="code hl_function" href="group__stan_conn_sub_group.html#ga17d42bf9a4fa39470561a1a668e6b4a2">stanConnection_QueueSubscribe</a>(<a class="code hl_typedef" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a> **sub, <a class="code hl_typedef" href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a> *sc,</div>
+<div class="line"><a id="l05235" name="l05235"></a><span class="lineno"> 5235</span>                              <span class="keyword">const</span> <span class="keywordtype">char</span> *channel, <span class="keyword">const</span> <span class="keywordtype">char</span> *queueGroup,</div>
+<div class="line"><a id="l05236" name="l05236"></a><span class="lineno"> 5236</span>                              <a class="code hl_typedef" href="group__callbacks_group.html#gaf7456e37fa14f1834d9048d3789e9409">stanMsgHandler</a> cb, <span class="keywordtype">void</span> *cbClosure, <a class="code hl_typedef" href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a> *options);</div>
+<div class="line"><a id="l05237" name="l05237"></a><span class="lineno"> 5237</span> <span class="comment">// end of stanConnSubGroup</span></div>
+<div class="line"><a id="l05239" name="l05239"></a><span class="lineno"> 5239</span> <span class="comment">// end of stanConnGroup</span></div>
+<div class="line"><a id="l05241" name="l05241"></a><span class="lineno"> 5241</span> </div>
+<div class="line"><a id="l05270" name="l05270"></a><span class="lineno"> 5270</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05271" name="l05271"></a><span class="lineno"><a class="line" href="group__stan_sub_group.html#ga7b039908ec45cfc2c16ec61ba8daca9d"> 5271</a></span><a class="code hl_function" href="group__stan_sub_group.html#ga7b039908ec45cfc2c16ec61ba8daca9d">stanSubscription_SetOnCompleteCB</a>(<a class="code hl_typedef" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a> *sub, <a class="code hl_typedef" href="group__callbacks_group.html#ga245131e64f1d0dff7edc8ed874a07e9a">natsOnCompleteCB</a> cb, <span class="keywordtype">void</span> *closure);</div>
+<div class="line"><a id="l05272" name="l05272"></a><span class="lineno"> 5272</span> </div>
+<div class="line"><a id="l05282" name="l05282"></a><span class="lineno"> 5282</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05283" name="l05283"></a><span class="lineno"><a class="line" href="group__stan_sub_group.html#ga3a1cca9fa3ea54fcf7a43fd1335a26d3"> 5283</a></span><a class="code hl_function" href="group__stan_sub_group.html#ga3a1cca9fa3ea54fcf7a43fd1335a26d3">stanSubscription_AckMsg</a>(<a class="code hl_typedef" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a> *sub, <a class="code hl_typedef" href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a> *msg);</div>
+<div class="line"><a id="l05284" name="l05284"></a><span class="lineno"> 5284</span> </div>
+<div class="line"><a id="l05304" name="l05304"></a><span class="lineno"> 5304</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05305" name="l05305"></a><span class="lineno"><a class="line" href="group__stan_sub_group.html#gafa428a7e0f6800216cb06fd738bd235e"> 5305</a></span><a class="code hl_function" href="group__stan_sub_group.html#gafa428a7e0f6800216cb06fd738bd235e">stanSubscription_Unsubscribe</a>(<a class="code hl_typedef" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a> *sub);</div>
+<div class="line"><a id="l05306" name="l05306"></a><span class="lineno"> 5306</span> </div>
+<div class="line"><a id="l05317" name="l05317"></a><span class="lineno"> 5317</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05318" name="l05318"></a><span class="lineno"><a class="line" href="group__stan_sub_group.html#gacfa3a7b4fa333c84acfa7521fbbb5bcc"> 5318</a></span><a class="code hl_function" href="group__stan_sub_group.html#gacfa3a7b4fa333c84acfa7521fbbb5bcc">stanSubscription_Close</a>(<a class="code hl_typedef" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a> *sub);</div>
+<div class="line"><a id="l05319" name="l05319"></a><span class="lineno"> 5319</span> </div>
+<div class="line"><a id="l05327" name="l05327"></a><span class="lineno"> 5327</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l05328" name="l05328"></a><span class="lineno"><a class="line" href="group__stan_sub_group.html#ga3f6ce924f6a1830a55e30e9910aad4ba"> 5328</a></span><a class="code hl_function" href="group__stan_sub_group.html#ga3f6ce924f6a1830a55e30e9910aad4ba">stanSubscription_Destroy</a>(<a class="code hl_typedef" href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a> *sub);</div>
+<div class="line"><a id="l05329" name="l05329"></a><span class="lineno"> 5329</span> <span class="comment">// end of stanSubGroup</span></div>
+<div class="line"><a id="l05331" name="l05331"></a><span class="lineno"> 5331</span><span class="preprocessor">#endif</span></div>
+<div class="line"><a id="l05332" name="l05332"></a><span class="lineno"> 5332</span> </div>
+<div class="line"><a id="l05346" name="l05346"></a><span class="lineno"> 5346</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05347" name="l05347"></a><span class="lineno"><a class="line" href="group__js_group.html#ga855ff9a04888d696785cc5ede96112e4"> 5347</a></span><a class="code hl_function" href="group__js_group.html#ga855ff9a04888d696785cc5ede96112e4">jsOptions_Init</a>(<a class="code hl_struct" href="structjs_options.html">jsOptions</a> *opts);</div>
+<div class="line"><a id="l05348" name="l05348"></a><span class="lineno"> 5348</span> </div>
+<div class="line"><a id="l05363" name="l05363"></a><span class="lineno"> 5363</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05364" name="l05364"></a><span class="lineno"><a class="line" href="group__js_group.html#ga8ed08b0fe1074b1e490291f0af2cb03f"> 5364</a></span><a class="code hl_function" href="group__js_group.html#ga8ed08b0fe1074b1e490291f0af2cb03f">natsConnection_JetStream</a>(<a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> **js, <a class="code hl_typedef" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <a class="code hl_struct" href="structjs_options.html">jsOptions</a> *opts);</div>
+<div class="line"><a id="l05365" name="l05365"></a><span class="lineno"> 5365</span> </div>
+<div class="line"><a id="l05372" name="l05372"></a><span class="lineno"> 5372</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l05373" name="l05373"></a><span class="lineno"><a class="line" href="group__js_group.html#gacfa6ce3e60ea540e3331a09a7f3dc856"> 5373</a></span><a class="code hl_function" href="group__js_group.html#gacfa6ce3e60ea540e3331a09a7f3dc856">jsCtx_Destroy</a>(<a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js);</div>
+<div class="line"><a id="l05374" name="l05374"></a><span class="lineno"> 5374</span> </div>
+<div class="line"><a id="l05388" name="l05388"></a><span class="lineno"> 5388</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05389" name="l05389"></a><span class="lineno"><a class="line" href="group__js_assets_group.html#gac230f71dbdc4d10bc7471d01763881d6"> 5389</a></span><a class="code hl_function" href="group__js_assets_group.html#gac230f71dbdc4d10bc7471d01763881d6">jsStreamConfig_Init</a>(<a class="code hl_struct" href="structjs_stream_config.html">jsStreamConfig</a> *cfg);</div>
+<div class="line"><a id="l05390" name="l05390"></a><span class="lineno"> 5390</span> </div>
+<div class="line"><a id="l05397" name="l05397"></a><span class="lineno"> 5397</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05398" name="l05398"></a><span class="lineno"><a class="line" href="group__js_assets_group.html#ga223691e6831072a0b8f8103a778293b0"> 5398</a></span><a class="code hl_function" href="group__js_assets_group.html#ga223691e6831072a0b8f8103a778293b0">jsPlacement_Init</a>(<a class="code hl_struct" href="structjs_placement.html">jsPlacement</a> *placement);</div>
+<div class="line"><a id="l05399" name="l05399"></a><span class="lineno"> 5399</span> </div>
+<div class="line"><a id="l05406" name="l05406"></a><span class="lineno"> 5406</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05407" name="l05407"></a><span class="lineno"><a class="line" href="group__js_assets_group.html#ga7fe8e0bf98a38eb59372e7cd78aaaf56"> 5407</a></span><a class="code hl_function" href="group__js_assets_group.html#ga7fe8e0bf98a38eb59372e7cd78aaaf56">jsStreamSource_Init</a>(<a class="code hl_struct" href="structjs_stream_source.html">jsStreamSource</a> *source);</div>
+<div class="line"><a id="l05408" name="l05408"></a><span class="lineno"> 5408</span> </div>
+<div class="line"><a id="l05415" name="l05415"></a><span class="lineno"> 5415</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05416" name="l05416"></a><span class="lineno"><a class="line" href="group__js_assets_group.html#ga81aebebcd79922104720da51e95020d4"> 5416</a></span><a class="code hl_function" href="group__js_assets_group.html#ga81aebebcd79922104720da51e95020d4">jsExternalStream_Init</a>(<a class="code hl_struct" href="structjs_external_stream.html">jsExternalStream</a> *external);</div>
+<div class="line"><a id="l05417" name="l05417"></a><span class="lineno"> 5417</span> </div>
+<div class="line"><a id="l05424" name="l05424"></a><span class="lineno"> 5424</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05425" name="l05425"></a><span class="lineno"><a class="line" href="group__js_assets_group.html#ga388bfeaa5a78ebf6ce7c15c6e3a7156b"> 5425</a></span><a class="code hl_function" href="group__js_assets_group.html#ga388bfeaa5a78ebf6ce7c15c6e3a7156b">jsRePublish_Init</a>(<a class="code hl_struct" href="structjs_re_publish.html">jsRePublish</a> *rp);</div>
+<div class="line"><a id="l05426" name="l05426"></a><span class="lineno"> 5426</span> </div>
+<div class="line"><a id="l05446" name="l05446"></a><span class="lineno"> 5446</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05447" name="l05447"></a><span class="lineno"><a class="line" href="group__js_assets_group.html#ga5efc5136d33ba52161e6732f88f1ee75"> 5447</a></span><a class="code hl_function" href="group__js_assets_group.html#ga5efc5136d33ba52161e6732f88f1ee75">js_AddStream</a>(<a class="code hl_struct" href="structjs_stream_info.html">jsStreamInfo</a> **si, <a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="code hl_struct" href="structjs_stream_config.html">jsStreamConfig</a> *cfg, <a class="code hl_struct" href="structjs_options.html">jsOptions</a> *opts, <a class="code hl_enumeration" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode);</div>
+<div class="line"><a id="l05448" name="l05448"></a><span class="lineno"> 5448</span> </div>
+<div class="line"><a id="l05468" name="l05468"></a><span class="lineno"> 5468</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05469" name="l05469"></a><span class="lineno"><a class="line" href="group__js_assets_group.html#ga75a5c44304e24481c67e17fbccc15c31"> 5469</a></span><a class="code hl_function" href="group__js_assets_group.html#ga75a5c44304e24481c67e17fbccc15c31">js_UpdateStream</a>(<a class="code hl_struct" href="structjs_stream_info.html">jsStreamInfo</a> **si, <a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="code hl_struct" href="structjs_stream_config.html">jsStreamConfig</a> *cfg, <a class="code hl_struct" href="structjs_options.html">jsOptions</a> *opts, <a class="code hl_enumeration" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode);</div>
+<div class="line"><a id="l05470" name="l05470"></a><span class="lineno"> 5470</span> </div>
+<div class="line"><a id="l05493" name="l05493"></a><span class="lineno"> 5493</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05494" name="l05494"></a><span class="lineno"><a class="line" href="group__js_assets_group.html#ga5a6a886c18a79caa403908bf7f7ef125"> 5494</a></span><a class="code hl_function" href="group__js_assets_group.html#ga5a6a886c18a79caa403908bf7f7ef125">js_PurgeStream</a>(<a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <span class="keyword">const</span> <span class="keywordtype">char</span> *stream, <a class="code hl_struct" href="structjs_options.html">jsOptions</a> *opts, <a class="code hl_enumeration" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode);</div>
+<div class="line"><a id="l05495" name="l05495"></a><span class="lineno"> 5495</span> </div>
+<div class="line"><a id="l05506" name="l05506"></a><span class="lineno"> 5506</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05507" name="l05507"></a><span class="lineno"><a class="line" href="group__js_assets_group.html#ga397e55a0b3b6d36c9bf746eee3842172"> 5507</a></span><a class="code hl_function" href="group__js_assets_group.html#ga397e55a0b3b6d36c9bf746eee3842172">js_DeleteStream</a>(<a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <span class="keyword">const</span> <span class="keywordtype">char</span> *stream, <a class="code hl_struct" href="structjs_options.html">jsOptions</a> *opts, <a class="code hl_enumeration" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode);</div>
+<div class="line"><a id="l05508" name="l05508"></a><span class="lineno"> 5508</span> </div>
+<div class="line"><a id="l05526" name="l05526"></a><span class="lineno"> 5526</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05527" name="l05527"></a><span class="lineno"><a class="line" href="group__js_assets_group.html#ga9fe289ae172f83e53ca1b1b747744c1f"> 5527</a></span><a class="code hl_function" href="group__js_assets_group.html#ga9fe289ae172f83e53ca1b1b747744c1f">js_GetMsg</a>(<a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **msg, <a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <span class="keyword">const</span> <span class="keywordtype">char</span> *stream, uint64_t seq, <a class="code hl_struct" href="structjs_options.html">jsOptions</a> *opts, <a class="code hl_enumeration" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode);</div>
+<div class="line"><a id="l05528" name="l05528"></a><span class="lineno"> 5528</span> </div>
+<div class="line"><a id="l05546" name="l05546"></a><span class="lineno"> 5546</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05547" name="l05547"></a><span class="lineno"><a class="line" href="group__js_assets_group.html#ga6835b53da27d5721eddb3698e582cf0c"> 5547</a></span><a class="code hl_function" href="group__js_assets_group.html#ga6835b53da27d5721eddb3698e582cf0c">js_GetLastMsg</a>(<a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **msg, <a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <span class="keyword">const</span> <span class="keywordtype">char</span> *stream, <span class="keyword">const</span> <span class="keywordtype">char</span> *subject, <a class="code hl_struct" href="structjs_options.html">jsOptions</a> *opts, <a class="code hl_enumeration" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode);</div>
+<div class="line"><a id="l05548" name="l05548"></a><span class="lineno"> 5548</span> </div>
+<div class="line"><a id="l05556" name="l05556"></a><span class="lineno"> 5556</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05557" name="l05557"></a><span class="lineno"><a class="line" href="group__js_assets_group.html#ga8d835d47aed9c84ce3b8dcfea469f4cb"> 5557</a></span><a class="code hl_function" href="group__js_assets_group.html#ga8d835d47aed9c84ce3b8dcfea469f4cb">jsDirectGetMsgOptions_Init</a>(<a class="code hl_struct" href="structjs_direct_get_msg_options.html">jsDirectGetMsgOptions</a> *opts);</div>
+<div class="line"><a id="l05558" name="l05558"></a><span class="lineno"> 5558</span> </div>
+<div class="line"><a id="l05581" name="l05581"></a><span class="lineno"> 5581</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05582" name="l05582"></a><span class="lineno"><a class="line" href="group__js_assets_group.html#ga62c250cecc650b1eed0fa1691893e2ae"> 5582</a></span><a class="code hl_function" href="group__js_assets_group.html#ga62c250cecc650b1eed0fa1691893e2ae">js_DirectGetMsg</a>(<a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **msg, <a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <span class="keyword">const</span> <span class="keywordtype">char</span> *stream, <a class="code hl_struct" href="structjs_options.html">jsOptions</a> *opts, <a class="code hl_struct" href="structjs_direct_get_msg_options.html">jsDirectGetMsgOptions</a> *dgOpts);</div>
+<div class="line"><a id="l05583" name="l05583"></a><span class="lineno"> 5583</span> </div>
+<div class="line"><a id="l05600" name="l05600"></a><span class="lineno"> 5600</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05601" name="l05601"></a><span class="lineno"><a class="line" href="group__js_assets_group.html#gaeba5d45abbe811c0e40830c5f26c78fd"> 5601</a></span><a class="code hl_function" href="group__js_assets_group.html#gaeba5d45abbe811c0e40830c5f26c78fd">js_DeleteMsg</a>(<a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <span class="keyword">const</span> <span class="keywordtype">char</span> *stream, uint64_t seq, <a class="code hl_struct" href="structjs_options.html">jsOptions</a> *opts, <a class="code hl_enumeration" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode);</div>
+<div class="line"><a id="l05602" name="l05602"></a><span class="lineno"> 5602</span> </div>
+<div class="line"><a id="l05617" name="l05617"></a><span class="lineno"> 5617</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05618" name="l05618"></a><span class="lineno"><a class="line" href="group__js_assets_group.html#ga7158f73e183462e9a15e9802e1746ff0"> 5618</a></span><a class="code hl_function" href="group__js_assets_group.html#ga7158f73e183462e9a15e9802e1746ff0">js_EraseMsg</a>(<a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <span class="keyword">const</span> <span class="keywordtype">char</span> *stream, uint64_t seq, <a class="code hl_struct" href="structjs_options.html">jsOptions</a> *opts, <a class="code hl_enumeration" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode);</div>
+<div class="line"><a id="l05619" name="l05619"></a><span class="lineno"> 5619</span> </div>
+<div class="line"><a id="l05646" name="l05646"></a><span class="lineno"> 5646</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05647" name="l05647"></a><span class="lineno"><a class="line" href="group__js_assets_group.html#ga94cb23a35516b7779de28fcbb263180a"> 5647</a></span><a class="code hl_function" href="group__js_assets_group.html#ga94cb23a35516b7779de28fcbb263180a">js_GetStreamInfo</a>(<a class="code hl_struct" href="structjs_stream_info.html">jsStreamInfo</a> **si, <a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <span class="keyword">const</span> <span class="keywordtype">char</span> *stream, <a class="code hl_struct" href="structjs_options.html">jsOptions</a> *opts, <a class="code hl_enumeration" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode);</div>
+<div class="line"><a id="l05648" name="l05648"></a><span class="lineno"> 5648</span> </div>
+<div class="line"><a id="l05655" name="l05655"></a><span class="lineno"> 5655</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l05656" name="l05656"></a><span class="lineno"><a class="line" href="group__js_assets_group.html#ga8ee87ef86e94be42685941abe9638bbd"> 5656</a></span><a class="code hl_function" href="group__js_assets_group.html#ga8ee87ef86e94be42685941abe9638bbd">jsStreamInfo_Destroy</a>(<a class="code hl_struct" href="structjs_stream_info.html">jsStreamInfo</a> *si);</div>
+<div class="line"><a id="l05657" name="l05657"></a><span class="lineno"> 5657</span> </div>
+<div class="line"><a id="l05672" name="l05672"></a><span class="lineno"> 5672</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05673" name="l05673"></a><span class="lineno"><a class="line" href="group__js_assets_group.html#ga531d91de372f0dffb8d64abecf88b0c0"> 5673</a></span><a class="code hl_function" href="group__js_assets_group.html#ga531d91de372f0dffb8d64abecf88b0c0">js_Streams</a>(<a class="code hl_struct" href="structjs_stream_info_list.html">jsStreamInfoList</a> **list, <a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="code hl_struct" href="structjs_options.html">jsOptions</a> *opts, <a class="code hl_enumeration" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode);</div>
+<div class="line"><a id="l05674" name="l05674"></a><span class="lineno"> 5674</span> </div>
+<div class="line"><a id="l05684" name="l05684"></a><span class="lineno"> 5684</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l05685" name="l05685"></a><span class="lineno"><a class="line" href="group__js_assets_group.html#ga38cdcc339eb8976d23296b99aa37d629"> 5685</a></span><a class="code hl_function" href="group__js_assets_group.html#ga38cdcc339eb8976d23296b99aa37d629">jsStreamInfoList_Destroy</a>(<a class="code hl_struct" href="structjs_stream_info_list.html">jsStreamInfoList</a> *list);</div>
+<div class="line"><a id="l05686" name="l05686"></a><span class="lineno"> 5686</span> </div>
+<div class="line"><a id="l05701" name="l05701"></a><span class="lineno"> 5701</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05702" name="l05702"></a><span class="lineno"><a class="line" href="group__js_assets_group.html#gac3dfc87863dbbb3c959ecde4bce905bc"> 5702</a></span><a class="code hl_function" href="group__js_assets_group.html#gac3dfc87863dbbb3c959ecde4bce905bc">js_StreamNames</a>(<a class="code hl_struct" href="structjs_stream_names_list.html">jsStreamNamesList</a> **list, <a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="code hl_struct" href="structjs_options.html">jsOptions</a> *opts, <a class="code hl_enumeration" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode);</div>
+<div class="line"><a id="l05703" name="l05703"></a><span class="lineno"> 5703</span> </div>
+<div class="line"><a id="l05713" name="l05713"></a><span class="lineno"> 5713</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l05714" name="l05714"></a><span class="lineno"><a class="line" href="group__js_assets_group.html#gaf8644f281d4e24893a6a170b4f7faa65"> 5714</a></span><a class="code hl_function" href="group__js_assets_group.html#gaf8644f281d4e24893a6a170b4f7faa65">jsStreamNamesList_Destroy</a>(<a class="code hl_struct" href="structjs_stream_names_list.html">jsStreamNamesList</a> *list);</div>
+<div class="line"><a id="l05715" name="l05715"></a><span class="lineno"> 5715</span> </div>
+<div class="line"><a id="l05724" name="l05724"></a><span class="lineno"> 5724</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05725" name="l05725"></a><span class="lineno"><a class="line" href="group__js_assets_group.html#ga3381bb05c05bf4a8979adde68d37dd66"> 5725</a></span><a class="code hl_function" href="group__js_assets_group.html#ga3381bb05c05bf4a8979adde68d37dd66">jsConsumerConfig_Init</a>(<a class="code hl_struct" href="structjs_consumer_config.html">jsConsumerConfig</a> *cc);</div>
+<div class="line"><a id="l05726" name="l05726"></a><span class="lineno"> 5726</span> </div>
+<div class="line"><a id="l05746" name="l05746"></a><span class="lineno"> 5746</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05747" name="l05747"></a><span class="lineno"><a class="line" href="group__js_assets_group.html#gaf2efb63db150e782d9007090b49d4115"> 5747</a></span><a class="code hl_function" href="group__js_assets_group.html#gaf2efb63db150e782d9007090b49d4115">js_AddConsumer</a>(<a class="code hl_struct" href="structjs_consumer_info.html">jsConsumerInfo</a> **ci, <a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js,</div>
+<div class="line"><a id="l05748" name="l05748"></a><span class="lineno"> 5748</span>                   <span class="keyword">const</span> <span class="keywordtype">char</span> *stream, <a class="code hl_struct" href="structjs_consumer_config.html">jsConsumerConfig</a> *cfg,</div>
+<div class="line"><a id="l05749" name="l05749"></a><span class="lineno"> 5749</span>                   <a class="code hl_struct" href="structjs_options.html">jsOptions</a> *opts, <a class="code hl_enumeration" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode);</div>
+<div class="line"><a id="l05750" name="l05750"></a><span class="lineno"> 5750</span> </div>
+<div class="line"><a id="l05770" name="l05770"></a><span class="lineno"> 5770</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05771" name="l05771"></a><span class="lineno"><a class="line" href="group__js_assets_group.html#gad13ec256e24710bb237995814871e554"> 5771</a></span><a class="code hl_function" href="group__js_assets_group.html#gad13ec256e24710bb237995814871e554">js_UpdateConsumer</a>(<a class="code hl_struct" href="structjs_consumer_info.html">jsConsumerInfo</a> **ci, <a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js,</div>
+<div class="line"><a id="l05772" name="l05772"></a><span class="lineno"> 5772</span>                  <span class="keyword">const</span> <span class="keywordtype">char</span> *stream, <a class="code hl_struct" href="structjs_consumer_config.html">jsConsumerConfig</a> *cfg,</div>
+<div class="line"><a id="l05773" name="l05773"></a><span class="lineno"> 5773</span>                  <a class="code hl_struct" href="structjs_options.html">jsOptions</a> *opts, <a class="code hl_enumeration" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode);</div>
+<div class="line"><a id="l05774" name="l05774"></a><span class="lineno"> 5774</span> </div>
+<div class="line"><a id="l05788" name="l05788"></a><span class="lineno"> 5788</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05789" name="l05789"></a><span class="lineno"><a class="line" href="group__js_assets_group.html#ga2dda04757b4ab27a794b64f8d727fe23"> 5789</a></span><a class="code hl_function" href="group__js_assets_group.html#ga2dda04757b4ab27a794b64f8d727fe23">js_GetConsumerInfo</a>(<a class="code hl_struct" href="structjs_consumer_info.html">jsConsumerInfo</a> **ci, <a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js,</div>
+<div class="line"><a id="l05790" name="l05790"></a><span class="lineno"> 5790</span>                       <span class="keyword">const</span> <span class="keywordtype">char</span> *stream, <span class="keyword">const</span> <span class="keywordtype">char</span> *consumer,</div>
+<div class="line"><a id="l05791" name="l05791"></a><span class="lineno"> 5791</span>                       <a class="code hl_struct" href="structjs_options.html">jsOptions</a> *opts, <a class="code hl_enumeration" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode);</div>
+<div class="line"><a id="l05792" name="l05792"></a><span class="lineno"> 5792</span> </div>
+<div class="line"><a id="l05804" name="l05804"></a><span class="lineno"> 5804</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05805" name="l05805"></a><span class="lineno"><a class="line" href="group__js_assets_group.html#ga52fbc61759b11494db91f348a733c490"> 5805</a></span><a class="code hl_function" href="group__js_assets_group.html#ga52fbc61759b11494db91f348a733c490">js_DeleteConsumer</a>(<a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <span class="keyword">const</span> <span class="keywordtype">char</span> *stream, <span class="keyword">const</span> <span class="keywordtype">char</span> *consumer,</div>
+<div class="line"><a id="l05806" name="l05806"></a><span class="lineno"> 5806</span>                      <a class="code hl_struct" href="structjs_options.html">jsOptions</a> *opts, <a class="code hl_enumeration" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode);</div>
+<div class="line"><a id="l05807" name="l05807"></a><span class="lineno"> 5807</span> </div>
+<div class="line"><a id="l05814" name="l05814"></a><span class="lineno"> 5814</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l05815" name="l05815"></a><span class="lineno"><a class="line" href="group__js_assets_group.html#ga9c1d5ed2f24ba836c10e415231f80088"> 5815</a></span><a class="code hl_function" href="group__js_assets_group.html#ga9c1d5ed2f24ba836c10e415231f80088">jsConsumerInfo_Destroy</a>(<a class="code hl_struct" href="structjs_consumer_info.html">jsConsumerInfo</a> *ci);</div>
+<div class="line"><a id="l05816" name="l05816"></a><span class="lineno"> 5816</span> </div>
+<div class="line"><a id="l05831" name="l05831"></a><span class="lineno"> 5831</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05832" name="l05832"></a><span class="lineno"><a class="line" href="group__js_assets_group.html#gaf28097ede3e9ba9926fb00856e63ffd9"> 5832</a></span><a class="code hl_function" href="group__js_assets_group.html#gaf28097ede3e9ba9926fb00856e63ffd9">js_Consumers</a>(<a class="code hl_struct" href="structjs_consumer_info_list.html">jsConsumerInfoList</a> **list, <a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <span class="keyword">const</span> <span class="keywordtype">char</span> *stream, <a class="code hl_struct" href="structjs_options.html">jsOptions</a> *opts, <a class="code hl_enumeration" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode);</div>
+<div class="line"><a id="l05833" name="l05833"></a><span class="lineno"> 5833</span> </div>
+<div class="line"><a id="l05843" name="l05843"></a><span class="lineno"> 5843</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l05844" name="l05844"></a><span class="lineno"><a class="line" href="group__js_assets_group.html#ga421de40d8e91658353111c3f2ea90ec8"> 5844</a></span><a class="code hl_function" href="group__js_assets_group.html#ga421de40d8e91658353111c3f2ea90ec8">jsConsumerInfoList_Destroy</a>(<a class="code hl_struct" href="structjs_consumer_info_list.html">jsConsumerInfoList</a> *list);</div>
+<div class="line"><a id="l05845" name="l05845"></a><span class="lineno"> 5845</span> </div>
+<div class="line"><a id="l05860" name="l05860"></a><span class="lineno"> 5860</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05861" name="l05861"></a><span class="lineno"><a class="line" href="group__js_assets_group.html#ga690d19af55d12b82c8523d1861cef8d0"> 5861</a></span><a class="code hl_function" href="group__js_assets_group.html#ga690d19af55d12b82c8523d1861cef8d0">js_ConsumerNames</a>(<a class="code hl_struct" href="structjs_consumer_names_list.html">jsConsumerNamesList</a> **list, <a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <span class="keyword">const</span> <span class="keywordtype">char</span> *stream, <a class="code hl_struct" href="structjs_options.html">jsOptions</a> *opts, <a class="code hl_enumeration" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode);</div>
+<div class="line"><a id="l05862" name="l05862"></a><span class="lineno"> 5862</span> </div>
+<div class="line"><a id="l05872" name="l05872"></a><span class="lineno"> 5872</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l05873" name="l05873"></a><span class="lineno"><a class="line" href="group__js_assets_group.html#ga2ced0d190131460bf4608ab893dffc50"> 5873</a></span><a class="code hl_function" href="group__js_assets_group.html#ga2ced0d190131460bf4608ab893dffc50">jsConsumerNamesList_Destroy</a>(<a class="code hl_struct" href="structjs_consumer_names_list.html">jsConsumerNamesList</a> *list);</div>
+<div class="line"><a id="l05874" name="l05874"></a><span class="lineno"> 5874</span> </div>
+<div class="line"><a id="l05889" name="l05889"></a><span class="lineno"> 5889</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05890" name="l05890"></a><span class="lineno"><a class="line" href="group__js_assets_group.html#gac8965dcfc6b465fbc323aa552c606c46"> 5890</a></span><a class="code hl_function" href="group__js_assets_group.html#gac8965dcfc6b465fbc323aa552c606c46">js_GetAccountInfo</a>(<a class="code hl_struct" href="structjs_account_info.html">jsAccountInfo</a> **ai, <a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="code hl_struct" href="structjs_options.html">jsOptions</a> *opts, <a class="code hl_enumeration" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode);</div>
+<div class="line"><a id="l05891" name="l05891"></a><span class="lineno"> 5891</span> </div>
+<div class="line"><a id="l05898" name="l05898"></a><span class="lineno"> 5898</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l05899" name="l05899"></a><span class="lineno"><a class="line" href="group__js_assets_group.html#ga7c8664b38fcce8497746367d35e5f60b"> 5899</a></span><a class="code hl_function" href="group__js_assets_group.html#ga7c8664b38fcce8497746367d35e5f60b">jsAccountInfo_Destroy</a>(<a class="code hl_struct" href="structjs_account_info.html">jsAccountInfo</a> *ai);</div>
+<div class="line"><a id="l05900" name="l05900"></a><span class="lineno"> 5900</span> <span class="comment">// end of jsAssetsGroup</span></div>
+<div class="line"><a id="l05902" name="l05902"></a><span class="lineno"> 5902</span> </div>
+<div class="line"><a id="l05916" name="l05916"></a><span class="lineno"> 5916</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05917" name="l05917"></a><span class="lineno"><a class="line" href="group__js_pub_group.html#gaf09f333a8675a8060c5ede07a6bdeef9"> 5917</a></span><a class="code hl_function" href="group__js_pub_group.html#gaf09f333a8675a8060c5ede07a6bdeef9">jsPubOptions_Init</a>(<a class="code hl_struct" href="structjs_pub_options.html">jsPubOptions</a> *opts);</div>
+<div class="line"><a id="l05918" name="l05918"></a><span class="lineno"> 5918</span> </div>
+<div class="line"><a id="l05934" name="l05934"></a><span class="lineno"> 5934</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05935" name="l05935"></a><span class="lineno"><a class="line" href="group__js_pub_group.html#gac6ba005531c82d9f0efa88dd6b458477"> 5935</a></span><a class="code hl_function" href="group__js_pub_group.html#gac6ba005531c82d9f0efa88dd6b458477">js_Publish</a>(<a class="code hl_struct" href="structjs_pub_ack.html">jsPubAck</a> **pubAck, <a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <span class="keyword">const</span> <span class="keywordtype">char</span> *subj, <span class="keyword">const</span> <span class="keywordtype">void</span> *data, <span class="keywordtype">int</span> dataLen,</div>
+<div class="line"><a id="l05936" name="l05936"></a><span class="lineno"> 5936</span>           <a class="code hl_struct" href="structjs_pub_options.html">jsPubOptions</a> *opts, <a class="code hl_enumeration" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode);</div>
+<div class="line"><a id="l05937" name="l05937"></a><span class="lineno"> 5937</span> </div>
+<div class="line"><a id="l05957" name="l05957"></a><span class="lineno"> 5957</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05958" name="l05958"></a><span class="lineno"><a class="line" href="group__js_pub_group.html#ga2aceeb82fac3621aea843dd246732bdd"> 5958</a></span><a class="code hl_function" href="group__js_pub_group.html#ga2aceeb82fac3621aea843dd246732bdd">js_PublishMsg</a>(<a class="code hl_struct" href="structjs_pub_ack.html">jsPubAck</a> **pubAck, <a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg,</div>
+<div class="line"><a id="l05959" name="l05959"></a><span class="lineno"> 5959</span>              <a class="code hl_struct" href="structjs_pub_options.html">jsPubOptions</a> *opts, <a class="code hl_enumeration" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode);</div>
+<div class="line"><a id="l05960" name="l05960"></a><span class="lineno"> 5960</span> </div>
+<div class="line"><a id="l05967" name="l05967"></a><span class="lineno"> 5967</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l05968" name="l05968"></a><span class="lineno"><a class="line" href="group__js_pub_group.html#gaac130840b6db9109e72cf6ad9186dfc4"> 5968</a></span><a class="code hl_function" href="group__js_pub_group.html#gaac130840b6db9109e72cf6ad9186dfc4">jsPubAck_Destroy</a>(<a class="code hl_struct" href="structjs_pub_ack.html">jsPubAck</a> *pubAck);</div>
+<div class="line"><a id="l05969" name="l05969"></a><span class="lineno"> 5969</span> </div>
+<div class="line"><a id="l05980" name="l05980"></a><span class="lineno"> 5980</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l05981" name="l05981"></a><span class="lineno"><a class="line" href="group__js_pub_group.html#ga069dfd6f0f3d96f1ff8bf2372e59900c"> 5981</a></span><a class="code hl_function" href="group__js_pub_group.html#ga069dfd6f0f3d96f1ff8bf2372e59900c">js_PublishAsync</a>(<a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <span class="keyword">const</span> <span class="keywordtype">char</span> *subj, <span class="keyword">const</span> <span class="keywordtype">void</span> *data, <span class="keywordtype">int</span> dataLen,</div>
+<div class="line"><a id="l05982" name="l05982"></a><span class="lineno"> 5982</span>                <a class="code hl_struct" href="structjs_pub_options.html">jsPubOptions</a> *opts);</div>
+<div class="line"><a id="l05983" name="l05983"></a><span class="lineno"> 5983</span> </div>
+<div class="line"><a id="l06007" name="l06007"></a><span class="lineno"> 6007</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06008" name="l06008"></a><span class="lineno"><a class="line" href="group__js_pub_group.html#gab7e4139a48c5ee4d2155cbb43142e873"> 6008</a></span><a class="code hl_function" href="group__js_pub_group.html#gab7e4139a48c5ee4d2155cbb43142e873">js_PublishMsgAsync</a>(<a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **msg, <a class="code hl_struct" href="structjs_pub_options.html">jsPubOptions</a> *opts);</div>
+<div class="line"><a id="l06009" name="l06009"></a><span class="lineno"> 6009</span> </div>
+<div class="line"><a id="l06021" name="l06021"></a><span class="lineno"> 6021</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06022" name="l06022"></a><span class="lineno"><a class="line" href="group__js_pub_group.html#ga24813ee9a58f00c0f21d10ab9c93b81d"> 6022</a></span><a class="code hl_function" href="group__js_pub_group.html#ga24813ee9a58f00c0f21d10ab9c93b81d">js_PublishAsyncComplete</a>(<a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="code hl_struct" href="structjs_pub_options.html">jsPubOptions</a> *opts);</div>
+<div class="line"><a id="l06023" name="l06023"></a><span class="lineno"> 6023</span> </div>
+<div class="line"><a id="l06072" name="l06072"></a><span class="lineno"> 6072</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06073" name="l06073"></a><span class="lineno"><a class="line" href="group__js_pub_group.html#ga2ac95a3450f77f8074fae3f2fbe7e54c"> 6073</a></span><a class="code hl_function" href="group__js_pub_group.html#ga2ac95a3450f77f8074fae3f2fbe7e54c">js_PublishAsyncGetPendingList</a>(<a class="code hl_struct" href="structnats_msg_list.html">natsMsgList</a> *pending, <a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js);</div>
+<div class="line"><a id="l06074" name="l06074"></a><span class="lineno"> 6074</span> <span class="comment">// end of jsPubGroup</span></div>
+<div class="line"><a id="l06076" name="l06076"></a><span class="lineno"> 6076</span> </div>
+<div class="line"><a id="l06090" name="l06090"></a><span class="lineno"> 6090</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06091" name="l06091"></a><span class="lineno"><a class="line" href="group__js_sub_group.html#ga472adb949d1af9d8f07bda99f5d7f3f8"> 6091</a></span><a class="code hl_function" href="group__js_sub_group.html#ga472adb949d1af9d8f07bda99f5d7f3f8">jsSubOptions_Init</a>(<a class="code hl_struct" href="structjs_sub_options.html">jsSubOptions</a> *opts);</div>
+<div class="line"><a id="l06092" name="l06092"></a><span class="lineno"> 6092</span> </div>
+<div class="line"><a id="l06138" name="l06138"></a><span class="lineno"> 6138</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06139" name="l06139"></a><span class="lineno"><a class="line" href="group__js_sub_group.html#gaa686c6efd84ef963de1925108e896515"> 6139</a></span><a class="code hl_function" href="group__js_sub_group.html#gaa686c6efd84ef963de1925108e896515">js_Subscribe</a>(<a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **sub, <a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <span class="keyword">const</span> <span class="keywordtype">char</span> *subject,</div>
+<div class="line"><a id="l06140" name="l06140"></a><span class="lineno"> 6140</span>             <a class="code hl_typedef" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe">natsMsgHandler</a> cb, <span class="keywordtype">void</span>* cbClosure,</div>
+<div class="line"><a id="l06141" name="l06141"></a><span class="lineno"> 6141</span>             <a class="code hl_struct" href="structjs_options.html">jsOptions</a> *opts, <a class="code hl_struct" href="structjs_sub_options.html">jsSubOptions</a> *subOpts, <a class="code hl_enumeration" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode);</div>
+<div class="line"><a id="l06142" name="l06142"></a><span class="lineno"> 6142</span> </div>
+<div class="line"><a id="l06157" name="l06157"></a><span class="lineno"> 6157</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06158" name="l06158"></a><span class="lineno"><a class="line" href="group__js_sub_group.html#gabacb010031e535f9fb6e2167337e8adf"> 6158</a></span><a class="code hl_function" href="group__js_sub_group.html#gabacb010031e535f9fb6e2167337e8adf">js_SubscribeSync</a>(<a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **sub, <a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <span class="keyword">const</span> <span class="keywordtype">char</span> *subject,</div>
+<div class="line"><a id="l06159" name="l06159"></a><span class="lineno"> 6159</span>                 <a class="code hl_struct" href="structjs_options.html">jsOptions</a> *opts, <a class="code hl_struct" href="structjs_sub_options.html">jsSubOptions</a> *subOpts, <a class="code hl_enumeration" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode);</div>
+<div class="line"><a id="l06160" name="l06160"></a><span class="lineno"> 6160</span> </div>
+<div class="line"><a id="l06182" name="l06182"></a><span class="lineno"> 6182</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06183" name="l06183"></a><span class="lineno"><a class="line" href="group__js_sub_group.html#gaaeaddb73857aa4eb4901eec945ed27cd"> 6183</a></span><a class="code hl_function" href="group__js_sub_group.html#gaaeaddb73857aa4eb4901eec945ed27cd">js_PullSubscribe</a>(<a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> **sub, <a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <span class="keyword">const</span> <span class="keywordtype">char</span> *subject, <span class="keyword">const</span> <span class="keywordtype">char</span> *durable,</div>
+<div class="line"><a id="l06184" name="l06184"></a><span class="lineno"> 6184</span>                 <a class="code hl_struct" href="structjs_options.html">jsOptions</a> *opts, <a class="code hl_struct" href="structjs_sub_options.html">jsSubOptions</a> *subOpts, <a class="code hl_enumeration" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode);</div>
+<div class="line"><a id="l06185" name="l06185"></a><span class="lineno"> 6185</span> </div>
+<div class="line"><a id="l06204" name="l06204"></a><span class="lineno"> 6204</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06205" name="l06205"></a><span class="lineno"><a class="line" href="group__js_sub_group.html#gafc5e0d2269bd23b4d5fb7f3b05278e50"> 6205</a></span><a class="code hl_function" href="group__js_sub_group.html#gafc5e0d2269bd23b4d5fb7f3b05278e50">natsSubscription_Fetch</a>(<a class="code hl_struct" href="structnats_msg_list.html">natsMsgList</a> *list, <a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, <span class="keywordtype">int</span> batch, int64_t timeout,</div>
+<div class="line"><a id="l06206" name="l06206"></a><span class="lineno"> 6206</span>                       <a class="code hl_enumeration" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode);</div>
+<div class="line"><a id="l06207" name="l06207"></a><span class="lineno"> 6207</span> </div>
+<div class="line"><a id="l06214" name="l06214"></a><span class="lineno"> 6214</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06215" name="l06215"></a><span class="lineno"><a class="line" href="group__js_sub_group.html#ga1c3a62de8cd4855ae61ea4f67417a43b"> 6215</a></span><a class="code hl_function" href="group__js_sub_group.html#ga1c3a62de8cd4855ae61ea4f67417a43b">jsFetchRequest_Init</a>(<a class="code hl_struct" href="structjs_fetch_request.html">jsFetchRequest</a> *request);</div>
+<div class="line"><a id="l06216" name="l06216"></a><span class="lineno"> 6216</span> </div>
+<div class="line"><a id="l06229" name="l06229"></a><span class="lineno"> 6229</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06230" name="l06230"></a><span class="lineno"><a class="line" href="group__js_sub_group.html#ga676292505e7fde8688cfd886b79a10ed"> 6230</a></span><a class="code hl_function" href="group__js_sub_group.html#ga676292505e7fde8688cfd886b79a10ed">natsSubscription_FetchRequest</a>(<a class="code hl_struct" href="structnats_msg_list.html">natsMsgList</a> *list, <a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub, <a class="code hl_struct" href="structjs_fetch_request.html">jsFetchRequest</a> *request);</div>
+<div class="line"><a id="l06231" name="l06231"></a><span class="lineno"> 6231</span> </div>
+<div class="line"><a id="l06242" name="l06242"></a><span class="lineno"> 6242</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06243" name="l06243"></a><span class="lineno"><a class="line" href="group__js_sub_group.html#gaae716a1431db065744c079b71a9f4c2e"> 6243</a></span><a class="code hl_function" href="group__js_sub_group.html#gaae716a1431db065744c079b71a9f4c2e">natsSubscription_GetConsumerInfo</a>(<a class="code hl_struct" href="structjs_consumer_info.html">jsConsumerInfo</a> **ci, <a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub,</div>
+<div class="line"><a id="l06244" name="l06244"></a><span class="lineno"> 6244</span>                                 <a class="code hl_struct" href="structjs_options.html">jsOptions</a> *opts, <a class="code hl_enumeration" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode);</div>
+<div class="line"><a id="l06245" name="l06245"></a><span class="lineno"> 6245</span> </div>
+<div class="line"><a id="l06273" name="l06273"></a><span class="lineno"> 6273</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06274" name="l06274"></a><span class="lineno"><a class="line" href="group__js_sub_group.html#ga0daed9f0d2d00cb14314ecc180a6fa84"> 6274</a></span><a class="code hl_function" href="group__js_sub_group.html#ga0daed9f0d2d00cb14314ecc180a6fa84">natsSubscription_GetSequenceMismatch</a>(<a class="code hl_struct" href="structjs_consumer_sequence_mismatch.html">jsConsumerSequenceMismatch</a> *csm, <a class="code hl_typedef" href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a> *sub);</div>
+<div class="line"><a id="l06275" name="l06275"></a><span class="lineno"> 6275</span> <span class="comment">// end of jsSubGroup</span></div>
+<div class="line"><a id="l06277" name="l06277"></a><span class="lineno"> 6277</span> </div>
+<div class="line"><a id="l06298" name="l06298"></a><span class="lineno"> 6298</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06299" name="l06299"></a><span class="lineno"><a class="line" href="group__js_msg.html#gacf48e59038fab35849e9dc6f8fcf6328"> 6299</a></span><a class="code hl_function" href="group__js_msg.html#gacf48e59038fab35849e9dc6f8fcf6328">natsMsg_GetMetaData</a>(<a class="code hl_struct" href="structjs_msg_meta_data.html">jsMsgMetaData</a> **new_meta, <a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg);</div>
+<div class="line"><a id="l06300" name="l06300"></a><span class="lineno"> 6300</span> </div>
+<div class="line"><a id="l06307" name="l06307"></a><span class="lineno"> 6307</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l06308" name="l06308"></a><span class="lineno"><a class="line" href="group__js_msg.html#gaf9bf92294342bcb27053de7038606d12"> 6308</a></span><a class="code hl_function" href="group__js_msg.html#gaf9bf92294342bcb27053de7038606d12">jsMsgMetaData_Destroy</a>(<a class="code hl_struct" href="structjs_msg_meta_data.html">jsMsgMetaData</a> *meta);</div>
+<div class="line"><a id="l06309" name="l06309"></a><span class="lineno"> 6309</span> </div>
+<div class="line"><a id="l06318" name="l06318"></a><span class="lineno"> 6318</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06319" name="l06319"></a><span class="lineno"><a class="line" href="group__js_msg.html#gae454fb7e7097a3cd3362cb49ef8a3c84"> 6319</a></span><a class="code hl_function" href="group__js_msg.html#gae454fb7e7097a3cd3362cb49ef8a3c84">natsMsg_Ack</a>(<a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, <a class="code hl_struct" href="structjs_options.html">jsOptions</a> *opts);</div>
+<div class="line"><a id="l06320" name="l06320"></a><span class="lineno"> 6320</span> </div>
+<div class="line"><a id="l06332" name="l06332"></a><span class="lineno"> 6332</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06333" name="l06333"></a><span class="lineno"><a class="line" href="group__js_msg.html#gafb899ebf8e89b3a858fe20f7853635a7"> 6333</a></span><a class="code hl_function" href="group__js_msg.html#gafb899ebf8e89b3a858fe20f7853635a7">natsMsg_AckSync</a>(<a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, <a class="code hl_struct" href="structjs_options.html">jsOptions</a> *opts, <a class="code hl_enumeration" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> *errCode);</div>
+<div class="line"><a id="l06334" name="l06334"></a><span class="lineno"> 6334</span> </div>
+<div class="line"><a id="l06345" name="l06345"></a><span class="lineno"> 6345</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06346" name="l06346"></a><span class="lineno"><a class="line" href="group__js_msg.html#gac271b874154301da9759f9ac05768b47"> 6346</a></span><a class="code hl_function" href="group__js_msg.html#gac271b874154301da9759f9ac05768b47">natsMsg_Nak</a>(<a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, <a class="code hl_struct" href="structjs_options.html">jsOptions</a> *opts);</div>
+<div class="line"><a id="l06347" name="l06347"></a><span class="lineno"> 6347</span> </div>
+<div class="line"><a id="l06360" name="l06360"></a><span class="lineno"> 6360</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06361" name="l06361"></a><span class="lineno"><a class="line" href="group__js_msg.html#gac0697389fa60a3c4725e53cd23ada7bd"> 6361</a></span><a class="code hl_function" href="group__js_msg.html#gac0697389fa60a3c4725e53cd23ada7bd">natsMsg_NakWithDelay</a>(<a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, int64_t delay, <a class="code hl_struct" href="structjs_options.html">jsOptions</a> *opts);</div>
+<div class="line"><a id="l06362" name="l06362"></a><span class="lineno"> 6362</span> </div>
+<div class="line"><a id="l06371" name="l06371"></a><span class="lineno"> 6371</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06372" name="l06372"></a><span class="lineno"><a class="line" href="group__js_msg.html#gae1e0beb19cd76e2f69e6415c41c9bb39"> 6372</a></span><a class="code hl_function" href="group__js_msg.html#gae1e0beb19cd76e2f69e6415c41c9bb39">natsMsg_InProgress</a>(<a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, <a class="code hl_struct" href="structjs_options.html">jsOptions</a> *opts);</div>
+<div class="line"><a id="l06373" name="l06373"></a><span class="lineno"> 6373</span> </div>
+<div class="line"><a id="l06382" name="l06382"></a><span class="lineno"> 6382</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06383" name="l06383"></a><span class="lineno"><a class="line" href="group__js_msg.html#gae84d21e4388255e9d990e53c9f67e7c4"> 6383</a></span><a class="code hl_function" href="group__js_msg.html#gae84d21e4388255e9d990e53c9f67e7c4">natsMsg_Term</a>(<a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg, <a class="code hl_struct" href="structjs_options.html">jsOptions</a> *opts);</div>
+<div class="line"><a id="l06384" name="l06384"></a><span class="lineno"> 6384</span> </div>
+<div class="line"><a id="l06394" name="l06394"></a><span class="lineno"> 6394</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> uint64_t</div>
+<div class="line"><a id="l06395" name="l06395"></a><span class="lineno"><a class="line" href="group__js_msg.html#ga819be2990ec20b964aa574b5331d7f2e"> 6395</a></span><a class="code hl_function" href="group__js_msg.html#ga819be2990ec20b964aa574b5331d7f2e">natsMsg_GetSequence</a>(<a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg);</div>
+<div class="line"><a id="l06396" name="l06396"></a><span class="lineno"> 6396</span> </div>
+<div class="line"><a id="l06406" name="l06406"></a><span class="lineno"> 6406</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t</div>
+<div class="line"><a id="l06407" name="l06407"></a><span class="lineno"><a class="line" href="group__js_msg.html#gab4850497c5481f5ec6eb1fcdb43646f5"> 6407</a></span><a class="code hl_function" href="group__js_msg.html#gab4850497c5481f5ec6eb1fcdb43646f5">natsMsg_GetTime</a>(<a class="code hl_typedef" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *msg);</div>
+<div class="line"><a id="l06408" name="l06408"></a><span class="lineno"> 6408</span> <span class="comment">// end of jsMsg</span></div>
+<div class="line"><a id="l06410" name="l06410"></a><span class="lineno"> 6410</span> <span class="comment">// end of jsGroup</span></div>
+<div class="line"><a id="l06412" name="l06412"></a><span class="lineno"> 6412</span> </div>
+<div class="line"><a id="l06441" name="l06441"></a><span class="lineno"> 6441</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06442" name="l06442"></a><span class="lineno"><a class="line" href="group__kv_group_mgt.html#ga16d4c27d8ac62bb86ba601bc40f53172"> 6442</a></span><a class="code hl_function" href="group__kv_group_mgt.html#ga16d4c27d8ac62bb86ba601bc40f53172">kvConfig_Init</a>(<a class="code hl_struct" href="structkv_config.html">kvConfig</a> *cfg);</div>
+<div class="line"><a id="l06443" name="l06443"></a><span class="lineno"> 6443</span> </div>
+<div class="line"><a id="l06458" name="l06458"></a><span class="lineno"> 6458</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06459" name="l06459"></a><span class="lineno"><a class="line" href="group__kv_group_mgt.html#gabc445bfe87112e56a6c73872fec6893e"> 6459</a></span><a class="code hl_function" href="group__kv_group_mgt.html#gabc445bfe87112e56a6c73872fec6893e">js_CreateKeyValue</a>(<a class="code hl_typedef" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> **new_kv, <a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <a class="code hl_struct" href="structkv_config.html">kvConfig</a> *cfg);</div>
+<div class="line"><a id="l06460" name="l06460"></a><span class="lineno"> 6460</span> </div>
+<div class="line"><a id="l06476" name="l06476"></a><span class="lineno"> 6476</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06477" name="l06477"></a><span class="lineno"><a class="line" href="group__kv_group_mgt.html#ga54e6c109a7c633e431b3eded286e00f6"> 6477</a></span><a class="code hl_function" href="group__kv_group_mgt.html#ga54e6c109a7c633e431b3eded286e00f6">js_KeyValue</a>(<a class="code hl_typedef" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> **new_kv, <a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <span class="keyword">const</span> <span class="keywordtype">char</span> *bucket);</div>
+<div class="line"><a id="l06478" name="l06478"></a><span class="lineno"> 6478</span> </div>
+<div class="line"><a id="l06488" name="l06488"></a><span class="lineno"> 6488</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06489" name="l06489"></a><span class="lineno"><a class="line" href="group__kv_group_mgt.html#ga6bc715319560bc28359679fcdcead937"> 6489</a></span><a class="code hl_function" href="group__kv_group_mgt.html#ga6bc715319560bc28359679fcdcead937">js_DeleteKeyValue</a>(<a class="code hl_typedef" href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a> *js, <span class="keyword">const</span> <span class="keywordtype">char</span> *bucket);</div>
+<div class="line"><a id="l06490" name="l06490"></a><span class="lineno"> 6490</span> </div>
+<div class="line"><a id="l06498" name="l06498"></a><span class="lineno"> 6498</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l06499" name="l06499"></a><span class="lineno"><a class="line" href="group__kv_group_mgt.html#gab0d6bdbfabd27af67eaeb36cec0787da"> 6499</a></span><a class="code hl_function" href="group__kv_group_mgt.html#gab0d6bdbfabd27af67eaeb36cec0787da">kvStore_Destroy</a>(<a class="code hl_typedef" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv);</div>
+<div class="line"><a id="l06500" name="l06500"></a><span class="lineno"> 6500</span> <span class="comment">// end of  kvGroupMgt</span></div>
+<div class="line"><a id="l06502" name="l06502"></a><span class="lineno"> 6502</span> </div>
+<div class="line"><a id="l06519" name="l06519"></a><span class="lineno"> 6519</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keyword">const</span> <span class="keywordtype">char</span>*</div>
+<div class="line"><a id="l06520" name="l06520"></a><span class="lineno"><a class="line" href="group__kv_entry.html#gadedbb410cce499afb535eb6641c32ca7"> 6520</a></span><a class="code hl_function" href="group__kv_entry.html#gadedbb410cce499afb535eb6641c32ca7">kvEntry_Bucket</a>(<a class="code hl_typedef" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *e);</div>
+<div class="line"><a id="l06521" name="l06521"></a><span class="lineno"> 6521</span> </div>
+<div class="line"><a id="l06528" name="l06528"></a><span class="lineno"> 6528</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keyword">const</span> <span class="keywordtype">char</span>*</div>
+<div class="line"><a id="l06529" name="l06529"></a><span class="lineno"><a class="line" href="group__kv_entry.html#gab455f32b0abfb1361dab4b5e7d98042a"> 6529</a></span><a class="code hl_function" href="group__kv_entry.html#gab455f32b0abfb1361dab4b5e7d98042a">kvEntry_Key</a>(<a class="code hl_typedef" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *e);</div>
+<div class="line"><a id="l06530" name="l06530"></a><span class="lineno"> 6530</span> </div>
+<div class="line"><a id="l06537" name="l06537"></a><span class="lineno"> 6537</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keyword">const</span> <span class="keywordtype">void</span>*</div>
+<div class="line"><a id="l06538" name="l06538"></a><span class="lineno"><a class="line" href="group__kv_entry.html#ga28077f81d71a30cbce2dc81e5c9574fc"> 6538</a></span><a class="code hl_function" href="group__kv_entry.html#ga28077f81d71a30cbce2dc81e5c9574fc">kvEntry_Value</a>(<a class="code hl_typedef" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *e);</div>
+<div class="line"><a id="l06539" name="l06539"></a><span class="lineno"> 6539</span> </div>
+<div class="line"><a id="l06546" name="l06546"></a><span class="lineno"> 6546</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">int</span></div>
+<div class="line"><a id="l06547" name="l06547"></a><span class="lineno"><a class="line" href="group__kv_entry.html#gaf7ccc866865903f231e0431754ed2415"> 6547</a></span><a class="code hl_function" href="group__kv_entry.html#gaf7ccc866865903f231e0431754ed2415">kvEntry_ValueLen</a>(<a class="code hl_typedef" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *e);</div>
+<div class="line"><a id="l06548" name="l06548"></a><span class="lineno"> 6548</span> </div>
+<div class="line"><a id="l06556" name="l06556"></a><span class="lineno"> 6556</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keyword">const</span> <span class="keywordtype">char</span>*</div>
+<div class="line"><a id="l06557" name="l06557"></a><span class="lineno"><a class="line" href="group__kv_entry.html#ga7ff6220915726600545357e31226fb65"> 6557</a></span><a class="code hl_function" href="group__kv_entry.html#ga7ff6220915726600545357e31226fb65">kvEntry_ValueString</a>(<a class="code hl_typedef" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *e);</div>
+<div class="line"><a id="l06558" name="l06558"></a><span class="lineno"> 6558</span> </div>
+<div class="line"><a id="l06565" name="l06565"></a><span class="lineno"> 6565</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> uint64_t</div>
+<div class="line"><a id="l06566" name="l06566"></a><span class="lineno"><a class="line" href="group__kv_entry.html#ga2d58abf81cb577e21a76f9c77568409f"> 6566</a></span><a class="code hl_function" href="group__kv_entry.html#ga2d58abf81cb577e21a76f9c77568409f">kvEntry_Revision</a>(<a class="code hl_typedef" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *e);</div>
+<div class="line"><a id="l06567" name="l06567"></a><span class="lineno"> 6567</span> </div>
+<div class="line"><a id="l06574" name="l06574"></a><span class="lineno"> 6574</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t</div>
+<div class="line"><a id="l06575" name="l06575"></a><span class="lineno"><a class="line" href="group__kv_entry.html#ga31ef3a2e3a7df6cf4dbb0a762737800a"> 6575</a></span><a class="code hl_function" href="group__kv_entry.html#ga31ef3a2e3a7df6cf4dbb0a762737800a">kvEntry_Created</a>(<a class="code hl_typedef" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *e);</div>
+<div class="line"><a id="l06576" name="l06576"></a><span class="lineno"> 6576</span> </div>
+<div class="line"><a id="l06586" name="l06586"></a><span class="lineno"> 6586</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> uint64_t</div>
+<div class="line"><a id="l06587" name="l06587"></a><span class="lineno"><a class="line" href="group__kv_entry.html#ga233a2d75895cfd0140cf77757592cf47"> 6587</a></span><a class="code hl_function" href="group__kv_entry.html#ga233a2d75895cfd0140cf77757592cf47">kvEntry_Delta</a>(<a class="code hl_typedef" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *e);</div>
+<div class="line"><a id="l06588" name="l06588"></a><span class="lineno"> 6588</span> </div>
+<div class="line"><a id="l06597" name="l06597"></a><span class="lineno"> 6597</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="group__types_group.html#ga89db3bd6bf11af3ac5eb3ab560d16332">kvOperation</a></div>
+<div class="line"><a id="l06598" name="l06598"></a><span class="lineno"><a class="line" href="group__kv_entry.html#ga088fd67d3d384ad7a7ddfc82535becea"> 6598</a></span><a class="code hl_function" href="group__kv_entry.html#ga088fd67d3d384ad7a7ddfc82535becea">kvEntry_Operation</a>(<a class="code hl_typedef" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *e);</div>
+<div class="line"><a id="l06599" name="l06599"></a><span class="lineno"> 6599</span> </div>
+<div class="line"><a id="l06606" name="l06606"></a><span class="lineno"> 6606</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l06607" name="l06607"></a><span class="lineno"><a class="line" href="group__kv_entry.html#ga8359ffcdeefb9c5821e6442d0d5ee388"> 6607</a></span><a class="code hl_function" href="group__kv_entry.html#ga8359ffcdeefb9c5821e6442d0d5ee388">kvEntry_Destroy</a>(<a class="code hl_typedef" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> *e);</div>
+<div class="line"><a id="l06608" name="l06608"></a><span class="lineno"> 6608</span> <span class="comment">// end of kvEntry</span></div>
+<div class="line"><a id="l06610" name="l06610"></a><span class="lineno"> 6610</span> </div>
+<div class="line"><a id="l06621" name="l06621"></a><span class="lineno"> 6621</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06622" name="l06622"></a><span class="lineno"><a class="line" href="group__kv_group.html#ga2db86f80d6bfce1bdbedf1b9da22913c"> 6622</a></span><a class="code hl_function" href="group__kv_group.html#ga2db86f80d6bfce1bdbedf1b9da22913c">kvStore_Get</a>(<a class="code hl_typedef" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> **new_entry, <a class="code hl_typedef" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, <span class="keyword">const</span> <span class="keywordtype">char</span> *key);</div>
+<div class="line"><a id="l06623" name="l06623"></a><span class="lineno"> 6623</span> </div>
+<div class="line"><a id="l06636" name="l06636"></a><span class="lineno"> 6636</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06637" name="l06637"></a><span class="lineno"><a class="line" href="group__kv_group.html#ga9bf43431bb8264a3ea1f0df401afbe1a"> 6637</a></span><a class="code hl_function" href="group__kv_group.html#ga9bf43431bb8264a3ea1f0df401afbe1a">kvStore_GetRevision</a>(<a class="code hl_typedef" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> **new_entry, <a class="code hl_typedef" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, <span class="keyword">const</span> <span class="keywordtype">char</span> *key, uint64_t revision);</div>
+<div class="line"><a id="l06638" name="l06638"></a><span class="lineno"> 6638</span> </div>
+<div class="line"><a id="l06649" name="l06649"></a><span class="lineno"> 6649</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06650" name="l06650"></a><span class="lineno"><a class="line" href="group__kv_group.html#ga1fdf7a1d3acf96e475184790589a401e"> 6650</a></span><a class="code hl_function" href="group__kv_group.html#ga1fdf7a1d3acf96e475184790589a401e">kvStore_Put</a>(uint64_t *rev, <a class="code hl_typedef" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, <span class="keyword">const</span> <span class="keywordtype">char</span> *key, <span class="keyword">const</span> <span class="keywordtype">void</span> *data, <span class="keywordtype">int</span> len);</div>
+<div class="line"><a id="l06651" name="l06651"></a><span class="lineno"> 6651</span> </div>
+<div class="line"><a id="l06665" name="l06665"></a><span class="lineno"> 6665</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06666" name="l06666"></a><span class="lineno"><a class="line" href="group__kv_group.html#ga84ebd66a95ce857765d4a16ec35daba9"> 6666</a></span><a class="code hl_function" href="group__kv_group.html#ga84ebd66a95ce857765d4a16ec35daba9">kvStore_PutString</a>(uint64_t *rev, <a class="code hl_typedef" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, <span class="keyword">const</span> <span class="keywordtype">char</span> *key, <span class="keyword">const</span> <span class="keywordtype">char</span> *data);</div>
+<div class="line"><a id="l06667" name="l06667"></a><span class="lineno"> 6667</span> </div>
+<div class="line"><a id="l06678" name="l06678"></a><span class="lineno"> 6678</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06679" name="l06679"></a><span class="lineno"><a class="line" href="group__kv_group.html#ga5289f7cd3999cfb46fb1fcb83178aec6"> 6679</a></span><a class="code hl_function" href="group__kv_group.html#ga5289f7cd3999cfb46fb1fcb83178aec6">kvStore_Create</a>(uint64_t *rev, <a class="code hl_typedef" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, <span class="keyword">const</span> <span class="keywordtype">char</span> *key, <span class="keyword">const</span> <span class="keywordtype">void</span> *data, <span class="keywordtype">int</span> len);</div>
+<div class="line"><a id="l06680" name="l06680"></a><span class="lineno"> 6680</span> </div>
+<div class="line"><a id="l06694" name="l06694"></a><span class="lineno"> 6694</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06695" name="l06695"></a><span class="lineno"><a class="line" href="group__kv_group.html#ga5726ad2e6205d2f6749be013138218ca"> 6695</a></span><a class="code hl_function" href="group__kv_group.html#ga5726ad2e6205d2f6749be013138218ca">kvStore_CreateString</a>(uint64_t *rev, <a class="code hl_typedef" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, <span class="keyword">const</span> <span class="keywordtype">char</span> *key, <span class="keyword">const</span> <span class="keywordtype">char</span> *data);</div>
+<div class="line"><a id="l06696" name="l06696"></a><span class="lineno"> 6696</span> </div>
+<div class="line"><a id="l06708" name="l06708"></a><span class="lineno"> 6708</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06709" name="l06709"></a><span class="lineno"><a class="line" href="group__kv_group.html#gae0c593bb2ef94ae60e775617c9423038"> 6709</a></span><a class="code hl_function" href="group__kv_group.html#gae0c593bb2ef94ae60e775617c9423038">kvStore_Update</a>(uint64_t *rev, <a class="code hl_typedef" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, <span class="keyword">const</span> <span class="keywordtype">char</span> *key, <span class="keyword">const</span> <span class="keywordtype">void</span> *data, <span class="keywordtype">int</span> len, uint64_t last);</div>
+<div class="line"><a id="l06710" name="l06710"></a><span class="lineno"> 6710</span> </div>
+<div class="line"><a id="l06725" name="l06725"></a><span class="lineno"> 6725</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06726" name="l06726"></a><span class="lineno"><a class="line" href="group__kv_group.html#ga13ed70f15cd1485cd15f96bcc4b7ad1c"> 6726</a></span><a class="code hl_function" href="group__kv_group.html#ga13ed70f15cd1485cd15f96bcc4b7ad1c">kvStore_UpdateString</a>(uint64_t *rev, <a class="code hl_typedef" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, <span class="keyword">const</span> <span class="keywordtype">char</span> *key, <span class="keyword">const</span> <span class="keywordtype">char</span> *data, uint64_t last);</div>
+<div class="line"><a id="l06727" name="l06727"></a><span class="lineno"> 6727</span> </div>
+<div class="line"><a id="l06735" name="l06735"></a><span class="lineno"> 6735</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06736" name="l06736"></a><span class="lineno"><a class="line" href="group__kv_group.html#ga68101d46739ca894fd7c56c8661c08d8"> 6736</a></span><a class="code hl_function" href="group__kv_group.html#ga68101d46739ca894fd7c56c8661c08d8">kvStore_Delete</a>(<a class="code hl_typedef" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, <span class="keyword">const</span> <span class="keywordtype">char</span> *key);</div>
+<div class="line"><a id="l06737" name="l06737"></a><span class="lineno"> 6737</span> </div>
+<div class="line"><a id="l06746" name="l06746"></a><span class="lineno"> 6746</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06747" name="l06747"></a><span class="lineno"><a class="line" href="group__kv_group.html#ga3d5fa3d895d0d3041440105b244e9ca9"> 6747</a></span><a class="code hl_function" href="group__kv_group.html#ga3d5fa3d895d0d3041440105b244e9ca9">kvStore_Purge</a>(<a class="code hl_typedef" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, <span class="keyword">const</span> <span class="keywordtype">char</span> *key, <a class="code hl_struct" href="structkv_purge_options.html">kvPurgeOptions</a> *opts);</div>
+<div class="line"><a id="l06748" name="l06748"></a><span class="lineno"> 6748</span> </div>
+<div class="line"><a id="l06756" name="l06756"></a><span class="lineno"> 6756</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06757" name="l06757"></a><span class="lineno"><a class="line" href="group__kv_group.html#ga762fd5de8cde683e46a6736a51e575f5"> 6757</a></span><a class="code hl_function" href="group__kv_group.html#ga762fd5de8cde683e46a6736a51e575f5">kvWatchOptions_Init</a>(<a class="code hl_struct" href="structkv_watch_options.html">kvWatchOptions</a> *opts);</div>
+<div class="line"><a id="l06758" name="l06758"></a><span class="lineno"> 6758</span> </div>
+<div class="line"><a id="l06766" name="l06766"></a><span class="lineno"> 6766</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06767" name="l06767"></a><span class="lineno"><a class="line" href="group__kv_group.html#ga243113fd7df34ce104850ab888f04021"> 6767</a></span><a class="code hl_function" href="group__kv_group.html#ga243113fd7df34ce104850ab888f04021">kvPurgeOptions_Init</a>(<a class="code hl_struct" href="structkv_purge_options.html">kvPurgeOptions</a> *opts);</div>
+<div class="line"><a id="l06768" name="l06768"></a><span class="lineno"> 6768</span> </div>
+<div class="line"><a id="l06786" name="l06786"></a><span class="lineno"> 6786</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06787" name="l06787"></a><span class="lineno"><a class="line" href="group__kv_group.html#ga34ab74b229ff88e64301ea53a274da69"> 6787</a></span><a class="code hl_function" href="group__kv_group.html#ga34ab74b229ff88e64301ea53a274da69">kvStore_PurgeDeletes</a>(<a class="code hl_typedef" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, <a class="code hl_struct" href="structkv_purge_options.html">kvPurgeOptions</a> *opts);</div>
+<div class="line"><a id="l06788" name="l06788"></a><span class="lineno"> 6788</span> </div>
+<div class="line"><a id="l06805" name="l06805"></a><span class="lineno"> 6805</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06806" name="l06806"></a><span class="lineno"><a class="line" href="group__kv_group.html#ga30feca870f580c7b9d2ad07a740505b2"> 6806</a></span><a class="code hl_function" href="group__kv_group.html#ga30feca870f580c7b9d2ad07a740505b2">kvStore_Watch</a>(<a class="code hl_typedef" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> **new_watcher, <a class="code hl_typedef" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, <span class="keyword">const</span> <span class="keywordtype">char</span> *keys, <a class="code hl_struct" href="structkv_watch_options.html">kvWatchOptions</a> *opts);</div>
+<div class="line"><a id="l06807" name="l06807"></a><span class="lineno"> 6807</span> </div>
+<div class="line"><a id="l06822" name="l06822"></a><span class="lineno"> 6822</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06823" name="l06823"></a><span class="lineno"><a class="line" href="group__kv_group.html#gaf011f1dd6813391c65664e982747602e"> 6823</a></span><a class="code hl_function" href="group__kv_group.html#gaf011f1dd6813391c65664e982747602e">kvStore_WatchAll</a>(<a class="code hl_typedef" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> **new_watcher, <a class="code hl_typedef" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, <a class="code hl_struct" href="structkv_watch_options.html">kvWatchOptions</a> *opts);</div>
+<div class="line"><a id="l06824" name="l06824"></a><span class="lineno"> 6824</span> </div>
+<div class="line"><a id="l06843" name="l06843"></a><span class="lineno"> 6843</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06844" name="l06844"></a><span class="lineno"><a class="line" href="group__kv_group.html#ga6030fc2a672ae868f7603587245b9d5a"> 6844</a></span><a class="code hl_function" href="group__kv_group.html#ga6030fc2a672ae868f7603587245b9d5a">kvStore_Keys</a>(<a class="code hl_struct" href="structkv_keys_list.html">kvKeysList</a> *list, <a class="code hl_typedef" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, <a class="code hl_struct" href="structkv_watch_options.html">kvWatchOptions</a> *opts);</div>
+<div class="line"><a id="l06845" name="l06845"></a><span class="lineno"> 6845</span> </div>
+<div class="line"><a id="l06857" name="l06857"></a><span class="lineno"> 6857</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l06858" name="l06858"></a><span class="lineno"><a class="line" href="group__kv_group.html#ga02ccd58bc5062f6ce6f94bf05e3dfe45"> 6858</a></span><a class="code hl_function" href="group__kv_group.html#ga02ccd58bc5062f6ce6f94bf05e3dfe45">kvKeysList_Destroy</a>(<a class="code hl_struct" href="structkv_keys_list.html">kvKeysList</a> *list);</div>
+<div class="line"><a id="l06859" name="l06859"></a><span class="lineno"> 6859</span> </div>
+<div class="line"><a id="l06882" name="l06882"></a><span class="lineno"> 6882</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06883" name="l06883"></a><span class="lineno"><a class="line" href="group__kv_group.html#ga5aa57345313cee85b020e50c22023fb5"> 6883</a></span><a class="code hl_function" href="group__kv_group.html#ga5aa57345313cee85b020e50c22023fb5">kvStore_History</a>(<a class="code hl_struct" href="structkv_entry_list.html">kvEntryList</a> *list, <a class="code hl_typedef" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv, <span class="keyword">const</span> <span class="keywordtype">char</span> *key, <a class="code hl_struct" href="structkv_watch_options.html">kvWatchOptions</a> *opts);</div>
+<div class="line"><a id="l06884" name="l06884"></a><span class="lineno"> 6884</span> </div>
+<div class="line"><a id="l06896" name="l06896"></a><span class="lineno"> 6896</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l06897" name="l06897"></a><span class="lineno"><a class="line" href="group__kv_group.html#gae783352ab81e22aa3173057d117518e6"> 6897</a></span><a class="code hl_function" href="group__kv_group.html#gae783352ab81e22aa3173057d117518e6">kvEntryList_Destroy</a>(<a class="code hl_struct" href="structkv_entry_list.html">kvEntryList</a> *list);</div>
+<div class="line"><a id="l06898" name="l06898"></a><span class="lineno"> 6898</span> </div>
+<div class="line"><a id="l06908" name="l06908"></a><span class="lineno"> 6908</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keyword">const</span> <span class="keywordtype">char</span>*</div>
+<div class="line"><a id="l06909" name="l06909"></a><span class="lineno"><a class="line" href="group__kv_group.html#gad28fdf9aae16bba308cda799fca13281"> 6909</a></span><a class="code hl_function" href="group__kv_group.html#gad28fdf9aae16bba308cda799fca13281">kvStore_Bucket</a>(<a class="code hl_typedef" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv);</div>
+<div class="line"><a id="l06910" name="l06910"></a><span class="lineno"> 6910</span> </div>
+<div class="line"><a id="l06911" name="l06911"></a><span class="lineno"> 6911</span><span class="comment">// PurgeDeletes</span></div>
+<div class="line"><a id="l06912" name="l06912"></a><span class="lineno"> 6912</span> </div>
+<div class="line"><a id="l06922" name="l06922"></a><span class="lineno"> 6922</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06923" name="l06923"></a><span class="lineno"><a class="line" href="group__kv_group.html#gadf75e99cc28bc9c2d6eac7c9f7398c27"> 6923</a></span><a class="code hl_function" href="group__kv_group.html#gadf75e99cc28bc9c2d6eac7c9f7398c27">kvStore_Status</a>(<a class="code hl_typedef" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a> **new_status, <a class="code hl_typedef" href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a> *kv);</div>
+<div class="line"><a id="l06924" name="l06924"></a><span class="lineno"> 6924</span> </div>
+<div class="line"><a id="l06950" name="l06950"></a><span class="lineno"> 6950</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06951" name="l06951"></a><span class="lineno"><a class="line" href="group__kv_watcher.html#ga562c216a0199c30455af4c2da46000e5"> 6951</a></span><a class="code hl_function" href="group__kv_watcher.html#ga562c216a0199c30455af4c2da46000e5">kvWatcher_Next</a>(<a class="code hl_typedef" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> **new_entry, <a class="code hl_typedef" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> *w, int64_t timeout);</div>
+<div class="line"><a id="l06952" name="l06952"></a><span class="lineno"> 6952</span> </div>
+<div class="line"><a id="l06962" name="l06962"></a><span class="lineno"> 6962</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div>
+<div class="line"><a id="l06963" name="l06963"></a><span class="lineno"><a class="line" href="group__kv_watcher.html#ga73adf44114fedd62ef75ebd81839b65e"> 6963</a></span><a class="code hl_function" href="group__kv_watcher.html#ga73adf44114fedd62ef75ebd81839b65e">kvWatcher_Stop</a>(<a class="code hl_typedef" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> *w);</div>
+<div class="line"><a id="l06964" name="l06964"></a><span class="lineno"> 6964</span> </div>
+<div class="line"><a id="l06971" name="l06971"></a><span class="lineno"> 6971</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l06972" name="l06972"></a><span class="lineno"><a class="line" href="group__kv_watcher.html#ga21bc39fa795f7c4f392bd6d4e66ea1d9"> 6972</a></span><a class="code hl_function" href="group__kv_watcher.html#ga21bc39fa795f7c4f392bd6d4e66ea1d9">kvWatcher_Destroy</a>(<a class="code hl_typedef" href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> *w);</div>
+<div class="line"><a id="l06973" name="l06973"></a><span class="lineno"> 6973</span> <span class="comment">// end of kvWatcher</span></div>
+<div class="line"><a id="l06975" name="l06975"></a><span class="lineno"> 6975</span> </div>
+<div class="line"><a id="l06992" name="l06992"></a><span class="lineno"> 6992</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keyword">const</span> <span class="keywordtype">char</span>*</div>
+<div class="line"><a id="l06993" name="l06993"></a><span class="lineno"><a class="line" href="group__kv_status.html#ga1acec36db32207f21e15afc26bb5af1c"> 6993</a></span><a class="code hl_function" href="group__kv_status.html#ga1acec36db32207f21e15afc26bb5af1c">kvStatus_Bucket</a>(<a class="code hl_typedef" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a> *sts);</div>
+<div class="line"><a id="l06994" name="l06994"></a><span class="lineno"> 6994</span> </div>
+<div class="line"><a id="l07001" name="l07001"></a><span class="lineno"> 7001</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> uint64_t</div>
+<div class="line"><a id="l07002" name="l07002"></a><span class="lineno"><a class="line" href="group__kv_status.html#ga2016af3c73841d8b226361e764dce158"> 7002</a></span><a class="code hl_function" href="group__kv_status.html#ga2016af3c73841d8b226361e764dce158">kvStatus_Values</a>(<a class="code hl_typedef" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a> *sts);</div>
+<div class="line"><a id="l07003" name="l07003"></a><span class="lineno"> 7003</span> </div>
+<div class="line"><a id="l07010" name="l07010"></a><span class="lineno"> 7010</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t</div>
+<div class="line"><a id="l07011" name="l07011"></a><span class="lineno"><a class="line" href="group__kv_status.html#gada6f22b5659b184762cea4f45d369ee5"> 7011</a></span><a class="code hl_function" href="group__kv_status.html#gada6f22b5659b184762cea4f45d369ee5">kvStatus_History</a>(<a class="code hl_typedef" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a> *sts);</div>
+<div class="line"><a id="l07012" name="l07012"></a><span class="lineno"> 7012</span> </div>
+<div class="line"><a id="l07019" name="l07019"></a><span class="lineno"> 7019</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t</div>
+<div class="line"><a id="l07020" name="l07020"></a><span class="lineno"><a class="line" href="group__kv_status.html#gaa747ad0a6182ec7a47fb47018c33d1c1"> 7020</a></span><a class="code hl_function" href="group__kv_status.html#gaa747ad0a6182ec7a47fb47018c33d1c1">kvStatus_TTL</a>(<a class="code hl_typedef" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a> *sts);</div>
+<div class="line"><a id="l07021" name="l07021"></a><span class="lineno"> 7021</span> </div>
+<div class="line"><a id="l07028" name="l07028"></a><span class="lineno"> 7028</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t</div>
+<div class="line"><a id="l07029" name="l07029"></a><span class="lineno"><a class="line" href="group__kv_status.html#ga86b114f4dac9f06df86101f84bd497b2"> 7029</a></span><a class="code hl_function" href="group__kv_status.html#ga86b114f4dac9f06df86101f84bd497b2">kvStatus_Replicas</a>(<a class="code hl_typedef" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a> *sts);</div>
+<div class="line"><a id="l07030" name="l07030"></a><span class="lineno"> 7030</span> </div>
+<div class="line"><a id="l07037" name="l07037"></a><span class="lineno"> 7037</span><a class="code hl_define" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <span class="keywordtype">void</span></div>
+<div class="line"><a id="l07038" name="l07038"></a><span class="lineno"><a class="line" href="group__kv_status.html#ga5eb3d824c1873af705beee4798246a08"> 7038</a></span><a class="code hl_function" href="group__kv_status.html#ga5eb3d824c1873af705beee4798246a08">kvStatus_Destroy</a>(<a class="code hl_typedef" href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a> *sts);</div>
+<div class="line"><a id="l07039" name="l07039"></a><span class="lineno"> 7039</span> <span class="comment">// end of kvStatus</span></div>
+<div class="line"><a id="l07041" name="l07041"></a><span class="lineno"> 7041</span> <span class="comment">// end of kvGroup</span></div>
+<div class="line"><a id="l07043" name="l07043"></a><span class="lineno"> 7043</span> <span class="comment">// end of funcGroup</span></div>
+<div class="line"><a id="l07045" name="l07045"></a><span class="lineno"> 7045</span> </div>
+<div class="line"><a id="l07082" name="l07082"></a><span class="lineno"> 7082</span><span class="preprocessor">#ifdef __cplusplus</span></div>
+<div class="line"><a id="l07083" name="l07083"></a><span class="lineno"> 7083</span>}</div>
+<div class="line"><a id="l07084" name="l07084"></a><span class="lineno"> 7084</span><span class="preprocessor">#endif</span></div>
+<div class="line"><a id="l07085" name="l07085"></a><span class="lineno"> 7085</span> </div>
+<div class="line"><a id="l07086" name="l07086"></a><span class="lineno"> 7086</span><span class="preprocessor">#endif </span><span class="comment">/* NATS_H_ */</span><span class="preprocessor"></span></div>
+<div class="ttc" id="agroup__callbacks_group_html_ga245131e64f1d0dff7edc8ed874a07e9a"><div class="ttname"><a href="group__callbacks_group.html#ga245131e64f1d0dff7edc8ed874a07e9a">natsOnCompleteCB</a></div><div class="ttdeci">void(* natsOnCompleteCB)(void *closure)</div><div class="ttdoc">Callback used to notify that an object lifecycle is complete.</div><div class="ttdef"><b>Definition:</b> nats.h:1500</div></div>
+<div class="ttc" id="agroup__callbacks_group_html_ga245eab0a01a485e40fba267f84ec037f"><div class="ttname"><a href="group__callbacks_group.html#ga245eab0a01a485e40fba267f84ec037f">natsEvLoop_Attach</a></div><div class="ttdeci">natsStatus(* natsEvLoop_Attach)(void **userData, void *loop, natsConnection *nc, natsSock socket)</div><div class="ttdoc">Attach this connection to the external event loop.</div><div class="ttdef"><b>Definition:</b> nats.h:1381</div></div>
+<div class="ttc" id="agroup__callbacks_group_html_ga258b30458134be90f17315c037f34b7b"><div class="ttname"><a href="group__callbacks_group.html#ga258b30458134be90f17315c037f34b7b">natsUserJWTHandler</a></div><div class="ttdeci">natsStatus(* natsUserJWTHandler)(char **userJWT, char **customErrTxt, void *closure)</div><div class="ttdoc">Callback used to fetch and return account signed user JWT.</div><div class="ttdef"><b>Definition:</b> nats.h:1444</div></div>
+<div class="ttc" id="agroup__callbacks_group_html_ga2bb5dd2d821ca5bbc0488f7e6aceed17"><div class="ttname"><a href="group__callbacks_group.html#ga2bb5dd2d821ca5bbc0488f7e6aceed17">natsEvLoop_WriteAddRemove</a></div><div class="ttdeci">natsStatus(* natsEvLoop_WriteAddRemove)(void *userData, bool add)</div><div class="ttdoc">Write event needs to be added or removed.</div><div class="ttdef"><b>Definition:</b> nats.h:1409</div></div>
+<div class="ttc" id="agroup__callbacks_group_html_ga3353d4b92851c52121f65aaf0684cba4"><div class="ttname"><a href="group__callbacks_group.html#ga3353d4b92851c52121f65aaf0684cba4">natsCustomReconnectDelayHandler</a></div><div class="ttdeci">int64_t(* natsCustomReconnectDelayHandler)(natsConnection *nc, int attempts, void *closure)</div><div class="ttdoc">Callback used to specify how long to wait between reconnects.</div><div class="ttdef"><b>Definition:</b> nats.h:1522</div></div>
+<div class="ttc" id="agroup__callbacks_group_html_ga4b02de70fe9380d184fd01d87527f499"><div class="ttname"><a href="group__callbacks_group.html#ga4b02de70fe9380d184fd01d87527f499">natsTokenHandler</a></div><div class="ttdeci">const char *(* natsTokenHandler)(void *closure)</div><div class="ttdoc">Callback used to build a token on connections and reconnections.</div><div class="ttdef"><b>Definition:</b> nats.h:1490</div></div>
+<div class="ttc" id="agroup__callbacks_group_html_ga4f66e065bd918f02510d4c53d8a5b729"><div class="ttname"><a href="group__callbacks_group.html#ga4f66e065bd918f02510d4c53d8a5b729">jsPubAckHandler</a></div><div class="ttdeci">void(* jsPubAckHandler)(jsCtx *js, natsMsg *msg, jsPubAck *pa, jsPubAckErr *pae, void *closure)</div><div class="ttdoc">Callback used to process asynchronous publish responses from JetStream.</div><div class="ttdef"><b>Definition:</b> nats.h:1601</div></div>
+<div class="ttc" id="agroup__callbacks_group_html_ga954768cc1d3388bb6ab723e777647992"><div class="ttname"><a href="group__callbacks_group.html#ga954768cc1d3388bb6ab723e777647992">jsPubAckErrHandler</a></div><div class="ttdeci">void(* jsPubAckErrHandler)(jsCtx *js, jsPubAckErr *pae, void *closure)</div><div class="ttdoc">Callback used to process asynchronous publish errors from JetStream.</div><div class="ttdef"><b>Definition:</b> nats.h:1558</div></div>
+<div class="ttc" id="agroup__callbacks_group_html_ga9e511dffa471dfb971b7dd2b12329626"><div class="ttname"><a href="group__callbacks_group.html#ga9e511dffa471dfb971b7dd2b12329626">natsErrHandler</a></div><div class="ttdeci">void(* natsErrHandler)(natsConnection *nc, natsSubscription *subscription, natsStatus err, void *closure)</div><div class="ttdoc">Callback used to notify the user of errors encountered while processing inbound messages.</div><div class="ttdef"><b>Definition:</b> nats.h:1364</div></div>
+<div class="ttc" id="agroup__callbacks_group_html_gab63dee7f7012ba11ae20b76dbc36f2d0"><div class="ttname"><a href="group__callbacks_group.html#gab63dee7f7012ba11ae20b76dbc36f2d0">natsEvLoop_Detach</a></div><div class="ttdeci">natsStatus(* natsEvLoop_Detach)(void *userData)</div><div class="ttdoc">Detach from the event loop.</div><div class="ttdef"><b>Definition:</b> nats.h:1420</div></div>
+<div class="ttc" id="agroup__callbacks_group_html_gab786ffd670c86de0563559351305080b"><div class="ttname"><a href="group__callbacks_group.html#gab786ffd670c86de0563559351305080b">natsSignatureHandler</a></div><div class="ttdeci">natsStatus(* natsSignatureHandler)(char **customErrTxt, unsigned char **signature, int *signatureLength, const char *nonce, void *closure)</div><div class="ttdoc">Callback used to sign a nonce sent by the server.</div><div class="ttdef"><b>Definition:</b> nats.h:1475</div></div>
+<div class="ttc" id="agroup__callbacks_group_html_gac34092f6c698374f86ad349302bdd55c"><div class="ttname"><a href="group__callbacks_group.html#gac34092f6c698374f86ad349302bdd55c">stanConnectionLostHandler</a></div><div class="ttdeci">void(* stanConnectionLostHandler)(stanConnection *sc, const char *errorTxt, void *closure)</div><div class="ttdoc">Callback used to notify the user of the permanent loss of the connection.</div><div class="ttdef"><b>Definition:</b> nats.h:1633</div></div>
+<div class="ttc" id="agroup__callbacks_group_html_gacdef6aff3e47953f19e35857ab8e274c"><div class="ttname"><a href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a></div><div class="ttdeci">void(* natsConnectionHandler)(natsConnection *nc, void *closure)</div><div class="ttdoc">Callback used to notify the user of asynchronous connection events.</div><div class="ttdef"><b>Definition:</b> nats.h:1355</div></div>
+<div class="ttc" id="agroup__callbacks_group_html_gad1a5ac566893e13dc8c81ac0e9c87afe"><div class="ttname"><a href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe">natsMsgHandler</a></div><div class="ttdeci">void(* natsMsgHandler)(natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure)</div><div class="ttdoc">Callback used to deliver messages to the application.</div><div class="ttdef"><b>Definition:</b> nats.h:1339</div></div>
+<div class="ttc" id="agroup__callbacks_group_html_gad5d6a685731b3bf635995b7375af4d18"><div class="ttname"><a href="group__callbacks_group.html#gad5d6a685731b3bf635995b7375af4d18">stanPubAckHandler</a></div><div class="ttdeci">void(* stanPubAckHandler)(const char *guid, const char *error, void *closure)</div><div class="ttdoc">Callback used to notify of an asynchronous publish result.</div><div class="ttdef"><b>Definition:</b> nats.h:1613</div></div>
+<div class="ttc" id="agroup__callbacks_group_html_gaea4c125ecfb43eaf43da20e8444c2aaa"><div class="ttname"><a href="group__callbacks_group.html#gaea4c125ecfb43eaf43da20e8444c2aaa">natsEvLoop_ReadAddRemove</a></div><div class="ttdeci">natsStatus(* natsEvLoop_ReadAddRemove)(void *userData, bool add)</div><div class="ttdoc">Read event needs to be added or removed.</div><div class="ttdef"><b>Definition:</b> nats.h:1396</div></div>
+<div class="ttc" id="agroup__callbacks_group_html_gaf7456e37fa14f1834d9048d3789e9409"><div class="ttname"><a href="group__callbacks_group.html#gaf7456e37fa14f1834d9048d3789e9409">stanMsgHandler</a></div><div class="ttdeci">void(* stanMsgHandler)(stanConnection *sc, stanSubscription *sub, const char *channel, stanMsg *msg, void *closure)</div><div class="ttdoc">Callback used to deliver messages to the application.</div><div class="ttdef"><b>Definition:</b> nats.h:1624</div></div>
+<div class="ttc" id="agroup__conn_mgt_group_html_ga0433159e518540ff874c4026fe9cd0c5"><div class="ttname"><a href="group__conn_mgt_group.html#ga0433159e518540ff874c4026fe9cd0c5">natsConnection_Buffered</a></div><div class="ttdeci">NATS_EXTERN int natsConnection_Buffered(natsConnection *nc)</div><div class="ttdoc">Returns the number of bytes to be sent to the server.</div></div>
+<div class="ttc" id="agroup__conn_mgt_group_html_ga15a0f8aa9a6f621535d01593a4c8edd5"><div class="ttname"><a href="group__conn_mgt_group.html#ga15a0f8aa9a6f621535d01593a4c8edd5">natsConnection_IsDraining</a></div><div class="ttdeci">bool natsConnection_IsDraining(natsConnection *nc)</div><div class="ttdoc">Test if connection is draining.</div></div>
+<div class="ttc" id="agroup__conn_mgt_group_html_ga19e204d27a232e2d4334301fc002b2ed"><div class="ttname"><a href="group__conn_mgt_group.html#ga19e204d27a232e2d4334301fc002b2ed">natsConnection_Close</a></div><div class="ttdeci">NATS_EXTERN void natsConnection_Close(natsConnection *nc)</div><div class="ttdoc">Closes the connection.</div></div>
+<div class="ttc" id="agroup__conn_mgt_group_html_ga1c98f8d89bb8e20ea8621e860a90267f"><div class="ttname"><a href="group__conn_mgt_group.html#ga1c98f8d89bb8e20ea8621e860a90267f">natsConnection_Flush</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsConnection_Flush(natsConnection *nc)</div><div class="ttdoc">Flushes the connection.</div></div>
+<div class="ttc" id="agroup__conn_mgt_group_html_ga33fa209522e5e0226b5b7c7d720a3b98"><div class="ttname"><a href="group__conn_mgt_group.html#ga33fa209522e5e0226b5b7c7d720a3b98">natsConnection_Status</a></div><div class="ttdeci">NATS_EXTERN natsConnStatus natsConnection_Status(natsConnection *nc)</div><div class="ttdoc">Returns the current state of the connection.</div></div>
+<div class="ttc" id="agroup__conn_mgt_group_html_ga48cee9ea1cdc9fc2770de2f9f0fd1ccf"><div class="ttname"><a href="group__conn_mgt_group.html#ga48cee9ea1cdc9fc2770de2f9f0fd1ccf">natsConnection_GetConnectedServerId</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsConnection_GetConnectedServerId(natsConnection *nc, char *buffer, size_t bufferSize)</div><div class="ttdoc">Gets the server Id.</div></div>
+<div class="ttc" id="agroup__conn_mgt_group_html_ga530f0f1c75c58a81aae1a59f15b46d9f"><div class="ttname"><a href="group__conn_mgt_group.html#ga530f0f1c75c58a81aae1a59f15b46d9f">natsConnection_IsClosed</a></div><div class="ttdeci">NATS_EXTERN bool natsConnection_IsClosed(natsConnection *nc)</div><div class="ttdoc">Test if connection has been closed.</div></div>
+<div class="ttc" id="agroup__conn_mgt_group_html_ga59bdc4ad9fea2053f5d3841f6b83f88b"><div class="ttname"><a href="group__conn_mgt_group.html#ga59bdc4ad9fea2053f5d3841f6b83f88b">natsConnection_Drain</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsConnection_Drain(natsConnection *nc)</div><div class="ttdoc">Drains the connection with default timeout.</div></div>
+<div class="ttc" id="agroup__conn_mgt_group_html_ga5aa349fc3895dde772671b324b07a688"><div class="ttname"><a href="group__conn_mgt_group.html#ga5aa349fc3895dde772671b324b07a688">natsConnection_IsReconnecting</a></div><div class="ttdeci">NATS_EXTERN bool natsConnection_IsReconnecting(natsConnection *nc)</div><div class="ttdoc">Test if connection is reconnecting.</div></div>
+<div class="ttc" id="agroup__conn_mgt_group_html_ga68821a8ae1176096b5afef7fdc7947ec"><div class="ttname"><a href="group__conn_mgt_group.html#ga68821a8ae1176096b5afef7fdc7947ec">natsConnection_GetStats</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsConnection_GetStats(natsConnection *nc, natsStatistics *stats)</div><div class="ttdoc">Gets the connection statistics.</div></div>
+<div class="ttc" id="agroup__conn_mgt_group_html_ga68e7149f7ff1cc4989b3f795fa7e76d9"><div class="ttname"><a href="group__conn_mgt_group.html#ga68e7149f7ff1cc4989b3f795fa7e76d9">natsConnection_GetMaxPayload</a></div><div class="ttdeci">NATS_EXTERN int64_t natsConnection_GetMaxPayload(natsConnection *nc)</div><div class="ttdoc">Returns the maximum message payload.</div></div>
+<div class="ttc" id="agroup__conn_mgt_group_html_ga6960cfdbaac3b8759784f352d4c264f8"><div class="ttname"><a href="group__conn_mgt_group.html#ga6960cfdbaac3b8759784f352d4c264f8">natsConnection_Sign</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsConnection_Sign(natsConnection *nc, const unsigned char *message, int messageLen, unsigned char sig[64])</div><div class="ttdoc">Signs any 'message' using the connection's user credentials.</div></div>
+<div class="ttc" id="agroup__conn_mgt_group_html_ga740be1ba16a8570eb98ef6755ebf52ce"><div class="ttname"><a href="group__conn_mgt_group.html#ga740be1ba16a8570eb98ef6755ebf52ce">natsConnection_Connect</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsConnection_Connect(natsConnection **nc, natsOptions *options)</div><div class="ttdoc">Connects to a NATS Server using the provided options.</div></div>
+<div class="ttc" id="agroup__conn_mgt_group_html_ga747513ba6ab63fdf9a72bfc8025a14ba"><div class="ttname"><a href="group__conn_mgt_group.html#ga747513ba6ab63fdf9a72bfc8025a14ba">natsConnection_GetClientID</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsConnection_GetClientID(natsConnection *nc, uint64_t *cid)</div><div class="ttdoc">Gets the current client ID assigned by the server.</div></div>
+<div class="ttc" id="agroup__conn_mgt_group_html_ga761095a42374b4dafa178df7d7652dd5"><div class="ttname"><a href="group__conn_mgt_group.html#ga761095a42374b4dafa178df7d7652dd5">natsConnection_GetLocalIPAndPort</a></div><div class="ttdeci">natsStatus natsConnection_GetLocalIPAndPort(natsConnection *nc, char **ip, int *port)</div><div class="ttdoc">Returns the connection local IP and port.</div></div>
+<div class="ttc" id="agroup__conn_mgt_group_html_ga85915ef0c8b87993be1b076099d6a7c1"><div class="ttname"><a href="group__conn_mgt_group.html#ga85915ef0c8b87993be1b076099d6a7c1">natsConnection_FlushTimeout</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsConnection_FlushTimeout(natsConnection *nc, int64_t timeout)</div><div class="ttdoc">Flushes the connection with a given timeout.</div></div>
+<div class="ttc" id="agroup__conn_mgt_group_html_gaa3fd27e6e7d8131e679d4f10e201c435"><div class="ttname"><a href="group__conn_mgt_group.html#gaa3fd27e6e7d8131e679d4f10e201c435">natsConnection_GetRTT</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsConnection_GetRTT(natsConnection *nc, int64_t *rtt)</div><div class="ttdoc">Returns the round trip time between this client and the server.</div></div>
+<div class="ttc" id="agroup__conn_mgt_group_html_gaa89c06e30e19ff361125bfc9114d89a8"><div class="ttname"><a href="group__conn_mgt_group.html#gaa89c06e30e19ff361125bfc9114d89a8">natsConnection_ProcessReadEvent</a></div><div class="ttdeci">NATS_EXTERN void natsConnection_ProcessReadEvent(natsConnection *nc)</div><div class="ttdoc">Process a read event when using external event loop.</div></div>
+<div class="ttc" id="agroup__conn_mgt_group_html_gab6cfa9cb6857ae10f096a94f5e244e63"><div class="ttname"><a href="group__conn_mgt_group.html#gab6cfa9cb6857ae10f096a94f5e244e63">natsConnection_GetLastError</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsConnection_GetLastError(natsConnection *nc, const char **lastError)</div><div class="ttdoc">Gets the last connection error.</div></div>
+<div class="ttc" id="agroup__conn_mgt_group_html_gad25c77be0873495412c90a73fe450708"><div class="ttname"><a href="group__conn_mgt_group.html#gad25c77be0873495412c90a73fe450708">natsConnection_GetDiscoveredServers</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsConnection_GetDiscoveredServers(natsConnection *nc, char ***servers, int *count)</div><div class="ttdoc">Returns the list of discovered server URLs.</div></div>
+<div class="ttc" id="agroup__conn_mgt_group_html_gad765b80ae8e1a06a7a942cccf29f042a"><div class="ttname"><a href="group__conn_mgt_group.html#gad765b80ae8e1a06a7a942cccf29f042a">natsConnection_HasHeaderSupport</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsConnection_HasHeaderSupport(natsConnection *nc)</div><div class="ttdoc">Returns if the connection to current server supports headers.</div></div>
+<div class="ttc" id="agroup__conn_mgt_group_html_gad81b603b84c0180aefc6d5ebad7f2a47"><div class="ttname"><a href="group__conn_mgt_group.html#gad81b603b84c0180aefc6d5ebad7f2a47">natsConnection_ProcessWriteEvent</a></div><div class="ttdeci">NATS_EXTERN void natsConnection_ProcessWriteEvent(natsConnection *nc)</div><div class="ttdoc">Process a write event when using external event loop.</div></div>
+<div class="ttc" id="agroup__conn_mgt_group_html_gadafcfeeeac2733c7119981ab97b7103d"><div class="ttname"><a href="group__conn_mgt_group.html#gadafcfeeeac2733c7119981ab97b7103d">natsConnection_GetClientIP</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsConnection_GetClientIP(natsConnection *nc, char **ip)</div><div class="ttdoc">Returns the client's IP address as reported by the server.</div></div>
+<div class="ttc" id="agroup__conn_mgt_group_html_gae06fe6f5933f216d6d93645a122a7dd4"><div class="ttname"><a href="group__conn_mgt_group.html#gae06fe6f5933f216d6d93645a122a7dd4">natsConnection_DrainTimeout</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsConnection_DrainTimeout(natsConnection *nc, int64_t timeout)</div><div class="ttdoc">Drains the connection with given timeout.</div></div>
+<div class="ttc" id="agroup__conn_mgt_group_html_gaf4ee7262e35e44c40ad5dfe9240db76b"><div class="ttname"><a href="group__conn_mgt_group.html#gaf4ee7262e35e44c40ad5dfe9240db76b">natsConnection_GetServers</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsConnection_GetServers(natsConnection *nc, char ***servers, int *count)</div><div class="ttdoc">Returns the list of server URLs known to this connection.</div></div>
+<div class="ttc" id="agroup__conn_mgt_group_html_gaf623280407c43ade02285005f0642e6d"><div class="ttname"><a href="group__conn_mgt_group.html#gaf623280407c43ade02285005f0642e6d">natsConnection_GetConnectedUrl</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsConnection_GetConnectedUrl(natsConnection *nc, char *buffer, size_t bufferSize)</div><div class="ttdoc">Gets the URL of the currently connected server.</div></div>
+<div class="ttc" id="agroup__conn_mgt_group_html_gafb83c8d7970ba68be0e6c40c38cdfde4"><div class="ttname"><a href="group__conn_mgt_group.html#gafb83c8d7970ba68be0e6c40c38cdfde4">natsConnection_ConnectTo</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsConnection_ConnectTo(natsConnection **nc, const char *urls)</div><div class="ttdoc">Connects to a NATS Server using any of the URL from the given list.</div></div>
+<div class="ttc" id="agroup__conn_mgt_group_html_gafda2f702276fb0ac301efac10df09495"><div class="ttname"><a href="group__conn_mgt_group.html#gafda2f702276fb0ac301efac10df09495">natsConnection_Destroy</a></div><div class="ttdeci">NATS_EXTERN void natsConnection_Destroy(natsConnection *nc)</div><div class="ttdoc">Destroys the connection object.</div></div>
+<div class="ttc" id="agroup__conn_pub_group_html_ga052de4b75b3b69ccd8d20eb4861b801d"><div class="ttname"><a href="group__conn_pub_group.html#ga052de4b75b3b69ccd8d20eb4861b801d">natsConnection_RequestMsg</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsConnection_RequestMsg(natsMsg **replyMsg, natsConnection *nc, natsMsg *requestMsg, int64_t timeout)</div><div class="ttdoc">Sends a request based on the given requestMsg and waits for a reply.</div></div>
+<div class="ttc" id="agroup__conn_pub_group_html_ga4bb5105df6a3efd2088e6be0fdf6b31f"><div class="ttname"><a href="group__conn_pub_group.html#ga4bb5105df6a3efd2088e6be0fdf6b31f">natsConnection_RequestString</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsConnection_RequestString(natsMsg **replyMsg, natsConnection *nc, const char *subj, const char *str, int64_t timeout)</div><div class="ttdoc">Sends a request (as a string) and waits for a reply.</div></div>
+<div class="ttc" id="agroup__conn_pub_group_html_ga74511acd87385931112c45c48c2a14ba"><div class="ttname"><a href="group__conn_pub_group.html#ga74511acd87385931112c45c48c2a14ba">natsConnection_PublishMsg</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsConnection_PublishMsg(natsConnection *nc, natsMsg *msg)</div><div class="ttdoc">Publishes a message on a subject.</div></div>
+<div class="ttc" id="agroup__conn_pub_group_html_gaaaa3d75ffec2dcdc6bf905cdb1eee59e"><div class="ttname"><a href="group__conn_pub_group.html#gaaaa3d75ffec2dcdc6bf905cdb1eee59e">natsConnection_PublishRequest</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsConnection_PublishRequest(natsConnection *nc, const char *subj, const char *reply, const void *data, int dataLen)</div><div class="ttdoc">Publishes data on a subject expecting replies on the given reply.</div></div>
+<div class="ttc" id="agroup__conn_pub_group_html_gaafca9a8294e81a5a9979e762931e56c5"><div class="ttname"><a href="group__conn_pub_group.html#gaafca9a8294e81a5a9979e762931e56c5">natsConnection_PublishRequestString</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsConnection_PublishRequestString(natsConnection *nc, const char *subj, const char *reply, const char *str)</div><div class="ttdoc">Publishes a string on a subject expecting replies on the given reply.</div></div>
+<div class="ttc" id="agroup__conn_pub_group_html_gac0b9f7759ecc39b8d77807b94254f9b4"><div class="ttname"><a href="group__conn_pub_group.html#gac0b9f7759ecc39b8d77807b94254f9b4">natsConnection_Publish</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsConnection_Publish(natsConnection *nc, const char *subj, const void *data, int dataLen)</div><div class="ttdoc">Publishes data on a subject.</div></div>
+<div class="ttc" id="agroup__conn_pub_group_html_gad09a717c20de4cf0e2a21dcfd9ce6c64"><div class="ttname"><a href="group__conn_pub_group.html#gad09a717c20de4cf0e2a21dcfd9ce6c64">natsConnection_PublishString</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsConnection_PublishString(natsConnection *nc, const char *subj, const char *str)</div><div class="ttdoc">Publishes a string on a subject.</div></div>
+<div class="ttc" id="agroup__conn_pub_group_html_gaf4b4a022f9c21fc269b87c000330c5a7"><div class="ttname"><a href="group__conn_pub_group.html#gaf4b4a022f9c21fc269b87c000330c5a7">natsConnection_Request</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsConnection_Request(natsMsg **replyMsg, natsConnection *nc, const char *subj, const void *data, int dataLen, int64_t timeout)</div><div class="ttdoc">Sends a request and waits for a reply.</div></div>
+<div class="ttc" id="agroup__conn_sub_group_html_ga17574d5165f7e285462e3d3b2709edf4"><div class="ttname"><a href="group__conn_sub_group.html#ga17574d5165f7e285462e3d3b2709edf4">natsConnection_SubscribeSync</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsConnection_SubscribeSync(natsSubscription **sub, natsConnection *nc, const char *subject)</div><div class="ttdoc">Creates a synchronous subcription.</div></div>
+<div class="ttc" id="agroup__conn_sub_group_html_ga3c9fee2775130786ef62f1cbeb191a48"><div class="ttname"><a href="group__conn_sub_group.html#ga3c9fee2775130786ef62f1cbeb191a48">natsConnection_QueueSubscribe</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsConnection_QueueSubscribe(natsSubscription **sub, natsConnection *nc, const char *subject, const char *queueGroup, natsMsgHandler cb, void *cbClosure)</div><div class="ttdoc">Creates an asynchronous queue subscriber.</div></div>
+<div class="ttc" id="agroup__conn_sub_group_html_ga68630ea7c4bbdc7f8cd62058b41fb476"><div class="ttname"><a href="group__conn_sub_group.html#ga68630ea7c4bbdc7f8cd62058b41fb476">natsConnection_QueueSubscribeSync</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsConnection_QueueSubscribeSync(natsSubscription **sub, natsConnection *nc, const char *subject, const char *queueGroup)</div><div class="ttdoc">Creates a synchronous queue subscriber.</div></div>
+<div class="ttc" id="agroup__conn_sub_group_html_ga96fa115fd5b2ef7658884da80714b91c"><div class="ttname"><a href="group__conn_sub_group.html#ga96fa115fd5b2ef7658884da80714b91c">natsConnection_QueueSubscribeTimeout</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsConnection_QueueSubscribeTimeout(natsSubscription **sub, natsConnection *nc, const char *subject, const char *queueGroup, int64_t timeout, natsMsgHandler cb, void *cbClosure)</div><div class="ttdoc">Creates an asynchronous queue subscriber with a timeout.</div></div>
+<div class="ttc" id="agroup__conn_sub_group_html_gacb2c83b58b7909715424cbc327fdd404"><div class="ttname"><a href="group__conn_sub_group.html#gacb2c83b58b7909715424cbc327fdd404">natsConnection_SubscribeTimeout</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsConnection_SubscribeTimeout(natsSubscription **sub, natsConnection *nc, const char *subject, int64_t timeout, natsMsgHandler cb, void *cbClosure)</div><div class="ttdoc">Creates an asynchronous subscription with a timeout.</div></div>
+<div class="ttc" id="agroup__conn_sub_group_html_gaefab965b5645798d47f9244f2b3fe3fb"><div class="ttname"><a href="group__conn_sub_group.html#gaefab965b5645798d47f9244f2b3fe3fb">natsConnection_Subscribe</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsConnection_Subscribe(natsSubscription **sub, natsConnection *nc, const char *subject, natsMsgHandler cb, void *cbClosure)</div><div class="ttdoc">Creates an asynchronous subscription.</div></div>
+<div class="ttc" id="agroup__inbox_group_html_gaa1ec779a0b7ead54b78da05533848b6d"><div class="ttname"><a href="group__inbox_group.html#gaa1ec779a0b7ead54b78da05533848b6d">natsInbox_Create</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsInbox_Create(natsInbox **newInbox)</div><div class="ttdoc">Creates an inbox.</div></div>
+<div class="ttc" id="agroup__inbox_group_html_gabd6444fb8f28afb9c2b6645945f46cfe"><div class="ttname"><a href="group__inbox_group.html#gabd6444fb8f28afb9c2b6645945f46cfe">natsInbox_Destroy</a></div><div class="ttdeci">NATS_EXTERN void natsInbox_Destroy(natsInbox *inbox)</div><div class="ttdoc">Destroys the inbox.</div></div>
+<div class="ttc" id="agroup__js_assets_group_html_ga223691e6831072a0b8f8103a778293b0"><div class="ttname"><a href="group__js_assets_group.html#ga223691e6831072a0b8f8103a778293b0">jsPlacement_Init</a></div><div class="ttdeci">NATS_EXTERN natsStatus jsPlacement_Init(jsPlacement *placement)</div><div class="ttdoc">Initializes a placement configuration structure.</div></div>
+<div class="ttc" id="agroup__js_assets_group_html_ga2ced0d190131460bf4608ab893dffc50"><div class="ttname"><a href="group__js_assets_group.html#ga2ced0d190131460bf4608ab893dffc50">jsConsumerNamesList_Destroy</a></div><div class="ttdeci">NATS_EXTERN void jsConsumerNamesList_Destroy(jsConsumerNamesList *list)</div><div class="ttdoc">Destroys the consumer names list object.</div></div>
+<div class="ttc" id="agroup__js_assets_group_html_ga2dda04757b4ab27a794b64f8d727fe23"><div class="ttname"><a href="group__js_assets_group.html#ga2dda04757b4ab27a794b64f8d727fe23">js_GetConsumerInfo</a></div><div class="ttdeci">NATS_EXTERN natsStatus js_GetConsumerInfo(jsConsumerInfo **ci, jsCtx *js, const char *stream, const char *consumer, jsOptions *opts, jsErrCode *errCode)</div><div class="ttdoc">Retrieves information about a consumer.</div></div>
+<div class="ttc" id="agroup__js_assets_group_html_ga3381bb05c05bf4a8979adde68d37dd66"><div class="ttname"><a href="group__js_assets_group.html#ga3381bb05c05bf4a8979adde68d37dd66">jsConsumerConfig_Init</a></div><div class="ttdeci">NATS_EXTERN natsStatus jsConsumerConfig_Init(jsConsumerConfig *cc)</div><div class="ttdoc">Initializes a consumer configuration structure.</div></div>
+<div class="ttc" id="agroup__js_assets_group_html_ga388bfeaa5a78ebf6ce7c15c6e3a7156b"><div class="ttname"><a href="group__js_assets_group.html#ga388bfeaa5a78ebf6ce7c15c6e3a7156b">jsRePublish_Init</a></div><div class="ttdeci">NATS_EXTERN natsStatus jsRePublish_Init(jsRePublish *rp)</div><div class="ttdoc">Initializes a republish structure.</div></div>
+<div class="ttc" id="agroup__js_assets_group_html_ga38cdcc339eb8976d23296b99aa37d629"><div class="ttname"><a href="group__js_assets_group.html#ga38cdcc339eb8976d23296b99aa37d629">jsStreamInfoList_Destroy</a></div><div class="ttdeci">NATS_EXTERN void jsStreamInfoList_Destroy(jsStreamInfoList *list)</div><div class="ttdoc">Destroys the stream information list object.</div></div>
+<div class="ttc" id="agroup__js_assets_group_html_ga397e55a0b3b6d36c9bf746eee3842172"><div class="ttname"><a href="group__js_assets_group.html#ga397e55a0b3b6d36c9bf746eee3842172">js_DeleteStream</a></div><div class="ttdeci">NATS_EXTERN natsStatus js_DeleteStream(jsCtx *js, const char *stream, jsOptions *opts, jsErrCode *errCode)</div><div class="ttdoc">Deletes a stream.</div></div>
+<div class="ttc" id="agroup__js_assets_group_html_ga421de40d8e91658353111c3f2ea90ec8"><div class="ttname"><a href="group__js_assets_group.html#ga421de40d8e91658353111c3f2ea90ec8">jsConsumerInfoList_Destroy</a></div><div class="ttdeci">NATS_EXTERN void jsConsumerInfoList_Destroy(jsConsumerInfoList *list)</div><div class="ttdoc">Destroys the consumer information list object.</div></div>
+<div class="ttc" id="agroup__js_assets_group_html_ga52fbc61759b11494db91f348a733c490"><div class="ttname"><a href="group__js_assets_group.html#ga52fbc61759b11494db91f348a733c490">js_DeleteConsumer</a></div><div class="ttdeci">NATS_EXTERN natsStatus js_DeleteConsumer(jsCtx *js, const char *stream, const char *consumer, jsOptions *opts, jsErrCode *errCode)</div><div class="ttdoc">Deletes a consumer.</div></div>
+<div class="ttc" id="agroup__js_assets_group_html_ga531d91de372f0dffb8d64abecf88b0c0"><div class="ttname"><a href="group__js_assets_group.html#ga531d91de372f0dffb8d64abecf88b0c0">js_Streams</a></div><div class="ttdeci">NATS_EXTERN natsStatus js_Streams(jsStreamInfoList **list, jsCtx *js, jsOptions *opts, jsErrCode *errCode)</div><div class="ttdoc">Retrieves the list of all available streams.</div></div>
+<div class="ttc" id="agroup__js_assets_group_html_ga5a6a886c18a79caa403908bf7f7ef125"><div class="ttname"><a href="group__js_assets_group.html#ga5a6a886c18a79caa403908bf7f7ef125">js_PurgeStream</a></div><div class="ttdeci">NATS_EXTERN natsStatus js_PurgeStream(jsCtx *js, const char *stream, jsOptions *opts, jsErrCode *errCode)</div><div class="ttdoc">Purges a stream.</div></div>
+<div class="ttc" id="agroup__js_assets_group_html_ga5efc5136d33ba52161e6732f88f1ee75"><div class="ttname"><a href="group__js_assets_group.html#ga5efc5136d33ba52161e6732f88f1ee75">js_AddStream</a></div><div class="ttdeci">NATS_EXTERN natsStatus js_AddStream(jsStreamInfo **si, jsCtx *js, jsStreamConfig *cfg, jsOptions *opts, jsErrCode *errCode)</div><div class="ttdoc">Creates a stream.</div></div>
+<div class="ttc" id="agroup__js_assets_group_html_ga62c250cecc650b1eed0fa1691893e2ae"><div class="ttname"><a href="group__js_assets_group.html#ga62c250cecc650b1eed0fa1691893e2ae">js_DirectGetMsg</a></div><div class="ttdeci">NATS_EXTERN natsStatus js_DirectGetMsg(natsMsg **msg, jsCtx *js, const char *stream, jsOptions *opts, jsDirectGetMsgOptions *dgOpts)</div><div class="ttdoc">Retrieves directly a JetStream message based on provided options.</div></div>
+<div class="ttc" id="agroup__js_assets_group_html_ga6835b53da27d5721eddb3698e582cf0c"><div class="ttname"><a href="group__js_assets_group.html#ga6835b53da27d5721eddb3698e582cf0c">js_GetLastMsg</a></div><div class="ttdeci">NATS_EXTERN natsStatus js_GetLastMsg(natsMsg **msg, jsCtx *js, const char *stream, const char *subject, jsOptions *opts, jsErrCode *errCode)</div><div class="ttdoc">Retrieves the last JetStream message from the stream for a given subject.</div></div>
+<div class="ttc" id="agroup__js_assets_group_html_ga690d19af55d12b82c8523d1861cef8d0"><div class="ttname"><a href="group__js_assets_group.html#ga690d19af55d12b82c8523d1861cef8d0">js_ConsumerNames</a></div><div class="ttdeci">NATS_EXTERN natsStatus js_ConsumerNames(jsConsumerNamesList **list, jsCtx *js, const char *stream, jsOptions *opts, jsErrCode *errCode)</div><div class="ttdoc">Retrieves the list of all available consumer names for a stream.</div></div>
+<div class="ttc" id="agroup__js_assets_group_html_ga7158f73e183462e9a15e9802e1746ff0"><div class="ttname"><a href="group__js_assets_group.html#ga7158f73e183462e9a15e9802e1746ff0">js_EraseMsg</a></div><div class="ttdeci">NATS_EXTERN natsStatus js_EraseMsg(jsCtx *js, const char *stream, uint64_t seq, jsOptions *opts, jsErrCode *errCode)</div><div class="ttdoc">Erases a message from the stream.</div></div>
+<div class="ttc" id="agroup__js_assets_group_html_ga75a5c44304e24481c67e17fbccc15c31"><div class="ttname"><a href="group__js_assets_group.html#ga75a5c44304e24481c67e17fbccc15c31">js_UpdateStream</a></div><div class="ttdeci">NATS_EXTERN natsStatus js_UpdateStream(jsStreamInfo **si, jsCtx *js, jsStreamConfig *cfg, jsOptions *opts, jsErrCode *errCode)</div><div class="ttdoc">Updates a stream.</div></div>
+<div class="ttc" id="agroup__js_assets_group_html_ga7c8664b38fcce8497746367d35e5f60b"><div class="ttname"><a href="group__js_assets_group.html#ga7c8664b38fcce8497746367d35e5f60b">jsAccountInfo_Destroy</a></div><div class="ttdeci">NATS_EXTERN void jsAccountInfo_Destroy(jsAccountInfo *ai)</div><div class="ttdoc">Destroys the account information object.</div></div>
+<div class="ttc" id="agroup__js_assets_group_html_ga7fe8e0bf98a38eb59372e7cd78aaaf56"><div class="ttname"><a href="group__js_assets_group.html#ga7fe8e0bf98a38eb59372e7cd78aaaf56">jsStreamSource_Init</a></div><div class="ttdeci">NATS_EXTERN natsStatus jsStreamSource_Init(jsStreamSource *source)</div><div class="ttdoc">Initializes a stream source configuration structure.</div></div>
+<div class="ttc" id="agroup__js_assets_group_html_ga81aebebcd79922104720da51e95020d4"><div class="ttname"><a href="group__js_assets_group.html#ga81aebebcd79922104720da51e95020d4">jsExternalStream_Init</a></div><div class="ttdeci">NATS_EXTERN natsStatus jsExternalStream_Init(jsExternalStream *external)</div><div class="ttdoc">Initializes an external stream configuration structure.</div></div>
+<div class="ttc" id="agroup__js_assets_group_html_ga8d835d47aed9c84ce3b8dcfea469f4cb"><div class="ttname"><a href="group__js_assets_group.html#ga8d835d47aed9c84ce3b8dcfea469f4cb">jsDirectGetMsgOptions_Init</a></div><div class="ttdeci">NATS_EXTERN natsStatus jsDirectGetMsgOptions_Init(jsDirectGetMsgOptions *opts)</div><div class="ttdoc">Initializes a direct get message options structure.</div></div>
+<div class="ttc" id="agroup__js_assets_group_html_ga8ee87ef86e94be42685941abe9638bbd"><div class="ttname"><a href="group__js_assets_group.html#ga8ee87ef86e94be42685941abe9638bbd">jsStreamInfo_Destroy</a></div><div class="ttdeci">NATS_EXTERN void jsStreamInfo_Destroy(jsStreamInfo *si)</div><div class="ttdoc">Destroys the stream information object.</div></div>
+<div class="ttc" id="agroup__js_assets_group_html_ga94cb23a35516b7779de28fcbb263180a"><div class="ttname"><a href="group__js_assets_group.html#ga94cb23a35516b7779de28fcbb263180a">js_GetStreamInfo</a></div><div class="ttdeci">NATS_EXTERN natsStatus js_GetStreamInfo(jsStreamInfo **si, jsCtx *js, const char *stream, jsOptions *opts, jsErrCode *errCode)</div><div class="ttdoc">Retreives information from a stream.</div></div>
+<div class="ttc" id="agroup__js_assets_group_html_ga9c1d5ed2f24ba836c10e415231f80088"><div class="ttname"><a href="group__js_assets_group.html#ga9c1d5ed2f24ba836c10e415231f80088">jsConsumerInfo_Destroy</a></div><div class="ttdeci">NATS_EXTERN void jsConsumerInfo_Destroy(jsConsumerInfo *ci)</div><div class="ttdoc">Destroys the consumer information object.</div></div>
+<div class="ttc" id="agroup__js_assets_group_html_ga9fe289ae172f83e53ca1b1b747744c1f"><div class="ttname"><a href="group__js_assets_group.html#ga9fe289ae172f83e53ca1b1b747744c1f">js_GetMsg</a></div><div class="ttdeci">NATS_EXTERN natsStatus js_GetMsg(natsMsg **msg, jsCtx *js, const char *stream, uint64_t seq, jsOptions *opts, jsErrCode *errCode)</div><div class="ttdoc">Retrieves a JetStream message from the stream by sequence.</div></div>
+<div class="ttc" id="agroup__js_assets_group_html_gac230f71dbdc4d10bc7471d01763881d6"><div class="ttname"><a href="group__js_assets_group.html#gac230f71dbdc4d10bc7471d01763881d6">jsStreamConfig_Init</a></div><div class="ttdeci">NATS_EXTERN natsStatus jsStreamConfig_Init(jsStreamConfig *cfg)</div><div class="ttdoc">Initializes a streaming configuration structure.</div></div>
+<div class="ttc" id="agroup__js_assets_group_html_gac3dfc87863dbbb3c959ecde4bce905bc"><div class="ttname"><a href="group__js_assets_group.html#gac3dfc87863dbbb3c959ecde4bce905bc">js_StreamNames</a></div><div class="ttdeci">NATS_EXTERN natsStatus js_StreamNames(jsStreamNamesList **list, jsCtx *js, jsOptions *opts, jsErrCode *errCode)</div><div class="ttdoc">Retrieves the list of all available stream names.</div></div>
+<div class="ttc" id="agroup__js_assets_group_html_gac8965dcfc6b465fbc323aa552c606c46"><div class="ttname"><a href="group__js_assets_group.html#gac8965dcfc6b465fbc323aa552c606c46">js_GetAccountInfo</a></div><div class="ttdeci">NATS_EXTERN natsStatus js_GetAccountInfo(jsAccountInfo **ai, jsCtx *js, jsOptions *opts, jsErrCode *errCode)</div><div class="ttdoc">Retrieves information about the JetStream usage from an account.</div></div>
+<div class="ttc" id="agroup__js_assets_group_html_gad13ec256e24710bb237995814871e554"><div class="ttname"><a href="group__js_assets_group.html#gad13ec256e24710bb237995814871e554">js_UpdateConsumer</a></div><div class="ttdeci">NATS_EXTERN natsStatus js_UpdateConsumer(jsConsumerInfo **ci, jsCtx *js, const char *stream, jsConsumerConfig *cfg, jsOptions *opts, jsErrCode *errCode)</div><div class="ttdoc">Updates a JetStream consumer.</div></div>
+<div class="ttc" id="agroup__js_assets_group_html_gaeba5d45abbe811c0e40830c5f26c78fd"><div class="ttname"><a href="group__js_assets_group.html#gaeba5d45abbe811c0e40830c5f26c78fd">js_DeleteMsg</a></div><div class="ttdeci">NATS_EXTERN natsStatus js_DeleteMsg(jsCtx *js, const char *stream, uint64_t seq, jsOptions *opts, jsErrCode *errCode)</div><div class="ttdoc">Deletes a message from the stream.</div></div>
+<div class="ttc" id="agroup__js_assets_group_html_gaf28097ede3e9ba9926fb00856e63ffd9"><div class="ttname"><a href="group__js_assets_group.html#gaf28097ede3e9ba9926fb00856e63ffd9">js_Consumers</a></div><div class="ttdeci">NATS_EXTERN natsStatus js_Consumers(jsConsumerInfoList **list, jsCtx *js, const char *stream, jsOptions *opts, jsErrCode *errCode)</div><div class="ttdoc">Retrieves the list of all available consumers for a stream.</div></div>
+<div class="ttc" id="agroup__js_assets_group_html_gaf2efb63db150e782d9007090b49d4115"><div class="ttname"><a href="group__js_assets_group.html#gaf2efb63db150e782d9007090b49d4115">js_AddConsumer</a></div><div class="ttdeci">NATS_EXTERN natsStatus js_AddConsumer(jsConsumerInfo **ci, jsCtx *js, const char *stream, jsConsumerConfig *cfg, jsOptions *opts, jsErrCode *errCode)</div><div class="ttdoc">Adds a JetStream consumer.</div></div>
+<div class="ttc" id="agroup__js_assets_group_html_gaf8644f281d4e24893a6a170b4f7faa65"><div class="ttname"><a href="group__js_assets_group.html#gaf8644f281d4e24893a6a170b4f7faa65">jsStreamNamesList_Destroy</a></div><div class="ttdeci">NATS_EXTERN void jsStreamNamesList_Destroy(jsStreamNamesList *list)</div><div class="ttdoc">Destroys the stream names list object.</div></div>
+<div class="ttc" id="agroup__js_group_html_ga855ff9a04888d696785cc5ede96112e4"><div class="ttname"><a href="group__js_group.html#ga855ff9a04888d696785cc5ede96112e4">jsOptions_Init</a></div><div class="ttdeci">NATS_EXTERN natsStatus jsOptions_Init(jsOptions *opts)</div><div class="ttdoc">Initializes a streaming context options structure.</div></div>
+<div class="ttc" id="agroup__js_group_html_ga8ed08b0fe1074b1e490291f0af2cb03f"><div class="ttname"><a href="group__js_group.html#ga8ed08b0fe1074b1e490291f0af2cb03f">natsConnection_JetStream</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsConnection_JetStream(jsCtx **js, natsConnection *nc, jsOptions *opts)</div><div class="ttdoc">Returns a new JetStream context.</div></div>
+<div class="ttc" id="agroup__js_group_html_gacfa6ce3e60ea540e3331a09a7f3dc856"><div class="ttname"><a href="group__js_group.html#gacfa6ce3e60ea540e3331a09a7f3dc856">jsCtx_Destroy</a></div><div class="ttdeci">NATS_EXTERN void jsCtx_Destroy(jsCtx *js)</div><div class="ttdoc">Destroys the JetStream context.</div></div>
+<div class="ttc" id="agroup__js_msg_html_ga819be2990ec20b964aa574b5331d7f2e"><div class="ttname"><a href="group__js_msg.html#ga819be2990ec20b964aa574b5331d7f2e">natsMsg_GetSequence</a></div><div class="ttdeci">NATS_EXTERN uint64_t natsMsg_GetSequence(natsMsg *msg)</div><div class="ttdoc">Returns the sequence number of this JetStream message.</div></div>
+<div class="ttc" id="agroup__js_msg_html_gab4850497c5481f5ec6eb1fcdb43646f5"><div class="ttname"><a href="group__js_msg.html#gab4850497c5481f5ec6eb1fcdb43646f5">natsMsg_GetTime</a></div><div class="ttdeci">NATS_EXTERN int64_t natsMsg_GetTime(natsMsg *msg)</div><div class="ttdoc">Returns the timestamp (in UTC) of this JetStream message.</div></div>
+<div class="ttc" id="agroup__js_msg_html_gac0697389fa60a3c4725e53cd23ada7bd"><div class="ttname"><a href="group__js_msg.html#gac0697389fa60a3c4725e53cd23ada7bd">natsMsg_NakWithDelay</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsMsg_NakWithDelay(natsMsg *msg, int64_t delay, jsOptions *opts)</div><div class="ttdoc">Negatively acknowledges a message.</div></div>
+<div class="ttc" id="agroup__js_msg_html_gac271b874154301da9759f9ac05768b47"><div class="ttname"><a href="group__js_msg.html#gac271b874154301da9759f9ac05768b47">natsMsg_Nak</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsMsg_Nak(natsMsg *msg, jsOptions *opts)</div><div class="ttdoc">Negatively acknowledges a message.</div></div>
+<div class="ttc" id="agroup__js_msg_html_gacf48e59038fab35849e9dc6f8fcf6328"><div class="ttname"><a href="group__js_msg.html#gacf48e59038fab35849e9dc6f8fcf6328">natsMsg_GetMetaData</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsMsg_GetMetaData(jsMsgMetaData **new_meta, natsMsg *msg)</div><div class="ttdoc">Returns metadata from this JetStream message.</div></div>
+<div class="ttc" id="agroup__js_msg_html_gae1e0beb19cd76e2f69e6415c41c9bb39"><div class="ttname"><a href="group__js_msg.html#gae1e0beb19cd76e2f69e6415c41c9bb39">natsMsg_InProgress</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsMsg_InProgress(natsMsg *msg, jsOptions *opts)</div><div class="ttdoc">Resets redelivery timer on the server.</div></div>
+<div class="ttc" id="agroup__js_msg_html_gae454fb7e7097a3cd3362cb49ef8a3c84"><div class="ttname"><a href="group__js_msg.html#gae454fb7e7097a3cd3362cb49ef8a3c84">natsMsg_Ack</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsMsg_Ack(natsMsg *msg, jsOptions *opts)</div><div class="ttdoc">Acknowledges a message.</div></div>
+<div class="ttc" id="agroup__js_msg_html_gae84d21e4388255e9d990e53c9f67e7c4"><div class="ttname"><a href="group__js_msg.html#gae84d21e4388255e9d990e53c9f67e7c4">natsMsg_Term</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsMsg_Term(natsMsg *msg, jsOptions *opts)</div><div class="ttdoc">Abandon this message.</div></div>
+<div class="ttc" id="agroup__js_msg_html_gaf9bf92294342bcb27053de7038606d12"><div class="ttname"><a href="group__js_msg.html#gaf9bf92294342bcb27053de7038606d12">jsMsgMetaData_Destroy</a></div><div class="ttdeci">NATS_EXTERN void jsMsgMetaData_Destroy(jsMsgMetaData *meta)</div><div class="ttdoc">Destroys the message metadata object.</div></div>
+<div class="ttc" id="agroup__js_msg_html_gafb899ebf8e89b3a858fe20f7853635a7"><div class="ttname"><a href="group__js_msg.html#gafb899ebf8e89b3a858fe20f7853635a7">natsMsg_AckSync</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsMsg_AckSync(natsMsg *msg, jsOptions *opts, jsErrCode *errCode)</div><div class="ttdoc">Acknowledges a message and wait for a confirmation.</div></div>
+<div class="ttc" id="agroup__js_pub_group_html_ga069dfd6f0f3d96f1ff8bf2372e59900c"><div class="ttname"><a href="group__js_pub_group.html#ga069dfd6f0f3d96f1ff8bf2372e59900c">js_PublishAsync</a></div><div class="ttdeci">NATS_EXTERN natsStatus js_PublishAsync(jsCtx *js, const char *subj, const void *data, int dataLen, jsPubOptions *opts)</div><div class="ttdoc">Publishes data to JetStream but does not wait for a jsPubAck.</div></div>
+<div class="ttc" id="agroup__js_pub_group_html_ga24813ee9a58f00c0f21d10ab9c93b81d"><div class="ttname"><a href="group__js_pub_group.html#ga24813ee9a58f00c0f21d10ab9c93b81d">js_PublishAsyncComplete</a></div><div class="ttdeci">NATS_EXTERN natsStatus js_PublishAsyncComplete(jsCtx *js, jsPubOptions *opts)</div><div class="ttdoc">Wait for all outstanding messages to be acknowledged.</div></div>
+<div class="ttc" id="agroup__js_pub_group_html_ga2ac95a3450f77f8074fae3f2fbe7e54c"><div class="ttname"><a href="group__js_pub_group.html#ga2ac95a3450f77f8074fae3f2fbe7e54c">js_PublishAsyncGetPendingList</a></div><div class="ttdeci">NATS_EXTERN natsStatus js_PublishAsyncGetPendingList(natsMsgList *pending, jsCtx *js)</div><div class="ttdoc">Returns the list of pending messages published asynchronously.</div></div>
+<div class="ttc" id="agroup__js_pub_group_html_ga2aceeb82fac3621aea843dd246732bdd"><div class="ttname"><a href="group__js_pub_group.html#ga2aceeb82fac3621aea843dd246732bdd">js_PublishMsg</a></div><div class="ttdeci">NATS_EXTERN natsStatus js_PublishMsg(jsPubAck **pubAck, jsCtx *js, natsMsg *msg, jsPubOptions *opts, jsErrCode *errCode)</div><div class="ttdoc">Publishes a message to JetStream.</div></div>
+<div class="ttc" id="agroup__js_pub_group_html_gaac130840b6db9109e72cf6ad9186dfc4"><div class="ttname"><a href="group__js_pub_group.html#gaac130840b6db9109e72cf6ad9186dfc4">jsPubAck_Destroy</a></div><div class="ttdeci">NATS_EXTERN void jsPubAck_Destroy(jsPubAck *pubAck)</div><div class="ttdoc">Destroys the publish acknowledgment object.</div></div>
+<div class="ttc" id="agroup__js_pub_group_html_gab7e4139a48c5ee4d2155cbb43142e873"><div class="ttname"><a href="group__js_pub_group.html#gab7e4139a48c5ee4d2155cbb43142e873">js_PublishMsgAsync</a></div><div class="ttdeci">NATS_EXTERN natsStatus js_PublishMsgAsync(jsCtx *js, natsMsg **msg, jsPubOptions *opts)</div><div class="ttdoc">Publishes a message to JetStream but does not wait for a jsPubAck.</div></div>
+<div class="ttc" id="agroup__js_pub_group_html_gac6ba005531c82d9f0efa88dd6b458477"><div class="ttname"><a href="group__js_pub_group.html#gac6ba005531c82d9f0efa88dd6b458477">js_Publish</a></div><div class="ttdeci">NATS_EXTERN natsStatus js_Publish(jsPubAck **pubAck, jsCtx *js, const char *subj, const void *data, int dataLen, jsPubOptions *opts, jsErrCode *errCode)</div><div class="ttdoc">Publishes data on a subject to JetStream.</div></div>
+<div class="ttc" id="agroup__js_pub_group_html_gaf09f333a8675a8060c5ede07a6bdeef9"><div class="ttname"><a href="group__js_pub_group.html#gaf09f333a8675a8060c5ede07a6bdeef9">jsPubOptions_Init</a></div><div class="ttdeci">NATS_EXTERN natsStatus jsPubOptions_Init(jsPubOptions *opts)</div><div class="ttdoc">Initializes a publish options structure.</div></div>
+<div class="ttc" id="agroup__js_sub_group_html_ga0daed9f0d2d00cb14314ecc180a6fa84"><div class="ttname"><a href="group__js_sub_group.html#ga0daed9f0d2d00cb14314ecc180a6fa84">natsSubscription_GetSequenceMismatch</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsSubscription_GetSequenceMismatch(jsConsumerSequenceMismatch *csm, natsSubscription *sub)</div><div class="ttdoc">Returns the consumer sequence mismatch information.</div></div>
+<div class="ttc" id="agroup__js_sub_group_html_ga1c3a62de8cd4855ae61ea4f67417a43b"><div class="ttname"><a href="group__js_sub_group.html#ga1c3a62de8cd4855ae61ea4f67417a43b">jsFetchRequest_Init</a></div><div class="ttdeci">NATS_EXTERN natsStatus jsFetchRequest_Init(jsFetchRequest *request)</div><div class="ttdoc">Initializes a fetch request options structure.</div></div>
+<div class="ttc" id="agroup__js_sub_group_html_ga472adb949d1af9d8f07bda99f5d7f3f8"><div class="ttname"><a href="group__js_sub_group.html#ga472adb949d1af9d8f07bda99f5d7f3f8">jsSubOptions_Init</a></div><div class="ttdeci">NATS_EXTERN natsStatus jsSubOptions_Init(jsSubOptions *opts)</div><div class="ttdoc">Initializes a subscribe options structure.</div></div>
+<div class="ttc" id="agroup__js_sub_group_html_ga676292505e7fde8688cfd886b79a10ed"><div class="ttname"><a href="group__js_sub_group.html#ga676292505e7fde8688cfd886b79a10ed">natsSubscription_FetchRequest</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsSubscription_FetchRequest(natsMsgList *list, natsSubscription *sub, jsFetchRequest *request)</div><div class="ttdoc">Fetches messages for a pull subscription with a complete request configuration.</div></div>
+<div class="ttc" id="agroup__js_sub_group_html_gaa686c6efd84ef963de1925108e896515"><div class="ttname"><a href="group__js_sub_group.html#gaa686c6efd84ef963de1925108e896515">js_Subscribe</a></div><div class="ttdeci">NATS_EXTERN natsStatus js_Subscribe(natsSubscription **sub, jsCtx *js, const char *subject, natsMsgHandler cb, void *cbClosure, jsOptions *opts, jsSubOptions *subOpts, jsErrCode *errCode)</div><div class="ttdoc">Create an asynchronous subscription.</div></div>
+<div class="ttc" id="agroup__js_sub_group_html_gaae716a1431db065744c079b71a9f4c2e"><div class="ttname"><a href="group__js_sub_group.html#gaae716a1431db065744c079b71a9f4c2e">natsSubscription_GetConsumerInfo</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsSubscription_GetConsumerInfo(jsConsumerInfo **ci, natsSubscription *sub, jsOptions *opts, jsErrCode *errCode)</div><div class="ttdoc">Returns the jsConsumerInfo associated with this subscription.</div></div>
+<div class="ttc" id="agroup__js_sub_group_html_gaaeaddb73857aa4eb4901eec945ed27cd"><div class="ttname"><a href="group__js_sub_group.html#gaaeaddb73857aa4eb4901eec945ed27cd">js_PullSubscribe</a></div><div class="ttdeci">NATS_EXTERN natsStatus js_PullSubscribe(natsSubscription **sub, jsCtx *js, const char *subject, const char *durable, jsOptions *opts, jsSubOptions *subOpts, jsErrCode *errCode)</div><div class="ttdoc">Create a pull subscriber.</div></div>
+<div class="ttc" id="agroup__js_sub_group_html_gabacb010031e535f9fb6e2167337e8adf"><div class="ttname"><a href="group__js_sub_group.html#gabacb010031e535f9fb6e2167337e8adf">js_SubscribeSync</a></div><div class="ttdeci">NATS_EXTERN natsStatus js_SubscribeSync(natsSubscription **sub, jsCtx *js, const char *subject, jsOptions *opts, jsSubOptions *subOpts, jsErrCode *errCode)</div><div class="ttdoc">Create a synchronous subscription.</div></div>
+<div class="ttc" id="agroup__js_sub_group_html_gafc5e0d2269bd23b4d5fb7f3b05278e50"><div class="ttname"><a href="group__js_sub_group.html#gafc5e0d2269bd23b4d5fb7f3b05278e50">natsSubscription_Fetch</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsSubscription_Fetch(natsMsgList *list, natsSubscription *sub, int batch, int64_t timeout, jsErrCode *errCode)</div><div class="ttdoc">Fetches messages for a pull subscription.</div></div>
+<div class="ttc" id="agroup__kv_entry_html_ga088fd67d3d384ad7a7ddfc82535becea"><div class="ttname"><a href="group__kv_entry.html#ga088fd67d3d384ad7a7ddfc82535becea">kvEntry_Operation</a></div><div class="ttdeci">NATS_EXTERN kvOperation kvEntry_Operation(kvEntry *e)</div><div class="ttdoc">Returns the type of operation of this value.</div></div>
+<div class="ttc" id="agroup__kv_entry_html_ga233a2d75895cfd0140cf77757592cf47"><div class="ttname"><a href="group__kv_entry.html#ga233a2d75895cfd0140cf77757592cf47">kvEntry_Delta</a></div><div class="ttdeci">NATS_EXTERN uint64_t kvEntry_Delta(kvEntry *e)</div><div class="ttdoc">Returns the distance from the latest value.</div></div>
+<div class="ttc" id="agroup__kv_entry_html_ga28077f81d71a30cbce2dc81e5c9574fc"><div class="ttname"><a href="group__kv_entry.html#ga28077f81d71a30cbce2dc81e5c9574fc">kvEntry_Value</a></div><div class="ttdeci">NATS_EXTERN const void * kvEntry_Value(kvEntry *e)</div><div class="ttdoc">Returns the value for this key.</div></div>
+<div class="ttc" id="agroup__kv_entry_html_ga2d58abf81cb577e21a76f9c77568409f"><div class="ttname"><a href="group__kv_entry.html#ga2d58abf81cb577e21a76f9c77568409f">kvEntry_Revision</a></div><div class="ttdeci">NATS_EXTERN uint64_t kvEntry_Revision(kvEntry *e)</div><div class="ttdoc">Returns the unique sequence for this value.</div></div>
+<div class="ttc" id="agroup__kv_entry_html_ga31ef3a2e3a7df6cf4dbb0a762737800a"><div class="ttname"><a href="group__kv_entry.html#ga31ef3a2e3a7df6cf4dbb0a762737800a">kvEntry_Created</a></div><div class="ttdeci">NATS_EXTERN int64_t kvEntry_Created(kvEntry *e)</div><div class="ttdoc">Returns the time (in UTC) the data was put in the bucket.</div></div>
+<div class="ttc" id="agroup__kv_entry_html_ga7ff6220915726600545357e31226fb65"><div class="ttname"><a href="group__kv_entry.html#ga7ff6220915726600545357e31226fb65">kvEntry_ValueString</a></div><div class="ttdeci">NATS_EXTERN const char * kvEntry_ValueString(kvEntry *e)</div><div class="ttdoc">Returns the value, as a string, for this key.</div></div>
+<div class="ttc" id="agroup__kv_entry_html_ga8359ffcdeefb9c5821e6442d0d5ee388"><div class="ttname"><a href="group__kv_entry.html#ga8359ffcdeefb9c5821e6442d0d5ee388">kvEntry_Destroy</a></div><div class="ttdeci">NATS_EXTERN void kvEntry_Destroy(kvEntry *e)</div><div class="ttdoc">Destroys the KeyValue entry object.</div></div>
+<div class="ttc" id="agroup__kv_entry_html_gab455f32b0abfb1361dab4b5e7d98042a"><div class="ttname"><a href="group__kv_entry.html#gab455f32b0abfb1361dab4b5e7d98042a">kvEntry_Key</a></div><div class="ttdeci">NATS_EXTERN const char * kvEntry_Key(kvEntry *e)</div><div class="ttdoc">Returns the name of the key that was retrieved.</div></div>
+<div class="ttc" id="agroup__kv_entry_html_gadedbb410cce499afb535eb6641c32ca7"><div class="ttname"><a href="group__kv_entry.html#gadedbb410cce499afb535eb6641c32ca7">kvEntry_Bucket</a></div><div class="ttdeci">NATS_EXTERN const char * kvEntry_Bucket(kvEntry *e)</div><div class="ttdoc">Returns the name of the bucket the data was loaded from.</div></div>
+<div class="ttc" id="agroup__kv_entry_html_gaf7ccc866865903f231e0431754ed2415"><div class="ttname"><a href="group__kv_entry.html#gaf7ccc866865903f231e0431754ed2415">kvEntry_ValueLen</a></div><div class="ttdeci">NATS_EXTERN int kvEntry_ValueLen(kvEntry *e)</div><div class="ttdoc">Returns the value length for this key.</div></div>
+<div class="ttc" id="agroup__kv_group_html_ga02ccd58bc5062f6ce6f94bf05e3dfe45"><div class="ttname"><a href="group__kv_group.html#ga02ccd58bc5062f6ce6f94bf05e3dfe45">kvKeysList_Destroy</a></div><div class="ttdeci">NATS_EXTERN void kvKeysList_Destroy(kvKeysList *list)</div><div class="ttdoc">Destroys this list of KeyValue store key strings.</div></div>
+<div class="ttc" id="agroup__kv_group_html_ga13ed70f15cd1485cd15f96bcc4b7ad1c"><div class="ttname"><a href="group__kv_group.html#ga13ed70f15cd1485cd15f96bcc4b7ad1c">kvStore_UpdateString</a></div><div class="ttdeci">NATS_EXTERN natsStatus kvStore_UpdateString(uint64_t *rev, kvStore *kv, const char *key, const char *data, uint64_t last)</div><div class="ttdoc">Updates the value (as a string) for the key into the store if and only if the latest revision matches...</div></div>
+<div class="ttc" id="agroup__kv_group_html_ga1fdf7a1d3acf96e475184790589a401e"><div class="ttname"><a href="group__kv_group.html#ga1fdf7a1d3acf96e475184790589a401e">kvStore_Put</a></div><div class="ttdeci">NATS_EXTERN natsStatus kvStore_Put(uint64_t *rev, kvStore *kv, const char *key, const void *data, int len)</div><div class="ttdoc">Places the new value for the key into the store.</div></div>
+<div class="ttc" id="agroup__kv_group_html_ga243113fd7df34ce104850ab888f04021"><div class="ttname"><a href="group__kv_group.html#ga243113fd7df34ce104850ab888f04021">kvPurgeOptions_Init</a></div><div class="ttdeci">NATS_EXTERN natsStatus kvPurgeOptions_Init(kvPurgeOptions *opts)</div><div class="ttdoc">Initializes a KeyValue purge options structure.</div></div>
+<div class="ttc" id="agroup__kv_group_html_ga2db86f80d6bfce1bdbedf1b9da22913c"><div class="ttname"><a href="group__kv_group.html#ga2db86f80d6bfce1bdbedf1b9da22913c">kvStore_Get</a></div><div class="ttdeci">NATS_EXTERN natsStatus kvStore_Get(kvEntry **new_entry, kvStore *kv, const char *key)</div><div class="ttdoc">Returns the latest entry for the key.</div></div>
+<div class="ttc" id="agroup__kv_group_html_ga30feca870f580c7b9d2ad07a740505b2"><div class="ttname"><a href="group__kv_group.html#ga30feca870f580c7b9d2ad07a740505b2">kvStore_Watch</a></div><div class="ttdeci">NATS_EXTERN natsStatus kvStore_Watch(kvWatcher **new_watcher, kvStore *kv, const char *keys, kvWatchOptions *opts)</div><div class="ttdoc">Returns a watcher for any updates to keys that match the keys argument.</div></div>
+<div class="ttc" id="agroup__kv_group_html_ga34ab74b229ff88e64301ea53a274da69"><div class="ttname"><a href="group__kv_group.html#ga34ab74b229ff88e64301ea53a274da69">kvStore_PurgeDeletes</a></div><div class="ttdeci">NATS_EXTERN natsStatus kvStore_PurgeDeletes(kvStore *kv, kvPurgeOptions *opts)</div><div class="ttdoc">Purge and removes delete markers.</div></div>
+<div class="ttc" id="agroup__kv_group_html_ga3d5fa3d895d0d3041440105b244e9ca9"><div class="ttname"><a href="group__kv_group.html#ga3d5fa3d895d0d3041440105b244e9ca9">kvStore_Purge</a></div><div class="ttdeci">NATS_EXTERN natsStatus kvStore_Purge(kvStore *kv, const char *key, kvPurgeOptions *opts)</div><div class="ttdoc">Deletes a key by placing a purge marker and removing all revisions.</div></div>
+<div class="ttc" id="agroup__kv_group_html_ga5289f7cd3999cfb46fb1fcb83178aec6"><div class="ttname"><a href="group__kv_group.html#ga5289f7cd3999cfb46fb1fcb83178aec6">kvStore_Create</a></div><div class="ttdeci">NATS_EXTERN natsStatus kvStore_Create(uint64_t *rev, kvStore *kv, const char *key, const void *data, int len)</div><div class="ttdoc">Places the value for the key into the store if and only if the key does not exist.</div></div>
+<div class="ttc" id="agroup__kv_group_html_ga5726ad2e6205d2f6749be013138218ca"><div class="ttname"><a href="group__kv_group.html#ga5726ad2e6205d2f6749be013138218ca">kvStore_CreateString</a></div><div class="ttdeci">NATS_EXTERN natsStatus kvStore_CreateString(uint64_t *rev, kvStore *kv, const char *key, const char *data)</div><div class="ttdoc">Places the value (as a string) for the key into the store if and only if the key does not exist.</div></div>
+<div class="ttc" id="agroup__kv_group_html_ga5aa57345313cee85b020e50c22023fb5"><div class="ttname"><a href="group__kv_group.html#ga5aa57345313cee85b020e50c22023fb5">kvStore_History</a></div><div class="ttdeci">NATS_EXTERN natsStatus kvStore_History(kvEntryList *list, kvStore *kv, const char *key, kvWatchOptions *opts)</div><div class="ttdoc">Returns all historical entries for the key.</div></div>
+<div class="ttc" id="agroup__kv_group_html_ga6030fc2a672ae868f7603587245b9d5a"><div class="ttname"><a href="group__kv_group.html#ga6030fc2a672ae868f7603587245b9d5a">kvStore_Keys</a></div><div class="ttdeci">NATS_EXTERN natsStatus kvStore_Keys(kvKeysList *list, kvStore *kv, kvWatchOptions *opts)</div><div class="ttdoc">Returns all keys in the bucket.</div></div>
+<div class="ttc" id="agroup__kv_group_html_ga68101d46739ca894fd7c56c8661c08d8"><div class="ttname"><a href="group__kv_group.html#ga68101d46739ca894fd7c56c8661c08d8">kvStore_Delete</a></div><div class="ttdeci">NATS_EXTERN natsStatus kvStore_Delete(kvStore *kv, const char *key)</div><div class="ttdoc">Deletes a key by placing a delete marker and leaving all revisions.</div></div>
+<div class="ttc" id="agroup__kv_group_html_ga762fd5de8cde683e46a6736a51e575f5"><div class="ttname"><a href="group__kv_group.html#ga762fd5de8cde683e46a6736a51e575f5">kvWatchOptions_Init</a></div><div class="ttdeci">NATS_EXTERN natsStatus kvWatchOptions_Init(kvWatchOptions *opts)</div><div class="ttdoc">Initializes a KeyValue watcher options structure.</div></div>
+<div class="ttc" id="agroup__kv_group_html_ga84ebd66a95ce857765d4a16ec35daba9"><div class="ttname"><a href="group__kv_group.html#ga84ebd66a95ce857765d4a16ec35daba9">kvStore_PutString</a></div><div class="ttdeci">NATS_EXTERN natsStatus kvStore_PutString(uint64_t *rev, kvStore *kv, const char *key, const char *data)</div><div class="ttdoc">Places the new value (as a string) for the key into the store.</div></div>
+<div class="ttc" id="agroup__kv_group_html_ga9bf43431bb8264a3ea1f0df401afbe1a"><div class="ttname"><a href="group__kv_group.html#ga9bf43431bb8264a3ea1f0df401afbe1a">kvStore_GetRevision</a></div><div class="ttdeci">NATS_EXTERN natsStatus kvStore_GetRevision(kvEntry **new_entry, kvStore *kv, const char *key, uint64_t revision)</div><div class="ttdoc">Returns the entry at the specific revision for the key.</div></div>
+<div class="ttc" id="agroup__kv_group_html_gad28fdf9aae16bba308cda799fca13281"><div class="ttname"><a href="group__kv_group.html#gad28fdf9aae16bba308cda799fca13281">kvStore_Bucket</a></div><div class="ttdeci">NATS_EXTERN const char * kvStore_Bucket(kvStore *kv)</div><div class="ttdoc">Returns the bucket name of this KeyValue store object.</div></div>
+<div class="ttc" id="agroup__kv_group_html_gadf75e99cc28bc9c2d6eac7c9f7398c27"><div class="ttname"><a href="group__kv_group.html#gadf75e99cc28bc9c2d6eac7c9f7398c27">kvStore_Status</a></div><div class="ttdeci">NATS_EXTERN natsStatus kvStore_Status(kvStatus **new_status, kvStore *kv)</div><div class="ttdoc">Returns the status and configuration of a bucket.</div></div>
+<div class="ttc" id="agroup__kv_group_html_gae0c593bb2ef94ae60e775617c9423038"><div class="ttname"><a href="group__kv_group.html#gae0c593bb2ef94ae60e775617c9423038">kvStore_Update</a></div><div class="ttdeci">NATS_EXTERN natsStatus kvStore_Update(uint64_t *rev, kvStore *kv, const char *key, const void *data, int len, uint64_t last)</div><div class="ttdoc">Updates the value for the key into the store if and only if the latest revision matches.</div></div>
+<div class="ttc" id="agroup__kv_group_html_gae783352ab81e22aa3173057d117518e6"><div class="ttname"><a href="group__kv_group.html#gae783352ab81e22aa3173057d117518e6">kvEntryList_Destroy</a></div><div class="ttdeci">NATS_EXTERN void kvEntryList_Destroy(kvEntryList *list)</div><div class="ttdoc">Destroys this list of KeyValue store entries.</div></div>
+<div class="ttc" id="agroup__kv_group_html_gaf011f1dd6813391c65664e982747602e"><div class="ttname"><a href="group__kv_group.html#gaf011f1dd6813391c65664e982747602e">kvStore_WatchAll</a></div><div class="ttdeci">NATS_EXTERN natsStatus kvStore_WatchAll(kvWatcher **new_watcher, kvStore *kv, kvWatchOptions *opts)</div><div class="ttdoc">Returns a watcher for any updates to any keys of the KeyValue store bucket.</div></div>
+<div class="ttc" id="agroup__kv_group_mgt_html_ga16d4c27d8ac62bb86ba601bc40f53172"><div class="ttname"><a href="group__kv_group_mgt.html#ga16d4c27d8ac62bb86ba601bc40f53172">kvConfig_Init</a></div><div class="ttdeci">NATS_EXTERN natsStatus kvConfig_Init(kvConfig *cfg)</div><div class="ttdoc">Initializes a KeyValue configuration structure.</div></div>
+<div class="ttc" id="agroup__kv_group_mgt_html_ga54e6c109a7c633e431b3eded286e00f6"><div class="ttname"><a href="group__kv_group_mgt.html#ga54e6c109a7c633e431b3eded286e00f6">js_KeyValue</a></div><div class="ttdeci">NATS_EXTERN natsStatus js_KeyValue(kvStore **new_kv, jsCtx *js, const char *bucket)</div><div class="ttdoc">Looks-up and binds to an existing KeyValue store.</div></div>
+<div class="ttc" id="agroup__kv_group_mgt_html_ga6bc715319560bc28359679fcdcead937"><div class="ttname"><a href="group__kv_group_mgt.html#ga6bc715319560bc28359679fcdcead937">js_DeleteKeyValue</a></div><div class="ttdeci">NATS_EXTERN natsStatus js_DeleteKeyValue(jsCtx *js, const char *bucket)</div><div class="ttdoc">Deletes a KeyValue store.</div></div>
+<div class="ttc" id="agroup__kv_group_mgt_html_gab0d6bdbfabd27af67eaeb36cec0787da"><div class="ttname"><a href="group__kv_group_mgt.html#gab0d6bdbfabd27af67eaeb36cec0787da">kvStore_Destroy</a></div><div class="ttdeci">NATS_EXTERN void kvStore_Destroy(kvStore *kv)</div><div class="ttdoc">Destroys a KeyValue store object.</div></div>
+<div class="ttc" id="agroup__kv_group_mgt_html_gabc445bfe87112e56a6c73872fec6893e"><div class="ttname"><a href="group__kv_group_mgt.html#gabc445bfe87112e56a6c73872fec6893e">js_CreateKeyValue</a></div><div class="ttdeci">NATS_EXTERN natsStatus js_CreateKeyValue(kvStore **new_kv, jsCtx *js, kvConfig *cfg)</div><div class="ttdoc">Creates a KeyValue store with a given configuration.</div></div>
+<div class="ttc" id="agroup__kv_status_html_ga1acec36db32207f21e15afc26bb5af1c"><div class="ttname"><a href="group__kv_status.html#ga1acec36db32207f21e15afc26bb5af1c">kvStatus_Bucket</a></div><div class="ttdeci">NATS_EXTERN const char * kvStatus_Bucket(kvStatus *sts)</div><div class="ttdoc">Returns the bucket name.</div></div>
+<div class="ttc" id="agroup__kv_status_html_ga2016af3c73841d8b226361e764dce158"><div class="ttname"><a href="group__kv_status.html#ga2016af3c73841d8b226361e764dce158">kvStatus_Values</a></div><div class="ttdeci">NATS_EXTERN uint64_t kvStatus_Values(kvStatus *sts)</div><div class="ttdoc">Returns how many messages are in the bucket, including historical values.</div></div>
+<div class="ttc" id="agroup__kv_status_html_ga5eb3d824c1873af705beee4798246a08"><div class="ttname"><a href="group__kv_status.html#ga5eb3d824c1873af705beee4798246a08">kvStatus_Destroy</a></div><div class="ttdeci">NATS_EXTERN void kvStatus_Destroy(kvStatus *sts)</div><div class="ttdoc">Destroys the KeyValue status object.</div></div>
+<div class="ttc" id="agroup__kv_status_html_ga86b114f4dac9f06df86101f84bd497b2"><div class="ttname"><a href="group__kv_status.html#ga86b114f4dac9f06df86101f84bd497b2">kvStatus_Replicas</a></div><div class="ttdeci">NATS_EXTERN int64_t kvStatus_Replicas(kvStatus *sts)</div><div class="ttdoc">Returns the number of replicas to keep for a bucket.</div></div>
+<div class="ttc" id="agroup__kv_status_html_gaa747ad0a6182ec7a47fb47018c33d1c1"><div class="ttname"><a href="group__kv_status.html#gaa747ad0a6182ec7a47fb47018c33d1c1">kvStatus_TTL</a></div><div class="ttdeci">NATS_EXTERN int64_t kvStatus_TTL(kvStatus *sts)</div><div class="ttdoc">Returns how long the bucket keeps values for.</div></div>
+<div class="ttc" id="agroup__kv_status_html_gada6f22b5659b184762cea4f45d369ee5"><div class="ttname"><a href="group__kv_status.html#gada6f22b5659b184762cea4f45d369ee5">kvStatus_History</a></div><div class="ttdeci">NATS_EXTERN int64_t kvStatus_History(kvStatus *sts)</div><div class="ttdoc">Returns the configured history kept per key.</div></div>
+<div class="ttc" id="agroup__kv_watcher_html_ga21bc39fa795f7c4f392bd6d4e66ea1d9"><div class="ttname"><a href="group__kv_watcher.html#ga21bc39fa795f7c4f392bd6d4e66ea1d9">kvWatcher_Destroy</a></div><div class="ttdeci">NATS_EXTERN void kvWatcher_Destroy(kvWatcher *w)</div><div class="ttdoc">Destroys the KeyValue watcher object.</div></div>
+<div class="ttc" id="agroup__kv_watcher_html_ga562c216a0199c30455af4c2da46000e5"><div class="ttname"><a href="group__kv_watcher.html#ga562c216a0199c30455af4c2da46000e5">kvWatcher_Next</a></div><div class="ttdeci">NATS_EXTERN natsStatus kvWatcher_Next(kvEntry **new_entry, kvWatcher *w, int64_t timeout)</div><div class="ttdoc">Returns the next entry for this watcher.</div></div>
+<div class="ttc" id="agroup__kv_watcher_html_ga73adf44114fedd62ef75ebd81839b65e"><div class="ttname"><a href="group__kv_watcher.html#ga73adf44114fedd62ef75ebd81839b65e">kvWatcher_Stop</a></div><div class="ttdeci">NATS_EXTERN natsStatus kvWatcher_Stop(kvWatcher *w)</div><div class="ttdoc">Stops the watcher.</div></div>
+<div class="ttc" id="agroup__library_group_html_ga0d8c3df1c0c4a3d340d8ff81355fb1e8"><div class="ttname"><a href="group__library_group.html#ga0d8c3df1c0c4a3d340d8ff81355fb1e8">nats_GetVersion</a></div><div class="ttdeci">NATS_EXTERN const char * nats_GetVersion(void)</div><div class="ttdoc">Returns the Library's version.</div></div>
+<div class="ttc" id="agroup__library_group_html_ga4a26d4caecb23348f6eee862c95fee7d"><div class="ttname"><a href="group__library_group.html#ga4a26d4caecb23348f6eee862c95fee7d">nats_Open</a></div><div class="ttdeci">NATS_EXTERN natsStatus nats_Open(int64_t lockSpinCount)</div><div class="ttdoc">Initializes the library.</div></div>
+<div class="ttc" id="agroup__library_group_html_ga5fab3b18c4fe3630254483575f6066f4"><div class="ttname"><a href="group__library_group.html#ga5fab3b18c4fe3630254483575f6066f4">nats_PrintLastErrorStack</a></div><div class="ttdeci">NATS_EXTERN void nats_PrintLastErrorStack(FILE *file)</div><div class="ttdoc">Prints the calling thread's last known error stack into the file.</div></div>
+<div class="ttc" id="agroup__library_group_html_ga5fbbaa19b0290b654d2669a05bd512e8"><div class="ttname"><a href="group__library_group.html#ga5fbbaa19b0290b654d2669a05bd512e8">nats_GetVersionNumber</a></div><div class="ttdeci">NATS_EXTERN uint32_t nats_GetVersionNumber(void)</div><div class="ttdoc">Returns the Library's version as a number.</div></div>
+<div class="ttc" id="agroup__library_group_html_ga8c2ad4df801bd9d11564587ed3a7081e"><div class="ttname"><a href="group__library_group.html#ga8c2ad4df801bd9d11564587ed3a7081e">nats_CheckCompatibility</a></div><div class="ttdeci">NATS_EXTERN bool nats_CheckCompatibility(void)</div><div class="ttdoc">Check that the header is compatible with the library.</div></div>
+<div class="ttc" id="agroup__library_group_html_gaa3c10ba3ae001595007ad0dc5dccc15e"><div class="ttname"><a href="group__library_group.html#gaa3c10ba3ae001595007ad0dc5dccc15e">nats_Now</a></div><div class="ttdeci">NATS_EXTERN int64_t nats_Now(void)</div><div class="ttdoc">Gives the current time in milliseconds.</div></div>
+<div class="ttc" id="agroup__library_group_html_gab21e94ce7a7d226611ea2c05914cf19d"><div class="ttname"><a href="group__library_group.html#gab21e94ce7a7d226611ea2c05914cf19d">nats_SetMessageDeliveryPoolSize</a></div><div class="ttdeci">NATS_EXTERN natsStatus nats_SetMessageDeliveryPoolSize(int max)</div><div class="ttdoc">Sets the maximum size of the global message delivery thread pool.</div></div>
+<div class="ttc" id="agroup__library_group_html_gaca24172e1b97ca01cee29ca437f5702e"><div class="ttname"><a href="group__library_group.html#gaca24172e1b97ca01cee29ca437f5702e">nats_GetLastErrorStack</a></div><div class="ttdeci">NATS_EXTERN natsStatus nats_GetLastErrorStack(char *buffer, size_t bufLen)</div><div class="ttdoc">Returns the calling thread's last known error stack.</div></div>
+<div class="ttc" id="agroup__library_group_html_gacf5e423920d6a647df3bbf7de39d5223"><div class="ttname"><a href="group__library_group.html#gacf5e423920d6a647df3bbf7de39d5223">nats_NowInNanoSeconds</a></div><div class="ttdeci">NATS_EXTERN int64_t nats_NowInNanoSeconds(void)</div><div class="ttdoc">Gives the current time in nanoseconds.</div></div>
+<div class="ttc" id="agroup__library_group_html_gad5040264cd4b1404956babf3c03a4f09"><div class="ttname"><a href="group__library_group.html#gad5040264cd4b1404956babf3c03a4f09">nats_Sleep</a></div><div class="ttdeci">NATS_EXTERN void nats_Sleep(int64_t sleepTime)</div><div class="ttdoc">Sleeps for a given number of milliseconds.</div></div>
+<div class="ttc" id="agroup__library_group_html_gadecfd49a58b581dbba40da77b195fd85"><div class="ttname"><a href="group__library_group.html#gadecfd49a58b581dbba40da77b195fd85">nats_GetLastError</a></div><div class="ttdeci">NATS_EXTERN const char * nats_GetLastError(natsStatus *status)</div><div class="ttdoc">Returns the calling thread's last known error.</div></div>
+<div class="ttc" id="agroup__library_group_html_gae75131e0ce4e5b89d0f82ea7892f112e"><div class="ttname"><a href="group__library_group.html#gae75131e0ce4e5b89d0f82ea7892f112e">nats_Close</a></div><div class="ttdeci">NATS_EXTERN void nats_Close(void)</div><div class="ttdoc">Tear down the library.</div></div>
+<div class="ttc" id="agroup__library_group_html_gaf75bb5b38bf32e6a8f43e54068625903"><div class="ttname"><a href="group__library_group.html#gaf75bb5b38bf32e6a8f43e54068625903">nats_CloseAndWait</a></div><div class="ttdeci">NATS_EXTERN natsStatus nats_CloseAndWait(int64_t timeout)</div><div class="ttdoc">Tear down the library and wait for all resources to be released.</div></div>
+<div class="ttc" id="agroup__library_group_html_gaf781f246e2e0ab24623ca667c48dc3ba"><div class="ttname"><a href="group__library_group.html#gaf781f246e2e0ab24623ca667c48dc3ba">nats_Sign</a></div><div class="ttdeci">NATS_EXTERN natsStatus nats_Sign(const char *encodedSeed, const char *input, unsigned char **signature, int *signatureLength)</div><div class="ttdoc">Signs a given text using the provided private key.</div></div>
+<div class="ttc" id="agroup__library_group_html_gafe171baefa00a85b77205116e9f3e48a"><div class="ttname"><a href="group__library_group.html#gafe171baefa00a85b77205116e9f3e48a">nats_ReleaseThreadMemory</a></div><div class="ttdeci">NATS_EXTERN void nats_ReleaseThreadMemory(void)</div><div class="ttdoc">Release thread-local memory possibly allocated by the library.</div></div>
+<div class="ttc" id="agroup__msg_group_html_ga098e4fec1c5a71c00a0d092fbd6d1a21"><div class="ttname"><a href="group__msg_group.html#ga098e4fec1c5a71c00a0d092fbd6d1a21">natsMsg_Create</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsMsg_Create(natsMsg **newMsg, const char *subj, const char *reply, const char *data, int dataLen)</div><div class="ttdoc">Creates a natsMsg object.</div></div>
+<div class="ttc" id="agroup__msg_group_html_ga1a091d24f939d881bf04fba78b8995c2"><div class="ttname"><a href="group__msg_group.html#ga1a091d24f939d881bf04fba78b8995c2">natsMsgList_Destroy</a></div><div class="ttdeci">NATS_EXTERN void natsMsgList_Destroy(natsMsgList *list)</div><div class="ttdoc">Destroys this list of messages.</div></div>
+<div class="ttc" id="agroup__msg_group_html_ga25b69066ae50287e178aaf4f70f7d3de"><div class="ttname"><a href="group__msg_group.html#ga25b69066ae50287e178aaf4f70f7d3de">natsMsg_GetDataLength</a></div><div class="ttdeci">NATS_EXTERN int natsMsg_GetDataLength(const natsMsg *msg)</div><div class="ttdoc">Returns the message length.</div></div>
+<div class="ttc" id="agroup__msg_group_html_ga2b641ec3b1745604d7de1102e472254b"><div class="ttname"><a href="group__msg_group.html#ga2b641ec3b1745604d7de1102e472254b">natsMsgHeader_Add</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsMsgHeader_Add(natsMsg *msg, const char *key, const char *value)</div><div class="ttdoc">Add value to the header associated with key.</div></div>
+<div class="ttc" id="agroup__msg_group_html_ga43aa4a8e4b93725b4876ee2677e19c7b"><div class="ttname"><a href="group__msg_group.html#ga43aa4a8e4b93725b4876ee2677e19c7b">natsMsg_IsNoResponders</a></div><div class="ttdeci">NATS_EXTERN bool natsMsg_IsNoResponders(natsMsg *msg)</div><div class="ttdoc">Indicates if this message is a &quot;no responders&quot; message from the server.</div></div>
+<div class="ttc" id="agroup__msg_group_html_ga523364451fd92534e754054266196e59"><div class="ttname"><a href="group__msg_group.html#ga523364451fd92534e754054266196e59">natsMsg_GetData</a></div><div class="ttdeci">NATS_EXTERN const char * natsMsg_GetData(const natsMsg *msg)</div><div class="ttdoc">Returns the message payload.</div></div>
+<div class="ttc" id="agroup__msg_group_html_ga6ee8a007111ada293dd24ff0bab02491"><div class="ttname"><a href="group__msg_group.html#ga6ee8a007111ada293dd24ff0bab02491">natsMsgHeader_Keys</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsMsgHeader_Keys(natsMsg *msg, const char ***keys, int *count)</div><div class="ttdoc">Get all header keys.</div></div>
+<div class="ttc" id="agroup__msg_group_html_ga880535362c91b3e405792aa66ff945b6"><div class="ttname"><a href="group__msg_group.html#ga880535362c91b3e405792aa66ff945b6">natsMsg_GetReply</a></div><div class="ttdeci">NATS_EXTERN const char * natsMsg_GetReply(const natsMsg *msg)</div><div class="ttdoc">Returns the reply set in this message.</div></div>
+<div class="ttc" id="agroup__msg_group_html_ga9e9590018284939f43f60964283f33ae"><div class="ttname"><a href="group__msg_group.html#ga9e9590018284939f43f60964283f33ae">natsMsg_Destroy</a></div><div class="ttdeci">NATS_EXTERN void natsMsg_Destroy(natsMsg *msg)</div><div class="ttdoc">Destroys the message object.</div></div>
+<div class="ttc" id="agroup__msg_group_html_gab3349f0b0ce721b340d5c0753c90ee18"><div class="ttname"><a href="group__msg_group.html#gab3349f0b0ce721b340d5c0753c90ee18">natsMsgHeader_Get</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsMsgHeader_Get(natsMsg *msg, const char *key, const char **value)</div><div class="ttdoc">Get the header entry associated with key.</div></div>
+<div class="ttc" id="agroup__msg_group_html_gac78ca02dc93d05cae837ced6386408f1"><div class="ttname"><a href="group__msg_group.html#gac78ca02dc93d05cae837ced6386408f1">natsMsgHeader_Delete</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsMsgHeader_Delete(natsMsg *msg, const char *key)</div><div class="ttdoc">Delete the value(s) associated with key.</div></div>
+<div class="ttc" id="agroup__msg_group_html_gad7cad38946648e3047aa0665a3dd230a"><div class="ttname"><a href="group__msg_group.html#gad7cad38946648e3047aa0665a3dd230a">natsMsg_GetSubject</a></div><div class="ttdeci">NATS_EXTERN const char * natsMsg_GetSubject(const natsMsg *msg)</div><div class="ttdoc">Returns the subject set in this message.</div></div>
+<div class="ttc" id="agroup__msg_group_html_gae1ce9c9d82d151a3ea9dc03da048f66f"><div class="ttname"><a href="group__msg_group.html#gae1ce9c9d82d151a3ea9dc03da048f66f">natsMsgHeader_Values</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsMsgHeader_Values(natsMsg *msg, const char *key, const char ***values, int *count)</div><div class="ttdoc">Get all header values associated with key.</div></div>
+<div class="ttc" id="agroup__msg_group_html_gaf30b47d4217c9335919f05536e379af8"><div class="ttname"><a href="group__msg_group.html#gaf30b47d4217c9335919f05536e379af8">natsMsgHeader_Set</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsMsgHeader_Set(natsMsg *msg, const char *key, const char *value)</div><div class="ttdoc">Set the header entries associated with key to the single element value.</div></div>
+<div class="ttc" id="agroup__opts_group_html_ga0290eac4665569c850468d9f00e246a0"><div class="ttname"><a href="group__opts_group.html#ga0290eac4665569c850468d9f00e246a0">natsOptions_SetNKey</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetNKey(natsOptions *opts, const char *pubKey, natsSignatureHandler sigCB, void *sigClosure)</div><div class="ttdoc">Sets the NKey public key and signature callback.</div></div>
+<div class="ttc" id="agroup__opts_group_html_ga0ba43ba9930df385e4781b12be9f2851"><div class="ttname"><a href="group__opts_group.html#ga0ba43ba9930df385e4781b12be9f2851">natsOptions_SetExpectedHostname</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetExpectedHostname(natsOptions *opts, const char *hostname)</div><div class="ttdoc">Sets the server certificate's expected hostname.</div></div>
+<div class="ttc" id="agroup__opts_group_html_ga127ec7a8196b453947a7fa9a64096cbd"><div class="ttname"><a href="group__opts_group.html#ga127ec7a8196b453947a7fa9a64096cbd">natsOptions_SetErrorHandler</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetErrorHandler(natsOptions *opts, natsErrHandler errHandler, void *closure)</div><div class="ttdoc">Sets the error handler for asynchronous events.</div></div>
+<div class="ttc" id="agroup__opts_group_html_ga17cd7fe41176cd98aca1184fa9352ad9"><div class="ttname"><a href="group__opts_group.html#ga17cd7fe41176cd98aca1184fa9352ad9">natsOptions_SetTimeout</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetTimeout(natsOptions *opts, int64_t timeout)</div><div class="ttdoc">Sets the (re)connect process timeout.</div></div>
+<div class="ttc" id="agroup__opts_group_html_ga192465163abb87ad48a843b45cdf9984"><div class="ttname"><a href="group__opts_group.html#ga192465163abb87ad48a843b45cdf9984">natsOptions_DisableNoResponders</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_DisableNoResponders(natsOptions *opts, bool disabled)</div><div class="ttdoc">Enable/Disable the &quot;no responders&quot; feature.</div></div>
+<div class="ttc" id="agroup__opts_group_html_ga1a3e3abfd7ddd8aff247df8f332bbda3"><div class="ttname"><a href="group__opts_group.html#ga1a3e3abfd7ddd8aff247df8f332bbda3">natsOptions_SetIOBufSize</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetIOBufSize(natsOptions *opts, int ioBufSize)</div><div class="ttdoc">Sets the size of the internal read/write buffers.</div></div>
+<div class="ttc" id="agroup__opts_group_html_ga1c529d347be0fe2eec17c7f4698e283e"><div class="ttname"><a href="group__opts_group.html#ga1c529d347be0fe2eec17c7f4698e283e">natsOptions_SetName</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetName(natsOptions *opts, const char *name)</div><div class="ttdoc">Sets the name.</div></div>
+<div class="ttc" id="agroup__opts_group_html_ga20946800d024b7089e73d63454d1c19f"><div class="ttname"><a href="group__opts_group.html#ga20946800d024b7089e73d63454d1c19f">natsOptions_SetRetryOnFailedConnect</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetRetryOnFailedConnect(natsOptions *opts, bool retry, natsConnectionHandler connectedCb, void *closure)</div><div class="ttdoc">Indicates if initial connect failure should be retried or not.</div></div>
+<div class="ttc" id="agroup__opts_group_html_ga23a3b1f022112e98ddccb18b247b4426"><div class="ttname"><a href="group__opts_group.html#ga23a3b1f022112e98ddccb18b247b4426">natsOptions_SetTokenHandler</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetTokenHandler(natsOptions *opts, natsTokenHandler tokenCb, void *closure)</div><div class="ttdoc">Sets the tokenCb to use whenever a token is needed.</div></div>
+<div class="ttc" id="agroup__opts_group_html_ga26a48c8529fffa5f5d1a61c030979980"><div class="ttname"><a href="group__opts_group.html#ga26a48c8529fffa5f5d1a61c030979980">natsOptions_SetReconnectedCB</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetReconnectedCB(natsOptions *opts, natsConnectionHandler reconnectedCb, void *closure)</div><div class="ttdoc">Sets the callback to be invoked when the connection has reconnected.</div></div>
+<div class="ttc" id="agroup__opts_group_html_ga26f166af20de98bec67bc6cc916f769e"><div class="ttname"><a href="group__opts_group.html#ga26f166af20de98bec67bc6cc916f769e">natsOptions_SetPedantic</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetPedantic(natsOptions *opts, bool pedantic)</div><div class="ttdoc">Sets the pedantic mode.</div></div>
+<div class="ttc" id="agroup__opts_group_html_ga2730f4e16e318a2ef8de98dbf6ede807"><div class="ttname"><a href="group__opts_group.html#ga2730f4e16e318a2ef8de98dbf6ede807">natsOptions_SetReconnectWait</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetReconnectWait(natsOptions *opts, int64_t reconnectWait)</div><div class="ttdoc">Sets the time between reconnect attempts.</div></div>
+<div class="ttc" id="agroup__opts_group_html_ga2b7f144b011d8ce62941b608a8f324f0"><div class="ttname"><a href="group__opts_group.html#ga2b7f144b011d8ce62941b608a8f324f0">natsOptions_SetCipherSuites</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetCipherSuites(natsOptions *opts, const char *ciphers)</div><div class="ttdoc">Sets the list of available ciphers for TLSv1.3.</div></div>
+<div class="ttc" id="agroup__opts_group_html_ga2cd6563694a439b3949a31fd81103099"><div class="ttname"><a href="group__opts_group.html#ga2cd6563694a439b3949a31fd81103099">natsOptions_LoadCATrustedCertificates</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_LoadCATrustedCertificates(natsOptions *opts, const char *fileName)</div><div class="ttdoc">Loads the trusted CA certificates from a file.</div></div>
+<div class="ttc" id="agroup__opts_group_html_ga3593165aa113d6736e0226ddc56b3e9d"><div class="ttname"><a href="group__opts_group.html#ga3593165aa113d6736e0226ddc56b3e9d">natsOptions_SetCustomReconnectDelay</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetCustomReconnectDelay(natsOptions *opts, natsCustomReconnectDelayHandler cb, void *closure)</div><div class="ttdoc">Sets the handler to invoke when the library needs to wait before the next reconnect attempts.</div></div>
+<div class="ttc" id="agroup__opts_group_html_ga36943e2ba53d05407cdabc4e7e96484b"><div class="ttname"><a href="group__opts_group.html#ga36943e2ba53d05407cdabc4e7e96484b">natsOptions_LoadCertificatesChain</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_LoadCertificatesChain(natsOptions *opts, const char *certsFileName, const char *keyFileName)</div><div class="ttdoc">Loads the certificate chain from a file, using the given key.</div></div>
+<div class="ttc" id="agroup__opts_group_html_ga3d1d3cb2f2a0e23d27dd60e96d1cc91b"><div class="ttname"><a href="group__opts_group.html#ga3d1d3cb2f2a0e23d27dd60e96d1cc91b">natsOptions_SetAllowReconnect</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetAllowReconnect(natsOptions *opts, bool allow)</div><div class="ttdoc">Indicates if the connection will be allowed to reconnect.</div></div>
+<div class="ttc" id="agroup__opts_group_html_ga3f7e760214417c7d87541ecb9ab5bea5"><div class="ttname"><a href="group__opts_group.html#ga3f7e760214417c7d87541ecb9ab5bea5">natsOptions_SetURL</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetURL(natsOptions *opts, const char *url)</div><div class="ttdoc">Sets the URL to connect to.</div></div>
+<div class="ttc" id="agroup__opts_group_html_ga44410242e73134e5bb51ef27904a9253"><div class="ttname"><a href="group__opts_group.html#ga44410242e73134e5bb51ef27904a9253">natsOptions_SetClosedCB</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetClosedCB(natsOptions *opts, natsConnectionHandler closedCb, void *closure)</div><div class="ttdoc">Sets the callback to be invoked when a connection to a server is permanently lost.</div></div>
+<div class="ttc" id="agroup__opts_group_html_ga4f694b87039cedaa65cd25656b14d1a3"><div class="ttname"><a href="group__opts_group.html#ga4f694b87039cedaa65cd25656b14d1a3">natsOptions_SetNoEcho</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetNoEcho(natsOptions *opts, bool noEcho)</div><div class="ttdoc">Sets if connection receives its own messages.</div></div>
+<div class="ttc" id="agroup__opts_group_html_ga54dea2ffeb33779771652a7a14fc4adc"><div class="ttname"><a href="group__opts_group.html#ga54dea2ffeb33779771652a7a14fc4adc">natsOptions_SetLameDuckModeCB</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetLameDuckModeCB(natsOptions *opts, natsConnectionHandler lameDuckCb, void *closure)</div><div class="ttdoc">Sets the callback to be invoked when server enters lame duck mode.</div></div>
+<div class="ttc" id="agroup__opts_group_html_ga5698f020e8eb3e7440eb073fe08ef62c"><div class="ttname"><a href="group__opts_group.html#ga5698f020e8eb3e7440eb073fe08ef62c">natsOptions_SetCiphers</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetCiphers(natsOptions *opts, const char *ciphers)</div><div class="ttdoc">Sets the list of available ciphers.</div></div>
+<div class="ttc" id="agroup__opts_group_html_ga59b47f7b7a19085cf8eaada9bfe5606e"><div class="ttname"><a href="group__opts_group.html#ga59b47f7b7a19085cf8eaada9bfe5606e">natsOptions_SetUserCredentialsFromFiles</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetUserCredentialsFromFiles(natsOptions *opts, const char *userOrChainedFile, const char *seedFile)</div><div class="ttdoc">Sets the file(s) to use to fetch user JWT and seed required to sign nonce.</div></div>
+<div class="ttc" id="agroup__opts_group_html_ga5b99da7dd74aac3be962f323c3863d9e"><div class="ttname"><a href="group__opts_group.html#ga5b99da7dd74aac3be962f323c3863d9e">natsOptions_SetUserInfo</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetUserInfo(natsOptions *opts, const char *user, const char *password)</div><div class="ttdoc">Sets the user name/password to use when not specified in the URL.</div></div>
+<div class="ttc" id="agroup__opts_group_html_ga60117450fc1f7b6f81bab455aeed7515"><div class="ttname"><a href="group__opts_group.html#ga60117450fc1f7b6f81bab455aeed7515">natsOptions_SetUserCredentialsCallbacks</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetUserCredentialsCallbacks(natsOptions *opts, natsUserJWTHandler ujwtCB, void *ujwtClosure, natsSignatureHandler sigCB, void *sigClosure)</div><div class="ttdoc">Sets the callbacks to fetch user JWT and sign server's nonce.</div></div>
+<div class="ttc" id="agroup__opts_group_html_ga61d4a0cf2fbf7d13cc910e5a00c575be"><div class="ttname"><a href="group__opts_group.html#ga61d4a0cf2fbf7d13cc910e5a00c575be">natsOptions_Create</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_Create(natsOptions **newOpts)</div><div class="ttdoc">Creates a natsOptions object.</div></div>
+<div class="ttc" id="agroup__opts_group_html_ga696f02e0493c00d3c1eafff45b62b68e"><div class="ttname"><a href="group__opts_group.html#ga696f02e0493c00d3c1eafff45b62b68e">natsOptions_SetNKeyFromSeed</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetNKeyFromSeed(natsOptions *opts, const char *pubKey, const char *seedFile)</div><div class="ttdoc">Sets the NKey public key and its seed file.</div></div>
+<div class="ttc" id="agroup__opts_group_html_ga6f804ec44adc299989fe623570679da3"><div class="ttname"><a href="group__opts_group.html#ga6f804ec44adc299989fe623570679da3">natsOptions_SkipServerVerification</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SkipServerVerification(natsOptions *opts, bool skip)</div><div class="ttdoc">Switch server certificate verification.</div></div>
+<div class="ttc" id="agroup__opts_group_html_ga70aa85319933d78c0076cc862fa3e5a6"><div class="ttname"><a href="group__opts_group.html#ga70aa85319933d78c0076cc862fa3e5a6">natsOptions_UseOldRequestStyle</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_UseOldRequestStyle(natsOptions *opts, bool useOldStyle)</div><div class="ttdoc">Switches the use of old style requests.</div></div>
+<div class="ttc" id="agroup__opts_group_html_ga7ca713c7532eff4d41a492e95b8822cf"><div class="ttname"><a href="group__opts_group.html#ga7ca713c7532eff4d41a492e95b8822cf">natsOptions_IPResolutionOrder</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_IPResolutionOrder(natsOptions *opts, int order)</div><div class="ttdoc">Dictates the order in which host name are resolved during connect.</div></div>
+<div class="ttc" id="agroup__opts_group_html_ga7e4172084520708b8c9f28e73174461c"><div class="ttname"><a href="group__opts_group.html#ga7e4172084520708b8c9f28e73174461c">natsOptions_SetIgnoreDiscoveredServers</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetIgnoreDiscoveredServers(natsOptions *opts, bool ignore)</div><div class="ttdoc">Sets if the library should ignore or not discovered servers.</div></div>
+<div class="ttc" id="agroup__opts_group_html_ga8f06568cc3319a5a0eef9f80282034ca"><div class="ttname"><a href="group__opts_group.html#ga8f06568cc3319a5a0eef9f80282034ca">natsOptions_SetSendAsap</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetSendAsap(natsOptions *opts, bool sendAsap)</div><div class="ttdoc">Sets if Publish calls should send data right away.</div></div>
+<div class="ttc" id="agroup__opts_group_html_ga8f3df57ed8ae418d3ae6678ae5e2a5d2"><div class="ttname"><a href="group__opts_group.html#ga8f3df57ed8ae418d3ae6678ae5e2a5d2">natsOptions_SetReconnectJitter</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetReconnectJitter(natsOptions *opts, int64_t jitter, int64_t jitterTLS)</div><div class="ttdoc">Set the upper bound of a random delay added to reconnect wait.</div></div>
+<div class="ttc" id="agroup__opts_group_html_ga93d8068cd6fff53b7f8e1c403db45eb9"><div class="ttname"><a href="group__opts_group.html#ga93d8068cd6fff53b7f8e1c403db45eb9">natsOptions_Destroy</a></div><div class="ttdeci">NATS_EXTERN void natsOptions_Destroy(natsOptions *opts)</div><div class="ttdoc">Destroys a natsOptions object.</div></div>
+<div class="ttc" id="agroup__opts_group_html_ga95510436eee06f9992ded96a44795c40"><div class="ttname"><a href="group__opts_group.html#ga95510436eee06f9992ded96a44795c40">natsOptions_SetMaxPendingMsgs</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetMaxPendingMsgs(natsOptions *opts, int maxPending)</div><div class="ttdoc">Sets the maximum number of pending messages per subscription.</div></div>
+<div class="ttc" id="agroup__opts_group_html_gaa0d4b7ece8477cb9879f0dafff3456a5"><div class="ttname"><a href="group__opts_group.html#gaa0d4b7ece8477cb9879f0dafff3456a5">natsOptions_SetReconnectBufSize</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetReconnectBufSize(natsOptions *opts, int reconnectBufSize)</div><div class="ttdoc">Sets the size of the backing buffer used during reconnect.</div></div>
+<div class="ttc" id="agroup__opts_group_html_gaa16bfd09ef318af18c27a0e199681b69"><div class="ttname"><a href="group__opts_group.html#gaa16bfd09ef318af18c27a0e199681b69">natsOptions_SetVerbose</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetVerbose(natsOptions *opts, bool verbose)</div><div class="ttdoc">Sets the verbose mode.</div></div>
+<div class="ttc" id="agroup__opts_group_html_gaa1f09416d443fa7a6af6b695da563eba"><div class="ttname"><a href="group__opts_group.html#gaa1f09416d443fa7a6af6b695da563eba">natsOptions_SetSecure</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetSecure(natsOptions *opts, bool secure)</div><div class="ttdoc">Sets the secure mode.</div></div>
+<div class="ttc" id="agroup__opts_group_html_gaabf8763b931dcf389c83fd95d760a413"><div class="ttname"><a href="group__opts_group.html#gaabf8763b931dcf389c83fd95d760a413">natsOptions_SetNoRandomize</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetNoRandomize(natsOptions *opts, bool noRandomize)</div><div class="ttdoc">Indicate if the servers list should be randomized.</div></div>
+<div class="ttc" id="agroup__opts_group_html_gaafda5fb8d9ee3a17bd475ceaecfac218"><div class="ttname"><a href="group__opts_group.html#gaafda5fb8d9ee3a17bd475ceaecfac218">natsOptions_SetWriteDeadline</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetWriteDeadline(natsOptions *opts, int64_t deadline)</div><div class="ttdoc">Sets the write deadline.</div></div>
+<div class="ttc" id="agroup__opts_group_html_gaaff89c3f41627f4b2929dbc9b82d265b"><div class="ttname"><a href="group__opts_group.html#gaaff89c3f41627f4b2929dbc9b82d265b">natsOptions_SetMaxPingsOut</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetMaxPingsOut(natsOptions *opts, int maxPingsOut)</div><div class="ttdoc">Sets the limit of outstanding PINGs without corresponding PONGs.</div></div>
+<div class="ttc" id="agroup__opts_group_html_gab09491bad908dedcb323c780280733ff"><div class="ttname"><a href="group__opts_group.html#gab09491bad908dedcb323c780280733ff">natsOptions_SetEventLoop</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetEventLoop(natsOptions *opts, void *loop, natsEvLoop_Attach attachCb, natsEvLoop_ReadAddRemove readCb, natsEvLoop_WriteAddRemove writeCb, natsEvLoop_Detach detachCb)</div><div class="ttdoc">Sets the external event loop and associated callbacks.</div></div>
+<div class="ttc" id="agroup__opts_group_html_gab54cd2719c0b64eebd6c7b83dd2908a0"><div class="ttname"><a href="group__opts_group.html#gab54cd2719c0b64eebd6c7b83dd2908a0">natsOptions_SetMaxReconnect</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetMaxReconnect(natsOptions *opts, int maxReconnect)</div><div class="ttdoc">Sets the maximum number of reconnect attempts.</div></div>
+<div class="ttc" id="agroup__opts_group_html_gab5baab507c974402ab0d8c5e8227ee65"><div class="ttname"><a href="group__opts_group.html#gab5baab507c974402ab0d8c5e8227ee65">natsOptions_SetDiscoveredServersCB</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetDiscoveredServersCB(natsOptions *opts, natsConnectionHandler discoveredServersCb, void *closure)</div><div class="ttdoc">Sets the callback to be invoked when new servers are discovered.</div></div>
+<div class="ttc" id="agroup__opts_group_html_gabf060c92648b50c069f0abe7cbb06f1c"><div class="ttname"><a href="group__opts_group.html#gabf060c92648b50c069f0abe7cbb06f1c">natsOptions_UseGlobalMessageDelivery</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_UseGlobalMessageDelivery(natsOptions *opts, bool global)</div><div class="ttdoc">Switch on/off the use of a central message delivery thread pool.</div></div>
+<div class="ttc" id="agroup__opts_group_html_gac5173473a731a4a36d15346fedddf91f"><div class="ttname"><a href="group__opts_group.html#gac5173473a731a4a36d15346fedddf91f">natsOptions_SetCustomInboxPrefix</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetCustomInboxPrefix(natsOptions *opts, const char *inboxPrefix)</div><div class="ttdoc">Sets a custom inbox prefix.</div></div>
+<div class="ttc" id="agroup__opts_group_html_gacb7e964ae54b74d972d72e118b7b8bdf"><div class="ttname"><a href="group__opts_group.html#gacb7e964ae54b74d972d72e118b7b8bdf">natsOptions_SetServers</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetServers(natsOptions *opts, const char **servers, int serversCount)</div><div class="ttdoc">Set the list of servers to try to (re)connect to.</div></div>
+<div class="ttc" id="agroup__opts_group_html_gad58a5b9dabadeebda30e952ff7b39193"><div class="ttname"><a href="group__opts_group.html#gad58a5b9dabadeebda30e952ff7b39193">natsOptions_SetToken</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetToken(natsOptions *opts, const char *token)</div><div class="ttdoc">Sets the token to use when not specified in the URL.</div></div>
+<div class="ttc" id="agroup__opts_group_html_gadc8dc0cedd91bda71d544f3dedc4a039"><div class="ttname"><a href="group__opts_group.html#gadc8dc0cedd91bda71d544f3dedc4a039">natsOptions_SetDisconnectedCB</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetDisconnectedCB(natsOptions *opts, natsConnectionHandler disconnectedCb, void *closure)</div><div class="ttdoc">Sets the callback to be invoked when the connection to a server is lost.</div></div>
+<div class="ttc" id="agroup__opts_group_html_gadef4376a5e608cbc8c1a9e2b6335dc79"><div class="ttname"><a href="group__opts_group.html#gadef4376a5e608cbc8c1a9e2b6335dc79">natsOptions_SetFailRequestsOnDisconnect</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetFailRequestsOnDisconnect(natsOptions *opts, bool failRequests)</div><div class="ttdoc">Fails pending requests on disconnect event.</div></div>
+<div class="ttc" id="agroup__opts_group_html_gae68fb615835364c0809555e8dc93f57e"><div class="ttname"><a href="group__opts_group.html#gae68fb615835364c0809555e8dc93f57e">natsOptions_SetPingInterval</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetPingInterval(natsOptions *opts, int64_t interval)</div><div class="ttdoc">Sets the ping interval.</div></div>
+<div class="ttc" id="agroup__opts_group_html_gae98f0f9034e93941767ab1ae6eec2c0c"><div class="ttname"><a href="group__opts_group.html#gae98f0f9034e93941767ab1ae6eec2c0c">natsOptions_SetCertificatesChain</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetCertificatesChain(natsOptions *opts, const char *cert, const char *key)</div><div class="ttdoc">Sets the client certificate and key.</div></div>
+<div class="ttc" id="agroup__opts_group_html_gafb30794fc2ae74b9e0bd8fb609b901c8"><div class="ttname"><a href="group__opts_group.html#gafb30794fc2ae74b9e0bd8fb609b901c8">natsOptions_SetCATrustedCertificates</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsOptions_SetCATrustedCertificates(natsOptions *opts, const char *certificates)</div><div class="ttdoc">Sets the trusted CA certificates from memory.</div></div>
+<div class="ttc" id="agroup__stan_conn_mgt_group_html_ga166ec494a55c9b1f9ebafd2294e05ff6"><div class="ttname"><a href="group__stan_conn_mgt_group.html#ga166ec494a55c9b1f9ebafd2294e05ff6">stanConnection_GetNATSConnection</a></div><div class="ttdeci">NATS_EXTERN natsStatus stanConnection_GetNATSConnection(stanConnection *sc, natsConnection **nc)</div><div class="ttdoc">Returns the underlying NATS Connection.</div></div>
+<div class="ttc" id="agroup__stan_conn_mgt_group_html_ga2e56a93825e1214a5ab688860e2a8ce6"><div class="ttname"><a href="group__stan_conn_mgt_group.html#ga2e56a93825e1214a5ab688860e2a8ce6">stanConnection_ReleaseNATSConnection</a></div><div class="ttdeci">NATS_EXTERN void stanConnection_ReleaseNATSConnection(stanConnection *sc)</div><div class="ttdoc">Releases the NATS Connection.</div></div>
+<div class="ttc" id="agroup__stan_conn_mgt_group_html_ga35e0e6e5e3b7f3818a3ac3600efb8f8f"><div class="ttname"><a href="group__stan_conn_mgt_group.html#ga35e0e6e5e3b7f3818a3ac3600efb8f8f">stanConnection_Connect</a></div><div class="ttdeci">NATS_EXTERN natsStatus stanConnection_Connect(stanConnection **sc, const char *clusterID, const char *clientID, stanConnOptions *options)</div><div class="ttdoc">Connects to a NATS Streaming Server using the provided options.</div></div>
+<div class="ttc" id="agroup__stan_conn_mgt_group_html_ga4952a7f65a53fdb5ca1c26b1a1656f1d"><div class="ttname"><a href="group__stan_conn_mgt_group.html#ga4952a7f65a53fdb5ca1c26b1a1656f1d">stanConnection_Close</a></div><div class="ttdeci">NATS_EXTERN natsStatus stanConnection_Close(stanConnection *sc)</div><div class="ttdoc">Closes the connection.</div></div>
+<div class="ttc" id="agroup__stan_conn_mgt_group_html_gaea095eec18fdf04e06de16711f8b1a04"><div class="ttname"><a href="group__stan_conn_mgt_group.html#gaea095eec18fdf04e06de16711f8b1a04">stanConnection_Destroy</a></div><div class="ttdeci">NATS_EXTERN natsStatus stanConnection_Destroy(stanConnection *sc)</div><div class="ttdoc">Destroys the connection object.</div></div>
+<div class="ttc" id="agroup__stan_conn_opts_group_html_ga07105d1d00878bba19f47243b2c88402"><div class="ttname"><a href="group__stan_conn_opts_group.html#ga07105d1d00878bba19f47243b2c88402">stanConnOptions_SetDiscoveryPrefix</a></div><div class="ttdeci">NATS_EXTERN natsStatus stanConnOptions_SetDiscoveryPrefix(stanConnOptions *opts, const char *prefix)</div><div class="ttdoc">Sets the subject prefix the library sends the connect request to.</div></div>
+<div class="ttc" id="agroup__stan_conn_opts_group_html_ga19ba15c8001aa835b261eea3a309e6d3"><div class="ttname"><a href="group__stan_conn_opts_group.html#ga19ba15c8001aa835b261eea3a309e6d3">stanConnOptions_SetConnectionLostHandler</a></div><div class="ttdeci">NATS_EXTERN natsStatus stanConnOptions_SetConnectionLostHandler(stanConnOptions *opts, stanConnectionLostHandler handler, void *closure)</div><div class="ttdoc">Sets the connection lost handler.</div></div>
+<div class="ttc" id="agroup__stan_conn_opts_group_html_ga29eee1be7eff749aeac3bab60d1b0405"><div class="ttname"><a href="group__stan_conn_opts_group.html#ga29eee1be7eff749aeac3bab60d1b0405">stanConnOptions_SetMaxPubAcksInflight</a></div><div class="ttdeci">NATS_EXTERN natsStatus stanConnOptions_SetMaxPubAcksInflight(stanConnOptions *opts, int maxPubAcksInflight, float percentage)</div><div class="ttdoc">Sets the maximum number of published messages without outstanding ACKs from the server.</div></div>
+<div class="ttc" id="agroup__stan_conn_opts_group_html_ga36f2ee441562dcf619d6e020b823fc96"><div class="ttname"><a href="group__stan_conn_opts_group.html#ga36f2ee441562dcf619d6e020b823fc96">stanConnOptions_SetPubAckWait</a></div><div class="ttdeci">NATS_EXTERN natsStatus stanConnOptions_SetPubAckWait(stanConnOptions *opts, int64_t wait)</div><div class="ttdoc">Sets the timeout for waiting for an ACK for a published message.</div></div>
+<div class="ttc" id="agroup__stan_conn_opts_group_html_ga3c6d511fc1e1febcdf5344960de5a0b3"><div class="ttname"><a href="group__stan_conn_opts_group.html#ga3c6d511fc1e1febcdf5344960de5a0b3">stanConnOptions_SetURL</a></div><div class="ttdeci">NATS_EXTERN natsStatus stanConnOptions_SetURL(stanConnOptions *opts, const char *url)</div><div class="ttdoc">Sets the URL to connect to.</div></div>
+<div class="ttc" id="agroup__stan_conn_opts_group_html_ga66c72c482696d9ceca71fced7cbb1264"><div class="ttname"><a href="group__stan_conn_opts_group.html#ga66c72c482696d9ceca71fced7cbb1264">stanConnOptions_SetConnectionWait</a></div><div class="ttdeci">NATS_EXTERN natsStatus stanConnOptions_SetConnectionWait(stanConnOptions *opts, int64_t wait)</div><div class="ttdoc">Sets the timeout for establishing a connection.</div></div>
+<div class="ttc" id="agroup__stan_conn_opts_group_html_ga83fd0a29b136cbfb643be642eb2fa726"><div class="ttname"><a href="group__stan_conn_opts_group.html#ga83fd0a29b136cbfb643be642eb2fa726">stanConnOptions_Destroy</a></div><div class="ttdeci">NATS_EXTERN void stanConnOptions_Destroy(stanConnOptions *opts)</div><div class="ttdoc">Destroys a stanConnOptions object.</div></div>
+<div class="ttc" id="agroup__stan_conn_opts_group_html_gad835223f08fbeae2a3c7a34d3fa1550b"><div class="ttname"><a href="group__stan_conn_opts_group.html#gad835223f08fbeae2a3c7a34d3fa1550b">stanConnOptions_SetPings</a></div><div class="ttdeci">NATS_EXTERN natsStatus stanConnOptions_SetPings(stanConnOptions *opts, int interval, int maxOut)</div><div class="ttdoc">Sets the ping interval and max out values.</div></div>
+<div class="ttc" id="agroup__stan_conn_opts_group_html_gae3fc9a4daa7f85367811a313857337b4"><div class="ttname"><a href="group__stan_conn_opts_group.html#gae3fc9a4daa7f85367811a313857337b4">stanConnOptions_SetNATSOptions</a></div><div class="ttdeci">NATS_EXTERN natsStatus stanConnOptions_SetNATSOptions(stanConnOptions *opts, natsOptions *nOpts)</div><div class="ttdoc">Sets the NATS Options to use to create the connection.</div></div>
+<div class="ttc" id="agroup__stan_conn_opts_group_html_gaff52a1ce90253b4bdbb0005fca4f71b6"><div class="ttname"><a href="group__stan_conn_opts_group.html#gaff52a1ce90253b4bdbb0005fca4f71b6">stanConnOptions_Create</a></div><div class="ttdeci">NATS_EXTERN natsStatus stanConnOptions_Create(stanConnOptions **newOpts)</div><div class="ttdoc">Creates a stanConnOptions object.</div></div>
+<div class="ttc" id="agroup__stan_conn_pub_group_html_ga0c4d1e4615f8ac834f0a4021f75d39f0"><div class="ttname"><a href="group__stan_conn_pub_group.html#ga0c4d1e4615f8ac834f0a4021f75d39f0">stanConnection_PublishAsync</a></div><div class="ttdeci">NATS_EXTERN natsStatus stanConnection_PublishAsync(stanConnection *sc, const char *channel, const void *data, int dataLen, stanPubAckHandler ah, void *ahClosure)</div><div class="ttdoc">Asynchronously publishes data on a channel.</div></div>
+<div class="ttc" id="agroup__stan_conn_pub_group_html_ga24f3f7f709b15fe53e1edaeead08fc7d"><div class="ttname"><a href="group__stan_conn_pub_group.html#ga24f3f7f709b15fe53e1edaeead08fc7d">stanConnection_Publish</a></div><div class="ttdeci">NATS_EXTERN natsStatus stanConnection_Publish(stanConnection *sc, const char *channel, const void *data, int dataLen)</div><div class="ttdoc">Publishes data on a channel.</div></div>
+<div class="ttc" id="agroup__stan_conn_sub_group_html_ga17d42bf9a4fa39470561a1a668e6b4a2"><div class="ttname"><a href="group__stan_conn_sub_group.html#ga17d42bf9a4fa39470561a1a668e6b4a2">stanConnection_QueueSubscribe</a></div><div class="ttdeci">NATS_EXTERN natsStatus stanConnection_QueueSubscribe(stanSubscription **sub, stanConnection *sc, const char *channel, const char *queueGroup, stanMsgHandler cb, void *cbClosure, stanSubOptions *options)</div><div class="ttdoc">Creates a queue subscription.</div></div>
+<div class="ttc" id="agroup__stan_conn_sub_group_html_gae545358fdc493baf6d29429a8156781f"><div class="ttname"><a href="group__stan_conn_sub_group.html#gae545358fdc493baf6d29429a8156781f">stanConnection_Subscribe</a></div><div class="ttdeci">NATS_EXTERN natsStatus stanConnection_Subscribe(stanSubscription **sub, stanConnection *sc, const char *channel, stanMsgHandler cb, void *cbClosure, stanSubOptions *options)</div><div class="ttdoc">Creates a subscription.</div></div>
+<div class="ttc" id="agroup__stan_msg_group_html_ga2f27fbfb79a46c52e079f670c59e1260"><div class="ttname"><a href="group__stan_msg_group.html#ga2f27fbfb79a46c52e079f670c59e1260">stanMsg_GetData</a></div><div class="ttdeci">NATS_EXTERN const char * stanMsg_GetData(const stanMsg *msg)</div><div class="ttdoc">Returns the message payload.</div></div>
+<div class="ttc" id="agroup__stan_msg_group_html_ga2fa524b11e9621cf46ca9b1a3ca66452"><div class="ttname"><a href="group__stan_msg_group.html#ga2fa524b11e9621cf46ca9b1a3ca66452">stanMsg_GetTimestamp</a></div><div class="ttdeci">NATS_EXTERN int64_t stanMsg_GetTimestamp(const stanMsg *msg)</div><div class="ttdoc">Returns the message's timestamp.</div></div>
+<div class="ttc" id="agroup__stan_msg_group_html_ga7d1e394a686bc25ab7376b7f28b9e777"><div class="ttname"><a href="group__stan_msg_group.html#ga7d1e394a686bc25ab7376b7f28b9e777">stanMsg_GetDataLength</a></div><div class="ttdeci">NATS_EXTERN int stanMsg_GetDataLength(const stanMsg *msg)</div><div class="ttdoc">Returns the message length.</div></div>
+<div class="ttc" id="agroup__stan_msg_group_html_ga8e537d014b89d9d7da7906b2ee75d5c0"><div class="ttname"><a href="group__stan_msg_group.html#ga8e537d014b89d9d7da7906b2ee75d5c0">stanMsg_IsRedelivered</a></div><div class="ttdeci">NATS_EXTERN bool stanMsg_IsRedelivered(const stanMsg *msg)</div><div class="ttdoc">Returns the message's redelivered flag.</div></div>
+<div class="ttc" id="agroup__stan_msg_group_html_ga98b66ff73447e1d7e329edbfcde782b5"><div class="ttname"><a href="group__stan_msg_group.html#ga98b66ff73447e1d7e329edbfcde782b5">stanMsg_GetSequence</a></div><div class="ttdeci">NATS_EXTERN uint64_t stanMsg_GetSequence(const stanMsg *msg)</div><div class="ttdoc">Returns the message's sequence number.</div></div>
+<div class="ttc" id="agroup__stan_msg_group_html_gacd0059fb499963f5b2eae18053e5f74f"><div class="ttname"><a href="group__stan_msg_group.html#gacd0059fb499963f5b2eae18053e5f74f">stanMsg_Destroy</a></div><div class="ttdeci">NATS_EXTERN void stanMsg_Destroy(stanMsg *msg)</div><div class="ttdoc">Destroys the message object.</div></div>
+<div class="ttc" id="agroup__stan_sub_group_html_ga3a1cca9fa3ea54fcf7a43fd1335a26d3"><div class="ttname"><a href="group__stan_sub_group.html#ga3a1cca9fa3ea54fcf7a43fd1335a26d3">stanSubscription_AckMsg</a></div><div class="ttdeci">NATS_EXTERN natsStatus stanSubscription_AckMsg(stanSubscription *sub, stanMsg *msg)</div><div class="ttdoc">Acknowledge a message.</div></div>
+<div class="ttc" id="agroup__stan_sub_group_html_ga3f6ce924f6a1830a55e30e9910aad4ba"><div class="ttname"><a href="group__stan_sub_group.html#ga3f6ce924f6a1830a55e30e9910aad4ba">stanSubscription_Destroy</a></div><div class="ttdeci">NATS_EXTERN void stanSubscription_Destroy(stanSubscription *sub)</div><div class="ttdoc">Destroys the subscription.</div></div>
+<div class="ttc" id="agroup__stan_sub_group_html_ga7b039908ec45cfc2c16ec61ba8daca9d"><div class="ttname"><a href="group__stan_sub_group.html#ga7b039908ec45cfc2c16ec61ba8daca9d">stanSubscription_SetOnCompleteCB</a></div><div class="ttdeci">NATS_EXTERN natsStatus stanSubscription_SetOnCompleteCB(stanSubscription *sub, natsOnCompleteCB cb, void *closure)</div><div class="ttdoc">Sets a completion callback.</div></div>
+<div class="ttc" id="agroup__stan_sub_group_html_gacfa3a7b4fa333c84acfa7521fbbb5bcc"><div class="ttname"><a href="group__stan_sub_group.html#gacfa3a7b4fa333c84acfa7521fbbb5bcc">stanSubscription_Close</a></div><div class="ttdeci">NATS_EXTERN natsStatus stanSubscription_Close(stanSubscription *sub)</div><div class="ttdoc">Closes the subscription.</div></div>
+<div class="ttc" id="agroup__stan_sub_group_html_gafa428a7e0f6800216cb06fd738bd235e"><div class="ttname"><a href="group__stan_sub_group.html#gafa428a7e0f6800216cb06fd738bd235e">stanSubscription_Unsubscribe</a></div><div class="ttdeci">NATS_EXTERN natsStatus stanSubscription_Unsubscribe(stanSubscription *sub)</div><div class="ttdoc">Permanently remove a subscription.</div></div>
+<div class="ttc" id="agroup__stan_sub_opts_group_html_ga1b56877d0a6729e148c9c288e2b88e3f"><div class="ttname"><a href="group__stan_sub_opts_group.html#ga1b56877d0a6729e148c9c288e2b88e3f">stanSubOptions_Destroy</a></div><div class="ttdeci">NATS_EXTERN void stanSubOptions_Destroy(stanSubOptions *opts)</div><div class="ttdoc">Destroys a stanSubOptions object.</div></div>
+<div class="ttc" id="agroup__stan_sub_opts_group_html_ga27d9175901997b8468997019746599b5"><div class="ttname"><a href="group__stan_sub_opts_group.html#ga27d9175901997b8468997019746599b5">stanSubOptions_StartAtTimeDelta</a></div><div class="ttdeci">NATS_EXTERN natsStatus stanSubOptions_StartAtTimeDelta(stanSubOptions *opts, int64_t delta)</div><div class="ttdoc">Sets the desired start position based on the given delta.</div></div>
+<div class="ttc" id="agroup__stan_sub_opts_group_html_ga35efbdea888e00440c500845064931c0"><div class="ttname"><a href="group__stan_sub_opts_group.html#ga35efbdea888e00440c500845064931c0">stanSubOptions_SetMaxInflight</a></div><div class="ttdeci">NATS_EXTERN natsStatus stanSubOptions_SetMaxInflight(stanSubOptions *opts, int maxInflight)</div><div class="ttdoc">Sets the the maximum number of messages the cluster will send without an ACK.</div></div>
+<div class="ttc" id="agroup__stan_sub_opts_group_html_ga6cb7f6e1ac697d16959f9042eeb84dc1"><div class="ttname"><a href="group__stan_sub_opts_group.html#ga6cb7f6e1ac697d16959f9042eeb84dc1">stanSubOptions_StartAtSequence</a></div><div class="ttdeci">NATS_EXTERN natsStatus stanSubOptions_StartAtSequence(stanSubOptions *opts, uint64_t seq)</div><div class="ttdoc">Sets the desired start position based on the given sequence number.</div></div>
+<div class="ttc" id="agroup__stan_sub_opts_group_html_ga6f49ae2629e49d2bfa35990cf030bf83"><div class="ttname"><a href="group__stan_sub_opts_group.html#ga6f49ae2629e49d2bfa35990cf030bf83">stanSubOptions_SetManualAckMode</a></div><div class="ttdeci">NATS_EXTERN natsStatus stanSubOptions_SetManualAckMode(stanSubOptions *opts, bool manual)</div><div class="ttdoc">Sets the subscription's acknowledgment mode.</div></div>
+<div class="ttc" id="agroup__stan_sub_opts_group_html_ga856a74e31f3307faf988747c1f88717c"><div class="ttname"><a href="group__stan_sub_opts_group.html#ga856a74e31f3307faf988747c1f88717c">stanSubOptions_StartWithLastReceived</a></div><div class="ttdeci">NATS_EXTERN natsStatus stanSubOptions_StartWithLastReceived(stanSubOptions *opts)</div><div class="ttdoc">The subscription should start with the last message in the channel.</div></div>
+<div class="ttc" id="agroup__stan_sub_opts_group_html_gaa018bceba99ef3726157e87c6918ab14"><div class="ttname"><a href="group__stan_sub_opts_group.html#gaa018bceba99ef3726157e87c6918ab14">stanSubOptions_SetDurableName</a></div><div class="ttdeci">NATS_EXTERN natsStatus stanSubOptions_SetDurableName(stanSubOptions *opts, const char *durableName)</div><div class="ttdoc">Sets the Durable Name for this subscription.</div></div>
+<div class="ttc" id="agroup__stan_sub_opts_group_html_gaafd7a553486eea3c9d309da0744a3608"><div class="ttname"><a href="group__stan_sub_opts_group.html#gaafd7a553486eea3c9d309da0744a3608">stanSubOptions_StartAtTime</a></div><div class="ttdeci">NATS_EXTERN natsStatus stanSubOptions_StartAtTime(stanSubOptions *opts, int64_t time)</div><div class="ttdoc">Sets the desired start position based on the given time.</div></div>
+<div class="ttc" id="agroup__stan_sub_opts_group_html_gab09b81358e93199a4631eb06f1ec179f"><div class="ttname"><a href="group__stan_sub_opts_group.html#gab09b81358e93199a4631eb06f1ec179f">stanSubOptions_DeliverAllAvailable</a></div><div class="ttdeci">NATS_EXTERN natsStatus stanSubOptions_DeliverAllAvailable(stanSubOptions *opts)</div><div class="ttdoc">The subscription should start with the first message in the channel.</div></div>
+<div class="ttc" id="agroup__stan_sub_opts_group_html_gad87a2cef4f4ddf64696f9864773c37cf"><div class="ttname"><a href="group__stan_sub_opts_group.html#gad87a2cef4f4ddf64696f9864773c37cf">stanSubOptions_Create</a></div><div class="ttdeci">NATS_EXTERN natsStatus stanSubOptions_Create(stanSubOptions **newOpts)</div><div class="ttdoc">Creates a stanSubOptions object.</div></div>
+<div class="ttc" id="agroup__stan_sub_opts_group_html_gafbb4e6c74978c4e8f30f016c20cc2bdf"><div class="ttname"><a href="group__stan_sub_opts_group.html#gafbb4e6c74978c4e8f30f016c20cc2bdf">stanSubOptions_SetAckWait</a></div><div class="ttdeci">NATS_EXTERN natsStatus stanSubOptions_SetAckWait(stanSubOptions *opts, int64_t wait)</div><div class="ttdoc">Sets the timeout for waiting for an ACK from the cluster's point of view for delivered messages.</div></div>
+<div class="ttc" id="agroup__stats_group_html_ga26a04e77af8fc160adf7c33088dcf59c"><div class="ttname"><a href="group__stats_group.html#ga26a04e77af8fc160adf7c33088dcf59c">natsStatistics_Destroy</a></div><div class="ttdeci">NATS_EXTERN void natsStatistics_Destroy(natsStatistics *stats)</div><div class="ttdoc">Destroys the natsStatistics object.</div></div>
+<div class="ttc" id="agroup__stats_group_html_gad85f5ffb4272713f6cc6d988e6d4e75f"><div class="ttname"><a href="group__stats_group.html#gad85f5ffb4272713f6cc6d988e6d4e75f">natsStatistics_GetCounts</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsStatistics_GetCounts(const natsStatistics *stats, uint64_t *inMsgs, uint64_t *inBytes, uint64_t *outMsgs, uint64_t *outBytes, uint64_t *reconnects)</div><div class="ttdoc">Extracts the various statistics values.</div></div>
+<div class="ttc" id="agroup__stats_group_html_gafa923df029168f4991b77ffdd9e24877"><div class="ttname"><a href="group__stats_group.html#gafa923df029168f4991b77ffdd9e24877">natsStatistics_Create</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsStatistics_Create(natsStatistics **newStats)</div><div class="ttdoc">Creates a natsStatistics object.</div></div>
+<div class="ttc" id="agroup__status_group_html_ga4a83c4a08f1e4dd9451c1a88b6a4254e"><div class="ttname"><a href="group__status_group.html#ga4a83c4a08f1e4dd9451c1a88b6a4254e">natsStatus_GetText</a></div><div class="ttdeci">NATS_EXTERN const char * natsStatus_GetText(natsStatus s)</div><div class="ttdoc">Get the text corresponding to a natsStatus.</div></div>
+<div class="ttc" id="agroup__sub_group_html_ga0408c9b6e4ad4078ac0267656ace222d"><div class="ttname"><a href="group__sub_group.html#ga0408c9b6e4ad4078ac0267656ace222d">natsSubscription_WaitForDrainCompletion</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsSubscription_WaitForDrainCompletion(natsSubscription *sub, int64_t timeout)</div><div class="ttdoc">Blocks until the drain operation completes.</div></div>
+<div class="ttc" id="agroup__sub_group_html_ga09f285de2746a6e27fc66efd60bd3116"><div class="ttname"><a href="group__sub_group.html#ga09f285de2746a6e27fc66efd60bd3116">natsSubscription_AutoUnsubscribe</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsSubscription_AutoUnsubscribe(natsSubscription *sub, int max)</div><div class="ttdoc">Auto-Unsubscribes.</div></div>
+<div class="ttc" id="agroup__sub_group_html_ga0abc5d9afbc6b0c9c5adaf533904c968"><div class="ttname"><a href="group__sub_group.html#ga0abc5d9afbc6b0c9c5adaf533904c968">natsSubscription_GetMaxPending</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsSubscription_GetMaxPending(natsSubscription *sub, int *msgs, int *bytes)</div><div class="ttdoc">Returns the maximum number of pending messages and bytes.</div></div>
+<div class="ttc" id="agroup__sub_group_html_ga12b60cdb3aca7329edebc480ae86bfab"><div class="ttname"><a href="group__sub_group.html#ga12b60cdb3aca7329edebc480ae86bfab">natsSubscription_GetStats</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsSubscription_GetStats(natsSubscription *sub, int *pendingMsgs, int *pendingBytes, int *maxPendingMsgs, int *maxPendingBytes, int64_t *deliveredMsgs, int64_t *droppedMsgs)</div><div class="ttdoc">Get various statistics from this subscription.</div></div>
+<div class="ttc" id="agroup__sub_group_html_ga24f1636869e26661ce62c9c9f4d80823"><div class="ttname"><a href="group__sub_group.html#ga24f1636869e26661ce62c9c9f4d80823">natsSubscription_GetDropped</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsSubscription_GetDropped(natsSubscription *sub, int64_t *msgs)</div><div class="ttdoc">Returns the number of dropped messages.</div></div>
+<div class="ttc" id="agroup__sub_group_html_ga26c9736289d326fb7d6df7e2a0df72ab"><div class="ttname"><a href="group__sub_group.html#ga26c9736289d326fb7d6df7e2a0df72ab">natsSubscription_Drain</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsSubscription_Drain(natsSubscription *sub)</div><div class="ttdoc">Drains the subscription with a default timeout.</div></div>
+<div class="ttc" id="agroup__sub_group_html_ga38f1e41fc7619101fc4aa52014dd5428"><div class="ttname"><a href="group__sub_group.html#ga38f1e41fc7619101fc4aa52014dd5428">natsSubscription_NoDeliveryDelay</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsSubscription_NoDeliveryDelay(natsSubscription *sub)</div><div class="ttdoc">Enables the No Delivery Delay mode.</div></div>
+<div class="ttc" id="agroup__sub_group_html_ga476b7276d0b7f9946834d2bb2423e955"><div class="ttname"><a href="group__sub_group.html#ga476b7276d0b7f9946834d2bb2423e955">natsSubscription_GetDelivered</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsSubscription_GetDelivered(natsSubscription *sub, int64_t *msgs)</div><div class="ttdoc">Returns the number of delivered messages.</div></div>
+<div class="ttc" id="agroup__sub_group_html_ga50a95dd96e9b714201679a015d62832f"><div class="ttname"><a href="group__sub_group.html#ga50a95dd96e9b714201679a015d62832f">natsSubscription_Destroy</a></div><div class="ttdeci">NATS_EXTERN void natsSubscription_Destroy(natsSubscription *sub)</div><div class="ttdoc">Destroys the subscription.</div></div>
+<div class="ttc" id="agroup__sub_group_html_ga5a029a784c0a7f8b5800b48cc995db20"><div class="ttname"><a href="group__sub_group.html#ga5a029a784c0a7f8b5800b48cc995db20">natsSubscription_GetID</a></div><div class="ttdeci">NATS_EXTERN int64_t natsSubscription_GetID(natsSubscription *sub)</div><div class="ttdoc">Gets the subscription id.</div></div>
+<div class="ttc" id="agroup__sub_group_html_ga5e6454bbc7a90b9694112d45bd8de903"><div class="ttname"><a href="group__sub_group.html#ga5e6454bbc7a90b9694112d45bd8de903">natsSubscription_IsValid</a></div><div class="ttdeci">NATS_EXTERN bool natsSubscription_IsValid(natsSubscription *sub)</div><div class="ttdoc">Checks the validity of the subscription.</div></div>
+<div class="ttc" id="agroup__sub_group_html_ga6538a5d78dfb0f16514b94c8e74c11af"><div class="ttname"><a href="group__sub_group.html#ga6538a5d78dfb0f16514b94c8e74c11af">natsSubscription_NextMsg</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsSubscription_NextMsg(natsMsg **nextMsg, natsSubscription *sub, int64_t timeout)</div><div class="ttdoc">Returns the next available message.</div></div>
+<div class="ttc" id="agroup__sub_group_html_ga68a7cea89e75c529a7dd3bb77303dda4"><div class="ttname"><a href="group__sub_group.html#ga68a7cea89e75c529a7dd3bb77303dda4">natsSubscription_SetPendingLimits</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsSubscription_SetPendingLimits(natsSubscription *sub, int msgLimit, int bytesLimit)</div><div class="ttdoc">Sets the limit for pending messages and bytes.</div></div>
+<div class="ttc" id="agroup__sub_group_html_ga786bb458981274fe717f266bd3b96d96"><div class="ttname"><a href="group__sub_group.html#ga786bb458981274fe717f266bd3b96d96">natsSubscription_GetPendingLimits</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsSubscription_GetPendingLimits(natsSubscription *sub, int *msgLimit, int *bytesLimit)</div><div class="ttdoc">Returns the current limit for pending messages and bytes.</div></div>
+<div class="ttc" id="agroup__sub_group_html_ga8a37b2d5290da3aecc05483d79e7e254"><div class="ttname"><a href="group__sub_group.html#ga8a37b2d5290da3aecc05483d79e7e254">natsSubscription_QueuedMsgs</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsSubscription_QueuedMsgs(natsSubscription *sub, uint64_t *queuedMsgs)</div><div class="ttdoc">Gets the number of pending messages.</div></div>
+<div class="ttc" id="agroup__sub_group_html_ga9834bd02f67a25ac084d5ad71e146019"><div class="ttname"><a href="group__sub_group.html#ga9834bd02f67a25ac084d5ad71e146019">natsSubscription_DrainCompletionStatus</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsSubscription_DrainCompletionStatus(natsSubscription *sub)</div><div class="ttdoc">Returns the status of the drain after completion.</div></div>
+<div class="ttc" id="agroup__sub_group_html_ga9c26a3f9584e7804060a48ec1b7e2a68"><div class="ttname"><a href="group__sub_group.html#ga9c26a3f9584e7804060a48ec1b7e2a68">natsSubscription_DrainTimeout</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsSubscription_DrainTimeout(natsSubscription *sub, int64_t timeout)</div><div class="ttdoc">Drains the subscription with the specified timeout.</div></div>
+<div class="ttc" id="agroup__sub_group_html_gaca6262e2ef842caa701a9f233db72707"><div class="ttname"><a href="group__sub_group.html#gaca6262e2ef842caa701a9f233db72707">natsSubscription_GetPending</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsSubscription_GetPending(natsSubscription *sub, int *msgs, int *bytes)</div><div class="ttdoc">Returns the number of pending messages and bytes.</div></div>
+<div class="ttc" id="agroup__sub_group_html_gadd4872b9fc5678a73f9ab04ce8428432"><div class="ttname"><a href="group__sub_group.html#gadd4872b9fc5678a73f9ab04ce8428432">natsSubscription_GetSubject</a></div><div class="ttdeci">NATS_EXTERN const char * natsSubscription_GetSubject(natsSubscription *sub)</div><div class="ttdoc">Gets the subject name.</div></div>
+<div class="ttc" id="agroup__sub_group_html_gaea632f845d473e7461b134c0e7bf4077"><div class="ttname"><a href="group__sub_group.html#gaea632f845d473e7461b134c0e7bf4077">natsSubscription_SetOnCompleteCB</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsSubscription_SetOnCompleteCB(natsSubscription *sub, natsOnCompleteCB cb, void *closure)</div><div class="ttdoc">Sets a completion callback.</div></div>
+<div class="ttc" id="agroup__sub_group_html_gaee87f8be0e6c2a4693ba2cea070583ba"><div class="ttname"><a href="group__sub_group.html#gaee87f8be0e6c2a4693ba2cea070583ba">natsSubscription_Unsubscribe</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsSubscription_Unsubscribe(natsSubscription *sub)</div><div class="ttdoc">Unsubscribes.</div></div>
+<div class="ttc" id="agroup__sub_group_html_gafe31911d8372db401d33856465421710"><div class="ttname"><a href="group__sub_group.html#gafe31911d8372db401d33856465421710">natsSubscription_ClearMaxPending</a></div><div class="ttdeci">NATS_EXTERN natsStatus natsSubscription_ClearMaxPending(natsSubscription *sub)</div><div class="ttdoc">Clears the statistics regarding the maximum pending values.</div></div>
+<div class="ttc" id="agroup__types_group_html_ga023712711f5c289663fc2223e83686d3"><div class="ttname"><a href="group__types_group.html#ga023712711f5c289663fc2223e83686d3">stanSubOptions</a></div><div class="ttdeci">struct __stanSubOptions stanSubOptions</div><div class="ttdoc">Way to configure a stanSubscription.</div><div class="ttdef"><b>Definition:</b> nats.h:1308</div></div>
+<div class="ttc" id="agroup__types_group_html_ga054c05493dd3cfc5c3e7a665a424e54a"><div class="ttname"><a href="group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a">kvStore</a></div><div class="ttdeci">struct __kvStore kvStore</div><div class="ttdef"><b>Definition:</b> nats.h:1147</div></div>
+<div class="ttc" id="agroup__types_group_html_ga117ed2c35f89ef3144540ed9cbadc818"><div class="ttname"><a href="group__types_group.html#ga117ed2c35f89ef3144540ed9cbadc818">jsDeliverPolicy</a></div><div class="ttdeci">jsDeliverPolicy</div><div class="ttdef"><b>Definition:</b> nats.h:291</div></div>
+<div class="ttc" id="agroup__types_group_html_ga13d64411878ba13a6ca39c915f2447c1"><div class="ttname"><a href="group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1">stanConnOptions</a></div><div class="ttdeci">struct __stanConnOptions stanConnOptions</div><div class="ttdoc">Way to configure a stanConnection.</div><div class="ttdef"><b>Definition:</b> nats.h:1302</div></div>
+<div class="ttc" id="agroup__types_group_html_ga1802a53c79e667f093bba033b16adc98"><div class="ttname"><a href="group__types_group.html#ga1802a53c79e667f093bba033b16adc98">jsStorageType</a></div><div class="ttdeci">jsStorageType</div><div class="ttdef"><b>Definition:</b> nats.h:281</div></div>
+<div class="ttc" id="agroup__types_group_html_ga206c3d4d6f4f6f96fd2cae53a3df31c1"><div class="ttname"><a href="group__types_group.html#ga206c3d4d6f4f6f96fd2cae53a3df31c1">natsInbox</a></div><div class="ttdeci">char natsInbox</div><div class="ttdoc">Unique subject often used for point-to-point communication.</div><div class="ttdef"><b>Definition:</b> nats.h:187</div></div>
+<div class="ttc" id="agroup__types_group_html_ga2cf5db7703b42d97abe56a3e83b2a87d"><div class="ttname"><a href="group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d">stanMsg</a></div><div class="ttdeci">struct __stanMsg stanMsg</div><div class="ttdoc">The Streaming message.</div><div class="ttdef"><b>Definition:</b> nats.h:1296</div></div>
+<div class="ttc" id="agroup__types_group_html_ga410f8fb053efa02b2ca1de0c02fa4b6d"><div class="ttname"><a href="group__types_group.html#ga410f8fb053efa02b2ca1de0c02fa4b6d">jsRetentionPolicy</a></div><div class="ttdeci">jsRetentionPolicy</div><div class="ttdef"><b>Definition:</b> nats.h:260</div></div>
+<div class="ttc" id="agroup__types_group_html_ga526fa6d37e818784b94cdc1713f3a043"><div class="ttname"><a href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a></div><div class="ttdeci">struct __kvWatcher kvWatcher</div><div class="ttdef"><b>Definition:</b> nats.h:1162</div></div>
+<div class="ttc" id="agroup__types_group_html_ga57a4b8c7109e2773878655722ce028aa"><div class="ttname"><a href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa">natsStatistics</a></div><div class="ttdeci">struct __natsStatistics natsStatistics</div><div class="ttdoc">Statistics of a natsConnection.</div><div class="ttdef"><b>Definition:</b> nats.h:159</div></div>
+<div class="ttc" id="agroup__types_group_html_ga7f88b7d482488398074f9d1419a9b8c2"><div class="ttname"><a href="group__types_group.html#ga7f88b7d482488398074f9d1419a9b8c2">jsDiscardPolicy</a></div><div class="ttdeci">jsDiscardPolicy</div><div class="ttdef"><b>Definition:</b> nats.h:271</div></div>
+<div class="ttc" id="agroup__types_group_html_ga8650faf52b0b6b23df376eebeb9d0354"><div class="ttname"><a href="group__types_group.html#ga8650faf52b0b6b23df376eebeb9d0354">jsReplayPolicy</a></div><div class="ttdeci">jsReplayPolicy</div><div class="ttdef"><b>Definition:</b> nats.h:317</div></div>
+<div class="ttc" id="agroup__types_group_html_ga87158ec63b4f90f69e20451624ea01d8"><div class="ttname"><a href="group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8">natsSubscription</a></div><div class="ttdeci">struct __natsSubscription natsSubscription</div><div class="ttdoc">Interest on a given subject.</div><div class="ttdef"><b>Definition:</b> nats.h:165</div></div>
+<div class="ttc" id="agroup__types_group_html_ga89db3bd6bf11af3ac5eb3ab560d16332"><div class="ttname"><a href="group__types_group.html#ga89db3bd6bf11af3ac5eb3ab560d16332">kvOperation</a></div><div class="ttdeci">kvOperation</div><div class="ttdef"><b>Definition:</b> nats.h:1168</div></div>
+<div class="ttc" id="agroup__types_group_html_ga8fcb50e6e7312834791f9e237d28e873"><div class="ttname"><a href="group__types_group.html#ga8fcb50e6e7312834791f9e237d28e873">jsAckPolicy</a></div><div class="ttdeci">jsAckPolicy</div><div class="ttdef"><b>Definition:</b> nats.h:305</div></div>
+<div class="ttc" id="agroup__types_group_html_ga9e826493769d23086cfccefe95cdf64c"><div class="ttname"><a href="group__types_group.html#ga9e826493769d23086cfccefe95cdf64c">stanConnection</a></div><div class="ttdeci">struct __stanConnection stanConnection</div><div class="ttdoc">A connection to a NATS Streaming Server.</div><div class="ttdef"><b>Definition:</b> nats.h:1284</div></div>
+<div class="ttc" id="agroup__types_group_html_gaaf12cdd24c6cc23a57c20466c92ff8c1"><div class="ttname"><a href="group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1">jsCtx</a></div><div class="ttdeci">struct __jsCtx jsCtx</div><div class="ttdef"><b>Definition:</b> nats.h:227</div></div>
+<div class="ttc" id="agroup__types_group_html_gabcc48b40a81fe302188f4ee06ea9c54e"><div class="ttname"><a href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a></div><div class="ttdeci">struct __natsOptions natsOptions</div><div class="ttdoc">Way to configure a natsConnection.</div><div class="ttdef"><b>Definition:</b> nats.h:178</div></div>
+<div class="ttc" id="agroup__types_group_html_gad3a0dd2dac950d5709ee5772b104fc80"><div class="ttname"><a href="group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80">kvStatus</a></div><div class="ttdeci">struct __kvStatus kvStatus</div><div class="ttdef"><b>Definition:</b> nats.h:1157</div></div>
+<div class="ttc" id="agroup__types_group_html_gad489fb4074f27427560ca71797db6191"><div class="ttname"><a href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a></div><div class="ttdeci">struct __kvEntry kvEntry</div><div class="ttdef"><b>Definition:</b> nats.h:1152</div></div>
+<div class="ttc" id="agroup__types_group_html_gadcab54026c4ed78f344ce03ce31bb61a"><div class="ttname"><a href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a></div><div class="ttdeci">struct __natsMsg natsMsg</div><div class="ttdoc">A structure holding a subject, optional reply and payload.</div><div class="ttdef"><b>Definition:</b> nats.h:172</div></div>
+<div class="ttc" id="agroup__types_group_html_gae4dae869fb614536f0f027c2e2660cc5"><div class="ttname"><a href="group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5">stanSubscription</a></div><div class="ttdeci">struct __stanSubscription stanSubscription</div><div class="ttdoc">Interest on a given channel.</div><div class="ttdef"><b>Definition:</b> nats.h:1290</div></div>
+<div class="ttc" id="agroup__types_group_html_gaf88dca0a18efb5c5e994d265a9f04aec"><div class="ttname"><a href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a></div><div class="ttdeci">struct __natsConnection natsConnection</div><div class="ttdoc">A connection to a NATS Server.</div><div class="ttdef"><b>Definition:</b> nats.h:152</div></div>
+<div class="ttc" id="agroup__types_group_html_gga117ed2c35f89ef3144540ed9cbadc818a06299d9c8262a16306ba6cc16d293c5e"><div class="ttname"><a href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a06299d9c8262a16306ba6cc16d293c5e">js_DeliverByStartSequence</a></div><div class="ttdeci">@ js_DeliverByStartSequence</div><div class="ttdoc">Starts from a given sequence.</div><div class="ttdef"><b>Definition:</b> nats.h:295</div></div>
+<div class="ttc" id="agroup__types_group_html_gga117ed2c35f89ef3144540ed9cbadc818a33317133d42f21bf5919827a691543f6"><div class="ttname"><a href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a33317133d42f21bf5919827a691543f6">js_DeliverByStartTime</a></div><div class="ttdeci">@ js_DeliverByStartTime</div><div class="ttdoc">Starts from a given UTC time (number of nanoseconds since epoch)</div><div class="ttdef"><b>Definition:</b> nats.h:296</div></div>
+<div class="ttc" id="agroup__types_group_html_gga117ed2c35f89ef3144540ed9cbadc818a82b8d36e17391212398984f92db9c381"><div class="ttname"><a href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a82b8d36e17391212398984f92db9c381">js_DeliverNew</a></div><div class="ttdeci">@ js_DeliverNew</div><div class="ttdoc">Starts with messages sent after the consumer is created.</div><div class="ttdef"><b>Definition:</b> nats.h:294</div></div>
+<div class="ttc" id="agroup__types_group_html_gga117ed2c35f89ef3144540ed9cbadc818abb50ebcd2fbafe27038c966121b9407b"><div class="ttname"><a href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818abb50ebcd2fbafe27038c966121b9407b">js_DeliverLastPerSubject</a></div><div class="ttdeci">@ js_DeliverLastPerSubject</div><div class="ttdoc">Starts with the last message for all subjects received.</div><div class="ttdef"><b>Definition:</b> nats.h:297</div></div>
+<div class="ttc" id="agroup__types_group_html_gga117ed2c35f89ef3144540ed9cbadc818abbd81d6c4e0f17f30e2186f1335e991d"><div class="ttname"><a href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818abbd81d6c4e0f17f30e2186f1335e991d">js_DeliverLast</a></div><div class="ttdeci">@ js_DeliverLast</div><div class="ttdoc">Starts with the last sequence received.</div><div class="ttdef"><b>Definition:</b> nats.h:293</div></div>
+<div class="ttc" id="agroup__types_group_html_gga117ed2c35f89ef3144540ed9cbadc818ac692ba1363103768ac4bb58695549758"><div class="ttname"><a href="group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818ac692ba1363103768ac4bb58695549758">js_DeliverAll</a></div><div class="ttdeci">@ js_DeliverAll</div><div class="ttdoc">Starts from the very beginning of a stream. This is the default.</div><div class="ttdef"><b>Definition:</b> nats.h:292</div></div>
+<div class="ttc" id="agroup__types_group_html_gga1802a53c79e667f093bba033b16adc98a1d9dad1854cf374b22e3688b98284dec"><div class="ttname"><a href="group__types_group.html#gga1802a53c79e667f093bba033b16adc98a1d9dad1854cf374b22e3688b98284dec">js_FileStorage</a></div><div class="ttdeci">@ js_FileStorage</div><div class="ttdoc">Specifies on disk storage. It's the default.</div><div class="ttdef"><b>Definition:</b> nats.h:282</div></div>
+<div class="ttc" id="agroup__types_group_html_gga1802a53c79e667f093bba033b16adc98a428ed10448726ad01c1db77a7f748314"><div class="ttname"><a href="group__types_group.html#gga1802a53c79e667f093bba033b16adc98a428ed10448726ad01c1db77a7f748314">js_MemoryStorage</a></div><div class="ttdeci">@ js_MemoryStorage</div><div class="ttdoc">Specifies in memory only.</div><div class="ttdef"><b>Definition:</b> nats.h:283</div></div>
+<div class="ttc" id="agroup__types_group_html_gga410f8fb053efa02b2ca1de0c02fa4b6da6a2aa02f32acec6526d81f6e974e690f"><div class="ttname"><a href="group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6da6a2aa02f32acec6526d81f6e974e690f">js_LimitsPolicy</a></div><div class="ttdeci">@ js_LimitsPolicy</div><div class="ttdoc">Specifies that messages are retained until any given limit is reached, which could be one of MaxMsgs,...</div><div class="ttdef"><b>Definition:</b> nats.h:261</div></div>
+<div class="ttc" id="agroup__types_group_html_gga410f8fb053efa02b2ca1de0c02fa4b6dae874de4a787cfbec4c6d0eb1a3f05ebd"><div class="ttname"><a href="group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6dae874de4a787cfbec4c6d0eb1a3f05ebd">js_InterestPolicy</a></div><div class="ttdeci">@ js_InterestPolicy</div><div class="ttdoc">Specifies that when all known observables have acknowledged a message it can be removed.</div><div class="ttdef"><b>Definition:</b> nats.h:262</div></div>
+<div class="ttc" id="agroup__types_group_html_gga410f8fb053efa02b2ca1de0c02fa4b6daf7e6581e69572691b01d1294a3c3a478"><div class="ttname"><a href="group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6daf7e6581e69572691b01d1294a3c3a478">js_WorkQueuePolicy</a></div><div class="ttdeci">@ js_WorkQueuePolicy</div><div class="ttdoc">Specifies that when the first worker or subscriber acknowledges the message it can be removed.</div><div class="ttdef"><b>Definition:</b> nats.h:263</div></div>
+<div class="ttc" id="agroup__types_group_html_gga7f88b7d482488398074f9d1419a9b8c2a99d7f2d740af26c340c0a4e2b72fb6ab"><div class="ttname"><a href="group__types_group.html#gga7f88b7d482488398074f9d1419a9b8c2a99d7f2d740af26c340c0a4e2b72fb6ab">js_DiscardNew</a></div><div class="ttdeci">@ js_DiscardNew</div><div class="ttdoc">Will fail to store new messages.</div><div class="ttdef"><b>Definition:</b> nats.h:273</div></div>
+<div class="ttc" id="agroup__types_group_html_gga7f88b7d482488398074f9d1419a9b8c2abb31b828421634f1e6a1ef9359bc91f6"><div class="ttname"><a href="group__types_group.html#gga7f88b7d482488398074f9d1419a9b8c2abb31b828421634f1e6a1ef9359bc91f6">js_DiscardOld</a></div><div class="ttdeci">@ js_DiscardOld</div><div class="ttdoc">Will remove older messages to return to the limits. This is the default.</div><div class="ttdef"><b>Definition:</b> nats.h:272</div></div>
+<div class="ttc" id="agroup__types_group_html_gga8650faf52b0b6b23df376eebeb9d0354a2c4a1e2b75f31dd69a89b541d75afa44"><div class="ttname"><a href="group__types_group.html#gga8650faf52b0b6b23df376eebeb9d0354a2c4a1e2b75f31dd69a89b541d75afa44">js_ReplayInstant</a></div><div class="ttdeci">@ js_ReplayInstant</div><div class="ttdoc">Replays messages as fast as possible.</div><div class="ttdef"><b>Definition:</b> nats.h:318</div></div>
+<div class="ttc" id="agroup__types_group_html_gga8650faf52b0b6b23df376eebeb9d0354a6ee3851dac5c90a61492193dd55931f5"><div class="ttname"><a href="group__types_group.html#gga8650faf52b0b6b23df376eebeb9d0354a6ee3851dac5c90a61492193dd55931f5">js_ReplayOriginal</a></div><div class="ttdeci">@ js_ReplayOriginal</div><div class="ttdoc">Maintains the same timing as the messages were received.</div><div class="ttdef"><b>Definition:</b> nats.h:319</div></div>
+<div class="ttc" id="agroup__types_group_html_gga89db3bd6bf11af3ac5eb3ab560d16332a0b7a6bef67e4220f5f0c4075f2ed16b6"><div class="ttname"><a href="group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332a0b7a6bef67e4220f5f0c4075f2ed16b6">kvOp_Unknown</a></div><div class="ttdeci">@ kvOp_Unknown</div><div class="ttdef"><b>Definition:</b> nats.h:1169</div></div>
+<div class="ttc" id="agroup__types_group_html_gga89db3bd6bf11af3ac5eb3ab560d16332a4efb91331f3307128c75af5b23362f83"><div class="ttname"><a href="group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332a4efb91331f3307128c75af5b23362f83">kvOp_Delete</a></div><div class="ttdeci">@ kvOp_Delete</div><div class="ttdef"><b>Definition:</b> nats.h:1171</div></div>
+<div class="ttc" id="agroup__types_group_html_gga89db3bd6bf11af3ac5eb3ab560d16332acc0e1da3c292cb7eb19d909c9dfd788a"><div class="ttname"><a href="group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332acc0e1da3c292cb7eb19d909c9dfd788a">kvOp_Put</a></div><div class="ttdeci">@ kvOp_Put</div><div class="ttdef"><b>Definition:</b> nats.h:1170</div></div>
+<div class="ttc" id="agroup__types_group_html_gga89db3bd6bf11af3ac5eb3ab560d16332aee19ab8144bf518e251ea2004309b657"><div class="ttname"><a href="group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332aee19ab8144bf518e251ea2004309b657">kvOp_Purge</a></div><div class="ttdeci">@ kvOp_Purge</div><div class="ttdef"><b>Definition:</b> nats.h:1172</div></div>
+<div class="ttc" id="agroup__types_group_html_gga8fcb50e6e7312834791f9e237d28e873a02d46a6395933c55c95ee5194bb6b80e"><div class="ttname"><a href="group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873a02d46a6395933c55c95ee5194bb6b80e">js_AckExplicit</a></div><div class="ttdeci">@ js_AckExplicit</div><div class="ttdoc">Requires ack or nack for all messages.</div><div class="ttdef"><b>Definition:</b> nats.h:306</div></div>
+<div class="ttc" id="agroup__types_group_html_gga8fcb50e6e7312834791f9e237d28e873a1232af28bf4e4b82e962174f1432ed4a"><div class="ttname"><a href="group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873a1232af28bf4e4b82e962174f1432ed4a">js_AckAll</a></div><div class="ttdeci">@ js_AckAll</div><div class="ttdoc">When acking a sequence number, this implicitly acks all sequences below this one as well.</div><div class="ttdef"><b>Definition:</b> nats.h:308</div></div>
+<div class="ttc" id="agroup__types_group_html_gga8fcb50e6e7312834791f9e237d28e873afd91fe31cf57c68863ca3090b07c296c"><div class="ttname"><a href="group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873afd91fe31cf57c68863ca3090b07c296c">js_AckNone</a></div><div class="ttdeci">@ js_AckNone</div><div class="ttdoc">Requires no acks for delivered messages.</div><div class="ttdef"><b>Definition:</b> nats.h:307</div></div>
+<div class="ttc" id="anats_8h_html_a3bc1b3fe7f64083e60c7c3b93f205bad"><div class="ttname"><a href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a></div><div class="ttdeci">#define NATS_EXTERN</div><div class="ttdoc">Needed for shared library.</div><div class="ttdef"><b>Definition:</b> nats.h:49</div></div>
+<div class="ttc" id="anats_8h_html_af798865ac824e5959987de0fe8d07383"><div class="ttname"><a href="nats_8h.html#af798865ac824e5959987de0fe8d07383">natsSock</a></div><div class="ttdeci">int natsSock</div><div class="ttdef"><b>Definition:</b> nats.h:50</div></div>
+<div class="ttc" id="astatus_8h_html"><div class="ttname"><a href="status_8h.html">status.h</a></div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a></div><div class="ttdeci">jsErrCode</div><div class="ttdef"><b>Definition:</b> status.h:135</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div><div class="ttdeci">natsStatus</div><div class="ttdoc">Status returned by most of the APIs.</div><div class="ttdef"><b>Definition:</b> status.h:50</div></div>
+<div class="ttc" id="astatus_8h_html_a6d667c1f8dd289a7e0f39bf10e800b51"><div class="ttname"><a href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51">natsConnStatus</a></div><div class="ttdeci">natsConnStatus</div><div class="ttdoc">The connection state.</div><div class="ttdef"><b>Definition:</b> status.h:24</div></div>
+<div class="ttc" id="astructjs_a_p_i_stats_html"><div class="ttname"><a href="structjs_a_p_i_stats.html">jsAPIStats</a></div><div class="ttdef"><b>Definition:</b> nats.h:936</div></div>
+<div class="ttc" id="astructjs_a_p_i_stats_html_a1545170bebb347d0ea1254f51c3027cf"><div class="ttname"><a href="structjs_a_p_i_stats.html#a1545170bebb347d0ea1254f51c3027cf">jsAPIStats::Total</a></div><div class="ttdeci">uint64_t Total</div><div class="ttdef"><b>Definition:</b> nats.h:937</div></div>
+<div class="ttc" id="astructjs_a_p_i_stats_html_a84e85ad9d94dbe9afd1101388574255d"><div class="ttname"><a href="structjs_a_p_i_stats.html#a84e85ad9d94dbe9afd1101388574255d">jsAPIStats::Errors</a></div><div class="ttdeci">uint64_t Errors</div><div class="ttdef"><b>Definition:</b> nats.h:938</div></div>
+<div class="ttc" id="astructjs_account_info_html"><div class="ttname"><a href="structjs_account_info.html">jsAccountInfo</a></div><div class="ttdef"><b>Definition:</b> nats.h:973</div></div>
+<div class="ttc" id="astructjs_account_info_html_a1237c3f19a42a3203825971b429312e9"><div class="ttname"><a href="structjs_account_info.html#a1237c3f19a42a3203825971b429312e9">jsAccountInfo::Consumers</a></div><div class="ttdeci">int64_t Consumers</div><div class="ttdef"><b>Definition:</b> nats.h:977</div></div>
+<div class="ttc" id="astructjs_account_info_html_a17317abf03effdcdedc2003fca8adc71"><div class="ttname"><a href="structjs_account_info.html#a17317abf03effdcdedc2003fca8adc71">jsAccountInfo::Streams</a></div><div class="ttdeci">int64_t Streams</div><div class="ttdef"><b>Definition:</b> nats.h:976</div></div>
+<div class="ttc" id="astructjs_account_info_html_a21c14ca283400c684b18e61a534b6724"><div class="ttname"><a href="structjs_account_info.html#a21c14ca283400c684b18e61a534b6724">jsAccountInfo::TiersLen</a></div><div class="ttdeci">int TiersLen</div><div class="ttdef"><b>Definition:</b> nats.h:982</div></div>
+<div class="ttc" id="astructjs_account_info_html_a448578d621e878267ad5f1792002a665"><div class="ttname"><a href="structjs_account_info.html#a448578d621e878267ad5f1792002a665">jsAccountInfo::Memory</a></div><div class="ttdeci">uint64_t Memory</div><div class="ttdef"><b>Definition:</b> nats.h:974</div></div>
+<div class="ttc" id="astructjs_account_info_html_a94ab71c69b7883c2731ae8741ddc1e94"><div class="ttname"><a href="structjs_account_info.html#a94ab71c69b7883c2731ae8741ddc1e94">jsAccountInfo::API</a></div><div class="ttdeci">jsAPIStats API</div><div class="ttdef"><b>Definition:</b> nats.h:979</div></div>
+<div class="ttc" id="astructjs_account_info_html_aad93cf4bb6c1fbb09ae8545c03f315a9"><div class="ttname"><a href="structjs_account_info.html#aad93cf4bb6c1fbb09ae8545c03f315a9">jsAccountInfo::Limits</a></div><div class="ttdeci">jsAccountLimits Limits</div><div class="ttdef"><b>Definition:</b> nats.h:980</div></div>
+<div class="ttc" id="astructjs_account_info_html_ab654d5c7456bb62df1808deb32a620fc"><div class="ttname"><a href="structjs_account_info.html#ab654d5c7456bb62df1808deb32a620fc">jsAccountInfo::Tiers</a></div><div class="ttdeci">jsTier ** Tiers</div><div class="ttdef"><b>Definition:</b> nats.h:981</div></div>
+<div class="ttc" id="astructjs_account_info_html_ab6ba03298e1863132550b9b08d06048c"><div class="ttname"><a href="structjs_account_info.html#ab6ba03298e1863132550b9b08d06048c">jsAccountInfo::Domain</a></div><div class="ttdeci">char * Domain</div><div class="ttdef"><b>Definition:</b> nats.h:978</div></div>
+<div class="ttc" id="astructjs_account_info_html_ad1c254c5b8f11f57062a4e2d5fb10ae3"><div class="ttname"><a href="structjs_account_info.html#ad1c254c5b8f11f57062a4e2d5fb10ae3">jsAccountInfo::Store</a></div><div class="ttdeci">uint64_t Store</div><div class="ttdef"><b>Definition:</b> nats.h:975</div></div>
+<div class="ttc" id="astructjs_account_limits_html"><div class="ttname"><a href="structjs_account_limits.html">jsAccountLimits</a></div><div class="ttdef"><b>Definition:</b> nats.h:946</div></div>
+<div class="ttc" id="astructjs_account_limits_html_a38875d969274b0f0fcefc6b04ce56eb8"><div class="ttname"><a href="structjs_account_limits.html#a38875d969274b0f0fcefc6b04ce56eb8">jsAccountLimits::MemoryMaxStreamBytes</a></div><div class="ttdeci">int64_t MemoryMaxStreamBytes</div><div class="ttdef"><b>Definition:</b> nats.h:952</div></div>
+<div class="ttc" id="astructjs_account_limits_html_a4710a10950857a322c2a3ad6f946ded2"><div class="ttname"><a href="structjs_account_limits.html#a4710a10950857a322c2a3ad6f946ded2">jsAccountLimits::MaxStreams</a></div><div class="ttdeci">int64_t MaxStreams</div><div class="ttdef"><b>Definition:</b> nats.h:949</div></div>
+<div class="ttc" id="astructjs_account_limits_html_a4abf1972690c20d73bd314f2059e8013"><div class="ttname"><a href="structjs_account_limits.html#a4abf1972690c20d73bd314f2059e8013">jsAccountLimits::MaxAckPending</a></div><div class="ttdeci">int64_t MaxAckPending</div><div class="ttdef"><b>Definition:</b> nats.h:951</div></div>
+<div class="ttc" id="astructjs_account_limits_html_a6169f29101d51d48eed0803b719e6338"><div class="ttname"><a href="structjs_account_limits.html#a6169f29101d51d48eed0803b719e6338">jsAccountLimits::MaxConsumers</a></div><div class="ttdeci">int64_t MaxConsumers</div><div class="ttdef"><b>Definition:</b> nats.h:950</div></div>
+<div class="ttc" id="astructjs_account_limits_html_a6fff014c46739410ecf298b0cf643b30"><div class="ttname"><a href="structjs_account_limits.html#a6fff014c46739410ecf298b0cf643b30">jsAccountLimits::MaxStore</a></div><div class="ttdeci">int64_t MaxStore</div><div class="ttdef"><b>Definition:</b> nats.h:948</div></div>
+<div class="ttc" id="astructjs_account_limits_html_a7bfc63e6f49ce724663ee534c5efdfa4"><div class="ttname"><a href="structjs_account_limits.html#a7bfc63e6f49ce724663ee534c5efdfa4">jsAccountLimits::MaxMemory</a></div><div class="ttdeci">int64_t MaxMemory</div><div class="ttdef"><b>Definition:</b> nats.h:947</div></div>
+<div class="ttc" id="astructjs_account_limits_html_a858edf99ee1c60354bdba4e59293fb6a"><div class="ttname"><a href="structjs_account_limits.html#a858edf99ee1c60354bdba4e59293fb6a">jsAccountLimits::MaxBytesRequired</a></div><div class="ttdeci">bool MaxBytesRequired</div><div class="ttdef"><b>Definition:</b> nats.h:954</div></div>
+<div class="ttc" id="astructjs_account_limits_html_a8cca06ab72b715c02a6a2c72b59f6a52"><div class="ttname"><a href="structjs_account_limits.html#a8cca06ab72b715c02a6a2c72b59f6a52">jsAccountLimits::StoreMaxStreamBytes</a></div><div class="ttdeci">int64_t StoreMaxStreamBytes</div><div class="ttdef"><b>Definition:</b> nats.h:953</div></div>
+<div class="ttc" id="astructjs_cluster_info_html"><div class="ttname"><a href="structjs_cluster_info.html">jsClusterInfo</a></div><div class="ttdef"><b>Definition:</b> nats.h:614</div></div>
+<div class="ttc" id="astructjs_cluster_info_html_a237a639579def1345e02f1490a510ed5"><div class="ttname"><a href="structjs_cluster_info.html#a237a639579def1345e02f1490a510ed5">jsClusterInfo::ReplicasLen</a></div><div class="ttdeci">int ReplicasLen</div><div class="ttdef"><b>Definition:</b> nats.h:618</div></div>
+<div class="ttc" id="astructjs_cluster_info_html_a2e13d7ec417574100c938c4df78e5484"><div class="ttname"><a href="structjs_cluster_info.html#a2e13d7ec417574100c938c4df78e5484">jsClusterInfo::Name</a></div><div class="ttdeci">char * Name</div><div class="ttdef"><b>Definition:</b> nats.h:615</div></div>
+<div class="ttc" id="astructjs_cluster_info_html_a8dfcae3bc348a5b595b509e3f3d3500b"><div class="ttname"><a href="structjs_cluster_info.html#a8dfcae3bc348a5b595b509e3f3d3500b">jsClusterInfo::Replicas</a></div><div class="ttdeci">jsPeerInfo ** Replicas</div><div class="ttdef"><b>Definition:</b> nats.h:617</div></div>
+<div class="ttc" id="astructjs_cluster_info_html_af7d85652b52f56fa1eedce8f45fe6a19"><div class="ttname"><a href="structjs_cluster_info.html#af7d85652b52f56fa1eedce8f45fe6a19">jsClusterInfo::Leader</a></div><div class="ttdeci">char * Leader</div><div class="ttdef"><b>Definition:</b> nats.h:616</div></div>
+<div class="ttc" id="astructjs_consumer_config_html"><div class="ttname"><a href="structjs_consumer_config.html">jsConsumerConfig</a></div><div class="ttdef"><b>Definition:</b> nats.h:717</div></div>
+<div class="ttc" id="astructjs_consumer_config_html_a046177256938d6a601c629f9fd82f888"><div class="ttname"><a href="structjs_consumer_config.html#a046177256938d6a601c629f9fd82f888">jsConsumerConfig::MemoryStorage</a></div><div class="ttdeci">bool MemoryStorage</div><div class="ttdef"><b>Definition:</b> nats.h:754</div></div>
+<div class="ttc" id="astructjs_consumer_config_html_a201217d93cfed17eb4d3e2d9579b826a"><div class="ttname"><a href="structjs_consumer_config.html#a201217d93cfed17eb4d3e2d9579b826a">jsConsumerConfig::Name</a></div><div class="ttdeci">const char * Name</div><div class="ttdef"><b>Definition:</b> nats.h:718</div></div>
+<div class="ttc" id="astructjs_consumer_config_html_a2f0243899885dc97f304f48ca52b5356"><div class="ttname"><a href="structjs_consumer_config.html#a2f0243899885dc97f304f48ca52b5356">jsConsumerConfig::OptStartSeq</a></div><div class="ttdeci">uint64_t OptStartSeq</div><div class="ttdef"><b>Definition:</b> nats.h:722</div></div>
+<div class="ttc" id="astructjs_consumer_config_html_a30d4142bac47ab6dc583c5ee193704e6"><div class="ttname"><a href="structjs_consumer_config.html#a30d4142bac47ab6dc583c5ee193704e6">jsConsumerConfig::HeadersOnly</a></div><div class="ttdeci">bool HeadersOnly</div><div class="ttdef"><b>Definition:</b> nats.h:737</div></div>
+<div class="ttc" id="astructjs_consumer_config_html_a351b388a36ccb7978e6e85a6f4fc0816"><div class="ttname"><a href="structjs_consumer_config.html#a351b388a36ccb7978e6e85a6f4fc0816">jsConsumerConfig::RateLimit</a></div><div class="ttdeci">uint64_t RateLimit</div><div class="ttdef"><b>Definition:</b> nats.h:731</div></div>
+<div class="ttc" id="astructjs_consumer_config_html_a364127e68bf0d3bf13efdc0b416667f4"><div class="ttname"><a href="structjs_consumer_config.html#a364127e68bf0d3bf13efdc0b416667f4">jsConsumerConfig::DeliverPolicy</a></div><div class="ttdeci">jsDeliverPolicy DeliverPolicy</div><div class="ttdef"><b>Definition:</b> nats.h:721</div></div>
+<div class="ttc" id="astructjs_consumer_config_html_a36a14d666d99bdade87a5e21a25491d6"><div class="ttname"><a href="structjs_consumer_config.html#a36a14d666d99bdade87a5e21a25491d6">jsConsumerConfig::Description</a></div><div class="ttdeci">const char * Description</div><div class="ttdef"><b>Definition:</b> nats.h:720</div></div>
+<div class="ttc" id="astructjs_consumer_config_html_a36cf121162cf0b40edf051991d851ee0"><div class="ttname"><a href="structjs_consumer_config.html#a36cf121162cf0b40edf051991d851ee0">jsConsumerConfig::Durable</a></div><div class="ttdeci">const char * Durable</div><div class="ttdef"><b>Definition:</b> nats.h:719</div></div>
+<div class="ttc" id="astructjs_consumer_config_html_a43f40b8eef0074b4146fb945b4645584"><div class="ttname"><a href="structjs_consumer_config.html#a43f40b8eef0074b4146fb945b4645584">jsConsumerConfig::SampleFrequency</a></div><div class="ttdeci">const char * SampleFrequency</div><div class="ttdef"><b>Definition:</b> nats.h:732</div></div>
+<div class="ttc" id="astructjs_consumer_config_html_a484c64b6c54f6f758f54315470ed20d0"><div class="ttname"><a href="structjs_consumer_config.html#a484c64b6c54f6f758f54315470ed20d0">jsConsumerConfig::FlowControl</a></div><div class="ttdeci">bool FlowControl</div><div class="ttdef"><b>Definition:</b> nats.h:735</div></div>
+<div class="ttc" id="astructjs_consumer_config_html_a4e86deefe08854b9a82b4908397aad32"><div class="ttname"><a href="structjs_consumer_config.html#a4e86deefe08854b9a82b4908397aad32">jsConsumerConfig::MaxRequestBatch</a></div><div class="ttdeci">int64_t MaxRequestBatch</div><div class="ttdoc">Maximum Pull Consumer request batch size.</div><div class="ttdef"><b>Definition:</b> nats.h:740</div></div>
+<div class="ttc" id="astructjs_consumer_config_html_a651a94b9b78668dde830dc7869610e67"><div class="ttname"><a href="structjs_consumer_config.html#a651a94b9b78668dde830dc7869610e67">jsConsumerConfig::AckWait</a></div><div class="ttdeci">int64_t AckWait</div><div class="ttdef"><b>Definition:</b> nats.h:725</div></div>
+<div class="ttc" id="astructjs_consumer_config_html_a74a026cdd92c538bcf84297f4468bb21"><div class="ttname"><a href="structjs_consumer_config.html#a74a026cdd92c538bcf84297f4468bb21">jsConsumerConfig::MaxRequestMaxBytes</a></div><div class="ttdeci">int64_t MaxRequestMaxBytes</div><div class="ttdoc">Maximum Pull Consumer request maximum bytes.</div><div class="ttdef"><b>Definition:</b> nats.h:742</div></div>
+<div class="ttc" id="astructjs_consumer_config_html_a802ea3bf0669395bee28611f4ecede80"><div class="ttname"><a href="structjs_consumer_config.html#a802ea3bf0669395bee28611f4ecede80">jsConsumerConfig::OptStartTime</a></div><div class="ttdeci">int64_t OptStartTime</div><div class="ttdoc">UTC time expressed as number of nanoseconds since epoch.</div><div class="ttdef"><b>Definition:</b> nats.h:723</div></div>
+<div class="ttc" id="astructjs_consumer_config_html_a8472d49fae908ab0291b4d62c8411b76"><div class="ttname"><a href="structjs_consumer_config.html#a8472d49fae908ab0291b4d62c8411b76">jsConsumerConfig::MaxWaiting</a></div><div class="ttdeci">int64_t MaxWaiting</div><div class="ttdef"><b>Definition:</b> nats.h:733</div></div>
+<div class="ttc" id="astructjs_consumer_config_html_a8a311af614dfae1b0f4e4af7db467aab"><div class="ttname"><a href="structjs_consumer_config.html#a8a311af614dfae1b0f4e4af7db467aab">jsConsumerConfig::AckPolicy</a></div><div class="ttdeci">jsAckPolicy AckPolicy</div><div class="ttdef"><b>Definition:</b> nats.h:724</div></div>
+<div class="ttc" id="astructjs_consumer_config_html_a95aa4184ed77f69b7674756572da1ded"><div class="ttname"><a href="structjs_consumer_config.html#a95aa4184ed77f69b7674756572da1ded">jsConsumerConfig::DeliverSubject</a></div><div class="ttdeci">const char * DeliverSubject</div><div class="ttdef"><b>Definition:</b> nats.h:745</div></div>
+<div class="ttc" id="astructjs_consumer_config_html_aa2d0aff64a2c46122d0f0fe89e8ae011"><div class="ttname"><a href="structjs_consumer_config.html#aa2d0aff64a2c46122d0f0fe89e8ae011">jsConsumerConfig::BackOff</a></div><div class="ttdeci">int64_t * BackOff</div><div class="ttdoc">Redelivery durations expressed in nanoseconds.</div><div class="ttdef"><b>Definition:</b> nats.h:727</div></div>
+<div class="ttc" id="astructjs_consumer_config_html_aa71aa3dfe5826466be301097b1bae04d"><div class="ttname"><a href="structjs_consumer_config.html#aa71aa3dfe5826466be301097b1bae04d">jsConsumerConfig::MaxRequestExpires</a></div><div class="ttdeci">int64_t MaxRequestExpires</div><div class="ttdoc">Maximum Pull Consumer request expiration, expressed in number of nanoseconds.</div><div class="ttdef"><b>Definition:</b> nats.h:741</div></div>
+<div class="ttc" id="astructjs_consumer_config_html_ac439828c3bedb8826a1e92de13280d53"><div class="ttname"><a href="structjs_consumer_config.html#ac439828c3bedb8826a1e92de13280d53">jsConsumerConfig::Heartbeat</a></div><div class="ttdeci">int64_t Heartbeat</div><div class="ttdoc">Heartbeat interval expressed in number of nanoseconds.</div><div class="ttdef"><b>Definition:</b> nats.h:736</div></div>
+<div class="ttc" id="astructjs_consumer_config_html_acfba6d6ecb6323fd8ffe6c0bb4fbffae"><div class="ttname"><a href="structjs_consumer_config.html#acfba6d6ecb6323fd8ffe6c0bb4fbffae">jsConsumerConfig::Replicas</a></div><div class="ttdeci">int64_t Replicas</div><div class="ttdef"><b>Definition:</b> nats.h:752</div></div>
+<div class="ttc" id="astructjs_consumer_config_html_ad2f6ca3f2d0f977aedb8687c462c1cfc"><div class="ttname"><a href="structjs_consumer_config.html#ad2f6ca3f2d0f977aedb8687c462c1cfc">jsConsumerConfig::BackOffLen</a></div><div class="ttdeci">int BackOffLen</div><div class="ttdef"><b>Definition:</b> nats.h:728</div></div>
+<div class="ttc" id="astructjs_consumer_config_html_ad47e15e1d6a4a8b0b155f9d3d5873c95"><div class="ttname"><a href="structjs_consumer_config.html#ad47e15e1d6a4a8b0b155f9d3d5873c95">jsConsumerConfig::MaxDeliver</a></div><div class="ttdeci">int64_t MaxDeliver</div><div class="ttdef"><b>Definition:</b> nats.h:726</div></div>
+<div class="ttc" id="astructjs_consumer_config_html_ade510daf7c5d67553d2cd20b64ab9939"><div class="ttname"><a href="structjs_consumer_config.html#ade510daf7c5d67553d2cd20b64ab9939">jsConsumerConfig::ReplayPolicy</a></div><div class="ttdeci">jsReplayPolicy ReplayPolicy</div><div class="ttdef"><b>Definition:</b> nats.h:730</div></div>
+<div class="ttc" id="astructjs_consumer_config_html_ae0765f3b5effe365187d3cf809c6ed3c"><div class="ttname"><a href="structjs_consumer_config.html#ae0765f3b5effe365187d3cf809c6ed3c">jsConsumerConfig::DeliverGroup</a></div><div class="ttdeci">const char * DeliverGroup</div><div class="ttdef"><b>Definition:</b> nats.h:746</div></div>
+<div class="ttc" id="astructjs_consumer_config_html_aeb2336d480e3885385d1b08410e89892"><div class="ttname"><a href="structjs_consumer_config.html#aeb2336d480e3885385d1b08410e89892">jsConsumerConfig::MaxAckPending</a></div><div class="ttdeci">int64_t MaxAckPending</div><div class="ttdef"><b>Definition:</b> nats.h:734</div></div>
+<div class="ttc" id="astructjs_consumer_config_html_af56ab7708b11e85e0b9115d152d281ca"><div class="ttname"><a href="structjs_consumer_config.html#af56ab7708b11e85e0b9115d152d281ca">jsConsumerConfig::FilterSubject</a></div><div class="ttdeci">const char * FilterSubject</div><div class="ttdef"><b>Definition:</b> nats.h:729</div></div>
+<div class="ttc" id="astructjs_consumer_config_html_af6376a6009124c25d7016bc548f3855d"><div class="ttname"><a href="structjs_consumer_config.html#af6376a6009124c25d7016bc548f3855d">jsConsumerConfig::InactiveThreshold</a></div><div class="ttdeci">int64_t InactiveThreshold</div><div class="ttdoc">How long the server keeps an ephemeral after detecting loss of interest, expressed in number of nanos...</div><div class="ttdef"><b>Definition:</b> nats.h:749</div></div>
+<div class="ttc" id="astructjs_consumer_info_html"><div class="ttname"><a href="structjs_consumer_info.html">jsConsumerInfo</a></div><div class="ttdef"><b>Definition:</b> nats.h:888</div></div>
+<div class="ttc" id="astructjs_consumer_info_html_a15f2d68fbf126acc1907ba9462ad9ee9"><div class="ttname"><a href="structjs_consumer_info.html#a15f2d68fbf126acc1907ba9462ad9ee9">jsConsumerInfo::Delivered</a></div><div class="ttdeci">jsSequenceInfo Delivered</div><div class="ttdef"><b>Definition:</b> nats.h:893</div></div>
+<div class="ttc" id="astructjs_consumer_info_html_a2f63940ca1f024ad3840418c2f6a1ae1"><div class="ttname"><a href="structjs_consumer_info.html#a2f63940ca1f024ad3840418c2f6a1ae1">jsConsumerInfo::Config</a></div><div class="ttdeci">jsConsumerConfig * Config</div><div class="ttdef"><b>Definition:</b> nats.h:892</div></div>
+<div class="ttc" id="astructjs_consumer_info_html_a31282cdc72000a91af03f89899740bfa"><div class="ttname"><a href="structjs_consumer_info.html#a31282cdc72000a91af03f89899740bfa">jsConsumerInfo::PushBound</a></div><div class="ttdeci">bool PushBound</div><div class="ttdef"><b>Definition:</b> nats.h:900</div></div>
+<div class="ttc" id="astructjs_consumer_info_html_a57e4a4139310c50a1f3d51af67197af0"><div class="ttname"><a href="structjs_consumer_info.html#a57e4a4139310c50a1f3d51af67197af0">jsConsumerInfo::NumWaiting</a></div><div class="ttdeci">int64_t NumWaiting</div><div class="ttdef"><b>Definition:</b> nats.h:897</div></div>
+<div class="ttc" id="astructjs_consumer_info_html_a670d38f2e9ba5c354ca3560a8064d00c"><div class="ttname"><a href="structjs_consumer_info.html#a670d38f2e9ba5c354ca3560a8064d00c">jsConsumerInfo::Created</a></div><div class="ttdeci">int64_t Created</div><div class="ttdoc">UTC time expressed as number of nanoseconds since epoch.</div><div class="ttdef"><b>Definition:</b> nats.h:891</div></div>
+<div class="ttc" id="astructjs_consumer_info_html_a6f4401563a9fd102226d82cdc6136e32"><div class="ttname"><a href="structjs_consumer_info.html#a6f4401563a9fd102226d82cdc6136e32">jsConsumerInfo::Cluster</a></div><div class="ttdeci">jsClusterInfo * Cluster</div><div class="ttdef"><b>Definition:</b> nats.h:899</div></div>
+<div class="ttc" id="astructjs_consumer_info_html_a882bebeb7af80fcce088afdf2c98de50"><div class="ttname"><a href="structjs_consumer_info.html#a882bebeb7af80fcce088afdf2c98de50">jsConsumerInfo::NumAckPending</a></div><div class="ttdeci">int64_t NumAckPending</div><div class="ttdef"><b>Definition:</b> nats.h:895</div></div>
+<div class="ttc" id="astructjs_consumer_info_html_a8f21939613163a7c0ebfb521aa471260"><div class="ttname"><a href="structjs_consumer_info.html#a8f21939613163a7c0ebfb521aa471260">jsConsumerInfo::Stream</a></div><div class="ttdeci">char * Stream</div><div class="ttdef"><b>Definition:</b> nats.h:889</div></div>
+<div class="ttc" id="astructjs_consumer_info_html_a932bf14ebb9ce167af8975e3b1f8d001"><div class="ttname"><a href="structjs_consumer_info.html#a932bf14ebb9ce167af8975e3b1f8d001">jsConsumerInfo::NumRedelivered</a></div><div class="ttdeci">int64_t NumRedelivered</div><div class="ttdef"><b>Definition:</b> nats.h:896</div></div>
+<div class="ttc" id="astructjs_consumer_info_html_a9359aea7cd05a27b2a15f8a35cdb1008"><div class="ttname"><a href="structjs_consumer_info.html#a9359aea7cd05a27b2a15f8a35cdb1008">jsConsumerInfo::Name</a></div><div class="ttdeci">char * Name</div><div class="ttdef"><b>Definition:</b> nats.h:890</div></div>
+<div class="ttc" id="astructjs_consumer_info_html_ab69c36ae092df9b0663b675a5abbab55"><div class="ttname"><a href="structjs_consumer_info.html#ab69c36ae092df9b0663b675a5abbab55">jsConsumerInfo::AckFloor</a></div><div class="ttdeci">jsSequenceInfo AckFloor</div><div class="ttdef"><b>Definition:</b> nats.h:894</div></div>
+<div class="ttc" id="astructjs_consumer_info_html_aeaefd5a500996013b1ce13d8872e869b"><div class="ttname"><a href="structjs_consumer_info.html#aeaefd5a500996013b1ce13d8872e869b">jsConsumerInfo::NumPending</a></div><div class="ttdeci">uint64_t NumPending</div><div class="ttdef"><b>Definition:</b> nats.h:898</div></div>
+<div class="ttc" id="astructjs_consumer_info_list_html"><div class="ttname"><a href="structjs_consumer_info_list.html">jsConsumerInfoList</a></div><div class="ttdef"><b>Definition:</b> nats.h:912</div></div>
+<div class="ttc" id="astructjs_consumer_info_list_html_a75354882af5e11959b198a70bde14db8"><div class="ttname"><a href="structjs_consumer_info_list.html#a75354882af5e11959b198a70bde14db8">jsConsumerInfoList::List</a></div><div class="ttdeci">jsConsumerInfo ** List</div><div class="ttdef"><b>Definition:</b> nats.h:913</div></div>
+<div class="ttc" id="astructjs_consumer_info_list_html_a813c908362a6426a929133f7c0d3395f"><div class="ttname"><a href="structjs_consumer_info_list.html#a813c908362a6426a929133f7c0d3395f">jsConsumerInfoList::Count</a></div><div class="ttdeci">int Count</div><div class="ttdef"><b>Definition:</b> nats.h:914</div></div>
+<div class="ttc" id="astructjs_consumer_names_list_html"><div class="ttname"><a href="structjs_consumer_names_list.html">jsConsumerNamesList</a></div><div class="ttdef"><b>Definition:</b> nats.h:926</div></div>
+<div class="ttc" id="astructjs_consumer_names_list_html_a0bccbad8ac5d335a0ed89970a58900fb"><div class="ttname"><a href="structjs_consumer_names_list.html#a0bccbad8ac5d335a0ed89970a58900fb">jsConsumerNamesList::Count</a></div><div class="ttdeci">int Count</div><div class="ttdef"><b>Definition:</b> nats.h:928</div></div>
+<div class="ttc" id="astructjs_consumer_names_list_html_aa4b3cf17902a2d580cc3a230bfa5d309"><div class="ttname"><a href="structjs_consumer_names_list.html#aa4b3cf17902a2d580cc3a230bfa5d309">jsConsumerNamesList::List</a></div><div class="ttdeci">char ** List</div><div class="ttdef"><b>Definition:</b> nats.h:927</div></div>
+<div class="ttc" id="astructjs_consumer_sequence_mismatch_html"><div class="ttname"><a href="structjs_consumer_sequence_mismatch.html">jsConsumerSequenceMismatch</a></div><div class="ttdef"><b>Definition:</b> nats.h:776</div></div>
+<div class="ttc" id="astructjs_consumer_sequence_mismatch_html_aad6a17af1719c023c38a6fd254b73f8e"><div class="ttname"><a href="structjs_consumer_sequence_mismatch.html#aad6a17af1719c023c38a6fd254b73f8e">jsConsumerSequenceMismatch::Stream</a></div><div class="ttdeci">uint64_t Stream</div><div class="ttdoc">This is the stream sequence that the application should resume from.</div><div class="ttdef"><b>Definition:</b> nats.h:777</div></div>
+<div class="ttc" id="astructjs_consumer_sequence_mismatch_html_ac1df353001d853c8a56cef9f82fb831c"><div class="ttname"><a href="structjs_consumer_sequence_mismatch.html#ac1df353001d853c8a56cef9f82fb831c">jsConsumerSequenceMismatch::ConsumerServer</a></div><div class="ttdeci">uint64_t ConsumerServer</div><div class="ttdoc">This is the consumer sequence last sent by the server.</div><div class="ttdef"><b>Definition:</b> nats.h:779</div></div>
+<div class="ttc" id="astructjs_consumer_sequence_mismatch_html_adb383429dadb1ab0e1f7d013bc546a28"><div class="ttname"><a href="structjs_consumer_sequence_mismatch.html#adb383429dadb1ab0e1f7d013bc546a28">jsConsumerSequenceMismatch::ConsumerClient</a></div><div class="ttdeci">uint64_t ConsumerClient</div><div class="ttdoc">This is the consumer sequence that was last received by the library.</div><div class="ttdef"><b>Definition:</b> nats.h:778</div></div>
+<div class="ttc" id="astructjs_direct_get_msg_options_html"><div class="ttname"><a href="structjs_direct_get_msg_options.html">jsDirectGetMsgOptions</a></div><div class="ttdef"><b>Definition:</b> nats.h:1046</div></div>
+<div class="ttc" id="astructjs_direct_get_msg_options_html_a16ce7908a3d1690b8ae8bc22350ac238"><div class="ttname"><a href="structjs_direct_get_msg_options.html#a16ce7908a3d1690b8ae8bc22350ac238">jsDirectGetMsgOptions::NextBySubject</a></div><div class="ttdeci">const char * NextBySubject</div><div class="ttdoc">Get the next message (based on sequence) for that subject.</div><div class="ttdef"><b>Definition:</b> nats.h:1048</div></div>
+<div class="ttc" id="astructjs_direct_get_msg_options_html_a60211d7499cfecdd6e61e6c73af1a2f5"><div class="ttname"><a href="structjs_direct_get_msg_options.html#a60211d7499cfecdd6e61e6c73af1a2f5">jsDirectGetMsgOptions::Sequence</a></div><div class="ttdeci">uint64_t Sequence</div><div class="ttdoc">Get the message at this sequence.</div><div class="ttdef"><b>Definition:</b> nats.h:1047</div></div>
+<div class="ttc" id="astructjs_direct_get_msg_options_html_aae968f31cdda96fa3c5e9374a36b9630"><div class="ttname"><a href="structjs_direct_get_msg_options.html#aae968f31cdda96fa3c5e9374a36b9630">jsDirectGetMsgOptions::LastBySubject</a></div><div class="ttdeci">const char * LastBySubject</div><div class="ttdoc">Get the last message on that subject.</div><div class="ttdef"><b>Definition:</b> nats.h:1049</div></div>
+<div class="ttc" id="astructjs_external_stream_html"><div class="ttname"><a href="structjs_external_stream.html">jsExternalStream</a></div><div class="ttdef"><b>Definition:</b> nats.h:353</div></div>
+<div class="ttc" id="astructjs_external_stream_html_a26ca427f3c5be1cae579ddccc16432d3"><div class="ttname"><a href="structjs_external_stream.html#a26ca427f3c5be1cae579ddccc16432d3">jsExternalStream::DeliverPrefix</a></div><div class="ttdeci">const char * DeliverPrefix</div><div class="ttdef"><b>Definition:</b> nats.h:355</div></div>
+<div class="ttc" id="astructjs_external_stream_html_a2eaf2c0c3e77c269f44e254af8b24e96"><div class="ttname"><a href="structjs_external_stream.html#a2eaf2c0c3e77c269f44e254af8b24e96">jsExternalStream::APIPrefix</a></div><div class="ttdeci">const char * APIPrefix</div><div class="ttdef"><b>Definition:</b> nats.h:354</div></div>
+<div class="ttc" id="astructjs_fetch_request_html"><div class="ttname"><a href="structjs_fetch_request.html">jsFetchRequest</a></div><div class="ttdef"><b>Definition:</b> nats.h:1059</div></div>
+<div class="ttc" id="astructjs_fetch_request_html_a3298db691c2ecb9725cc029e2c35d6d1"><div class="ttname"><a href="structjs_fetch_request.html#a3298db691c2ecb9725cc029e2c35d6d1">jsFetchRequest::MaxBytes</a></div><div class="ttdeci">int64_t MaxBytes</div><div class="ttdoc">Maximum bytes for the request (request complete based on whichever Batch or MaxBytes comes first)</div><div class="ttdef"><b>Definition:</b> nats.h:1062</div></div>
+<div class="ttc" id="astructjs_fetch_request_html_a84f06b60e25decb2674996f0cb315f63"><div class="ttname"><a href="structjs_fetch_request.html#a84f06b60e25decb2674996f0cb315f63">jsFetchRequest::Batch</a></div><div class="ttdeci">int Batch</div><div class="ttdoc">Maximum number of messages to be received (see MaxBytes)</div><div class="ttdef"><b>Definition:</b> nats.h:1061</div></div>
+<div class="ttc" id="astructjs_fetch_request_html_ac3351138ce8ac3b321ac1eb78887116e"><div class="ttname"><a href="structjs_fetch_request.html#ac3351138ce8ac3b321ac1eb78887116e">jsFetchRequest::Expires</a></div><div class="ttdeci">int64_t Expires</div><div class="ttdoc">Expiration of the request, expressed in nanoseconds.</div><div class="ttdef"><b>Definition:</b> nats.h:1060</div></div>
+<div class="ttc" id="astructjs_fetch_request_html_ae251eebb1998a39fe3b898302b58293d"><div class="ttname"><a href="structjs_fetch_request.html#ae251eebb1998a39fe3b898302b58293d">jsFetchRequest::NoWait</a></div><div class="ttdeci">bool NoWait</div><div class="ttdoc">Will not wait if the request cannot be completed.</div><div class="ttdef"><b>Definition:</b> nats.h:1063</div></div>
+<div class="ttc" id="astructjs_fetch_request_html_ae8e73c7cc2e2a2d2502407c9b1522496"><div class="ttname"><a href="structjs_fetch_request.html#ae8e73c7cc2e2a2d2502407c9b1522496">jsFetchRequest::Heartbeat</a></div><div class="ttdeci">int64_t Heartbeat</div><div class="ttdoc">Have server sends heartbeats to help detect communication failures.</div><div class="ttdef"><b>Definition:</b> nats.h:1064</div></div>
+<div class="ttc" id="astructjs_lost_stream_data_html"><div class="ttname"><a href="structjs_lost_stream_data.html">jsLostStreamData</a></div><div class="ttdef"><b>Definition:</b> nats.h:516</div></div>
+<div class="ttc" id="astructjs_lost_stream_data_html_a5d2e87697526033c842a7f955776dfda"><div class="ttname"><a href="structjs_lost_stream_data.html#a5d2e87697526033c842a7f955776dfda">jsLostStreamData::Msgs</a></div><div class="ttdeci">uint64_t * Msgs</div><div class="ttdef"><b>Definition:</b> nats.h:517</div></div>
+<div class="ttc" id="astructjs_lost_stream_data_html_a841fcadca3f66e9170a51080dc1acf30"><div class="ttname"><a href="structjs_lost_stream_data.html#a841fcadca3f66e9170a51080dc1acf30">jsLostStreamData::Bytes</a></div><div class="ttdeci">uint64_t Bytes</div><div class="ttdef"><b>Definition:</b> nats.h:519</div></div>
+<div class="ttc" id="astructjs_lost_stream_data_html_abdc373ed7fc9b7cf161c13da1913fc9a"><div class="ttname"><a href="structjs_lost_stream_data.html#abdc373ed7fc9b7cf161c13da1913fc9a">jsLostStreamData::MsgsLen</a></div><div class="ttdeci">int MsgsLen</div><div class="ttdef"><b>Definition:</b> nats.h:518</div></div>
+<div class="ttc" id="astructjs_msg_meta_data_html"><div class="ttname"><a href="structjs_msg_meta_data.html">jsMsgMetaData</a></div><div class="ttdef"><b>Definition:</b> nats.h:994</div></div>
+<div class="ttc" id="astructjs_msg_meta_data_html_a02f1bbd37e9650ed6bfda0210f038e30"><div class="ttname"><a href="structjs_msg_meta_data.html#a02f1bbd37e9650ed6bfda0210f038e30">jsMsgMetaData::NumPending</a></div><div class="ttdeci">uint64_t NumPending</div><div class="ttdef"><b>Definition:</b> nats.h:997</div></div>
+<div class="ttc" id="astructjs_msg_meta_data_html_a23d5fd1992033164c73d5c2a16a4e321"><div class="ttname"><a href="structjs_msg_meta_data.html#a23d5fd1992033164c73d5c2a16a4e321">jsMsgMetaData::Sequence</a></div><div class="ttdeci">jsSequencePair Sequence</div><div class="ttdef"><b>Definition:</b> nats.h:995</div></div>
+<div class="ttc" id="astructjs_msg_meta_data_html_a32e2a9438d2dc769f7f64d2f8897abc4"><div class="ttname"><a href="structjs_msg_meta_data.html#a32e2a9438d2dc769f7f64d2f8897abc4">jsMsgMetaData::Stream</a></div><div class="ttdeci">char * Stream</div><div class="ttdef"><b>Definition:</b> nats.h:999</div></div>
+<div class="ttc" id="astructjs_msg_meta_data_html_a388e38ccea591181436d199dc7c2f8ea"><div class="ttname"><a href="structjs_msg_meta_data.html#a388e38ccea591181436d199dc7c2f8ea">jsMsgMetaData::Domain</a></div><div class="ttdeci">char * Domain</div><div class="ttdef"><b>Definition:</b> nats.h:1001</div></div>
+<div class="ttc" id="astructjs_msg_meta_data_html_a6dcc2a442984b0ca070b3d8077192127"><div class="ttname"><a href="structjs_msg_meta_data.html#a6dcc2a442984b0ca070b3d8077192127">jsMsgMetaData::Consumer</a></div><div class="ttdeci">char * Consumer</div><div class="ttdef"><b>Definition:</b> nats.h:1000</div></div>
+<div class="ttc" id="astructjs_msg_meta_data_html_a9a50965fac061a9728b160702d3f56ff"><div class="ttname"><a href="structjs_msg_meta_data.html#a9a50965fac061a9728b160702d3f56ff">jsMsgMetaData::NumDelivered</a></div><div class="ttdeci">uint64_t NumDelivered</div><div class="ttdef"><b>Definition:</b> nats.h:996</div></div>
+<div class="ttc" id="astructjs_msg_meta_data_html_abab9ed5600a3629ea6d6c78170d7d5e9"><div class="ttname"><a href="structjs_msg_meta_data.html#abab9ed5600a3629ea6d6c78170d7d5e9">jsMsgMetaData::Timestamp</a></div><div class="ttdeci">int64_t Timestamp</div><div class="ttdef"><b>Definition:</b> nats.h:998</div></div>
+<div class="ttc" id="astructjs_options_1_1js_options_publish_async_html"><div class="ttname"><a href="structjs_options_1_1js_options_publish_async.html">jsOptions::jsOptionsPublishAsync</a></div><div class="ttdef"><b>Definition:</b> nats.h:1083</div></div>
+<div class="ttc" id="astructjs_options_1_1js_options_publish_async_html_a0a180995c49990ca277e449b7d43616b"><div class="ttname"><a href="structjs_options_1_1js_options_publish_async.html#a0a180995c49990ca277e449b7d43616b">jsOptions::jsOptionsPublishAsync::ErrHandler</a></div><div class="ttdeci">jsPubAckErrHandler ErrHandler</div><div class="ttdoc">Callback invoked when error encountered publishing a given message.</div><div class="ttdef"><b>Definition:</b> nats.h:1098</div></div>
+<div class="ttc" id="astructjs_options_1_1js_options_publish_async_html_a508140119f40a2c056d4ee8c0cd55df9"><div class="ttname"><a href="structjs_options_1_1js_options_publish_async.html#a508140119f40a2c056d4ee8c0cd55df9">jsOptions::jsOptionsPublishAsync::AckHandler</a></div><div class="ttdeci">jsPubAckHandler AckHandler</div><div class="ttdoc">Callback invoked for each asynchronous published message.</div><div class="ttdef"><b>Definition:</b> nats.h:1091</div></div>
+<div class="ttc" id="astructjs_options_1_1js_options_publish_async_html_a60c95f10797c04ea2e625759c6936ec9"><div class="ttname"><a href="structjs_options_1_1js_options_publish_async.html#a60c95f10797c04ea2e625759c6936ec9">jsOptions::jsOptionsPublishAsync::AckHandlerClosure</a></div><div class="ttdeci">void * AckHandlerClosure</div><div class="ttdoc">Closure (or user data) passed to jsPubAckHandler callback.</div><div class="ttdef"><b>Definition:</b> nats.h:1092</div></div>
+<div class="ttc" id="astructjs_options_1_1js_options_publish_async_html_a784a0029c30e82ff37c39ae6c276bc81"><div class="ttname"><a href="structjs_options_1_1js_options_publish_async.html#a784a0029c30e82ff37c39ae6c276bc81">jsOptions::jsOptionsPublishAsync::ErrHandlerClosure</a></div><div class="ttdeci">void * ErrHandlerClosure</div><div class="ttdoc">Closure (or user data) passed to jsPubAckErrHandler callback.</div><div class="ttdef"><b>Definition:</b> nats.h:1099</div></div>
+<div class="ttc" id="astructjs_options_1_1js_options_publish_async_html_ada58fefe0ed40157b5f5d44b9dd175f9"><div class="ttname"><a href="structjs_options_1_1js_options_publish_async.html#ada58fefe0ed40157b5f5d44b9dd175f9">jsOptions::jsOptionsPublishAsync::StallWait</a></div><div class="ttdeci">int64_t StallWait</div><div class="ttdoc">Amount of time (in milliseconds) to wait in a PublishAsync call when there is MaxPending inflight mes...</div><div class="ttdef"><b>Definition:</b> nats.h:1101</div></div>
+<div class="ttc" id="astructjs_options_1_1js_options_publish_async_html_add8dd21cbab2d5df19688c26365fe4d1"><div class="ttname"><a href="structjs_options_1_1js_options_publish_async.html#add8dd21cbab2d5df19688c26365fe4d1">jsOptions::jsOptionsPublishAsync::MaxPending</a></div><div class="ttdeci">int64_t MaxPending</div><div class="ttdoc">Maximum outstanding asynchronous publishes that can be inflight at one time.</div><div class="ttdef"><b>Definition:</b> nats.h:1084</div></div>
+<div class="ttc" id="astructjs_options_1_1js_options_stream_1_1js_options_stream_info_html"><div class="ttname"><a href="structjs_options_1_1js_options_stream_1_1js_options_stream_info.html">jsOptions::jsOptionsStream::jsOptionsStreamInfo</a></div><div class="ttdef"><b>Definition:</b> nats.h:1134</div></div>
+<div class="ttc" id="astructjs_options_1_1js_options_stream_1_1js_options_stream_info_html_a73f847afe18f56eaaf6788900270bef7"><div class="ttname"><a href="structjs_options_1_1js_options_stream_1_1js_options_stream_info.html#a73f847afe18f56eaaf6788900270bef7">jsOptions::jsOptionsStream::jsOptionsStreamInfo::DeletedDetails</a></div><div class="ttdeci">bool DeletedDetails</div><div class="ttdoc">Get the list of deleted message sequences.</div><div class="ttdef"><b>Definition:</b> nats.h:1135</div></div>
+<div class="ttc" id="astructjs_options_1_1js_options_stream_1_1js_options_stream_info_html_af874e0f5aa15fb2a41504631ed786e6d"><div class="ttname"><a href="structjs_options_1_1js_options_stream_1_1js_options_stream_info.html#af874e0f5aa15fb2a41504631ed786e6d">jsOptions::jsOptionsStream::jsOptionsStreamInfo::SubjectsFilter</a></div><div class="ttdeci">const char * SubjectsFilter</div><div class="ttdoc">Get the list of subjects in this stream.</div><div class="ttdef"><b>Definition:</b> nats.h:1136</div></div>
+<div class="ttc" id="astructjs_options_1_1js_options_stream_1_1js_options_stream_purge_html"><div class="ttname"><a href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html">jsOptions::jsOptionsStream::jsOptionsStreamPurge</a></div><div class="ttdef"><b>Definition:</b> nats.h:1123</div></div>
+<div class="ttc" id="astructjs_options_1_1js_options_stream_1_1js_options_stream_purge_html_a0d61e5d3c9c518f455549086ababe7f6"><div class="ttname"><a href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#a0d61e5d3c9c518f455549086ababe7f6">jsOptions::jsOptionsStream::jsOptionsStreamPurge::Sequence</a></div><div class="ttdeci">uint64_t Sequence</div><div class="ttdoc">Purge up to but not including sequence.</div><div class="ttdef"><b>Definition:</b> nats.h:1125</div></div>
+<div class="ttc" id="astructjs_options_1_1js_options_stream_1_1js_options_stream_purge_html_a882c1ce1e636817450893caa72aa4eda"><div class="ttname"><a href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#a882c1ce1e636817450893caa72aa4eda">jsOptions::jsOptionsStream::jsOptionsStreamPurge::Keep</a></div><div class="ttdeci">uint64_t Keep</div><div class="ttdoc">Number of messages to keep.</div><div class="ttdef"><b>Definition:</b> nats.h:1126</div></div>
+<div class="ttc" id="astructjs_options_1_1js_options_stream_1_1js_options_stream_purge_html_aa99e6ee3bef1c22243f01544181315fe"><div class="ttname"><a href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#aa99e6ee3bef1c22243f01544181315fe">jsOptions::jsOptionsStream::jsOptionsStreamPurge::Subject</a></div><div class="ttdeci">const char * Subject</div><div class="ttdoc">This is the subject to match against messages for the purge command.</div><div class="ttdef"><b>Definition:</b> nats.h:1124</div></div>
+<div class="ttc" id="astructjs_options_1_1js_options_stream_html"><div class="ttname"><a href="structjs_options_1_1js_options_stream.html">jsOptions::jsOptionsStream</a></div><div class="ttdef"><b>Definition:</b> nats.h:1112</div></div>
+<div class="ttc" id="astructjs_options_1_1js_options_stream_html_a2ca89c298b4df1f5e3e0a44e205c789c"><div class="ttname"><a href="structjs_options_1_1js_options_stream.html#a2ca89c298b4df1f5e3e0a44e205c789c">jsOptions::jsOptionsStream::Info</a></div><div class="ttdeci">struct jsOptions::jsOptionsStream::jsOptionsStreamInfo Info</div><div class="ttdoc">Optional stream information retrieval options.</div></div>
+<div class="ttc" id="astructjs_options_1_1js_options_stream_html_afe680264223b434ca6959f9e122af029"><div class="ttname"><a href="structjs_options_1_1js_options_stream.html#afe680264223b434ca6959f9e122af029">jsOptions::jsOptionsStream::Purge</a></div><div class="ttdeci">struct jsOptions::jsOptionsStream::jsOptionsStreamPurge Purge</div><div class="ttdoc">Optional stream purge options.</div></div>
+<div class="ttc" id="astructjs_options_html"><div class="ttname"><a href="structjs_options.html">jsOptions</a></div><div class="ttdef"><b>Definition:</b> nats.h:1074</div></div>
+<div class="ttc" id="astructjs_options_html_a5ce5c11cc9b9df2b6bc47cd77d7b1dc4"><div class="ttname"><a href="structjs_options.html#a5ce5c11cc9b9df2b6bc47cd77d7b1dc4">jsOptions::PublishAsync</a></div><div class="ttdeci">struct jsOptions::jsOptionsPublishAsync PublishAsync</div></div>
+<div class="ttc" id="astructjs_options_html_a7fd42e1f83da5861e716137c16f8b72f"><div class="ttname"><a href="structjs_options.html#a7fd42e1f83da5861e716137c16f8b72f">jsOptions::Wait</a></div><div class="ttdeci">int64_t Wait</div><div class="ttdoc">Amount of time (in milliseconds) to wait for various JetStream API requests, default is 5000 ms (5 se...</div><div class="ttdef"><b>Definition:</b> nats.h:1077</div></div>
+<div class="ttc" id="astructjs_options_html_ab06e45296fccf0fe6152e083e38d916f"><div class="ttname"><a href="structjs_options.html#ab06e45296fccf0fe6152e083e38d916f">jsOptions::Prefix</a></div><div class="ttdeci">const char * Prefix</div><div class="ttdoc">JetStream prefix, default is &quot;$JS.API&quot;.</div><div class="ttdef"><b>Definition:</b> nats.h:1075</div></div>
+<div class="ttc" id="astructjs_options_html_ae4df6c9c01c0ea9ab0e6d5a6ec8af74e"><div class="ttname"><a href="structjs_options.html#ae4df6c9c01c0ea9ab0e6d5a6ec8af74e">jsOptions::Domain</a></div><div class="ttdeci">const char * Domain</div><div class="ttdoc">Domain changes the domain part of JetSteam API prefix.</div><div class="ttdef"><b>Definition:</b> nats.h:1076</div></div>
+<div class="ttc" id="astructjs_options_html_ae50544ee0ef8dd7d02ef9802805807ae"><div class="ttname"><a href="structjs_options.html#ae50544ee0ef8dd7d02ef9802805807ae">jsOptions::Stream</a></div><div class="ttdeci">struct jsOptions::jsOptionsStream Stream</div><div class="ttdoc">Optional stream options.</div></div>
+<div class="ttc" id="astructjs_peer_info_html"><div class="ttname"><a href="structjs_peer_info.html">jsPeerInfo</a></div><div class="ttdef"><b>Definition:</b> nats.h:600</div></div>
+<div class="ttc" id="astructjs_peer_info_html_a3f3e09c5996858ec5faca2dc7fa5224e"><div class="ttname"><a href="structjs_peer_info.html#a3f3e09c5996858ec5faca2dc7fa5224e">jsPeerInfo::Offline</a></div><div class="ttdeci">bool Offline</div><div class="ttdef"><b>Definition:</b> nats.h:603</div></div>
+<div class="ttc" id="astructjs_peer_info_html_a49a2623963dad653a6d7996c750056c9"><div class="ttname"><a href="structjs_peer_info.html#a49a2623963dad653a6d7996c750056c9">jsPeerInfo::Lag</a></div><div class="ttdeci">uint64_t Lag</div><div class="ttdef"><b>Definition:</b> nats.h:605</div></div>
+<div class="ttc" id="astructjs_peer_info_html_a8441d023932c388953197f7ea39402fe"><div class="ttname"><a href="structjs_peer_info.html#a8441d023932c388953197f7ea39402fe">jsPeerInfo::Active</a></div><div class="ttdeci">int64_t Active</div><div class="ttdef"><b>Definition:</b> nats.h:604</div></div>
+<div class="ttc" id="astructjs_peer_info_html_abf29230ce03a1c14d50227663e07de6a"><div class="ttname"><a href="structjs_peer_info.html#abf29230ce03a1c14d50227663e07de6a">jsPeerInfo::Name</a></div><div class="ttdeci">char * Name</div><div class="ttdef"><b>Definition:</b> nats.h:601</div></div>
+<div class="ttc" id="astructjs_peer_info_html_ad8cecd039a8ad1c68daba89007b055d4"><div class="ttname"><a href="structjs_peer_info.html#ad8cecd039a8ad1c68daba89007b055d4">jsPeerInfo::Current</a></div><div class="ttdeci">bool Current</div><div class="ttdef"><b>Definition:</b> nats.h:602</div></div>
+<div class="ttc" id="astructjs_placement_html"><div class="ttname"><a href="structjs_placement.html">jsPlacement</a></div><div class="ttdef"><b>Definition:</b> nats.h:336</div></div>
+<div class="ttc" id="astructjs_placement_html_a35644f07531409518521b1b4fa28c9e3"><div class="ttname"><a href="structjs_placement.html#a35644f07531409518521b1b4fa28c9e3">jsPlacement::TagsLen</a></div><div class="ttdeci">int TagsLen</div><div class="ttdef"><b>Definition:</b> nats.h:339</div></div>
+<div class="ttc" id="astructjs_placement_html_ad8c83588d57f0e30959cfb6f3d5d61bf"><div class="ttname"><a href="structjs_placement.html#ad8c83588d57f0e30959cfb6f3d5d61bf">jsPlacement::Cluster</a></div><div class="ttdeci">const char * Cluster</div><div class="ttdef"><b>Definition:</b> nats.h:337</div></div>
+<div class="ttc" id="astructjs_placement_html_af078a85b744b9ff3771bb2da6005b90d"><div class="ttname"><a href="structjs_placement.html#af078a85b744b9ff3771bb2da6005b90d">jsPlacement::Tags</a></div><div class="ttdeci">const char ** Tags</div><div class="ttdef"><b>Definition:</b> nats.h:338</div></div>
+<div class="ttc" id="astructjs_pub_ack_err_html"><div class="ttname"><a href="structjs_pub_ack_err.html">jsPubAckErr</a></div><div class="ttdef"><b>Definition:</b> nats.h:1022</div></div>
+<div class="ttc" id="astructjs_pub_ack_err_html_a156ca2f779d132ffa8c519124cf9739b"><div class="ttname"><a href="structjs_pub_ack_err.html#a156ca2f779d132ffa8c519124cf9739b">jsPubAckErr::Msg</a></div><div class="ttdeci">natsMsg * Msg</div><div class="ttdef"><b>Definition:</b> nats.h:1023</div></div>
+<div class="ttc" id="astructjs_pub_ack_err_html_a406e39e818f93bc59ac18cbdf035baf5"><div class="ttname"><a href="structjs_pub_ack_err.html#a406e39e818f93bc59ac18cbdf035baf5">jsPubAckErr::Err</a></div><div class="ttdeci">natsStatus Err</div><div class="ttdef"><b>Definition:</b> nats.h:1024</div></div>
+<div class="ttc" id="astructjs_pub_ack_err_html_aa558fd192cc6d6c02ad891445ec5aa8a"><div class="ttname"><a href="structjs_pub_ack_err.html#aa558fd192cc6d6c02ad891445ec5aa8a">jsPubAckErr::ErrCode</a></div><div class="ttdeci">jsErrCode ErrCode</div><div class="ttdef"><b>Definition:</b> nats.h:1025</div></div>
+<div class="ttc" id="astructjs_pub_ack_err_html_ad1a85e6ff4046d7df33c1e24323ddc87"><div class="ttname"><a href="structjs_pub_ack_err.html#ad1a85e6ff4046d7df33c1e24323ddc87">jsPubAckErr::ErrText</a></div><div class="ttdeci">const char * ErrText</div><div class="ttdef"><b>Definition:</b> nats.h:1026</div></div>
+<div class="ttc" id="astructjs_pub_ack_html"><div class="ttname"><a href="structjs_pub_ack.html">jsPubAck</a></div><div class="ttdef"><b>Definition:</b> nats.h:1009</div></div>
+<div class="ttc" id="astructjs_pub_ack_html_a01d302d5e1a2e71487a8c74c3fed1691"><div class="ttname"><a href="structjs_pub_ack.html#a01d302d5e1a2e71487a8c74c3fed1691">jsPubAck::Sequence</a></div><div class="ttdeci">uint64_t Sequence</div><div class="ttdef"><b>Definition:</b> nats.h:1011</div></div>
+<div class="ttc" id="astructjs_pub_ack_html_a0381a49ff62e8fac7a52cad6a5eb7243"><div class="ttname"><a href="structjs_pub_ack.html#a0381a49ff62e8fac7a52cad6a5eb7243">jsPubAck::Duplicate</a></div><div class="ttdeci">bool Duplicate</div><div class="ttdef"><b>Definition:</b> nats.h:1013</div></div>
+<div class="ttc" id="astructjs_pub_ack_html_a0b73200c0b035db3c9c96421706d51b0"><div class="ttname"><a href="structjs_pub_ack.html#a0b73200c0b035db3c9c96421706d51b0">jsPubAck::Domain</a></div><div class="ttdeci">char * Domain</div><div class="ttdef"><b>Definition:</b> nats.h:1012</div></div>
+<div class="ttc" id="astructjs_pub_ack_html_a4fd5e6cdb7217d72c553afcc75358893"><div class="ttname"><a href="structjs_pub_ack.html#a4fd5e6cdb7217d72c553afcc75358893">jsPubAck::Stream</a></div><div class="ttdeci">char * Stream</div><div class="ttdef"><b>Definition:</b> nats.h:1010</div></div>
+<div class="ttc" id="astructjs_pub_options_html"><div class="ttname"><a href="structjs_pub_options.html">jsPubOptions</a></div><div class="ttdef"><b>Definition:</b> nats.h:245</div></div>
+<div class="ttc" id="astructjs_pub_options_html_a095391b33a261586fc02eaf013b65e61"><div class="ttname"><a href="structjs_pub_options.html#a095391b33a261586fc02eaf013b65e61">jsPubOptions::ExpectLastMsgId</a></div><div class="ttdeci">const char * ExpectLastMsgId</div><div class="ttdoc">Expected last message ID in the stream.</div><div class="ttdef"><b>Definition:</b> nats.h:249</div></div>
+<div class="ttc" id="astructjs_pub_options_html_a1b242c9311b904a2e5337417b5c6d143"><div class="ttname"><a href="structjs_pub_options.html#a1b242c9311b904a2e5337417b5c6d143">jsPubOptions::MaxWait</a></div><div class="ttdeci">int64_t MaxWait</div><div class="ttdoc">Amount of time (in milliseconds) to wait for a publish response, default will the context's Wait valu...</div><div class="ttdef"><b>Definition:</b> nats.h:246</div></div>
+<div class="ttc" id="astructjs_pub_options_html_a3b02b60b05caa6d242079a4c26b181bf"><div class="ttname"><a href="structjs_pub_options.html#a3b02b60b05caa6d242079a4c26b181bf">jsPubOptions::ExpectLastSeq</a></div><div class="ttdeci">uint64_t ExpectLastSeq</div><div class="ttdoc">Expected last message sequence in the stream.</div><div class="ttdef"><b>Definition:</b> nats.h:250</div></div>
+<div class="ttc" id="astructjs_pub_options_html_a740a7edee8c832a75b75fded6046ba90"><div class="ttname"><a href="structjs_pub_options.html#a740a7edee8c832a75b75fded6046ba90">jsPubOptions::ExpectNoMessage</a></div><div class="ttdeci">bool ExpectNoMessage</div><div class="ttdoc">Expected no message (that is, sequence == 0) for the subject in the stream.</div><div class="ttdef"><b>Definition:</b> nats.h:252</div></div>
+<div class="ttc" id="astructjs_pub_options_html_ac7ac74d2557d772c3092288dacf3711f"><div class="ttname"><a href="structjs_pub_options.html#ac7ac74d2557d772c3092288dacf3711f">jsPubOptions::ExpectStream</a></div><div class="ttdeci">const char * ExpectStream</div><div class="ttdoc">Expected stream to respond from the publish call.</div><div class="ttdef"><b>Definition:</b> nats.h:248</div></div>
+<div class="ttc" id="astructjs_pub_options_html_ac8708487360b784f7dd5d7a21e5617c0"><div class="ttname"><a href="structjs_pub_options.html#ac8708487360b784f7dd5d7a21e5617c0">jsPubOptions::MsgId</a></div><div class="ttdeci">const char * MsgId</div><div class="ttdoc">Message ID used for de-duplication.</div><div class="ttdef"><b>Definition:</b> nats.h:247</div></div>
+<div class="ttc" id="astructjs_pub_options_html_aeefec1d2c7644562d23b87e55bf2e253"><div class="ttname"><a href="structjs_pub_options.html#aeefec1d2c7644562d23b87e55bf2e253">jsPubOptions::ExpectLastSubjectSeq</a></div><div class="ttdeci">uint64_t ExpectLastSubjectSeq</div><div class="ttdoc">Expected last message sequence for the subject in the stream.</div><div class="ttdef"><b>Definition:</b> nats.h:251</div></div>
+<div class="ttc" id="astructjs_re_publish_html"><div class="ttname"><a href="structjs_re_publish.html">jsRePublish</a></div><div class="ttdef"><b>Definition:</b> nats.h:385</div></div>
+<div class="ttc" id="astructjs_re_publish_html_a16ebc4cdae4a407cf4e32aad212888db"><div class="ttname"><a href="structjs_re_publish.html#a16ebc4cdae4a407cf4e32aad212888db">jsRePublish::HeadersOnly</a></div><div class="ttdeci">bool HeadersOnly</div><div class="ttdef"><b>Definition:</b> nats.h:388</div></div>
+<div class="ttc" id="astructjs_re_publish_html_a1acb593929fd69bbe0f4dc8300dfaeb2"><div class="ttname"><a href="structjs_re_publish.html#a1acb593929fd69bbe0f4dc8300dfaeb2">jsRePublish::Source</a></div><div class="ttdeci">const char * Source</div><div class="ttdef"><b>Definition:</b> nats.h:386</div></div>
+<div class="ttc" id="astructjs_re_publish_html_a662b2e57d237b171b2b61509f7e1023a"><div class="ttname"><a href="structjs_re_publish.html#a662b2e57d237b171b2b61509f7e1023a">jsRePublish::Destination</a></div><div class="ttdeci">const char * Destination</div><div class="ttdef"><b>Definition:</b> nats.h:387</div></div>
+<div class="ttc" id="astructjs_sequence_info_html"><div class="ttname"><a href="structjs_sequence_info.html">jsSequenceInfo</a></div><div class="ttdef"><b>Definition:</b> nats.h:874</div></div>
+<div class="ttc" id="astructjs_sequence_info_html_a4e94c91650b7db253645515fee4c3b05"><div class="ttname"><a href="structjs_sequence_info.html#a4e94c91650b7db253645515fee4c3b05">jsSequenceInfo::Last</a></div><div class="ttdeci">int64_t Last</div><div class="ttdoc">UTC time expressed as number of nanoseconds since epoch.</div><div class="ttdef"><b>Definition:</b> nats.h:877</div></div>
+<div class="ttc" id="astructjs_sequence_info_html_ab52c55c1d0edd20e064870b490b4b990"><div class="ttname"><a href="structjs_sequence_info.html#ab52c55c1d0edd20e064870b490b4b990">jsSequenceInfo::Stream</a></div><div class="ttdeci">uint64_t Stream</div><div class="ttdef"><b>Definition:</b> nats.h:876</div></div>
+<div class="ttc" id="astructjs_sequence_info_html_ae4416a5d766e07db207e563668edd06f"><div class="ttname"><a href="structjs_sequence_info.html#ae4416a5d766e07db207e563668edd06f">jsSequenceInfo::Consumer</a></div><div class="ttdeci">uint64_t Consumer</div><div class="ttdef"><b>Definition:</b> nats.h:875</div></div>
+<div class="ttc" id="astructjs_sequence_pair_html"><div class="ttname"><a href="structjs_sequence_pair.html">jsSequencePair</a></div><div class="ttdef"><b>Definition:</b> nats.h:864</div></div>
+<div class="ttc" id="astructjs_sequence_pair_html_a6d205effd29f8994f0028bfaf2e8d816"><div class="ttname"><a href="structjs_sequence_pair.html#a6d205effd29f8994f0028bfaf2e8d816">jsSequencePair::Consumer</a></div><div class="ttdeci">uint64_t Consumer</div><div class="ttdef"><b>Definition:</b> nats.h:865</div></div>
+<div class="ttc" id="astructjs_sequence_pair_html_ab051e0815302c48ba6122bd18d9d76f7"><div class="ttname"><a href="structjs_sequence_pair.html#ab051e0815302c48ba6122bd18d9d76f7">jsSequencePair::Stream</a></div><div class="ttdeci">uint64_t Stream</div><div class="ttdef"><b>Definition:</b> nats.h:866</div></div>
+<div class="ttc" id="astructjs_stream_config_html"><div class="ttname"><a href="structjs_stream_config.html">jsStreamConfig</a></div><div class="ttdef"><b>Definition:</b> nats.h:468</div></div>
+<div class="ttc" id="astructjs_stream_config_html_a0b44ea5251ef20bf5b5658bcfbea832d"><div class="ttname"><a href="structjs_stream_config.html#a0b44ea5251ef20bf5b5658bcfbea832d">jsStreamConfig::Discard</a></div><div class="ttdeci">jsDiscardPolicy Discard</div><div class="ttdef"><b>Definition:</b> nats.h:480</div></div>
+<div class="ttc" id="astructjs_stream_config_html_a0c5f3354073dbe72650e3db7f59a47af"><div class="ttname"><a href="structjs_stream_config.html#a0c5f3354073dbe72650e3db7f59a47af">jsStreamConfig::Subjects</a></div><div class="ttdeci">const char ** Subjects</div><div class="ttdef"><b>Definition:</b> nats.h:471</div></div>
+<div class="ttc" id="astructjs_stream_config_html_a28630f6f07ca02553c5d5718d7c29721"><div class="ttname"><a href="structjs_stream_config.html#a28630f6f07ca02553c5d5718d7c29721">jsStreamConfig::AllowDirect</a></div><div class="ttdeci">bool AllowDirect</div><div class="ttdef"><b>Definition:</b> nats.h:503</div></div>
+<div class="ttc" id="astructjs_stream_config_html_a34960d6acc710c2f32b563f4bb7c9c0a"><div class="ttname"><a href="structjs_stream_config.html#a34960d6acc710c2f32b563f4bb7c9c0a">jsStreamConfig::SourcesLen</a></div><div class="ttdeci">int SourcesLen</div><div class="ttdef"><b>Definition:</b> nats.h:489</div></div>
+<div class="ttc" id="astructjs_stream_config_html_a3fb7d5e1a09829fe742749da880afe4a"><div class="ttname"><a href="structjs_stream_config.html#a3fb7d5e1a09829fe742749da880afe4a">jsStreamConfig::DiscardNewPerSubject</a></div><div class="ttdeci">bool DiscardNewPerSubject</div><div class="ttdef"><b>Definition:</b> nats.h:508</div></div>
+<div class="ttc" id="astructjs_stream_config_html_a4f9f422d2e9e7389860291ab19bd7f10"><div class="ttname"><a href="structjs_stream_config.html#a4f9f422d2e9e7389860291ab19bd7f10">jsStreamConfig::Description</a></div><div class="ttdeci">const char * Description</div><div class="ttdef"><b>Definition:</b> nats.h:470</div></div>
+<div class="ttc" id="astructjs_stream_config_html_a50f866f0e73c4ff0a5f43b354a059fa9"><div class="ttname"><a href="structjs_stream_config.html#a50f866f0e73c4ff0a5f43b354a059fa9">jsStreamConfig::Template</a></div><div class="ttdeci">const char * Template</div><div class="ttdef"><b>Definition:</b> nats.h:484</div></div>
+<div class="ttc" id="astructjs_stream_config_html_a575ffbaa85b0300032963296b090583a"><div class="ttname"><a href="structjs_stream_config.html#a575ffbaa85b0300032963296b090583a">jsStreamConfig::DenyPurge</a></div><div class="ttdeci">bool DenyPurge</div><div class="ttdoc">Restrict the ability to purge messages.</div><div class="ttdef"><b>Definition:</b> nats.h:492</div></div>
+<div class="ttc" id="astructjs_stream_config_html_a59c34091f336eafa77da2991c852c0d8"><div class="ttname"><a href="structjs_stream_config.html#a59c34091f336eafa77da2991c852c0d8">jsStreamConfig::Storage</a></div><div class="ttdeci">jsStorageType Storage</div><div class="ttdef"><b>Definition:</b> nats.h:481</div></div>
+<div class="ttc" id="astructjs_stream_config_html_a5ebc95b76afafa5e7a129953ba1bb3c7"><div class="ttname"><a href="structjs_stream_config.html#a5ebc95b76afafa5e7a129953ba1bb3c7">jsStreamConfig::Retention</a></div><div class="ttdeci">jsRetentionPolicy Retention</div><div class="ttdef"><b>Definition:</b> nats.h:473</div></div>
+<div class="ttc" id="astructjs_stream_config_html_a60a5184d1d97b056dbb31ac6a5b3d82d"><div class="ttname"><a href="structjs_stream_config.html#a60a5184d1d97b056dbb31ac6a5b3d82d">jsStreamConfig::MaxMsgs</a></div><div class="ttdeci">int64_t MaxMsgs</div><div class="ttdef"><b>Definition:</b> nats.h:475</div></div>
+<div class="ttc" id="astructjs_stream_config_html_a7338c82c8cbfcd5f4bfb7ad34b1d8395"><div class="ttname"><a href="structjs_stream_config.html#a7338c82c8cbfcd5f4bfb7ad34b1d8395">jsStreamConfig::MaxConsumers</a></div><div class="ttdeci">int64_t MaxConsumers</div><div class="ttdef"><b>Definition:</b> nats.h:474</div></div>
+<div class="ttc" id="astructjs_stream_config_html_a7fe3d5086f1c660a6999ae40ecd370e5"><div class="ttname"><a href="structjs_stream_config.html#a7fe3d5086f1c660a6999ae40ecd370e5">jsStreamConfig::Name</a></div><div class="ttdeci">const char * Name</div><div class="ttdef"><b>Definition:</b> nats.h:469</div></div>
+<div class="ttc" id="astructjs_stream_config_html_a8e358fbc569a1c6d49c704e6dbdf8609"><div class="ttname"><a href="structjs_stream_config.html#a8e358fbc569a1c6d49c704e6dbdf8609">jsStreamConfig::NoAck</a></div><div class="ttdeci">bool NoAck</div><div class="ttdef"><b>Definition:</b> nats.h:483</div></div>
+<div class="ttc" id="astructjs_stream_config_html_a8f0ee08922e5b2108082b5b9e4a6284b"><div class="ttname"><a href="structjs_stream_config.html#a8f0ee08922e5b2108082b5b9e4a6284b">jsStreamConfig::Sources</a></div><div class="ttdeci">jsStreamSource ** Sources</div><div class="ttdef"><b>Definition:</b> nats.h:488</div></div>
+<div class="ttc" id="astructjs_stream_config_html_a93a2336a57b6bfb792d530fd13a90641"><div class="ttname"><a href="structjs_stream_config.html#a93a2336a57b6bfb792d530fd13a90641">jsStreamConfig::MaxMsgSize</a></div><div class="ttdeci">int32_t MaxMsgSize</div><div class="ttdef"><b>Definition:</b> nats.h:479</div></div>
+<div class="ttc" id="astructjs_stream_config_html_a95ab0061b6e935b129a4a9c133e6b11c"><div class="ttname"><a href="structjs_stream_config.html#a95ab0061b6e935b129a4a9c133e6b11c">jsStreamConfig::RePublish</a></div><div class="ttdeci">jsRePublish * RePublish</div><div class="ttdef"><b>Definition:</b> nats.h:500</div></div>
+<div class="ttc" id="astructjs_stream_config_html_a9d67ddcc7c54c345dd60ed5e59234f1e"><div class="ttname"><a href="structjs_stream_config.html#a9d67ddcc7c54c345dd60ed5e59234f1e">jsStreamConfig::MirrorDirect</a></div><div class="ttdeci">bool MirrorDirect</div><div class="ttdef"><b>Definition:</b> nats.h:505</div></div>
+<div class="ttc" id="astructjs_stream_config_html_a9e0ff10273d0182f885615b4f7d1cc20"><div class="ttname"><a href="structjs_stream_config.html#a9e0ff10273d0182f885615b4f7d1cc20">jsStreamConfig::Duplicates</a></div><div class="ttdeci">int64_t Duplicates</div><div class="ttdef"><b>Definition:</b> nats.h:485</div></div>
+<div class="ttc" id="astructjs_stream_config_html_aa167c7547d13bf2a01510a375ad38340"><div class="ttname"><a href="structjs_stream_config.html#aa167c7547d13bf2a01510a375ad38340">jsStreamConfig::MaxMsgsPerSubject</a></div><div class="ttdeci">int64_t MaxMsgsPerSubject</div><div class="ttdef"><b>Definition:</b> nats.h:478</div></div>
+<div class="ttc" id="astructjs_stream_config_html_aa538765ad97d343d60212ebd9894661e"><div class="ttname"><a href="structjs_stream_config.html#aa538765ad97d343d60212ebd9894661e">jsStreamConfig::MaxAge</a></div><div class="ttdeci">int64_t MaxAge</div><div class="ttdef"><b>Definition:</b> nats.h:477</div></div>
+<div class="ttc" id="astructjs_stream_config_html_ab2186aae798df6c222b3fa69e31597e1"><div class="ttname"><a href="structjs_stream_config.html#ab2186aae798df6c222b3fa69e31597e1">jsStreamConfig::SubjectsLen</a></div><div class="ttdeci">int SubjectsLen</div><div class="ttdef"><b>Definition:</b> nats.h:472</div></div>
+<div class="ttc" id="astructjs_stream_config_html_aba71cdb342181f52bb9f7ff5f770a1fa"><div class="ttname"><a href="structjs_stream_config.html#aba71cdb342181f52bb9f7ff5f770a1fa">jsStreamConfig::AllowRollup</a></div><div class="ttdeci">bool AllowRollup</div><div class="ttdef"><b>Definition:</b> nats.h:497</div></div>
+<div class="ttc" id="astructjs_stream_config_html_acdba5b22e4e60fd81a54769a7d09bc51"><div class="ttname"><a href="structjs_stream_config.html#acdba5b22e4e60fd81a54769a7d09bc51">jsStreamConfig::Mirror</a></div><div class="ttdeci">jsStreamSource * Mirror</div><div class="ttdef"><b>Definition:</b> nats.h:487</div></div>
+<div class="ttc" id="astructjs_stream_config_html_acee6c66afc78d79c2f518eed89177efb"><div class="ttname"><a href="structjs_stream_config.html#acee6c66afc78d79c2f518eed89177efb">jsStreamConfig::Placement</a></div><div class="ttdeci">jsPlacement * Placement</div><div class="ttdef"><b>Definition:</b> nats.h:486</div></div>
+<div class="ttc" id="astructjs_stream_config_html_ad75e47d4293441bd5ddbc5eaf01e0451"><div class="ttname"><a href="structjs_stream_config.html#ad75e47d4293441bd5ddbc5eaf01e0451">jsStreamConfig::MaxBytes</a></div><div class="ttdeci">int64_t MaxBytes</div><div class="ttdef"><b>Definition:</b> nats.h:476</div></div>
+<div class="ttc" id="astructjs_stream_config_html_adbf2c948cf8091b149603b918ef49ffc"><div class="ttname"><a href="structjs_stream_config.html#adbf2c948cf8091b149603b918ef49ffc">jsStreamConfig::Replicas</a></div><div class="ttdeci">int64_t Replicas</div><div class="ttdef"><b>Definition:</b> nats.h:482</div></div>
+<div class="ttc" id="astructjs_stream_config_html_aede3fd2ab13d230eda14c96f9997e1b7"><div class="ttname"><a href="structjs_stream_config.html#aede3fd2ab13d230eda14c96f9997e1b7">jsStreamConfig::Sealed</a></div><div class="ttdeci">bool Sealed</div><div class="ttdoc">Seal a stream so no messages can get our or in.</div><div class="ttdef"><b>Definition:</b> nats.h:490</div></div>
+<div class="ttc" id="astructjs_stream_config_html_af2d42dd29b9a35257937aeeb53c9f287"><div class="ttname"><a href="structjs_stream_config.html#af2d42dd29b9a35257937aeeb53c9f287">jsStreamConfig::DenyDelete</a></div><div class="ttdeci">bool DenyDelete</div><div class="ttdoc">Restrict the ability to delete messages.</div><div class="ttdef"><b>Definition:</b> nats.h:491</div></div>
+<div class="ttc" id="astructjs_stream_info_html"><div class="ttname"><a href="structjs_stream_info.html">jsStreamInfo</a></div><div class="ttdef"><b>Definition:</b> nats.h:641</div></div>
+<div class="ttc" id="astructjs_stream_info_html_a2e7ca48a93fe57265609e7e0cd3fa386"><div class="ttname"><a href="structjs_stream_info.html#a2e7ca48a93fe57265609e7e0cd3fa386">jsStreamInfo::Sources</a></div><div class="ttdeci">jsStreamSourceInfo ** Sources</div><div class="ttdef"><b>Definition:</b> nats.h:647</div></div>
+<div class="ttc" id="astructjs_stream_info_html_a578ce52a275c690dd4627c1d119c7838"><div class="ttname"><a href="structjs_stream_info.html#a578ce52a275c690dd4627c1d119c7838">jsStreamInfo::Created</a></div><div class="ttdeci">int64_t Created</div><div class="ttdoc">UTC time expressed as number of nanoseconds since epoch.</div><div class="ttdef"><b>Definition:</b> nats.h:643</div></div>
+<div class="ttc" id="astructjs_stream_info_html_a766ac56dec3bd19fa5b9861fb5f64397"><div class="ttname"><a href="structjs_stream_info.html#a766ac56dec3bd19fa5b9861fb5f64397">jsStreamInfo::State</a></div><div class="ttdeci">jsStreamState State</div><div class="ttdef"><b>Definition:</b> nats.h:644</div></div>
+<div class="ttc" id="astructjs_stream_info_html_a8d10d6fdc3f713ac726c72cae06a209a"><div class="ttname"><a href="structjs_stream_info.html#a8d10d6fdc3f713ac726c72cae06a209a">jsStreamInfo::Cluster</a></div><div class="ttdeci">jsClusterInfo * Cluster</div><div class="ttdef"><b>Definition:</b> nats.h:645</div></div>
+<div class="ttc" id="astructjs_stream_info_html_ab71aae7e4f6c62e2a09a3a52c9e4fa2a"><div class="ttname"><a href="structjs_stream_info.html#ab71aae7e4f6c62e2a09a3a52c9e4fa2a">jsStreamInfo::Mirror</a></div><div class="ttdeci">jsStreamSourceInfo * Mirror</div><div class="ttdef"><b>Definition:</b> nats.h:646</div></div>
+<div class="ttc" id="astructjs_stream_info_html_adcc402d28e0ee443419e9b549da233c6"><div class="ttname"><a href="structjs_stream_info.html#adcc402d28e0ee443419e9b549da233c6">jsStreamInfo::Config</a></div><div class="ttdeci">jsStreamConfig * Config</div><div class="ttdef"><b>Definition:</b> nats.h:642</div></div>
+<div class="ttc" id="astructjs_stream_info_html_af14110cb1f8e16e3dade8d9f7c2fd672"><div class="ttname"><a href="structjs_stream_info.html#af14110cb1f8e16e3dade8d9f7c2fd672">jsStreamInfo::SourcesLen</a></div><div class="ttdeci">int SourcesLen</div><div class="ttdef"><b>Definition:</b> nats.h:648</div></div>
+<div class="ttc" id="astructjs_stream_info_list_html"><div class="ttname"><a href="structjs_stream_info_list.html">jsStreamInfoList</a></div><div class="ttdef"><b>Definition:</b> nats.h:660</div></div>
+<div class="ttc" id="astructjs_stream_info_list_html_a7b096ee7a25363f231f56419a244daef"><div class="ttname"><a href="structjs_stream_info_list.html#a7b096ee7a25363f231f56419a244daef">jsStreamInfoList::List</a></div><div class="ttdeci">jsStreamInfo ** List</div><div class="ttdef"><b>Definition:</b> nats.h:661</div></div>
+<div class="ttc" id="astructjs_stream_info_list_html_a8bc8490af12bb4f7a245605aecde62c2"><div class="ttname"><a href="structjs_stream_info_list.html#a8bc8490af12bb4f7a245605aecde62c2">jsStreamInfoList::Count</a></div><div class="ttdeci">int Count</div><div class="ttdef"><b>Definition:</b> nats.h:662</div></div>
+<div class="ttc" id="astructjs_stream_names_list_html"><div class="ttname"><a href="structjs_stream_names_list.html">jsStreamNamesList</a></div><div class="ttdef"><b>Definition:</b> nats.h:674</div></div>
+<div class="ttc" id="astructjs_stream_names_list_html_a1875a7e449759dfc2a40b0eb74de0acf"><div class="ttname"><a href="structjs_stream_names_list.html#a1875a7e449759dfc2a40b0eb74de0acf">jsStreamNamesList::List</a></div><div class="ttdeci">char ** List</div><div class="ttdef"><b>Definition:</b> nats.h:675</div></div>
+<div class="ttc" id="astructjs_stream_names_list_html_ab1385b6333537306d0462946c26cde4f"><div class="ttname"><a href="structjs_stream_names_list.html#ab1385b6333537306d0462946c26cde4f">jsStreamNamesList::Count</a></div><div class="ttdeci">int Count</div><div class="ttdef"><b>Definition:</b> nats.h:676</div></div>
+<div class="ttc" id="astructjs_stream_source_html"><div class="ttname"><a href="structjs_stream_source.html">jsStreamSource</a></div><div class="ttdef"><b>Definition:</b> nats.h:372</div></div>
+<div class="ttc" id="astructjs_stream_source_html_a295458d156af5373bb3f5ab06612a888"><div class="ttname"><a href="structjs_stream_source.html#a295458d156af5373bb3f5ab06612a888">jsStreamSource::External</a></div><div class="ttdeci">jsExternalStream * External</div><div class="ttdef"><b>Definition:</b> nats.h:377</div></div>
+<div class="ttc" id="astructjs_stream_source_html_a67eb1dac41b2d826a923cfb23baa24a5"><div class="ttname"><a href="structjs_stream_source.html#a67eb1dac41b2d826a923cfb23baa24a5">jsStreamSource::OptStartTime</a></div><div class="ttdeci">int64_t OptStartTime</div><div class="ttdoc">UTC time expressed as number of nanoseconds since epoch.</div><div class="ttdef"><b>Definition:</b> nats.h:375</div></div>
+<div class="ttc" id="astructjs_stream_source_html_a7d9e5c064866b3f0b5601193c5885ec3"><div class="ttname"><a href="structjs_stream_source.html#a7d9e5c064866b3f0b5601193c5885ec3">jsStreamSource::Name</a></div><div class="ttdeci">const char * Name</div><div class="ttdef"><b>Definition:</b> nats.h:373</div></div>
+<div class="ttc" id="astructjs_stream_source_html_ad6948b7a34c202f324b6d2beb32fe5ed"><div class="ttname"><a href="structjs_stream_source.html#ad6948b7a34c202f324b6d2beb32fe5ed">jsStreamSource::OptStartSeq</a></div><div class="ttdeci">uint64_t OptStartSeq</div><div class="ttdef"><b>Definition:</b> nats.h:374</div></div>
+<div class="ttc" id="astructjs_stream_source_html_af787b51dde9d77626f33860564eb08c3"><div class="ttname"><a href="structjs_stream_source.html#af787b51dde9d77626f33860564eb08c3">jsStreamSource::FilterSubject</a></div><div class="ttdeci">const char * FilterSubject</div><div class="ttdef"><b>Definition:</b> nats.h:376</div></div>
+<div class="ttc" id="astructjs_stream_source_info_html"><div class="ttname"><a href="structjs_stream_source_info.html">jsStreamSourceInfo</a></div><div class="ttdef"><b>Definition:</b> nats.h:626</div></div>
+<div class="ttc" id="astructjs_stream_source_info_html_a28b8cc0a9d487672955d3a3fa03de247"><div class="ttname"><a href="structjs_stream_source_info.html#a28b8cc0a9d487672955d3a3fa03de247">jsStreamSourceInfo::Active</a></div><div class="ttdeci">int64_t Active</div><div class="ttdef"><b>Definition:</b> nats.h:630</div></div>
+<div class="ttc" id="astructjs_stream_source_info_html_a6db3c6ff8a465a45f8bd5c7bdf5f6c04"><div class="ttname"><a href="structjs_stream_source_info.html#a6db3c6ff8a465a45f8bd5c7bdf5f6c04">jsStreamSourceInfo::Name</a></div><div class="ttdeci">char * Name</div><div class="ttdef"><b>Definition:</b> nats.h:627</div></div>
+<div class="ttc" id="astructjs_stream_source_info_html_a7eb19dd2637079fd1e970a2b38d33e05"><div class="ttname"><a href="structjs_stream_source_info.html#a7eb19dd2637079fd1e970a2b38d33e05">jsStreamSourceInfo::External</a></div><div class="ttdeci">jsExternalStream * External</div><div class="ttdef"><b>Definition:</b> nats.h:628</div></div>
+<div class="ttc" id="astructjs_stream_source_info_html_ab2ee0ca3ecd98c2df6d4e9bd88686863"><div class="ttname"><a href="structjs_stream_source_info.html#ab2ee0ca3ecd98c2df6d4e9bd88686863">jsStreamSourceInfo::Lag</a></div><div class="ttdeci">uint64_t Lag</div><div class="ttdef"><b>Definition:</b> nats.h:629</div></div>
+<div class="ttc" id="astructjs_stream_state_html"><div class="ttname"><a href="structjs_stream_state.html">jsStreamState</a></div><div class="ttdef"><b>Definition:</b> nats.h:578</div></div>
+<div class="ttc" id="astructjs_stream_state_html_a1adf8991f31fc4db9d6907a0316f8eec"><div class="ttname"><a href="structjs_stream_state.html#a1adf8991f31fc4db9d6907a0316f8eec">jsStreamState::Lost</a></div><div class="ttdeci">jsLostStreamData * Lost</div><div class="ttdef"><b>Definition:</b> nats.h:590</div></div>
+<div class="ttc" id="astructjs_stream_state_html_a22da809fe7a1ec3101841e86d6708827"><div class="ttname"><a href="structjs_stream_state.html#a22da809fe7a1ec3101841e86d6708827">jsStreamState::LastSeq</a></div><div class="ttdeci">uint64_t LastSeq</div><div class="ttdef"><b>Definition:</b> nats.h:583</div></div>
+<div class="ttc" id="astructjs_stream_state_html_a27f4cfb85c0f1b0c5c7ad5275bd25d85"><div class="ttname"><a href="structjs_stream_state.html#a27f4cfb85c0f1b0c5c7ad5275bd25d85">jsStreamState::Consumers</a></div><div class="ttdeci">int64_t Consumers</div><div class="ttdef"><b>Definition:</b> nats.h:591</div></div>
+<div class="ttc" id="astructjs_stream_state_html_a34a08a64c97269165630bf2e0c78c2c0"><div class="ttname"><a href="structjs_stream_state.html#a34a08a64c97269165630bf2e0c78c2c0">jsStreamState::DeletedLen</a></div><div class="ttdeci">int DeletedLen</div><div class="ttdef"><b>Definition:</b> nats.h:589</div></div>
+<div class="ttc" id="astructjs_stream_state_html_a495269fe83c6bbf2023cca94add0a888"><div class="ttname"><a href="structjs_stream_state.html#a495269fe83c6bbf2023cca94add0a888">jsStreamState::Msgs</a></div><div class="ttdeci">uint64_t Msgs</div><div class="ttdef"><b>Definition:</b> nats.h:579</div></div>
+<div class="ttc" id="astructjs_stream_state_html_a4af56e8bee7262ab050f2a25114c5909"><div class="ttname"><a href="structjs_stream_state.html#a4af56e8bee7262ab050f2a25114c5909">jsStreamState::Subjects</a></div><div class="ttdeci">jsStreamStateSubjects * Subjects</div><div class="ttdef"><b>Definition:</b> nats.h:586</div></div>
+<div class="ttc" id="astructjs_stream_state_html_a55bb6719163acef7fdb6d0bc3ae8d5da"><div class="ttname"><a href="structjs_stream_state.html#a55bb6719163acef7fdb6d0bc3ae8d5da">jsStreamState::FirstSeq</a></div><div class="ttdeci">uint64_t FirstSeq</div><div class="ttdef"><b>Definition:</b> nats.h:581</div></div>
+<div class="ttc" id="astructjs_stream_state_html_a67cbd0d8b43d8c05c8b4cd6b0e44dab0"><div class="ttname"><a href="structjs_stream_state.html#a67cbd0d8b43d8c05c8b4cd6b0e44dab0">jsStreamState::LastTime</a></div><div class="ttdeci">int64_t LastTime</div><div class="ttdoc">UTC time expressed as number of nanoseconds since epoch.</div><div class="ttdef"><b>Definition:</b> nats.h:584</div></div>
+<div class="ttc" id="astructjs_stream_state_html_aaa43db17641826e7c6ecc1954f641960"><div class="ttname"><a href="structjs_stream_state.html#aaa43db17641826e7c6ecc1954f641960">jsStreamState::NumSubjects</a></div><div class="ttdeci">int64_t NumSubjects</div><div class="ttdef"><b>Definition:</b> nats.h:585</div></div>
+<div class="ttc" id="astructjs_stream_state_html_abcf4d3c581c06d820f1ad21d640bef3f"><div class="ttname"><a href="structjs_stream_state.html#abcf4d3c581c06d820f1ad21d640bef3f">jsStreamState::Deleted</a></div><div class="ttdeci">uint64_t * Deleted</div><div class="ttdef"><b>Definition:</b> nats.h:588</div></div>
+<div class="ttc" id="astructjs_stream_state_html_acbec2f01830b56cb4c0bf54ae5170e51"><div class="ttname"><a href="structjs_stream_state.html#acbec2f01830b56cb4c0bf54ae5170e51">jsStreamState::NumDeleted</a></div><div class="ttdeci">uint64_t NumDeleted</div><div class="ttdef"><b>Definition:</b> nats.h:587</div></div>
+<div class="ttc" id="astructjs_stream_state_html_ae603fa6ecfb63c93b61272b7d1b8fb4d"><div class="ttname"><a href="structjs_stream_state.html#ae603fa6ecfb63c93b61272b7d1b8fb4d">jsStreamState::Bytes</a></div><div class="ttdeci">uint64_t Bytes</div><div class="ttdef"><b>Definition:</b> nats.h:580</div></div>
+<div class="ttc" id="astructjs_stream_state_html_afb7a708022faff518c060b33e99b04b0"><div class="ttname"><a href="structjs_stream_state.html#afb7a708022faff518c060b33e99b04b0">jsStreamState::FirstTime</a></div><div class="ttdeci">int64_t FirstTime</div><div class="ttdoc">UTC time expressed as number of nanoseconds since epoch.</div><div class="ttdef"><b>Definition:</b> nats.h:582</div></div>
+<div class="ttc" id="astructjs_stream_state_subject_html"><div class="ttname"><a href="structjs_stream_state_subject.html">jsStreamStateSubject</a></div><div class="ttdef"><b>Definition:</b> nats.h:529</div></div>
+<div class="ttc" id="astructjs_stream_state_subject_html_a8b9b2edc5afe82b7b3bc7dbdd67a4384"><div class="ttname"><a href="structjs_stream_state_subject.html#a8b9b2edc5afe82b7b3bc7dbdd67a4384">jsStreamStateSubject::Msgs</a></div><div class="ttdeci">uint64_t Msgs</div><div class="ttdef"><b>Definition:</b> nats.h:531</div></div>
+<div class="ttc" id="astructjs_stream_state_subject_html_aa766824a7f8b69db592971af3262640e"><div class="ttname"><a href="structjs_stream_state_subject.html#aa766824a7f8b69db592971af3262640e">jsStreamStateSubject::Subject</a></div><div class="ttdeci">const char * Subject</div><div class="ttdef"><b>Definition:</b> nats.h:530</div></div>
+<div class="ttc" id="astructjs_stream_state_subjects_html"><div class="ttname"><a href="structjs_stream_state_subjects.html">jsStreamStateSubjects</a></div><div class="ttdef"><b>Definition:</b> nats.h:565</div></div>
+<div class="ttc" id="astructjs_stream_state_subjects_html_ab88e2026f518b6cdffd3901b5e5cd374"><div class="ttname"><a href="structjs_stream_state_subjects.html#ab88e2026f518b6cdffd3901b5e5cd374">jsStreamStateSubjects::Count</a></div><div class="ttdeci">int Count</div><div class="ttdef"><b>Definition:</b> nats.h:567</div></div>
+<div class="ttc" id="astructjs_stream_state_subjects_html_aef3d1e886b16961daa84c43650fa80c0"><div class="ttname"><a href="structjs_stream_state_subjects.html#aef3d1e886b16961daa84c43650fa80c0">jsStreamStateSubjects::List</a></div><div class="ttdeci">jsStreamStateSubject * List</div><div class="ttdef"><b>Definition:</b> nats.h:566</div></div>
+<div class="ttc" id="astructjs_sub_options_html"><div class="ttname"><a href="structjs_sub_options.html">jsSubOptions</a></div><div class="ttdef"><b>Definition:</b> nats.h:799</div></div>
+<div class="ttc" id="astructjs_sub_options_html_a21a905c49dfab61729d8674702d196b2"><div class="ttname"><a href="structjs_sub_options.html#a21a905c49dfab61729d8674702d196b2">jsSubOptions::ManualAck</a></div><div class="ttdeci">bool ManualAck</div><div class="ttdoc">If true, the user will have to acknowledge the messages.</div><div class="ttdef"><b>Definition:</b> nats.h:844</div></div>
+<div class="ttc" id="astructjs_sub_options_html_a7aa5b8439ed288b858943f28c291cb36"><div class="ttname"><a href="structjs_sub_options.html#a7aa5b8439ed288b858943f28c291cb36">jsSubOptions::Consumer</a></div><div class="ttdeci">const char * Consumer</div><div class="ttdoc">If specified, the subscription will be bound to an existing consumer from the Stream without attempti...</div><div class="ttdef"><b>Definition:</b> nats.h:816</div></div>
+<div class="ttc" id="astructjs_sub_options_html_a856a6af4a7ff5aa2e736338091e69484"><div class="ttname"><a href="structjs_sub_options.html#a856a6af4a7ff5aa2e736338091e69484">jsSubOptions::Stream</a></div><div class="ttdeci">const char * Stream</div><div class="ttdoc">If specified, the consumer will be bound to this stream name.</div><div class="ttdef"><b>Definition:</b> nats.h:806</div></div>
+<div class="ttc" id="astructjs_sub_options_html_a95c5d2db8ca97d644042d436de119be4"><div class="ttname"><a href="structjs_sub_options.html#a95c5d2db8ca97d644042d436de119be4">jsSubOptions::Ordered</a></div><div class="ttdeci">bool Ordered</div><div class="ttdoc">If true, this will be an ordered consumer.</div><div class="ttdef"><b>Definition:</b> nats.h:856</div></div>
+<div class="ttc" id="astructjs_sub_options_html_aaf4b620d112a31f51a20389c5405805d"><div class="ttname"><a href="structjs_sub_options.html#aaf4b620d112a31f51a20389c5405805d">jsSubOptions::Queue</a></div><div class="ttdeci">const char * Queue</div><div class="ttdoc">Queue name for queue subscriptions.</div><div class="ttdef"><b>Definition:</b> nats.h:831</div></div>
+<div class="ttc" id="astructjs_sub_options_html_acab25d71a2efe26bb3b084071435c2b5"><div class="ttname"><a href="structjs_sub_options.html#acab25d71a2efe26bb3b084071435c2b5">jsSubOptions::Config</a></div><div class="ttdeci">jsConsumerConfig Config</div><div class="ttdoc">Consumer configuration.</div><div class="ttdef"><b>Definition:</b> nats.h:849</div></div>
+<div class="ttc" id="astructjs_tier_html"><div class="ttname"><a href="structjs_tier.html">jsTier</a></div><div class="ttdef"><b>Definition:</b> nats.h:959</div></div>
+<div class="ttc" id="astructjs_tier_html_a1ed542b9acccbe7761839f33c43053a6"><div class="ttname"><a href="structjs_tier.html#a1ed542b9acccbe7761839f33c43053a6">jsTier::Name</a></div><div class="ttdeci">const char * Name</div><div class="ttdef"><b>Definition:</b> nats.h:960</div></div>
+<div class="ttc" id="astructjs_tier_html_a3f9234fde387faf3775d841aa797a6ea"><div class="ttname"><a href="structjs_tier.html#a3f9234fde387faf3775d841aa797a6ea">jsTier::Streams</a></div><div class="ttdeci">int64_t Streams</div><div class="ttdef"><b>Definition:</b> nats.h:963</div></div>
+<div class="ttc" id="astructjs_tier_html_ab16c426e1c35d8c0fd6c460c43580a39"><div class="ttname"><a href="structjs_tier.html#ab16c426e1c35d8c0fd6c460c43580a39">jsTier::Store</a></div><div class="ttdeci">uint64_t Store</div><div class="ttdef"><b>Definition:</b> nats.h:962</div></div>
+<div class="ttc" id="astructjs_tier_html_ac33ce862c041572d10184e7fa0dd0bfe"><div class="ttname"><a href="structjs_tier.html#ac33ce862c041572d10184e7fa0dd0bfe">jsTier::Consumers</a></div><div class="ttdeci">int64_t Consumers</div><div class="ttdef"><b>Definition:</b> nats.h:964</div></div>
+<div class="ttc" id="astructjs_tier_html_aeff4a4cb86e10d8d7749d6ff69f97ed1"><div class="ttname"><a href="structjs_tier.html#aeff4a4cb86e10d8d7749d6ff69f97ed1">jsTier::Memory</a></div><div class="ttdeci">uint64_t Memory</div><div class="ttdef"><b>Definition:</b> nats.h:961</div></div>
+<div class="ttc" id="astructjs_tier_html_af2edbabd5e078b1e31dd73d44fd507d3"><div class="ttname"><a href="structjs_tier.html#af2edbabd5e078b1e31dd73d44fd507d3">jsTier::Limits</a></div><div class="ttdeci">jsAccountLimits Limits</div><div class="ttdef"><b>Definition:</b> nats.h:965</div></div>
+<div class="ttc" id="astructkv_config_html"><div class="ttname"><a href="structkv_config.html">kvConfig</a></div><div class="ttdef"><b>Definition:</b> nats.h:1182</div></div>
+<div class="ttc" id="astructkv_config_html_a0ec6b3afbfdaa33436e2ae748e986e98"><div class="ttname"><a href="structkv_config.html#a0ec6b3afbfdaa33436e2ae748e986e98">kvConfig::History</a></div><div class="ttdeci">uint8_t History</div><div class="ttdef"><b>Definition:</b> nats.h:1186</div></div>
+<div class="ttc" id="astructkv_config_html_a11b636da727c17566d5ab1274f69fee5"><div class="ttname"><a href="structkv_config.html#a11b636da727c17566d5ab1274f69fee5">kvConfig::Bucket</a></div><div class="ttdeci">const char * Bucket</div><div class="ttdef"><b>Definition:</b> nats.h:1183</div></div>
+<div class="ttc" id="astructkv_config_html_a1bc37777aa91b8b57a70e7647670cd12"><div class="ttname"><a href="structkv_config.html#a1bc37777aa91b8b57a70e7647670cd12">kvConfig::MaxBytes</a></div><div class="ttdeci">int64_t MaxBytes</div><div class="ttdef"><b>Definition:</b> nats.h:1188</div></div>
+<div class="ttc" id="astructkv_config_html_a281156a9df0130abad7f3b2728ac35a5"><div class="ttname"><a href="structkv_config.html#a281156a9df0130abad7f3b2728ac35a5">kvConfig::MaxValueSize</a></div><div class="ttdeci">int32_t MaxValueSize</div><div class="ttdef"><b>Definition:</b> nats.h:1185</div></div>
+<div class="ttc" id="astructkv_config_html_a48f0f70383eff868321f9c94ae1a87cd"><div class="ttname"><a href="structkv_config.html#a48f0f70383eff868321f9c94ae1a87cd">kvConfig::Replicas</a></div><div class="ttdeci">int Replicas</div><div class="ttdef"><b>Definition:</b> nats.h:1190</div></div>
+<div class="ttc" id="astructkv_config_html_a941e9cad2bab67f093bf4d9567b4749a"><div class="ttname"><a href="structkv_config.html#a941e9cad2bab67f093bf4d9567b4749a">kvConfig::Description</a></div><div class="ttdeci">const char * Description</div><div class="ttdef"><b>Definition:</b> nats.h:1184</div></div>
+<div class="ttc" id="astructkv_config_html_ad2f5503e2f2522cb52e0ba1b86983dba"><div class="ttname"><a href="structkv_config.html#ad2f5503e2f2522cb52e0ba1b86983dba">kvConfig::TTL</a></div><div class="ttdeci">int64_t TTL</div><div class="ttdef"><b>Definition:</b> nats.h:1187</div></div>
+<div class="ttc" id="astructkv_config_html_ad5db9a58224d93ab86b4cfc4c46f1897"><div class="ttname"><a href="structkv_config.html#ad5db9a58224d93ab86b4cfc4c46f1897">kvConfig::StorageType</a></div><div class="ttdeci">jsStorageType StorageType</div><div class="ttdef"><b>Definition:</b> nats.h:1189</div></div>
+<div class="ttc" id="astructkv_config_html_ae172d3e442eef1a57cd7cf266d9e8951"><div class="ttname"><a href="structkv_config.html#ae172d3e442eef1a57cd7cf266d9e8951">kvConfig::RePublish</a></div><div class="ttdeci">jsRePublish * RePublish</div><div class="ttdef"><b>Definition:</b> nats.h:1191</div></div>
+<div class="ttc" id="astructkv_entry_list_html"><div class="ttname"><a href="structkv_entry_list.html">kvEntryList</a></div><div class="ttdoc">A list of KeyValue store entries.</div><div class="ttdef"><b>Definition:</b> nats.h:1249</div></div>
+<div class="ttc" id="astructkv_entry_list_html_a179d4d3e5844d005be1ed9134b969a50"><div class="ttname"><a href="structkv_entry_list.html#a179d4d3e5844d005be1ed9134b969a50">kvEntryList::Entries</a></div><div class="ttdeci">kvEntry ** Entries</div><div class="ttdef"><b>Definition:</b> nats.h:1250</div></div>
+<div class="ttc" id="astructkv_entry_list_html_a82da55d42e1a6862d3b0034dfc6f321f"><div class="ttname"><a href="structkv_entry_list.html#a82da55d42e1a6862d3b0034dfc6f321f">kvEntryList::Count</a></div><div class="ttdeci">int Count</div><div class="ttdef"><b>Definition:</b> nats.h:1251</div></div>
+<div class="ttc" id="astructkv_keys_list_html"><div class="ttname"><a href="structkv_keys_list.html">kvKeysList</a></div><div class="ttdoc">A list of KeyValue store keys.</div><div class="ttdef"><b>Definition:</b> nats.h:1273</div></div>
+<div class="ttc" id="astructkv_keys_list_html_a625f7b34784e024a538359efd9a97265"><div class="ttname"><a href="structkv_keys_list.html#a625f7b34784e024a538359efd9a97265">kvKeysList::Count</a></div><div class="ttdeci">int Count</div><div class="ttdef"><b>Definition:</b> nats.h:1275</div></div>
+<div class="ttc" id="astructkv_keys_list_html_aa5cb40820a1a927375215e0a94ecfc18"><div class="ttname"><a href="structkv_keys_list.html#aa5cb40820a1a927375215e0a94ecfc18">kvKeysList::Keys</a></div><div class="ttdeci">char ** Keys</div><div class="ttdef"><b>Definition:</b> nats.h:1274</div></div>
+<div class="ttc" id="astructkv_purge_options_html"><div class="ttname"><a href="structkv_purge_options.html">kvPurgeOptions</a></div><div class="ttdef"><b>Definition:</b> nats.h:1215</div></div>
+<div class="ttc" id="astructkv_purge_options_html_a245c2def0f3aabe617219772cf7680a8"><div class="ttname"><a href="structkv_purge_options.html#a245c2def0f3aabe617219772cf7680a8">kvPurgeOptions::Timeout</a></div><div class="ttdeci">int64_t Timeout</div><div class="ttdef"><b>Definition:</b> nats.h:1217</div></div>
+<div class="ttc" id="astructkv_purge_options_html_a47fed1e95073666cbe441aba7c149da6"><div class="ttname"><a href="structkv_purge_options.html#a47fed1e95073666cbe441aba7c149da6">kvPurgeOptions::DeleteMarkersOlderThan</a></div><div class="ttdeci">int64_t DeleteMarkersOlderThan</div><div class="ttdef"><b>Definition:</b> nats.h:1227</div></div>
+<div class="ttc" id="astructkv_watch_options_html"><div class="ttname"><a href="structkv_watch_options.html">kvWatchOptions</a></div><div class="ttdef"><b>Definition:</b> nats.h:1201</div></div>
+<div class="ttc" id="astructkv_watch_options_html_a0535edd21b26affc0057575bafc21a07"><div class="ttname"><a href="structkv_watch_options.html#a0535edd21b26affc0057575bafc21a07">kvWatchOptions::IgnoreDeletes</a></div><div class="ttdeci">bool IgnoreDeletes</div><div class="ttdef"><b>Definition:</b> nats.h:1202</div></div>
+<div class="ttc" id="astructkv_watch_options_html_a08274f08ae96e14d9ded326e4e665649"><div class="ttname"><a href="structkv_watch_options.html#a08274f08ae96e14d9ded326e4e665649">kvWatchOptions::IncludeHistory</a></div><div class="ttdeci">bool IncludeHistory</div><div class="ttdef"><b>Definition:</b> nats.h:1203</div></div>
+<div class="ttc" id="astructkv_watch_options_html_a56183d56585697d058c7eeb20bdddb66"><div class="ttname"><a href="structkv_watch_options.html#a56183d56585697d058c7eeb20bdddb66">kvWatchOptions::Timeout</a></div><div class="ttdeci">int64_t Timeout</div><div class="ttdoc">How long to wait (in milliseconds) for some operations to complete.</div><div class="ttdef"><b>Definition:</b> nats.h:1205</div></div>
+<div class="ttc" id="astructkv_watch_options_html_ac9094bce4f3c6513431ba32fb49e5605"><div class="ttname"><a href="structkv_watch_options.html#ac9094bce4f3c6513431ba32fb49e5605">kvWatchOptions::MetaOnly</a></div><div class="ttdeci">bool MetaOnly</div><div class="ttdef"><b>Definition:</b> nats.h:1204</div></div>
+<div class="ttc" id="astructnats_msg_list_html"><div class="ttname"><a href="structnats_msg_list.html">natsMsgList</a></div><div class="ttdoc">A list of NATS messages.</div><div class="ttdef"><b>Definition:</b> nats.h:213</div></div>
+<div class="ttc" id="astructnats_msg_list_html_a5c48bf6b9e7f1d889d7ad31694911750"><div class="ttname"><a href="structnats_msg_list.html#a5c48bf6b9e7f1d889d7ad31694911750">natsMsgList::Count</a></div><div class="ttdeci">int Count</div><div class="ttdef"><b>Definition:</b> nats.h:215</div></div>
+<div class="ttc" id="astructnats_msg_list_html_aa123668879f1c9c11c9be7bd81a205c5"><div class="ttname"><a href="structnats_msg_list.html#aa123668879f1c9c11c9be7bd81a205c5">natsMsgList::Msgs</a></div><div class="ttdeci">natsMsg ** Msgs</div><div class="ttdef"><b>Definition:</b> nats.h:214</div></div>
+</div><!-- fragment --></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="nats_8h.html">nats.h</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/nav_f.png b/doc/html/nav_f.png
new file mode 100644 (file)
index 0000000..72a58a5
Binary files /dev/null and b/doc/html/nav_f.png differ
diff --git a/doc/html/nav_fd.png b/doc/html/nav_fd.png
new file mode 100644 (file)
index 0000000..032fbdd
Binary files /dev/null and b/doc/html/nav_fd.png differ
diff --git a/doc/html/nav_g.png b/doc/html/nav_g.png
new file mode 100644 (file)
index 0000000..2093a23
Binary files /dev/null and b/doc/html/nav_g.png differ
diff --git a/doc/html/nav_h.png b/doc/html/nav_h.png
new file mode 100644 (file)
index 0000000..33389b1
Binary files /dev/null and b/doc/html/nav_h.png differ
diff --git a/doc/html/nav_hd.png b/doc/html/nav_hd.png
new file mode 100644 (file)
index 0000000..de80f18
Binary files /dev/null and b/doc/html/nav_hd.png differ
diff --git a/doc/html/navtree.css b/doc/html/navtree.css
new file mode 100644 (file)
index 0000000..c8a7766
--- /dev/null
@@ -0,0 +1,150 @@
+#nav-tree .children_ul {
+  margin:0;
+  padding:4px;
+}
+
+#nav-tree ul {
+  list-style:none outside none;
+  margin:0px;
+  padding:0px;
+}
+
+#nav-tree li {
+  white-space:nowrap;
+  margin:0px;
+  padding:0px;
+}
+
+#nav-tree .plus {
+  margin:0px;
+}
+
+#nav-tree .selected {
+  background-image: url('tab_a.png');
+  background-repeat:repeat-x;
+  color: var(--nav-text-active-color);
+  text-shadow: var(--nav-text-active-shadow);
+}
+
+#nav-tree .selected .arrow {
+  color: var(--nav-arrow-selected-color);
+  text-shadow: none;
+}
+
+#nav-tree img {
+  margin:0px;
+  padding:0px;
+  border:0px;
+  vertical-align: middle;
+}
+
+#nav-tree a {
+  text-decoration:none;
+  padding:0px;
+  margin:0px;
+  outline:none;
+}
+
+#nav-tree .label {
+  margin:0px;
+  padding:0px;
+  font: 12px var(--font-family-nav);
+}
+
+#nav-tree .label a {
+  padding:2px;
+}
+
+#nav-tree .selected a {
+  text-decoration:none;
+  color:var(--nav-text-active-color);
+}
+
+#nav-tree .children_ul {
+  margin:0px;
+  padding:0px;
+}
+
+#nav-tree .item {
+  margin:0px;
+  padding:0px;
+}
+
+#nav-tree {
+  padding: 0px 0px;
+  font-size:14px;
+  overflow:auto;
+}
+
+#doc-content {
+  overflow:auto;
+  display:block;
+  padding:0px;
+  margin:0px;
+  -webkit-overflow-scrolling : touch; /* iOS 5+ */
+}
+
+#side-nav {
+  padding:0 6px 0 0;
+  margin: 0px;
+  display:block;
+  position: absolute;
+  left: 0px;
+  width: $width;
+  overflow : hidden;
+}
+
+.ui-resizable .ui-resizable-handle {
+  display:block;
+}
+
+.ui-resizable-e {
+  background-image:var(--nav-splitbar-image);
+  background-size:100%;
+  background-repeat:repeat-y;
+  background-attachment: scroll;
+  cursor:ew-resize;
+  height:100%;
+  right:0;
+  top:0;
+  width:6px;
+}
+
+.ui-resizable-handle {
+  display:none;
+  font-size:0.1px;
+  position:absolute;
+  z-index:1;
+}
+
+#nav-tree-contents {
+  margin: 6px 0px 0px 0px;
+}
+
+#nav-tree {
+  background-repeat:repeat-x;
+  background-color: var(--nav-background-color);
+  -webkit-overflow-scrolling : touch; /* iOS 5+ */
+}
+
+#nav-sync {
+  position:absolute;
+  top:5px;
+  right:24px;
+  z-index:0;
+}
+
+#nav-sync img {
+  opacity:0.3;
+}
+
+#nav-sync img:hover {
+  opacity:0.9;
+}
+
+@media print
+{
+  #nav-tree { display: none; }
+  div.ui-resizable-handle { display: none; position: relative; }
+}
+
diff --git a/doc/html/navtree.js b/doc/html/navtree.js
new file mode 100644 (file)
index 0000000..2798368
--- /dev/null
@@ -0,0 +1,549 @@
+/*
+ @licstart  The following is the entire license notice for the JavaScript code in this file.
+
+ The MIT License (MIT)
+
+ Copyright (C) 1997-2020 by Dimitri van Heesch
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+ and associated documentation files (the "Software"), to deal in the Software without restriction,
+ including without limitation the rights to use, copy, modify, merge, publish, distribute,
+ sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all copies or
+ substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+ BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ @licend  The above is the entire license notice for the JavaScript code in this file
+ */
+var navTreeSubIndices = new Array();
+var arrowDown = '&#9660;';
+var arrowRight = '&#9658;';
+
+function getData(varName)
+{
+  var i = varName.lastIndexOf('/');
+  var n = i>=0 ? varName.substring(i+1) : varName;
+  return eval(n.replace(/\-/g,'_'));
+}
+
+function stripPath(uri)
+{
+  return uri.substring(uri.lastIndexOf('/')+1);
+}
+
+function stripPath2(uri)
+{
+  var i = uri.lastIndexOf('/');
+  var s = uri.substring(i+1);
+  var m = uri.substring(0,i+1).match(/\/d\w\/d\w\w\/$/);
+  return m ? uri.substring(i-6) : s;
+}
+
+function hashValue()
+{
+  return $(location).attr('hash').substring(1).replace(/[^\w\-]/g,'');
+}
+
+function hashUrl()
+{
+  return '#'+hashValue();
+}
+
+function pathName()
+{
+  return $(location).attr('pathname').replace(/[^-A-Za-z0-9+&@#/%?=~_|!:,.;\(\)]/g, '');
+}
+
+function localStorageSupported()
+{
+  try {
+    return 'localStorage' in window && window['localStorage'] !== null && window.localStorage.getItem;
+  }
+  catch(e) {
+    return false;
+  }
+}
+
+function storeLink(link)
+{
+  if (!$("#nav-sync").hasClass('sync') && localStorageSupported()) {
+      window.localStorage.setItem('navpath',link);
+  }
+}
+
+function deleteLink()
+{
+  if (localStorageSupported()) {
+    window.localStorage.setItem('navpath','');
+  }
+}
+
+function cachedLink()
+{
+  if (localStorageSupported()) {
+    return window.localStorage.getItem('navpath');
+  } else {
+    return '';
+  }
+}
+
+function getScript(scriptName,func,show)
+{
+  var head = document.getElementsByTagName("head")[0];
+  var script = document.createElement('script');
+  script.id = scriptName;
+  script.type = 'text/javascript';
+  script.onload = func;
+  script.src = scriptName+'.js';
+  head.appendChild(script);
+}
+
+function createIndent(o,domNode,node,level)
+{
+  var level=-1;
+  var n = node;
+  while (n.parentNode) { level++; n=n.parentNode; }
+  if (node.childrenData) {
+    var imgNode = document.createElement("span");
+    imgNode.className = 'arrow';
+    imgNode.style.paddingLeft=(16*level).toString()+'px';
+    imgNode.innerHTML=arrowRight;
+    node.plus_img = imgNode;
+    node.expandToggle = document.createElement("a");
+    node.expandToggle.href = "javascript:void(0)";
+    node.expandToggle.onclick = function() {
+      if (node.expanded) {
+        $(node.getChildrenUL()).slideUp("fast");
+        node.plus_img.innerHTML=arrowRight;
+        node.expanded = false;
+      } else {
+        expandNode(o, node, false, false);
+      }
+    }
+    node.expandToggle.appendChild(imgNode);
+    domNode.appendChild(node.expandToggle);
+  } else {
+    var span = document.createElement("span");
+    span.className = 'arrow';
+    span.style.width   = 16*(level+1)+'px';
+    span.innerHTML = '&#160;';
+    domNode.appendChild(span);
+  }
+}
+
+var animationInProgress = false;
+
+function gotoAnchor(anchor,aname,updateLocation)
+{
+  var pos, docContent = $('#doc-content');
+  var ancParent = $(anchor.parent());
+  if (ancParent.hasClass('memItemLeft') ||
+      ancParent.hasClass('memtitle') ||
+      ancParent.hasClass('fieldname') ||
+      ancParent.hasClass('fieldtype') ||
+      ancParent.is(':header'))
+  {
+    pos = ancParent.position().top;
+  } else if (anchor.position()) {
+    pos = anchor.position().top;
+  }
+  if (pos) {
+    var dist = Math.abs(Math.min(
+               pos-docContent.offset().top,
+               docContent[0].scrollHeight-
+               docContent.height()-docContent.scrollTop()));
+    animationInProgress=true;
+    docContent.animate({
+      scrollTop: pos + docContent.scrollTop() - docContent.offset().top
+    },Math.max(50,Math.min(500,dist)),function(){
+      if (updateLocation) window.location.href=aname;
+      animationInProgress=false;
+    });
+  }
+}
+
+function newNode(o, po, text, link, childrenData, lastNode)
+{
+  var node = new Object();
+  node.children = Array();
+  node.childrenData = childrenData;
+  node.depth = po.depth + 1;
+  node.relpath = po.relpath;
+  node.isLast = lastNode;
+
+  node.li = document.createElement("li");
+  po.getChildrenUL().appendChild(node.li);
+  node.parentNode = po;
+
+  node.itemDiv = document.createElement("div");
+  node.itemDiv.className = "item";
+
+  node.labelSpan = document.createElement("span");
+  node.labelSpan.className = "label";
+
+  createIndent(o,node.itemDiv,node,0);
+  node.itemDiv.appendChild(node.labelSpan);
+  node.li.appendChild(node.itemDiv);
+
+  var a = document.createElement("a");
+  node.labelSpan.appendChild(a);
+  node.label = document.createTextNode(text);
+  node.expanded = false;
+  a.appendChild(node.label);
+  if (link) {
+    var url;
+    if (link.substring(0,1)=='^') {
+      url = link.substring(1);
+      link = url;
+    } else {
+      url = node.relpath+link;
+    }
+    a.className = stripPath(link.replace('#',':'));
+    if (link.indexOf('#')!=-1) {
+      var aname = '#'+link.split('#')[1];
+      var srcPage = stripPath(pathName());
+      var targetPage = stripPath(link.split('#')[0]);
+      a.href = srcPage!=targetPage ? url : "javascript:void(0)";
+      a.onclick = function(){
+        storeLink(link);
+        if (!$(a).parent().parent().hasClass('selected'))
+        {
+          $('.item').removeClass('selected');
+          $('.item').removeAttr('id');
+          $(a).parent().parent().addClass('selected');
+          $(a).parent().parent().attr('id','selected');
+        }
+        var anchor = $(aname);
+        gotoAnchor(anchor,aname,true);
+      };
+    } else {
+      a.href = url;
+      a.onclick = function() { storeLink(link); }
+    }
+  } else {
+    if (childrenData != null)
+    {
+      a.className = "nolink";
+      a.href = "javascript:void(0)";
+      a.onclick = node.expandToggle.onclick;
+    }
+  }
+
+  node.childrenUL = null;
+  node.getChildrenUL = function() {
+    if (!node.childrenUL) {
+      node.childrenUL = document.createElement("ul");
+      node.childrenUL.className = "children_ul";
+      node.childrenUL.style.display = "none";
+      node.li.appendChild(node.childrenUL);
+    }
+    return node.childrenUL;
+  };
+
+  return node;
+}
+
+function showRoot()
+{
+  var headerHeight = $("#top").height();
+  var footerHeight = $("#nav-path").height();
+  var windowHeight = $(window).height() - headerHeight - footerHeight;
+  (function (){ // retry until we can scroll to the selected item
+    try {
+      var navtree=$('#nav-tree');
+      navtree.scrollTo('#selected',100,{offset:-windowHeight/2});
+    } catch (err) {
+      setTimeout(arguments.callee, 0);
+    }
+  })();
+}
+
+function expandNode(o, node, imm, showRoot)
+{
+  if (node.childrenData && !node.expanded) {
+    if (typeof(node.childrenData)==='string') {
+      var varName    = node.childrenData;
+      getScript(node.relpath+varName,function(){
+        node.childrenData = getData(varName);
+        expandNode(o, node, imm, showRoot);
+      }, showRoot);
+    } else {
+      if (!node.childrenVisited) {
+        getNode(o, node);
+      }
+      $(node.getChildrenUL()).slideDown("fast");
+      node.plus_img.innerHTML = arrowDown;
+      node.expanded = true;
+    }
+  }
+}
+
+function glowEffect(n,duration)
+{
+  n.addClass('glow').delay(duration).queue(function(next){
+    $(this).removeClass('glow');next();
+  });
+}
+
+function highlightAnchor()
+{
+  var aname = hashUrl();
+  var anchor = $(aname);
+  if (anchor.parent().attr('class')=='memItemLeft'){
+    var rows = $('.memberdecls tr[class$="'+hashValue()+'"]');
+    glowEffect(rows.children(),300); // member without details
+  } else if (anchor.parent().attr('class')=='fieldname'){
+    glowEffect(anchor.parent().parent(),1000); // enum value
+  } else if (anchor.parent().attr('class')=='fieldtype'){
+    glowEffect(anchor.parent().parent(),1000); // struct field
+  } else if (anchor.parent().is(":header")) {
+    glowEffect(anchor.parent(),1000); // section header
+  } else {
+    glowEffect(anchor.next(),1000); // normal member
+  }
+}
+
+function selectAndHighlight(hash,n)
+{
+  var a;
+  if (hash) {
+    var link=stripPath(pathName())+':'+hash.substring(1);
+    a=$('.item a[class$="'+link+'"]');
+  }
+  if (a && a.length) {
+    a.parent().parent().addClass('selected');
+    a.parent().parent().attr('id','selected');
+    highlightAnchor();
+  } else if (n) {
+    $(n.itemDiv).addClass('selected');
+    $(n.itemDiv).attr('id','selected');
+  }
+  var topOffset=5;
+  if (typeof page_layout!=='undefined' && page_layout==1) {
+    topOffset+=$('#top').outerHeight();
+  }
+  if ($('#nav-tree-contents .item:first').hasClass('selected')) {
+    topOffset+=25;
+  }
+  $('#nav-sync').css('top',topOffset+'px');
+  showRoot();
+}
+
+function showNode(o, node, index, hash)
+{
+  if (node && node.childrenData) {
+    if (typeof(node.childrenData)==='string') {
+      var varName    = node.childrenData;
+      getScript(node.relpath+varName,function(){
+        node.childrenData = getData(varName);
+        showNode(o,node,index,hash);
+      },true);
+    } else {
+      if (!node.childrenVisited) {
+        getNode(o, node);
+      }
+      $(node.getChildrenUL()).css({'display':'block'});
+      node.plus_img.innerHTML = arrowDown;
+      node.expanded = true;
+      var n = node.children[o.breadcrumbs[index]];
+      if (index+1<o.breadcrumbs.length) {
+        showNode(o,n,index+1,hash);
+      } else {
+        if (typeof(n.childrenData)==='string') {
+          var varName = n.childrenData;
+          getScript(n.relpath+varName,function(){
+            n.childrenData = getData(varName);
+            node.expanded=false;
+            showNode(o,node,index,hash); // retry with child node expanded
+          },true);
+        } else {
+          var rootBase = stripPath(o.toroot.replace(/\..+$/, ''));
+          if (rootBase=="index" || rootBase=="pages" || rootBase=="search") {
+            expandNode(o, n, true, true);
+          }
+          selectAndHighlight(hash,n);
+        }
+      }
+    }
+  } else {
+    selectAndHighlight(hash);
+  }
+}
+
+function removeToInsertLater(element) {
+  var parentNode = element.parentNode;
+  var nextSibling = element.nextSibling;
+  parentNode.removeChild(element);
+  return function() {
+    if (nextSibling) {
+      parentNode.insertBefore(element, nextSibling);
+    } else {
+      parentNode.appendChild(element);
+    }
+  };
+}
+
+function getNode(o, po)
+{
+  var insertFunction = removeToInsertLater(po.li);
+  po.childrenVisited = true;
+  var l = po.childrenData.length-1;
+  for (var i in po.childrenData) {
+    var nodeData = po.childrenData[i];
+    po.children[i] = newNode(o, po, nodeData[0], nodeData[1], nodeData[2],
+      i==l);
+  }
+  insertFunction();
+}
+
+function gotoNode(o,subIndex,root,hash,relpath)
+{
+  var nti = navTreeSubIndices[subIndex][root+hash];
+  o.breadcrumbs = $.extend(true, [], nti ? nti : navTreeSubIndices[subIndex][root]);
+  if (!o.breadcrumbs && root!=NAVTREE[0][1]) { // fallback: show index
+    navTo(o,NAVTREE[0][1],"",relpath);
+    $('.item').removeClass('selected');
+    $('.item').removeAttr('id');
+  }
+  if (o.breadcrumbs) {
+    o.breadcrumbs.unshift(0); // add 0 for root node
+    showNode(o, o.node, 0, hash);
+  }
+}
+
+function navTo(o,root,hash,relpath)
+{
+  var link = cachedLink();
+  if (link) {
+    var parts = link.split('#');
+    root = parts[0];
+    if (parts.length>1) hash = '#'+parts[1].replace(/[^\w\-]/g,'');
+    else hash='';
+  }
+  if (hash.match(/^#l\d+$/)) {
+    var anchor=$('a[name='+hash.substring(1)+']');
+    glowEffect(anchor.parent(),1000); // line number
+    hash=''; // strip line number anchors
+  }
+  var url=root+hash;
+  var i=-1;
+  while (NAVTREEINDEX[i+1]<=url) i++;
+  if (i==-1) { i=0; root=NAVTREE[0][1]; } // fallback: show index
+  if (navTreeSubIndices[i]) {
+    gotoNode(o,i,root,hash,relpath)
+  } else {
+    getScript(relpath+'navtreeindex'+i,function(){
+      navTreeSubIndices[i] = eval('NAVTREEINDEX'+i);
+      if (navTreeSubIndices[i]) {
+        gotoNode(o,i,root,hash,relpath);
+      }
+    },true);
+  }
+}
+
+function showSyncOff(n,relpath)
+{
+    n.html('<img src="'+relpath+'sync_off.png" title="'+SYNCOFFMSG+'"/>');
+}
+
+function showSyncOn(n,relpath)
+{
+    n.html('<img src="'+relpath+'sync_on.png" title="'+SYNCONMSG+'"/>');
+}
+
+function toggleSyncButton(relpath)
+{
+  var navSync = $('#nav-sync');
+  if (navSync.hasClass('sync')) {
+    navSync.removeClass('sync');
+    showSyncOff(navSync,relpath);
+    storeLink(stripPath2(pathName())+hashUrl());
+  } else {
+    navSync.addClass('sync');
+    showSyncOn(navSync,relpath);
+    deleteLink();
+  }
+}
+
+var loadTriggered = false;
+var readyTriggered = false;
+var loadObject,loadToRoot,loadUrl,loadRelPath;
+
+$(window).on('load',function(){
+  if (readyTriggered) { // ready first
+    navTo(loadObject,loadToRoot,loadUrl,loadRelPath);
+    showRoot();
+  }
+  loadTriggered=true;
+});
+
+function initNavTree(toroot,relpath)
+{
+  var o = new Object();
+  o.toroot = toroot;
+  o.node = new Object();
+  o.node.li = document.getElementById("nav-tree-contents");
+  o.node.childrenData = NAVTREE;
+  o.node.children = new Array();
+  o.node.childrenUL = document.createElement("ul");
+  o.node.getChildrenUL = function() { return o.node.childrenUL; };
+  o.node.li.appendChild(o.node.childrenUL);
+  o.node.depth = 0;
+  o.node.relpath = relpath;
+  o.node.expanded = false;
+  o.node.isLast = true;
+  o.node.plus_img = document.createElement("span");
+  o.node.plus_img.className = 'arrow';
+  o.node.plus_img.innerHTML = arrowRight;
+
+  if (localStorageSupported()) {
+    var navSync = $('#nav-sync');
+    if (cachedLink()) {
+      showSyncOff(navSync,relpath);
+      navSync.removeClass('sync');
+    } else {
+      showSyncOn(navSync,relpath);
+    }
+    navSync.click(function(){ toggleSyncButton(relpath); });
+  }
+
+  if (loadTriggered) { // load before ready
+    navTo(o,toroot,hashUrl(),relpath);
+    showRoot();
+  } else { // ready before load
+    loadObject  = o;
+    loadToRoot  = toroot;
+    loadUrl     = hashUrl();
+    loadRelPath = relpath;
+    readyTriggered=true;
+  }
+
+  $(window).bind('hashchange', function(){
+     if (window.location.hash && window.location.hash.length>1){
+       var a;
+       if ($(location).attr('hash')){
+         var clslink=stripPath(pathName())+':'+hashValue();
+         a=$('.item a[class$="'+clslink.replace(/</g,'\\3c ')+'"]');
+       }
+       if (a==null || !$(a).parent().parent().hasClass('selected')){
+         $('.item').removeClass('selected');
+         $('.item').removeAttr('id');
+       }
+       var link=stripPath2(pathName());
+       navTo(o,link,hashUrl(),relpath);
+     } else if (!animationInProgress) {
+       $('#doc-content').scrollTop(0);
+       $('.item').removeClass('selected');
+       $('.item').removeAttr('id');
+       navTo(o,toroot,hashUrl(),relpath);
+     }
+  })
+}
+/* @license-end */
diff --git a/doc/html/navtreedata.js b/doc/html/navtreedata.js
new file mode 100644 (file)
index 0000000..22b2f63
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ @licstart  The following is the entire license notice for the JavaScript code in this file.
+
+ The MIT License (MIT)
+
+ Copyright (C) 1997-2020 by Dimitri van Heesch
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+ and associated documentation files (the "Software"), to deal in the Software without restriction,
+ including without limitation the rights to use, copy, modify, merge, publish, distribute,
+ sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all copies or
+ substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+ BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ @licend  The above is the entire license notice for the JavaScript code in this file
+*/
+var NAVTREE =
+[
+  [ "NATS C Client with JetStream and Streaming support", "index.html", [
+    [ "NATS C client.", "index.html", [
+      [ "Introduction", "index.html#intro_sec", null ],
+      [ "Installation", "index.html#install_sec", null ],
+      [ "Frequently Asked Questions", "index.html#faq_sec", null ],
+      [ "Other Documentation", "index.html#other_doc_section", null ]
+    ] ],
+    [ "Deprecated List", "deprecated.html", null ],
+    [ "Modules", "modules.html", "modules" ],
+    [ "Classes", "annotated.html", [
+      [ "Class List", "annotated.html", "annotated_dup" ],
+      [ "Class Index", "classes.html", null ],
+      [ "Class Members", "functions.html", [
+        [ "All", "functions.html", "functions_dup" ],
+        [ "Variables", "functions_vars.html", "functions_vars" ]
+      ] ]
+    ] ],
+    [ "Files", "files.html", [
+      [ "File List", "files.html", "files_dup" ],
+      [ "File Members", "globals.html", [
+        [ "All", "globals.html", "globals_dup" ],
+        [ "Functions", "globals_func.html", "globals_func" ],
+        [ "Typedefs", "globals_type.html", null ],
+        [ "Enumerations", "globals_enum.html", null ],
+        [ "Enumerator", "globals_eval.html", null ],
+        [ "Macros", "globals_defs.html", null ]
+      ] ]
+    ] ]
+  ] ]
+];
+
+var NAVTREEINDEX =
+[
+"annotated.html",
+"group__libevent_functions.html#ga7ac99f326a59e5663ff66f5023c87091",
+"group__types_group.html#gga8650faf52b0b6b23df376eebeb9d0354a2c4a1e2b75f31dd69a89b541d75afa44",
+"structjs_consumer_config.html#a802ea3bf0669395bee28611f4ecede80"
+];
+
+var SYNCONMSG = 'click to disable panel synchronisation';
+var SYNCOFFMSG = 'click to enable panel synchronisation';
\ No newline at end of file
diff --git a/doc/html/navtreeindex0.js b/doc/html/navtreeindex0.js
new file mode 100644 (file)
index 0000000..e31bdc7
--- /dev/null
@@ -0,0 +1,253 @@
+var NAVTREEINDEX0 =
+{
+"annotated.html":[3,0],
+"classes.html":[3,1],
+"deprecated.html":[1],
+"dir_085924db4bed469054a9264cf96b0d5e.html":[4,0,0,0],
+"dir_68267d1309a1af8e8297ef4c3efbcdba.html":[4,0,0],
+"files.html":[4,0],
+"functions.html":[3,2,0,0],
+"functions.html":[3,2,0],
+"functions_b.html":[3,2,0,1],
+"functions_c.html":[3,2,0,2],
+"functions_d.html":[3,2,0,3],
+"functions_e.html":[3,2,0,4],
+"functions_f.html":[3,2,0,5],
+"functions_h.html":[3,2,0,6],
+"functions_i.html":[3,2,0,7],
+"functions_k.html":[3,2,0,8],
+"functions_l.html":[3,2,0,9],
+"functions_m.html":[3,2,0,10],
+"functions_n.html":[3,2,0,11],
+"functions_o.html":[3,2,0,12],
+"functions_p.html":[3,2,0,13],
+"functions_q.html":[3,2,0,14],
+"functions_r.html":[3,2,0,15],
+"functions_s.html":[3,2,0,16],
+"functions_t.html":[3,2,0,17],
+"functions_vars.html":[3,2,1],
+"functions_vars.html":[3,2,1,0],
+"functions_vars_b.html":[3,2,1,1],
+"functions_vars_c.html":[3,2,1,2],
+"functions_vars_d.html":[3,2,1,3],
+"functions_vars_e.html":[3,2,1,4],
+"functions_vars_f.html":[3,2,1,5],
+"functions_vars_h.html":[3,2,1,6],
+"functions_vars_i.html":[3,2,1,7],
+"functions_vars_k.html":[3,2,1,8],
+"functions_vars_l.html":[3,2,1,9],
+"functions_vars_m.html":[3,2,1,10],
+"functions_vars_n.html":[3,2,1,11],
+"functions_vars_o.html":[3,2,1,12],
+"functions_vars_p.html":[3,2,1,13],
+"functions_vars_q.html":[3,2,1,14],
+"functions_vars_r.html":[3,2,1,15],
+"functions_vars_s.html":[3,2,1,16],
+"functions_vars_t.html":[3,2,1,17],
+"functions_vars_w.html":[3,2,1,18],
+"functions_w.html":[3,2,0,18],
+"globals.html":[4,1,0],
+"globals.html":[4,1,0,0],
+"globals_defs.html":[4,1,5],
+"globals_enum.html":[4,1,3],
+"globals_eval.html":[4,1,4],
+"globals_func.html":[4,1,1],
+"globals_func.html":[4,1,1,0],
+"globals_func_k.html":[4,1,1,1],
+"globals_func_n.html":[4,1,1,2],
+"globals_func_s.html":[4,1,1,3],
+"globals_k.html":[4,1,0,1],
+"globals_n.html":[4,1,0,2],
+"globals_s.html":[4,1,0,3],
+"globals_type.html":[4,1,2],
+"group__callbacks_group.html":[2,1],
+"group__callbacks_group.html#ga245131e64f1d0dff7edc8ed874a07e9a":[2,1,10],
+"group__callbacks_group.html#ga245eab0a01a485e40fba267f84ec037f":[2,1,3],
+"group__callbacks_group.html#ga258b30458134be90f17315c037f34b7b":[2,1,7],
+"group__callbacks_group.html#ga2bb5dd2d821ca5bbc0488f7e6aceed17":[2,1,5],
+"group__callbacks_group.html#ga3353d4b92851c52121f65aaf0684cba4":[2,1,11],
+"group__callbacks_group.html#ga4b02de70fe9380d184fd01d87527f499":[2,1,9],
+"group__callbacks_group.html#ga4f66e065bd918f02510d4c53d8a5b729":[2,1,13],
+"group__callbacks_group.html#ga954768cc1d3388bb6ab723e777647992":[2,1,12],
+"group__callbacks_group.html#ga9e511dffa471dfb971b7dd2b12329626":[2,1,2],
+"group__callbacks_group.html#gab63dee7f7012ba11ae20b76dbc36f2d0":[2,1,6],
+"group__callbacks_group.html#gab786ffd670c86de0563559351305080b":[2,1,8],
+"group__callbacks_group.html#gac34092f6c698374f86ad349302bdd55c":[2,1,16],
+"group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c":[2,1,1],
+"group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe":[2,1,0],
+"group__callbacks_group.html#gad5d6a685731b3bf635995b7375af4d18":[2,1,14],
+"group__callbacks_group.html#gaea4c125ecfb43eaf43da20e8444c2aaa":[2,1,4],
+"group__callbacks_group.html#gaf7456e37fa14f1834d9048d3789e9409":[2,1,15],
+"group__conn_group.html":[2,2,9],
+"group__conn_mgt_group.html":[2,2,9,0],
+"group__conn_mgt_group.html#ga0433159e518540ff874c4026fe9cd0c5":[2,2,9,0,8],
+"group__conn_mgt_group.html#ga15a0f8aa9a6f621535d01593a4c8edd5":[2,2,9,0,6],
+"group__conn_mgt_group.html#ga19e204d27a232e2d4334301fc002b2ed":[2,2,9,0,26],
+"group__conn_mgt_group.html#ga1c98f8d89bb8e20ea8621e860a90267f":[2,2,9,0,9],
+"group__conn_mgt_group.html#ga33fa209522e5e0226b5b7c7d720a3b98":[2,2,9,0,7],
+"group__conn_mgt_group.html#ga48cee9ea1cdc9fc2770de2f9f0fd1ccf":[2,2,9,0,14],
+"group__conn_mgt_group.html#ga530f0f1c75c58a81aae1a59f15b46d9f":[2,2,9,0,4],
+"group__conn_mgt_group.html#ga59bdc4ad9fea2053f5d3841f6b83f88b":[2,2,9,0,19],
+"group__conn_mgt_group.html#ga5aa349fc3895dde772671b324b07a688":[2,2,9,0,5],
+"group__conn_mgt_group.html#ga68821a8ae1176096b5afef7fdc7947ec":[2,2,9,0,12],
+"group__conn_mgt_group.html#ga68e7149f7ff1cc4989b3f795fa7e76d9":[2,2,9,0,11],
+"group__conn_mgt_group.html#ga6960cfdbaac3b8759784f352d4c264f8":[2,2,9,0,21],
+"group__conn_mgt_group.html#ga740be1ba16a8570eb98ef6755ebf52ce":[2,2,9,0,0],
+"group__conn_mgt_group.html#ga747513ba6ab63fdf9a72bfc8025a14ba":[2,2,9,0,18],
+"group__conn_mgt_group.html#ga761095a42374b4dafa178df7d7652dd5":[2,2,9,0,25],
+"group__conn_mgt_group.html#ga85915ef0c8b87993be1b076099d6a7c1":[2,2,9,0,10],
+"group__conn_mgt_group.html#gaa3fd27e6e7d8131e679d4f10e201c435":[2,2,9,0,23],
+"group__conn_mgt_group.html#gaa89c06e30e19ff361125bfc9114d89a8":[2,2,9,0,1],
+"group__conn_mgt_group.html#gab6cfa9cb6857ae10f096a94f5e244e63":[2,2,9,0,17],
+"group__conn_mgt_group.html#gad25c77be0873495412c90a73fe450708":[2,2,9,0,16],
+"group__conn_mgt_group.html#gad765b80ae8e1a06a7a942cccf29f042a":[2,2,9,0,24],
+"group__conn_mgt_group.html#gad81b603b84c0180aefc6d5ebad7f2a47":[2,2,9,0,2],
+"group__conn_mgt_group.html#gadafcfeeeac2733c7119981ab97b7103d":[2,2,9,0,22],
+"group__conn_mgt_group.html#gae06fe6f5933f216d6d93645a122a7dd4":[2,2,9,0,20],
+"group__conn_mgt_group.html#gaf4ee7262e35e44c40ad5dfe9240db76b":[2,2,9,0,15],
+"group__conn_mgt_group.html#gaf623280407c43ade02285005f0642e6d":[2,2,9,0,13],
+"group__conn_mgt_group.html#gafb83c8d7970ba68be0e6c40c38cdfde4":[2,2,9,0,3],
+"group__conn_mgt_group.html#gafda2f702276fb0ac301efac10df09495":[2,2,9,0,27],
+"group__conn_pub_group.html":[2,2,9,1],
+"group__conn_pub_group.html#ga052de4b75b3b69ccd8d20eb4861b801d":[2,2,9,1,7],
+"group__conn_pub_group.html#ga4bb5105df6a3efd2088e6be0fdf6b31f":[2,2,9,1,6],
+"group__conn_pub_group.html#ga74511acd87385931112c45c48c2a14ba":[2,2,9,1,2],
+"group__conn_pub_group.html#gaaaa3d75ffec2dcdc6bf905cdb1eee59e":[2,2,9,1,3],
+"group__conn_pub_group.html#gaafca9a8294e81a5a9979e762931e56c5":[2,2,9,1,4],
+"group__conn_pub_group.html#gac0b9f7759ecc39b8d77807b94254f9b4":[2,2,9,1,0],
+"group__conn_pub_group.html#gad09a717c20de4cf0e2a21dcfd9ce6c64":[2,2,9,1,1],
+"group__conn_pub_group.html#gaf4b4a022f9c21fc269b87c000330c5a7":[2,2,9,1,5],
+"group__conn_sub_group.html":[2,2,9,2],
+"group__conn_sub_group.html#ga17574d5165f7e285462e3d3b2709edf4":[2,2,9,2,2],
+"group__conn_sub_group.html#ga3c9fee2775130786ef62f1cbeb191a48":[2,2,9,2,3],
+"group__conn_sub_group.html#ga68630ea7c4bbdc7f8cd62058b41fb476":[2,2,9,2,5],
+"group__conn_sub_group.html#ga96fa115fd5b2ef7658884da80714b91c":[2,2,9,2,4],
+"group__conn_sub_group.html#gacb2c83b58b7909715424cbc327fdd404":[2,2,9,2,1],
+"group__conn_sub_group.html#gaefab965b5645798d47f9244f2b3fe3fb":[2,2,9,2,0],
+"group__env_variables_group.html":[2,4],
+"group__func_group.html":[2,2],
+"group__inbox_group.html":[2,2,6],
+"group__inbox_group.html#gaa1ec779a0b7ead54b78da05533848b6d":[2,2,6,0],
+"group__inbox_group.html#gabd6444fb8f28afb9c2b6645945f46cfe":[2,2,6,1],
+"group__js_assets_group.html":[2,2,13,0],
+"group__js_assets_group.html#ga223691e6831072a0b8f8103a778293b0":[2,2,13,0,1],
+"group__js_assets_group.html#ga2ced0d190131460bf4608ab893dffc50":[2,2,13,0,30],
+"group__js_assets_group.html#ga2dda04757b4ab27a794b64f8d727fe23":[2,2,13,0,24],
+"group__js_assets_group.html#ga3381bb05c05bf4a8979adde68d37dd66":[2,2,13,0,21],
+"group__js_assets_group.html#ga388bfeaa5a78ebf6ce7c15c6e3a7156b":[2,2,13,0,4],
+"group__js_assets_group.html#ga38cdcc339eb8976d23296b99aa37d629":[2,2,13,0,18],
+"group__js_assets_group.html#ga397e55a0b3b6d36c9bf746eee3842172":[2,2,13,0,8],
+"group__js_assets_group.html#ga421de40d8e91658353111c3f2ea90ec8":[2,2,13,0,28],
+"group__js_assets_group.html#ga52fbc61759b11494db91f348a733c490":[2,2,13,0,25],
+"group__js_assets_group.html#ga531d91de372f0dffb8d64abecf88b0c0":[2,2,13,0,17],
+"group__js_assets_group.html#ga5a6a886c18a79caa403908bf7f7ef125":[2,2,13,0,7],
+"group__js_assets_group.html#ga5efc5136d33ba52161e6732f88f1ee75":[2,2,13,0,5],
+"group__js_assets_group.html#ga62c250cecc650b1eed0fa1691893e2ae":[2,2,13,0,12],
+"group__js_assets_group.html#ga6835b53da27d5721eddb3698e582cf0c":[2,2,13,0,10],
+"group__js_assets_group.html#ga690d19af55d12b82c8523d1861cef8d0":[2,2,13,0,29],
+"group__js_assets_group.html#ga7158f73e183462e9a15e9802e1746ff0":[2,2,13,0,14],
+"group__js_assets_group.html#ga75a5c44304e24481c67e17fbccc15c31":[2,2,13,0,6],
+"group__js_assets_group.html#ga7c8664b38fcce8497746367d35e5f60b":[2,2,13,0,32],
+"group__js_assets_group.html#ga7fe8e0bf98a38eb59372e7cd78aaaf56":[2,2,13,0,2],
+"group__js_assets_group.html#ga81aebebcd79922104720da51e95020d4":[2,2,13,0,3],
+"group__js_assets_group.html#ga8d835d47aed9c84ce3b8dcfea469f4cb":[2,2,13,0,11],
+"group__js_assets_group.html#ga8ee87ef86e94be42685941abe9638bbd":[2,2,13,0,16],
+"group__js_assets_group.html#ga94cb23a35516b7779de28fcbb263180a":[2,2,13,0,15],
+"group__js_assets_group.html#ga9c1d5ed2f24ba836c10e415231f80088":[2,2,13,0,26],
+"group__js_assets_group.html#ga9fe289ae172f83e53ca1b1b747744c1f":[2,2,13,0,9],
+"group__js_assets_group.html#gac230f71dbdc4d10bc7471d01763881d6":[2,2,13,0,0],
+"group__js_assets_group.html#gac3dfc87863dbbb3c959ecde4bce905bc":[2,2,13,0,19],
+"group__js_assets_group.html#gac8965dcfc6b465fbc323aa552c606c46":[2,2,13,0,31],
+"group__js_assets_group.html#gad13ec256e24710bb237995814871e554":[2,2,13,0,23],
+"group__js_assets_group.html#gaeba5d45abbe811c0e40830c5f26c78fd":[2,2,13,0,13],
+"group__js_assets_group.html#gaf28097ede3e9ba9926fb00856e63ffd9":[2,2,13,0,27],
+"group__js_assets_group.html#gaf2efb63db150e782d9007090b49d4115":[2,2,13,0,22],
+"group__js_assets_group.html#gaf8644f281d4e24893a6a170b4f7faa65":[2,2,13,0,20],
+"group__js_group.html":[2,2,13],
+"group__js_group.html#ga855ff9a04888d696785cc5ede96112e4":[2,2,13,4],
+"group__js_group.html#ga8ed08b0fe1074b1e490291f0af2cb03f":[2,2,13,5],
+"group__js_group.html#gacfa6ce3e60ea540e3331a09a7f3dc856":[2,2,13,6],
+"group__js_msg.html":[2,2,13,3],
+"group__js_msg.html#ga819be2990ec20b964aa574b5331d7f2e":[2,2,13,3,8],
+"group__js_msg.html#gab4850497c5481f5ec6eb1fcdb43646f5":[2,2,13,3,9],
+"group__js_msg.html#gac0697389fa60a3c4725e53cd23ada7bd":[2,2,13,3,5],
+"group__js_msg.html#gac271b874154301da9759f9ac05768b47":[2,2,13,3,4],
+"group__js_msg.html#gacf48e59038fab35849e9dc6f8fcf6328":[2,2,13,3,0],
+"group__js_msg.html#gae1e0beb19cd76e2f69e6415c41c9bb39":[2,2,13,3,6],
+"group__js_msg.html#gae454fb7e7097a3cd3362cb49ef8a3c84":[2,2,13,3,2],
+"group__js_msg.html#gae84d21e4388255e9d990e53c9f67e7c4":[2,2,13,3,7],
+"group__js_msg.html#gaf9bf92294342bcb27053de7038606d12":[2,2,13,3,1],
+"group__js_msg.html#gafb899ebf8e89b3a858fe20f7853635a7":[2,2,13,3,3],
+"group__js_pub_group.html":[2,2,13,1],
+"group__js_pub_group.html#ga069dfd6f0f3d96f1ff8bf2372e59900c":[2,2,13,1,4],
+"group__js_pub_group.html#ga24813ee9a58f00c0f21d10ab9c93b81d":[2,2,13,1,6],
+"group__js_pub_group.html#ga2ac95a3450f77f8074fae3f2fbe7e54c":[2,2,13,1,7],
+"group__js_pub_group.html#ga2aceeb82fac3621aea843dd246732bdd":[2,2,13,1,2],
+"group__js_pub_group.html#gaac130840b6db9109e72cf6ad9186dfc4":[2,2,13,1,3],
+"group__js_pub_group.html#gab7e4139a48c5ee4d2155cbb43142e873":[2,2,13,1,5],
+"group__js_pub_group.html#gac6ba005531c82d9f0efa88dd6b458477":[2,2,13,1,1],
+"group__js_pub_group.html#gaf09f333a8675a8060c5ede07a6bdeef9":[2,2,13,1,0],
+"group__js_sub_group.html":[2,2,13,2],
+"group__js_sub_group.html#ga0daed9f0d2d00cb14314ecc180a6fa84":[2,2,13,2,8],
+"group__js_sub_group.html#ga1c3a62de8cd4855ae61ea4f67417a43b":[2,2,13,2,5],
+"group__js_sub_group.html#ga472adb949d1af9d8f07bda99f5d7f3f8":[2,2,13,2,0],
+"group__js_sub_group.html#ga676292505e7fde8688cfd886b79a10ed":[2,2,13,2,6],
+"group__js_sub_group.html#gaa686c6efd84ef963de1925108e896515":[2,2,13,2,1],
+"group__js_sub_group.html#gaae716a1431db065744c079b71a9f4c2e":[2,2,13,2,7],
+"group__js_sub_group.html#gaaeaddb73857aa4eb4901eec945ed27cd":[2,2,13,2,3],
+"group__js_sub_group.html#gabacb010031e535f9fb6e2167337e8adf":[2,2,13,2,2],
+"group__js_sub_group.html#gafc5e0d2269bd23b4d5fb7f3b05278e50":[2,2,13,2,4],
+"group__kv_entry.html":[2,2,14,1],
+"group__kv_entry.html#ga088fd67d3d384ad7a7ddfc82535becea":[2,2,14,1,8],
+"group__kv_entry.html#ga233a2d75895cfd0140cf77757592cf47":[2,2,14,1,7],
+"group__kv_entry.html#ga28077f81d71a30cbce2dc81e5c9574fc":[2,2,14,1,2],
+"group__kv_entry.html#ga2d58abf81cb577e21a76f9c77568409f":[2,2,14,1,5],
+"group__kv_entry.html#ga31ef3a2e3a7df6cf4dbb0a762737800a":[2,2,14,1,6],
+"group__kv_entry.html#ga7ff6220915726600545357e31226fb65":[2,2,14,1,4],
+"group__kv_entry.html#ga8359ffcdeefb9c5821e6442d0d5ee388":[2,2,14,1,9],
+"group__kv_entry.html#gab455f32b0abfb1361dab4b5e7d98042a":[2,2,14,1,1],
+"group__kv_entry.html#gadedbb410cce499afb535eb6641c32ca7":[2,2,14,1,0],
+"group__kv_entry.html#gaf7ccc866865903f231e0431754ed2415":[2,2,14,1,3],
+"group__kv_group.html":[2,2,14],
+"group__kv_group.html#ga02ccd58bc5062f6ce6f94bf05e3dfe45":[2,2,14,20],
+"group__kv_group.html#ga13ed70f15cd1485cd15f96bcc4b7ad1c":[2,2,14,11],
+"group__kv_group.html#ga1fdf7a1d3acf96e475184790589a401e":[2,2,14,6],
+"group__kv_group.html#ga243113fd7df34ce104850ab888f04021":[2,2,14,15],
+"group__kv_group.html#ga2db86f80d6bfce1bdbedf1b9da22913c":[2,2,14,4],
+"group__kv_group.html#ga30feca870f580c7b9d2ad07a740505b2":[2,2,14,17],
+"group__kv_group.html#ga34ab74b229ff88e64301ea53a274da69":[2,2,14,16],
+"group__kv_group.html#ga3d5fa3d895d0d3041440105b244e9ca9":[2,2,14,13],
+"group__kv_group.html#ga5289f7cd3999cfb46fb1fcb83178aec6":[2,2,14,8],
+"group__kv_group.html#ga5726ad2e6205d2f6749be013138218ca":[2,2,14,9],
+"group__kv_group.html#ga5aa57345313cee85b020e50c22023fb5":[2,2,14,21],
+"group__kv_group.html#ga6030fc2a672ae868f7603587245b9d5a":[2,2,14,19],
+"group__kv_group.html#ga68101d46739ca894fd7c56c8661c08d8":[2,2,14,12],
+"group__kv_group.html#ga762fd5de8cde683e46a6736a51e575f5":[2,2,14,14],
+"group__kv_group.html#ga84ebd66a95ce857765d4a16ec35daba9":[2,2,14,7],
+"group__kv_group.html#ga9bf43431bb8264a3ea1f0df401afbe1a":[2,2,14,5],
+"group__kv_group.html#gad28fdf9aae16bba308cda799fca13281":[2,2,14,23],
+"group__kv_group.html#gadf75e99cc28bc9c2d6eac7c9f7398c27":[2,2,14,24],
+"group__kv_group.html#gae0c593bb2ef94ae60e775617c9423038":[2,2,14,10],
+"group__kv_group.html#gae783352ab81e22aa3173057d117518e6":[2,2,14,22],
+"group__kv_group.html#gaf011f1dd6813391c65664e982747602e":[2,2,14,18],
+"group__kv_group_mgt.html":[2,2,14,0],
+"group__kv_group_mgt.html#ga16d4c27d8ac62bb86ba601bc40f53172":[2,2,14,0,0],
+"group__kv_group_mgt.html#ga54e6c109a7c633e431b3eded286e00f6":[2,2,14,0,2],
+"group__kv_group_mgt.html#ga6bc715319560bc28359679fcdcead937":[2,2,14,0,3],
+"group__kv_group_mgt.html#gab0d6bdbfabd27af67eaeb36cec0787da":[2,2,14,0,4],
+"group__kv_group_mgt.html#gabc445bfe87112e56a6c73872fec6893e":[2,2,14,0,1],
+"group__kv_status.html":[2,2,14,3],
+"group__kv_status.html#ga1acec36db32207f21e15afc26bb5af1c":[2,2,14,3,0],
+"group__kv_status.html#ga2016af3c73841d8b226361e764dce158":[2,2,14,3,1],
+"group__kv_status.html#ga5eb3d824c1873af705beee4798246a08":[2,2,14,3,5],
+"group__kv_status.html#ga86b114f4dac9f06df86101f84bd497b2":[2,2,14,3,4],
+"group__kv_status.html#gaa747ad0a6182ec7a47fb47018c33d1c1":[2,2,14,3,3],
+"group__kv_status.html#gada6f22b5659b184762cea4f45d369ee5":[2,2,14,3,2],
+"group__kv_watcher.html":[2,2,14,2],
+"group__kv_watcher.html#ga21bc39fa795f7c4f392bd6d4e66ea1d9":[2,2,14,2,2],
+"group__kv_watcher.html#ga562c216a0199c30455af4c2da46000e5":[2,2,14,2,0],
+"group__kv_watcher.html#ga73adf44114fedd62ef75ebd81839b65e":[2,2,14,2,1],
+"group__libevent_functions.html":[2,5],
+"group__libevent_functions.html#ga195d269473332931fd0fede0bac3309e":[2,5,0],
+"group__libevent_functions.html#ga30c00f21a5251ee9fde09c1f2b429cd2":[2,5,1]
+};
diff --git a/doc/html/navtreeindex1.js b/doc/html/navtreeindex1.js
new file mode 100644 (file)
index 0000000..5b1fb4d
--- /dev/null
@@ -0,0 +1,253 @@
+var NAVTREEINDEX1 =
+{
+"group__libevent_functions.html#ga7ac99f326a59e5663ff66f5023c87091":[2,5,3],
+"group__libevent_functions.html#ga8a14ce23b4f6ba3bf63369961f9a5552":[2,5,2],
+"group__libevent_functions.html#gaac76f5937329a8650f69c6bd8af36cd5":[2,5,4],
+"group__library_group.html":[2,2,0],
+"group__library_group.html#ga0d8c3df1c0c4a3d340d8ff81355fb1e8":[2,2,0,1],
+"group__library_group.html#ga4a26d4caecb23348f6eee862c95fee7d":[2,2,0,0],
+"group__library_group.html#ga5fab3b18c4fe3630254483575f6066f4":[2,2,0,9],
+"group__library_group.html#ga5fbbaa19b0290b654d2669a05bd512e8":[2,2,0,2],
+"group__library_group.html#ga8c2ad4df801bd9d11564587ed3a7081e":[2,2,0,3],
+"group__library_group.html#gaa3c10ba3ae001595007ad0dc5dccc15e":[2,2,0,4],
+"group__library_group.html#gab21e94ce7a7d226611ea2c05914cf19d":[2,2,0,10],
+"group__library_group.html#gaca24172e1b97ca01cee29ca437f5702e":[2,2,0,8],
+"group__library_group.html#gacf5e423920d6a647df3bbf7de39d5223":[2,2,0,5],
+"group__library_group.html#gad5040264cd4b1404956babf3c03a4f09":[2,2,0,6],
+"group__library_group.html#gadecfd49a58b581dbba40da77b195fd85":[2,2,0,7],
+"group__library_group.html#gae75131e0ce4e5b89d0f82ea7892f112e":[2,2,0,13],
+"group__library_group.html#gaf75bb5b38bf32e6a8f43e54068625903":[2,2,0,14],
+"group__library_group.html#gaf781f246e2e0ab24623ca667c48dc3ba":[2,2,0,12],
+"group__library_group.html#gafe171baefa00a85b77205116e9f3e48a":[2,2,0,11],
+"group__libuv_functions.html":[2,6],
+"group__libuv_functions.html#ga1baf4a20b138dcf00807a8b830f4e02d":[2,6,1],
+"group__libuv_functions.html#ga5d4b677cbe1cd132c37bc56dbfc6949e":[2,6,0],
+"group__libuv_functions.html#ga85c722b2d2699a954362b20528f0aaac":[2,6,3],
+"group__libuv_functions.html#ga86ac71cffe752effd7397740d80c3c42":[2,6,2],
+"group__libuv_functions.html#ga8df663525fb59b882a0f3bd563083dc7":[2,6,5],
+"group__libuv_functions.html#gafaa633c9067f485f330b72644277b07d":[2,6,4],
+"group__msg_group.html":[2,2,7],
+"group__msg_group.html#ga098e4fec1c5a71c00a0d092fbd6d1a21":[2,2,7,1],
+"group__msg_group.html#ga1a091d24f939d881bf04fba78b8995c2":[2,2,7,0],
+"group__msg_group.html#ga25b69066ae50287e178aaf4f70f7d3de":[2,2,7,5],
+"group__msg_group.html#ga2b641ec3b1745604d7de1102e472254b":[2,2,7,7],
+"group__msg_group.html#ga43aa4a8e4b93725b4876ee2677e19c7b":[2,2,7,12],
+"group__msg_group.html#ga523364451fd92534e754054266196e59":[2,2,7,4],
+"group__msg_group.html#ga6ee8a007111ada293dd24ff0bab02491":[2,2,7,10],
+"group__msg_group.html#ga880535362c91b3e405792aa66ff945b6":[2,2,7,3],
+"group__msg_group.html#ga9e9590018284939f43f60964283f33ae":[2,2,7,13],
+"group__msg_group.html#gab3349f0b0ce721b340d5c0753c90ee18":[2,2,7,8],
+"group__msg_group.html#gac78ca02dc93d05cae837ced6386408f1":[2,2,7,11],
+"group__msg_group.html#gad7cad38946648e3047aa0665a3dd230a":[2,2,7,2],
+"group__msg_group.html#gae1ce9c9d82d151a3ea9dc03da048f66f":[2,2,7,9],
+"group__msg_group.html#gaf30b47d4217c9335919f05536e379af8":[2,2,7,6],
+"group__opts_group.html":[2,2,3],
+"group__opts_group.html#ga0290eac4665569c850468d9f00e246a0":[2,2,3,47],
+"group__opts_group.html#ga0ba43ba9930df385e4781b12be9f2851":[2,2,3,16],
+"group__opts_group.html#ga127ec7a8196b453947a7fa9a64096cbd":[2,2,3,30],
+"group__opts_group.html#ga17cd7fe41176cd98aca1184fa9352ad9":[2,2,3,7],
+"group__opts_group.html#ga192465163abb87ad48a843b45cdf9984":[2,2,3,50],
+"group__opts_group.html#ga1a3e3abfd7ddd8aff247df8f332bbda3":[2,2,3,22],
+"group__opts_group.html#ga1c529d347be0fe2eec17c7f4698e283e":[2,2,3,8],
+"group__opts_group.html#ga20946800d024b7089e73d63454d1c19f":[2,2,3,44],
+"group__opts_group.html#ga23a3b1f022112e98ddccb18b247b4426":[2,2,3,5],
+"group__opts_group.html#ga26a48c8529fffa5f5d1a61c030979980":[2,2,3,33],
+"group__opts_group.html#ga26f166af20de98bec67bc6cc916f769e":[2,2,3,19],
+"group__opts_group.html#ga2730f4e16e318a2ef8de98dbf6ede807":[2,2,3,25],
+"group__opts_group.html#ga2b7f144b011d8ce62941b608a8f324f0":[2,2,3,15],
+"group__opts_group.html#ga2cd6563694a439b3949a31fd81103099":[2,2,3,10],
+"group__opts_group.html#ga3593165aa113d6736e0226ddc56b3e9d":[2,2,3,27],
+"group__opts_group.html#ga36943e2ba53d05407cdabc4e7e96484b":[2,2,3,12],
+"group__opts_group.html#ga3d1d3cb2f2a0e23d27dd60e96d1cc91b":[2,2,3,23],
+"group__opts_group.html#ga3f7e760214417c7d87541ecb9ab5bea5":[2,2,3,1],
+"group__opts_group.html#ga44410242e73134e5bb51ef27904a9253":[2,2,3,31],
+"group__opts_group.html#ga4f694b87039cedaa65cd25656b14d1a3":[2,2,3,43],
+"group__opts_group.html#ga54dea2ffeb33779771652a7a14fc4adc":[2,2,3,36],
+"group__opts_group.html#ga5698f020e8eb3e7440eb073fe08ef62c":[2,2,3,14],
+"group__opts_group.html#ga59b47f7b7a19085cf8eaada9bfe5606e":[2,2,3,46],
+"group__opts_group.html#ga5b99da7dd74aac3be962f323c3863d9e":[2,2,3,3],
+"group__opts_group.html#ga60117450fc1f7b6f81bab455aeed7515":[2,2,3,45],
+"group__opts_group.html#ga61d4a0cf2fbf7d13cc910e5a00c575be":[2,2,3,0],
+"group__opts_group.html#ga696f02e0493c00d3c1eafff45b62b68e":[2,2,3,48],
+"group__opts_group.html#ga6f804ec44adc299989fe623570679da3":[2,2,3,17],
+"group__opts_group.html#ga70aa85319933d78c0076cc862fa3e5a6":[2,2,3,41],
+"group__opts_group.html#ga7ca713c7532eff4d41a492e95b8822cf":[2,2,3,39],
+"group__opts_group.html#ga7e4172084520708b8c9f28e73174461c":[2,2,3,35],
+"group__opts_group.html#ga8f06568cc3319a5a0eef9f80282034ca":[2,2,3,40],
+"group__opts_group.html#ga8f3df57ed8ae418d3ae6678ae5e2a5d2":[2,2,3,26],
+"group__opts_group.html#ga93d8068cd6fff53b7f8e1c403db45eb9":[2,2,3,52],
+"group__opts_group.html#ga95510436eee06f9992ded96a44795c40":[2,2,3,29],
+"group__opts_group.html#gaa0d4b7ece8477cb9879f0dafff3456a5":[2,2,3,28],
+"group__opts_group.html#gaa16bfd09ef318af18c27a0e199681b69":[2,2,3,18],
+"group__opts_group.html#gaa1f09416d443fa7a6af6b695da563eba":[2,2,3,9],
+"group__opts_group.html#gaabf8763b931dcf389c83fd95d760a413":[2,2,3,6],
+"group__opts_group.html#gaafda5fb8d9ee3a17bd475ceaecfac218":[2,2,3,49],
+"group__opts_group.html#gaaff89c3f41627f4b2929dbc9b82d265b":[2,2,3,21],
+"group__opts_group.html#gab09491bad908dedcb323c780280733ff":[2,2,3,37],
+"group__opts_group.html#gab54cd2719c0b64eebd6c7b83dd2908a0":[2,2,3,24],
+"group__opts_group.html#gab5baab507c974402ab0d8c5e8227ee65":[2,2,3,34],
+"group__opts_group.html#gabf060c92648b50c069f0abe7cbb06f1c":[2,2,3,38],
+"group__opts_group.html#gac5173473a731a4a36d15346fedddf91f":[2,2,3,51],
+"group__opts_group.html#gacb7e964ae54b74d972d72e118b7b8bdf":[2,2,3,2],
+"group__opts_group.html#gad58a5b9dabadeebda30e952ff7b39193":[2,2,3,4],
+"group__opts_group.html#gadc8dc0cedd91bda71d544f3dedc4a039":[2,2,3,32],
+"group__opts_group.html#gadef4376a5e608cbc8c1a9e2b6335dc79":[2,2,3,42],
+"group__opts_group.html#gae68fb615835364c0809555e8dc93f57e":[2,2,3,20],
+"group__opts_group.html#gae98f0f9034e93941767ab1ae6eec2c0c":[2,2,3,13],
+"group__opts_group.html#gafb30794fc2ae74b9e0bd8fb609b901c8":[2,2,3,11],
+"group__stan_conn_group.html":[2,2,11],
+"group__stan_conn_mgt_group.html":[2,2,11,0],
+"group__stan_conn_mgt_group.html#ga166ec494a55c9b1f9ebafd2294e05ff6":[2,2,11,0,1],
+"group__stan_conn_mgt_group.html#ga2e56a93825e1214a5ab688860e2a8ce6":[2,2,11,0,2],
+"group__stan_conn_mgt_group.html#ga35e0e6e5e3b7f3818a3ac3600efb8f8f":[2,2,11,0,0],
+"group__stan_conn_mgt_group.html#ga4952a7f65a53fdb5ca1c26b1a1656f1d":[2,2,11,0,3],
+"group__stan_conn_mgt_group.html#gaea095eec18fdf04e06de16711f8b1a04":[2,2,11,0,4],
+"group__stan_conn_opts_group.html":[2,2,4],
+"group__stan_conn_opts_group.html#ga07105d1d00878bba19f47243b2c88402":[2,2,4,5],
+"group__stan_conn_opts_group.html#ga19ba15c8001aa835b261eea3a309e6d3":[2,2,4,8],
+"group__stan_conn_opts_group.html#ga29eee1be7eff749aeac3bab60d1b0405":[2,2,4,6],
+"group__stan_conn_opts_group.html#ga36f2ee441562dcf619d6e020b823fc96":[2,2,4,4],
+"group__stan_conn_opts_group.html#ga3c6d511fc1e1febcdf5344960de5a0b3":[2,2,4,1],
+"group__stan_conn_opts_group.html#ga66c72c482696d9ceca71fced7cbb1264":[2,2,4,3],
+"group__stan_conn_opts_group.html#ga83fd0a29b136cbfb643be642eb2fa726":[2,2,4,9],
+"group__stan_conn_opts_group.html#gad835223f08fbeae2a3c7a34d3fa1550b":[2,2,4,7],
+"group__stan_conn_opts_group.html#gae3fc9a4daa7f85367811a313857337b4":[2,2,4,2],
+"group__stan_conn_opts_group.html#gaff52a1ce90253b4bdbb0005fca4f71b6":[2,2,4,0],
+"group__stan_conn_pub_group.html":[2,2,11,1],
+"group__stan_conn_pub_group.html#ga0c4d1e4615f8ac834f0a4021f75d39f0":[2,2,11,1,1],
+"group__stan_conn_pub_group.html#ga24f3f7f709b15fe53e1edaeead08fc7d":[2,2,11,1,0],
+"group__stan_conn_sub_group.html":[2,2,11,2],
+"group__stan_conn_sub_group.html#ga17d42bf9a4fa39470561a1a668e6b4a2":[2,2,11,2,1],
+"group__stan_conn_sub_group.html#gae545358fdc493baf6d29429a8156781f":[2,2,11,2,0],
+"group__stan_msg_group.html":[2,2,8],
+"group__stan_msg_group.html#ga2f27fbfb79a46c52e079f670c59e1260":[2,2,8,3],
+"group__stan_msg_group.html#ga2fa524b11e9621cf46ca9b1a3ca66452":[2,2,8,1],
+"group__stan_msg_group.html#ga7d1e394a686bc25ab7376b7f28b9e777":[2,2,8,4],
+"group__stan_msg_group.html#ga8e537d014b89d9d7da7906b2ee75d5c0":[2,2,8,2],
+"group__stan_msg_group.html#ga98b66ff73447e1d7e329edbfcde782b5":[2,2,8,0],
+"group__stan_msg_group.html#gacd0059fb499963f5b2eae18053e5f74f":[2,2,8,5],
+"group__stan_sub_group.html":[2,2,12],
+"group__stan_sub_group.html#ga3a1cca9fa3ea54fcf7a43fd1335a26d3":[2,2,12,1],
+"group__stan_sub_group.html#ga3f6ce924f6a1830a55e30e9910aad4ba":[2,2,12,4],
+"group__stan_sub_group.html#ga7b039908ec45cfc2c16ec61ba8daca9d":[2,2,12,0],
+"group__stan_sub_group.html#gacfa3a7b4fa333c84acfa7521fbbb5bcc":[2,2,12,3],
+"group__stan_sub_group.html#gafa428a7e0f6800216cb06fd738bd235e":[2,2,12,2],
+"group__stan_sub_opts_group.html":[2,2,5],
+"group__stan_sub_opts_group.html#ga1b56877d0a6729e148c9c288e2b88e3f":[2,2,5,10],
+"group__stan_sub_opts_group.html#ga27d9175901997b8468997019746599b5":[2,2,5,6],
+"group__stan_sub_opts_group.html#ga35efbdea888e00440c500845064931c0":[2,2,5,3],
+"group__stan_sub_opts_group.html#ga6cb7f6e1ac697d16959f9042eeb84dc1":[2,2,5,4],
+"group__stan_sub_opts_group.html#ga6f49ae2629e49d2bfa35990cf030bf83":[2,2,5,9],
+"group__stan_sub_opts_group.html#ga856a74e31f3307faf988747c1f88717c":[2,2,5,7],
+"group__stan_sub_opts_group.html#gaa018bceba99ef3726157e87c6918ab14":[2,2,5,1],
+"group__stan_sub_opts_group.html#gaafd7a553486eea3c9d309da0744a3608":[2,2,5,5],
+"group__stan_sub_opts_group.html#gab09b81358e93199a4631eb06f1ec179f":[2,2,5,8],
+"group__stan_sub_opts_group.html#gad87a2cef4f4ddf64696f9864773c37cf":[2,2,5,0],
+"group__stan_sub_opts_group.html#gafbb4e6c74978c4e8f30f016c20cc2bdf":[2,2,5,2],
+"group__stats_group.html":[2,2,2],
+"group__stats_group.html#ga26a04e77af8fc160adf7c33088dcf59c":[2,2,2,2],
+"group__stats_group.html#gad85f5ffb4272713f6cc6d988e6d4e75f":[2,2,2,1],
+"group__stats_group.html#gafa923df029168f4991b77ffdd9e24877":[2,2,2,0],
+"group__status_group.html":[2,2,1],
+"group__status_group.html#ga4a83c4a08f1e4dd9451c1a88b6a4254e":[2,2,1,0],
+"group__sub_group.html":[2,2,10],
+"group__sub_group.html#ga0408c9b6e4ad4078ac0267656ace222d":[2,2,10,18],
+"group__sub_group.html#ga09f285de2746a6e27fc66efd60bd3116":[2,2,10,3],
+"group__sub_group.html#ga0abc5d9afbc6b0c9c5adaf533904c968":[2,2,10,12],
+"group__sub_group.html#ga12b60cdb3aca7329edebc480ae86bfab":[2,2,10,14],
+"group__sub_group.html#ga24f1636869e26661ce62c9c9f4d80823":[2,2,10,11],
+"group__sub_group.html#ga26c9736289d326fb7d6df7e2a0df72ab":[2,2,10,16],
+"group__sub_group.html#ga38f1e41fc7619101fc4aa52014dd5428":[2,2,10,0],
+"group__sub_group.html#ga476b7276d0b7f9946834d2bb2423e955":[2,2,10,10],
+"group__sub_group.html#ga50a95dd96e9b714201679a015d62832f":[2,2,10,21],
+"group__sub_group.html#ga5a029a784c0a7f8b5800b48cc995db20":[2,2,10,5],
+"group__sub_group.html#ga5e6454bbc7a90b9694112d45bd8de903":[2,2,10,15],
+"group__sub_group.html#ga6538a5d78dfb0f16514b94c8e74c11af":[2,2,10,1],
+"group__sub_group.html#ga68a7cea89e75c529a7dd3bb77303dda4":[2,2,10,7],
+"group__sub_group.html#ga786bb458981274fe717f266bd3b96d96":[2,2,10,8],
+"group__sub_group.html#ga8a37b2d5290da3aecc05483d79e7e254":[2,2,10,4],
+"group__sub_group.html#ga9834bd02f67a25ac084d5ad71e146019":[2,2,10,19],
+"group__sub_group.html#ga9c26a3f9584e7804060a48ec1b7e2a68":[2,2,10,17],
+"group__sub_group.html#gaca6262e2ef842caa701a9f233db72707":[2,2,10,9],
+"group__sub_group.html#gadd4872b9fc5678a73f9ab04ce8428432":[2,2,10,6],
+"group__sub_group.html#gaea632f845d473e7461b134c0e7bf4077":[2,2,10,20],
+"group__sub_group.html#gaee87f8be0e6c2a4693ba2cea070583ba":[2,2,10,2],
+"group__sub_group.html#gafe31911d8372db401d33856465421710":[2,2,10,13],
+"group__types_group.html":[2,0],
+"group__types_group.html#ga0125d394a3cbae2a1713eed8fab7f78e":[2,0,89],
+"group__types_group.html#ga023712711f5c289663fc2223e83686d3":[2,0,95],
+"group__types_group.html#ga0483b2197c0ddd9082b48c2dd3fe7cee":[2,0,64],
+"group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a":[2,0,82],
+"group__types_group.html#ga0e3a3b7cf89e7dfa955f0f8f3f1eb6e5":[2,0,81],
+"group__types_group.html#ga117ed2c35f89ef3144540ed9cbadc818":[2,0,99],
+"group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1":[2,0,94],
+"group__types_group.html#ga1802a53c79e667f093bba033b16adc98":[2,0,98],
+"group__types_group.html#ga1d48d3eb36b50c9ab6d8477dccf247d8":[2,0,74],
+"group__types_group.html#ga1e54c2a1bc94834d1670875fc151f565":[2,0,62],
+"group__types_group.html#ga1e938dab794089f9329d7b7ece8f3e9b":[2,0,58],
+"group__types_group.html#ga206c3d4d6f4f6f96fd2cae53a3df31c1":[2,0,45],
+"group__types_group.html#ga2629c9454996edf7914be36a9e44921b":[2,0,61],
+"group__types_group.html#ga26fd6a73df327ca3c271e46ddefc8acf":[2,0,53],
+"group__types_group.html#ga27e1a5d5b513f9eb7d61a17db71f8003":[2,0,68],
+"group__types_group.html#ga2bfd6de6ffc84d767482b3dd57cb9271":[2,0,57],
+"group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d":[2,0,93],
+"group__types_group.html#ga2f21bb79884e56a5613d7fe76b11b1e5":[2,0,69],
+"group__types_group.html#ga39011d30b295759b7f6ca0a7539dff8f":[2,0,67],
+"group__types_group.html#ga410f8fb053efa02b2ca1de0c02fa4b6d":[2,0,96],
+"group__types_group.html#ga49d1138fac9da8b85d00a367081e91c9":[2,0,49],
+"group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043":[2,0,85],
+"group__types_group.html#ga55dce2fa9ecd215716cc9ceece7dfefa":[2,0,55],
+"group__types_group.html#ga57a4b8c7109e2773878655722ce028aa":[2,0,41],
+"group__types_group.html#ga57cdc53b29a4fedb5a4140b6e64a4fab":[2,0,75],
+"group__types_group.html#ga6d594b091b4bb46192336413066a8edf":[2,0,86],
+"group__types_group.html#ga7bbea3575d35dcdbfc9b766b04269eb7":[2,0,48],
+"group__types_group.html#ga7f88b7d482488398074f9d1419a9b8c2":[2,0,97],
+"group__types_group.html#ga85123afa00d522a249a5b2a8abd7e063":[2,0,79],
+"group__types_group.html#ga8650faf52b0b6b23df376eebeb9d0354":[2,0,101],
+"group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8":[2,0,42],
+"group__types_group.html#ga89db3bd6bf11af3ac5eb3ab560d16332":[2,0,102],
+"group__types_group.html#ga8fcb50e6e7312834791f9e237d28e873":[2,0,100],
+"group__types_group.html#ga90e8de23c4468005488bde690a2ffe9d":[2,0,88],
+"group__types_group.html#ga9e826493769d23086cfccefe95cdf64c":[2,0,91],
+"group__types_group.html#gaa889f706cce285adb9cea8aba0b76866":[2,0,73],
+"group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1":[2,0,47],
+"group__types_group.html#gaaf92318ce94a1ae3547c9a7af5a3f4f6":[2,0,59],
+"group__types_group.html#gab2f33f57188a550f2f747d4f27bc24bd":[2,0,60],
+"group__types_group.html#gab36492d9d4370337cfed80edce4144e0":[2,0,90],
+"group__types_group.html#gab4c43c87d81917aab748a50eee028449":[2,0,51],
+"group__types_group.html#gab991313d33ce270a882e4d0756c138f6":[2,0,52],
+"group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e":[2,0,44],
+"group__types_group.html#gac32f992fe797a1f7befc7dc3452640b6":[2,0,87],
+"group__types_group.html#gaccfaac2079656ffd40d003e4de5d2280":[2,0,66],
+"group__types_group.html#gace471cd2cef1df797b2a1c6b485049bd":[2,0,65],
+"group__types_group.html#gace9595b1a5ce3f7a13670367fd293b4a":[2,0,76],
+"group__types_group.html#gad00ab4381eec504ada3272aa9ff8adb2":[2,0,71],
+"group__types_group.html#gad057a0107367ce5727975f3daf63ff75":[2,0,72],
+"group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80":[2,0,84],
+"group__types_group.html#gad489fb4074f27427560ca71797db6191":[2,0,83],
+"group__types_group.html#gadad3bf72baae970662248d82d9b05d0a":[2,0,70],
+"group__types_group.html#gadb7c287bc86b92765fbe45a066b96f40":[2,0,78],
+"group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a":[2,0,43],
+"group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5":[2,0,92],
+"group__types_group.html#gae8b57d9c40364f97a705f3e61a1156b0":[2,0,56],
+"group__types_group.html#gaef6601477f6456bebc229f7f38982a6c":[2,0,50],
+"group__types_group.html#gaf11e6664c1f335a5287af71c703935fa":[2,0,80],
+"group__types_group.html#gaf1d5e436c5d41c5b9b96d84e3d2bc86f":[2,0,77],
+"group__types_group.html#gaf4d31a4dc83b2805422beafb1f8fa000":[2,0,63],
+"group__types_group.html#gaf80828510450faf84bbf456e94f5b784":[2,0,54],
+"group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec":[2,0,40],
+"group__types_group.html#gafd5523161ec3783e79719cb9a9a66b5b":[2,0,46],
+"group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a06299d9c8262a16306ba6cc16d293c5e":[2,0,99,3],
+"group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a33317133d42f21bf5919827a691543f6":[2,0,99,4],
+"group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a82b8d36e17391212398984f92db9c381":[2,0,99,2],
+"group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818abb50ebcd2fbafe27038c966121b9407b":[2,0,99,5],
+"group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818abbd81d6c4e0f17f30e2186f1335e991d":[2,0,99,1],
+"group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818ac692ba1363103768ac4bb58695549758":[2,0,99,0],
+"group__types_group.html#gga1802a53c79e667f093bba033b16adc98a1d9dad1854cf374b22e3688b98284dec":[2,0,98,0],
+"group__types_group.html#gga1802a53c79e667f093bba033b16adc98a428ed10448726ad01c1db77a7f748314":[2,0,98,1],
+"group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6da6a2aa02f32acec6526d81f6e974e690f":[2,0,96,0],
+"group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6dae874de4a787cfbec4c6d0eb1a3f05ebd":[2,0,96,1],
+"group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6daf7e6581e69572691b01d1294a3c3a478":[2,0,96,2],
+"group__types_group.html#gga7f88b7d482488398074f9d1419a9b8c2a99d7f2d740af26c340c0a4e2b72fb6ab":[2,0,97,1],
+"group__types_group.html#gga7f88b7d482488398074f9d1419a9b8c2abb31b828421634f1e6a1ef9359bc91f6":[2,0,97,0]
+};
diff --git a/doc/html/navtreeindex2.js b/doc/html/navtreeindex2.js
new file mode 100644 (file)
index 0000000..4b4f9cc
--- /dev/null
@@ -0,0 +1,253 @@
+var NAVTREEINDEX2 =
+{
+"group__types_group.html#gga8650faf52b0b6b23df376eebeb9d0354a2c4a1e2b75f31dd69a89b541d75afa44":[2,0,101,0],
+"group__types_group.html#gga8650faf52b0b6b23df376eebeb9d0354a6ee3851dac5c90a61492193dd55931f5":[2,0,101,1],
+"group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332a0b7a6bef67e4220f5f0c4075f2ed16b6":[2,0,102,0],
+"group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332a4efb91331f3307128c75af5b23362f83":[2,0,102,2],
+"group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332acc0e1da3c292cb7eb19d909c9dfd788a":[2,0,102,1],
+"group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332aee19ab8144bf518e251ea2004309b657":[2,0,102,3],
+"group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873a02d46a6395933c55c95ee5194bb6b80e":[2,0,100,0],
+"group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873a1232af28bf4e4b82e962174f1432ed4a":[2,0,100,2],
+"group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873afd91fe31cf57c68863ca3090b07c296c":[2,0,100,1],
+"group__wildcards_group.html":[2,3],
+"index.html":[],
+"index.html":[0],
+"index.html#faq_sec":[0,2],
+"index.html#install_sec":[0,1],
+"index.html#intro_sec":[0,0],
+"index.html#other_doc_section":[0,3],
+"libevent_8h.html":[4,0,0,0,0],
+"libevent_8h_source.html":[4,0,0,0,0],
+"libuv_8h.html":[4,0,0,0,1],
+"libuv_8h_source.html":[4,0,0,0,1],
+"modules.html":[2],
+"nats_8h.html":[4,0,0,1],
+"nats_8h.html#a1c0a11996b44abc16a4f444ee4c1cb94":[4,0,0,1,11],
+"nats_8h.html#a3776aa9985557f0c6e382b01d2e3f602":[4,0,0,1,14],
+"nats_8h.html#a3938efee417dc67ff2bcf62f913f9054":[4,0,0,1,7],
+"nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad":[4,0,0,1,4],
+"nats_8h.html#a5525cb01f8b0aec73cb13f3276449e0e":[4,0,0,1,13],
+"nats_8h.html#a5ce9005964bd9cf0604a9ef1afa87ea4":[4,0,0,1,6],
+"nats_8h.html#a911c54900b46b968205871cd9f68d36c":[4,0,0,1,5],
+"nats_8h.html#aa2f2c14de864839a2ff7ea34415d37e0":[4,0,0,1,10],
+"nats_8h.html#acc62d11b7e67fe3feb74acdfa4a6e8ac":[4,0,0,1,9],
+"nats_8h.html#ad22dce8f66bae9b3e1027790d9c95c09":[4,0,0,1,8],
+"nats_8h.html#ae18fb15ea8130a650e904e5153eb30d5":[4,0,0,1,12],
+"nats_8h.html#af798865ac824e5959987de0fe8d07383":[4,0,0,1,15],
+"nats_8h_source.html":[4,0,0,1],
+"pages.html":[],
+"status_8h.html":[4,0,0,2],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70":[4,0,0,2,2],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a00b4ce854e473bb8f49d91c0f982c6f9":[4,0,0,2,2,98],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a02a521ae52b716a669a3556d63a21410":[4,0,0,2,2,35],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a051bfd5e3bb9ba2b2398e6501426bc63":[4,0,0,2,2,103],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a0c34c56b62e4246560efabd5c762aa03":[4,0,0,2,2,50],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a0dc0fcc88a8b39f03924d50ccf731043":[4,0,0,2,2,32],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a0f2007fc94103909ece328bbd77b0cdb":[4,0,0,2,2,91],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1381bb653998c6ca8b88002d0fe0c829":[4,0,0,2,2,18],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a17c212f9409e4bd9db060bd2796905e4":[4,0,0,2,2,15],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1d159f128cd9b261b5270f7e36ed22d1":[4,0,0,2,2,123],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1eaa16332bbe6cb041adbb60383f944c":[4,0,0,2,2,41],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1efc26df606f855cfb9993cbe95c0f46":[4,0,0,2,2,64],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2107facbac830a905217916c7d24297a":[4,0,0,2,2,46],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a26a33a6e2296eb0ac0370176fb08ed9a":[4,0,0,2,2,0],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a27579bca64e6f40f9590ef51ac03a219":[4,0,0,2,2,85],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2984e6b8850b6cfed9506a25bcbe0608":[4,0,0,2,2,101],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2a8844e5d20c55d753ec64bbde4561c8":[4,0,0,2,2,84],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2f4ee662c9cbaa0355c52de1c2463160":[4,0,0,2,2,45],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a32546264d1f24fc9dafe490212bfd893":[4,0,0,2,2,7],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a33f2e301313339eded6163982a680186":[4,0,0,2,2,107],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3552ffc73e39c13d14ae35f52cd3ead7":[4,0,0,2,2,66],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3799b98b675eeca3403a1728bd0cd5f8":[4,0,0,2,2,19],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3b1ce6536b249952dc3fb6fe5448140f":[4,0,0,2,2,99],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3e55a221685d96d96c514d6d5c652570":[4,0,0,2,2,63],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a407efbf6c688cb93fcded08acd2a08ed":[4,0,0,2,2,83],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a429a21189134500589ed67ac3701aff4":[4,0,0,2,2,80],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a46321fc22a103908324b72259832af60":[4,0,0,2,2,8],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4712c1322585d712cef9b67cd03a3e00":[4,0,0,2,2,77],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a475581c5dfbabb52334ce28013382b58":[4,0,0,2,2,67],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4963c5ecd065d3e336daf80a7cd1aa57":[4,0,0,2,2,40],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4a95591dfc0e2ccb1d3ac1b3a04f618f":[4,0,0,2,2,76],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4ae7ffdfb53fb238a76ebe19c7482696":[4,0,0,2,2,6],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4d68fa855750f16fdf38c9ed93acacda":[4,0,0,2,2,73],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4ef7a2042b48d5e0916e7e90fe691ab3":[4,0,0,2,2,17],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4f192c39f1d7244ceb639053fad86393":[4,0,0,2,2,51],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4f59c55a24136405b6767e0bf21182c8":[4,0,0,2,2,11],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a50c0beab390506fc6d3495325c0230c1":[4,0,0,2,2,23],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a514184778ad2fa5cf2deaffc0c406272":[4,0,0,2,2,65],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a519d32e9718662347753ebffaf731889":[4,0,0,2,2,52],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a54084c4f82593cf516cd604b34c0dce8":[4,0,0,2,2,53],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a557d48b0334c5ceec0f0ee7cc74d8e79":[4,0,0,2,2,87],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a584d0bf058191cf2257d934f0bc5935c":[4,0,0,2,2,120],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a58db02b3e72f3b20300344f97c5c7b34":[4,0,0,2,2,59],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a597c98a0637cec454b724b049098cee8":[4,0,0,2,2,122],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a5f7b670b9202311da41e6e5026e810d2":[4,0,0,2,2,97],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a600ddc1915d8bb928fd37f1539440eb3":[4,0,0,2,2,30],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a60fd558fc8d0f31b895c7b579ba0c8b7":[4,0,0,2,2,119],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6181f797cb27c92473585893b92b95b0":[4,0,0,2,2,89],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a61cd7aa9b9e02f410465a61a085fa209":[4,0,0,2,2,110],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a64dbcba923d50e6f258db59b85eb8b17":[4,0,0,2,2,61],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a66240027007033c67fec04f4298311c4":[4,0,0,2,2,9],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6a2a1cbd9c2e2dc6dff4fb84be741e0f":[4,0,0,2,2,57],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6b4c22a03ad4769d09599ac9a75e6435":[4,0,0,2,2,58],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6b6aaaa23b1af2caf959529287b2a847":[4,0,0,2,2,90],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6d4bed940055aa46a188a2419a531c63":[4,0,0,2,2,86],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a739799359c3988ea18fe861eaff6f1f5":[4,0,0,2,2,25],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a76dad06168a8d57e829876c2fcd3af56":[4,0,0,2,2,95],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7a89433d532a863561087229b19a525f":[4,0,0,2,2,22],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7adbc8c115996a6f0dfc98fcaac8f09d":[4,0,0,2,2,96],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7b5cebb5aaebd7b3bfa43f5457e97553":[4,0,0,2,2,114],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7c88e5ccabcb2debe1ce0c1a05bbe18b":[4,0,0,2,2,115],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a801182af5b4a6b9547d81ec45864b1f3":[4,0,0,2,2,92],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a80d0a9f218207a11b4cc19b9c2aec83f":[4,0,0,2,2,54],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a84864e4bba24ee7354e5bae293c93d00":[4,0,0,2,2,34],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a85f7eee9cccd626e7b99d46c6f076322":[4,0,0,2,2,48],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a86407070c2bbe04d97a25f2ceda4ea58":[4,0,0,2,2,102],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a866a56223b3e4119184cee9523f98008":[4,0,0,2,2,47],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a8f7f888318e9107bb361d4946197c4c1":[4,0,0,2,2,72],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a91020cf9692a06637bdfedd847b259f1":[4,0,0,2,2,28],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a914926025dffa9c9b9604646b9e5675e":[4,0,0,2,2,78],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a91773a41522fe9a464a0fb28a96b497b":[4,0,0,2,2,33],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9422b53061166a064e39d360d21827fd":[4,0,0,2,2,81],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a94a9b10d712ed764de27a007ac7f04eb":[4,0,0,2,2,27],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a968eff1142ca2f39f3da3da175aeda92":[4,0,0,2,2,88],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a99265bcfa283741c3711337dac6718f0":[4,0,0,2,2,5],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9bd3f4f7a2eca1f1ed49cc0499cb9c78":[4,0,0,2,2,106],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9c1c31813a713fcee44ec06728cc6382":[4,0,0,2,2,112],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9d9319d172e0a8147949bf40f1b29f28":[4,0,0,2,2,16],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9eef13e3281a879f36a30e246fb6021b":[4,0,0,2,2,12],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa023de74e8bedf88c2f5e4b21e62ea4b":[4,0,0,2,2,39],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa0ca5a2e539cec9d33f433f28f2780fe":[4,0,0,2,2,100],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa0eb191886a17e917f2fa0eaa81d4b61":[4,0,0,2,2,116],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa1242d9e6509f08c01c3373d0e66dc96":[4,0,0,2,2,109],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa1b904de1494d20f540c8075f502af24":[4,0,0,2,2,24],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa88122abfaf173f0411a3642803aac04":[4,0,0,2,2,37],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aaa5d8be08323568b5f7295feb10d73b4":[4,0,0,2,2,69],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aaad93c7c34cd3283df7369479d4cdb7c":[4,0,0,2,2,29],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aafa71c9cafc975d1a69889f6bf166e93":[4,0,0,2,2,42],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab19f95018dff644423d6f34b682d365e":[4,0,0,2,2,93],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab1b6c048b0326e3f705b470e5a7f11f5":[4,0,0,2,2,104],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab23b8553efea2ee0008098fcb109f690":[4,0,0,2,2,36],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab379e2a2038276dc1eb539bda2e60b68":[4,0,0,2,2,55],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab5213fbb08e833e1c69b8c93c8114506":[4,0,0,2,2,60],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab7df189a360a1d483f9eca4869abdca8":[4,0,0,2,2,75],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab9e493c8837af5f62c6110493c6a70ac":[4,0,0,2,2,71],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abc25cc794fce2ab7b9757ff506de51c3":[4,0,0,2,2,105],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abc4bf9a7703ef8d3fbf2b1ad2ece3717":[4,0,0,2,2,49],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abca8571110c4244d218c2dc1779d8786":[4,0,0,2,2,111],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abd3f17c5d6ea86c38c3d8ade18b8445a":[4,0,0,2,2,82],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abf7739c7a0569149ed24ae8b9fbaf889":[4,0,0,2,2,121],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ac3d700ce84bc5df96c383079b093cc45":[4,0,0,2,2,62],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ac4afe1d580083bd55c36b3e55a5ef479":[4,0,0,2,2,118],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ac75e39643f73b184b22330939c4a564e":[4,0,0,2,2,44],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70acedca75c7ec69c5573da7013f69ede13":[4,0,0,2,2,1],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70acfa2c06f8baef07cd96a3627ddea641b":[4,0,0,2,2,117],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ad07006ca41165d13442df8e62ef3f398":[4,0,0,2,2,70],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ad1ec102705e46b5343c2680162f58f49":[4,0,0,2,2,21],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70adc58d142e277166a57672812df6f2c3e":[4,0,0,2,2,68],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae3ac6ea1656f4fcc750ba2ab1649fb57":[4,0,0,2,2,26],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae4eaa258a64f5c12d7fe50ce4c9c6de5":[4,0,0,2,2,13],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae7479c265d0e8cace4ab19a59cfcbbbb":[4,0,0,2,2,38],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae9b8b81043fea45985f8c29f108594fb":[4,0,0,2,2,3],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aea055a7802194f8f1e802a8fc461f83a":[4,0,0,2,2,20],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aea64a5a017836108cf3da113ad57b6f9":[4,0,0,2,2,2],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aeaeb1f487667a8d7643cc97bf7b3892a":[4,0,0,2,2,43],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af0506e3abc3846721ae15755c2a1eb47":[4,0,0,2,2,94],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af1efbfa8ad648bf47b4304ea58b0df8c":[4,0,0,2,2,4],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af68cc43ff7ed51f5557329c35fba949c":[4,0,0,2,2,56],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af7c1cf2c692140c4b28ebfc47acb0c41":[4,0,0,2,2,113],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af86c9c188aaa34a76eee96de9bf6e989":[4,0,0,2,2,10],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70afc70c6a72061d9c26017a5cf5dec729b":[4,0,0,2,2,79],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70afcfb372eb2a607f821ad110815acf9d7":[4,0,0,2,2,31],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70afe9c20cdb1e88744d9a5f52977e95d1c":[4,0,0,2,2,74],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aff9a4fe19078ac3e814989442beaa3a6":[4,0,0,2,2,14],
+"status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70affa3c8139019a077fac6d403d7ed0522":[4,0,0,2,2,108],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80":[4,0,0,2,1],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80a07fdbda44f43cef9866a75b25053c2ae":[4,0,0,2,1,32],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80a0aa3d1e18a2a217149fa8b1a306c9b08":[4,0,0,2,1,8],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80a113ffbe9a1f243582c38ebd876cb736d":[4,0,0,2,1,2],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80a22fa4802a34bac497f23e269a20a52f2":[4,0,0,2,1,35],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80a273e92a0ff3b7eaf946b4b7fa6cc6c6c":[4,0,0,2,1,17],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80a317fb9be1a80f6b1877f96a9a2db16ad":[4,0,0,2,1,23],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80a37d80c8232775339a32805fe93e0ea7f":[4,0,0,2,1,36],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80a40a08ae6ae17deaf390b1d0d7550791c":[4,0,0,2,1,1],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80a44e8b2590369fb01a1479719c97c2b6f":[4,0,0,2,1,3],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80a47034d8889521bbd300f45fdc19e1127":[4,0,0,2,1,6],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80a473ea6cfa03490838fafee8730b48a2a":[4,0,0,2,1,11],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80a476d7bcf9a593b749e435f20a9156eff":[4,0,0,2,1,5],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80a49a1ea653ce112b3c53eedebcd60811d":[4,0,0,2,1,31],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80a62ff6f5cc64399631defc0119731b514":[4,0,0,2,1,24],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80a71b57630aebf5c20eecdab832c2a9235":[4,0,0,2,1,16],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80a790c08a7d33e3aefce07c04120c4c19e":[4,0,0,2,1,15],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80a7cb64f52c8d91d6ade3db6bc82a96c42":[4,0,0,2,1,27],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80a827072fc245a99a60691e1e4b173ca86":[4,0,0,2,1,18],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80a85c29dbfa6b06ffef3418cc9947ffff7":[4,0,0,2,1,4],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80a892183c32b4929388bb75dc62230ddf3":[4,0,0,2,1,29],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80a8a0d239cfdfa30fe730afea65941779b":[4,0,0,2,1,33],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80a8a4e298931ba0698a72e397b1b57c885":[4,0,0,2,1,30],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80a984189ec4cfe3e7647268c99f7e49ec9":[4,0,0,2,1,25],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9a6f40b7803639ac18bdf532e93e5ad5":[4,0,0,2,1,22],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9bb78b4f245d2870040d25c450febd4b":[4,0,0,2,1,19],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990":[4,0,0,2,1,0],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80aa76d5e3ce051bc7510be90e73663c93d":[4,0,0,2,1,7],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80aab97324e40ccfe1360080c651c330e62":[4,0,0,2,1,34],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80ab88994c9ea9889ac4d9d656d62f550ed":[4,0,0,2,1,26],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80abc76f1b31fdac4525583cc19588240dc":[4,0,0,2,1,9],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80abef517217119e8446a8e3382e1f37eb3":[4,0,0,2,1,10],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80ac3abc147873fe999c86431f9222eebf5":[4,0,0,2,1,12],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80ad0229a12b17d3d12a28efed6213720d8":[4,0,0,2,1,13],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80ae1d2c1366dbed428f6589f057acc507d":[4,0,0,2,1,14],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80ae47047f2fac5f2f2a434fc501e5c3d4e":[4,0,0,2,1,28],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80ae93ff5b7fe31f8570308385d92d317b0":[4,0,0,2,1,20],
+"status_8h.html#a36c934157b663b7b5fb5d6609c897c80af820300473609092a3e97a71b5af9ff9":[4,0,0,2,1,21],
+"status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51":[4,0,0,2,0],
+"status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51a08f92960811d1ff05b91a0870b4ecb92":[4,0,0,2,0,0],
+"status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51a0dafab74b55f98cfc1d00e4d1ef38725":[4,0,0,2,0,2],
+"status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51a7e4d95cb29122f06e17ca4aff55cc736":[4,0,0,2,0,1],
+"status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51aa78753a4de2d0379078bb09cdc1acdb2":[4,0,0,2,0,3],
+"status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51ab6f9d121707673a61cbe2c591f64fbf1":[4,0,0,2,0,5],
+"status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51ac6b8b7f138f6ca285fe1f4da707b2100":[4,0,0,2,0,6],
+"status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51acfdc4826e08ce4b59f901952038e9206":[4,0,0,2,0,4],
+"status_8h_source.html":[4,0,0,2],
+"structjs_a_p_i_stats.html":[2,0,25],
+"structjs_a_p_i_stats.html#a1545170bebb347d0ea1254f51c3027cf":[2,0,25,0],
+"structjs_a_p_i_stats.html#a84e85ad9d94dbe9afd1101388574255d":[2,0,25,1],
+"structjs_account_info.html":[2,0,28],
+"structjs_account_info.html#a1237c3f19a42a3203825971b429312e9":[2,0,28,3],
+"structjs_account_info.html#a17317abf03effdcdedc2003fca8adc71":[2,0,28,2],
+"structjs_account_info.html#a21c14ca283400c684b18e61a534b6724":[2,0,28,8],
+"structjs_account_info.html#a448578d621e878267ad5f1792002a665":[2,0,28,0],
+"structjs_account_info.html#a94ab71c69b7883c2731ae8741ddc1e94":[2,0,28,5],
+"structjs_account_info.html#aad93cf4bb6c1fbb09ae8545c03f315a9":[2,0,28,6],
+"structjs_account_info.html#ab654d5c7456bb62df1808deb32a620fc":[2,0,28,7],
+"structjs_account_info.html#ab6ba03298e1863132550b9b08d06048c":[2,0,28,4],
+"structjs_account_info.html#ad1c254c5b8f11f57062a4e2d5fb10ae3":[2,0,28,1],
+"structjs_account_limits.html":[2,0,26],
+"structjs_account_limits.html#a38875d969274b0f0fcefc6b04ce56eb8":[2,0,26,5],
+"structjs_account_limits.html#a4710a10950857a322c2a3ad6f946ded2":[2,0,26,2],
+"structjs_account_limits.html#a4abf1972690c20d73bd314f2059e8013":[2,0,26,4],
+"structjs_account_limits.html#a6169f29101d51d48eed0803b719e6338":[2,0,26,3],
+"structjs_account_limits.html#a6fff014c46739410ecf298b0cf643b30":[2,0,26,1],
+"structjs_account_limits.html#a7bfc63e6f49ce724663ee534c5efdfa4":[2,0,26,0],
+"structjs_account_limits.html#a858edf99ee1c60354bdba4e59293fb6a":[2,0,26,7],
+"structjs_account_limits.html#a8cca06ab72b715c02a6a2c72b59f6a52":[2,0,26,6],
+"structjs_cluster_info.html":[2,0,12],
+"structjs_cluster_info.html#a237a639579def1345e02f1490a510ed5":[2,0,12,3],
+"structjs_cluster_info.html#a2e13d7ec417574100c938c4df78e5484":[2,0,12,0],
+"structjs_cluster_info.html#a8dfcae3bc348a5b595b509e3f3d3500b":[2,0,12,2],
+"structjs_cluster_info.html#af7d85652b52f56fa1eedce8f45fe6a19":[2,0,12,1],
+"structjs_consumer_config.html":[2,0,17],
+"structjs_consumer_config.html#a046177256938d6a601c629f9fd82f888":[2,0,17,27],
+"structjs_consumer_config.html#a201217d93cfed17eb4d3e2d9579b826a":[2,0,17,0],
+"structjs_consumer_config.html#a2f0243899885dc97f304f48ca52b5356":[2,0,17,4],
+"structjs_consumer_config.html#a30d4142bac47ab6dc583c5ee193704e6":[2,0,17,19],
+"structjs_consumer_config.html#a351b388a36ccb7978e6e85a6f4fc0816":[2,0,17,13],
+"structjs_consumer_config.html#a364127e68bf0d3bf13efdc0b416667f4":[2,0,17,3],
+"structjs_consumer_config.html#a36a14d666d99bdade87a5e21a25491d6":[2,0,17,2],
+"structjs_consumer_config.html#a36cf121162cf0b40edf051991d851ee0":[2,0,17,1],
+"structjs_consumer_config.html#a43f40b8eef0074b4146fb945b4645584":[2,0,17,14],
+"structjs_consumer_config.html#a484c64b6c54f6f758f54315470ed20d0":[2,0,17,17],
+"structjs_consumer_config.html#a4e86deefe08854b9a82b4908397aad32":[2,0,17,20],
+"structjs_consumer_config.html#a651a94b9b78668dde830dc7869610e67":[2,0,17,7],
+"structjs_consumer_config.html#a74a026cdd92c538bcf84297f4468bb21":[2,0,17,22]
+};
diff --git a/doc/html/navtreeindex3.js b/doc/html/navtreeindex3.js
new file mode 100644 (file)
index 0000000..ce27929
--- /dev/null
@@ -0,0 +1,244 @@
+var NAVTREEINDEX3 =
+{
+"structjs_consumer_config.html#a802ea3bf0669395bee28611f4ecede80":[2,0,17,5],
+"structjs_consumer_config.html#a8472d49fae908ab0291b4d62c8411b76":[2,0,17,15],
+"structjs_consumer_config.html#a8a311af614dfae1b0f4e4af7db467aab":[2,0,17,6],
+"structjs_consumer_config.html#a95aa4184ed77f69b7674756572da1ded":[2,0,17,23],
+"structjs_consumer_config.html#aa2d0aff64a2c46122d0f0fe89e8ae011":[2,0,17,9],
+"structjs_consumer_config.html#aa71aa3dfe5826466be301097b1bae04d":[2,0,17,21],
+"structjs_consumer_config.html#ac439828c3bedb8826a1e92de13280d53":[2,0,17,18],
+"structjs_consumer_config.html#acfba6d6ecb6323fd8ffe6c0bb4fbffae":[2,0,17,26],
+"structjs_consumer_config.html#ad2f6ca3f2d0f977aedb8687c462c1cfc":[2,0,17,10],
+"structjs_consumer_config.html#ad47e15e1d6a4a8b0b155f9d3d5873c95":[2,0,17,8],
+"structjs_consumer_config.html#ade510daf7c5d67553d2cd20b64ab9939":[2,0,17,12],
+"structjs_consumer_config.html#ae0765f3b5effe365187d3cf809c6ed3c":[2,0,17,24],
+"structjs_consumer_config.html#aeb2336d480e3885385d1b08410e89892":[2,0,17,16],
+"structjs_consumer_config.html#af56ab7708b11e85e0b9115d152d281ca":[2,0,17,11],
+"structjs_consumer_config.html#af6376a6009124c25d7016bc548f3855d":[2,0,17,25],
+"structjs_consumer_info.html":[2,0,22],
+"structjs_consumer_info.html#a15f2d68fbf126acc1907ba9462ad9ee9":[2,0,22,4],
+"structjs_consumer_info.html#a2f63940ca1f024ad3840418c2f6a1ae1":[2,0,22,3],
+"structjs_consumer_info.html#a31282cdc72000a91af03f89899740bfa":[2,0,22,11],
+"structjs_consumer_info.html#a57e4a4139310c50a1f3d51af67197af0":[2,0,22,8],
+"structjs_consumer_info.html#a670d38f2e9ba5c354ca3560a8064d00c":[2,0,22,2],
+"structjs_consumer_info.html#a6f4401563a9fd102226d82cdc6136e32":[2,0,22,10],
+"structjs_consumer_info.html#a882bebeb7af80fcce088afdf2c98de50":[2,0,22,6],
+"structjs_consumer_info.html#a8f21939613163a7c0ebfb521aa471260":[2,0,22,0],
+"structjs_consumer_info.html#a932bf14ebb9ce167af8975e3b1f8d001":[2,0,22,7],
+"structjs_consumer_info.html#a9359aea7cd05a27b2a15f8a35cdb1008":[2,0,22,1],
+"structjs_consumer_info.html#ab69c36ae092df9b0663b675a5abbab55":[2,0,22,5],
+"structjs_consumer_info.html#aeaefd5a500996013b1ce13d8872e869b":[2,0,22,9],
+"structjs_consumer_info_list.html":[2,0,23],
+"structjs_consumer_info_list.html#a75354882af5e11959b198a70bde14db8":[2,0,23,0],
+"structjs_consumer_info_list.html#a813c908362a6426a929133f7c0d3395f":[2,0,23,1],
+"structjs_consumer_names_list.html":[2,0,24],
+"structjs_consumer_names_list.html#a0bccbad8ac5d335a0ed89970a58900fb":[2,0,24,1],
+"structjs_consumer_names_list.html#aa4b3cf17902a2d580cc3a230bfa5d309":[2,0,24,0],
+"structjs_consumer_sequence_mismatch.html":[2,0,18],
+"structjs_consumer_sequence_mismatch.html#aad6a17af1719c023c38a6fd254b73f8e":[2,0,18,0],
+"structjs_consumer_sequence_mismatch.html#ac1df353001d853c8a56cef9f82fb831c":[2,0,18,2],
+"structjs_consumer_sequence_mismatch.html#adb383429dadb1ab0e1f7d013bc546a28":[2,0,18,1],
+"structjs_direct_get_msg_options.html":[2,0,32],
+"structjs_direct_get_msg_options.html#a16ce7908a3d1690b8ae8bc22350ac238":[2,0,32,1],
+"structjs_direct_get_msg_options.html#a60211d7499cfecdd6e61e6c73af1a2f5":[2,0,32,0],
+"structjs_direct_get_msg_options.html#aae968f31cdda96fa3c5e9374a36b9630":[2,0,32,2],
+"structjs_external_stream.html":[2,0,3],
+"structjs_external_stream.html#a26ca427f3c5be1cae579ddccc16432d3":[2,0,3,1],
+"structjs_external_stream.html#a2eaf2c0c3e77c269f44e254af8b24e96":[2,0,3,0],
+"structjs_fetch_request.html":[2,0,33],
+"structjs_fetch_request.html#a3298db691c2ecb9725cc029e2c35d6d1":[2,0,33,2],
+"structjs_fetch_request.html#a84f06b60e25decb2674996f0cb315f63":[2,0,33,1],
+"structjs_fetch_request.html#ac3351138ce8ac3b321ac1eb78887116e":[2,0,33,0],
+"structjs_fetch_request.html#ae251eebb1998a39fe3b898302b58293d":[2,0,33,3],
+"structjs_fetch_request.html#ae8e73c7cc2e2a2d2502407c9b1522496":[2,0,33,4],
+"structjs_lost_stream_data.html":[2,0,7],
+"structjs_lost_stream_data.html#a5d2e87697526033c842a7f955776dfda":[2,0,7,0],
+"structjs_lost_stream_data.html#a841fcadca3f66e9170a51080dc1acf30":[2,0,7,2],
+"structjs_lost_stream_data.html#abdc373ed7fc9b7cf161c13da1913fc9a":[2,0,7,1],
+"structjs_msg_meta_data.html":[2,0,29],
+"structjs_msg_meta_data.html#a02f1bbd37e9650ed6bfda0210f038e30":[2,0,29,2],
+"structjs_msg_meta_data.html#a23d5fd1992033164c73d5c2a16a4e321":[2,0,29,0],
+"structjs_msg_meta_data.html#a32e2a9438d2dc769f7f64d2f8897abc4":[2,0,29,4],
+"structjs_msg_meta_data.html#a388e38ccea591181436d199dc7c2f8ea":[2,0,29,6],
+"structjs_msg_meta_data.html#a6dcc2a442984b0ca070b3d8077192127":[2,0,29,5],
+"structjs_msg_meta_data.html#a9a50965fac061a9728b160702d3f56ff":[2,0,29,1],
+"structjs_msg_meta_data.html#abab9ed5600a3629ea6d6c78170d7d5e9":[2,0,29,3],
+"structjs_options.html":[2,0,34],
+"structjs_options.html#a5ce5c11cc9b9df2b6bc47cd77d7b1dc4":[2,0,34,5],
+"structjs_options.html#a7fd42e1f83da5861e716137c16f8b72f":[2,0,34,4],
+"structjs_options.html#ab06e45296fccf0fe6152e083e38d916f":[2,0,34,2],
+"structjs_options.html#ae4df6c9c01c0ea9ab0e6d5a6ec8af74e":[2,0,34,3],
+"structjs_options.html#ae50544ee0ef8dd7d02ef9802805807ae":[2,0,34,6],
+"structjs_options_1_1js_options_publish_async.html":[2,0,34,0],
+"structjs_options_1_1js_options_publish_async.html#a0a180995c49990ca277e449b7d43616b":[2,0,34,0,3],
+"structjs_options_1_1js_options_publish_async.html#a508140119f40a2c056d4ee8c0cd55df9":[2,0,34,0,1],
+"structjs_options_1_1js_options_publish_async.html#a60c95f10797c04ea2e625759c6936ec9":[2,0,34,0,2],
+"structjs_options_1_1js_options_publish_async.html#a784a0029c30e82ff37c39ae6c276bc81":[2,0,34,0,4],
+"structjs_options_1_1js_options_publish_async.html#ada58fefe0ed40157b5f5d44b9dd175f9":[2,0,34,0,5],
+"structjs_options_1_1js_options_publish_async.html#add8dd21cbab2d5df19688c26365fe4d1":[2,0,34,0,0],
+"structjs_options_1_1js_options_stream.html":[2,0,34,1],
+"structjs_options_1_1js_options_stream.html#a2ca89c298b4df1f5e3e0a44e205c789c":[2,0,34,1,3],
+"structjs_options_1_1js_options_stream.html#afe680264223b434ca6959f9e122af029":[2,0,34,1,2],
+"structjs_options_1_1js_options_stream_1_1js_options_stream_info.html":[2,0,34,1,0],
+"structjs_options_1_1js_options_stream_1_1js_options_stream_info.html#a73f847afe18f56eaaf6788900270bef7":[2,0,34,1,0,0],
+"structjs_options_1_1js_options_stream_1_1js_options_stream_info.html#af874e0f5aa15fb2a41504631ed786e6d":[2,0,34,1,0,1],
+"structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html":[2,0,34,1,1],
+"structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#a0d61e5d3c9c518f455549086ababe7f6":[2,0,34,1,1,1],
+"structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#a882c1ce1e636817450893caa72aa4eda":[2,0,34,1,1,2],
+"structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#aa99e6ee3bef1c22243f01544181315fe":[2,0,34,1,1,0],
+"structjs_peer_info.html":[2,0,11],
+"structjs_peer_info.html#a3f3e09c5996858ec5faca2dc7fa5224e":[2,0,11,2],
+"structjs_peer_info.html#a49a2623963dad653a6d7996c750056c9":[2,0,11,4],
+"structjs_peer_info.html#a8441d023932c388953197f7ea39402fe":[2,0,11,3],
+"structjs_peer_info.html#abf29230ce03a1c14d50227663e07de6a":[2,0,11,0],
+"structjs_peer_info.html#ad8cecd039a8ad1c68daba89007b055d4":[2,0,11,1],
+"structjs_placement.html":[2,0,2],
+"structjs_placement.html#a35644f07531409518521b1b4fa28c9e3":[2,0,2,2],
+"structjs_placement.html#ad8c83588d57f0e30959cfb6f3d5d61bf":[2,0,2,0],
+"structjs_placement.html#af078a85b744b9ff3771bb2da6005b90d":[2,0,2,1],
+"structjs_pub_ack.html":[2,0,30],
+"structjs_pub_ack.html#a01d302d5e1a2e71487a8c74c3fed1691":[2,0,30,1],
+"structjs_pub_ack.html#a0381a49ff62e8fac7a52cad6a5eb7243":[2,0,30,3],
+"structjs_pub_ack.html#a0b73200c0b035db3c9c96421706d51b0":[2,0,30,2],
+"structjs_pub_ack.html#a4fd5e6cdb7217d72c553afcc75358893":[2,0,30,0],
+"structjs_pub_ack_err.html":[2,0,31],
+"structjs_pub_ack_err.html#a156ca2f779d132ffa8c519124cf9739b":[2,0,31,0],
+"structjs_pub_ack_err.html#a406e39e818f93bc59ac18cbdf035baf5":[2,0,31,1],
+"structjs_pub_ack_err.html#aa558fd192cc6d6c02ad891445ec5aa8a":[2,0,31,2],
+"structjs_pub_ack_err.html#ad1a85e6ff4046d7df33c1e24323ddc87":[2,0,31,3],
+"structjs_pub_options.html":[2,0,1],
+"structjs_pub_options.html#a095391b33a261586fc02eaf013b65e61":[2,0,1,3],
+"structjs_pub_options.html#a1b242c9311b904a2e5337417b5c6d143":[2,0,1,0],
+"structjs_pub_options.html#a3b02b60b05caa6d242079a4c26b181bf":[2,0,1,4],
+"structjs_pub_options.html#a740a7edee8c832a75b75fded6046ba90":[2,0,1,6],
+"structjs_pub_options.html#ac7ac74d2557d772c3092288dacf3711f":[2,0,1,2],
+"structjs_pub_options.html#ac8708487360b784f7dd5d7a21e5617c0":[2,0,1,1],
+"structjs_pub_options.html#aeefec1d2c7644562d23b87e55bf2e253":[2,0,1,5],
+"structjs_re_publish.html":[2,0,5],
+"structjs_re_publish.html#a16ebc4cdae4a407cf4e32aad212888db":[2,0,5,2],
+"structjs_re_publish.html#a1acb593929fd69bbe0f4dc8300dfaeb2":[2,0,5,0],
+"structjs_re_publish.html#a662b2e57d237b171b2b61509f7e1023a":[2,0,5,1],
+"structjs_sequence_info.html":[2,0,21],
+"structjs_sequence_info.html#a4e94c91650b7db253645515fee4c3b05":[2,0,21,2],
+"structjs_sequence_info.html#ab52c55c1d0edd20e064870b490b4b990":[2,0,21,1],
+"structjs_sequence_info.html#ae4416a5d766e07db207e563668edd06f":[2,0,21,0],
+"structjs_sequence_pair.html":[2,0,20],
+"structjs_sequence_pair.html#a6d205effd29f8994f0028bfaf2e8d816":[2,0,20,0],
+"structjs_sequence_pair.html#ab051e0815302c48ba6122bd18d9d76f7":[2,0,20,1],
+"structjs_stream_config.html":[2,0,6],
+"structjs_stream_config.html#a0b44ea5251ef20bf5b5658bcfbea832d":[2,0,6,11],
+"structjs_stream_config.html#a0c5f3354073dbe72650e3db7f59a47af":[2,0,6,2],
+"structjs_stream_config.html#a28630f6f07ca02553c5d5718d7c29721":[2,0,6,26],
+"structjs_stream_config.html#a34960d6acc710c2f32b563f4bb7c9c0a":[2,0,6,20],
+"structjs_stream_config.html#a3fb7d5e1a09829fe742749da880afe4a":[2,0,6,28],
+"structjs_stream_config.html#a4f9f422d2e9e7389860291ab19bd7f10":[2,0,6,1],
+"structjs_stream_config.html#a50f866f0e73c4ff0a5f43b354a059fa9":[2,0,6,15],
+"structjs_stream_config.html#a575ffbaa85b0300032963296b090583a":[2,0,6,23],
+"structjs_stream_config.html#a59c34091f336eafa77da2991c852c0d8":[2,0,6,12],
+"structjs_stream_config.html#a5ebc95b76afafa5e7a129953ba1bb3c7":[2,0,6,4],
+"structjs_stream_config.html#a60a5184d1d97b056dbb31ac6a5b3d82d":[2,0,6,6],
+"structjs_stream_config.html#a7338c82c8cbfcd5f4bfb7ad34b1d8395":[2,0,6,5],
+"structjs_stream_config.html#a7fe3d5086f1c660a6999ae40ecd370e5":[2,0,6,0],
+"structjs_stream_config.html#a8e358fbc569a1c6d49c704e6dbdf8609":[2,0,6,14],
+"structjs_stream_config.html#a8f0ee08922e5b2108082b5b9e4a6284b":[2,0,6,19],
+"structjs_stream_config.html#a93a2336a57b6bfb792d530fd13a90641":[2,0,6,10],
+"structjs_stream_config.html#a95ab0061b6e935b129a4a9c133e6b11c":[2,0,6,25],
+"structjs_stream_config.html#a9d67ddcc7c54c345dd60ed5e59234f1e":[2,0,6,27],
+"structjs_stream_config.html#a9e0ff10273d0182f885615b4f7d1cc20":[2,0,6,16],
+"structjs_stream_config.html#aa167c7547d13bf2a01510a375ad38340":[2,0,6,9],
+"structjs_stream_config.html#aa538765ad97d343d60212ebd9894661e":[2,0,6,8],
+"structjs_stream_config.html#ab2186aae798df6c222b3fa69e31597e1":[2,0,6,3],
+"structjs_stream_config.html#aba71cdb342181f52bb9f7ff5f770a1fa":[2,0,6,24],
+"structjs_stream_config.html#acdba5b22e4e60fd81a54769a7d09bc51":[2,0,6,18],
+"structjs_stream_config.html#acee6c66afc78d79c2f518eed89177efb":[2,0,6,17],
+"structjs_stream_config.html#ad75e47d4293441bd5ddbc5eaf01e0451":[2,0,6,7],
+"structjs_stream_config.html#adbf2c948cf8091b149603b918ef49ffc":[2,0,6,13],
+"structjs_stream_config.html#aede3fd2ab13d230eda14c96f9997e1b7":[2,0,6,21],
+"structjs_stream_config.html#af2d42dd29b9a35257937aeeb53c9f287":[2,0,6,22],
+"structjs_stream_info.html":[2,0,14],
+"structjs_stream_info.html#a2e7ca48a93fe57265609e7e0cd3fa386":[2,0,14,5],
+"structjs_stream_info.html#a578ce52a275c690dd4627c1d119c7838":[2,0,14,1],
+"structjs_stream_info.html#a766ac56dec3bd19fa5b9861fb5f64397":[2,0,14,2],
+"structjs_stream_info.html#a8d10d6fdc3f713ac726c72cae06a209a":[2,0,14,3],
+"structjs_stream_info.html#ab71aae7e4f6c62e2a09a3a52c9e4fa2a":[2,0,14,4],
+"structjs_stream_info.html#adcc402d28e0ee443419e9b549da233c6":[2,0,14,0],
+"structjs_stream_info.html#af14110cb1f8e16e3dade8d9f7c2fd672":[2,0,14,6],
+"structjs_stream_info_list.html":[2,0,15],
+"structjs_stream_info_list.html#a7b096ee7a25363f231f56419a244daef":[2,0,15,0],
+"structjs_stream_info_list.html#a8bc8490af12bb4f7a245605aecde62c2":[2,0,15,1],
+"structjs_stream_names_list.html":[2,0,16],
+"structjs_stream_names_list.html#a1875a7e449759dfc2a40b0eb74de0acf":[2,0,16,0],
+"structjs_stream_names_list.html#ab1385b6333537306d0462946c26cde4f":[2,0,16,1],
+"structjs_stream_source.html":[2,0,4],
+"structjs_stream_source.html#a295458d156af5373bb3f5ab06612a888":[2,0,4,4],
+"structjs_stream_source.html#a67eb1dac41b2d826a923cfb23baa24a5":[2,0,4,2],
+"structjs_stream_source.html#a7d9e5c064866b3f0b5601193c5885ec3":[2,0,4,0],
+"structjs_stream_source.html#ad6948b7a34c202f324b6d2beb32fe5ed":[2,0,4,1],
+"structjs_stream_source.html#af787b51dde9d77626f33860564eb08c3":[2,0,4,3],
+"structjs_stream_source_info.html":[2,0,13],
+"structjs_stream_source_info.html#a28b8cc0a9d487672955d3a3fa03de247":[2,0,13,3],
+"structjs_stream_source_info.html#a6db3c6ff8a465a45f8bd5c7bdf5f6c04":[2,0,13,0],
+"structjs_stream_source_info.html#a7eb19dd2637079fd1e970a2b38d33e05":[2,0,13,1],
+"structjs_stream_source_info.html#ab2ee0ca3ecd98c2df6d4e9bd88686863":[2,0,13,2],
+"structjs_stream_state.html":[2,0,10],
+"structjs_stream_state.html#a1adf8991f31fc4db9d6907a0316f8eec":[2,0,10,11],
+"structjs_stream_state.html#a22da809fe7a1ec3101841e86d6708827":[2,0,10,4],
+"structjs_stream_state.html#a27f4cfb85c0f1b0c5c7ad5275bd25d85":[2,0,10,12],
+"structjs_stream_state.html#a34a08a64c97269165630bf2e0c78c2c0":[2,0,10,10],
+"structjs_stream_state.html#a495269fe83c6bbf2023cca94add0a888":[2,0,10,0],
+"structjs_stream_state.html#a4af56e8bee7262ab050f2a25114c5909":[2,0,10,7],
+"structjs_stream_state.html#a55bb6719163acef7fdb6d0bc3ae8d5da":[2,0,10,2],
+"structjs_stream_state.html#a67cbd0d8b43d8c05c8b4cd6b0e44dab0":[2,0,10,5],
+"structjs_stream_state.html#aaa43db17641826e7c6ecc1954f641960":[2,0,10,6],
+"structjs_stream_state.html#abcf4d3c581c06d820f1ad21d640bef3f":[2,0,10,9],
+"structjs_stream_state.html#acbec2f01830b56cb4c0bf54ae5170e51":[2,0,10,8],
+"structjs_stream_state.html#ae603fa6ecfb63c93b61272b7d1b8fb4d":[2,0,10,1],
+"structjs_stream_state.html#afb7a708022faff518c060b33e99b04b0":[2,0,10,3],
+"structjs_stream_state_subject.html":[2,0,8],
+"structjs_stream_state_subject.html#a8b9b2edc5afe82b7b3bc7dbdd67a4384":[2,0,8,1],
+"structjs_stream_state_subject.html#aa766824a7f8b69db592971af3262640e":[2,0,8,0],
+"structjs_stream_state_subjects.html":[2,0,9],
+"structjs_stream_state_subjects.html#ab88e2026f518b6cdffd3901b5e5cd374":[2,0,9,1],
+"structjs_stream_state_subjects.html#aef3d1e886b16961daa84c43650fa80c0":[2,0,9,0],
+"structjs_sub_options.html":[2,0,19],
+"structjs_sub_options.html#a21a905c49dfab61729d8674702d196b2":[2,0,19,3],
+"structjs_sub_options.html#a7aa5b8439ed288b858943f28c291cb36":[2,0,19,1],
+"structjs_sub_options.html#a856a6af4a7ff5aa2e736338091e69484":[2,0,19,0],
+"structjs_sub_options.html#a95c5d2db8ca97d644042d436de119be4":[2,0,19,5],
+"structjs_sub_options.html#aaf4b620d112a31f51a20389c5405805d":[2,0,19,2],
+"structjs_sub_options.html#acab25d71a2efe26bb3b084071435c2b5":[2,0,19,4],
+"structjs_tier.html":[2,0,27],
+"structjs_tier.html#a1ed542b9acccbe7761839f33c43053a6":[2,0,27,0],
+"structjs_tier.html#a3f9234fde387faf3775d841aa797a6ea":[2,0,27,3],
+"structjs_tier.html#ab16c426e1c35d8c0fd6c460c43580a39":[2,0,27,2],
+"structjs_tier.html#ac33ce862c041572d10184e7fa0dd0bfe":[2,0,27,4],
+"structjs_tier.html#aeff4a4cb86e10d8d7749d6ff69f97ed1":[2,0,27,1],
+"structjs_tier.html#af2edbabd5e078b1e31dd73d44fd507d3":[2,0,27,5],
+"structkv_config.html":[2,0,35],
+"structkv_config.html#a0ec6b3afbfdaa33436e2ae748e986e98":[2,0,35,3],
+"structkv_config.html#a11b636da727c17566d5ab1274f69fee5":[2,0,35,0],
+"structkv_config.html#a1bc37777aa91b8b57a70e7647670cd12":[2,0,35,5],
+"structkv_config.html#a281156a9df0130abad7f3b2728ac35a5":[2,0,35,2],
+"structkv_config.html#a48f0f70383eff868321f9c94ae1a87cd":[2,0,35,7],
+"structkv_config.html#a941e9cad2bab67f093bf4d9567b4749a":[2,0,35,1],
+"structkv_config.html#ad2f5503e2f2522cb52e0ba1b86983dba":[2,0,35,4],
+"structkv_config.html#ad5db9a58224d93ab86b4cfc4c46f1897":[2,0,35,6],
+"structkv_config.html#ae172d3e442eef1a57cd7cf266d9e8951":[2,0,35,8],
+"structkv_entry_list.html":[2,0,38],
+"structkv_entry_list.html#a179d4d3e5844d005be1ed9134b969a50":[2,0,38,0],
+"structkv_entry_list.html#a82da55d42e1a6862d3b0034dfc6f321f":[2,0,38,1],
+"structkv_keys_list.html":[2,0,39],
+"structkv_keys_list.html#a625f7b34784e024a538359efd9a97265":[2,0,39,1],
+"structkv_keys_list.html#aa5cb40820a1a927375215e0a94ecfc18":[2,0,39,0],
+"structkv_purge_options.html":[2,0,37],
+"structkv_purge_options.html#a245c2def0f3aabe617219772cf7680a8":[2,0,37,0],
+"structkv_purge_options.html#a47fed1e95073666cbe441aba7c149da6":[2,0,37,1],
+"structkv_watch_options.html":[2,0,36],
+"structkv_watch_options.html#a0535edd21b26affc0057575bafc21a07":[2,0,36,0],
+"structkv_watch_options.html#a08274f08ae96e14d9ded326e4e665649":[2,0,36,1],
+"structkv_watch_options.html#a56183d56585697d058c7eeb20bdddb66":[2,0,36,3],
+"structkv_watch_options.html#ac9094bce4f3c6513431ba32fb49e5605":[2,0,36,2],
+"structnats_msg_list.html":[2,0,0],
+"structnats_msg_list.html#a5c48bf6b9e7f1d889d7ad31694911750":[2,0,0,1],
+"structnats_msg_list.html#aa123668879f1c9c11c9be7bd81a205c5":[2,0,0,0]
+};
diff --git a/doc/html/navtreeindex4.js b/doc/html/navtreeindex4.js
new file mode 100644 (file)
index 0000000..8784ab8
--- /dev/null
@@ -0,0 +1,47 @@
+var NAVTREEINDEX4 =
+{
+"structjs_stream_config.html#acdba5b22e4e60fd81a54769a7d09bc51":[2,0,5,18],
+"structjs_stream_config.html#acee6c66afc78d79c2f518eed89177efb":[2,0,5,17],
+"structjs_stream_config.html#ad75e47d4293441bd5ddbc5eaf01e0451":[2,0,5,7],
+"structjs_stream_config.html#adbf2c948cf8091b149603b918ef49ffc":[2,0,5,13],
+"structjs_stream_info.html":[2,0,11],
+"structjs_stream_info.html#a2e7ca48a93fe57265609e7e0cd3fa386":[2,0,11,5],
+"structjs_stream_info.html#a578ce52a275c690dd4627c1d119c7838":[2,0,11,1],
+"structjs_stream_info.html#a766ac56dec3bd19fa5b9861fb5f64397":[2,0,11,2],
+"structjs_stream_info.html#a8d10d6fdc3f713ac726c72cae06a209a":[2,0,11,3],
+"structjs_stream_info.html#ab71aae7e4f6c62e2a09a3a52c9e4fa2a":[2,0,11,4],
+"structjs_stream_info.html#adcc402d28e0ee443419e9b549da233c6":[2,0,11,0],
+"structjs_stream_info.html#af14110cb1f8e16e3dade8d9f7c2fd672":[2,0,11,6],
+"structjs_stream_source.html":[2,0,4],
+"structjs_stream_source.html#a295458d156af5373bb3f5ab06612a888":[2,0,4,4],
+"structjs_stream_source.html#a67eb1dac41b2d826a923cfb23baa24a5":[2,0,4,2],
+"structjs_stream_source.html#a7d9e5c064866b3f0b5601193c5885ec3":[2,0,4,0],
+"structjs_stream_source.html#ad6948b7a34c202f324b6d2beb32fe5ed":[2,0,4,1],
+"structjs_stream_source.html#af787b51dde9d77626f33860564eb08c3":[2,0,4,3],
+"structjs_stream_source_info.html":[2,0,10],
+"structjs_stream_source_info.html#a28b8cc0a9d487672955d3a3fa03de247":[2,0,10,3],
+"structjs_stream_source_info.html#a6db3c6ff8a465a45f8bd5c7bdf5f6c04":[2,0,10,0],
+"structjs_stream_source_info.html#a7eb19dd2637079fd1e970a2b38d33e05":[2,0,10,1],
+"structjs_stream_source_info.html#ab2ee0ca3ecd98c2df6d4e9bd88686863":[2,0,10,2],
+"structjs_stream_state.html":[2,0,7],
+"structjs_stream_state.html#a1adf8991f31fc4db9d6907a0316f8eec":[2,0,7,9],
+"structjs_stream_state.html#a22da809fe7a1ec3101841e86d6708827":[2,0,7,4],
+"structjs_stream_state.html#a27f4cfb85c0f1b0c5c7ad5275bd25d85":[2,0,7,10],
+"structjs_stream_state.html#a34a08a64c97269165630bf2e0c78c2c0":[2,0,7,8],
+"structjs_stream_state.html#a495269fe83c6bbf2023cca94add0a888":[2,0,7,0],
+"structjs_stream_state.html#a55bb6719163acef7fdb6d0bc3ae8d5da":[2,0,7,2],
+"structjs_stream_state.html#a67cbd0d8b43d8c05c8b4cd6b0e44dab0":[2,0,7,5],
+"structjs_stream_state.html#abcf4d3c581c06d820f1ad21d640bef3f":[2,0,7,7],
+"structjs_stream_state.html#acbec2f01830b56cb4c0bf54ae5170e51":[2,0,7,6],
+"structjs_stream_state.html#ae603fa6ecfb63c93b61272b7d1b8fb4d":[2,0,7,1],
+"structjs_stream_state.html#afb7a708022faff518c060b33e99b04b0":[2,0,7,3],
+"structjs_sub_options.html":[2,0,14],
+"structjs_sub_options.html#a21a905c49dfab61729d8674702d196b2":[2,0,14,3],
+"structjs_sub_options.html#a7aa5b8439ed288b858943f28c291cb36":[2,0,14,1],
+"structjs_sub_options.html#a856a6af4a7ff5aa2e736338091e69484":[2,0,14,0],
+"structjs_sub_options.html#aaf4b620d112a31f51a20389c5405805d":[2,0,14,2],
+"structjs_sub_options.html#acab25d71a2efe26bb3b084071435c2b5":[2,0,14,4],
+"structnats_msg_list.html":[2,0,0],
+"structnats_msg_list.html#a325f44c02d08d9f568d1dc89b65f2b1d":[2,0,0,1],
+"structnats_msg_list.html#aa123668879f1c9c11c9be7bd81a205c5":[2,0,0,0]
+};
diff --git a/doc/html/open.png b/doc/html/open.png
new file mode 100644 (file)
index 0000000..30f75c7
Binary files /dev/null and b/doc/html/open.png differ
diff --git a/doc/html/pages.html b/doc/html/pages.html
new file mode 100644 (file)
index 0000000..cd27d16
--- /dev/null
@@ -0,0 +1,114 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Related Pages</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('pages.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">Related Pages</div></div>
+</div><!--header-->
+<div class="contents">
+<div class="textblock">Here is a list of all related documentation pages:</div><div class="directory">
+<table class="directory">
+<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><a class="el" href="deprecated.html" target="_self">Deprecated List</a></td><td class="desc"></td></tr>
+</table>
+</div><!-- directory -->
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/resize.js b/doc/html/resize.js
new file mode 100644 (file)
index 0000000..aaeb6fc
--- /dev/null
@@ -0,0 +1,155 @@
+/*
+ @licstart  The following is the entire license notice for the JavaScript code in this file.
+
+ The MIT License (MIT)
+
+ Copyright (C) 1997-2020 by Dimitri van Heesch
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+ and associated documentation files (the "Software"), to deal in the Software without restriction,
+ including without limitation the rights to use, copy, modify, merge, publish, distribute,
+ sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all copies or
+ substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+ BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ @licend  The above is the entire license notice for the JavaScript code in this file
+ */
+var once=1;
+function initResizable()
+{
+  var cookie_namespace = 'doxygen';
+  var sidenav,navtree,content,header,barWidth=6,desktop_vp=768,titleHeight;
+
+  function readSetting(cookie)
+  {
+    if (window.chrome) {
+      var val = localStorage.getItem(cookie_namespace+'_width');
+      if (val) return val;
+    } else {
+      var myCookie = cookie_namespace+"_"+cookie+"=";
+      if (document.cookie) {
+        var index = document.cookie.indexOf(myCookie);
+        if (index != -1) {
+          var valStart = index + myCookie.length;
+          var valEnd = document.cookie.indexOf(";", valStart);
+          if (valEnd == -1) {
+            valEnd = document.cookie.length;
+          }
+          var val = document.cookie.substring(valStart, valEnd);
+          return val;
+        }
+      }
+    }
+    return 250;
+  }
+
+  function writeSetting(cookie, val)
+  {
+    if (window.chrome) {
+      localStorage.setItem(cookie_namespace+"_width",val);
+    } else {
+      var date = new Date();
+      date.setTime(date.getTime()+(10*365*24*60*60*1000)); // default expiration is one week
+      expiration = date.toGMTString();
+      document.cookie = cookie_namespace + "_" + cookie + "=" + val + "; SameSite=Lax; expires=" + expiration+"; path=/";
+    }
+  }
+
+  function resizeWidth()
+  {
+    var windowWidth = $(window).width() + "px";
+    var sidenavWidth = $(sidenav).outerWidth();
+    content.css({marginLeft:parseInt(sidenavWidth)+"px"});
+    if (typeof page_layout!=='undefined' && page_layout==1) {
+      footer.css({marginLeft:parseInt(sidenavWidth)+"px"});
+    }
+    writeSetting('width',sidenavWidth-barWidth);
+  }
+
+  function restoreWidth(navWidth)
+  {
+    var windowWidth = $(window).width() + "px";
+    content.css({marginLeft:parseInt(navWidth)+barWidth+"px"});
+    if (typeof page_layout!=='undefined' && page_layout==1) {
+      footer.css({marginLeft:parseInt(navWidth)+barWidth+"px"});
+    }
+    sidenav.css({width:navWidth + "px"});
+  }
+
+  function resizeHeight()
+  {
+    var headerHeight = header.outerHeight();
+    var footerHeight = footer.outerHeight();
+    var windowHeight = $(window).height();
+    var contentHeight,navtreeHeight,sideNavHeight;
+    if (typeof page_layout==='undefined' || page_layout==0) { /* DISABLE_INDEX=NO */
+      contentHeight = windowHeight - headerHeight - footerHeight;
+      navtreeHeight = contentHeight;
+      sideNavHeight = contentHeight;
+    } else if (page_layout==1) { /* DISABLE_INDEX=YES */
+      contentHeight = windowHeight - footerHeight;
+      navtreeHeight = windowHeight - headerHeight;
+      sideNavHeight = windowHeight;
+    }
+    content.css({height:contentHeight + "px"});
+    navtree.css({height:navtreeHeight + "px"});
+    sidenav.css({height:sideNavHeight + "px"});
+    if (location.hash.slice(1)) {
+      (document.getElementById(location.hash.slice(1))||document.body).scrollIntoView();
+    }
+  }
+
+  function collapseExpand()
+  {
+    var newWidth;
+    if (sidenav.width()>0) {
+      newWidth=0;
+    }
+    else {
+      var width = readSetting('width');
+      newWidth = (width>250 && width<$(window).width()) ? width : 250;
+    }
+    restoreWidth(newWidth);
+    var sidenavWidth = $(sidenav).outerWidth();
+    writeSetting('width',sidenavWidth-barWidth);
+  }
+
+  header  = $("#top");
+  sidenav = $("#side-nav");
+  content = $("#doc-content");
+  navtree = $("#nav-tree");
+  footer  = $("#nav-path");
+  $(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } });
+  $(sidenav).resizable({ minWidth: 0 });
+  $(window).resize(function() { resizeHeight(); });
+  var device = navigator.userAgent.toLowerCase();
+  var touch_device = device.match(/(iphone|ipod|ipad|android)/);
+  if (touch_device) { /* wider split bar for touch only devices */
+    $(sidenav).css({ paddingRight:'20px' });
+    $('.ui-resizable-e').css({ width:'20px' });
+    $('#nav-sync').css({ right:'34px' });
+    barWidth=20;
+  }
+  var width = readSetting('width');
+  if (width) { restoreWidth(width); } else { resizeWidth(); }
+  resizeHeight();
+  var url = location.href;
+  var i=url.indexOf("#");
+  if (i>=0) window.location.hash=url.substr(i);
+  var _preventDefault = function(evt) { evt.preventDefault(); };
+  $("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault);
+  if (once) {
+    $(".ui-resizable-handle").dblclick(collapseExpand);
+    once=0
+  }
+  $(window).on('load',resizeHeight);
+}
+/* @license-end */
diff --git a/doc/html/search/all_0.html b/doc/html/search/all_0.html
new file mode 100644 (file)
index 0000000..c36c9af
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_0.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/all_0.js b/doc/html/search/all_0.js
new file mode 100644 (file)
index 0000000..597dc4b
--- /dev/null
@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['_25nats_20c_20client_2e_0',['%NATS C client.',['../index.html',1,'']]]
+];
diff --git a/doc/html/search/all_1.html b/doc/html/search/all_1.html
new file mode 100644 (file)
index 0000000..91cfe8a
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_1.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/all_1.js b/doc/html/search/all_1.js
new file mode 100644 (file)
index 0000000..6fc88d0
--- /dev/null
@@ -0,0 +1,13 @@
+var searchData=
+[
+  ['ackfloor_0',['AckFloor',['../structjs_consumer_info.html#ab69c36ae092df9b0663b675a5abbab55',1,'jsConsumerInfo']]],
+  ['ackhandler_1',['AckHandler',['../structjs_options_1_1js_options_publish_async.html#a508140119f40a2c056d4ee8c0cd55df9',1,'jsOptions::jsOptionsPublishAsync']]],
+  ['ackhandlerclosure_2',['AckHandlerClosure',['../structjs_options_1_1js_options_publish_async.html#a60c95f10797c04ea2e625759c6936ec9',1,'jsOptions::jsOptionsPublishAsync']]],
+  ['ackpolicy_3',['AckPolicy',['../structjs_consumer_config.html#a8a311af614dfae1b0f4e4af7db467aab',1,'jsConsumerConfig']]],
+  ['ackwait_4',['AckWait',['../structjs_consumer_config.html#a651a94b9b78668dde830dc7869610e67',1,'jsConsumerConfig']]],
+  ['active_5',['Active',['../structjs_peer_info.html#a8441d023932c388953197f7ea39402fe',1,'jsPeerInfo::Active()'],['../structjs_stream_source_info.html#a28b8cc0a9d487672955d3a3fa03de247',1,'jsStreamSourceInfo::Active()']]],
+  ['allowdirect_6',['AllowDirect',['../structjs_stream_config.html#a28630f6f07ca02553c5d5718d7c29721',1,'jsStreamConfig']]],
+  ['allowrollup_7',['AllowRollup',['../structjs_stream_config.html#aba71cdb342181f52bb9f7ff5f770a1fa',1,'jsStreamConfig']]],
+  ['api_8',['API',['../structjs_account_info.html#a94ab71c69b7883c2731ae8741ddc1e94',1,'jsAccountInfo']]],
+  ['apiprefix_9',['APIPrefix',['../structjs_external_stream.html#a2eaf2c0c3e77c269f44e254af8b24e96',1,'jsExternalStream']]]
+];
diff --git a/doc/html/search/all_10.html b/doc/html/search/all_10.html
new file mode 100644 (file)
index 0000000..765f584
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_10.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/all_10.js b/doc/html/search/all_10.js
new file mode 100644 (file)
index 0000000..f0f9d65
--- /dev/null
@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['queue_0',['Queue',['../structjs_sub_options.html#aaf4b620d112a31f51a20389c5405805d',1,'jsSubOptions']]]
+];
diff --git a/doc/html/search/all_11.html b/doc/html/search/all_11.html
new file mode 100644 (file)
index 0000000..e2183ee
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_11.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/all_11.js b/doc/html/search/all_11.js
new file mode 100644 (file)
index 0000000..d4e3d56
--- /dev/null
@@ -0,0 +1,9 @@
+var searchData=
+[
+  ['ratelimit_0',['RateLimit',['../structjs_consumer_config.html#a351b388a36ccb7978e6e85a6f4fc0816',1,'jsConsumerConfig']]],
+  ['replaypolicy_1',['ReplayPolicy',['../structjs_consumer_config.html#ade510daf7c5d67553d2cd20b64ab9939',1,'jsConsumerConfig']]],
+  ['replicas_2',['Replicas',['../structjs_stream_config.html#adbf2c948cf8091b149603b918ef49ffc',1,'jsStreamConfig::Replicas()'],['../structjs_cluster_info.html#a8dfcae3bc348a5b595b509e3f3d3500b',1,'jsClusterInfo::Replicas()'],['../structjs_consumer_config.html#acfba6d6ecb6323fd8ffe6c0bb4fbffae',1,'jsConsumerConfig::Replicas()'],['../structkv_config.html#a48f0f70383eff868321f9c94ae1a87cd',1,'kvConfig::Replicas()']]],
+  ['replicaslen_3',['ReplicasLen',['../structjs_cluster_info.html#a237a639579def1345e02f1490a510ed5',1,'jsClusterInfo']]],
+  ['republish_4',['RePublish',['../structjs_stream_config.html#a95ab0061b6e935b129a4a9c133e6b11c',1,'jsStreamConfig::RePublish()'],['../structkv_config.html#ae172d3e442eef1a57cd7cf266d9e8951',1,'kvConfig::RePublish()']]],
+  ['retention_5',['Retention',['../structjs_stream_config.html#a5ebc95b76afafa5e7a129953ba1bb3c7',1,'jsStreamConfig']]]
+];
diff --git a/doc/html/search/all_12.html b/doc/html/search/all_12.html
new file mode 100644 (file)
index 0000000..9b9621c
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_12.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/all_12.js b/doc/html/search/all_12.js
new file mode 100644 (file)
index 0000000..0c42250
--- /dev/null
@@ -0,0 +1,80 @@
+var searchData=
+[
+  ['samplefrequency_0',['SampleFrequency',['../structjs_consumer_config.html#a43f40b8eef0074b4146fb945b4645584',1,'jsConsumerConfig']]],
+  ['sealed_1',['Sealed',['../structjs_stream_config.html#aede3fd2ab13d230eda14c96f9997e1b7',1,'jsStreamConfig']]],
+  ['sequence_2',['Sequence',['../structjs_msg_meta_data.html#a23d5fd1992033164c73d5c2a16a4e321',1,'jsMsgMetaData::Sequence()'],['../structjs_pub_ack.html#a01d302d5e1a2e71487a8c74c3fed1691',1,'jsPubAck::Sequence()'],['../structjs_direct_get_msg_options.html#a60211d7499cfecdd6e61e6c73af1a2f5',1,'jsDirectGetMsgOptions::Sequence()'],['../structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#a0d61e5d3c9c518f455549086ababe7f6',1,'jsOptions::jsOptionsStream::jsOptionsStreamPurge::Sequence()']]],
+  ['source_3',['Source',['../structjs_re_publish.html#a1acb593929fd69bbe0f4dc8300dfaeb2',1,'jsRePublish']]],
+  ['sources_4',['Sources',['../structjs_stream_config.html#a8f0ee08922e5b2108082b5b9e4a6284b',1,'jsStreamConfig::Sources()'],['../structjs_stream_info.html#a2e7ca48a93fe57265609e7e0cd3fa386',1,'jsStreamInfo::Sources()']]],
+  ['sourceslen_5',['SourcesLen',['../structjs_stream_config.html#a34960d6acc710c2f32b563f4bb7c9c0a',1,'jsStreamConfig::SourcesLen()'],['../structjs_stream_info.html#af14110cb1f8e16e3dade8d9f7c2fd672',1,'jsStreamInfo::SourcesLen()']]],
+  ['stallwait_6',['StallWait',['../structjs_options_1_1js_options_publish_async.html#ada58fefe0ed40157b5f5d44b9dd175f9',1,'jsOptions::jsOptionsPublishAsync']]],
+  ['stanconnection_7',['stanConnection',['../group__types_group.html#ga9e826493769d23086cfccefe95cdf64c',1,'nats.h']]],
+  ['stanconnection_5fclose_8',['stanConnection_Close',['../group__stan_conn_mgt_group.html#ga4952a7f65a53fdb5ca1c26b1a1656f1d',1,'nats.h']]],
+  ['stanconnection_5fconnect_9',['stanConnection_Connect',['../group__stan_conn_mgt_group.html#ga35e0e6e5e3b7f3818a3ac3600efb8f8f',1,'nats.h']]],
+  ['stanconnection_5fdestroy_10',['stanConnection_Destroy',['../group__stan_conn_mgt_group.html#gaea095eec18fdf04e06de16711f8b1a04',1,'nats.h']]],
+  ['stanconnection_5fgetnatsconnection_11',['stanConnection_GetNATSConnection',['../group__stan_conn_mgt_group.html#ga166ec494a55c9b1f9ebafd2294e05ff6',1,'nats.h']]],
+  ['stanconnection_5fpublish_12',['stanConnection_Publish',['../group__stan_conn_pub_group.html#ga24f3f7f709b15fe53e1edaeead08fc7d',1,'nats.h']]],
+  ['stanconnection_5fpublishasync_13',['stanConnection_PublishAsync',['../group__stan_conn_pub_group.html#ga0c4d1e4615f8ac834f0a4021f75d39f0',1,'nats.h']]],
+  ['stanconnection_5fqueuesubscribe_14',['stanConnection_QueueSubscribe',['../group__stan_conn_sub_group.html#ga17d42bf9a4fa39470561a1a668e6b4a2',1,'nats.h']]],
+  ['stanconnection_5freleasenatsconnection_15',['stanConnection_ReleaseNATSConnection',['../group__stan_conn_mgt_group.html#ga2e56a93825e1214a5ab688860e2a8ce6',1,'nats.h']]],
+  ['stanconnection_5fsubscribe_16',['stanConnection_Subscribe',['../group__stan_conn_sub_group.html#gae545358fdc493baf6d29429a8156781f',1,'nats.h']]],
+  ['stanconnectionlosthandler_17',['stanConnectionLostHandler',['../group__callbacks_group.html#gac34092f6c698374f86ad349302bdd55c',1,'nats.h']]],
+  ['stanconnoptions_18',['stanConnOptions',['../group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1',1,'nats.h']]],
+  ['stanconnoptions_5fcreate_19',['stanConnOptions_Create',['../group__stan_conn_opts_group.html#gaff52a1ce90253b4bdbb0005fca4f71b6',1,'nats.h']]],
+  ['stanconnoptions_5fdestroy_20',['stanConnOptions_Destroy',['../group__stan_conn_opts_group.html#ga83fd0a29b136cbfb643be642eb2fa726',1,'nats.h']]],
+  ['stanconnoptions_5fsetconnectionlosthandler_21',['stanConnOptions_SetConnectionLostHandler',['../group__stan_conn_opts_group.html#ga19ba15c8001aa835b261eea3a309e6d3',1,'nats.h']]],
+  ['stanconnoptions_5fsetconnectionwait_22',['stanConnOptions_SetConnectionWait',['../group__stan_conn_opts_group.html#ga66c72c482696d9ceca71fced7cbb1264',1,'nats.h']]],
+  ['stanconnoptions_5fsetdiscoveryprefix_23',['stanConnOptions_SetDiscoveryPrefix',['../group__stan_conn_opts_group.html#ga07105d1d00878bba19f47243b2c88402',1,'nats.h']]],
+  ['stanconnoptions_5fsetmaxpubacksinflight_24',['stanConnOptions_SetMaxPubAcksInflight',['../group__stan_conn_opts_group.html#ga29eee1be7eff749aeac3bab60d1b0405',1,'nats.h']]],
+  ['stanconnoptions_5fsetnatsoptions_25',['stanConnOptions_SetNATSOptions',['../group__stan_conn_opts_group.html#gae3fc9a4daa7f85367811a313857337b4',1,'nats.h']]],
+  ['stanconnoptions_5fsetpings_26',['stanConnOptions_SetPings',['../group__stan_conn_opts_group.html#gad835223f08fbeae2a3c7a34d3fa1550b',1,'nats.h']]],
+  ['stanconnoptions_5fsetpubackwait_27',['stanConnOptions_SetPubAckWait',['../group__stan_conn_opts_group.html#ga36f2ee441562dcf619d6e020b823fc96',1,'nats.h']]],
+  ['stanconnoptions_5fseturl_28',['stanConnOptions_SetURL',['../group__stan_conn_opts_group.html#ga3c6d511fc1e1febcdf5344960de5a0b3',1,'nats.h']]],
+  ['stanmsg_29',['stanMsg',['../group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d',1,'nats.h']]],
+  ['stanmsg_5fdestroy_30',['stanMsg_Destroy',['../group__stan_msg_group.html#gacd0059fb499963f5b2eae18053e5f74f',1,'nats.h']]],
+  ['stanmsg_5fgetdata_31',['stanMsg_GetData',['../group__stan_msg_group.html#ga2f27fbfb79a46c52e079f670c59e1260',1,'nats.h']]],
+  ['stanmsg_5fgetdatalength_32',['stanMsg_GetDataLength',['../group__stan_msg_group.html#ga7d1e394a686bc25ab7376b7f28b9e777',1,'nats.h']]],
+  ['stanmsg_5fgetsequence_33',['stanMsg_GetSequence',['../group__stan_msg_group.html#ga98b66ff73447e1d7e329edbfcde782b5',1,'nats.h']]],
+  ['stanmsg_5fgettimestamp_34',['stanMsg_GetTimestamp',['../group__stan_msg_group.html#ga2fa524b11e9621cf46ca9b1a3ca66452',1,'nats.h']]],
+  ['stanmsg_5fisredelivered_35',['stanMsg_IsRedelivered',['../group__stan_msg_group.html#ga8e537d014b89d9d7da7906b2ee75d5c0',1,'nats.h']]],
+  ['stanmsghandler_36',['stanMsgHandler',['../group__callbacks_group.html#gaf7456e37fa14f1834d9048d3789e9409',1,'nats.h']]],
+  ['stanpubackhandler_37',['stanPubAckHandler',['../group__callbacks_group.html#gad5d6a685731b3bf635995b7375af4d18',1,'nats.h']]],
+  ['stansuboptions_38',['stanSubOptions',['../group__types_group.html#ga023712711f5c289663fc2223e83686d3',1,'nats.h']]],
+  ['stansuboptions_5fcreate_39',['stanSubOptions_Create',['../group__stan_sub_opts_group.html#gad87a2cef4f4ddf64696f9864773c37cf',1,'nats.h']]],
+  ['stansuboptions_5fdeliverallavailable_40',['stanSubOptions_DeliverAllAvailable',['../group__stan_sub_opts_group.html#gab09b81358e93199a4631eb06f1ec179f',1,'nats.h']]],
+  ['stansuboptions_5fdestroy_41',['stanSubOptions_Destroy',['../group__stan_sub_opts_group.html#ga1b56877d0a6729e148c9c288e2b88e3f',1,'nats.h']]],
+  ['stansuboptions_5fsetackwait_42',['stanSubOptions_SetAckWait',['../group__stan_sub_opts_group.html#gafbb4e6c74978c4e8f30f016c20cc2bdf',1,'nats.h']]],
+  ['stansuboptions_5fsetdurablename_43',['stanSubOptions_SetDurableName',['../group__stan_sub_opts_group.html#gaa018bceba99ef3726157e87c6918ab14',1,'nats.h']]],
+  ['stansuboptions_5fsetmanualackmode_44',['stanSubOptions_SetManualAckMode',['../group__stan_sub_opts_group.html#ga6f49ae2629e49d2bfa35990cf030bf83',1,'nats.h']]],
+  ['stansuboptions_5fsetmaxinflight_45',['stanSubOptions_SetMaxInflight',['../group__stan_sub_opts_group.html#ga35efbdea888e00440c500845064931c0',1,'nats.h']]],
+  ['stansuboptions_5fstartatsequence_46',['stanSubOptions_StartAtSequence',['../group__stan_sub_opts_group.html#ga6cb7f6e1ac697d16959f9042eeb84dc1',1,'nats.h']]],
+  ['stansuboptions_5fstartattime_47',['stanSubOptions_StartAtTime',['../group__stan_sub_opts_group.html#gaafd7a553486eea3c9d309da0744a3608',1,'nats.h']]],
+  ['stansuboptions_5fstartattimedelta_48',['stanSubOptions_StartAtTimeDelta',['../group__stan_sub_opts_group.html#ga27d9175901997b8468997019746599b5',1,'nats.h']]],
+  ['stansuboptions_5fstartwithlastreceived_49',['stanSubOptions_StartWithLastReceived',['../group__stan_sub_opts_group.html#ga856a74e31f3307faf988747c1f88717c',1,'nats.h']]],
+  ['stansubscription_50',['stanSubscription',['../group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5',1,'nats.h']]],
+  ['stansubscription_5fackmsg_51',['stanSubscription_AckMsg',['../group__stan_sub_group.html#ga3a1cca9fa3ea54fcf7a43fd1335a26d3',1,'nats.h']]],
+  ['stansubscription_5fclose_52',['stanSubscription_Close',['../group__stan_sub_group.html#gacfa3a7b4fa333c84acfa7521fbbb5bcc',1,'nats.h']]],
+  ['stansubscription_5fdestroy_53',['stanSubscription_Destroy',['../group__stan_sub_group.html#ga3f6ce924f6a1830a55e30e9910aad4ba',1,'nats.h']]],
+  ['stansubscription_5fsetoncompletecb_54',['stanSubscription_SetOnCompleteCB',['../group__stan_sub_group.html#ga7b039908ec45cfc2c16ec61ba8daca9d',1,'nats.h']]],
+  ['stansubscription_5funsubscribe_55',['stanSubscription_Unsubscribe',['../group__stan_sub_group.html#gafa428a7e0f6800216cb06fd738bd235e',1,'nats.h']]],
+  ['state_56',['State',['../structjs_stream_info.html#a766ac56dec3bd19fa5b9861fb5f64397',1,'jsStreamInfo']]],
+  ['statistics_57',['Statistics',['../group__stats_group.html',1,'']]],
+  ['status_58',['Status',['../group__status_group.html',1,'']]],
+  ['status_2eh_59',['status.h',['../status_8h.html',1,'']]],
+  ['storage_60',['Storage',['../structjs_stream_config.html#a59c34091f336eafa77da2991c852c0d8',1,'jsStreamConfig']]],
+  ['storagetype_61',['StorageType',['../structkv_config.html#ad5db9a58224d93ab86b4cfc4c46f1897',1,'kvConfig']]],
+  ['store_62',['Store',['../structjs_account_info.html#ad1c254c5b8f11f57062a4e2d5fb10ae3',1,'jsAccountInfo::Store()'],['../structjs_tier.html#ab16c426e1c35d8c0fd6c460c43580a39',1,'jsTier::Store()']]],
+  ['storemaxstreambytes_63',['StoreMaxStreamBytes',['../structjs_account_limits.html#a8cca06ab72b715c02a6a2c72b59f6a52',1,'jsAccountLimits']]],
+  ['stream_64',['Stream',['../structjs_options.html#ae50544ee0ef8dd7d02ef9802805807ae',1,'jsOptions::Stream()'],['../structjs_pub_ack.html#a4fd5e6cdb7217d72c553afcc75358893',1,'jsPubAck::Stream()'],['../structjs_msg_meta_data.html#a32e2a9438d2dc769f7f64d2f8897abc4',1,'jsMsgMetaData::Stream()'],['../structjs_consumer_info.html#a8f21939613163a7c0ebfb521aa471260',1,'jsConsumerInfo::Stream()'],['../structjs_sequence_info.html#ab52c55c1d0edd20e064870b490b4b990',1,'jsSequenceInfo::Stream()'],['../structjs_sequence_pair.html#ab051e0815302c48ba6122bd18d9d76f7',1,'jsSequencePair::Stream()'],['../structjs_sub_options.html#a856a6af4a7ff5aa2e736338091e69484',1,'jsSubOptions::Stream()'],['../structjs_consumer_sequence_mismatch.html#aad6a17af1719c023c38a6fd254b73f8e',1,'jsConsumerSequenceMismatch::Stream()']]],
+  ['streaming_20connection_65',['Streaming Connection',['../group__stan_conn_group.html',1,'']]],
+  ['streaming_20connection_20options_66',['Streaming Connection Options',['../group__stan_conn_opts_group.html',1,'']]],
+  ['streaming_20message_67',['Streaming Message',['../group__stan_msg_group.html',1,'']]],
+  ['streaming_20subscription_68',['Streaming Subscription',['../group__stan_sub_group.html',1,'']]],
+  ['streaming_20subscription_20options_69',['Streaming Subscription Options',['../group__stan_sub_opts_group.html',1,'']]],
+  ['streams_70',['Streams',['../structjs_account_info.html#a17317abf03effdcdedc2003fca8adc71',1,'jsAccountInfo::Streams()'],['../structjs_tier.html#a3f9234fde387faf3775d841aa797a6ea',1,'jsTier::Streams()']]],
+  ['subject_71',['Subject',['../structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#aa99e6ee3bef1c22243f01544181315fe',1,'jsOptions::jsOptionsStream::jsOptionsStreamPurge::Subject()'],['../structjs_stream_state_subject.html#aa766824a7f8b69db592971af3262640e',1,'jsStreamStateSubject::Subject()']]],
+  ['subjects_72',['Subjects',['../structjs_stream_state.html#a4af56e8bee7262ab050f2a25114c5909',1,'jsStreamState::Subjects()'],['../structjs_stream_config.html#a0c5f3354073dbe72650e3db7f59a47af',1,'jsStreamConfig::Subjects()']]],
+  ['subjectsfilter_73',['SubjectsFilter',['../structjs_options_1_1js_options_stream_1_1js_options_stream_info.html#af874e0f5aa15fb2a41504631ed786e6d',1,'jsOptions::jsOptionsStream::jsOptionsStreamInfo']]],
+  ['subjectslen_74',['SubjectsLen',['../structjs_stream_config.html#ab2186aae798df6c222b3fa69e31597e1',1,'jsStreamConfig']]],
+  ['subscribing_75',['Subscribing',['../group__conn_sub_group.html',1,'(Global Namespace)'],['../group__js_sub_group.html',1,'(Global Namespace)'],['../group__stan_conn_sub_group.html',1,'(Global Namespace)']]],
+  ['subscription_76',['Subscription',['../group__sub_group.html',1,'']]]
+];
diff --git a/doc/html/search/all_13.html b/doc/html/search/all_13.html
new file mode 100644 (file)
index 0000000..4acb7f9
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_13.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/all_13.js b/doc/html/search/all_13.js
new file mode 100644 (file)
index 0000000..01b41f4
--- /dev/null
@@ -0,0 +1,13 @@
+var searchData=
+[
+  ['tags_0',['Tags',['../structjs_placement.html#af078a85b744b9ff3771bb2da6005b90d',1,'jsPlacement']]],
+  ['tagslen_1',['TagsLen',['../structjs_placement.html#a35644f07531409518521b1b4fa28c9e3',1,'jsPlacement']]],
+  ['template_2',['Template',['../structjs_stream_config.html#a50f866f0e73c4ff0a5f43b354a059fa9',1,'jsStreamConfig']]],
+  ['tiers_3',['Tiers',['../structjs_account_info.html#ab654d5c7456bb62df1808deb32a620fc',1,'jsAccountInfo']]],
+  ['tierslen_4',['TiersLen',['../structjs_account_info.html#a21c14ca283400c684b18e61a534b6724',1,'jsAccountInfo']]],
+  ['timeout_5',['Timeout',['../structkv_watch_options.html#a56183d56585697d058c7eeb20bdddb66',1,'kvWatchOptions::Timeout()'],['../structkv_purge_options.html#a245c2def0f3aabe617219772cf7680a8',1,'kvPurgeOptions::Timeout()']]],
+  ['timestamp_6',['Timestamp',['../structjs_msg_meta_data.html#abab9ed5600a3629ea6d6c78170d7d5e9',1,'jsMsgMetaData']]],
+  ['total_7',['Total',['../structjs_a_p_i_stats.html#a1545170bebb347d0ea1254f51c3027cf',1,'jsAPIStats']]],
+  ['ttl_8',['TTL',['../structkv_config.html#ad2f5503e2f2522cb52e0ba1b86983dba',1,'kvConfig']]],
+  ['types_9',['Types',['../group__types_group.html',1,'']]]
+];
diff --git a/doc/html/search/all_14.html b/doc/html/search/all_14.html
new file mode 100644 (file)
index 0000000..abb790c
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_14.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/all_14.js b/doc/html/search/all_14.js
new file mode 100644 (file)
index 0000000..ea3e8d8
--- /dev/null
@@ -0,0 +1,5 @@
+var searchData=
+[
+  ['wait_0',['Wait',['../structjs_options.html#a7fd42e1f83da5861e716137c16f8b72f',1,'jsOptions']]],
+  ['wildcards_1',['Wildcards',['../group__wildcards_group.html',1,'']]]
+];
diff --git a/doc/html/search/all_2.html b/doc/html/search/all_2.html
new file mode 100644 (file)
index 0000000..259dde4
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_2.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/all_2.js b/doc/html/search/all_2.js
new file mode 100644 (file)
index 0000000..0878698
--- /dev/null
@@ -0,0 +1,8 @@
+var searchData=
+[
+  ['backoff_0',['BackOff',['../structjs_consumer_config.html#aa2d0aff64a2c46122d0f0fe89e8ae011',1,'jsConsumerConfig']]],
+  ['backofflen_1',['BackOffLen',['../structjs_consumer_config.html#ad2f6ca3f2d0f977aedb8687c462c1cfc',1,'jsConsumerConfig']]],
+  ['batch_2',['Batch',['../structjs_fetch_request.html#a84f06b60e25decb2674996f0cb315f63',1,'jsFetchRequest']]],
+  ['bucket_3',['Bucket',['../structkv_config.html#a11b636da727c17566d5ab1274f69fee5',1,'kvConfig']]],
+  ['bytes_4',['Bytes',['../structjs_lost_stream_data.html#a841fcadca3f66e9170a51080dc1acf30',1,'jsLostStreamData::Bytes()'],['../structjs_stream_state.html#ae603fa6ecfb63c93b61272b7d1b8fb4d',1,'jsStreamState::Bytes()']]]
+];
diff --git a/doc/html/search/all_3.html b/doc/html/search/all_3.html
new file mode 100644 (file)
index 0000000..1e60c94
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_3.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/all_3.js b/doc/html/search/all_3.js
new file mode 100644 (file)
index 0000000..6933a04
--- /dev/null
@@ -0,0 +1,14 @@
+var searchData=
+[
+  ['callbacks_0',['Callbacks',['../group__callbacks_group.html',1,'']]],
+  ['cluster_1',['Cluster',['../structjs_placement.html#ad8c83588d57f0e30959cfb6f3d5d61bf',1,'jsPlacement::Cluster()'],['../structjs_stream_info.html#a8d10d6fdc3f713ac726c72cae06a209a',1,'jsStreamInfo::Cluster()'],['../structjs_consumer_info.html#a6f4401563a9fd102226d82cdc6136e32',1,'jsConsumerInfo::Cluster()']]],
+  ['config_2',['Config',['../structjs_stream_info.html#adcc402d28e0ee443419e9b549da233c6',1,'jsStreamInfo::Config()'],['../structjs_sub_options.html#acab25d71a2efe26bb3b084071435c2b5',1,'jsSubOptions::Config()'],['../structjs_consumer_info.html#a2f63940ca1f024ad3840418c2f6a1ae1',1,'jsConsumerInfo::Config()']]],
+  ['connection_3',['Connection',['../group__conn_group.html',1,'']]],
+  ['consumer_4',['Consumer',['../structjs_sub_options.html#a7aa5b8439ed288b858943f28c291cb36',1,'jsSubOptions::Consumer()'],['../structjs_sequence_pair.html#a6d205effd29f8994f0028bfaf2e8d816',1,'jsSequencePair::Consumer()'],['../structjs_sequence_info.html#ae4416a5d766e07db207e563668edd06f',1,'jsSequenceInfo::Consumer()'],['../structjs_msg_meta_data.html#a6dcc2a442984b0ca070b3d8077192127',1,'jsMsgMetaData::Consumer()']]],
+  ['consumerclient_5',['ConsumerClient',['../structjs_consumer_sequence_mismatch.html#adb383429dadb1ab0e1f7d013bc546a28',1,'jsConsumerSequenceMismatch']]],
+  ['consumers_6',['Consumers',['../structjs_stream_state.html#a27f4cfb85c0f1b0c5c7ad5275bd25d85',1,'jsStreamState::Consumers()'],['../structjs_tier.html#ac33ce862c041572d10184e7fa0dd0bfe',1,'jsTier::Consumers()'],['../structjs_account_info.html#a1237c3f19a42a3203825971b429312e9',1,'jsAccountInfo::Consumers()']]],
+  ['consumerserver_7',['ConsumerServer',['../structjs_consumer_sequence_mismatch.html#ac1df353001d853c8a56cef9f82fb831c',1,'jsConsumerSequenceMismatch']]],
+  ['count_8',['Count',['../structnats_msg_list.html#a5c48bf6b9e7f1d889d7ad31694911750',1,'natsMsgList::Count()'],['../structjs_stream_state_subjects.html#ab88e2026f518b6cdffd3901b5e5cd374',1,'jsStreamStateSubjects::Count()'],['../structjs_stream_info_list.html#a8bc8490af12bb4f7a245605aecde62c2',1,'jsStreamInfoList::Count()'],['../structjs_stream_names_list.html#ab1385b6333537306d0462946c26cde4f',1,'jsStreamNamesList::Count()'],['../structjs_consumer_info_list.html#a813c908362a6426a929133f7c0d3395f',1,'jsConsumerInfoList::Count()'],['../structjs_consumer_names_list.html#a0bccbad8ac5d335a0ed89970a58900fb',1,'jsConsumerNamesList::Count()'],['../structkv_entry_list.html#a82da55d42e1a6862d3b0034dfc6f321f',1,'kvEntryList::Count()'],['../structkv_keys_list.html#a625f7b34784e024a538359efd9a97265',1,'kvKeysList::Count()']]],
+  ['created_9',['Created',['../structjs_stream_info.html#a578ce52a275c690dd4627c1d119c7838',1,'jsStreamInfo::Created()'],['../structjs_consumer_info.html#a670d38f2e9ba5c354ca3560a8064d00c',1,'jsConsumerInfo::Created()']]],
+  ['current_10',['Current',['../structjs_peer_info.html#ad8cecd039a8ad1c68daba89007b055d4',1,'jsPeerInfo']]]
+];
diff --git a/doc/html/search/all_4.html b/doc/html/search/all_4.html
new file mode 100644 (file)
index 0000000..08f1aed
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_4.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/all_4.js b/doc/html/search/all_4.js
new file mode 100644 (file)
index 0000000..f376c0b
--- /dev/null
@@ -0,0 +1,23 @@
+var searchData=
+[
+  ['deleted_0',['Deleted',['../structjs_stream_state.html#abcf4d3c581c06d820f1ad21d640bef3f',1,'jsStreamState']]],
+  ['deleteddetails_1',['DeletedDetails',['../structjs_options_1_1js_options_stream_1_1js_options_stream_info.html#a73f847afe18f56eaaf6788900270bef7',1,'jsOptions::jsOptionsStream::jsOptionsStreamInfo']]],
+  ['deletedlen_2',['DeletedLen',['../structjs_stream_state.html#a34a08a64c97269165630bf2e0c78c2c0',1,'jsStreamState']]],
+  ['deletemarkersolderthan_3',['DeleteMarkersOlderThan',['../structkv_purge_options.html#a47fed1e95073666cbe441aba7c149da6',1,'kvPurgeOptions']]],
+  ['delivered_4',['Delivered',['../structjs_consumer_info.html#a15f2d68fbf126acc1907ba9462ad9ee9',1,'jsConsumerInfo']]],
+  ['delivergroup_5',['DeliverGroup',['../structjs_consumer_config.html#ae0765f3b5effe365187d3cf809c6ed3c',1,'jsConsumerConfig']]],
+  ['deliverpolicy_6',['DeliverPolicy',['../structjs_consumer_config.html#a364127e68bf0d3bf13efdc0b416667f4',1,'jsConsumerConfig']]],
+  ['deliverprefix_7',['DeliverPrefix',['../structjs_external_stream.html#a26ca427f3c5be1cae579ddccc16432d3',1,'jsExternalStream']]],
+  ['deliversubject_8',['DeliverSubject',['../structjs_consumer_config.html#a95aa4184ed77f69b7674756572da1ded',1,'jsConsumerConfig']]],
+  ['denydelete_9',['DenyDelete',['../structjs_stream_config.html#af2d42dd29b9a35257937aeeb53c9f287',1,'jsStreamConfig']]],
+  ['denypurge_10',['DenyPurge',['../structjs_stream_config.html#a575ffbaa85b0300032963296b090583a',1,'jsStreamConfig']]],
+  ['deprecated_20list_11',['Deprecated List',['../deprecated.html',1,'']]],
+  ['description_12',['Description',['../structjs_stream_config.html#a4f9f422d2e9e7389860291ab19bd7f10',1,'jsStreamConfig::Description()'],['../structjs_consumer_config.html#a36a14d666d99bdade87a5e21a25491d6',1,'jsConsumerConfig::Description()'],['../structkv_config.html#a941e9cad2bab67f093bf4d9567b4749a',1,'kvConfig::Description()']]],
+  ['destination_13',['Destination',['../structjs_re_publish.html#a662b2e57d237b171b2b61509f7e1023a',1,'jsRePublish']]],
+  ['discard_14',['Discard',['../structjs_stream_config.html#a0b44ea5251ef20bf5b5658bcfbea832d',1,'jsStreamConfig']]],
+  ['discardnewpersubject_15',['DiscardNewPerSubject',['../structjs_stream_config.html#a3fb7d5e1a09829fe742749da880afe4a',1,'jsStreamConfig']]],
+  ['domain_16',['Domain',['../structjs_account_info.html#ab6ba03298e1863132550b9b08d06048c',1,'jsAccountInfo::Domain()'],['../structjs_msg_meta_data.html#a388e38ccea591181436d199dc7c2f8ea',1,'jsMsgMetaData::Domain()'],['../structjs_pub_ack.html#a0b73200c0b035db3c9c96421706d51b0',1,'jsPubAck::Domain()'],['../structjs_options.html#ae4df6c9c01c0ea9ab0e6d5a6ec8af74e',1,'jsOptions::Domain()']]],
+  ['duplicate_17',['Duplicate',['../structjs_pub_ack.html#a0381a49ff62e8fac7a52cad6a5eb7243',1,'jsPubAck']]],
+  ['duplicates_18',['Duplicates',['../structjs_stream_config.html#a9e0ff10273d0182f885615b4f7d1cc20',1,'jsStreamConfig']]],
+  ['durable_19',['Durable',['../structjs_consumer_config.html#a36cf121162cf0b40edf051991d851ee0',1,'jsConsumerConfig']]]
+];
diff --git a/doc/html/search/all_5.html b/doc/html/search/all_5.html
new file mode 100644 (file)
index 0000000..0d85fcc
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_5.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/all_5.js b/doc/html/search/all_5.js
new file mode 100644 (file)
index 0000000..0943d72
--- /dev/null
@@ -0,0 +1,18 @@
+var searchData=
+[
+  ['entries_0',['Entries',['../structkv_entry_list.html#a179d4d3e5844d005be1ed9134b969a50',1,'kvEntryList']]],
+  ['environment_20variables_1',['Environment Variables',['../group__env_variables_group.html',1,'']]],
+  ['err_2',['Err',['../structjs_pub_ack_err.html#a406e39e818f93bc59ac18cbdf035baf5',1,'jsPubAckErr']]],
+  ['errcode_3',['ErrCode',['../structjs_pub_ack_err.html#aa558fd192cc6d6c02ad891445ec5aa8a',1,'jsPubAckErr']]],
+  ['errhandler_4',['ErrHandler',['../structjs_options_1_1js_options_publish_async.html#a0a180995c49990ca277e449b7d43616b',1,'jsOptions::jsOptionsPublishAsync']]],
+  ['errhandlerclosure_5',['ErrHandlerClosure',['../structjs_options_1_1js_options_publish_async.html#a784a0029c30e82ff37c39ae6c276bc81',1,'jsOptions::jsOptionsPublishAsync']]],
+  ['errors_6',['Errors',['../structjs_a_p_i_stats.html#a84e85ad9d94dbe9afd1101388574255d',1,'jsAPIStats']]],
+  ['errtext_7',['ErrText',['../structjs_pub_ack_err.html#ad1a85e6ff4046d7df33c1e24323ddc87',1,'jsPubAckErr']]],
+  ['expectlastmsgid_8',['ExpectLastMsgId',['../structjs_pub_options.html#a095391b33a261586fc02eaf013b65e61',1,'jsPubOptions']]],
+  ['expectlastseq_9',['ExpectLastSeq',['../structjs_pub_options.html#a3b02b60b05caa6d242079a4c26b181bf',1,'jsPubOptions']]],
+  ['expectlastsubjectseq_10',['ExpectLastSubjectSeq',['../structjs_pub_options.html#aeefec1d2c7644562d23b87e55bf2e253',1,'jsPubOptions']]],
+  ['expectnomessage_11',['ExpectNoMessage',['../structjs_pub_options.html#a740a7edee8c832a75b75fded6046ba90',1,'jsPubOptions']]],
+  ['expectstream_12',['ExpectStream',['../structjs_pub_options.html#ac7ac74d2557d772c3092288dacf3711f',1,'jsPubOptions']]],
+  ['expires_13',['Expires',['../structjs_fetch_request.html#ac3351138ce8ac3b321ac1eb78887116e',1,'jsFetchRequest']]],
+  ['external_14',['External',['../structjs_stream_source.html#a295458d156af5373bb3f5ab06612a888',1,'jsStreamSource::External()'],['../structjs_stream_source_info.html#a7eb19dd2637079fd1e970a2b38d33e05',1,'jsStreamSourceInfo::External()']]]
+];
diff --git a/doc/html/search/all_6.html b/doc/html/search/all_6.html
new file mode 100644 (file)
index 0000000..7e088b8
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_6.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/all_6.js b/doc/html/search/all_6.js
new file mode 100644 (file)
index 0000000..a72f2f2
--- /dev/null
@@ -0,0 +1,8 @@
+var searchData=
+[
+  ['filtersubject_0',['FilterSubject',['../structjs_stream_source.html#af787b51dde9d77626f33860564eb08c3',1,'jsStreamSource::FilterSubject()'],['../structjs_consumer_config.html#af56ab7708b11e85e0b9115d152d281ca',1,'jsConsumerConfig::FilterSubject()']]],
+  ['firstseq_1',['FirstSeq',['../structjs_stream_state.html#a55bb6719163acef7fdb6d0bc3ae8d5da',1,'jsStreamState']]],
+  ['firsttime_2',['FirstTime',['../structjs_stream_state.html#afb7a708022faff518c060b33e99b04b0',1,'jsStreamState']]],
+  ['flowcontrol_3',['FlowControl',['../structjs_consumer_config.html#a484c64b6c54f6f758f54315470ed20d0',1,'jsConsumerConfig']]],
+  ['functions_4',['Functions',['../group__func_group.html',1,'']]]
+];
diff --git a/doc/html/search/all_7.html b/doc/html/search/all_7.html
new file mode 100644 (file)
index 0000000..d2b1825
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_7.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/all_7.js b/doc/html/search/all_7.js
new file mode 100644 (file)
index 0000000..657f082
--- /dev/null
@@ -0,0 +1,6 @@
+var searchData=
+[
+  ['headersonly_0',['HeadersOnly',['../structjs_re_publish.html#a16ebc4cdae4a407cf4e32aad212888db',1,'jsRePublish::HeadersOnly()'],['../structjs_consumer_config.html#a30d4142bac47ab6dc583c5ee193704e6',1,'jsConsumerConfig::HeadersOnly()']]],
+  ['heartbeat_1',['Heartbeat',['../structjs_consumer_config.html#ac439828c3bedb8826a1e92de13280d53',1,'jsConsumerConfig::Heartbeat()'],['../structjs_fetch_request.html#ae8e73c7cc2e2a2d2502407c9b1522496',1,'jsFetchRequest::Heartbeat()']]],
+  ['history_2',['History',['../structkv_config.html#a0ec6b3afbfdaa33436e2ae748e986e98',1,'kvConfig']]]
+];
diff --git a/doc/html/search/all_8.html b/doc/html/search/all_8.html
new file mode 100644 (file)
index 0000000..f4e3a2a
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_8.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/all_8.js b/doc/html/search/all_8.js
new file mode 100644 (file)
index 0000000..1f17c7d
--- /dev/null
@@ -0,0 +1,8 @@
+var searchData=
+[
+  ['ignoredeletes_0',['IgnoreDeletes',['../structkv_watch_options.html#a0535edd21b26affc0057575bafc21a07',1,'kvWatchOptions']]],
+  ['inactivethreshold_1',['InactiveThreshold',['../structjs_consumer_config.html#af6376a6009124c25d7016bc548f3855d',1,'jsConsumerConfig']]],
+  ['inboxes_2',['Inboxes',['../group__inbox_group.html',1,'']]],
+  ['includehistory_3',['IncludeHistory',['../structkv_watch_options.html#a08274f08ae96e14d9ded326e4e665649',1,'kvWatchOptions']]],
+  ['info_4',['Info',['../structjs_options_1_1js_options_stream.html#a2ca89c298b4df1f5e3e0a44e205c789c',1,'jsOptions::jsOptionsStream']]]
+];
diff --git a/doc/html/search/all_9.html b/doc/html/search/all_9.html
new file mode 100644 (file)
index 0000000..89177a8
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_9.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/all_9.js b/doc/html/search/all_9.js
new file mode 100644 (file)
index 0000000..2e69a89
--- /dev/null
@@ -0,0 +1,256 @@
+var searchData=
+[
+  ['jetstream_0',['JetStream',['../group__js_group.html',1,'']]],
+  ['jetstream_20assets_20management_1',['JetStream Assets Management',['../group__js_assets_group.html',1,'']]],
+  ['js_5fackall_2',['js_AckAll',['../group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873a1232af28bf4e4b82e962174f1432ed4a',1,'nats.h']]],
+  ['js_5fackexplicit_3',['js_AckExplicit',['../group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873a02d46a6395933c55c95ee5194bb6b80e',1,'nats.h']]],
+  ['js_5facknone_4',['js_AckNone',['../group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873afd91fe31cf57c68863ca3090b07c296c',1,'nats.h']]],
+  ['js_5faddconsumer_5',['js_AddConsumer',['../group__js_assets_group.html#gaf2efb63db150e782d9007090b49d4115',1,'nats.h']]],
+  ['js_5faddstream_6',['js_AddStream',['../group__js_assets_group.html#ga5efc5136d33ba52161e6732f88f1ee75',1,'nats.h']]],
+  ['js_5fconsumernames_7',['js_ConsumerNames',['../group__js_assets_group.html#ga690d19af55d12b82c8523d1861cef8d0',1,'nats.h']]],
+  ['js_5fconsumers_8',['js_Consumers',['../group__js_assets_group.html#gaf28097ede3e9ba9926fb00856e63ffd9',1,'nats.h']]],
+  ['js_5fcreatekeyvalue_9',['js_CreateKeyValue',['../group__kv_group_mgt.html#gabc445bfe87112e56a6c73872fec6893e',1,'nats.h']]],
+  ['js_5fdeleteconsumer_10',['js_DeleteConsumer',['../group__js_assets_group.html#ga52fbc61759b11494db91f348a733c490',1,'nats.h']]],
+  ['js_5fdeletekeyvalue_11',['js_DeleteKeyValue',['../group__kv_group_mgt.html#ga6bc715319560bc28359679fcdcead937',1,'nats.h']]],
+  ['js_5fdeletemsg_12',['js_DeleteMsg',['../group__js_assets_group.html#gaeba5d45abbe811c0e40830c5f26c78fd',1,'nats.h']]],
+  ['js_5fdeletestream_13',['js_DeleteStream',['../group__js_assets_group.html#ga397e55a0b3b6d36c9bf746eee3842172',1,'nats.h']]],
+  ['js_5fdeliverall_14',['js_DeliverAll',['../group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818ac692ba1363103768ac4bb58695549758',1,'nats.h']]],
+  ['js_5fdeliverbystartsequence_15',['js_DeliverByStartSequence',['../group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a06299d9c8262a16306ba6cc16d293c5e',1,'nats.h']]],
+  ['js_5fdeliverbystarttime_16',['js_DeliverByStartTime',['../group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a33317133d42f21bf5919827a691543f6',1,'nats.h']]],
+  ['js_5fdeliverlast_17',['js_DeliverLast',['../group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818abbd81d6c4e0f17f30e2186f1335e991d',1,'nats.h']]],
+  ['js_5fdeliverlastpersubject_18',['js_DeliverLastPerSubject',['../group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818abb50ebcd2fbafe27038c966121b9407b',1,'nats.h']]],
+  ['js_5fdelivernew_19',['js_DeliverNew',['../group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a82b8d36e17391212398984f92db9c381',1,'nats.h']]],
+  ['js_5fdirectgetmsg_20',['js_DirectGetMsg',['../group__js_assets_group.html#ga62c250cecc650b1eed0fa1691893e2ae',1,'nats.h']]],
+  ['js_5fdiscardnew_21',['js_DiscardNew',['../group__types_group.html#gga7f88b7d482488398074f9d1419a9b8c2a99d7f2d740af26c340c0a4e2b72fb6ab',1,'nats.h']]],
+  ['js_5fdiscardold_22',['js_DiscardOld',['../group__types_group.html#gga7f88b7d482488398074f9d1419a9b8c2abb31b828421634f1e6a1ef9359bc91f6',1,'nats.h']]],
+  ['js_5ferasemsg_23',['js_EraseMsg',['../group__js_assets_group.html#ga7158f73e183462e9a15e9802e1746ff0',1,'nats.h']]],
+  ['js_5ffilestorage_24',['js_FileStorage',['../group__types_group.html#gga1802a53c79e667f093bba033b16adc98a1d9dad1854cf374b22e3688b98284dec',1,'nats.h']]],
+  ['js_5fgetaccountinfo_25',['js_GetAccountInfo',['../group__js_assets_group.html#gac8965dcfc6b465fbc323aa552c606c46',1,'nats.h']]],
+  ['js_5fgetconsumerinfo_26',['js_GetConsumerInfo',['../group__js_assets_group.html#ga2dda04757b4ab27a794b64f8d727fe23',1,'nats.h']]],
+  ['js_5fgetlastmsg_27',['js_GetLastMsg',['../group__js_assets_group.html#ga6835b53da27d5721eddb3698e582cf0c',1,'nats.h']]],
+  ['js_5fgetmsg_28',['js_GetMsg',['../group__js_assets_group.html#ga9fe289ae172f83e53ca1b1b747744c1f',1,'nats.h']]],
+  ['js_5fgetstreaminfo_29',['js_GetStreamInfo',['../group__js_assets_group.html#ga94cb23a35516b7779de28fcbb263180a',1,'nats.h']]],
+  ['js_5finterestpolicy_30',['js_InterestPolicy',['../group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6dae874de4a787cfbec4c6d0eb1a3f05ebd',1,'nats.h']]],
+  ['js_5fkeyvalue_31',['js_KeyValue',['../group__kv_group_mgt.html#ga54e6c109a7c633e431b3eded286e00f6',1,'nats.h']]],
+  ['js_5flimitspolicy_32',['js_LimitsPolicy',['../group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6da6a2aa02f32acec6526d81f6e974e690f',1,'nats.h']]],
+  ['js_5fmemorystorage_33',['js_MemoryStorage',['../group__types_group.html#gga1802a53c79e667f093bba033b16adc98a428ed10448726ad01c1db77a7f748314',1,'nats.h']]],
+  ['js_5fpublish_34',['js_Publish',['../group__js_pub_group.html#gac6ba005531c82d9f0efa88dd6b458477',1,'nats.h']]],
+  ['js_5fpublishasync_35',['js_PublishAsync',['../group__js_pub_group.html#ga069dfd6f0f3d96f1ff8bf2372e59900c',1,'nats.h']]],
+  ['js_5fpublishasynccomplete_36',['js_PublishAsyncComplete',['../group__js_pub_group.html#ga24813ee9a58f00c0f21d10ab9c93b81d',1,'nats.h']]],
+  ['js_5fpublishasyncgetpendinglist_37',['js_PublishAsyncGetPendingList',['../group__js_pub_group.html#ga2ac95a3450f77f8074fae3f2fbe7e54c',1,'nats.h']]],
+  ['js_5fpublishmsg_38',['js_PublishMsg',['../group__js_pub_group.html#ga2aceeb82fac3621aea843dd246732bdd',1,'nats.h']]],
+  ['js_5fpublishmsgasync_39',['js_PublishMsgAsync',['../group__js_pub_group.html#gab7e4139a48c5ee4d2155cbb43142e873',1,'nats.h']]],
+  ['js_5fpullsubscribe_40',['js_PullSubscribe',['../group__js_sub_group.html#gaaeaddb73857aa4eb4901eec945ed27cd',1,'nats.h']]],
+  ['js_5fpurgestream_41',['js_PurgeStream',['../group__js_assets_group.html#ga5a6a886c18a79caa403908bf7f7ef125',1,'nats.h']]],
+  ['js_5freplayinstant_42',['js_ReplayInstant',['../group__types_group.html#gga8650faf52b0b6b23df376eebeb9d0354a2c4a1e2b75f31dd69a89b541d75afa44',1,'nats.h']]],
+  ['js_5freplayoriginal_43',['js_ReplayOriginal',['../group__types_group.html#gga8650faf52b0b6b23df376eebeb9d0354a6ee3851dac5c90a61492193dd55931f5',1,'nats.h']]],
+  ['js_5fstreamnames_44',['js_StreamNames',['../group__js_assets_group.html#gac3dfc87863dbbb3c959ecde4bce905bc',1,'nats.h']]],
+  ['js_5fstreams_45',['js_Streams',['../group__js_assets_group.html#ga531d91de372f0dffb8d64abecf88b0c0',1,'nats.h']]],
+  ['js_5fsubscribe_46',['js_Subscribe',['../group__js_sub_group.html#gaa686c6efd84ef963de1925108e896515',1,'nats.h']]],
+  ['js_5fsubscribesync_47',['js_SubscribeSync',['../group__js_sub_group.html#gabacb010031e535f9fb6e2167337e8adf',1,'nats.h']]],
+  ['js_5fupdateconsumer_48',['js_UpdateConsumer',['../group__js_assets_group.html#gad13ec256e24710bb237995814871e554',1,'nats.h']]],
+  ['js_5fupdatestream_49',['js_UpdateStream',['../group__js_assets_group.html#ga75a5c44304e24481c67e17fbccc15c31',1,'nats.h']]],
+  ['js_5fworkqueuepolicy_50',['js_WorkQueuePolicy',['../group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6daf7e6581e69572691b01d1294a3c3a478',1,'nats.h']]],
+  ['jsaccountinfo_51',['jsAccountInfo',['../structjs_account_info.html',1,'jsAccountInfo'],['../group__types_group.html#ga57cdc53b29a4fedb5a4140b6e64a4fab',1,'jsAccountInfo():&#160;nats.h']]],
+  ['jsaccountinfo_5fdestroy_52',['jsAccountInfo_Destroy',['../group__js_assets_group.html#ga7c8664b38fcce8497746367d35e5f60b',1,'nats.h']]],
+  ['jsaccountlimits_53',['jsAccountLimits',['../structjs_account_limits.html',1,'jsAccountLimits'],['../group__types_group.html#gaa889f706cce285adb9cea8aba0b76866',1,'jsAccountLimits():&#160;nats.h']]],
+  ['jsaccountresourcesexceedederr_54',['JSAccountResourcesExceededErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a26a33a6e2296eb0ac0370176fb08ed9a',1,'status.h']]],
+  ['jsackpolicy_55',['jsAckPolicy',['../group__types_group.html#ga8fcb50e6e7312834791f9e237d28e873',1,'nats.h']]],
+  ['jsapistats_56',['jsAPIStats',['../structjs_a_p_i_stats.html',1,'jsAPIStats'],['../group__types_group.html#gad057a0107367ce5727975f3daf63ff75',1,'jsAPIStats():&#160;nats.h']]],
+  ['jsbadrequesterr_57',['JSBadRequestErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70acedca75c7ec69c5573da7013f69ede13',1,'status.h']]],
+  ['jsclusterincompleteerr_58',['JSClusterIncompleteErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aea64a5a017836108cf3da113ad57b6f9',1,'status.h']]],
+  ['jsclusterinfo_59',['jsClusterInfo',['../structjs_cluster_info.html',1,'jsClusterInfo'],['../group__types_group.html#gaaf92318ce94a1ae3547c9a7af5a3f4f6',1,'jsClusterInfo():&#160;nats.h']]],
+  ['jsclusternopeerserr_60',['JSClusterNoPeersErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae9b8b81043fea45985f8c29f108594fb',1,'status.h']]],
+  ['jsclusternotactiveerr_61',['JSClusterNotActiveErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af1efbfa8ad648bf47b4304ea58b0df8c',1,'status.h']]],
+  ['jsclusternotassignederr_62',['JSClusterNotAssignedErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a99265bcfa283741c3711337dac6718f0',1,'status.h']]],
+  ['jsclusternotavailerr_63',['JSClusterNotAvailErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4ae7ffdfb53fb238a76ebe19c7482696',1,'status.h']]],
+  ['jsclusternotleadererr_64',['JSClusterNotLeaderErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a32546264d1f24fc9dafe490212bfd893',1,'status.h']]],
+  ['jsclusterpeernotmembererr_65',['JSClusterPeerNotMemberErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae7479c265d0e8cace4ab19a59cfcbbbb',1,'status.h']]],
+  ['jsclusterrequirederr_66',['JSClusterRequiredErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a46321fc22a103908324b72259832af60',1,'status.h']]],
+  ['jsclusterservernotmembererr_67',['JSClusterServerNotMemberErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aafa71c9cafc975d1a69889f6bf166e93',1,'status.h']]],
+  ['jsclustertagserr_68',['JSClusterTagsErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a66240027007033c67fec04f4298311c4',1,'status.h']]],
+  ['jsclusterunsupportfeatureerr_69',['JSClusterUnSupportFeatureErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a84864e4bba24ee7354e5bae293c93d00',1,'status.h']]],
+  ['jsconsumerbaddurablenameerr_70',['JSConsumerBadDurableNameErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa0ca5a2e539cec9d33f433f28f2780fe',1,'status.h']]],
+  ['jsconsumerconfig_71',['jsConsumerConfig',['../group__types_group.html#ga0483b2197c0ddd9082b48c2dd3fe7cee',1,'jsConsumerConfig():&#160;nats.h'],['../structjs_consumer_config.html',1,'jsConsumerConfig']]],
+  ['jsconsumerconfig_5finit_72',['jsConsumerConfig_Init',['../group__js_assets_group.html#ga3381bb05c05bf4a8979adde68d37dd66',1,'nats.h']]],
+  ['jsconsumerconfigrequirederr_73',['JSConsumerConfigRequiredErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4a95591dfc0e2ccb1d3ac1b3a04f618f',1,'status.h']]],
+  ['jsconsumercreateerr_74',['JSConsumerCreateErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af86c9c188aaa34a76eee96de9bf6e989',1,'status.h']]],
+  ['jsconsumerdelivercycleerr_75',['JSConsumerDeliverCycleErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70afc70c6a72061d9c26017a5cf5dec729b',1,'status.h']]],
+  ['jsconsumerdelivertowildcardserr_76',['JSConsumerDeliverToWildcardsErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4712c1322585d712cef9b67cd03a3e00',1,'status.h']]],
+  ['jsconsumerdescriptiontoolongerr_77',['JSConsumerDescriptionTooLongErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab1b6c048b0326e3f705b470e5a7f11f5',1,'status.h']]],
+  ['jsconsumerdirectrequiresephemeralerr_78',['JSConsumerDirectRequiresEphemeralErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6181f797cb27c92473585893b92b95b0',1,'status.h']]],
+  ['jsconsumerdirectrequirespusherr_79',['JSConsumerDirectRequiresPushErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a968eff1142ca2f39f3da3da175aeda92',1,'status.h']]],
+  ['jsconsumerdurablenamenotinsubjecterr_80',['JSConsumerDurableNameNotInSubjectErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aff9a4fe19078ac3e814989442beaa3a6',1,'status.h']]],
+  ['jsconsumerdurablenamenotmatchsubjecterr_81',['JSConsumerDurableNameNotMatchSubjectErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a17c212f9409e4bd9db060bd2796905e4',1,'status.h']]],
+  ['jsconsumerdurablenamenotseterr_82',['JSConsumerDurableNameNotSetErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9d9319d172e0a8147949bf40f1b29f28',1,'status.h']]],
+  ['jsconsumerephemeralwithdurableinsubjecterr_83',['JSConsumerEphemeralWithDurableInSubjectErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4ef7a2042b48d5e0916e7e90fe691ab3',1,'status.h']]],
+  ['jsconsumerephemeralwithdurablenameerr_84',['JSConsumerEphemeralWithDurableNameErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1381bb653998c6ca8b88002d0fe0c829',1,'status.h']]],
+  ['jsconsumerexistingactiveerr_85',['JSConsumerExistingActiveErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a86407070c2bbe04d97a25f2ceda4ea58',1,'status.h']]],
+  ['jsconsumerfcrequirespusherr_86',['JSConsumerFCRequiresPushErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a557d48b0334c5ceec0f0ee7cc74d8e79',1,'status.h']]],
+  ['jsconsumerfilternotsubseterr_87',['JSConsumerFilterNotSubsetErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a0f2007fc94103909ece328bbd77b0cdb',1,'status.h']]],
+  ['jsconsumerhbrequirespusherr_88',['JSConsumerHBRequiresPushErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6d4bed940055aa46a188a2419a531c63',1,'status.h']]],
+  ['jsconsumerinfo_89',['jsConsumerInfo',['../structjs_consumer_info.html',1,'jsConsumerInfo'],['../group__types_group.html#ga2f21bb79884e56a5613d7fe76b11b1e5',1,'jsConsumerInfo():&#160;nats.h']]],
+  ['jsconsumerinfo_5fdestroy_90',['jsConsumerInfo_Destroy',['../group__js_assets_group.html#ga9c1d5ed2f24ba836c10e415231f80088',1,'nats.h']]],
+  ['jsconsumerinfolist_91',['jsConsumerInfoList',['../group__types_group.html#gadad3bf72baae970662248d82d9b05d0a',1,'jsConsumerInfoList():&#160;nats.h'],['../structjs_consumer_info_list.html',1,'jsConsumerInfoList']]],
+  ['jsconsumerinfolist_5fdestroy_92',['jsConsumerInfoList_Destroy',['../group__js_assets_group.html#ga421de40d8e91658353111c3f2ea90ec8',1,'nats.h']]],
+  ['jsconsumerinvaliddeliversubjecterr_93',['JSConsumerInvalidDeliverSubjectErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa1242d9e6509f08c01c3373d0e66dc96',1,'status.h']]],
+  ['jsconsumerinvalidpolicyerr_94',['JSConsumerInvalidPolicyErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a801182af5b4a6b9547d81ec45864b1f3',1,'status.h']]],
+  ['jsconsumerinvalidsamplingerr_95',['JSConsumerInvalidSamplingErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab19f95018dff644423d6f34b682d365e',1,'status.h']]],
+  ['jsconsumermaxdeliverbackofferr_96',['JSConsumerMaxDeliverBackoffErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af7c1cf2c692140c4b28ebfc47acb0c41',1,'status.h']]],
+  ['jsconsumermaxpendingackexcesserr_97',['JSConsumerMaxPendingAckExcessErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ac4afe1d580083bd55c36b3e55a5ef479',1,'status.h']]],
+  ['jsconsumermaxpendingackpolicyrequirederr_98',['JSConsumerMaxPendingAckPolicyRequiredErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a429a21189134500589ed67ac3701aff4',1,'status.h']]],
+  ['jsconsumermaxrequestbatchexceedederr_99',['JSConsumerMaxRequestBatchExceededErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a597c98a0637cec454b724b049098cee8',1,'status.h']]],
+  ['jsconsumermaxrequestbatchnegativeerr_100',['JSConsumerMaxRequestBatchNegativeErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abca8571110c4244d218c2dc1779d8786',1,'status.h']]],
+  ['jsconsumermaxrequestexpirestosmallerr_101',['JSConsumerMaxRequestExpiresToSmallErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9c1c31813a713fcee44ec06728cc6382',1,'status.h']]],
+  ['jsconsumermaxwaitingnegativeerr_102',['JSConsumerMaxWaitingNegativeErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a27579bca64e6f40f9590ef51ac03a219',1,'status.h']]],
+  ['jsconsumernameexisterr_103',['JSConsumerNameExistErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4f59c55a24136405b6767e0bf21182c8',1,'status.h']]],
+  ['jsconsumernameslist_104',['jsConsumerNamesList',['../structjs_consumer_names_list.html',1,'jsConsumerNamesList'],['../group__types_group.html#gad00ab4381eec504ada3272aa9ff8adb2',1,'jsConsumerNamesList():&#160;nats.h']]],
+  ['jsconsumernameslist_5fdestroy_105',['jsConsumerNamesList_Destroy',['../group__js_assets_group.html#ga2ced0d190131460bf4608ab893dffc50',1,'nats.h']]],
+  ['jsconsumernametoolongerr_106',['JSConsumerNameTooLongErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3b1ce6536b249952dc3fb6fe5448140f',1,'status.h']]],
+  ['jsconsumernotfounderr_107',['JSConsumerNotFoundErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9eef13e3281a879f36a30e246fb6021b',1,'status.h']]],
+  ['jsconsumerofflineerr_108',['JSConsumerOfflineErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa0eb191886a17e917f2fa0eaa81d4b61',1,'status.h']]],
+  ['jsconsumeronmappederr_109',['JSConsumerOnMappedErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6b6aaaa23b1af2caf959529287b2a847',1,'status.h']]],
+  ['jsconsumerpullnotdurableerr_110',['JSConsumerPullNotDurableErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a407efbf6c688cb93fcded08acd2a08ed',1,'status.h']]],
+  ['jsconsumerpullrequiresackerr_111',['JSConsumerPullRequiresAckErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abd3f17c5d6ea86c38c3d8ade18b8445a',1,'status.h']]],
+  ['jsconsumerpullwithratelimiterr_112',['JSConsumerPullWithRateLimitErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2a8844e5d20c55d753ec64bbde4561c8',1,'status.h']]],
+  ['jsconsumerpushmaxwaitingerr_113',['JSConsumerPushMaxWaitingErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a914926025dffa9c9b9604646b9e5675e',1,'status.h']]],
+  ['jsconsumerreplacementwithdifferentnameerr_114',['JSConsumerReplacementWithDifferentNameErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a051bfd5e3bb9ba2b2398e6501426bc63',1,'status.h']]],
+  ['jsconsumerreplicasexceedsstreamerr_115',['JSConsumerReplicasExceedsStreamErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1d159f128cd9b261b5270f7e36ed22d1',1,'status.h']]],
+  ['jsconsumersequencemismatch_116',['jsConsumerSequenceMismatch',['../structjs_consumer_sequence_mismatch.html',1,'jsConsumerSequenceMismatch'],['../group__types_group.html#gace471cd2cef1df797b2a1c6b485049bd',1,'jsConsumerSequenceMismatch():&#160;nats.h']]],
+  ['jsconsumersmallheartbeaterr_117',['JSConsumerSmallHeartbeatErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9422b53061166a064e39d360d21827fd',1,'status.h']]],
+  ['jsconsumerstorefailederr_118',['JSConsumerStoreFailedErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2984e6b8850b6cfed9506a25bcbe0608',1,'status.h']]],
+  ['jsconsumerwithflowcontrolneedsheartbeatserr_119',['JSConsumerWithFlowControlNeedsHeartbeatsErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abc25cc794fce2ab7b9757ff506de51c3',1,'status.h']]],
+  ['jsconsumerwqconsumernotdeliverallerr_120',['JSConsumerWQConsumerNotDeliverAllErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a00b4ce854e473bb8f49d91c0f982c6f9',1,'status.h']]],
+  ['jsconsumerwqconsumernotuniqueerr_121',['JSConsumerWQConsumerNotUniqueErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a5f7b670b9202311da41e6e5026e810d2',1,'status.h']]],
+  ['jsconsumerwqmultipleunfilterederr_122',['JSConsumerWQMultipleUnfilteredErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7adbc8c115996a6f0dfc98fcaac8f09d',1,'status.h']]],
+  ['jsconsumerwqrequiresexplicitackerr_123',['JSConsumerWQRequiresExplicitAckErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a76dad06168a8d57e829876c2fcd3af56',1,'status.h']]],
+  ['jsctx_124',['jsCtx',['../group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1',1,'nats.h']]],
+  ['jsctx_5fdestroy_125',['jsCtx_Destroy',['../group__js_group.html#gacfa6ce3e60ea540e3331a09a7f3dc856',1,'nats.h']]],
+  ['jsdeliverpolicy_126',['jsDeliverPolicy',['../group__types_group.html#ga117ed2c35f89ef3144540ed9cbadc818',1,'nats.h']]],
+  ['jsdirectgetmsgoptions_127',['jsDirectGetMsgOptions',['../structjs_direct_get_msg_options.html',1,'jsDirectGetMsgOptions'],['../group__types_group.html#ga85123afa00d522a249a5b2a8abd7e063',1,'jsDirectGetMsgOptions():&#160;nats.h']]],
+  ['jsdirectgetmsgoptions_5finit_128',['jsDirectGetMsgOptions_Init',['../group__js_assets_group.html#ga8d835d47aed9c84ce3b8dcfea469f4cb',1,'nats.h']]],
+  ['jsdiscardpolicy_129',['jsDiscardPolicy',['../group__types_group.html#ga7f88b7d482488398074f9d1419a9b8c2',1,'nats.h']]],
+  ['jserrcode_130',['jsErrCode',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70',1,'status.h']]],
+  ['jsexternalstream_131',['jsExternalStream',['../structjs_external_stream.html',1,'jsExternalStream'],['../group__types_group.html#gaef6601477f6456bebc229f7f38982a6c',1,'jsExternalStream():&#160;nats.h']]],
+  ['jsexternalstream_5finit_132',['jsExternalStream_Init',['../group__js_assets_group.html#ga81aebebcd79922104720da51e95020d4',1,'nats.h']]],
+  ['jsfetchrequest_133',['jsFetchRequest',['../group__types_group.html#gaf11e6664c1f335a5287af71c703935fa',1,'jsFetchRequest():&#160;nats.h'],['../structjs_fetch_request.html',1,'jsFetchRequest']]],
+  ['jsfetchrequest_5finit_134',['jsFetchRequest_Init',['../group__js_sub_group.html#ga1c3a62de8cd4855ae61ea4f67417a43b',1,'nats.h']]],
+  ['jsinsufficientresourceserr_135',['JSInsufficientResourcesErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ad1ec102705e46b5343c2680162f58f49',1,'status.h']]],
+  ['jsinvalidjsonerr_136',['JSInvalidJSONErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a50c0beab390506fc6d3495325c0230c1',1,'status.h']]],
+  ['jslastsequence_137',['JSLastSequence',['../nats_8h.html#ae18fb15ea8130a650e904e5153eb30d5',1,'nats.h']]],
+  ['jsloststreamdata_138',['jsLostStreamData',['../structjs_lost_stream_data.html',1,'jsLostStreamData'],['../group__types_group.html#gaf80828510450faf84bbf456e94f5b784',1,'jsLostStreamData():&#160;nats.h']]],
+  ['jsmaximumconsumerslimiterr_139',['JSMaximumConsumersLimitErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa1b904de1494d20f540c8075f502af24',1,'status.h']]],
+  ['jsmaximumstreamslimiterr_140',['JSMaximumStreamsLimitErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a739799359c3988ea18fe861eaff6f1f5',1,'status.h']]],
+  ['jsmemoryresourcesexceedederr_141',['JSMemoryResourcesExceededErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae3ac6ea1656f4fcc750ba2ab1649fb57',1,'status.h']]],
+  ['jsmirrorconsumersetupfailederr_142',['JSMirrorConsumerSetupFailedErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a94a9b10d712ed764de27a007ac7f04eb',1,'status.h']]],
+  ['jsmirrormaxmessagesizetoobigerr_143',['JSMirrorMaxMessageSizeTooBigErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a91020cf9692a06637bdfedd847b259f1',1,'status.h']]],
+  ['jsmirrorwithsourceserr_144',['JSMirrorWithSourcesErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aaad93c7c34cd3283df7369479d4cdb7c',1,'status.h']]],
+  ['jsmirrorwithstartseqandtimeerr_145',['JSMirrorWithStartSeqAndTimeErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a600ddc1915d8bb928fd37f1539440eb3',1,'status.h']]],
+  ['jsmirrorwithsubjectfilterserr_146',['JSMirrorWithSubjectFiltersErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70afcfb372eb2a607f821ad110815acf9d7',1,'status.h']]],
+  ['jsmirrorwithsubjectserr_147',['JSMirrorWithSubjectsErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a0dc0fcc88a8b39f03924d50ccf731043',1,'status.h']]],
+  ['jsmsgmetadata_148',['jsMsgMetaData',['../group__types_group.html#gace9595b1a5ce3f7a13670367fd293b4a',1,'jsMsgMetaData():&#160;nats.h'],['../structjs_msg_meta_data.html',1,'jsMsgMetaData']]],
+  ['jsmsgmetadata_5fdestroy_149',['jsMsgMetaData_Destroy',['../group__js_msg.html#gaf9bf92294342bcb27053de7038606d12',1,'nats.h']]],
+  ['jsmsgrollup_150',['JSMsgRollup',['../nats_8h.html#a3938efee417dc67ff2bcf62f913f9054',1,'nats.h']]],
+  ['jsmsgrollupall_151',['JSMsgRollupAll',['../nats_8h.html#acc62d11b7e67fe3feb74acdfa4a6e8ac',1,'nats.h']]],
+  ['jsmsgrollupsubject_152',['JSMsgRollupSubject',['../nats_8h.html#ad22dce8f66bae9b3e1027790d9c95c09',1,'nats.h']]],
+  ['jsmsgsize_153',['JSMsgSize',['../nats_8h.html#a5ce9005964bd9cf0604a9ef1afa87ea4',1,'nats.h']]],
+  ['jsnoaccounterr_154',['JSNoAccountErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a91773a41522fe9a464a0fb28a96b497b',1,'status.h']]],
+  ['jsnolimitserr_155',['JSNoLimitsErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70acfa2c06f8baef07cd96a3627ddea641b',1,'status.h']]],
+  ['jsnomessagefounderr_156',['JSNoMessageFoundErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a02a521ae52b716a669a3556d63a21410',1,'status.h']]],
+  ['jsnotemptyrequesterr_157',['JSNotEmptyRequestErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab23b8553efea2ee0008098fcb109f690',1,'status.h']]],
+  ['jsnotenablederr_158',['JSNotEnabledErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70afe9c20cdb1e88744d9a5f52977e95d1c',1,'status.h']]],
+  ['jsnotenabledforaccounterr_159',['JSNotEnabledForAccountErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa88122abfaf173f0411a3642803aac04',1,'status.h']]],
+  ['jsoptions_160',['jsOptions',['../group__types_group.html#ga0e3a3b7cf89e7dfa955f0f8f3f1eb6e5',1,'jsOptions():&#160;nats.h'],['../structjs_options.html',1,'jsOptions']]],
+  ['jsoptions_5finit_161',['jsOptions_Init',['../group__js_group.html#ga855ff9a04888d696785cc5ede96112e4',1,'nats.h']]],
+  ['jsoptionspublishasync_162',['jsOptionsPublishAsync',['../structjs_options_1_1js_options_publish_async.html',1,'jsOptions']]],
+  ['jsoptionsstream_163',['jsOptionsStream',['../structjs_options_1_1js_options_stream.html',1,'jsOptions']]],
+  ['jsoptionsstreaminfo_164',['jsOptionsStreamInfo',['../structjs_options_1_1js_options_stream_1_1js_options_stream_info.html',1,'jsOptions::jsOptionsStream']]],
+  ['jsoptionsstreampurge_165',['jsOptionsStreamPurge',['../structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html',1,'jsOptions::jsOptionsStream']]],
+  ['jspeerinfo_166',['jsPeerInfo',['../structjs_peer_info.html',1,'jsPeerInfo'],['../group__types_group.html#ga1e938dab794089f9329d7b7ece8f3e9b',1,'jsPeerInfo():&#160;nats.h']]],
+  ['jspeerremaperr_167',['JSPeerRemapErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4d68fa855750f16fdf38c9ed93acacda',1,'status.h']]],
+  ['jsplacement_168',['jsPlacement',['../structjs_placement.html',1,'jsPlacement'],['../group__types_group.html#ga49d1138fac9da8b85d00a367081e91c9',1,'jsPlacement():&#160;nats.h']]],
+  ['jsplacement_5finit_169',['jsPlacement_Init',['../group__js_assets_group.html#ga223691e6831072a0b8f8103a778293b0',1,'nats.h']]],
+  ['jspuback_170',['jsPubAck',['../structjs_pub_ack.html',1,'jsPubAck'],['../group__types_group.html#gaf1d5e436c5d41c5b9b96d84e3d2bc86f',1,'jsPubAck():&#160;nats.h']]],
+  ['jspuback_5fdestroy_171',['jsPubAck_Destroy',['../group__js_pub_group.html#gaac130840b6db9109e72cf6ad9186dfc4',1,'nats.h']]],
+  ['jspubackerr_172',['jsPubAckErr',['../structjs_pub_ack_err.html',1,'jsPubAckErr'],['../group__types_group.html#gadb7c287bc86b92765fbe45a066b96f40',1,'jsPubAckErr():&#160;nats.h']]],
+  ['jspubackerrhandler_173',['jsPubAckErrHandler',['../group__callbacks_group.html#ga954768cc1d3388bb6ab723e777647992',1,'nats.h']]],
+  ['jspubackhandler_174',['jsPubAckHandler',['../group__callbacks_group.html#ga4f66e065bd918f02510d4c53d8a5b729',1,'nats.h']]],
+  ['jspuboptions_175',['jsPubOptions',['../group__types_group.html#ga7bbea3575d35dcdbfc9b766b04269eb7',1,'jsPubOptions():&#160;nats.h'],['../structjs_pub_options.html',1,'jsPubOptions']]],
+  ['jspuboptions_5finit_176',['jsPubOptions_Init',['../group__js_pub_group.html#gaf09f333a8675a8060c5ede07a6bdeef9',1,'nats.h']]],
+  ['jsraftgeneralerr_177',['JSRaftGeneralErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa023de74e8bedf88c2f5e4b21e62ea4b',1,'status.h']]],
+  ['jsreplaypolicy_178',['jsReplayPolicy',['../group__types_group.html#ga8650faf52b0b6b23df376eebeb9d0354',1,'nats.h']]],
+  ['jsrepublish_179',['jsRePublish',['../group__types_group.html#gab991313d33ce270a882e4d0756c138f6',1,'jsRePublish():&#160;nats.h'],['../structjs_re_publish.html',1,'jsRePublish']]],
+  ['jsrepublish_5finit_180',['jsRePublish_Init',['../group__js_assets_group.html#ga388bfeaa5a78ebf6ce7c15c6e3a7156b',1,'nats.h']]],
+  ['jsrestoresubscribefailederr_181',['JSRestoreSubscribeFailedErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4963c5ecd065d3e336daf80a7cd1aa57',1,'status.h']]],
+  ['jsretentionpolicy_182',['jsRetentionPolicy',['../group__types_group.html#ga410f8fb053efa02b2ca1de0c02fa4b6d',1,'nats.h']]],
+  ['jssequence_183',['JSSequence',['../nats_8h.html#a1c0a11996b44abc16a4f444ee4c1cb94',1,'nats.h']]],
+  ['jssequenceinfo_184',['jsSequenceInfo',['../group__types_group.html#ga27e1a5d5b513f9eb7d61a17db71f8003',1,'jsSequenceInfo():&#160;nats.h'],['../structjs_sequence_info.html',1,'jsSequenceInfo']]],
+  ['jssequencenotfounderr_185',['JSSequenceNotFoundErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1eaa16332bbe6cb041adbb60383f944c',1,'status.h']]],
+  ['jssequencepair_186',['jsSequencePair',['../structjs_sequence_pair.html',1,'jsSequencePair'],['../group__types_group.html#ga39011d30b295759b7f6ca0a7539dff8f',1,'jsSequencePair():&#160;nats.h']]],
+  ['jssnapshotdeliversubjectinvaliderr_187',['JSSnapshotDeliverSubjectInvalidErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae4eaa258a64f5c12d7fe50ce4c9c6de5',1,'status.h']]],
+  ['jssourceconsumersetupfailederr_188',['JSSourceConsumerSetupFailedErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aeaeb1f487667a8d7643cc97bf7b3892a',1,'status.h']]],
+  ['jssourcemaxmessagesizetoobigerr_189',['JSSourceMaxMessageSizeTooBigErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ac75e39643f73b184b22330939c4a564e',1,'status.h']]],
+  ['jsstorageresourcesexceedederr_190',['JSStorageResourcesExceededErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2f4ee662c9cbaa0355c52de1c2463160',1,'status.h']]],
+  ['jsstoragetype_191',['jsStorageType',['../group__types_group.html#ga1802a53c79e667f093bba033b16adc98',1,'nats.h']]],
+  ['jsstream_192',['JSStream',['../nats_8h.html#aa2f2c14de864839a2ff7ea34415d37e0',1,'nats.h']]],
+  ['jsstreamassignmenterr_193',['JSStreamAssignmentErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2107facbac830a905217916c7d24297a',1,'status.h']]],
+  ['jsstreamconfig_194',['jsStreamConfig',['../structjs_stream_config.html',1,'jsStreamConfig'],['../group__types_group.html#ga26fd6a73df327ca3c271e46ddefc8acf',1,'jsStreamConfig():&#160;nats.h']]],
+  ['jsstreamconfig_5finit_195',['jsStreamConfig_Init',['../group__js_assets_group.html#gac230f71dbdc4d10bc7471d01763881d6',1,'nats.h']]],
+  ['jsstreamcreateerr_196',['JSStreamCreateErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a866a56223b3e4119184cee9523f98008',1,'status.h']]],
+  ['jsstreamdeleteerr_197',['JSStreamDeleteErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a85f7eee9cccd626e7b99d46c6f076322',1,'status.h']]],
+  ['jsstreamexternalapioverlaperr_198',['JSStreamExternalApiOverlapErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3799b98b675eeca3403a1728bd0cd5f8',1,'status.h']]],
+  ['jsstreamexternaldelprefixoverlapserr_199',['JSStreamExternalDelPrefixOverlapsErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aea055a7802194f8f1e802a8fc461f83a',1,'status.h']]],
+  ['jsstreamgeneralerror_200',['JSStreamGeneralError',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abc4bf9a7703ef8d3fbf2b1ad2ece3717',1,'status.h']]],
+  ['jsstreaminfo_201',['jsStreamInfo',['../group__types_group.html#ga2629c9454996edf7914be36a9e44921b',1,'jsStreamInfo():&#160;nats.h'],['../structjs_stream_info.html',1,'jsStreamInfo']]],
+  ['jsstreaminfo_5fdestroy_202',['jsStreamInfo_Destroy',['../group__js_assets_group.html#ga8ee87ef86e94be42685941abe9638bbd',1,'nats.h']]],
+  ['jsstreaminfolist_203',['jsStreamInfoList',['../group__types_group.html#ga1e54c2a1bc94834d1670875fc151f565',1,'jsStreamInfoList():&#160;nats.h'],['../structjs_stream_info_list.html',1,'jsStreamInfoList']]],
+  ['jsstreaminfolist_5fdestroy_204',['jsStreamInfoList_Destroy',['../group__js_assets_group.html#ga38cdcc339eb8976d23296b99aa37d629',1,'nats.h']]],
+  ['jsstreaminfomaxsubjectserr_205',['JSStreamInfoMaxSubjectsErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7b5cebb5aaebd7b3bfa43f5457e97553',1,'status.h']]],
+  ['jsstreaminvalidconfig_206',['JSStreamInvalidConfig',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a0c34c56b62e4246560efabd5c762aa03',1,'status.h']]],
+  ['jsstreaminvaliderr_207',['JSStreamInvalidErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af0506e3abc3846721ae15755c2a1eb47',1,'status.h']]],
+  ['jsstreaminvalidexternaldeliverysubjerr_208',['JSStreamInvalidExternalDeliverySubjErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7a89433d532a863561087229b19a525f',1,'status.h']]],
+  ['jsstreamlimitserr_209',['JSStreamLimitsErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4f192c39f1d7244ceb639053fad86393',1,'status.h']]],
+  ['jsstreammaxbytesrequirederr_210',['JSStreamMaxBytesRequiredErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a61cd7aa9b9e02f410465a61a085fa209',1,'status.h']]],
+  ['jsstreammaxstreambytesexceedederr_211',['JSStreamMaxStreamBytesExceededErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a60fd558fc8d0f31b895c7b579ba0c8b7',1,'status.h']]],
+  ['jsstreammessageexceedsmaximumerr_212',['JSStreamMessageExceedsMaximumErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a519d32e9718662347753ebffaf731889',1,'status.h']]],
+  ['jsstreammirrornotupdatableerr_213',['JSStreamMirrorNotUpdatableErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a54084c4f82593cf516cd604b34c0dce8',1,'status.h']]],
+  ['jsstreammismatcherr_214',['JSStreamMismatchErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a80d0a9f218207a11b4cc19b9c2aec83f',1,'status.h']]],
+  ['jsstreammoveandscaleerr_215',['JSStreamMoveAndScaleErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a584d0bf058191cf2257d934f0bc5935c',1,'status.h']]],
+  ['jsstreammoveinprogresserr_216',['JSStreamMoveInProgressErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abf7739c7a0569149ed24ae8b9fbaf889',1,'status.h']]],
+  ['jsstreammsgdeletefailed_217',['JSStreamMsgDeleteFailed',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab379e2a2038276dc1eb539bda2e60b68',1,'status.h']]],
+  ['jsstreamnameexisterr_218',['JSStreamNameExistErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af68cc43ff7ed51f5557329c35fba949c',1,'status.h']]],
+  ['jsstreamnameslist_219',['jsStreamNamesList',['../structjs_stream_names_list.html',1,'jsStreamNamesList'],['../group__types_group.html#gaf4d31a4dc83b2805422beafb1f8fa000',1,'jsStreamNamesList():&#160;nats.h']]],
+  ['jsstreamnameslist_5fdestroy_220',['jsStreamNamesList_Destroy',['../group__js_assets_group.html#gaf8644f281d4e24893a6a170b4f7faa65',1,'nats.h']]],
+  ['jsstreamnotfounderr_221',['JSStreamNotFoundErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6a2a1cbd9c2e2dc6dff4fb84be741e0f',1,'status.h']]],
+  ['jsstreamnotmatcherr_222',['JSStreamNotMatchErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6b4c22a03ad4769d09599ac9a75e6435',1,'status.h']]],
+  ['jsstreamofflineerr_223',['JSStreamOfflineErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7c88e5ccabcb2debe1ce0c1a05bbe18b',1,'status.h']]],
+  ['jsstreampurgefailederr_224',['JSStreamPurgeFailedErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a33f2e301313339eded6163982a680186',1,'status.h']]],
+  ['jsstreamreplicasnotsupportederr_225',['JSStreamReplicasNotSupportedErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a8f7f888318e9107bb361d4946197c4c1',1,'status.h']]],
+  ['jsstreamreplicasnotupdatableerr_226',['JSStreamReplicasNotUpdatableErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a58db02b3e72f3b20300344f97c5c7b34',1,'status.h']]],
+  ['jsstreamrestoreerr_227',['JSStreamRestoreErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab5213fbb08e833e1c69b8c93c8114506',1,'status.h']]],
+  ['jsstreamrollupfailederr_228',['JSStreamRollupFailedErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70affa3c8139019a077fac6d403d7ed0522',1,'status.h']]],
+  ['jsstreamsealederr_229',['JSStreamSealedErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9bd3f4f7a2eca1f1ed49cc0499cb9c78',1,'status.h']]],
+  ['jsstreamsequencenotmatcherr_230',['JSStreamSequenceNotMatchErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a64dbcba923d50e6f258db59b85eb8b17',1,'status.h']]],
+  ['jsstreamsnapshoterr_231',['JSStreamSnapshotErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ac3d700ce84bc5df96c383079b093cc45',1,'status.h']]],
+  ['jsstreamsource_232',['jsStreamSource',['../structjs_stream_source.html',1,'jsStreamSource'],['../group__types_group.html#gab4c43c87d81917aab748a50eee028449',1,'jsStreamSource():&#160;nats.h']]],
+  ['jsstreamsource_5finit_233',['jsStreamSource_Init',['../group__js_assets_group.html#ga7fe8e0bf98a38eb59372e7cd78aaaf56',1,'nats.h']]],
+  ['jsstreamsourceinfo_234',['jsStreamSourceInfo',['../structjs_stream_source_info.html',1,'jsStreamSourceInfo'],['../group__types_group.html#gab2f33f57188a550f2f747d4f27bc24bd',1,'jsStreamSourceInfo():&#160;nats.h']]],
+  ['jsstreamstate_235',['jsStreamState',['../group__types_group.html#ga2bfd6de6ffc84d767482b3dd57cb9271',1,'jsStreamState():&#160;nats.h'],['../structjs_stream_state.html',1,'jsStreamState']]],
+  ['jsstreamstatesubject_236',['jsStreamStateSubject',['../structjs_stream_state_subject.html',1,'jsStreamStateSubject'],['../group__types_group.html#ga55dce2fa9ecd215716cc9ceece7dfefa',1,'jsStreamStateSubject():&#160;nats.h']]],
+  ['jsstreamstatesubjects_237',['jsStreamStateSubjects',['../group__types_group.html#gae8b57d9c40364f97a705f3e61a1156b0',1,'jsStreamStateSubjects():&#160;nats.h'],['../structjs_stream_state_subjects.html',1,'jsStreamStateSubjects']]],
+  ['jsstreamstorefailederr_238',['JSStreamStoreFailedErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab7df189a360a1d483f9eca4869abdca8',1,'status.h']]],
+  ['jsstreamsubjectoverlaperr_239',['JSStreamSubjectOverlapErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3e55a221685d96d96c514d6d5c652570',1,'status.h']]],
+  ['jsstreamtemplatecreateerr_240',['JSStreamTemplateCreateErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1efc26df606f855cfb9993cbe95c0f46',1,'status.h']]],
+  ['jsstreamtemplatedeleteerr_241',['JSStreamTemplateDeleteErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a514184778ad2fa5cf2deaffc0c406272',1,'status.h']]],
+  ['jsstreamtemplatenotfounderr_242',['JSStreamTemplateNotFoundErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3552ffc73e39c13d14ae35f52cd3ead7',1,'status.h']]],
+  ['jsstreamupdateerr_243',['JSStreamUpdateErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a475581c5dfbabb52334ce28013382b58',1,'status.h']]],
+  ['jsstreamwronglastmsgiderr_244',['JSStreamWrongLastMsgIDErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70adc58d142e277166a57672812df6f2c3e',1,'status.h']]],
+  ['jsstreamwronglastsequenceerr_245',['JSStreamWrongLastSequenceErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aaa5d8be08323568b5f7295feb10d73b4',1,'status.h']]],
+  ['jssubject_246',['JSSubject',['../nats_8h.html#a3776aa9985557f0c6e382b01d2e3f602',1,'nats.h']]],
+  ['jssuboptions_247',['jsSubOptions',['../group__types_group.html#gaccfaac2079656ffd40d003e4de5d2280',1,'jsSubOptions():&#160;nats.h'],['../structjs_sub_options.html',1,'jsSubOptions']]],
+  ['jssuboptions_5finit_248',['jsSubOptions_Init',['../group__js_sub_group.html#ga472adb949d1af9d8f07bda99f5d7f3f8',1,'nats.h']]],
+  ['jstemplatenamenotmatchsubjecterr_249',['JSTemplateNameNotMatchSubjectErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab9e493c8837af5f62c6110493c6a70ac',1,'status.h']]],
+  ['jstempstoragefailederr_250',['JSTempStorageFailedErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ad07006ca41165d13442df8e62ef3f398',1,'status.h']]],
+  ['jstier_251',['jsTier',['../structjs_tier.html',1,'jsTier'],['../group__types_group.html#ga1d48d3eb36b50c9ab6d8477dccf247d8',1,'jsTier():&#160;nats.h']]],
+  ['jstimestamp_252',['JSTimeStamp',['../nats_8h.html#a5525cb01f8b0aec73cb13f3276449e0e',1,'nats.h']]]
+];
diff --git a/doc/html/search/all_a.html b/doc/html/search/all_a.html
new file mode 100644 (file)
index 0000000..1f90b7a
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_a.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/all_a.js b/doc/html/search/all_a.js
new file mode 100644 (file)
index 0000000..7689956
--- /dev/null
@@ -0,0 +1,66 @@
+var searchData=
+[
+  ['keep_0',['Keep',['../structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#a882c1ce1e636817450893caa72aa4eda',1,'jsOptions::jsOptionsStream::jsOptionsStreamPurge']]],
+  ['keys_1',['Keys',['../structkv_keys_list.html#aa5cb40820a1a927375215e0a94ecfc18',1,'kvKeysList']]],
+  ['keyvalue_20store_2',['KeyValue store',['../group__kv_group.html',1,'']]],
+  ['keyvalue_20store_20entries_3',['KeyValue store entries',['../group__kv_entry.html',1,'']]],
+  ['keyvalue_20store_20management_4',['KeyValue store management',['../group__kv_group_mgt.html',1,'']]],
+  ['keyvalue_20store_20status_5',['KeyValue store status',['../group__kv_status.html',1,'']]],
+  ['keyvalue_20store_20watcher_6',['KeyValue store watcher',['../group__kv_watcher.html',1,'']]],
+  ['kvconfig_7',['kvConfig',['../group__types_group.html#ga6d594b091b4bb46192336413066a8edf',1,'kvConfig():&#160;nats.h'],['../structkv_config.html',1,'kvConfig']]],
+  ['kvconfig_5finit_8',['kvConfig_Init',['../group__kv_group_mgt.html#ga16d4c27d8ac62bb86ba601bc40f53172',1,'nats.h']]],
+  ['kventry_9',['kvEntry',['../group__types_group.html#gad489fb4074f27427560ca71797db6191',1,'nats.h']]],
+  ['kventry_5fbucket_10',['kvEntry_Bucket',['../group__kv_entry.html#gadedbb410cce499afb535eb6641c32ca7',1,'nats.h']]],
+  ['kventry_5fcreated_11',['kvEntry_Created',['../group__kv_entry.html#ga31ef3a2e3a7df6cf4dbb0a762737800a',1,'nats.h']]],
+  ['kventry_5fdelta_12',['kvEntry_Delta',['../group__kv_entry.html#ga233a2d75895cfd0140cf77757592cf47',1,'nats.h']]],
+  ['kventry_5fdestroy_13',['kvEntry_Destroy',['../group__kv_entry.html#ga8359ffcdeefb9c5821e6442d0d5ee388',1,'nats.h']]],
+  ['kventry_5fkey_14',['kvEntry_Key',['../group__kv_entry.html#gab455f32b0abfb1361dab4b5e7d98042a',1,'nats.h']]],
+  ['kventry_5foperation_15',['kvEntry_Operation',['../group__kv_entry.html#ga088fd67d3d384ad7a7ddfc82535becea',1,'nats.h']]],
+  ['kventry_5frevision_16',['kvEntry_Revision',['../group__kv_entry.html#ga2d58abf81cb577e21a76f9c77568409f',1,'nats.h']]],
+  ['kventry_5fvalue_17',['kvEntry_Value',['../group__kv_entry.html#ga28077f81d71a30cbce2dc81e5c9574fc',1,'nats.h']]],
+  ['kventry_5fvaluelen_18',['kvEntry_ValueLen',['../group__kv_entry.html#gaf7ccc866865903f231e0431754ed2415',1,'nats.h']]],
+  ['kventry_5fvaluestring_19',['kvEntry_ValueString',['../group__kv_entry.html#ga7ff6220915726600545357e31226fb65',1,'nats.h']]],
+  ['kventrylist_20',['kvEntryList',['../group__types_group.html#ga0125d394a3cbae2a1713eed8fab7f78e',1,'kvEntryList():&#160;nats.h'],['../structkv_entry_list.html',1,'kvEntryList']]],
+  ['kventrylist_5fdestroy_21',['kvEntryList_Destroy',['../group__kv_group.html#gae783352ab81e22aa3173057d117518e6',1,'nats.h']]],
+  ['kvkeyslist_22',['kvKeysList',['../group__types_group.html#gab36492d9d4370337cfed80edce4144e0',1,'kvKeysList():&#160;nats.h'],['../structkv_keys_list.html',1,'kvKeysList']]],
+  ['kvkeyslist_5fdestroy_23',['kvKeysList_Destroy',['../group__kv_group.html#ga02ccd58bc5062f6ce6f94bf05e3dfe45',1,'nats.h']]],
+  ['kvop_5fdelete_24',['kvOp_Delete',['../group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332a4efb91331f3307128c75af5b23362f83',1,'nats.h']]],
+  ['kvop_5fpurge_25',['kvOp_Purge',['../group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332aee19ab8144bf518e251ea2004309b657',1,'nats.h']]],
+  ['kvop_5fput_26',['kvOp_Put',['../group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332acc0e1da3c292cb7eb19d909c9dfd788a',1,'nats.h']]],
+  ['kvop_5funknown_27',['kvOp_Unknown',['../group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332a0b7a6bef67e4220f5f0c4075f2ed16b6',1,'nats.h']]],
+  ['kvoperation_28',['kvOperation',['../group__types_group.html#ga89db3bd6bf11af3ac5eb3ab560d16332',1,'nats.h']]],
+  ['kvpurgeoptions_29',['kvPurgeOptions',['../group__types_group.html#ga90e8de23c4468005488bde690a2ffe9d',1,'kvPurgeOptions():&#160;nats.h'],['../structkv_purge_options.html',1,'kvPurgeOptions']]],
+  ['kvpurgeoptions_5finit_30',['kvPurgeOptions_Init',['../group__kv_group.html#ga243113fd7df34ce104850ab888f04021',1,'nats.h']]],
+  ['kvstatus_31',['kvStatus',['../group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80',1,'nats.h']]],
+  ['kvstatus_5fbucket_32',['kvStatus_Bucket',['../group__kv_status.html#ga1acec36db32207f21e15afc26bb5af1c',1,'nats.h']]],
+  ['kvstatus_5fdestroy_33',['kvStatus_Destroy',['../group__kv_status.html#ga5eb3d824c1873af705beee4798246a08',1,'nats.h']]],
+  ['kvstatus_5fhistory_34',['kvStatus_History',['../group__kv_status.html#gada6f22b5659b184762cea4f45d369ee5',1,'nats.h']]],
+  ['kvstatus_5freplicas_35',['kvStatus_Replicas',['../group__kv_status.html#ga86b114f4dac9f06df86101f84bd497b2',1,'nats.h']]],
+  ['kvstatus_5fttl_36',['kvStatus_TTL',['../group__kv_status.html#gaa747ad0a6182ec7a47fb47018c33d1c1',1,'nats.h']]],
+  ['kvstatus_5fvalues_37',['kvStatus_Values',['../group__kv_status.html#ga2016af3c73841d8b226361e764dce158',1,'nats.h']]],
+  ['kvstore_38',['kvStore',['../group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a',1,'nats.h']]],
+  ['kvstore_5fbucket_39',['kvStore_Bucket',['../group__kv_group.html#gad28fdf9aae16bba308cda799fca13281',1,'nats.h']]],
+  ['kvstore_5fcreate_40',['kvStore_Create',['../group__kv_group.html#ga5289f7cd3999cfb46fb1fcb83178aec6',1,'nats.h']]],
+  ['kvstore_5fcreatestring_41',['kvStore_CreateString',['../group__kv_group.html#ga5726ad2e6205d2f6749be013138218ca',1,'nats.h']]],
+  ['kvstore_5fdelete_42',['kvStore_Delete',['../group__kv_group.html#ga68101d46739ca894fd7c56c8661c08d8',1,'nats.h']]],
+  ['kvstore_5fdestroy_43',['kvStore_Destroy',['../group__kv_group_mgt.html#gab0d6bdbfabd27af67eaeb36cec0787da',1,'nats.h']]],
+  ['kvstore_5fget_44',['kvStore_Get',['../group__kv_group.html#ga2db86f80d6bfce1bdbedf1b9da22913c',1,'nats.h']]],
+  ['kvstore_5fgetrevision_45',['kvStore_GetRevision',['../group__kv_group.html#ga9bf43431bb8264a3ea1f0df401afbe1a',1,'nats.h']]],
+  ['kvstore_5fhistory_46',['kvStore_History',['../group__kv_group.html#ga5aa57345313cee85b020e50c22023fb5',1,'nats.h']]],
+  ['kvstore_5fkeys_47',['kvStore_Keys',['../group__kv_group.html#ga6030fc2a672ae868f7603587245b9d5a',1,'nats.h']]],
+  ['kvstore_5fpurge_48',['kvStore_Purge',['../group__kv_group.html#ga3d5fa3d895d0d3041440105b244e9ca9',1,'nats.h']]],
+  ['kvstore_5fpurgedeletes_49',['kvStore_PurgeDeletes',['../group__kv_group.html#ga34ab74b229ff88e64301ea53a274da69',1,'nats.h']]],
+  ['kvstore_5fput_50',['kvStore_Put',['../group__kv_group.html#ga1fdf7a1d3acf96e475184790589a401e',1,'nats.h']]],
+  ['kvstore_5fputstring_51',['kvStore_PutString',['../group__kv_group.html#ga84ebd66a95ce857765d4a16ec35daba9',1,'nats.h']]],
+  ['kvstore_5fstatus_52',['kvStore_Status',['../group__kv_group.html#gadf75e99cc28bc9c2d6eac7c9f7398c27',1,'nats.h']]],
+  ['kvstore_5fupdate_53',['kvStore_Update',['../group__kv_group.html#gae0c593bb2ef94ae60e775617c9423038',1,'nats.h']]],
+  ['kvstore_5fupdatestring_54',['kvStore_UpdateString',['../group__kv_group.html#ga13ed70f15cd1485cd15f96bcc4b7ad1c',1,'nats.h']]],
+  ['kvstore_5fwatch_55',['kvStore_Watch',['../group__kv_group.html#ga30feca870f580c7b9d2ad07a740505b2',1,'nats.h']]],
+  ['kvstore_5fwatchall_56',['kvStore_WatchAll',['../group__kv_group.html#gaf011f1dd6813391c65664e982747602e',1,'nats.h']]],
+  ['kvwatcher_57',['kvWatcher',['../group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043',1,'nats.h']]],
+  ['kvwatcher_5fdestroy_58',['kvWatcher_Destroy',['../group__kv_watcher.html#ga21bc39fa795f7c4f392bd6d4e66ea1d9',1,'nats.h']]],
+  ['kvwatcher_5fnext_59',['kvWatcher_Next',['../group__kv_watcher.html#ga562c216a0199c30455af4c2da46000e5',1,'nats.h']]],
+  ['kvwatcher_5fstop_60',['kvWatcher_Stop',['../group__kv_watcher.html#ga73adf44114fedd62ef75ebd81839b65e',1,'nats.h']]],
+  ['kvwatchoptions_61',['kvWatchOptions',['../group__types_group.html#gac32f992fe797a1f7befc7dc3452640b6',1,'kvWatchOptions():&#160;nats.h'],['../structkv_watch_options.html',1,'kvWatchOptions']]],
+  ['kvwatchoptions_5finit_62',['kvWatchOptions_Init',['../group__kv_group.html#ga762fd5de8cde683e46a6736a51e575f5',1,'nats.h']]]
+];
diff --git a/doc/html/search/all_b.html b/doc/html/search/all_b.html
new file mode 100644 (file)
index 0000000..b7ad6e6
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_b.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/all_b.js b/doc/html/search/all_b.js
new file mode 100644 (file)
index 0000000..28f6ca9
--- /dev/null
@@ -0,0 +1,17 @@
+var searchData=
+[
+  ['lag_0',['Lag',['../structjs_peer_info.html#a49a2623963dad653a6d7996c750056c9',1,'jsPeerInfo::Lag()'],['../structjs_stream_source_info.html#ab2ee0ca3ecd98c2df6d4e9bd88686863',1,'jsStreamSourceInfo::Lag()']]],
+  ['last_1',['Last',['../structjs_sequence_info.html#a4e94c91650b7db253645515fee4c3b05',1,'jsSequenceInfo']]],
+  ['lastbysubject_2',['LastBySubject',['../structjs_direct_get_msg_options.html#aae968f31cdda96fa3c5e9374a36b9630',1,'jsDirectGetMsgOptions']]],
+  ['lastseq_3',['LastSeq',['../structjs_stream_state.html#a22da809fe7a1ec3101841e86d6708827',1,'jsStreamState']]],
+  ['lasttime_4',['LastTime',['../structjs_stream_state.html#a67cbd0d8b43d8c05c8b4cd6b0e44dab0',1,'jsStreamState']]],
+  ['leader_5',['Leader',['../structjs_cluster_info.html#af7d85652b52f56fa1eedce8f45fe6a19',1,'jsClusterInfo']]],
+  ['libevent_20adapter_6',['Libevent Adapter',['../group__libevent_functions.html',1,'']]],
+  ['libevent_2eh_7',['libevent.h',['../libevent_8h.html',1,'']]],
+  ['library_8',['Library',['../group__library_group.html',1,'']]],
+  ['libuv_20adapter_9',['Libuv Adapter',['../group__libuv_functions.html',1,'']]],
+  ['libuv_2eh_10',['libuv.h',['../libuv_8h.html',1,'']]],
+  ['limits_11',['Limits',['../structjs_tier.html#af2edbabd5e078b1e31dd73d44fd507d3',1,'jsTier::Limits()'],['../structjs_account_info.html#aad93cf4bb6c1fbb09ae8545c03f315a9',1,'jsAccountInfo::Limits()']]],
+  ['list_12',['List',['../structjs_stream_state_subjects.html#aef3d1e886b16961daa84c43650fa80c0',1,'jsStreamStateSubjects::List()'],['../structjs_stream_info_list.html#a7b096ee7a25363f231f56419a244daef',1,'jsStreamInfoList::List()'],['../structjs_stream_names_list.html#a1875a7e449759dfc2a40b0eb74de0acf',1,'jsStreamNamesList::List()'],['../structjs_consumer_info_list.html#a75354882af5e11959b198a70bde14db8',1,'jsConsumerInfoList::List()'],['../structjs_consumer_names_list.html#aa4b3cf17902a2d580cc3a230bfa5d309',1,'jsConsumerNamesList::List()']]],
+  ['lost_13',['Lost',['../structjs_stream_state.html#a1adf8991f31fc4db9d6907a0316f8eec',1,'jsStreamState']]]
+];
diff --git a/doc/html/search/all_c.html b/doc/html/search/all_c.html
new file mode 100644 (file)
index 0000000..829c917
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_c.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/all_c.js b/doc/html/search/all_c.js
new file mode 100644 (file)
index 0000000..08b5bef
--- /dev/null
@@ -0,0 +1,36 @@
+var searchData=
+[
+  ['management_0',['Management',['../group__conn_mgt_group.html',1,'(Global Namespace)'],['../group__stan_conn_mgt_group.html',1,'(Global Namespace)']]],
+  ['manualack_1',['ManualAck',['../structjs_sub_options.html#a21a905c49dfab61729d8674702d196b2',1,'jsSubOptions']]],
+  ['maxackpending_2',['MaxAckPending',['../structjs_consumer_config.html#aeb2336d480e3885385d1b08410e89892',1,'jsConsumerConfig::MaxAckPending()'],['../structjs_account_limits.html#a4abf1972690c20d73bd314f2059e8013',1,'jsAccountLimits::MaxAckPending()']]],
+  ['maxage_3',['MaxAge',['../structjs_stream_config.html#aa538765ad97d343d60212ebd9894661e',1,'jsStreamConfig']]],
+  ['maxbytes_4',['MaxBytes',['../structjs_stream_config.html#ad75e47d4293441bd5ddbc5eaf01e0451',1,'jsStreamConfig::MaxBytes()'],['../structjs_fetch_request.html#a3298db691c2ecb9725cc029e2c35d6d1',1,'jsFetchRequest::MaxBytes()'],['../structkv_config.html#a1bc37777aa91b8b57a70e7647670cd12',1,'kvConfig::MaxBytes()']]],
+  ['maxbytesrequired_5',['MaxBytesRequired',['../structjs_account_limits.html#a858edf99ee1c60354bdba4e59293fb6a',1,'jsAccountLimits']]],
+  ['maxconsumers_6',['MaxConsumers',['../structjs_stream_config.html#a7338c82c8cbfcd5f4bfb7ad34b1d8395',1,'jsStreamConfig::MaxConsumers()'],['../structjs_account_limits.html#a6169f29101d51d48eed0803b719e6338',1,'jsAccountLimits::MaxConsumers()']]],
+  ['maxdeliver_7',['MaxDeliver',['../structjs_consumer_config.html#ad47e15e1d6a4a8b0b155f9d3d5873c95',1,'jsConsumerConfig']]],
+  ['maxmemory_8',['MaxMemory',['../structjs_account_limits.html#a7bfc63e6f49ce724663ee534c5efdfa4',1,'jsAccountLimits']]],
+  ['maxmsgs_9',['MaxMsgs',['../structjs_stream_config.html#a60a5184d1d97b056dbb31ac6a5b3d82d',1,'jsStreamConfig']]],
+  ['maxmsgsize_10',['MaxMsgSize',['../structjs_stream_config.html#a93a2336a57b6bfb792d530fd13a90641',1,'jsStreamConfig']]],
+  ['maxmsgspersubject_11',['MaxMsgsPerSubject',['../structjs_stream_config.html#aa167c7547d13bf2a01510a375ad38340',1,'jsStreamConfig']]],
+  ['maxpending_12',['MaxPending',['../structjs_options_1_1js_options_publish_async.html#add8dd21cbab2d5df19688c26365fe4d1',1,'jsOptions::jsOptionsPublishAsync']]],
+  ['maxrequestbatch_13',['MaxRequestBatch',['../structjs_consumer_config.html#a4e86deefe08854b9a82b4908397aad32',1,'jsConsumerConfig']]],
+  ['maxrequestexpires_14',['MaxRequestExpires',['../structjs_consumer_config.html#aa71aa3dfe5826466be301097b1bae04d',1,'jsConsumerConfig']]],
+  ['maxrequestmaxbytes_15',['MaxRequestMaxBytes',['../structjs_consumer_config.html#a74a026cdd92c538bcf84297f4468bb21',1,'jsConsumerConfig']]],
+  ['maxstore_16',['MaxStore',['../structjs_account_limits.html#a6fff014c46739410ecf298b0cf643b30',1,'jsAccountLimits']]],
+  ['maxstreams_17',['MaxStreams',['../structjs_account_limits.html#a4710a10950857a322c2a3ad6f946ded2',1,'jsAccountLimits']]],
+  ['maxvaluesize_18',['MaxValueSize',['../structkv_config.html#a281156a9df0130abad7f3b2728ac35a5',1,'kvConfig']]],
+  ['maxwait_19',['MaxWait',['../structjs_pub_options.html#a1b242c9311b904a2e5337417b5c6d143',1,'jsPubOptions']]],
+  ['maxwaiting_20',['MaxWaiting',['../structjs_consumer_config.html#a8472d49fae908ab0291b4d62c8411b76',1,'jsConsumerConfig']]],
+  ['memory_21',['Memory',['../structjs_tier.html#aeff4a4cb86e10d8d7749d6ff69f97ed1',1,'jsTier::Memory()'],['../structjs_account_info.html#a448578d621e878267ad5f1792002a665',1,'jsAccountInfo::Memory()']]],
+  ['memorymaxstreambytes_22',['MemoryMaxStreamBytes',['../structjs_account_limits.html#a38875d969274b0f0fcefc6b04ce56eb8',1,'jsAccountLimits']]],
+  ['memorystorage_23',['MemoryStorage',['../structjs_consumer_config.html#a046177256938d6a601c629f9fd82f888',1,'jsConsumerConfig']]],
+  ['message_24',['Message',['../group__msg_group.html',1,'']]],
+  ['messages_25',['Messages',['../group__js_msg.html',1,'']]],
+  ['metaonly_26',['MetaOnly',['../structkv_watch_options.html#ac9094bce4f3c6513431ba32fb49e5605',1,'kvWatchOptions']]],
+  ['mirror_27',['Mirror',['../structjs_stream_config.html#acdba5b22e4e60fd81a54769a7d09bc51',1,'jsStreamConfig::Mirror()'],['../structjs_stream_info.html#ab71aae7e4f6c62e2a09a3a52c9e4fa2a',1,'jsStreamInfo::Mirror()']]],
+  ['mirrordirect_28',['MirrorDirect',['../structjs_stream_config.html#a9d67ddcc7c54c345dd60ed5e59234f1e',1,'jsStreamConfig']]],
+  ['msg_29',['Msg',['../structjs_pub_ack_err.html#a156ca2f779d132ffa8c519124cf9739b',1,'jsPubAckErr']]],
+  ['msgid_30',['MsgId',['../structjs_pub_options.html#ac8708487360b784f7dd5d7a21e5617c0',1,'jsPubOptions']]],
+  ['msgs_31',['Msgs',['../structnats_msg_list.html#aa123668879f1c9c11c9be7bd81a205c5',1,'natsMsgList::Msgs()'],['../structjs_lost_stream_data.html#a5d2e87697526033c842a7f955776dfda',1,'jsLostStreamData::Msgs()'],['../structjs_stream_state_subject.html#a8b9b2edc5afe82b7b3bc7dbdd67a4384',1,'jsStreamStateSubject::Msgs()'],['../structjs_stream_state.html#a495269fe83c6bbf2023cca94add0a888',1,'jsStreamState::Msgs()']]],
+  ['msgslen_32',['MsgsLen',['../structjs_lost_stream_data.html#abdc373ed7fc9b7cf161c13da1913fc9a',1,'jsLostStreamData']]]
+];
diff --git a/doc/html/search/all_d.html b/doc/html/search/all_d.html
new file mode 100644 (file)
index 0000000..d32b28e
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_d.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/all_d.js b/doc/html/search/all_d.js
new file mode 100644 (file)
index 0000000..09ff525
--- /dev/null
@@ -0,0 +1,260 @@
+var searchData=
+[
+  ['name_0',['Name',['../structjs_stream_source.html#a7d9e5c064866b3f0b5601193c5885ec3',1,'jsStreamSource::Name()'],['../structjs_stream_config.html#a7fe3d5086f1c660a6999ae40ecd370e5',1,'jsStreamConfig::Name()'],['../structjs_peer_info.html#abf29230ce03a1c14d50227663e07de6a',1,'jsPeerInfo::Name()'],['../structjs_cluster_info.html#a2e13d7ec417574100c938c4df78e5484',1,'jsClusterInfo::Name()'],['../structjs_stream_source_info.html#a6db3c6ff8a465a45f8bd5c7bdf5f6c04',1,'jsStreamSourceInfo::Name()'],['../structjs_consumer_config.html#a201217d93cfed17eb4d3e2d9579b826a',1,'jsConsumerConfig::Name()'],['../structjs_consumer_info.html#a9359aea7cd05a27b2a15f8a35cdb1008',1,'jsConsumerInfo::Name()'],['../structjs_tier.html#a1ed542b9acccbe7761839f33c43053a6',1,'jsTier::Name()']]],
+  ['nats_2eh_1',['nats.h',['../nats_8h.html',1,'']]],
+  ['nats_5faddress_5fmissing_2',['NATS_ADDRESS_MISSING',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80ae1d2c1366dbed428f6589f057acc507d',1,'status.h']]],
+  ['nats_5fcheckcompatibility_3',['nats_CheckCompatibility',['../group__library_group.html#ga8c2ad4df801bd9d11564587ed3a7081e',1,'nats.h']]],
+  ['nats_5fclose_4',['nats_Close',['../group__library_group.html#gae75131e0ce4e5b89d0f82ea7892f112e',1,'nats.h']]],
+  ['nats_5fcloseandwait_5',['nats_CloseAndWait',['../group__library_group.html#gaf75bb5b38bf32e6a8f43e54068625903',1,'nats.h']]],
+  ['nats_5fconn_5fstatus_5fclosed_6',['NATS_CONN_STATUS_CLOSED',['../status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51aa78753a4de2d0379078bb09cdc1acdb2',1,'status.h']]],
+  ['nats_5fconn_5fstatus_5fconnected_7',['NATS_CONN_STATUS_CONNECTED',['../status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51a0dafab74b55f98cfc1d00e4d1ef38725',1,'status.h']]],
+  ['nats_5fconn_5fstatus_5fconnecting_8',['NATS_CONN_STATUS_CONNECTING',['../status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51a7e4d95cb29122f06e17ca4aff55cc736',1,'status.h']]],
+  ['nats_5fconn_5fstatus_5fdisconnected_9',['NATS_CONN_STATUS_DISCONNECTED',['../status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51a08f92960811d1ff05b91a0870b4ecb92',1,'status.h']]],
+  ['nats_5fconn_5fstatus_5fdraining_5fpubs_10',['NATS_CONN_STATUS_DRAINING_PUBS',['../status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51ac6b8b7f138f6ca285fe1f4da707b2100',1,'status.h']]],
+  ['nats_5fconn_5fstatus_5fdraining_5fsubs_11',['NATS_CONN_STATUS_DRAINING_SUBS',['../status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51ab6f9d121707673a61cbe2c591f64fbf1',1,'status.h']]],
+  ['nats_5fconn_5fstatus_5freconnecting_12',['NATS_CONN_STATUS_RECONNECTING',['../status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51acfdc4826e08ce4b59f901952038e9206',1,'status.h']]],
+  ['nats_5fconnection_5fauth_5ffailed_13',['NATS_CONNECTION_AUTH_FAILED',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a473ea6cfa03490838fafee8730b48a2a',1,'status.h']]],
+  ['nats_5fconnection_5fclosed_14',['NATS_CONNECTION_CLOSED',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a476d7bcf9a593b749e435f20a9156eff',1,'status.h']]],
+  ['nats_5fconnection_5fdisconnected_15',['NATS_CONNECTION_DISCONNECTED',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80abef517217119e8446a8e3382e1f37eb3',1,'status.h']]],
+  ['nats_5fdefault_5furl_16',['NATS_DEFAULT_URL',['../nats_8h.html#a911c54900b46b968205871cd9f68d36c',1,'nats.h']]],
+  ['nats_5fdraining_17',['NATS_DRAINING',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a07fdbda44f43cef9866a75b25053c2ae',1,'status.h']]],
+  ['nats_5ferr_18',['NATS_ERR',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a40a08ae6ae17deaf390b1d0d7550791c',1,'status.h']]],
+  ['nats_5fextern_19',['NATS_EXTERN',['../nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad',1,'nats.h']]],
+  ['nats_5ffailed_5fto_5finitialize_20',['NATS_FAILED_TO_INITIALIZE',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a7cb64f52c8d91d6ade3db6bc82a96c42',1,'status.h']]],
+  ['nats_5fgetlasterror_21',['nats_GetLastError',['../group__library_group.html#gadecfd49a58b581dbba40da77b195fd85',1,'nats.h']]],
+  ['nats_5fgetlasterrorstack_22',['nats_GetLastErrorStack',['../group__library_group.html#gaca24172e1b97ca01cee29ca437f5702e',1,'nats.h']]],
+  ['nats_5fgetversion_23',['nats_GetVersion',['../group__library_group.html#ga0d8c3df1c0c4a3d340d8ff81355fb1e8',1,'nats.h']]],
+  ['nats_5fgetversionnumber_24',['nats_GetVersionNumber',['../group__library_group.html#ga5fbbaa19b0290b654d2669a05bd512e8',1,'nats.h']]],
+  ['nats_5fillegal_5fstate_25',['NATS_ILLEGAL_STATE',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9bb78b4f245d2870040d25c450febd4b',1,'status.h']]],
+  ['nats_5finsufficient_5fbuffer_26',['NATS_INSUFFICIENT_BUFFER',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a317fb9be1a80f6b1877f96a9a2db16ad',1,'status.h']]],
+  ['nats_5finvalid_5farg_27',['NATS_INVALID_ARG',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a71b57630aebf5c20eecdab832c2a9235',1,'status.h']]],
+  ['nats_5finvalid_5fqueue_5fname_28',['NATS_INVALID_QUEUE_NAME',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a8a0d239cfdfa30fe730afea65941779b',1,'status.h']]],
+  ['nats_5finvalid_5fsubject_29',['NATS_INVALID_SUBJECT',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a790c08a7d33e3aefce07c04120c4c19e',1,'status.h']]],
+  ['nats_5finvalid_5fsubscription_30',['NATS_INVALID_SUBSCRIPTION',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a273e92a0ff3b7eaf946b4b7fa6cc6c6c',1,'status.h']]],
+  ['nats_5finvalid_5ftimeout_31',['NATS_INVALID_TIMEOUT',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a827072fc245a99a60691e1e4b173ca86',1,'status.h']]],
+  ['nats_5fio_5ferror_32',['NATS_IO_ERROR',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a44e8b2590369fb01a1479719c97c2b6f',1,'status.h']]],
+  ['nats_5fline_5ftoo_5flong_33',['NATS_LINE_TOO_LONG',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a85c29dbfa6b06ffef3418cc9947ffff7',1,'status.h']]],
+  ['nats_5fmax_5fdelivered_5fmsgs_34',['NATS_MAX_DELIVERED_MSGS',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9a6f40b7803639ac18bdf532e93e5ad5',1,'status.h']]],
+  ['nats_5fmax_5fpayload_35',['NATS_MAX_PAYLOAD',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80af820300473609092a3e97a71b5af9ff9',1,'status.h']]],
+  ['nats_5fmismatch_36',['NATS_MISMATCH',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a22fa4802a34bac497f23e269a20a52f2',1,'status.h']]],
+  ['nats_5fmissed_5fheartbeat_37',['NATS_MISSED_HEARTBEAT',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a37d80c8232775339a32805fe93e0ea7f',1,'status.h']]],
+  ['nats_5fno_5fmemory_38',['NATS_NO_MEMORY',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a62ff6f5cc64399631defc0119731b514',1,'status.h']]],
+  ['nats_5fno_5fresponders_39',['NATS_NO_RESPONDERS',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80aab97324e40ccfe1360080c651c330e62',1,'status.h']]],
+  ['nats_5fno_5fserver_40',['NATS_NO_SERVER',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a47034d8889521bbd300f45fdc19e1127',1,'status.h']]],
+  ['nats_5fno_5fserver_5fsupport_41',['NATS_NO_SERVER_SUPPORT',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a8a4e298931ba0698a72e397b1b57c885',1,'status.h']]],
+  ['nats_5fnot_5ffound_42',['NATS_NOT_FOUND',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80ad0229a12b17d3d12a28efed6213720d8',1,'status.h']]],
+  ['nats_5fnot_5finitialized_43',['NATS_NOT_INITIALIZED',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80ae47047f2fac5f2f2a434fc501e5c3d4e',1,'status.h']]],
+  ['nats_5fnot_5fpermitted_44',['NATS_NOT_PERMITTED',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80ac3abc147873fe999c86431f9222eebf5',1,'status.h']]],
+  ['nats_5fnot_5fyet_5fconnected_45',['NATS_NOT_YET_CONNECTED',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a49a1ea653ce112b3c53eedebcd60811d',1,'status.h']]],
+  ['nats_5fnow_46',['nats_Now',['../group__library_group.html#gaa3c10ba3ae001595007ad0dc5dccc15e',1,'nats.h']]],
+  ['nats_5fnowinnanoseconds_47',['nats_NowInNanoSeconds',['../group__library_group.html#gacf5e423920d6a647df3bbf7de39d5223',1,'nats.h']]],
+  ['nats_5fok_48',['NATS_OK',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990',1,'status.h']]],
+  ['nats_5fopen_49',['nats_Open',['../group__library_group.html#ga4a26d4caecb23348f6eee862c95fee7d',1,'nats.h']]],
+  ['nats_5fprintlasterrorstack_50',['nats_PrintLastErrorStack',['../group__library_group.html#ga5fab3b18c4fe3630254483575f6066f4',1,'nats.h']]],
+  ['nats_5fprotocol_5ferror_51',['NATS_PROTOCOL_ERROR',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a113ffbe9a1f243582c38ebd876cb736d',1,'status.h']]],
+  ['nats_5freleasethreadmemory_52',['nats_ReleaseThreadMemory',['../group__library_group.html#gafe171baefa00a85b77205116e9f3e48a',1,'nats.h']]],
+  ['nats_5fsecure_5fconnection_5frequired_53',['NATS_SECURE_CONNECTION_REQUIRED',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80abc76f1b31fdac4525583cc19588240dc',1,'status.h']]],
+  ['nats_5fsecure_5fconnection_5fwanted_54',['NATS_SECURE_CONNECTION_WANTED',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a0aa3d1e18a2a217149fa8b1a306c9b08',1,'status.h']]],
+  ['nats_5fsetmessagedeliverypoolsize_55',['nats_SetMessageDeliveryPoolSize',['../group__library_group.html#gab21e94ce7a7d226611ea2c05914cf19d',1,'nats.h']]],
+  ['nats_5fsign_56',['nats_Sign',['../group__library_group.html#gaf781f246e2e0ab24623ca667c48dc3ba',1,'nats.h']]],
+  ['nats_5fsleep_57',['nats_Sleep',['../group__library_group.html#gad5040264cd4b1404956babf3c03a4f09',1,'nats.h']]],
+  ['nats_5fslow_5fconsumer_58',['NATS_SLOW_CONSUMER',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80ae93ff5b7fe31f8570308385d92d317b0',1,'status.h']]],
+  ['nats_5fssl_5ferror_59',['NATS_SSL_ERROR',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a892183c32b4929388bb75dc62230ddf3',1,'status.h']]],
+  ['nats_5fstale_5fconnection_60',['NATS_STALE_CONNECTION',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80aa76d5e3ce051bc7510be90e73663c93d',1,'status.h']]],
+  ['nats_5fsys_5ferror_61',['NATS_SYS_ERROR',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a984189ec4cfe3e7647268c99f7e49ec9',1,'status.h']]],
+  ['nats_5ftimeout_62',['NATS_TIMEOUT',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80ab88994c9ea9889ac4d9d656d62f550ed',1,'status.h']]],
+  ['natsconnection_63',['natsConnection',['../group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec',1,'nats.h']]],
+  ['natsconnection_5fbuffered_64',['natsConnection_Buffered',['../group__conn_mgt_group.html#ga0433159e518540ff874c4026fe9cd0c5',1,'nats.h']]],
+  ['natsconnection_5fclose_65',['natsConnection_Close',['../group__conn_mgt_group.html#ga19e204d27a232e2d4334301fc002b2ed',1,'nats.h']]],
+  ['natsconnection_5fconnect_66',['natsConnection_Connect',['../group__conn_mgt_group.html#ga740be1ba16a8570eb98ef6755ebf52ce',1,'nats.h']]],
+  ['natsconnection_5fconnectto_67',['natsConnection_ConnectTo',['../group__conn_mgt_group.html#gafb83c8d7970ba68be0e6c40c38cdfde4',1,'nats.h']]],
+  ['natsconnection_5fdestroy_68',['natsConnection_Destroy',['../group__conn_mgt_group.html#gafda2f702276fb0ac301efac10df09495',1,'nats.h']]],
+  ['natsconnection_5fdrain_69',['natsConnection_Drain',['../group__conn_mgt_group.html#ga59bdc4ad9fea2053f5d3841f6b83f88b',1,'nats.h']]],
+  ['natsconnection_5fdraintimeout_70',['natsConnection_DrainTimeout',['../group__conn_mgt_group.html#gae06fe6f5933f216d6d93645a122a7dd4',1,'nats.h']]],
+  ['natsconnection_5fflush_71',['natsConnection_Flush',['../group__conn_mgt_group.html#ga1c98f8d89bb8e20ea8621e860a90267f',1,'nats.h']]],
+  ['natsconnection_5fflushtimeout_72',['natsConnection_FlushTimeout',['../group__conn_mgt_group.html#ga85915ef0c8b87993be1b076099d6a7c1',1,'nats.h']]],
+  ['natsconnection_5fgetclientid_73',['natsConnection_GetClientID',['../group__conn_mgt_group.html#ga747513ba6ab63fdf9a72bfc8025a14ba',1,'nats.h']]],
+  ['natsconnection_5fgetclientip_74',['natsConnection_GetClientIP',['../group__conn_mgt_group.html#gadafcfeeeac2733c7119981ab97b7103d',1,'nats.h']]],
+  ['natsconnection_5fgetconnectedserverid_75',['natsConnection_GetConnectedServerId',['../group__conn_mgt_group.html#ga48cee9ea1cdc9fc2770de2f9f0fd1ccf',1,'nats.h']]],
+  ['natsconnection_5fgetconnectedurl_76',['natsConnection_GetConnectedUrl',['../group__conn_mgt_group.html#gaf623280407c43ade02285005f0642e6d',1,'nats.h']]],
+  ['natsconnection_5fgetdiscoveredservers_77',['natsConnection_GetDiscoveredServers',['../group__conn_mgt_group.html#gad25c77be0873495412c90a73fe450708',1,'nats.h']]],
+  ['natsconnection_5fgetlasterror_78',['natsConnection_GetLastError',['../group__conn_mgt_group.html#gab6cfa9cb6857ae10f096a94f5e244e63',1,'nats.h']]],
+  ['natsconnection_5fgetlocalipandport_79',['natsConnection_GetLocalIPAndPort',['../group__conn_mgt_group.html#ga761095a42374b4dafa178df7d7652dd5',1,'nats.h']]],
+  ['natsconnection_5fgetmaxpayload_80',['natsConnection_GetMaxPayload',['../group__conn_mgt_group.html#ga68e7149f7ff1cc4989b3f795fa7e76d9',1,'nats.h']]],
+  ['natsconnection_5fgetrtt_81',['natsConnection_GetRTT',['../group__conn_mgt_group.html#gaa3fd27e6e7d8131e679d4f10e201c435',1,'nats.h']]],
+  ['natsconnection_5fgetservers_82',['natsConnection_GetServers',['../group__conn_mgt_group.html#gaf4ee7262e35e44c40ad5dfe9240db76b',1,'nats.h']]],
+  ['natsconnection_5fgetstats_83',['natsConnection_GetStats',['../group__conn_mgt_group.html#ga68821a8ae1176096b5afef7fdc7947ec',1,'nats.h']]],
+  ['natsconnection_5fhasheadersupport_84',['natsConnection_HasHeaderSupport',['../group__conn_mgt_group.html#gad765b80ae8e1a06a7a942cccf29f042a',1,'nats.h']]],
+  ['natsconnection_5fisclosed_85',['natsConnection_IsClosed',['../group__conn_mgt_group.html#ga530f0f1c75c58a81aae1a59f15b46d9f',1,'nats.h']]],
+  ['natsconnection_5fisdraining_86',['natsConnection_IsDraining',['../group__conn_mgt_group.html#ga15a0f8aa9a6f621535d01593a4c8edd5',1,'nats.h']]],
+  ['natsconnection_5fisreconnecting_87',['natsConnection_IsReconnecting',['../group__conn_mgt_group.html#ga5aa349fc3895dde772671b324b07a688',1,'nats.h']]],
+  ['natsconnection_5fjetstream_88',['natsConnection_JetStream',['../group__js_group.html#ga8ed08b0fe1074b1e490291f0af2cb03f',1,'nats.h']]],
+  ['natsconnection_5fprocessreadevent_89',['natsConnection_ProcessReadEvent',['../group__conn_mgt_group.html#gaa89c06e30e19ff361125bfc9114d89a8',1,'nats.h']]],
+  ['natsconnection_5fprocesswriteevent_90',['natsConnection_ProcessWriteEvent',['../group__conn_mgt_group.html#gad81b603b84c0180aefc6d5ebad7f2a47',1,'nats.h']]],
+  ['natsconnection_5fpublish_91',['natsConnection_Publish',['../group__conn_pub_group.html#gac0b9f7759ecc39b8d77807b94254f9b4',1,'nats.h']]],
+  ['natsconnection_5fpublishmsg_92',['natsConnection_PublishMsg',['../group__conn_pub_group.html#ga74511acd87385931112c45c48c2a14ba',1,'nats.h']]],
+  ['natsconnection_5fpublishrequest_93',['natsConnection_PublishRequest',['../group__conn_pub_group.html#gaaaa3d75ffec2dcdc6bf905cdb1eee59e',1,'nats.h']]],
+  ['natsconnection_5fpublishrequeststring_94',['natsConnection_PublishRequestString',['../group__conn_pub_group.html#gaafca9a8294e81a5a9979e762931e56c5',1,'nats.h']]],
+  ['natsconnection_5fpublishstring_95',['natsConnection_PublishString',['../group__conn_pub_group.html#gad09a717c20de4cf0e2a21dcfd9ce6c64',1,'nats.h']]],
+  ['natsconnection_5fqueuesubscribe_96',['natsConnection_QueueSubscribe',['../group__conn_sub_group.html#ga3c9fee2775130786ef62f1cbeb191a48',1,'nats.h']]],
+  ['natsconnection_5fqueuesubscribesync_97',['natsConnection_QueueSubscribeSync',['../group__conn_sub_group.html#ga68630ea7c4bbdc7f8cd62058b41fb476',1,'nats.h']]],
+  ['natsconnection_5fqueuesubscribetimeout_98',['natsConnection_QueueSubscribeTimeout',['../group__conn_sub_group.html#ga96fa115fd5b2ef7658884da80714b91c',1,'nats.h']]],
+  ['natsconnection_5frequest_99',['natsConnection_Request',['../group__conn_pub_group.html#gaf4b4a022f9c21fc269b87c000330c5a7',1,'nats.h']]],
+  ['natsconnection_5frequestmsg_100',['natsConnection_RequestMsg',['../group__conn_pub_group.html#ga052de4b75b3b69ccd8d20eb4861b801d',1,'nats.h']]],
+  ['natsconnection_5frequeststring_101',['natsConnection_RequestString',['../group__conn_pub_group.html#ga4bb5105df6a3efd2088e6be0fdf6b31f',1,'nats.h']]],
+  ['natsconnection_5fsign_102',['natsConnection_Sign',['../group__conn_mgt_group.html#ga6960cfdbaac3b8759784f352d4c264f8',1,'nats.h']]],
+  ['natsconnection_5fstatus_103',['natsConnection_Status',['../group__conn_mgt_group.html#ga33fa209522e5e0226b5b7c7d720a3b98',1,'nats.h']]],
+  ['natsconnection_5fsubscribe_104',['natsConnection_Subscribe',['../group__conn_sub_group.html#gaefab965b5645798d47f9244f2b3fe3fb',1,'nats.h']]],
+  ['natsconnection_5fsubscribesync_105',['natsConnection_SubscribeSync',['../group__conn_sub_group.html#ga17574d5165f7e285462e3d3b2709edf4',1,'nats.h']]],
+  ['natsconnection_5fsubscribetimeout_106',['natsConnection_SubscribeTimeout',['../group__conn_sub_group.html#gacb2c83b58b7909715424cbc327fdd404',1,'nats.h']]],
+  ['natsconnectionhandler_107',['natsConnectionHandler',['../group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c',1,'nats.h']]],
+  ['natsconnstatus_108',['natsConnStatus',['../status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51',1,'status.h']]],
+  ['natscustomreconnectdelayhandler_109',['natsCustomReconnectDelayHandler',['../group__callbacks_group.html#ga3353d4b92851c52121f65aaf0684cba4',1,'nats.h']]],
+  ['natserrhandler_110',['natsErrHandler',['../group__callbacks_group.html#ga9e511dffa471dfb971b7dd2b12329626',1,'nats.h']]],
+  ['natsevloop_5fattach_111',['natsEvLoop_Attach',['../group__callbacks_group.html#ga245eab0a01a485e40fba267f84ec037f',1,'nats.h']]],
+  ['natsevloop_5fdetach_112',['natsEvLoop_Detach',['../group__callbacks_group.html#gab63dee7f7012ba11ae20b76dbc36f2d0',1,'nats.h']]],
+  ['natsevloop_5freadaddremove_113',['natsEvLoop_ReadAddRemove',['../group__callbacks_group.html#gaea4c125ecfb43eaf43da20e8444c2aaa',1,'nats.h']]],
+  ['natsevloop_5fwriteaddremove_114',['natsEvLoop_WriteAddRemove',['../group__callbacks_group.html#ga2bb5dd2d821ca5bbc0488f7e6aceed17',1,'nats.h']]],
+  ['natsinbox_115',['natsInbox',['../group__types_group.html#ga206c3d4d6f4f6f96fd2cae53a3df31c1',1,'nats.h']]],
+  ['natsinbox_5fcreate_116',['natsInbox_Create',['../group__inbox_group.html#gaa1ec779a0b7ead54b78da05533848b6d',1,'nats.h']]],
+  ['natsinbox_5fdestroy_117',['natsInbox_Destroy',['../group__inbox_group.html#gabd6444fb8f28afb9c2b6645945f46cfe',1,'nats.h']]],
+  ['natslibevent_5fattach_118',['natsLibevent_Attach',['../group__libevent_functions.html#ga30c00f21a5251ee9fde09c1f2b429cd2',1,'libevent.h']]],
+  ['natslibevent_5fdetach_119',['natsLibevent_Detach',['../group__libevent_functions.html#gaac76f5937329a8650f69c6bd8af36cd5',1,'libevent.h']]],
+  ['natslibevent_5finit_120',['natsLibevent_Init',['../group__libevent_functions.html#ga195d269473332931fd0fede0bac3309e',1,'libevent.h']]],
+  ['natslibevent_5fread_121',['natsLibevent_Read',['../group__libevent_functions.html#ga8a14ce23b4f6ba3bf63369961f9a5552',1,'libevent.h']]],
+  ['natslibevent_5fwrite_122',['natsLibevent_Write',['../group__libevent_functions.html#ga7ac99f326a59e5663ff66f5023c87091',1,'libevent.h']]],
+  ['natslibuv_5fattach_123',['natsLibuv_Attach',['../group__libuv_functions.html#ga86ac71cffe752effd7397740d80c3c42',1,'libuv.h']]],
+  ['natslibuv_5fdetach_124',['natsLibuv_Detach',['../group__libuv_functions.html#ga8df663525fb59b882a0f3bd563083dc7',1,'libuv.h']]],
+  ['natslibuv_5finit_125',['natsLibuv_Init',['../group__libuv_functions.html#ga5d4b677cbe1cd132c37bc56dbfc6949e',1,'libuv.h']]],
+  ['natslibuv_5fread_126',['natsLibuv_Read',['../group__libuv_functions.html#ga85c722b2d2699a954362b20528f0aaac',1,'libuv.h']]],
+  ['natslibuv_5fsetthreadlocalloop_127',['natsLibuv_SetThreadLocalLoop',['../group__libuv_functions.html#ga1baf4a20b138dcf00807a8b830f4e02d',1,'libuv.h']]],
+  ['natslibuv_5fwrite_128',['natsLibuv_Write',['../group__libuv_functions.html#gafaa633c9067f485f330b72644277b07d',1,'libuv.h']]],
+  ['natsmsg_129',['natsMsg',['../group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a',1,'nats.h']]],
+  ['natsmsg_5fack_130',['natsMsg_Ack',['../group__js_msg.html#gae454fb7e7097a3cd3362cb49ef8a3c84',1,'nats.h']]],
+  ['natsmsg_5facksync_131',['natsMsg_AckSync',['../group__js_msg.html#gafb899ebf8e89b3a858fe20f7853635a7',1,'nats.h']]],
+  ['natsmsg_5fcreate_132',['natsMsg_Create',['../group__msg_group.html#ga098e4fec1c5a71c00a0d092fbd6d1a21',1,'nats.h']]],
+  ['natsmsg_5fdestroy_133',['natsMsg_Destroy',['../group__msg_group.html#ga9e9590018284939f43f60964283f33ae',1,'nats.h']]],
+  ['natsmsg_5fgetdata_134',['natsMsg_GetData',['../group__msg_group.html#ga523364451fd92534e754054266196e59',1,'nats.h']]],
+  ['natsmsg_5fgetdatalength_135',['natsMsg_GetDataLength',['../group__msg_group.html#ga25b69066ae50287e178aaf4f70f7d3de',1,'nats.h']]],
+  ['natsmsg_5fgetmetadata_136',['natsMsg_GetMetaData',['../group__js_msg.html#gacf48e59038fab35849e9dc6f8fcf6328',1,'nats.h']]],
+  ['natsmsg_5fgetreply_137',['natsMsg_GetReply',['../group__msg_group.html#ga880535362c91b3e405792aa66ff945b6',1,'nats.h']]],
+  ['natsmsg_5fgetsequence_138',['natsMsg_GetSequence',['../group__js_msg.html#ga819be2990ec20b964aa574b5331d7f2e',1,'nats.h']]],
+  ['natsmsg_5fgetsubject_139',['natsMsg_GetSubject',['../group__msg_group.html#gad7cad38946648e3047aa0665a3dd230a',1,'nats.h']]],
+  ['natsmsg_5fgettime_140',['natsMsg_GetTime',['../group__js_msg.html#gab4850497c5481f5ec6eb1fcdb43646f5',1,'nats.h']]],
+  ['natsmsg_5finprogress_141',['natsMsg_InProgress',['../group__js_msg.html#gae1e0beb19cd76e2f69e6415c41c9bb39',1,'nats.h']]],
+  ['natsmsg_5fisnoresponders_142',['natsMsg_IsNoResponders',['../group__msg_group.html#ga43aa4a8e4b93725b4876ee2677e19c7b',1,'nats.h']]],
+  ['natsmsg_5fnak_143',['natsMsg_Nak',['../group__js_msg.html#gac271b874154301da9759f9ac05768b47',1,'nats.h']]],
+  ['natsmsg_5fnakwithdelay_144',['natsMsg_NakWithDelay',['../group__js_msg.html#gac0697389fa60a3c4725e53cd23ada7bd',1,'nats.h']]],
+  ['natsmsg_5fterm_145',['natsMsg_Term',['../group__js_msg.html#gae84d21e4388255e9d990e53c9f67e7c4',1,'nats.h']]],
+  ['natsmsghandler_146',['natsMsgHandler',['../group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe',1,'nats.h']]],
+  ['natsmsgheader_5fadd_147',['natsMsgHeader_Add',['../group__msg_group.html#ga2b641ec3b1745604d7de1102e472254b',1,'nats.h']]],
+  ['natsmsgheader_5fdelete_148',['natsMsgHeader_Delete',['../group__msg_group.html#gac78ca02dc93d05cae837ced6386408f1',1,'nats.h']]],
+  ['natsmsgheader_5fget_149',['natsMsgHeader_Get',['../group__msg_group.html#gab3349f0b0ce721b340d5c0753c90ee18',1,'nats.h']]],
+  ['natsmsgheader_5fkeys_150',['natsMsgHeader_Keys',['../group__msg_group.html#ga6ee8a007111ada293dd24ff0bab02491',1,'nats.h']]],
+  ['natsmsgheader_5fset_151',['natsMsgHeader_Set',['../group__msg_group.html#gaf30b47d4217c9335919f05536e379af8',1,'nats.h']]],
+  ['natsmsgheader_5fvalues_152',['natsMsgHeader_Values',['../group__msg_group.html#gae1ce9c9d82d151a3ea9dc03da048f66f',1,'nats.h']]],
+  ['natsmsglist_153',['natsMsgList',['../structnats_msg_list.html',1,'natsMsgList'],['../group__types_group.html#gafd5523161ec3783e79719cb9a9a66b5b',1,'natsMsgList():&#160;nats.h']]],
+  ['natsmsglist_5fdestroy_154',['natsMsgList_Destroy',['../group__msg_group.html#ga1a091d24f939d881bf04fba78b8995c2',1,'nats.h']]],
+  ['natsoncompletecb_155',['natsOnCompleteCB',['../group__callbacks_group.html#ga245131e64f1d0dff7edc8ed874a07e9a',1,'nats.h']]],
+  ['natsoptions_156',['natsOptions',['../group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e',1,'nats.h']]],
+  ['natsoptions_5fcreate_157',['natsOptions_Create',['../group__opts_group.html#ga61d4a0cf2fbf7d13cc910e5a00c575be',1,'nats.h']]],
+  ['natsoptions_5fdestroy_158',['natsOptions_Destroy',['../group__opts_group.html#ga93d8068cd6fff53b7f8e1c403db45eb9',1,'nats.h']]],
+  ['natsoptions_5fdisablenoresponders_159',['natsOptions_DisableNoResponders',['../group__opts_group.html#ga192465163abb87ad48a843b45cdf9984',1,'nats.h']]],
+  ['natsoptions_5fipresolutionorder_160',['natsOptions_IPResolutionOrder',['../group__opts_group.html#ga7ca713c7532eff4d41a492e95b8822cf',1,'nats.h']]],
+  ['natsoptions_5floadcatrustedcertificates_161',['natsOptions_LoadCATrustedCertificates',['../group__opts_group.html#ga2cd6563694a439b3949a31fd81103099',1,'nats.h']]],
+  ['natsoptions_5floadcertificateschain_162',['natsOptions_LoadCertificatesChain',['../group__opts_group.html#ga36943e2ba53d05407cdabc4e7e96484b',1,'nats.h']]],
+  ['natsoptions_5fsetallowreconnect_163',['natsOptions_SetAllowReconnect',['../group__opts_group.html#ga3d1d3cb2f2a0e23d27dd60e96d1cc91b',1,'nats.h']]],
+  ['natsoptions_5fsetcatrustedcertificates_164',['natsOptions_SetCATrustedCertificates',['../group__opts_group.html#gafb30794fc2ae74b9e0bd8fb609b901c8',1,'nats.h']]],
+  ['natsoptions_5fsetcertificateschain_165',['natsOptions_SetCertificatesChain',['../group__opts_group.html#gae98f0f9034e93941767ab1ae6eec2c0c',1,'nats.h']]],
+  ['natsoptions_5fsetciphers_166',['natsOptions_SetCiphers',['../group__opts_group.html#ga5698f020e8eb3e7440eb073fe08ef62c',1,'nats.h']]],
+  ['natsoptions_5fsetciphersuites_167',['natsOptions_SetCipherSuites',['../group__opts_group.html#ga2b7f144b011d8ce62941b608a8f324f0',1,'nats.h']]],
+  ['natsoptions_5fsetclosedcb_168',['natsOptions_SetClosedCB',['../group__opts_group.html#ga44410242e73134e5bb51ef27904a9253',1,'nats.h']]],
+  ['natsoptions_5fsetcustominboxprefix_169',['natsOptions_SetCustomInboxPrefix',['../group__opts_group.html#gac5173473a731a4a36d15346fedddf91f',1,'nats.h']]],
+  ['natsoptions_5fsetcustomreconnectdelay_170',['natsOptions_SetCustomReconnectDelay',['../group__opts_group.html#ga3593165aa113d6736e0226ddc56b3e9d',1,'nats.h']]],
+  ['natsoptions_5fsetdisconnectedcb_171',['natsOptions_SetDisconnectedCB',['../group__opts_group.html#gadc8dc0cedd91bda71d544f3dedc4a039',1,'nats.h']]],
+  ['natsoptions_5fsetdiscoveredserverscb_172',['natsOptions_SetDiscoveredServersCB',['../group__opts_group.html#gab5baab507c974402ab0d8c5e8227ee65',1,'nats.h']]],
+  ['natsoptions_5fseterrorhandler_173',['natsOptions_SetErrorHandler',['../group__opts_group.html#ga127ec7a8196b453947a7fa9a64096cbd',1,'nats.h']]],
+  ['natsoptions_5fseteventloop_174',['natsOptions_SetEventLoop',['../group__opts_group.html#gab09491bad908dedcb323c780280733ff',1,'nats.h']]],
+  ['natsoptions_5fsetexpectedhostname_175',['natsOptions_SetExpectedHostname',['../group__opts_group.html#ga0ba43ba9930df385e4781b12be9f2851',1,'nats.h']]],
+  ['natsoptions_5fsetfailrequestsondisconnect_176',['natsOptions_SetFailRequestsOnDisconnect',['../group__opts_group.html#gadef4376a5e608cbc8c1a9e2b6335dc79',1,'nats.h']]],
+  ['natsoptions_5fsetignorediscoveredservers_177',['natsOptions_SetIgnoreDiscoveredServers',['../group__opts_group.html#ga7e4172084520708b8c9f28e73174461c',1,'nats.h']]],
+  ['natsoptions_5fsetiobufsize_178',['natsOptions_SetIOBufSize',['../group__opts_group.html#ga1a3e3abfd7ddd8aff247df8f332bbda3',1,'nats.h']]],
+  ['natsoptions_5fsetlameduckmodecb_179',['natsOptions_SetLameDuckModeCB',['../group__opts_group.html#ga54dea2ffeb33779771652a7a14fc4adc',1,'nats.h']]],
+  ['natsoptions_5fsetmaxpendingmsgs_180',['natsOptions_SetMaxPendingMsgs',['../group__opts_group.html#ga95510436eee06f9992ded96a44795c40',1,'nats.h']]],
+  ['natsoptions_5fsetmaxpingsout_181',['natsOptions_SetMaxPingsOut',['../group__opts_group.html#gaaff89c3f41627f4b2929dbc9b82d265b',1,'nats.h']]],
+  ['natsoptions_5fsetmaxreconnect_182',['natsOptions_SetMaxReconnect',['../group__opts_group.html#gab54cd2719c0b64eebd6c7b83dd2908a0',1,'nats.h']]],
+  ['natsoptions_5fsetname_183',['natsOptions_SetName',['../group__opts_group.html#ga1c529d347be0fe2eec17c7f4698e283e',1,'nats.h']]],
+  ['natsoptions_5fsetnkey_184',['natsOptions_SetNKey',['../group__opts_group.html#ga0290eac4665569c850468d9f00e246a0',1,'nats.h']]],
+  ['natsoptions_5fsetnkeyfromseed_185',['natsOptions_SetNKeyFromSeed',['../group__opts_group.html#ga696f02e0493c00d3c1eafff45b62b68e',1,'nats.h']]],
+  ['natsoptions_5fsetnoecho_186',['natsOptions_SetNoEcho',['../group__opts_group.html#ga4f694b87039cedaa65cd25656b14d1a3',1,'nats.h']]],
+  ['natsoptions_5fsetnorandomize_187',['natsOptions_SetNoRandomize',['../group__opts_group.html#gaabf8763b931dcf389c83fd95d760a413',1,'nats.h']]],
+  ['natsoptions_5fsetpedantic_188',['natsOptions_SetPedantic',['../group__opts_group.html#ga26f166af20de98bec67bc6cc916f769e',1,'nats.h']]],
+  ['natsoptions_5fsetpinginterval_189',['natsOptions_SetPingInterval',['../group__opts_group.html#gae68fb615835364c0809555e8dc93f57e',1,'nats.h']]],
+  ['natsoptions_5fsetreconnectbufsize_190',['natsOptions_SetReconnectBufSize',['../group__opts_group.html#gaa0d4b7ece8477cb9879f0dafff3456a5',1,'nats.h']]],
+  ['natsoptions_5fsetreconnectedcb_191',['natsOptions_SetReconnectedCB',['../group__opts_group.html#ga26a48c8529fffa5f5d1a61c030979980',1,'nats.h']]],
+  ['natsoptions_5fsetreconnectjitter_192',['natsOptions_SetReconnectJitter',['../group__opts_group.html#ga8f3df57ed8ae418d3ae6678ae5e2a5d2',1,'nats.h']]],
+  ['natsoptions_5fsetreconnectwait_193',['natsOptions_SetReconnectWait',['../group__opts_group.html#ga2730f4e16e318a2ef8de98dbf6ede807',1,'nats.h']]],
+  ['natsoptions_5fsetretryonfailedconnect_194',['natsOptions_SetRetryOnFailedConnect',['../group__opts_group.html#ga20946800d024b7089e73d63454d1c19f',1,'nats.h']]],
+  ['natsoptions_5fsetsecure_195',['natsOptions_SetSecure',['../group__opts_group.html#gaa1f09416d443fa7a6af6b695da563eba',1,'nats.h']]],
+  ['natsoptions_5fsetsendasap_196',['natsOptions_SetSendAsap',['../group__opts_group.html#ga8f06568cc3319a5a0eef9f80282034ca',1,'nats.h']]],
+  ['natsoptions_5fsetservers_197',['natsOptions_SetServers',['../group__opts_group.html#gacb7e964ae54b74d972d72e118b7b8bdf',1,'nats.h']]],
+  ['natsoptions_5fsettimeout_198',['natsOptions_SetTimeout',['../group__opts_group.html#ga17cd7fe41176cd98aca1184fa9352ad9',1,'nats.h']]],
+  ['natsoptions_5fsettoken_199',['natsOptions_SetToken',['../group__opts_group.html#gad58a5b9dabadeebda30e952ff7b39193',1,'nats.h']]],
+  ['natsoptions_5fsettokenhandler_200',['natsOptions_SetTokenHandler',['../group__opts_group.html#ga23a3b1f022112e98ddccb18b247b4426',1,'nats.h']]],
+  ['natsoptions_5fseturl_201',['natsOptions_SetURL',['../group__opts_group.html#ga3f7e760214417c7d87541ecb9ab5bea5',1,'nats.h']]],
+  ['natsoptions_5fsetusercredentialscallbacks_202',['natsOptions_SetUserCredentialsCallbacks',['../group__opts_group.html#ga60117450fc1f7b6f81bab455aeed7515',1,'nats.h']]],
+  ['natsoptions_5fsetusercredentialsfromfiles_203',['natsOptions_SetUserCredentialsFromFiles',['../group__opts_group.html#ga59b47f7b7a19085cf8eaada9bfe5606e',1,'nats.h']]],
+  ['natsoptions_5fsetuserinfo_204',['natsOptions_SetUserInfo',['../group__opts_group.html#ga5b99da7dd74aac3be962f323c3863d9e',1,'nats.h']]],
+  ['natsoptions_5fsetverbose_205',['natsOptions_SetVerbose',['../group__opts_group.html#gaa16bfd09ef318af18c27a0e199681b69',1,'nats.h']]],
+  ['natsoptions_5fsetwritedeadline_206',['natsOptions_SetWriteDeadline',['../group__opts_group.html#gaafda5fb8d9ee3a17bd475ceaecfac218',1,'nats.h']]],
+  ['natsoptions_5fskipserververification_207',['natsOptions_SkipServerVerification',['../group__opts_group.html#ga6f804ec44adc299989fe623570679da3',1,'nats.h']]],
+  ['natsoptions_5fuseglobalmessagedelivery_208',['natsOptions_UseGlobalMessageDelivery',['../group__opts_group.html#gabf060c92648b50c069f0abe7cbb06f1c',1,'nats.h']]],
+  ['natsoptions_5fuseoldrequeststyle_209',['natsOptions_UseOldRequestStyle',['../group__opts_group.html#ga70aa85319933d78c0076cc862fa3e5a6',1,'nats.h']]],
+  ['natssignaturehandler_210',['natsSignatureHandler',['../group__callbacks_group.html#gab786ffd670c86de0563559351305080b',1,'nats.h']]],
+  ['natssock_211',['natsSock',['../nats_8h.html#af798865ac824e5959987de0fe8d07383',1,'nats.h']]],
+  ['natsstatistics_212',['natsStatistics',['../group__types_group.html#ga57a4b8c7109e2773878655722ce028aa',1,'nats.h']]],
+  ['natsstatistics_5fcreate_213',['natsStatistics_Create',['../group__stats_group.html#gafa923df029168f4991b77ffdd9e24877',1,'nats.h']]],
+  ['natsstatistics_5fdestroy_214',['natsStatistics_Destroy',['../group__stats_group.html#ga26a04e77af8fc160adf7c33088dcf59c',1,'nats.h']]],
+  ['natsstatistics_5fgetcounts_215',['natsStatistics_GetCounts',['../group__stats_group.html#gad85f5ffb4272713f6cc6d988e6d4e75f',1,'nats.h']]],
+  ['natsstatus_216',['natsStatus',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80',1,'status.h']]],
+  ['natsstatus_5fgettext_217',['natsStatus_GetText',['../group__status_group.html#ga4a83c4a08f1e4dd9451c1a88b6a4254e',1,'nats.h']]],
+  ['natssubscription_218',['natsSubscription',['../group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8',1,'nats.h']]],
+  ['natssubscription_5fautounsubscribe_219',['natsSubscription_AutoUnsubscribe',['../group__sub_group.html#ga09f285de2746a6e27fc66efd60bd3116',1,'nats.h']]],
+  ['natssubscription_5fclearmaxpending_220',['natsSubscription_ClearMaxPending',['../group__sub_group.html#gafe31911d8372db401d33856465421710',1,'nats.h']]],
+  ['natssubscription_5fdestroy_221',['natsSubscription_Destroy',['../group__sub_group.html#ga50a95dd96e9b714201679a015d62832f',1,'nats.h']]],
+  ['natssubscription_5fdrain_222',['natsSubscription_Drain',['../group__sub_group.html#ga26c9736289d326fb7d6df7e2a0df72ab',1,'nats.h']]],
+  ['natssubscription_5fdraincompletionstatus_223',['natsSubscription_DrainCompletionStatus',['../group__sub_group.html#ga9834bd02f67a25ac084d5ad71e146019',1,'nats.h']]],
+  ['natssubscription_5fdraintimeout_224',['natsSubscription_DrainTimeout',['../group__sub_group.html#ga9c26a3f9584e7804060a48ec1b7e2a68',1,'nats.h']]],
+  ['natssubscription_5ffetch_225',['natsSubscription_Fetch',['../group__js_sub_group.html#gafc5e0d2269bd23b4d5fb7f3b05278e50',1,'nats.h']]],
+  ['natssubscription_5ffetchrequest_226',['natsSubscription_FetchRequest',['../group__js_sub_group.html#ga676292505e7fde8688cfd886b79a10ed',1,'nats.h']]],
+  ['natssubscription_5fgetconsumerinfo_227',['natsSubscription_GetConsumerInfo',['../group__js_sub_group.html#gaae716a1431db065744c079b71a9f4c2e',1,'nats.h']]],
+  ['natssubscription_5fgetdelivered_228',['natsSubscription_GetDelivered',['../group__sub_group.html#ga476b7276d0b7f9946834d2bb2423e955',1,'nats.h']]],
+  ['natssubscription_5fgetdropped_229',['natsSubscription_GetDropped',['../group__sub_group.html#ga24f1636869e26661ce62c9c9f4d80823',1,'nats.h']]],
+  ['natssubscription_5fgetid_230',['natsSubscription_GetID',['../group__sub_group.html#ga5a029a784c0a7f8b5800b48cc995db20',1,'nats.h']]],
+  ['natssubscription_5fgetmaxpending_231',['natsSubscription_GetMaxPending',['../group__sub_group.html#ga0abc5d9afbc6b0c9c5adaf533904c968',1,'nats.h']]],
+  ['natssubscription_5fgetpending_232',['natsSubscription_GetPending',['../group__sub_group.html#gaca6262e2ef842caa701a9f233db72707',1,'nats.h']]],
+  ['natssubscription_5fgetpendinglimits_233',['natsSubscription_GetPendingLimits',['../group__sub_group.html#ga786bb458981274fe717f266bd3b96d96',1,'nats.h']]],
+  ['natssubscription_5fgetsequencemismatch_234',['natsSubscription_GetSequenceMismatch',['../group__js_sub_group.html#ga0daed9f0d2d00cb14314ecc180a6fa84',1,'nats.h']]],
+  ['natssubscription_5fgetstats_235',['natsSubscription_GetStats',['../group__sub_group.html#ga12b60cdb3aca7329edebc480ae86bfab',1,'nats.h']]],
+  ['natssubscription_5fgetsubject_236',['natsSubscription_GetSubject',['../group__sub_group.html#gadd4872b9fc5678a73f9ab04ce8428432',1,'nats.h']]],
+  ['natssubscription_5fisvalid_237',['natsSubscription_IsValid',['../group__sub_group.html#ga5e6454bbc7a90b9694112d45bd8de903',1,'nats.h']]],
+  ['natssubscription_5fnextmsg_238',['natsSubscription_NextMsg',['../group__sub_group.html#ga6538a5d78dfb0f16514b94c8e74c11af',1,'nats.h']]],
+  ['natssubscription_5fnodeliverydelay_239',['natsSubscription_NoDeliveryDelay',['../group__sub_group.html#ga38f1e41fc7619101fc4aa52014dd5428',1,'nats.h']]],
+  ['natssubscription_5fqueuedmsgs_240',['natsSubscription_QueuedMsgs',['../group__sub_group.html#ga8a37b2d5290da3aecc05483d79e7e254',1,'nats.h']]],
+  ['natssubscription_5fsetoncompletecb_241',['natsSubscription_SetOnCompleteCB',['../group__sub_group.html#gaea632f845d473e7461b134c0e7bf4077',1,'nats.h']]],
+  ['natssubscription_5fsetpendinglimits_242',['natsSubscription_SetPendingLimits',['../group__sub_group.html#ga68a7cea89e75c529a7dd3bb77303dda4',1,'nats.h']]],
+  ['natssubscription_5funsubscribe_243',['natsSubscription_Unsubscribe',['../group__sub_group.html#gaee87f8be0e6c2a4693ba2cea070583ba',1,'nats.h']]],
+  ['natssubscription_5fwaitfordraincompletion_244',['natsSubscription_WaitForDrainCompletion',['../group__sub_group.html#ga0408c9b6e4ad4078ac0267656ace222d',1,'nats.h']]],
+  ['natstokenhandler_245',['natsTokenHandler',['../group__callbacks_group.html#ga4b02de70fe9380d184fd01d87527f499',1,'nats.h']]],
+  ['natsuserjwthandler_246',['natsUserJWTHandler',['../group__callbacks_group.html#ga258b30458134be90f17315c037f34b7b',1,'nats.h']]],
+  ['nextbysubject_247',['NextBySubject',['../structjs_direct_get_msg_options.html#a16ce7908a3d1690b8ae8bc22350ac238',1,'jsDirectGetMsgOptions']]],
+  ['noack_248',['NoAck',['../structjs_stream_config.html#a8e358fbc569a1c6d49c704e6dbdf8609',1,'jsStreamConfig']]],
+  ['nowait_249',['NoWait',['../structjs_fetch_request.html#ae251eebb1998a39fe3b898302b58293d',1,'jsFetchRequest']]],
+  ['numackpending_250',['NumAckPending',['../structjs_consumer_info.html#a882bebeb7af80fcce088afdf2c98de50',1,'jsConsumerInfo']]],
+  ['numdeleted_251',['NumDeleted',['../structjs_stream_state.html#acbec2f01830b56cb4c0bf54ae5170e51',1,'jsStreamState']]],
+  ['numdelivered_252',['NumDelivered',['../structjs_msg_meta_data.html#a9a50965fac061a9728b160702d3f56ff',1,'jsMsgMetaData']]],
+  ['numpending_253',['NumPending',['../structjs_consumer_info.html#aeaefd5a500996013b1ce13d8872e869b',1,'jsConsumerInfo::NumPending()'],['../structjs_msg_meta_data.html#a02f1bbd37e9650ed6bfda0210f038e30',1,'jsMsgMetaData::NumPending()']]],
+  ['numredelivered_254',['NumRedelivered',['../structjs_consumer_info.html#a932bf14ebb9ce167af8975e3b1f8d001',1,'jsConsumerInfo']]],
+  ['numsubjects_255',['NumSubjects',['../structjs_stream_state.html#aaa43db17641826e7c6ecc1954f641960',1,'jsStreamState']]],
+  ['numwaiting_256',['NumWaiting',['../structjs_consumer_info.html#a57e4a4139310c50a1f3d51af67197af0',1,'jsConsumerInfo']]]
+];
diff --git a/doc/html/search/all_e.html b/doc/html/search/all_e.html
new file mode 100644 (file)
index 0000000..ce450a2
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_e.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/all_e.js b/doc/html/search/all_e.js
new file mode 100644 (file)
index 0000000..f2ff26b
--- /dev/null
@@ -0,0 +1,8 @@
+var searchData=
+[
+  ['offline_0',['Offline',['../structjs_peer_info.html#a3f3e09c5996858ec5faca2dc7fa5224e',1,'jsPeerInfo']]],
+  ['options_1',['Options',['../group__opts_group.html',1,'']]],
+  ['optstartseq_2',['OptStartSeq',['../structjs_stream_source.html#ad6948b7a34c202f324b6d2beb32fe5ed',1,'jsStreamSource::OptStartSeq()'],['../structjs_consumer_config.html#a2f0243899885dc97f304f48ca52b5356',1,'jsConsumerConfig::OptStartSeq()']]],
+  ['optstarttime_3',['OptStartTime',['../structjs_stream_source.html#a67eb1dac41b2d826a923cfb23baa24a5',1,'jsStreamSource::OptStartTime()'],['../structjs_consumer_config.html#a802ea3bf0669395bee28611f4ecede80',1,'jsConsumerConfig::OptStartTime()']]],
+  ['ordered_4',['Ordered',['../structjs_sub_options.html#a95c5d2db8ca97d644042d436de119be4',1,'jsSubOptions']]]
+];
diff --git a/doc/html/search/all_f.html b/doc/html/search/all_f.html
new file mode 100644 (file)
index 0000000..59cfe49
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_f.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/all_f.js b/doc/html/search/all_f.js
new file mode 100644 (file)
index 0000000..70bbc22
--- /dev/null
@@ -0,0 +1,9 @@
+var searchData=
+[
+  ['placement_0',['Placement',['../structjs_stream_config.html#acee6c66afc78d79c2f518eed89177efb',1,'jsStreamConfig']]],
+  ['prefix_1',['Prefix',['../structjs_options.html#ab06e45296fccf0fe6152e083e38d916f',1,'jsOptions']]],
+  ['publishasync_2',['PublishAsync',['../structjs_options.html#a5ce5c11cc9b9df2b6bc47cd77d7b1dc4',1,'jsOptions']]],
+  ['publishing_3',['Publishing',['../group__conn_pub_group.html',1,'(Global Namespace)'],['../group__js_pub_group.html',1,'(Global Namespace)'],['../group__stan_conn_pub_group.html',1,'(Global Namespace)']]],
+  ['purge_4',['Purge',['../structjs_options_1_1js_options_stream.html#afe680264223b434ca6959f9e122af029',1,'jsOptions::jsOptionsStream']]],
+  ['pushbound_5',['PushBound',['../structjs_consumer_info.html#a31282cdc72000a91af03f89899740bfa',1,'jsConsumerInfo']]]
+];
diff --git a/doc/html/search/classes_0.html b/doc/html/search/classes_0.html
new file mode 100644 (file)
index 0000000..8361bcd
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="classes_0.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/classes_0.js b/doc/html/search/classes_0.js
new file mode 100644 (file)
index 0000000..e993817
--- /dev/null
@@ -0,0 +1,41 @@
+var searchData=
+[
+  ['jsaccountinfo_0',['jsAccountInfo',['../structjs_account_info.html',1,'']]],
+  ['jsaccountlimits_1',['jsAccountLimits',['../structjs_account_limits.html',1,'']]],
+  ['jsapistats_2',['jsAPIStats',['../structjs_a_p_i_stats.html',1,'']]],
+  ['jsclusterinfo_3',['jsClusterInfo',['../structjs_cluster_info.html',1,'']]],
+  ['jsconsumerconfig_4',['jsConsumerConfig',['../structjs_consumer_config.html',1,'']]],
+  ['jsconsumerinfo_5',['jsConsumerInfo',['../structjs_consumer_info.html',1,'']]],
+  ['jsconsumerinfolist_6',['jsConsumerInfoList',['../structjs_consumer_info_list.html',1,'']]],
+  ['jsconsumernameslist_7',['jsConsumerNamesList',['../structjs_consumer_names_list.html',1,'']]],
+  ['jsconsumersequencemismatch_8',['jsConsumerSequenceMismatch',['../structjs_consumer_sequence_mismatch.html',1,'']]],
+  ['jsdirectgetmsgoptions_9',['jsDirectGetMsgOptions',['../structjs_direct_get_msg_options.html',1,'']]],
+  ['jsexternalstream_10',['jsExternalStream',['../structjs_external_stream.html',1,'']]],
+  ['jsfetchrequest_11',['jsFetchRequest',['../structjs_fetch_request.html',1,'']]],
+  ['jsloststreamdata_12',['jsLostStreamData',['../structjs_lost_stream_data.html',1,'']]],
+  ['jsmsgmetadata_13',['jsMsgMetaData',['../structjs_msg_meta_data.html',1,'']]],
+  ['jsoptions_14',['jsOptions',['../structjs_options.html',1,'']]],
+  ['jsoptionspublishasync_15',['jsOptionsPublishAsync',['../structjs_options_1_1js_options_publish_async.html',1,'jsOptions']]],
+  ['jsoptionsstream_16',['jsOptionsStream',['../structjs_options_1_1js_options_stream.html',1,'jsOptions']]],
+  ['jsoptionsstreaminfo_17',['jsOptionsStreamInfo',['../structjs_options_1_1js_options_stream_1_1js_options_stream_info.html',1,'jsOptions::jsOptionsStream']]],
+  ['jsoptionsstreampurge_18',['jsOptionsStreamPurge',['../structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html',1,'jsOptions::jsOptionsStream']]],
+  ['jspeerinfo_19',['jsPeerInfo',['../structjs_peer_info.html',1,'']]],
+  ['jsplacement_20',['jsPlacement',['../structjs_placement.html',1,'']]],
+  ['jspuback_21',['jsPubAck',['../structjs_pub_ack.html',1,'']]],
+  ['jspubackerr_22',['jsPubAckErr',['../structjs_pub_ack_err.html',1,'']]],
+  ['jspuboptions_23',['jsPubOptions',['../structjs_pub_options.html',1,'']]],
+  ['jsrepublish_24',['jsRePublish',['../structjs_re_publish.html',1,'']]],
+  ['jssequenceinfo_25',['jsSequenceInfo',['../structjs_sequence_info.html',1,'']]],
+  ['jssequencepair_26',['jsSequencePair',['../structjs_sequence_pair.html',1,'']]],
+  ['jsstreamconfig_27',['jsStreamConfig',['../structjs_stream_config.html',1,'']]],
+  ['jsstreaminfo_28',['jsStreamInfo',['../structjs_stream_info.html',1,'']]],
+  ['jsstreaminfolist_29',['jsStreamInfoList',['../structjs_stream_info_list.html',1,'']]],
+  ['jsstreamnameslist_30',['jsStreamNamesList',['../structjs_stream_names_list.html',1,'']]],
+  ['jsstreamsource_31',['jsStreamSource',['../structjs_stream_source.html',1,'']]],
+  ['jsstreamsourceinfo_32',['jsStreamSourceInfo',['../structjs_stream_source_info.html',1,'']]],
+  ['jsstreamstate_33',['jsStreamState',['../structjs_stream_state.html',1,'']]],
+  ['jsstreamstatesubject_34',['jsStreamStateSubject',['../structjs_stream_state_subject.html',1,'']]],
+  ['jsstreamstatesubjects_35',['jsStreamStateSubjects',['../structjs_stream_state_subjects.html',1,'']]],
+  ['jssuboptions_36',['jsSubOptions',['../structjs_sub_options.html',1,'']]],
+  ['jstier_37',['jsTier',['../structjs_tier.html',1,'']]]
+];
diff --git a/doc/html/search/classes_1.html b/doc/html/search/classes_1.html
new file mode 100644 (file)
index 0000000..3c668de
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="classes_1.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/classes_1.js b/doc/html/search/classes_1.js
new file mode 100644 (file)
index 0000000..aab5af1
--- /dev/null
@@ -0,0 +1,8 @@
+var searchData=
+[
+  ['kvconfig_0',['kvConfig',['../structkv_config.html',1,'']]],
+  ['kventrylist_1',['kvEntryList',['../structkv_entry_list.html',1,'']]],
+  ['kvkeyslist_2',['kvKeysList',['../structkv_keys_list.html',1,'']]],
+  ['kvpurgeoptions_3',['kvPurgeOptions',['../structkv_purge_options.html',1,'']]],
+  ['kvwatchoptions_4',['kvWatchOptions',['../structkv_watch_options.html',1,'']]]
+];
diff --git a/doc/html/search/classes_2.html b/doc/html/search/classes_2.html
new file mode 100644 (file)
index 0000000..868c172
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="classes_2.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/classes_2.js b/doc/html/search/classes_2.js
new file mode 100644 (file)
index 0000000..7f96df8
--- /dev/null
@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['natsmsglist_0',['natsMsgList',['../structnats_msg_list.html',1,'']]]
+];
diff --git a/doc/html/search/close.png b/doc/html/search/close.png
new file mode 100644 (file)
index 0000000..9342d3d
Binary files /dev/null and b/doc/html/search/close.png differ
diff --git a/doc/html/search/close.svg b/doc/html/search/close.svg
new file mode 100644 (file)
index 0000000..a933eea
--- /dev/null
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   viewBox="0 0 11 11"
+   height="11"
+   width="11"
+   id="svg2"
+   version="1.1">
+  <metadata
+     id="metadata8">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs6" />
+  <path
+     id="path12"
+     d="M 5.5 0.5 A 5 5 0 0 0 0.5 5.5 A 5 5 0 0 0 5.5 10.5 A 5 5 0 0 0 10.5 5.5 A 5 5 0 0 0 5.5 0.5 z M 3.5820312 3 A 0.58291923 0.58291923 0 0 1 4 3.1757812 L 5.5 4.6757812 L 7 3.1757812 A 0.58291923 0.58291923 0 0 1 7.4003906 3 A 0.58291923 0.58291923 0 0 1 7.8242188 4 L 6.3242188 5.5 L 7.8242188 7 A 0.58291923 0.58291923 0 1 1 7 7.8242188 L 5.5 6.3242188 L 4 7.8242188 A 0.58291923 0.58291923 0 1 1 3.1757812 7 L 4.6757812 5.5 L 3.1757812 4 A 0.58291923 0.58291923 0 0 1 3.5820312 3 z "
+     style="stroke-width:1.09870648;fill:#bababa;fill-opacity:1" />
+</svg>
diff --git a/doc/html/search/defines_0.html b/doc/html/search/defines_0.html
new file mode 100644 (file)
index 0000000..fd147db
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="defines_0.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/defines_0.js b/doc/html/search/defines_0.js
new file mode 100644 (file)
index 0000000..d07fe6c
--- /dev/null
@@ -0,0 +1,12 @@
+var searchData=
+[
+  ['jslastsequence_0',['JSLastSequence',['../nats_8h.html#ae18fb15ea8130a650e904e5153eb30d5',1,'nats.h']]],
+  ['jsmsgrollup_1',['JSMsgRollup',['../nats_8h.html#a3938efee417dc67ff2bcf62f913f9054',1,'nats.h']]],
+  ['jsmsgrollupall_2',['JSMsgRollupAll',['../nats_8h.html#acc62d11b7e67fe3feb74acdfa4a6e8ac',1,'nats.h']]],
+  ['jsmsgrollupsubject_3',['JSMsgRollupSubject',['../nats_8h.html#ad22dce8f66bae9b3e1027790d9c95c09',1,'nats.h']]],
+  ['jsmsgsize_4',['JSMsgSize',['../nats_8h.html#a5ce9005964bd9cf0604a9ef1afa87ea4',1,'nats.h']]],
+  ['jssequence_5',['JSSequence',['../nats_8h.html#a1c0a11996b44abc16a4f444ee4c1cb94',1,'nats.h']]],
+  ['jsstream_6',['JSStream',['../nats_8h.html#aa2f2c14de864839a2ff7ea34415d37e0',1,'nats.h']]],
+  ['jssubject_7',['JSSubject',['../nats_8h.html#a3776aa9985557f0c6e382b01d2e3f602',1,'nats.h']]],
+  ['jstimestamp_8',['JSTimeStamp',['../nats_8h.html#a5525cb01f8b0aec73cb13f3276449e0e',1,'nats.h']]]
+];
diff --git a/doc/html/search/defines_1.html b/doc/html/search/defines_1.html
new file mode 100644 (file)
index 0000000..517e9fc
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="defines_1.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/defines_1.js b/doc/html/search/defines_1.js
new file mode 100644 (file)
index 0000000..256259b
--- /dev/null
@@ -0,0 +1,5 @@
+var searchData=
+[
+  ['nats_5fdefault_5furl_0',['NATS_DEFAULT_URL',['../nats_8h.html#a911c54900b46b968205871cd9f68d36c',1,'nats.h']]],
+  ['nats_5fextern_1',['NATS_EXTERN',['../nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad',1,'nats.h']]]
+];
diff --git a/doc/html/search/enums_0.html b/doc/html/search/enums_0.html
new file mode 100644 (file)
index 0000000..eb1f873
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="enums_0.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/enums_0.js b/doc/html/search/enums_0.js
new file mode 100644 (file)
index 0000000..c5803b4
--- /dev/null
@@ -0,0 +1,10 @@
+var searchData=
+[
+  ['jsackpolicy_0',['jsAckPolicy',['../group__types_group.html#ga8fcb50e6e7312834791f9e237d28e873',1,'nats.h']]],
+  ['jsdeliverpolicy_1',['jsDeliverPolicy',['../group__types_group.html#ga117ed2c35f89ef3144540ed9cbadc818',1,'nats.h']]],
+  ['jsdiscardpolicy_2',['jsDiscardPolicy',['../group__types_group.html#ga7f88b7d482488398074f9d1419a9b8c2',1,'nats.h']]],
+  ['jserrcode_3',['jsErrCode',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70',1,'status.h']]],
+  ['jsreplaypolicy_4',['jsReplayPolicy',['../group__types_group.html#ga8650faf52b0b6b23df376eebeb9d0354',1,'nats.h']]],
+  ['jsretentionpolicy_5',['jsRetentionPolicy',['../group__types_group.html#ga410f8fb053efa02b2ca1de0c02fa4b6d',1,'nats.h']]],
+  ['jsstoragetype_6',['jsStorageType',['../group__types_group.html#ga1802a53c79e667f093bba033b16adc98',1,'nats.h']]]
+];
diff --git a/doc/html/search/enums_1.html b/doc/html/search/enums_1.html
new file mode 100644 (file)
index 0000000..722aa39
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="enums_1.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/enums_1.js b/doc/html/search/enums_1.js
new file mode 100644 (file)
index 0000000..eb3eb64
--- /dev/null
@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['kvoperation_0',['kvOperation',['../group__types_group.html#ga89db3bd6bf11af3ac5eb3ab560d16332',1,'nats.h']]]
+];
diff --git a/doc/html/search/enums_2.html b/doc/html/search/enums_2.html
new file mode 100644 (file)
index 0000000..aed52a9
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="enums_2.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/enums_2.js b/doc/html/search/enums_2.js
new file mode 100644 (file)
index 0000000..450eab5
--- /dev/null
@@ -0,0 +1,5 @@
+var searchData=
+[
+  ['natsconnstatus_0',['natsConnStatus',['../status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51',1,'status.h']]],
+  ['natsstatus_1',['natsStatus',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80',1,'status.h']]]
+];
diff --git a/doc/html/search/enumvalues_0.html b/doc/html/search/enumvalues_0.html
new file mode 100644 (file)
index 0000000..7a520ff
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="enumvalues_0.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/enumvalues_0.js b/doc/html/search/enumvalues_0.js
new file mode 100644 (file)
index 0000000..6a657b2
--- /dev/null
@@ -0,0 +1,145 @@
+var searchData=
+[
+  ['js_5fackall_0',['js_AckAll',['../group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873a1232af28bf4e4b82e962174f1432ed4a',1,'nats.h']]],
+  ['js_5fackexplicit_1',['js_AckExplicit',['../group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873a02d46a6395933c55c95ee5194bb6b80e',1,'nats.h']]],
+  ['js_5facknone_2',['js_AckNone',['../group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873afd91fe31cf57c68863ca3090b07c296c',1,'nats.h']]],
+  ['js_5fdeliverall_3',['js_DeliverAll',['../group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818ac692ba1363103768ac4bb58695549758',1,'nats.h']]],
+  ['js_5fdeliverbystartsequence_4',['js_DeliverByStartSequence',['../group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a06299d9c8262a16306ba6cc16d293c5e',1,'nats.h']]],
+  ['js_5fdeliverbystarttime_5',['js_DeliverByStartTime',['../group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a33317133d42f21bf5919827a691543f6',1,'nats.h']]],
+  ['js_5fdeliverlast_6',['js_DeliverLast',['../group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818abbd81d6c4e0f17f30e2186f1335e991d',1,'nats.h']]],
+  ['js_5fdeliverlastpersubject_7',['js_DeliverLastPerSubject',['../group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818abb50ebcd2fbafe27038c966121b9407b',1,'nats.h']]],
+  ['js_5fdelivernew_8',['js_DeliverNew',['../group__types_group.html#gga117ed2c35f89ef3144540ed9cbadc818a82b8d36e17391212398984f92db9c381',1,'nats.h']]],
+  ['js_5fdiscardnew_9',['js_DiscardNew',['../group__types_group.html#gga7f88b7d482488398074f9d1419a9b8c2a99d7f2d740af26c340c0a4e2b72fb6ab',1,'nats.h']]],
+  ['js_5fdiscardold_10',['js_DiscardOld',['../group__types_group.html#gga7f88b7d482488398074f9d1419a9b8c2abb31b828421634f1e6a1ef9359bc91f6',1,'nats.h']]],
+  ['js_5ffilestorage_11',['js_FileStorage',['../group__types_group.html#gga1802a53c79e667f093bba033b16adc98a1d9dad1854cf374b22e3688b98284dec',1,'nats.h']]],
+  ['js_5finterestpolicy_12',['js_InterestPolicy',['../group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6dae874de4a787cfbec4c6d0eb1a3f05ebd',1,'nats.h']]],
+  ['js_5flimitspolicy_13',['js_LimitsPolicy',['../group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6da6a2aa02f32acec6526d81f6e974e690f',1,'nats.h']]],
+  ['js_5fmemorystorage_14',['js_MemoryStorage',['../group__types_group.html#gga1802a53c79e667f093bba033b16adc98a428ed10448726ad01c1db77a7f748314',1,'nats.h']]],
+  ['js_5freplayinstant_15',['js_ReplayInstant',['../group__types_group.html#gga8650faf52b0b6b23df376eebeb9d0354a2c4a1e2b75f31dd69a89b541d75afa44',1,'nats.h']]],
+  ['js_5freplayoriginal_16',['js_ReplayOriginal',['../group__types_group.html#gga8650faf52b0b6b23df376eebeb9d0354a6ee3851dac5c90a61492193dd55931f5',1,'nats.h']]],
+  ['js_5fworkqueuepolicy_17',['js_WorkQueuePolicy',['../group__types_group.html#gga410f8fb053efa02b2ca1de0c02fa4b6daf7e6581e69572691b01d1294a3c3a478',1,'nats.h']]],
+  ['jsaccountresourcesexceedederr_18',['JSAccountResourcesExceededErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a26a33a6e2296eb0ac0370176fb08ed9a',1,'status.h']]],
+  ['jsbadrequesterr_19',['JSBadRequestErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70acedca75c7ec69c5573da7013f69ede13',1,'status.h']]],
+  ['jsclusterincompleteerr_20',['JSClusterIncompleteErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aea64a5a017836108cf3da113ad57b6f9',1,'status.h']]],
+  ['jsclusternopeerserr_21',['JSClusterNoPeersErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae9b8b81043fea45985f8c29f108594fb',1,'status.h']]],
+  ['jsclusternotactiveerr_22',['JSClusterNotActiveErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af1efbfa8ad648bf47b4304ea58b0df8c',1,'status.h']]],
+  ['jsclusternotassignederr_23',['JSClusterNotAssignedErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a99265bcfa283741c3711337dac6718f0',1,'status.h']]],
+  ['jsclusternotavailerr_24',['JSClusterNotAvailErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4ae7ffdfb53fb238a76ebe19c7482696',1,'status.h']]],
+  ['jsclusternotleadererr_25',['JSClusterNotLeaderErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a32546264d1f24fc9dafe490212bfd893',1,'status.h']]],
+  ['jsclusterpeernotmembererr_26',['JSClusterPeerNotMemberErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae7479c265d0e8cace4ab19a59cfcbbbb',1,'status.h']]],
+  ['jsclusterrequirederr_27',['JSClusterRequiredErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a46321fc22a103908324b72259832af60',1,'status.h']]],
+  ['jsclusterservernotmembererr_28',['JSClusterServerNotMemberErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aafa71c9cafc975d1a69889f6bf166e93',1,'status.h']]],
+  ['jsclustertagserr_29',['JSClusterTagsErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a66240027007033c67fec04f4298311c4',1,'status.h']]],
+  ['jsclusterunsupportfeatureerr_30',['JSClusterUnSupportFeatureErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a84864e4bba24ee7354e5bae293c93d00',1,'status.h']]],
+  ['jsconsumerbaddurablenameerr_31',['JSConsumerBadDurableNameErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa0ca5a2e539cec9d33f433f28f2780fe',1,'status.h']]],
+  ['jsconsumerconfigrequirederr_32',['JSConsumerConfigRequiredErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4a95591dfc0e2ccb1d3ac1b3a04f618f',1,'status.h']]],
+  ['jsconsumercreateerr_33',['JSConsumerCreateErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af86c9c188aaa34a76eee96de9bf6e989',1,'status.h']]],
+  ['jsconsumerdelivercycleerr_34',['JSConsumerDeliverCycleErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70afc70c6a72061d9c26017a5cf5dec729b',1,'status.h']]],
+  ['jsconsumerdelivertowildcardserr_35',['JSConsumerDeliverToWildcardsErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4712c1322585d712cef9b67cd03a3e00',1,'status.h']]],
+  ['jsconsumerdescriptiontoolongerr_36',['JSConsumerDescriptionTooLongErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab1b6c048b0326e3f705b470e5a7f11f5',1,'status.h']]],
+  ['jsconsumerdirectrequiresephemeralerr_37',['JSConsumerDirectRequiresEphemeralErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6181f797cb27c92473585893b92b95b0',1,'status.h']]],
+  ['jsconsumerdirectrequirespusherr_38',['JSConsumerDirectRequiresPushErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a968eff1142ca2f39f3da3da175aeda92',1,'status.h']]],
+  ['jsconsumerdurablenamenotinsubjecterr_39',['JSConsumerDurableNameNotInSubjectErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aff9a4fe19078ac3e814989442beaa3a6',1,'status.h']]],
+  ['jsconsumerdurablenamenotmatchsubjecterr_40',['JSConsumerDurableNameNotMatchSubjectErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a17c212f9409e4bd9db060bd2796905e4',1,'status.h']]],
+  ['jsconsumerdurablenamenotseterr_41',['JSConsumerDurableNameNotSetErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9d9319d172e0a8147949bf40f1b29f28',1,'status.h']]],
+  ['jsconsumerephemeralwithdurableinsubjecterr_42',['JSConsumerEphemeralWithDurableInSubjectErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4ef7a2042b48d5e0916e7e90fe691ab3',1,'status.h']]],
+  ['jsconsumerephemeralwithdurablenameerr_43',['JSConsumerEphemeralWithDurableNameErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1381bb653998c6ca8b88002d0fe0c829',1,'status.h']]],
+  ['jsconsumerexistingactiveerr_44',['JSConsumerExistingActiveErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a86407070c2bbe04d97a25f2ceda4ea58',1,'status.h']]],
+  ['jsconsumerfcrequirespusherr_45',['JSConsumerFCRequiresPushErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a557d48b0334c5ceec0f0ee7cc74d8e79',1,'status.h']]],
+  ['jsconsumerfilternotsubseterr_46',['JSConsumerFilterNotSubsetErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a0f2007fc94103909ece328bbd77b0cdb',1,'status.h']]],
+  ['jsconsumerhbrequirespusherr_47',['JSConsumerHBRequiresPushErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6d4bed940055aa46a188a2419a531c63',1,'status.h']]],
+  ['jsconsumerinvaliddeliversubjecterr_48',['JSConsumerInvalidDeliverSubjectErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa1242d9e6509f08c01c3373d0e66dc96',1,'status.h']]],
+  ['jsconsumerinvalidpolicyerr_49',['JSConsumerInvalidPolicyErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a801182af5b4a6b9547d81ec45864b1f3',1,'status.h']]],
+  ['jsconsumerinvalidsamplingerr_50',['JSConsumerInvalidSamplingErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab19f95018dff644423d6f34b682d365e',1,'status.h']]],
+  ['jsconsumermaxdeliverbackofferr_51',['JSConsumerMaxDeliverBackoffErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af7c1cf2c692140c4b28ebfc47acb0c41',1,'status.h']]],
+  ['jsconsumermaxpendingackexcesserr_52',['JSConsumerMaxPendingAckExcessErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ac4afe1d580083bd55c36b3e55a5ef479',1,'status.h']]],
+  ['jsconsumermaxpendingackpolicyrequirederr_53',['JSConsumerMaxPendingAckPolicyRequiredErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a429a21189134500589ed67ac3701aff4',1,'status.h']]],
+  ['jsconsumermaxrequestbatchexceedederr_54',['JSConsumerMaxRequestBatchExceededErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a597c98a0637cec454b724b049098cee8',1,'status.h']]],
+  ['jsconsumermaxrequestbatchnegativeerr_55',['JSConsumerMaxRequestBatchNegativeErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abca8571110c4244d218c2dc1779d8786',1,'status.h']]],
+  ['jsconsumermaxrequestexpirestosmallerr_56',['JSConsumerMaxRequestExpiresToSmallErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9c1c31813a713fcee44ec06728cc6382',1,'status.h']]],
+  ['jsconsumermaxwaitingnegativeerr_57',['JSConsumerMaxWaitingNegativeErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a27579bca64e6f40f9590ef51ac03a219',1,'status.h']]],
+  ['jsconsumernameexisterr_58',['JSConsumerNameExistErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4f59c55a24136405b6767e0bf21182c8',1,'status.h']]],
+  ['jsconsumernametoolongerr_59',['JSConsumerNameTooLongErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3b1ce6536b249952dc3fb6fe5448140f',1,'status.h']]],
+  ['jsconsumernotfounderr_60',['JSConsumerNotFoundErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9eef13e3281a879f36a30e246fb6021b',1,'status.h']]],
+  ['jsconsumerofflineerr_61',['JSConsumerOfflineErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa0eb191886a17e917f2fa0eaa81d4b61',1,'status.h']]],
+  ['jsconsumeronmappederr_62',['JSConsumerOnMappedErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6b6aaaa23b1af2caf959529287b2a847',1,'status.h']]],
+  ['jsconsumerpullnotdurableerr_63',['JSConsumerPullNotDurableErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a407efbf6c688cb93fcded08acd2a08ed',1,'status.h']]],
+  ['jsconsumerpullrequiresackerr_64',['JSConsumerPullRequiresAckErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abd3f17c5d6ea86c38c3d8ade18b8445a',1,'status.h']]],
+  ['jsconsumerpullwithratelimiterr_65',['JSConsumerPullWithRateLimitErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2a8844e5d20c55d753ec64bbde4561c8',1,'status.h']]],
+  ['jsconsumerpushmaxwaitingerr_66',['JSConsumerPushMaxWaitingErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a914926025dffa9c9b9604646b9e5675e',1,'status.h']]],
+  ['jsconsumerreplacementwithdifferentnameerr_67',['JSConsumerReplacementWithDifferentNameErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a051bfd5e3bb9ba2b2398e6501426bc63',1,'status.h']]],
+  ['jsconsumerreplicasexceedsstreamerr_68',['JSConsumerReplicasExceedsStreamErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1d159f128cd9b261b5270f7e36ed22d1',1,'status.h']]],
+  ['jsconsumersmallheartbeaterr_69',['JSConsumerSmallHeartbeatErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9422b53061166a064e39d360d21827fd',1,'status.h']]],
+  ['jsconsumerstorefailederr_70',['JSConsumerStoreFailedErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2984e6b8850b6cfed9506a25bcbe0608',1,'status.h']]],
+  ['jsconsumerwithflowcontrolneedsheartbeatserr_71',['JSConsumerWithFlowControlNeedsHeartbeatsErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abc25cc794fce2ab7b9757ff506de51c3',1,'status.h']]],
+  ['jsconsumerwqconsumernotdeliverallerr_72',['JSConsumerWQConsumerNotDeliverAllErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a00b4ce854e473bb8f49d91c0f982c6f9',1,'status.h']]],
+  ['jsconsumerwqconsumernotuniqueerr_73',['JSConsumerWQConsumerNotUniqueErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a5f7b670b9202311da41e6e5026e810d2',1,'status.h']]],
+  ['jsconsumerwqmultipleunfilterederr_74',['JSConsumerWQMultipleUnfilteredErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7adbc8c115996a6f0dfc98fcaac8f09d',1,'status.h']]],
+  ['jsconsumerwqrequiresexplicitackerr_75',['JSConsumerWQRequiresExplicitAckErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a76dad06168a8d57e829876c2fcd3af56',1,'status.h']]],
+  ['jsinsufficientresourceserr_76',['JSInsufficientResourcesErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ad1ec102705e46b5343c2680162f58f49',1,'status.h']]],
+  ['jsinvalidjsonerr_77',['JSInvalidJSONErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a50c0beab390506fc6d3495325c0230c1',1,'status.h']]],
+  ['jsmaximumconsumerslimiterr_78',['JSMaximumConsumersLimitErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa1b904de1494d20f540c8075f502af24',1,'status.h']]],
+  ['jsmaximumstreamslimiterr_79',['JSMaximumStreamsLimitErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a739799359c3988ea18fe861eaff6f1f5',1,'status.h']]],
+  ['jsmemoryresourcesexceedederr_80',['JSMemoryResourcesExceededErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae3ac6ea1656f4fcc750ba2ab1649fb57',1,'status.h']]],
+  ['jsmirrorconsumersetupfailederr_81',['JSMirrorConsumerSetupFailedErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a94a9b10d712ed764de27a007ac7f04eb',1,'status.h']]],
+  ['jsmirrormaxmessagesizetoobigerr_82',['JSMirrorMaxMessageSizeTooBigErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a91020cf9692a06637bdfedd847b259f1',1,'status.h']]],
+  ['jsmirrorwithsourceserr_83',['JSMirrorWithSourcesErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aaad93c7c34cd3283df7369479d4cdb7c',1,'status.h']]],
+  ['jsmirrorwithstartseqandtimeerr_84',['JSMirrorWithStartSeqAndTimeErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a600ddc1915d8bb928fd37f1539440eb3',1,'status.h']]],
+  ['jsmirrorwithsubjectfilterserr_85',['JSMirrorWithSubjectFiltersErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70afcfb372eb2a607f821ad110815acf9d7',1,'status.h']]],
+  ['jsmirrorwithsubjectserr_86',['JSMirrorWithSubjectsErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a0dc0fcc88a8b39f03924d50ccf731043',1,'status.h']]],
+  ['jsnoaccounterr_87',['JSNoAccountErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a91773a41522fe9a464a0fb28a96b497b',1,'status.h']]],
+  ['jsnolimitserr_88',['JSNoLimitsErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70acfa2c06f8baef07cd96a3627ddea641b',1,'status.h']]],
+  ['jsnomessagefounderr_89',['JSNoMessageFoundErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a02a521ae52b716a669a3556d63a21410',1,'status.h']]],
+  ['jsnotemptyrequesterr_90',['JSNotEmptyRequestErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab23b8553efea2ee0008098fcb109f690',1,'status.h']]],
+  ['jsnotenablederr_91',['JSNotEnabledErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70afe9c20cdb1e88744d9a5f52977e95d1c',1,'status.h']]],
+  ['jsnotenabledforaccounterr_92',['JSNotEnabledForAccountErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa88122abfaf173f0411a3642803aac04',1,'status.h']]],
+  ['jspeerremaperr_93',['JSPeerRemapErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4d68fa855750f16fdf38c9ed93acacda',1,'status.h']]],
+  ['jsraftgeneralerr_94',['JSRaftGeneralErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa023de74e8bedf88c2f5e4b21e62ea4b',1,'status.h']]],
+  ['jsrestoresubscribefailederr_95',['JSRestoreSubscribeFailedErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4963c5ecd065d3e336daf80a7cd1aa57',1,'status.h']]],
+  ['jssequencenotfounderr_96',['JSSequenceNotFoundErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1eaa16332bbe6cb041adbb60383f944c',1,'status.h']]],
+  ['jssnapshotdeliversubjectinvaliderr_97',['JSSnapshotDeliverSubjectInvalidErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae4eaa258a64f5c12d7fe50ce4c9c6de5',1,'status.h']]],
+  ['jssourceconsumersetupfailederr_98',['JSSourceConsumerSetupFailedErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aeaeb1f487667a8d7643cc97bf7b3892a',1,'status.h']]],
+  ['jssourcemaxmessagesizetoobigerr_99',['JSSourceMaxMessageSizeTooBigErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ac75e39643f73b184b22330939c4a564e',1,'status.h']]],
+  ['jsstorageresourcesexceedederr_100',['JSStorageResourcesExceededErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2f4ee662c9cbaa0355c52de1c2463160',1,'status.h']]],
+  ['jsstreamassignmenterr_101',['JSStreamAssignmentErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2107facbac830a905217916c7d24297a',1,'status.h']]],
+  ['jsstreamcreateerr_102',['JSStreamCreateErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a866a56223b3e4119184cee9523f98008',1,'status.h']]],
+  ['jsstreamdeleteerr_103',['JSStreamDeleteErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a85f7eee9cccd626e7b99d46c6f076322',1,'status.h']]],
+  ['jsstreamexternalapioverlaperr_104',['JSStreamExternalApiOverlapErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3799b98b675eeca3403a1728bd0cd5f8',1,'status.h']]],
+  ['jsstreamexternaldelprefixoverlapserr_105',['JSStreamExternalDelPrefixOverlapsErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aea055a7802194f8f1e802a8fc461f83a',1,'status.h']]],
+  ['jsstreamgeneralerror_106',['JSStreamGeneralError',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abc4bf9a7703ef8d3fbf2b1ad2ece3717',1,'status.h']]],
+  ['jsstreaminfomaxsubjectserr_107',['JSStreamInfoMaxSubjectsErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7b5cebb5aaebd7b3bfa43f5457e97553',1,'status.h']]],
+  ['jsstreaminvalidconfig_108',['JSStreamInvalidConfig',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a0c34c56b62e4246560efabd5c762aa03',1,'status.h']]],
+  ['jsstreaminvaliderr_109',['JSStreamInvalidErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af0506e3abc3846721ae15755c2a1eb47',1,'status.h']]],
+  ['jsstreaminvalidexternaldeliverysubjerr_110',['JSStreamInvalidExternalDeliverySubjErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7a89433d532a863561087229b19a525f',1,'status.h']]],
+  ['jsstreamlimitserr_111',['JSStreamLimitsErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4f192c39f1d7244ceb639053fad86393',1,'status.h']]],
+  ['jsstreammaxbytesrequirederr_112',['JSStreamMaxBytesRequiredErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a61cd7aa9b9e02f410465a61a085fa209',1,'status.h']]],
+  ['jsstreammaxstreambytesexceedederr_113',['JSStreamMaxStreamBytesExceededErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a60fd558fc8d0f31b895c7b579ba0c8b7',1,'status.h']]],
+  ['jsstreammessageexceedsmaximumerr_114',['JSStreamMessageExceedsMaximumErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a519d32e9718662347753ebffaf731889',1,'status.h']]],
+  ['jsstreammirrornotupdatableerr_115',['JSStreamMirrorNotUpdatableErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a54084c4f82593cf516cd604b34c0dce8',1,'status.h']]],
+  ['jsstreammismatcherr_116',['JSStreamMismatchErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a80d0a9f218207a11b4cc19b9c2aec83f',1,'status.h']]],
+  ['jsstreammoveandscaleerr_117',['JSStreamMoveAndScaleErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a584d0bf058191cf2257d934f0bc5935c',1,'status.h']]],
+  ['jsstreammoveinprogresserr_118',['JSStreamMoveInProgressErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abf7739c7a0569149ed24ae8b9fbaf889',1,'status.h']]],
+  ['jsstreammsgdeletefailed_119',['JSStreamMsgDeleteFailed',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab379e2a2038276dc1eb539bda2e60b68',1,'status.h']]],
+  ['jsstreamnameexisterr_120',['JSStreamNameExistErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af68cc43ff7ed51f5557329c35fba949c',1,'status.h']]],
+  ['jsstreamnotfounderr_121',['JSStreamNotFoundErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6a2a1cbd9c2e2dc6dff4fb84be741e0f',1,'status.h']]],
+  ['jsstreamnotmatcherr_122',['JSStreamNotMatchErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6b4c22a03ad4769d09599ac9a75e6435',1,'status.h']]],
+  ['jsstreamofflineerr_123',['JSStreamOfflineErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7c88e5ccabcb2debe1ce0c1a05bbe18b',1,'status.h']]],
+  ['jsstreampurgefailederr_124',['JSStreamPurgeFailedErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a33f2e301313339eded6163982a680186',1,'status.h']]],
+  ['jsstreamreplicasnotsupportederr_125',['JSStreamReplicasNotSupportedErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a8f7f888318e9107bb361d4946197c4c1',1,'status.h']]],
+  ['jsstreamreplicasnotupdatableerr_126',['JSStreamReplicasNotUpdatableErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a58db02b3e72f3b20300344f97c5c7b34',1,'status.h']]],
+  ['jsstreamrestoreerr_127',['JSStreamRestoreErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab5213fbb08e833e1c69b8c93c8114506',1,'status.h']]],
+  ['jsstreamrollupfailederr_128',['JSStreamRollupFailedErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70affa3c8139019a077fac6d403d7ed0522',1,'status.h']]],
+  ['jsstreamsealederr_129',['JSStreamSealedErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9bd3f4f7a2eca1f1ed49cc0499cb9c78',1,'status.h']]],
+  ['jsstreamsequencenotmatcherr_130',['JSStreamSequenceNotMatchErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a64dbcba923d50e6f258db59b85eb8b17',1,'status.h']]],
+  ['jsstreamsnapshoterr_131',['JSStreamSnapshotErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ac3d700ce84bc5df96c383079b093cc45',1,'status.h']]],
+  ['jsstreamstorefailederr_132',['JSStreamStoreFailedErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab7df189a360a1d483f9eca4869abdca8',1,'status.h']]],
+  ['jsstreamsubjectoverlaperr_133',['JSStreamSubjectOverlapErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3e55a221685d96d96c514d6d5c652570',1,'status.h']]],
+  ['jsstreamtemplatecreateerr_134',['JSStreamTemplateCreateErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1efc26df606f855cfb9993cbe95c0f46',1,'status.h']]],
+  ['jsstreamtemplatedeleteerr_135',['JSStreamTemplateDeleteErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a514184778ad2fa5cf2deaffc0c406272',1,'status.h']]],
+  ['jsstreamtemplatenotfounderr_136',['JSStreamTemplateNotFoundErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3552ffc73e39c13d14ae35f52cd3ead7',1,'status.h']]],
+  ['jsstreamupdateerr_137',['JSStreamUpdateErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a475581c5dfbabb52334ce28013382b58',1,'status.h']]],
+  ['jsstreamwronglastmsgiderr_138',['JSStreamWrongLastMsgIDErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70adc58d142e277166a57672812df6f2c3e',1,'status.h']]],
+  ['jsstreamwronglastsequenceerr_139',['JSStreamWrongLastSequenceErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aaa5d8be08323568b5f7295feb10d73b4',1,'status.h']]],
+  ['jstemplatenamenotmatchsubjecterr_140',['JSTemplateNameNotMatchSubjectErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab9e493c8837af5f62c6110493c6a70ac',1,'status.h']]],
+  ['jstempstoragefailederr_141',['JSTempStorageFailedErr',['../status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ad07006ca41165d13442df8e62ef3f398',1,'status.h']]]
+];
diff --git a/doc/html/search/enumvalues_1.html b/doc/html/search/enumvalues_1.html
new file mode 100644 (file)
index 0000000..d2e2ce0
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="enumvalues_1.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/enumvalues_1.js b/doc/html/search/enumvalues_1.js
new file mode 100644 (file)
index 0000000..970a35d
--- /dev/null
@@ -0,0 +1,7 @@
+var searchData=
+[
+  ['kvop_5fdelete_0',['kvOp_Delete',['../group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332a4efb91331f3307128c75af5b23362f83',1,'nats.h']]],
+  ['kvop_5fpurge_1',['kvOp_Purge',['../group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332aee19ab8144bf518e251ea2004309b657',1,'nats.h']]],
+  ['kvop_5fput_2',['kvOp_Put',['../group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332acc0e1da3c292cb7eb19d909c9dfd788a',1,'nats.h']]],
+  ['kvop_5funknown_3',['kvOp_Unknown',['../group__types_group.html#gga89db3bd6bf11af3ac5eb3ab560d16332a0b7a6bef67e4220f5f0c4075f2ed16b6',1,'nats.h']]]
+];
diff --git a/doc/html/search/enumvalues_2.html b/doc/html/search/enumvalues_2.html
new file mode 100644 (file)
index 0000000..9ecc4d3
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="enumvalues_2.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/enumvalues_2.js b/doc/html/search/enumvalues_2.js
new file mode 100644 (file)
index 0000000..6e9755d
--- /dev/null
@@ -0,0 +1,47 @@
+var searchData=
+[
+  ['nats_5faddress_5fmissing_0',['NATS_ADDRESS_MISSING',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80ae1d2c1366dbed428f6589f057acc507d',1,'status.h']]],
+  ['nats_5fconn_5fstatus_5fclosed_1',['NATS_CONN_STATUS_CLOSED',['../status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51aa78753a4de2d0379078bb09cdc1acdb2',1,'status.h']]],
+  ['nats_5fconn_5fstatus_5fconnected_2',['NATS_CONN_STATUS_CONNECTED',['../status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51a0dafab74b55f98cfc1d00e4d1ef38725',1,'status.h']]],
+  ['nats_5fconn_5fstatus_5fconnecting_3',['NATS_CONN_STATUS_CONNECTING',['../status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51a7e4d95cb29122f06e17ca4aff55cc736',1,'status.h']]],
+  ['nats_5fconn_5fstatus_5fdisconnected_4',['NATS_CONN_STATUS_DISCONNECTED',['../status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51a08f92960811d1ff05b91a0870b4ecb92',1,'status.h']]],
+  ['nats_5fconn_5fstatus_5fdraining_5fpubs_5',['NATS_CONN_STATUS_DRAINING_PUBS',['../status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51ac6b8b7f138f6ca285fe1f4da707b2100',1,'status.h']]],
+  ['nats_5fconn_5fstatus_5fdraining_5fsubs_6',['NATS_CONN_STATUS_DRAINING_SUBS',['../status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51ab6f9d121707673a61cbe2c591f64fbf1',1,'status.h']]],
+  ['nats_5fconn_5fstatus_5freconnecting_7',['NATS_CONN_STATUS_RECONNECTING',['../status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51acfdc4826e08ce4b59f901952038e9206',1,'status.h']]],
+  ['nats_5fconnection_5fauth_5ffailed_8',['NATS_CONNECTION_AUTH_FAILED',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a473ea6cfa03490838fafee8730b48a2a',1,'status.h']]],
+  ['nats_5fconnection_5fclosed_9',['NATS_CONNECTION_CLOSED',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a476d7bcf9a593b749e435f20a9156eff',1,'status.h']]],
+  ['nats_5fconnection_5fdisconnected_10',['NATS_CONNECTION_DISCONNECTED',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80abef517217119e8446a8e3382e1f37eb3',1,'status.h']]],
+  ['nats_5fdraining_11',['NATS_DRAINING',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a07fdbda44f43cef9866a75b25053c2ae',1,'status.h']]],
+  ['nats_5ferr_12',['NATS_ERR',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a40a08ae6ae17deaf390b1d0d7550791c',1,'status.h']]],
+  ['nats_5ffailed_5fto_5finitialize_13',['NATS_FAILED_TO_INITIALIZE',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a7cb64f52c8d91d6ade3db6bc82a96c42',1,'status.h']]],
+  ['nats_5fillegal_5fstate_14',['NATS_ILLEGAL_STATE',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9bb78b4f245d2870040d25c450febd4b',1,'status.h']]],
+  ['nats_5finsufficient_5fbuffer_15',['NATS_INSUFFICIENT_BUFFER',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a317fb9be1a80f6b1877f96a9a2db16ad',1,'status.h']]],
+  ['nats_5finvalid_5farg_16',['NATS_INVALID_ARG',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a71b57630aebf5c20eecdab832c2a9235',1,'status.h']]],
+  ['nats_5finvalid_5fqueue_5fname_17',['NATS_INVALID_QUEUE_NAME',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a8a0d239cfdfa30fe730afea65941779b',1,'status.h']]],
+  ['nats_5finvalid_5fsubject_18',['NATS_INVALID_SUBJECT',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a790c08a7d33e3aefce07c04120c4c19e',1,'status.h']]],
+  ['nats_5finvalid_5fsubscription_19',['NATS_INVALID_SUBSCRIPTION',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a273e92a0ff3b7eaf946b4b7fa6cc6c6c',1,'status.h']]],
+  ['nats_5finvalid_5ftimeout_20',['NATS_INVALID_TIMEOUT',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a827072fc245a99a60691e1e4b173ca86',1,'status.h']]],
+  ['nats_5fio_5ferror_21',['NATS_IO_ERROR',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a44e8b2590369fb01a1479719c97c2b6f',1,'status.h']]],
+  ['nats_5fline_5ftoo_5flong_22',['NATS_LINE_TOO_LONG',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a85c29dbfa6b06ffef3418cc9947ffff7',1,'status.h']]],
+  ['nats_5fmax_5fdelivered_5fmsgs_23',['NATS_MAX_DELIVERED_MSGS',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9a6f40b7803639ac18bdf532e93e5ad5',1,'status.h']]],
+  ['nats_5fmax_5fpayload_24',['NATS_MAX_PAYLOAD',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80af820300473609092a3e97a71b5af9ff9',1,'status.h']]],
+  ['nats_5fmismatch_25',['NATS_MISMATCH',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a22fa4802a34bac497f23e269a20a52f2',1,'status.h']]],
+  ['nats_5fmissed_5fheartbeat_26',['NATS_MISSED_HEARTBEAT',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a37d80c8232775339a32805fe93e0ea7f',1,'status.h']]],
+  ['nats_5fno_5fmemory_27',['NATS_NO_MEMORY',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a62ff6f5cc64399631defc0119731b514',1,'status.h']]],
+  ['nats_5fno_5fresponders_28',['NATS_NO_RESPONDERS',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80aab97324e40ccfe1360080c651c330e62',1,'status.h']]],
+  ['nats_5fno_5fserver_29',['NATS_NO_SERVER',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a47034d8889521bbd300f45fdc19e1127',1,'status.h']]],
+  ['nats_5fno_5fserver_5fsupport_30',['NATS_NO_SERVER_SUPPORT',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a8a4e298931ba0698a72e397b1b57c885',1,'status.h']]],
+  ['nats_5fnot_5ffound_31',['NATS_NOT_FOUND',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80ad0229a12b17d3d12a28efed6213720d8',1,'status.h']]],
+  ['nats_5fnot_5finitialized_32',['NATS_NOT_INITIALIZED',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80ae47047f2fac5f2f2a434fc501e5c3d4e',1,'status.h']]],
+  ['nats_5fnot_5fpermitted_33',['NATS_NOT_PERMITTED',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80ac3abc147873fe999c86431f9222eebf5',1,'status.h']]],
+  ['nats_5fnot_5fyet_5fconnected_34',['NATS_NOT_YET_CONNECTED',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a49a1ea653ce112b3c53eedebcd60811d',1,'status.h']]],
+  ['nats_5fok_35',['NATS_OK',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990',1,'status.h']]],
+  ['nats_5fprotocol_5ferror_36',['NATS_PROTOCOL_ERROR',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a113ffbe9a1f243582c38ebd876cb736d',1,'status.h']]],
+  ['nats_5fsecure_5fconnection_5frequired_37',['NATS_SECURE_CONNECTION_REQUIRED',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80abc76f1b31fdac4525583cc19588240dc',1,'status.h']]],
+  ['nats_5fsecure_5fconnection_5fwanted_38',['NATS_SECURE_CONNECTION_WANTED',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a0aa3d1e18a2a217149fa8b1a306c9b08',1,'status.h']]],
+  ['nats_5fslow_5fconsumer_39',['NATS_SLOW_CONSUMER',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80ae93ff5b7fe31f8570308385d92d317b0',1,'status.h']]],
+  ['nats_5fssl_5ferror_40',['NATS_SSL_ERROR',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a892183c32b4929388bb75dc62230ddf3',1,'status.h']]],
+  ['nats_5fstale_5fconnection_41',['NATS_STALE_CONNECTION',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80aa76d5e3ce051bc7510be90e73663c93d',1,'status.h']]],
+  ['nats_5fsys_5ferror_42',['NATS_SYS_ERROR',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80a984189ec4cfe3e7647268c99f7e49ec9',1,'status.h']]],
+  ['nats_5ftimeout_43',['NATS_TIMEOUT',['../status_8h.html#a36c934157b663b7b5fb5d6609c897c80ab88994c9ea9889ac4d9d656d62f550ed',1,'status.h']]]
+];
diff --git a/doc/html/search/enumvalues_3.html b/doc/html/search/enumvalues_3.html
new file mode 100644 (file)
index 0000000..9ebb356
--- /dev/null
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="enumvalues_3.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/enumvalues_3.js b/doc/html/search/enumvalues_3.js
new file mode 100644 (file)
index 0000000..19faf9f
--- /dev/null
@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['reconnecting',['RECONNECTING',['../status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51a1d5843fca4a8464bd4e24c90725352c0',1,'status.h']]]
+];
diff --git a/doc/html/search/files_0.html b/doc/html/search/files_0.html
new file mode 100644 (file)
index 0000000..da83704
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="files_0.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/files_0.js b/doc/html/search/files_0.js
new file mode 100644 (file)
index 0000000..7df1d66
--- /dev/null
@@ -0,0 +1,5 @@
+var searchData=
+[
+  ['libevent_2eh_0',['libevent.h',['../libevent_8h.html',1,'']]],
+  ['libuv_2eh_1',['libuv.h',['../libuv_8h.html',1,'']]]
+];
diff --git a/doc/html/search/files_1.html b/doc/html/search/files_1.html
new file mode 100644 (file)
index 0000000..f7e1582
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="files_1.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/files_1.js b/doc/html/search/files_1.js
new file mode 100644 (file)
index 0000000..d758070
--- /dev/null
@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['nats_2eh_0',['nats.h',['../nats_8h.html',1,'']]]
+];
diff --git a/doc/html/search/files_2.html b/doc/html/search/files_2.html
new file mode 100644 (file)
index 0000000..99aca62
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="files_2.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/files_2.js b/doc/html/search/files_2.js
new file mode 100644 (file)
index 0000000..c163d22
--- /dev/null
@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['status_2eh_0',['status.h',['../status_8h.html',1,'']]]
+];
diff --git a/doc/html/search/functions_0.html b/doc/html/search/functions_0.html
new file mode 100644 (file)
index 0000000..2d2d950
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="functions_0.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/functions_0.js b/doc/html/search/functions_0.js
new file mode 100644 (file)
index 0000000..52a5ae0
--- /dev/null
@@ -0,0 +1,55 @@
+var searchData=
+[
+  ['js_5faddconsumer_0',['js_AddConsumer',['../group__js_assets_group.html#gaf2efb63db150e782d9007090b49d4115',1,'nats.h']]],
+  ['js_5faddstream_1',['js_AddStream',['../group__js_assets_group.html#ga5efc5136d33ba52161e6732f88f1ee75',1,'nats.h']]],
+  ['js_5fconsumernames_2',['js_ConsumerNames',['../group__js_assets_group.html#ga690d19af55d12b82c8523d1861cef8d0',1,'nats.h']]],
+  ['js_5fconsumers_3',['js_Consumers',['../group__js_assets_group.html#gaf28097ede3e9ba9926fb00856e63ffd9',1,'nats.h']]],
+  ['js_5fcreatekeyvalue_4',['js_CreateKeyValue',['../group__kv_group_mgt.html#gabc445bfe87112e56a6c73872fec6893e',1,'nats.h']]],
+  ['js_5fdeleteconsumer_5',['js_DeleteConsumer',['../group__js_assets_group.html#ga52fbc61759b11494db91f348a733c490',1,'nats.h']]],
+  ['js_5fdeletekeyvalue_6',['js_DeleteKeyValue',['../group__kv_group_mgt.html#ga6bc715319560bc28359679fcdcead937',1,'nats.h']]],
+  ['js_5fdeletemsg_7',['js_DeleteMsg',['../group__js_assets_group.html#gaeba5d45abbe811c0e40830c5f26c78fd',1,'nats.h']]],
+  ['js_5fdeletestream_8',['js_DeleteStream',['../group__js_assets_group.html#ga397e55a0b3b6d36c9bf746eee3842172',1,'nats.h']]],
+  ['js_5fdirectgetmsg_9',['js_DirectGetMsg',['../group__js_assets_group.html#ga62c250cecc650b1eed0fa1691893e2ae',1,'nats.h']]],
+  ['js_5ferasemsg_10',['js_EraseMsg',['../group__js_assets_group.html#ga7158f73e183462e9a15e9802e1746ff0',1,'nats.h']]],
+  ['js_5fgetaccountinfo_11',['js_GetAccountInfo',['../group__js_assets_group.html#gac8965dcfc6b465fbc323aa552c606c46',1,'nats.h']]],
+  ['js_5fgetconsumerinfo_12',['js_GetConsumerInfo',['../group__js_assets_group.html#ga2dda04757b4ab27a794b64f8d727fe23',1,'nats.h']]],
+  ['js_5fgetlastmsg_13',['js_GetLastMsg',['../group__js_assets_group.html#ga6835b53da27d5721eddb3698e582cf0c',1,'nats.h']]],
+  ['js_5fgetmsg_14',['js_GetMsg',['../group__js_assets_group.html#ga9fe289ae172f83e53ca1b1b747744c1f',1,'nats.h']]],
+  ['js_5fgetstreaminfo_15',['js_GetStreamInfo',['../group__js_assets_group.html#ga94cb23a35516b7779de28fcbb263180a',1,'nats.h']]],
+  ['js_5fkeyvalue_16',['js_KeyValue',['../group__kv_group_mgt.html#ga54e6c109a7c633e431b3eded286e00f6',1,'nats.h']]],
+  ['js_5fpublish_17',['js_Publish',['../group__js_pub_group.html#gac6ba005531c82d9f0efa88dd6b458477',1,'nats.h']]],
+  ['js_5fpublishasync_18',['js_PublishAsync',['../group__js_pub_group.html#ga069dfd6f0f3d96f1ff8bf2372e59900c',1,'nats.h']]],
+  ['js_5fpublishasynccomplete_19',['js_PublishAsyncComplete',['../group__js_pub_group.html#ga24813ee9a58f00c0f21d10ab9c93b81d',1,'nats.h']]],
+  ['js_5fpublishasyncgetpendinglist_20',['js_PublishAsyncGetPendingList',['../group__js_pub_group.html#ga2ac95a3450f77f8074fae3f2fbe7e54c',1,'nats.h']]],
+  ['js_5fpublishmsg_21',['js_PublishMsg',['../group__js_pub_group.html#ga2aceeb82fac3621aea843dd246732bdd',1,'nats.h']]],
+  ['js_5fpublishmsgasync_22',['js_PublishMsgAsync',['../group__js_pub_group.html#gab7e4139a48c5ee4d2155cbb43142e873',1,'nats.h']]],
+  ['js_5fpullsubscribe_23',['js_PullSubscribe',['../group__js_sub_group.html#gaaeaddb73857aa4eb4901eec945ed27cd',1,'nats.h']]],
+  ['js_5fpurgestream_24',['js_PurgeStream',['../group__js_assets_group.html#ga5a6a886c18a79caa403908bf7f7ef125',1,'nats.h']]],
+  ['js_5fstreamnames_25',['js_StreamNames',['../group__js_assets_group.html#gac3dfc87863dbbb3c959ecde4bce905bc',1,'nats.h']]],
+  ['js_5fstreams_26',['js_Streams',['../group__js_assets_group.html#ga531d91de372f0dffb8d64abecf88b0c0',1,'nats.h']]],
+  ['js_5fsubscribe_27',['js_Subscribe',['../group__js_sub_group.html#gaa686c6efd84ef963de1925108e896515',1,'nats.h']]],
+  ['js_5fsubscribesync_28',['js_SubscribeSync',['../group__js_sub_group.html#gabacb010031e535f9fb6e2167337e8adf',1,'nats.h']]],
+  ['js_5fupdateconsumer_29',['js_UpdateConsumer',['../group__js_assets_group.html#gad13ec256e24710bb237995814871e554',1,'nats.h']]],
+  ['js_5fupdatestream_30',['js_UpdateStream',['../group__js_assets_group.html#ga75a5c44304e24481c67e17fbccc15c31',1,'nats.h']]],
+  ['jsaccountinfo_5fdestroy_31',['jsAccountInfo_Destroy',['../group__js_assets_group.html#ga7c8664b38fcce8497746367d35e5f60b',1,'nats.h']]],
+  ['jsconsumerconfig_5finit_32',['jsConsumerConfig_Init',['../group__js_assets_group.html#ga3381bb05c05bf4a8979adde68d37dd66',1,'nats.h']]],
+  ['jsconsumerinfo_5fdestroy_33',['jsConsumerInfo_Destroy',['../group__js_assets_group.html#ga9c1d5ed2f24ba836c10e415231f80088',1,'nats.h']]],
+  ['jsconsumerinfolist_5fdestroy_34',['jsConsumerInfoList_Destroy',['../group__js_assets_group.html#ga421de40d8e91658353111c3f2ea90ec8',1,'nats.h']]],
+  ['jsconsumernameslist_5fdestroy_35',['jsConsumerNamesList_Destroy',['../group__js_assets_group.html#ga2ced0d190131460bf4608ab893dffc50',1,'nats.h']]],
+  ['jsctx_5fdestroy_36',['jsCtx_Destroy',['../group__js_group.html#gacfa6ce3e60ea540e3331a09a7f3dc856',1,'nats.h']]],
+  ['jsdirectgetmsgoptions_5finit_37',['jsDirectGetMsgOptions_Init',['../group__js_assets_group.html#ga8d835d47aed9c84ce3b8dcfea469f4cb',1,'nats.h']]],
+  ['jsexternalstream_5finit_38',['jsExternalStream_Init',['../group__js_assets_group.html#ga81aebebcd79922104720da51e95020d4',1,'nats.h']]],
+  ['jsfetchrequest_5finit_39',['jsFetchRequest_Init',['../group__js_sub_group.html#ga1c3a62de8cd4855ae61ea4f67417a43b',1,'nats.h']]],
+  ['jsmsgmetadata_5fdestroy_40',['jsMsgMetaData_Destroy',['../group__js_msg.html#gaf9bf92294342bcb27053de7038606d12',1,'nats.h']]],
+  ['jsoptions_5finit_41',['jsOptions_Init',['../group__js_group.html#ga855ff9a04888d696785cc5ede96112e4',1,'nats.h']]],
+  ['jsplacement_5finit_42',['jsPlacement_Init',['../group__js_assets_group.html#ga223691e6831072a0b8f8103a778293b0',1,'nats.h']]],
+  ['jspuback_5fdestroy_43',['jsPubAck_Destroy',['../group__js_pub_group.html#gaac130840b6db9109e72cf6ad9186dfc4',1,'nats.h']]],
+  ['jspuboptions_5finit_44',['jsPubOptions_Init',['../group__js_pub_group.html#gaf09f333a8675a8060c5ede07a6bdeef9',1,'nats.h']]],
+  ['jsrepublish_5finit_45',['jsRePublish_Init',['../group__js_assets_group.html#ga388bfeaa5a78ebf6ce7c15c6e3a7156b',1,'nats.h']]],
+  ['jsstreamconfig_5finit_46',['jsStreamConfig_Init',['../group__js_assets_group.html#gac230f71dbdc4d10bc7471d01763881d6',1,'nats.h']]],
+  ['jsstreaminfo_5fdestroy_47',['jsStreamInfo_Destroy',['../group__js_assets_group.html#ga8ee87ef86e94be42685941abe9638bbd',1,'nats.h']]],
+  ['jsstreaminfolist_5fdestroy_48',['jsStreamInfoList_Destroy',['../group__js_assets_group.html#ga38cdcc339eb8976d23296b99aa37d629',1,'nats.h']]],
+  ['jsstreamnameslist_5fdestroy_49',['jsStreamNamesList_Destroy',['../group__js_assets_group.html#gaf8644f281d4e24893a6a170b4f7faa65',1,'nats.h']]],
+  ['jsstreamsource_5finit_50',['jsStreamSource_Init',['../group__js_assets_group.html#ga7fe8e0bf98a38eb59372e7cd78aaaf56',1,'nats.h']]],
+  ['jssuboptions_5finit_51',['jsSubOptions_Init',['../group__js_sub_group.html#ga472adb949d1af9d8f07bda99f5d7f3f8',1,'nats.h']]]
+];
diff --git a/doc/html/search/functions_1.html b/doc/html/search/functions_1.html
new file mode 100644 (file)
index 0000000..3b96b90
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="functions_1.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/functions_1.js b/doc/html/search/functions_1.js
new file mode 100644 (file)
index 0000000..e122244
--- /dev/null
@@ -0,0 +1,45 @@
+var searchData=
+[
+  ['kvconfig_5finit_0',['kvConfig_Init',['../group__kv_group_mgt.html#ga16d4c27d8ac62bb86ba601bc40f53172',1,'nats.h']]],
+  ['kventry_5fbucket_1',['kvEntry_Bucket',['../group__kv_entry.html#gadedbb410cce499afb535eb6641c32ca7',1,'nats.h']]],
+  ['kventry_5fcreated_2',['kvEntry_Created',['../group__kv_entry.html#ga31ef3a2e3a7df6cf4dbb0a762737800a',1,'nats.h']]],
+  ['kventry_5fdelta_3',['kvEntry_Delta',['../group__kv_entry.html#ga233a2d75895cfd0140cf77757592cf47',1,'nats.h']]],
+  ['kventry_5fdestroy_4',['kvEntry_Destroy',['../group__kv_entry.html#ga8359ffcdeefb9c5821e6442d0d5ee388',1,'nats.h']]],
+  ['kventry_5fkey_5',['kvEntry_Key',['../group__kv_entry.html#gab455f32b0abfb1361dab4b5e7d98042a',1,'nats.h']]],
+  ['kventry_5foperation_6',['kvEntry_Operation',['../group__kv_entry.html#ga088fd67d3d384ad7a7ddfc82535becea',1,'nats.h']]],
+  ['kventry_5frevision_7',['kvEntry_Revision',['../group__kv_entry.html#ga2d58abf81cb577e21a76f9c77568409f',1,'nats.h']]],
+  ['kventry_5fvalue_8',['kvEntry_Value',['../group__kv_entry.html#ga28077f81d71a30cbce2dc81e5c9574fc',1,'nats.h']]],
+  ['kventry_5fvaluelen_9',['kvEntry_ValueLen',['../group__kv_entry.html#gaf7ccc866865903f231e0431754ed2415',1,'nats.h']]],
+  ['kventry_5fvaluestring_10',['kvEntry_ValueString',['../group__kv_entry.html#ga7ff6220915726600545357e31226fb65',1,'nats.h']]],
+  ['kventrylist_5fdestroy_11',['kvEntryList_Destroy',['../group__kv_group.html#gae783352ab81e22aa3173057d117518e6',1,'nats.h']]],
+  ['kvkeyslist_5fdestroy_12',['kvKeysList_Destroy',['../group__kv_group.html#ga02ccd58bc5062f6ce6f94bf05e3dfe45',1,'nats.h']]],
+  ['kvpurgeoptions_5finit_13',['kvPurgeOptions_Init',['../group__kv_group.html#ga243113fd7df34ce104850ab888f04021',1,'nats.h']]],
+  ['kvstatus_5fbucket_14',['kvStatus_Bucket',['../group__kv_status.html#ga1acec36db32207f21e15afc26bb5af1c',1,'nats.h']]],
+  ['kvstatus_5fdestroy_15',['kvStatus_Destroy',['../group__kv_status.html#ga5eb3d824c1873af705beee4798246a08',1,'nats.h']]],
+  ['kvstatus_5fhistory_16',['kvStatus_History',['../group__kv_status.html#gada6f22b5659b184762cea4f45d369ee5',1,'nats.h']]],
+  ['kvstatus_5freplicas_17',['kvStatus_Replicas',['../group__kv_status.html#ga86b114f4dac9f06df86101f84bd497b2',1,'nats.h']]],
+  ['kvstatus_5fttl_18',['kvStatus_TTL',['../group__kv_status.html#gaa747ad0a6182ec7a47fb47018c33d1c1',1,'nats.h']]],
+  ['kvstatus_5fvalues_19',['kvStatus_Values',['../group__kv_status.html#ga2016af3c73841d8b226361e764dce158',1,'nats.h']]],
+  ['kvstore_5fbucket_20',['kvStore_Bucket',['../group__kv_group.html#gad28fdf9aae16bba308cda799fca13281',1,'nats.h']]],
+  ['kvstore_5fcreate_21',['kvStore_Create',['../group__kv_group.html#ga5289f7cd3999cfb46fb1fcb83178aec6',1,'nats.h']]],
+  ['kvstore_5fcreatestring_22',['kvStore_CreateString',['../group__kv_group.html#ga5726ad2e6205d2f6749be013138218ca',1,'nats.h']]],
+  ['kvstore_5fdelete_23',['kvStore_Delete',['../group__kv_group.html#ga68101d46739ca894fd7c56c8661c08d8',1,'nats.h']]],
+  ['kvstore_5fdestroy_24',['kvStore_Destroy',['../group__kv_group_mgt.html#gab0d6bdbfabd27af67eaeb36cec0787da',1,'nats.h']]],
+  ['kvstore_5fget_25',['kvStore_Get',['../group__kv_group.html#ga2db86f80d6bfce1bdbedf1b9da22913c',1,'nats.h']]],
+  ['kvstore_5fgetrevision_26',['kvStore_GetRevision',['../group__kv_group.html#ga9bf43431bb8264a3ea1f0df401afbe1a',1,'nats.h']]],
+  ['kvstore_5fhistory_27',['kvStore_History',['../group__kv_group.html#ga5aa57345313cee85b020e50c22023fb5',1,'nats.h']]],
+  ['kvstore_5fkeys_28',['kvStore_Keys',['../group__kv_group.html#ga6030fc2a672ae868f7603587245b9d5a',1,'nats.h']]],
+  ['kvstore_5fpurge_29',['kvStore_Purge',['../group__kv_group.html#ga3d5fa3d895d0d3041440105b244e9ca9',1,'nats.h']]],
+  ['kvstore_5fpurgedeletes_30',['kvStore_PurgeDeletes',['../group__kv_group.html#ga34ab74b229ff88e64301ea53a274da69',1,'nats.h']]],
+  ['kvstore_5fput_31',['kvStore_Put',['../group__kv_group.html#ga1fdf7a1d3acf96e475184790589a401e',1,'nats.h']]],
+  ['kvstore_5fputstring_32',['kvStore_PutString',['../group__kv_group.html#ga84ebd66a95ce857765d4a16ec35daba9',1,'nats.h']]],
+  ['kvstore_5fstatus_33',['kvStore_Status',['../group__kv_group.html#gadf75e99cc28bc9c2d6eac7c9f7398c27',1,'nats.h']]],
+  ['kvstore_5fupdate_34',['kvStore_Update',['../group__kv_group.html#gae0c593bb2ef94ae60e775617c9423038',1,'nats.h']]],
+  ['kvstore_5fupdatestring_35',['kvStore_UpdateString',['../group__kv_group.html#ga13ed70f15cd1485cd15f96bcc4b7ad1c',1,'nats.h']]],
+  ['kvstore_5fwatch_36',['kvStore_Watch',['../group__kv_group.html#ga30feca870f580c7b9d2ad07a740505b2',1,'nats.h']]],
+  ['kvstore_5fwatchall_37',['kvStore_WatchAll',['../group__kv_group.html#gaf011f1dd6813391c65664e982747602e',1,'nats.h']]],
+  ['kvwatcher_5fdestroy_38',['kvWatcher_Destroy',['../group__kv_watcher.html#ga21bc39fa795f7c4f392bd6d4e66ea1d9',1,'nats.h']]],
+  ['kvwatcher_5fnext_39',['kvWatcher_Next',['../group__kv_watcher.html#ga562c216a0199c30455af4c2da46000e5',1,'nats.h']]],
+  ['kvwatcher_5fstop_40',['kvWatcher_Stop',['../group__kv_watcher.html#ga73adf44114fedd62ef75ebd81839b65e',1,'nats.h']]],
+  ['kvwatchoptions_5finit_41',['kvWatchOptions_Init',['../group__kv_group.html#ga762fd5de8cde683e46a6736a51e575f5',1,'nats.h']]]
+];
diff --git a/doc/html/search/functions_2.html b/doc/html/search/functions_2.html
new file mode 100644 (file)
index 0000000..1f16d2a
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="functions_2.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/functions_2.js b/doc/html/search/functions_2.js
new file mode 100644 (file)
index 0000000..2e1c04a
--- /dev/null
@@ -0,0 +1,180 @@
+var searchData=
+[
+  ['nats_5fcheckcompatibility_0',['nats_CheckCompatibility',['../group__library_group.html#ga8c2ad4df801bd9d11564587ed3a7081e',1,'nats.h']]],
+  ['nats_5fclose_1',['nats_Close',['../group__library_group.html#gae75131e0ce4e5b89d0f82ea7892f112e',1,'nats.h']]],
+  ['nats_5fcloseandwait_2',['nats_CloseAndWait',['../group__library_group.html#gaf75bb5b38bf32e6a8f43e54068625903',1,'nats.h']]],
+  ['nats_5fgetlasterror_3',['nats_GetLastError',['../group__library_group.html#gadecfd49a58b581dbba40da77b195fd85',1,'nats.h']]],
+  ['nats_5fgetlasterrorstack_4',['nats_GetLastErrorStack',['../group__library_group.html#gaca24172e1b97ca01cee29ca437f5702e',1,'nats.h']]],
+  ['nats_5fgetversion_5',['nats_GetVersion',['../group__library_group.html#ga0d8c3df1c0c4a3d340d8ff81355fb1e8',1,'nats.h']]],
+  ['nats_5fgetversionnumber_6',['nats_GetVersionNumber',['../group__library_group.html#ga5fbbaa19b0290b654d2669a05bd512e8',1,'nats.h']]],
+  ['nats_5fnow_7',['nats_Now',['../group__library_group.html#gaa3c10ba3ae001595007ad0dc5dccc15e',1,'nats.h']]],
+  ['nats_5fnowinnanoseconds_8',['nats_NowInNanoSeconds',['../group__library_group.html#gacf5e423920d6a647df3bbf7de39d5223',1,'nats.h']]],
+  ['nats_5fopen_9',['nats_Open',['../group__library_group.html#ga4a26d4caecb23348f6eee862c95fee7d',1,'nats.h']]],
+  ['nats_5fprintlasterrorstack_10',['nats_PrintLastErrorStack',['../group__library_group.html#ga5fab3b18c4fe3630254483575f6066f4',1,'nats.h']]],
+  ['nats_5freleasethreadmemory_11',['nats_ReleaseThreadMemory',['../group__library_group.html#gafe171baefa00a85b77205116e9f3e48a',1,'nats.h']]],
+  ['nats_5fsetmessagedeliverypoolsize_12',['nats_SetMessageDeliveryPoolSize',['../group__library_group.html#gab21e94ce7a7d226611ea2c05914cf19d',1,'nats.h']]],
+  ['nats_5fsign_13',['nats_Sign',['../group__library_group.html#gaf781f246e2e0ab24623ca667c48dc3ba',1,'nats.h']]],
+  ['nats_5fsleep_14',['nats_Sleep',['../group__library_group.html#gad5040264cd4b1404956babf3c03a4f09',1,'nats.h']]],
+  ['natsconnection_5fbuffered_15',['natsConnection_Buffered',['../group__conn_mgt_group.html#ga0433159e518540ff874c4026fe9cd0c5',1,'nats.h']]],
+  ['natsconnection_5fclose_16',['natsConnection_Close',['../group__conn_mgt_group.html#ga19e204d27a232e2d4334301fc002b2ed',1,'nats.h']]],
+  ['natsconnection_5fconnect_17',['natsConnection_Connect',['../group__conn_mgt_group.html#ga740be1ba16a8570eb98ef6755ebf52ce',1,'nats.h']]],
+  ['natsconnection_5fconnectto_18',['natsConnection_ConnectTo',['../group__conn_mgt_group.html#gafb83c8d7970ba68be0e6c40c38cdfde4',1,'nats.h']]],
+  ['natsconnection_5fdestroy_19',['natsConnection_Destroy',['../group__conn_mgt_group.html#gafda2f702276fb0ac301efac10df09495',1,'nats.h']]],
+  ['natsconnection_5fdrain_20',['natsConnection_Drain',['../group__conn_mgt_group.html#ga59bdc4ad9fea2053f5d3841f6b83f88b',1,'nats.h']]],
+  ['natsconnection_5fdraintimeout_21',['natsConnection_DrainTimeout',['../group__conn_mgt_group.html#gae06fe6f5933f216d6d93645a122a7dd4',1,'nats.h']]],
+  ['natsconnection_5fflush_22',['natsConnection_Flush',['../group__conn_mgt_group.html#ga1c98f8d89bb8e20ea8621e860a90267f',1,'nats.h']]],
+  ['natsconnection_5fflushtimeout_23',['natsConnection_FlushTimeout',['../group__conn_mgt_group.html#ga85915ef0c8b87993be1b076099d6a7c1',1,'nats.h']]],
+  ['natsconnection_5fgetclientid_24',['natsConnection_GetClientID',['../group__conn_mgt_group.html#ga747513ba6ab63fdf9a72bfc8025a14ba',1,'nats.h']]],
+  ['natsconnection_5fgetclientip_25',['natsConnection_GetClientIP',['../group__conn_mgt_group.html#gadafcfeeeac2733c7119981ab97b7103d',1,'nats.h']]],
+  ['natsconnection_5fgetconnectedserverid_26',['natsConnection_GetConnectedServerId',['../group__conn_mgt_group.html#ga48cee9ea1cdc9fc2770de2f9f0fd1ccf',1,'nats.h']]],
+  ['natsconnection_5fgetconnectedurl_27',['natsConnection_GetConnectedUrl',['../group__conn_mgt_group.html#gaf623280407c43ade02285005f0642e6d',1,'nats.h']]],
+  ['natsconnection_5fgetdiscoveredservers_28',['natsConnection_GetDiscoveredServers',['../group__conn_mgt_group.html#gad25c77be0873495412c90a73fe450708',1,'nats.h']]],
+  ['natsconnection_5fgetlasterror_29',['natsConnection_GetLastError',['../group__conn_mgt_group.html#gab6cfa9cb6857ae10f096a94f5e244e63',1,'nats.h']]],
+  ['natsconnection_5fgetlocalipandport_30',['natsConnection_GetLocalIPAndPort',['../group__conn_mgt_group.html#ga761095a42374b4dafa178df7d7652dd5',1,'nats.h']]],
+  ['natsconnection_5fgetmaxpayload_31',['natsConnection_GetMaxPayload',['../group__conn_mgt_group.html#ga68e7149f7ff1cc4989b3f795fa7e76d9',1,'nats.h']]],
+  ['natsconnection_5fgetrtt_32',['natsConnection_GetRTT',['../group__conn_mgt_group.html#gaa3fd27e6e7d8131e679d4f10e201c435',1,'nats.h']]],
+  ['natsconnection_5fgetservers_33',['natsConnection_GetServers',['../group__conn_mgt_group.html#gaf4ee7262e35e44c40ad5dfe9240db76b',1,'nats.h']]],
+  ['natsconnection_5fgetstats_34',['natsConnection_GetStats',['../group__conn_mgt_group.html#ga68821a8ae1176096b5afef7fdc7947ec',1,'nats.h']]],
+  ['natsconnection_5fhasheadersupport_35',['natsConnection_HasHeaderSupport',['../group__conn_mgt_group.html#gad765b80ae8e1a06a7a942cccf29f042a',1,'nats.h']]],
+  ['natsconnection_5fisclosed_36',['natsConnection_IsClosed',['../group__conn_mgt_group.html#ga530f0f1c75c58a81aae1a59f15b46d9f',1,'nats.h']]],
+  ['natsconnection_5fisdraining_37',['natsConnection_IsDraining',['../group__conn_mgt_group.html#ga15a0f8aa9a6f621535d01593a4c8edd5',1,'nats.h']]],
+  ['natsconnection_5fisreconnecting_38',['natsConnection_IsReconnecting',['../group__conn_mgt_group.html#ga5aa349fc3895dde772671b324b07a688',1,'nats.h']]],
+  ['natsconnection_5fjetstream_39',['natsConnection_JetStream',['../group__js_group.html#ga8ed08b0fe1074b1e490291f0af2cb03f',1,'nats.h']]],
+  ['natsconnection_5fprocessreadevent_40',['natsConnection_ProcessReadEvent',['../group__conn_mgt_group.html#gaa89c06e30e19ff361125bfc9114d89a8',1,'nats.h']]],
+  ['natsconnection_5fprocesswriteevent_41',['natsConnection_ProcessWriteEvent',['../group__conn_mgt_group.html#gad81b603b84c0180aefc6d5ebad7f2a47',1,'nats.h']]],
+  ['natsconnection_5fpublish_42',['natsConnection_Publish',['../group__conn_pub_group.html#gac0b9f7759ecc39b8d77807b94254f9b4',1,'nats.h']]],
+  ['natsconnection_5fpublishmsg_43',['natsConnection_PublishMsg',['../group__conn_pub_group.html#ga74511acd87385931112c45c48c2a14ba',1,'nats.h']]],
+  ['natsconnection_5fpublishrequest_44',['natsConnection_PublishRequest',['../group__conn_pub_group.html#gaaaa3d75ffec2dcdc6bf905cdb1eee59e',1,'nats.h']]],
+  ['natsconnection_5fpublishrequeststring_45',['natsConnection_PublishRequestString',['../group__conn_pub_group.html#gaafca9a8294e81a5a9979e762931e56c5',1,'nats.h']]],
+  ['natsconnection_5fpublishstring_46',['natsConnection_PublishString',['../group__conn_pub_group.html#gad09a717c20de4cf0e2a21dcfd9ce6c64',1,'nats.h']]],
+  ['natsconnection_5fqueuesubscribe_47',['natsConnection_QueueSubscribe',['../group__conn_sub_group.html#ga3c9fee2775130786ef62f1cbeb191a48',1,'nats.h']]],
+  ['natsconnection_5fqueuesubscribesync_48',['natsConnection_QueueSubscribeSync',['../group__conn_sub_group.html#ga68630ea7c4bbdc7f8cd62058b41fb476',1,'nats.h']]],
+  ['natsconnection_5fqueuesubscribetimeout_49',['natsConnection_QueueSubscribeTimeout',['../group__conn_sub_group.html#ga96fa115fd5b2ef7658884da80714b91c',1,'nats.h']]],
+  ['natsconnection_5frequest_50',['natsConnection_Request',['../group__conn_pub_group.html#gaf4b4a022f9c21fc269b87c000330c5a7',1,'nats.h']]],
+  ['natsconnection_5frequestmsg_51',['natsConnection_RequestMsg',['../group__conn_pub_group.html#ga052de4b75b3b69ccd8d20eb4861b801d',1,'nats.h']]],
+  ['natsconnection_5frequeststring_52',['natsConnection_RequestString',['../group__conn_pub_group.html#ga4bb5105df6a3efd2088e6be0fdf6b31f',1,'nats.h']]],
+  ['natsconnection_5fsign_53',['natsConnection_Sign',['../group__conn_mgt_group.html#ga6960cfdbaac3b8759784f352d4c264f8',1,'nats.h']]],
+  ['natsconnection_5fstatus_54',['natsConnection_Status',['../group__conn_mgt_group.html#ga33fa209522e5e0226b5b7c7d720a3b98',1,'nats.h']]],
+  ['natsconnection_5fsubscribe_55',['natsConnection_Subscribe',['../group__conn_sub_group.html#gaefab965b5645798d47f9244f2b3fe3fb',1,'nats.h']]],
+  ['natsconnection_5fsubscribesync_56',['natsConnection_SubscribeSync',['../group__conn_sub_group.html#ga17574d5165f7e285462e3d3b2709edf4',1,'nats.h']]],
+  ['natsconnection_5fsubscribetimeout_57',['natsConnection_SubscribeTimeout',['../group__conn_sub_group.html#gacb2c83b58b7909715424cbc327fdd404',1,'nats.h']]],
+  ['natsinbox_5fcreate_58',['natsInbox_Create',['../group__inbox_group.html#gaa1ec779a0b7ead54b78da05533848b6d',1,'nats.h']]],
+  ['natsinbox_5fdestroy_59',['natsInbox_Destroy',['../group__inbox_group.html#gabd6444fb8f28afb9c2b6645945f46cfe',1,'nats.h']]],
+  ['natslibevent_5fattach_60',['natsLibevent_Attach',['../group__libevent_functions.html#ga30c00f21a5251ee9fde09c1f2b429cd2',1,'libevent.h']]],
+  ['natslibevent_5fdetach_61',['natsLibevent_Detach',['../group__libevent_functions.html#gaac76f5937329a8650f69c6bd8af36cd5',1,'libevent.h']]],
+  ['natslibevent_5finit_62',['natsLibevent_Init',['../group__libevent_functions.html#ga195d269473332931fd0fede0bac3309e',1,'libevent.h']]],
+  ['natslibevent_5fread_63',['natsLibevent_Read',['../group__libevent_functions.html#ga8a14ce23b4f6ba3bf63369961f9a5552',1,'libevent.h']]],
+  ['natslibevent_5fwrite_64',['natsLibevent_Write',['../group__libevent_functions.html#ga7ac99f326a59e5663ff66f5023c87091',1,'libevent.h']]],
+  ['natslibuv_5fattach_65',['natsLibuv_Attach',['../group__libuv_functions.html#ga86ac71cffe752effd7397740d80c3c42',1,'libuv.h']]],
+  ['natslibuv_5fdetach_66',['natsLibuv_Detach',['../group__libuv_functions.html#ga8df663525fb59b882a0f3bd563083dc7',1,'libuv.h']]],
+  ['natslibuv_5finit_67',['natsLibuv_Init',['../group__libuv_functions.html#ga5d4b677cbe1cd132c37bc56dbfc6949e',1,'libuv.h']]],
+  ['natslibuv_5fread_68',['natsLibuv_Read',['../group__libuv_functions.html#ga85c722b2d2699a954362b20528f0aaac',1,'libuv.h']]],
+  ['natslibuv_5fsetthreadlocalloop_69',['natsLibuv_SetThreadLocalLoop',['../group__libuv_functions.html#ga1baf4a20b138dcf00807a8b830f4e02d',1,'libuv.h']]],
+  ['natslibuv_5fwrite_70',['natsLibuv_Write',['../group__libuv_functions.html#gafaa633c9067f485f330b72644277b07d',1,'libuv.h']]],
+  ['natsmsg_5fack_71',['natsMsg_Ack',['../group__js_msg.html#gae454fb7e7097a3cd3362cb49ef8a3c84',1,'nats.h']]],
+  ['natsmsg_5facksync_72',['natsMsg_AckSync',['../group__js_msg.html#gafb899ebf8e89b3a858fe20f7853635a7',1,'nats.h']]],
+  ['natsmsg_5fcreate_73',['natsMsg_Create',['../group__msg_group.html#ga098e4fec1c5a71c00a0d092fbd6d1a21',1,'nats.h']]],
+  ['natsmsg_5fdestroy_74',['natsMsg_Destroy',['../group__msg_group.html#ga9e9590018284939f43f60964283f33ae',1,'nats.h']]],
+  ['natsmsg_5fgetdata_75',['natsMsg_GetData',['../group__msg_group.html#ga523364451fd92534e754054266196e59',1,'nats.h']]],
+  ['natsmsg_5fgetdatalength_76',['natsMsg_GetDataLength',['../group__msg_group.html#ga25b69066ae50287e178aaf4f70f7d3de',1,'nats.h']]],
+  ['natsmsg_5fgetmetadata_77',['natsMsg_GetMetaData',['../group__js_msg.html#gacf48e59038fab35849e9dc6f8fcf6328',1,'nats.h']]],
+  ['natsmsg_5fgetreply_78',['natsMsg_GetReply',['../group__msg_group.html#ga880535362c91b3e405792aa66ff945b6',1,'nats.h']]],
+  ['natsmsg_5fgetsequence_79',['natsMsg_GetSequence',['../group__js_msg.html#ga819be2990ec20b964aa574b5331d7f2e',1,'nats.h']]],
+  ['natsmsg_5fgetsubject_80',['natsMsg_GetSubject',['../group__msg_group.html#gad7cad38946648e3047aa0665a3dd230a',1,'nats.h']]],
+  ['natsmsg_5fgettime_81',['natsMsg_GetTime',['../group__js_msg.html#gab4850497c5481f5ec6eb1fcdb43646f5',1,'nats.h']]],
+  ['natsmsg_5finprogress_82',['natsMsg_InProgress',['../group__js_msg.html#gae1e0beb19cd76e2f69e6415c41c9bb39',1,'nats.h']]],
+  ['natsmsg_5fisnoresponders_83',['natsMsg_IsNoResponders',['../group__msg_group.html#ga43aa4a8e4b93725b4876ee2677e19c7b',1,'nats.h']]],
+  ['natsmsg_5fnak_84',['natsMsg_Nak',['../group__js_msg.html#gac271b874154301da9759f9ac05768b47',1,'nats.h']]],
+  ['natsmsg_5fnakwithdelay_85',['natsMsg_NakWithDelay',['../group__js_msg.html#gac0697389fa60a3c4725e53cd23ada7bd',1,'nats.h']]],
+  ['natsmsg_5fterm_86',['natsMsg_Term',['../group__js_msg.html#gae84d21e4388255e9d990e53c9f67e7c4',1,'nats.h']]],
+  ['natsmsgheader_5fadd_87',['natsMsgHeader_Add',['../group__msg_group.html#ga2b641ec3b1745604d7de1102e472254b',1,'nats.h']]],
+  ['natsmsgheader_5fdelete_88',['natsMsgHeader_Delete',['../group__msg_group.html#gac78ca02dc93d05cae837ced6386408f1',1,'nats.h']]],
+  ['natsmsgheader_5fget_89',['natsMsgHeader_Get',['../group__msg_group.html#gab3349f0b0ce721b340d5c0753c90ee18',1,'nats.h']]],
+  ['natsmsgheader_5fkeys_90',['natsMsgHeader_Keys',['../group__msg_group.html#ga6ee8a007111ada293dd24ff0bab02491',1,'nats.h']]],
+  ['natsmsgheader_5fset_91',['natsMsgHeader_Set',['../group__msg_group.html#gaf30b47d4217c9335919f05536e379af8',1,'nats.h']]],
+  ['natsmsgheader_5fvalues_92',['natsMsgHeader_Values',['../group__msg_group.html#gae1ce9c9d82d151a3ea9dc03da048f66f',1,'nats.h']]],
+  ['natsmsglist_5fdestroy_93',['natsMsgList_Destroy',['../group__msg_group.html#ga1a091d24f939d881bf04fba78b8995c2',1,'nats.h']]],
+  ['natsoptions_5fcreate_94',['natsOptions_Create',['../group__opts_group.html#ga61d4a0cf2fbf7d13cc910e5a00c575be',1,'nats.h']]],
+  ['natsoptions_5fdestroy_95',['natsOptions_Destroy',['../group__opts_group.html#ga93d8068cd6fff53b7f8e1c403db45eb9',1,'nats.h']]],
+  ['natsoptions_5fdisablenoresponders_96',['natsOptions_DisableNoResponders',['../group__opts_group.html#ga192465163abb87ad48a843b45cdf9984',1,'nats.h']]],
+  ['natsoptions_5fipresolutionorder_97',['natsOptions_IPResolutionOrder',['../group__opts_group.html#ga7ca713c7532eff4d41a492e95b8822cf',1,'nats.h']]],
+  ['natsoptions_5floadcatrustedcertificates_98',['natsOptions_LoadCATrustedCertificates',['../group__opts_group.html#ga2cd6563694a439b3949a31fd81103099',1,'nats.h']]],
+  ['natsoptions_5floadcertificateschain_99',['natsOptions_LoadCertificatesChain',['../group__opts_group.html#ga36943e2ba53d05407cdabc4e7e96484b',1,'nats.h']]],
+  ['natsoptions_5fsetallowreconnect_100',['natsOptions_SetAllowReconnect',['../group__opts_group.html#ga3d1d3cb2f2a0e23d27dd60e96d1cc91b',1,'nats.h']]],
+  ['natsoptions_5fsetcatrustedcertificates_101',['natsOptions_SetCATrustedCertificates',['../group__opts_group.html#gafb30794fc2ae74b9e0bd8fb609b901c8',1,'nats.h']]],
+  ['natsoptions_5fsetcertificateschain_102',['natsOptions_SetCertificatesChain',['../group__opts_group.html#gae98f0f9034e93941767ab1ae6eec2c0c',1,'nats.h']]],
+  ['natsoptions_5fsetciphers_103',['natsOptions_SetCiphers',['../group__opts_group.html#ga5698f020e8eb3e7440eb073fe08ef62c',1,'nats.h']]],
+  ['natsoptions_5fsetciphersuites_104',['natsOptions_SetCipherSuites',['../group__opts_group.html#ga2b7f144b011d8ce62941b608a8f324f0',1,'nats.h']]],
+  ['natsoptions_5fsetclosedcb_105',['natsOptions_SetClosedCB',['../group__opts_group.html#ga44410242e73134e5bb51ef27904a9253',1,'nats.h']]],
+  ['natsoptions_5fsetcustominboxprefix_106',['natsOptions_SetCustomInboxPrefix',['../group__opts_group.html#gac5173473a731a4a36d15346fedddf91f',1,'nats.h']]],
+  ['natsoptions_5fsetcustomreconnectdelay_107',['natsOptions_SetCustomReconnectDelay',['../group__opts_group.html#ga3593165aa113d6736e0226ddc56b3e9d',1,'nats.h']]],
+  ['natsoptions_5fsetdisconnectedcb_108',['natsOptions_SetDisconnectedCB',['../group__opts_group.html#gadc8dc0cedd91bda71d544f3dedc4a039',1,'nats.h']]],
+  ['natsoptions_5fsetdiscoveredserverscb_109',['natsOptions_SetDiscoveredServersCB',['../group__opts_group.html#gab5baab507c974402ab0d8c5e8227ee65',1,'nats.h']]],
+  ['natsoptions_5fseterrorhandler_110',['natsOptions_SetErrorHandler',['../group__opts_group.html#ga127ec7a8196b453947a7fa9a64096cbd',1,'nats.h']]],
+  ['natsoptions_5fseteventloop_111',['natsOptions_SetEventLoop',['../group__opts_group.html#gab09491bad908dedcb323c780280733ff',1,'nats.h']]],
+  ['natsoptions_5fsetexpectedhostname_112',['natsOptions_SetExpectedHostname',['../group__opts_group.html#ga0ba43ba9930df385e4781b12be9f2851',1,'nats.h']]],
+  ['natsoptions_5fsetfailrequestsondisconnect_113',['natsOptions_SetFailRequestsOnDisconnect',['../group__opts_group.html#gadef4376a5e608cbc8c1a9e2b6335dc79',1,'nats.h']]],
+  ['natsoptions_5fsetignorediscoveredservers_114',['natsOptions_SetIgnoreDiscoveredServers',['../group__opts_group.html#ga7e4172084520708b8c9f28e73174461c',1,'nats.h']]],
+  ['natsoptions_5fsetiobufsize_115',['natsOptions_SetIOBufSize',['../group__opts_group.html#ga1a3e3abfd7ddd8aff247df8f332bbda3',1,'nats.h']]],
+  ['natsoptions_5fsetlameduckmodecb_116',['natsOptions_SetLameDuckModeCB',['../group__opts_group.html#ga54dea2ffeb33779771652a7a14fc4adc',1,'nats.h']]],
+  ['natsoptions_5fsetmaxpendingmsgs_117',['natsOptions_SetMaxPendingMsgs',['../group__opts_group.html#ga95510436eee06f9992ded96a44795c40',1,'nats.h']]],
+  ['natsoptions_5fsetmaxpingsout_118',['natsOptions_SetMaxPingsOut',['../group__opts_group.html#gaaff89c3f41627f4b2929dbc9b82d265b',1,'nats.h']]],
+  ['natsoptions_5fsetmaxreconnect_119',['natsOptions_SetMaxReconnect',['../group__opts_group.html#gab54cd2719c0b64eebd6c7b83dd2908a0',1,'nats.h']]],
+  ['natsoptions_5fsetname_120',['natsOptions_SetName',['../group__opts_group.html#ga1c529d347be0fe2eec17c7f4698e283e',1,'nats.h']]],
+  ['natsoptions_5fsetnkey_121',['natsOptions_SetNKey',['../group__opts_group.html#ga0290eac4665569c850468d9f00e246a0',1,'nats.h']]],
+  ['natsoptions_5fsetnkeyfromseed_122',['natsOptions_SetNKeyFromSeed',['../group__opts_group.html#ga696f02e0493c00d3c1eafff45b62b68e',1,'nats.h']]],
+  ['natsoptions_5fsetnoecho_123',['natsOptions_SetNoEcho',['../group__opts_group.html#ga4f694b87039cedaa65cd25656b14d1a3',1,'nats.h']]],
+  ['natsoptions_5fsetnorandomize_124',['natsOptions_SetNoRandomize',['../group__opts_group.html#gaabf8763b931dcf389c83fd95d760a413',1,'nats.h']]],
+  ['natsoptions_5fsetpedantic_125',['natsOptions_SetPedantic',['../group__opts_group.html#ga26f166af20de98bec67bc6cc916f769e',1,'nats.h']]],
+  ['natsoptions_5fsetpinginterval_126',['natsOptions_SetPingInterval',['../group__opts_group.html#gae68fb615835364c0809555e8dc93f57e',1,'nats.h']]],
+  ['natsoptions_5fsetreconnectbufsize_127',['natsOptions_SetReconnectBufSize',['../group__opts_group.html#gaa0d4b7ece8477cb9879f0dafff3456a5',1,'nats.h']]],
+  ['natsoptions_5fsetreconnectedcb_128',['natsOptions_SetReconnectedCB',['../group__opts_group.html#ga26a48c8529fffa5f5d1a61c030979980',1,'nats.h']]],
+  ['natsoptions_5fsetreconnectjitter_129',['natsOptions_SetReconnectJitter',['../group__opts_group.html#ga8f3df57ed8ae418d3ae6678ae5e2a5d2',1,'nats.h']]],
+  ['natsoptions_5fsetreconnectwait_130',['natsOptions_SetReconnectWait',['../group__opts_group.html#ga2730f4e16e318a2ef8de98dbf6ede807',1,'nats.h']]],
+  ['natsoptions_5fsetretryonfailedconnect_131',['natsOptions_SetRetryOnFailedConnect',['../group__opts_group.html#ga20946800d024b7089e73d63454d1c19f',1,'nats.h']]],
+  ['natsoptions_5fsetsecure_132',['natsOptions_SetSecure',['../group__opts_group.html#gaa1f09416d443fa7a6af6b695da563eba',1,'nats.h']]],
+  ['natsoptions_5fsetsendasap_133',['natsOptions_SetSendAsap',['../group__opts_group.html#ga8f06568cc3319a5a0eef9f80282034ca',1,'nats.h']]],
+  ['natsoptions_5fsetservers_134',['natsOptions_SetServers',['../group__opts_group.html#gacb7e964ae54b74d972d72e118b7b8bdf',1,'nats.h']]],
+  ['natsoptions_5fsettimeout_135',['natsOptions_SetTimeout',['../group__opts_group.html#ga17cd7fe41176cd98aca1184fa9352ad9',1,'nats.h']]],
+  ['natsoptions_5fsettoken_136',['natsOptions_SetToken',['../group__opts_group.html#gad58a5b9dabadeebda30e952ff7b39193',1,'nats.h']]],
+  ['natsoptions_5fsettokenhandler_137',['natsOptions_SetTokenHandler',['../group__opts_group.html#ga23a3b1f022112e98ddccb18b247b4426',1,'nats.h']]],
+  ['natsoptions_5fseturl_138',['natsOptions_SetURL',['../group__opts_group.html#ga3f7e760214417c7d87541ecb9ab5bea5',1,'nats.h']]],
+  ['natsoptions_5fsetusercredentialscallbacks_139',['natsOptions_SetUserCredentialsCallbacks',['../group__opts_group.html#ga60117450fc1f7b6f81bab455aeed7515',1,'nats.h']]],
+  ['natsoptions_5fsetusercredentialsfromfiles_140',['natsOptions_SetUserCredentialsFromFiles',['../group__opts_group.html#ga59b47f7b7a19085cf8eaada9bfe5606e',1,'nats.h']]],
+  ['natsoptions_5fsetuserinfo_141',['natsOptions_SetUserInfo',['../group__opts_group.html#ga5b99da7dd74aac3be962f323c3863d9e',1,'nats.h']]],
+  ['natsoptions_5fsetverbose_142',['natsOptions_SetVerbose',['../group__opts_group.html#gaa16bfd09ef318af18c27a0e199681b69',1,'nats.h']]],
+  ['natsoptions_5fsetwritedeadline_143',['natsOptions_SetWriteDeadline',['../group__opts_group.html#gaafda5fb8d9ee3a17bd475ceaecfac218',1,'nats.h']]],
+  ['natsoptions_5fskipserververification_144',['natsOptions_SkipServerVerification',['../group__opts_group.html#ga6f804ec44adc299989fe623570679da3',1,'nats.h']]],
+  ['natsoptions_5fuseglobalmessagedelivery_145',['natsOptions_UseGlobalMessageDelivery',['../group__opts_group.html#gabf060c92648b50c069f0abe7cbb06f1c',1,'nats.h']]],
+  ['natsoptions_5fuseoldrequeststyle_146',['natsOptions_UseOldRequestStyle',['../group__opts_group.html#ga70aa85319933d78c0076cc862fa3e5a6',1,'nats.h']]],
+  ['natsstatistics_5fcreate_147',['natsStatistics_Create',['../group__stats_group.html#gafa923df029168f4991b77ffdd9e24877',1,'nats.h']]],
+  ['natsstatistics_5fdestroy_148',['natsStatistics_Destroy',['../group__stats_group.html#ga26a04e77af8fc160adf7c33088dcf59c',1,'nats.h']]],
+  ['natsstatistics_5fgetcounts_149',['natsStatistics_GetCounts',['../group__stats_group.html#gad85f5ffb4272713f6cc6d988e6d4e75f',1,'nats.h']]],
+  ['natsstatus_5fgettext_150',['natsStatus_GetText',['../group__status_group.html#ga4a83c4a08f1e4dd9451c1a88b6a4254e',1,'nats.h']]],
+  ['natssubscription_5fautounsubscribe_151',['natsSubscription_AutoUnsubscribe',['../group__sub_group.html#ga09f285de2746a6e27fc66efd60bd3116',1,'nats.h']]],
+  ['natssubscription_5fclearmaxpending_152',['natsSubscription_ClearMaxPending',['../group__sub_group.html#gafe31911d8372db401d33856465421710',1,'nats.h']]],
+  ['natssubscription_5fdestroy_153',['natsSubscription_Destroy',['../group__sub_group.html#ga50a95dd96e9b714201679a015d62832f',1,'nats.h']]],
+  ['natssubscription_5fdrain_154',['natsSubscription_Drain',['../group__sub_group.html#ga26c9736289d326fb7d6df7e2a0df72ab',1,'nats.h']]],
+  ['natssubscription_5fdraincompletionstatus_155',['natsSubscription_DrainCompletionStatus',['../group__sub_group.html#ga9834bd02f67a25ac084d5ad71e146019',1,'nats.h']]],
+  ['natssubscription_5fdraintimeout_156',['natsSubscription_DrainTimeout',['../group__sub_group.html#ga9c26a3f9584e7804060a48ec1b7e2a68',1,'nats.h']]],
+  ['natssubscription_5ffetch_157',['natsSubscription_Fetch',['../group__js_sub_group.html#gafc5e0d2269bd23b4d5fb7f3b05278e50',1,'nats.h']]],
+  ['natssubscription_5ffetchrequest_158',['natsSubscription_FetchRequest',['../group__js_sub_group.html#ga676292505e7fde8688cfd886b79a10ed',1,'nats.h']]],
+  ['natssubscription_5fgetconsumerinfo_159',['natsSubscription_GetConsumerInfo',['../group__js_sub_group.html#gaae716a1431db065744c079b71a9f4c2e',1,'nats.h']]],
+  ['natssubscription_5fgetdelivered_160',['natsSubscription_GetDelivered',['../group__sub_group.html#ga476b7276d0b7f9946834d2bb2423e955',1,'nats.h']]],
+  ['natssubscription_5fgetdropped_161',['natsSubscription_GetDropped',['../group__sub_group.html#ga24f1636869e26661ce62c9c9f4d80823',1,'nats.h']]],
+  ['natssubscription_5fgetid_162',['natsSubscription_GetID',['../group__sub_group.html#ga5a029a784c0a7f8b5800b48cc995db20',1,'nats.h']]],
+  ['natssubscription_5fgetmaxpending_163',['natsSubscription_GetMaxPending',['../group__sub_group.html#ga0abc5d9afbc6b0c9c5adaf533904c968',1,'nats.h']]],
+  ['natssubscription_5fgetpending_164',['natsSubscription_GetPending',['../group__sub_group.html#gaca6262e2ef842caa701a9f233db72707',1,'nats.h']]],
+  ['natssubscription_5fgetpendinglimits_165',['natsSubscription_GetPendingLimits',['../group__sub_group.html#ga786bb458981274fe717f266bd3b96d96',1,'nats.h']]],
+  ['natssubscription_5fgetsequencemismatch_166',['natsSubscription_GetSequenceMismatch',['../group__js_sub_group.html#ga0daed9f0d2d00cb14314ecc180a6fa84',1,'nats.h']]],
+  ['natssubscription_5fgetstats_167',['natsSubscription_GetStats',['../group__sub_group.html#ga12b60cdb3aca7329edebc480ae86bfab',1,'nats.h']]],
+  ['natssubscription_5fgetsubject_168',['natsSubscription_GetSubject',['../group__sub_group.html#gadd4872b9fc5678a73f9ab04ce8428432',1,'nats.h']]],
+  ['natssubscription_5fisvalid_169',['natsSubscription_IsValid',['../group__sub_group.html#ga5e6454bbc7a90b9694112d45bd8de903',1,'nats.h']]],
+  ['natssubscription_5fnextmsg_170',['natsSubscription_NextMsg',['../group__sub_group.html#ga6538a5d78dfb0f16514b94c8e74c11af',1,'nats.h']]],
+  ['natssubscription_5fnodeliverydelay_171',['natsSubscription_NoDeliveryDelay',['../group__sub_group.html#ga38f1e41fc7619101fc4aa52014dd5428',1,'nats.h']]],
+  ['natssubscription_5fqueuedmsgs_172',['natsSubscription_QueuedMsgs',['../group__sub_group.html#ga8a37b2d5290da3aecc05483d79e7e254',1,'nats.h']]],
+  ['natssubscription_5fsetoncompletecb_173',['natsSubscription_SetOnCompleteCB',['../group__sub_group.html#gaea632f845d473e7461b134c0e7bf4077',1,'nats.h']]],
+  ['natssubscription_5fsetpendinglimits_174',['natsSubscription_SetPendingLimits',['../group__sub_group.html#ga68a7cea89e75c529a7dd3bb77303dda4',1,'nats.h']]],
+  ['natssubscription_5funsubscribe_175',['natsSubscription_Unsubscribe',['../group__sub_group.html#gaee87f8be0e6c2a4693ba2cea070583ba',1,'nats.h']]],
+  ['natssubscription_5fwaitfordraincompletion_176',['natsSubscription_WaitForDrainCompletion',['../group__sub_group.html#ga0408c9b6e4ad4078ac0267656ace222d',1,'nats.h']]]
+];
diff --git a/doc/html/search/functions_3.html b/doc/html/search/functions_3.html
new file mode 100644 (file)
index 0000000..0b37ee2
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="functions_3.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/functions_3.js b/doc/html/search/functions_3.js
new file mode 100644 (file)
index 0000000..52002a3
--- /dev/null
@@ -0,0 +1,44 @@
+var searchData=
+[
+  ['stanconnection_5fclose_0',['stanConnection_Close',['../group__stan_conn_mgt_group.html#ga4952a7f65a53fdb5ca1c26b1a1656f1d',1,'nats.h']]],
+  ['stanconnection_5fconnect_1',['stanConnection_Connect',['../group__stan_conn_mgt_group.html#ga35e0e6e5e3b7f3818a3ac3600efb8f8f',1,'nats.h']]],
+  ['stanconnection_5fdestroy_2',['stanConnection_Destroy',['../group__stan_conn_mgt_group.html#gaea095eec18fdf04e06de16711f8b1a04',1,'nats.h']]],
+  ['stanconnection_5fgetnatsconnection_3',['stanConnection_GetNATSConnection',['../group__stan_conn_mgt_group.html#ga166ec494a55c9b1f9ebafd2294e05ff6',1,'nats.h']]],
+  ['stanconnection_5fpublish_4',['stanConnection_Publish',['../group__stan_conn_pub_group.html#ga24f3f7f709b15fe53e1edaeead08fc7d',1,'nats.h']]],
+  ['stanconnection_5fpublishasync_5',['stanConnection_PublishAsync',['../group__stan_conn_pub_group.html#ga0c4d1e4615f8ac834f0a4021f75d39f0',1,'nats.h']]],
+  ['stanconnection_5fqueuesubscribe_6',['stanConnection_QueueSubscribe',['../group__stan_conn_sub_group.html#ga17d42bf9a4fa39470561a1a668e6b4a2',1,'nats.h']]],
+  ['stanconnection_5freleasenatsconnection_7',['stanConnection_ReleaseNATSConnection',['../group__stan_conn_mgt_group.html#ga2e56a93825e1214a5ab688860e2a8ce6',1,'nats.h']]],
+  ['stanconnection_5fsubscribe_8',['stanConnection_Subscribe',['../group__stan_conn_sub_group.html#gae545358fdc493baf6d29429a8156781f',1,'nats.h']]],
+  ['stanconnoptions_5fcreate_9',['stanConnOptions_Create',['../group__stan_conn_opts_group.html#gaff52a1ce90253b4bdbb0005fca4f71b6',1,'nats.h']]],
+  ['stanconnoptions_5fdestroy_10',['stanConnOptions_Destroy',['../group__stan_conn_opts_group.html#ga83fd0a29b136cbfb643be642eb2fa726',1,'nats.h']]],
+  ['stanconnoptions_5fsetconnectionlosthandler_11',['stanConnOptions_SetConnectionLostHandler',['../group__stan_conn_opts_group.html#ga19ba15c8001aa835b261eea3a309e6d3',1,'nats.h']]],
+  ['stanconnoptions_5fsetconnectionwait_12',['stanConnOptions_SetConnectionWait',['../group__stan_conn_opts_group.html#ga66c72c482696d9ceca71fced7cbb1264',1,'nats.h']]],
+  ['stanconnoptions_5fsetdiscoveryprefix_13',['stanConnOptions_SetDiscoveryPrefix',['../group__stan_conn_opts_group.html#ga07105d1d00878bba19f47243b2c88402',1,'nats.h']]],
+  ['stanconnoptions_5fsetmaxpubacksinflight_14',['stanConnOptions_SetMaxPubAcksInflight',['../group__stan_conn_opts_group.html#ga29eee1be7eff749aeac3bab60d1b0405',1,'nats.h']]],
+  ['stanconnoptions_5fsetnatsoptions_15',['stanConnOptions_SetNATSOptions',['../group__stan_conn_opts_group.html#gae3fc9a4daa7f85367811a313857337b4',1,'nats.h']]],
+  ['stanconnoptions_5fsetpings_16',['stanConnOptions_SetPings',['../group__stan_conn_opts_group.html#gad835223f08fbeae2a3c7a34d3fa1550b',1,'nats.h']]],
+  ['stanconnoptions_5fsetpubackwait_17',['stanConnOptions_SetPubAckWait',['../group__stan_conn_opts_group.html#ga36f2ee441562dcf619d6e020b823fc96',1,'nats.h']]],
+  ['stanconnoptions_5fseturl_18',['stanConnOptions_SetURL',['../group__stan_conn_opts_group.html#ga3c6d511fc1e1febcdf5344960de5a0b3',1,'nats.h']]],
+  ['stanmsg_5fdestroy_19',['stanMsg_Destroy',['../group__stan_msg_group.html#gacd0059fb499963f5b2eae18053e5f74f',1,'nats.h']]],
+  ['stanmsg_5fgetdata_20',['stanMsg_GetData',['../group__stan_msg_group.html#ga2f27fbfb79a46c52e079f670c59e1260',1,'nats.h']]],
+  ['stanmsg_5fgetdatalength_21',['stanMsg_GetDataLength',['../group__stan_msg_group.html#ga7d1e394a686bc25ab7376b7f28b9e777',1,'nats.h']]],
+  ['stanmsg_5fgetsequence_22',['stanMsg_GetSequence',['../group__stan_msg_group.html#ga98b66ff73447e1d7e329edbfcde782b5',1,'nats.h']]],
+  ['stanmsg_5fgettimestamp_23',['stanMsg_GetTimestamp',['../group__stan_msg_group.html#ga2fa524b11e9621cf46ca9b1a3ca66452',1,'nats.h']]],
+  ['stanmsg_5fisredelivered_24',['stanMsg_IsRedelivered',['../group__stan_msg_group.html#ga8e537d014b89d9d7da7906b2ee75d5c0',1,'nats.h']]],
+  ['stansuboptions_5fcreate_25',['stanSubOptions_Create',['../group__stan_sub_opts_group.html#gad87a2cef4f4ddf64696f9864773c37cf',1,'nats.h']]],
+  ['stansuboptions_5fdeliverallavailable_26',['stanSubOptions_DeliverAllAvailable',['../group__stan_sub_opts_group.html#gab09b81358e93199a4631eb06f1ec179f',1,'nats.h']]],
+  ['stansuboptions_5fdestroy_27',['stanSubOptions_Destroy',['../group__stan_sub_opts_group.html#ga1b56877d0a6729e148c9c288e2b88e3f',1,'nats.h']]],
+  ['stansuboptions_5fsetackwait_28',['stanSubOptions_SetAckWait',['../group__stan_sub_opts_group.html#gafbb4e6c74978c4e8f30f016c20cc2bdf',1,'nats.h']]],
+  ['stansuboptions_5fsetdurablename_29',['stanSubOptions_SetDurableName',['../group__stan_sub_opts_group.html#gaa018bceba99ef3726157e87c6918ab14',1,'nats.h']]],
+  ['stansuboptions_5fsetmanualackmode_30',['stanSubOptions_SetManualAckMode',['../group__stan_sub_opts_group.html#ga6f49ae2629e49d2bfa35990cf030bf83',1,'nats.h']]],
+  ['stansuboptions_5fsetmaxinflight_31',['stanSubOptions_SetMaxInflight',['../group__stan_sub_opts_group.html#ga35efbdea888e00440c500845064931c0',1,'nats.h']]],
+  ['stansuboptions_5fstartatsequence_32',['stanSubOptions_StartAtSequence',['../group__stan_sub_opts_group.html#ga6cb7f6e1ac697d16959f9042eeb84dc1',1,'nats.h']]],
+  ['stansuboptions_5fstartattime_33',['stanSubOptions_StartAtTime',['../group__stan_sub_opts_group.html#gaafd7a553486eea3c9d309da0744a3608',1,'nats.h']]],
+  ['stansuboptions_5fstartattimedelta_34',['stanSubOptions_StartAtTimeDelta',['../group__stan_sub_opts_group.html#ga27d9175901997b8468997019746599b5',1,'nats.h']]],
+  ['stansuboptions_5fstartwithlastreceived_35',['stanSubOptions_StartWithLastReceived',['../group__stan_sub_opts_group.html#ga856a74e31f3307faf988747c1f88717c',1,'nats.h']]],
+  ['stansubscription_5fackmsg_36',['stanSubscription_AckMsg',['../group__stan_sub_group.html#ga3a1cca9fa3ea54fcf7a43fd1335a26d3',1,'nats.h']]],
+  ['stansubscription_5fclose_37',['stanSubscription_Close',['../group__stan_sub_group.html#gacfa3a7b4fa333c84acfa7521fbbb5bcc',1,'nats.h']]],
+  ['stansubscription_5fdestroy_38',['stanSubscription_Destroy',['../group__stan_sub_group.html#ga3f6ce924f6a1830a55e30e9910aad4ba',1,'nats.h']]],
+  ['stansubscription_5fsetoncompletecb_39',['stanSubscription_SetOnCompleteCB',['../group__stan_sub_group.html#ga7b039908ec45cfc2c16ec61ba8daca9d',1,'nats.h']]],
+  ['stansubscription_5funsubscribe_40',['stanSubscription_Unsubscribe',['../group__stan_sub_group.html#gafa428a7e0f6800216cb06fd738bd235e',1,'nats.h']]]
+];
diff --git a/doc/html/search/groups_0.html b/doc/html/search/groups_0.html
new file mode 100644 (file)
index 0000000..c8654e6
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="groups_0.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/groups_0.js b/doc/html/search/groups_0.js
new file mode 100644 (file)
index 0000000..d154857
--- /dev/null
@@ -0,0 +1,5 @@
+var searchData=
+[
+  ['callbacks_0',['Callbacks',['../group__callbacks_group.html',1,'']]],
+  ['connection_1',['Connection',['../group__conn_group.html',1,'']]]
+];
diff --git a/doc/html/search/groups_1.html b/doc/html/search/groups_1.html
new file mode 100644 (file)
index 0000000..a2089f4
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="groups_1.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/groups_1.js b/doc/html/search/groups_1.js
new file mode 100644 (file)
index 0000000..094992f
--- /dev/null
@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['environment_20variables_0',['Environment Variables',['../group__env_variables_group.html',1,'']]]
+];
diff --git a/doc/html/search/groups_2.html b/doc/html/search/groups_2.html
new file mode 100644 (file)
index 0000000..5608e06
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="groups_2.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/groups_2.js b/doc/html/search/groups_2.js
new file mode 100644 (file)
index 0000000..6cf8546
--- /dev/null
@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['functions_0',['Functions',['../group__func_group.html',1,'']]]
+];
diff --git a/doc/html/search/groups_3.html b/doc/html/search/groups_3.html
new file mode 100644 (file)
index 0000000..ab26f1f
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="groups_3.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/groups_3.js b/doc/html/search/groups_3.js
new file mode 100644 (file)
index 0000000..0fdda84
--- /dev/null
@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['inboxes_0',['Inboxes',['../group__inbox_group.html',1,'']]]
+];
diff --git a/doc/html/search/groups_4.html b/doc/html/search/groups_4.html
new file mode 100644 (file)
index 0000000..9cff75c
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="groups_4.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/groups_4.js b/doc/html/search/groups_4.js
new file mode 100644 (file)
index 0000000..53a6578
--- /dev/null
@@ -0,0 +1,5 @@
+var searchData=
+[
+  ['jetstream_0',['JetStream',['../group__js_group.html',1,'']]],
+  ['jetstream_20assets_20management_1',['JetStream Assets Management',['../group__js_assets_group.html',1,'']]]
+];
diff --git a/doc/html/search/groups_5.html b/doc/html/search/groups_5.html
new file mode 100644 (file)
index 0000000..4aa3f9d
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="groups_5.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/groups_5.js b/doc/html/search/groups_5.js
new file mode 100644 (file)
index 0000000..8dd1858
--- /dev/null
@@ -0,0 +1,8 @@
+var searchData=
+[
+  ['keyvalue_20store_0',['KeyValue store',['../group__kv_group.html',1,'']]],
+  ['keyvalue_20store_20entries_1',['KeyValue store entries',['../group__kv_entry.html',1,'']]],
+  ['keyvalue_20store_20management_2',['KeyValue store management',['../group__kv_group_mgt.html',1,'']]],
+  ['keyvalue_20store_20status_3',['KeyValue store status',['../group__kv_status.html',1,'']]],
+  ['keyvalue_20store_20watcher_4',['KeyValue store watcher',['../group__kv_watcher.html',1,'']]]
+];
diff --git a/doc/html/search/groups_6.html b/doc/html/search/groups_6.html
new file mode 100644 (file)
index 0000000..03970d9
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="groups_6.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/groups_6.js b/doc/html/search/groups_6.js
new file mode 100644 (file)
index 0000000..150113b
--- /dev/null
@@ -0,0 +1,6 @@
+var searchData=
+[
+  ['libevent_20adapter_0',['Libevent Adapter',['../group__libevent_functions.html',1,'']]],
+  ['library_1',['Library',['../group__library_group.html',1,'']]],
+  ['libuv_20adapter_2',['Libuv Adapter',['../group__libuv_functions.html',1,'']]]
+];
diff --git a/doc/html/search/groups_7.html b/doc/html/search/groups_7.html
new file mode 100644 (file)
index 0000000..b042f81
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="groups_7.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/groups_7.js b/doc/html/search/groups_7.js
new file mode 100644 (file)
index 0000000..451d7b5
--- /dev/null
@@ -0,0 +1,6 @@
+var searchData=
+[
+  ['management_0',['Management',['../group__conn_mgt_group.html',1,'(Global Namespace)'],['../group__stan_conn_mgt_group.html',1,'(Global Namespace)']]],
+  ['message_1',['Message',['../group__msg_group.html',1,'']]],
+  ['messages_2',['Messages',['../group__js_msg.html',1,'']]]
+];
diff --git a/doc/html/search/groups_8.html b/doc/html/search/groups_8.html
new file mode 100644 (file)
index 0000000..866e9f6
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="groups_8.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/groups_8.js b/doc/html/search/groups_8.js
new file mode 100644 (file)
index 0000000..333e2e8
--- /dev/null
@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['options_0',['Options',['../group__opts_group.html',1,'']]]
+];
diff --git a/doc/html/search/groups_9.html b/doc/html/search/groups_9.html
new file mode 100644 (file)
index 0000000..a254cff
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="groups_9.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/groups_9.js b/doc/html/search/groups_9.js
new file mode 100644 (file)
index 0000000..8ae807c
--- /dev/null
@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['publishing_0',['Publishing',['../group__conn_pub_group.html',1,'(Global Namespace)'],['../group__js_pub_group.html',1,'(Global Namespace)'],['../group__stan_conn_pub_group.html',1,'(Global Namespace)']]]
+];
diff --git a/doc/html/search/groups_a.html b/doc/html/search/groups_a.html
new file mode 100644 (file)
index 0000000..2a1acce
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="groups_a.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/groups_a.js b/doc/html/search/groups_a.js
new file mode 100644 (file)
index 0000000..95616b4
--- /dev/null
@@ -0,0 +1,12 @@
+var searchData=
+[
+  ['statistics_0',['Statistics',['../group__stats_group.html',1,'']]],
+  ['status_1',['Status',['../group__status_group.html',1,'']]],
+  ['streaming_20connection_2',['Streaming Connection',['../group__stan_conn_group.html',1,'']]],
+  ['streaming_20connection_20options_3',['Streaming Connection Options',['../group__stan_conn_opts_group.html',1,'']]],
+  ['streaming_20message_4',['Streaming Message',['../group__stan_msg_group.html',1,'']]],
+  ['streaming_20subscription_5',['Streaming Subscription',['../group__stan_sub_group.html',1,'']]],
+  ['streaming_20subscription_20options_6',['Streaming Subscription Options',['../group__stan_sub_opts_group.html',1,'']]],
+  ['subscribing_7',['Subscribing',['../group__conn_sub_group.html',1,'(Global Namespace)'],['../group__js_sub_group.html',1,'(Global Namespace)'],['../group__stan_conn_sub_group.html',1,'(Global Namespace)']]],
+  ['subscription_8',['Subscription',['../group__sub_group.html',1,'']]]
+];
diff --git a/doc/html/search/groups_b.html b/doc/html/search/groups_b.html
new file mode 100644 (file)
index 0000000..f3a305e
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="groups_b.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/groups_b.js b/doc/html/search/groups_b.js
new file mode 100644 (file)
index 0000000..a05b25a
--- /dev/null
@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['types_0',['Types',['../group__types_group.html',1,'']]]
+];
diff --git a/doc/html/search/groups_c.html b/doc/html/search/groups_c.html
new file mode 100644 (file)
index 0000000..f67dbc6
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="groups_c.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/groups_c.js b/doc/html/search/groups_c.js
new file mode 100644 (file)
index 0000000..3508171
--- /dev/null
@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['wildcards_0',['Wildcards',['../group__wildcards_group.html',1,'']]]
+];
diff --git a/doc/html/search/mag.svg b/doc/html/search/mag.svg
new file mode 100644 (file)
index 0000000..9f46b30
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   viewBox="0 0 20 19"
+   height="19"
+   width="20"
+   id="svg2"
+   version="1.1">
+  <metadata
+     id="metadata8">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs6" />
+  <circle
+     r="3.5"
+     cy="8.5"
+     cx="5.5"
+     id="path4611"
+     style="fill:#000000;fill-opacity:0;stroke:#656565;stroke-width:1.4;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" />
+  <path
+     id="path4630"
+     d="m 8.1085854,11.109059 2.7823556,2.782356"
+     style="fill:none;stroke:#656565;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+</svg>
diff --git a/doc/html/search/mag_d.svg b/doc/html/search/mag_d.svg
new file mode 100644 (file)
index 0000000..b9a814c
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   viewBox="0 0 20 19"
+   height="19"
+   width="20"
+   id="svg2"
+   version="1.1">
+  <metadata
+     id="metadata8">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs6" />
+  <circle
+     r="3.5"
+     cy="8.5"
+     cx="5.5"
+     id="path4611"
+     style="fill:#000000;fill-opacity:0;stroke:#C5C5C5;stroke-width:1.4;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" />
+  <path
+     id="path4630"
+     d="m 8.1085854,11.109059 2.7823556,2.782356"
+     style="fill:none;stroke:#C5C5C5;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+</svg>
diff --git a/doc/html/search/mag_sel.png b/doc/html/search/mag_sel.png
new file mode 100644 (file)
index 0000000..81f6040
Binary files /dev/null and b/doc/html/search/mag_sel.png differ
diff --git a/doc/html/search/mag_sel.svg b/doc/html/search/mag_sel.svg
new file mode 100644 (file)
index 0000000..03626f6
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   version="1.1"
+   id="svg2"
+   width="20"
+   height="19"
+   viewBox="0 0 20 19"
+   sodipodi:docname="mag_sel.svg"
+   inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)">
+  <metadata
+     id="metadata8">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs6" />
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="1920"
+     inkscape:window-height="2096"
+     id="namedview4"
+     showgrid="false"
+     fit-margin-top="0"
+     fit-margin-left="0"
+     fit-margin-right="0"
+     fit-margin-bottom="0"
+     inkscape:zoom="32"
+     inkscape:cx="5.9792688"
+     inkscape:cy="1.1436277"
+     inkscape:window-x="1920"
+     inkscape:window-y="27"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="svg2" />
+  <circle
+     style="fill:#000000;fill-opacity:0;stroke:#656565;stroke-width:1.4;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
+     id="path4611"
+     cx="5.5"
+     cy="8.5"
+     r="3.5" />
+  <path
+     style="fill:#656565;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     d="M 11,7 13.5,10 16,7 Z"
+     id="path4609"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="cccc" />
+  <path
+     style="fill:none;stroke:#656565;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+     d="m 8.1085854,11.109059 2.7823556,2.782356"
+     id="path4630"
+     inkscape:connector-curvature="0" />
+</svg>
diff --git a/doc/html/search/mag_seld.svg b/doc/html/search/mag_seld.svg
new file mode 100644 (file)
index 0000000..6e720dc
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   version="1.1"
+   id="svg2"
+   width="20"
+   height="19"
+   viewBox="0 0 20 19"
+   sodipodi:docname="mag_sel.svg"
+   inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)">
+  <metadata
+     id="metadata8">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs6" />
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="1920"
+     inkscape:window-height="2096"
+     id="namedview4"
+     showgrid="false"
+     fit-margin-top="0"
+     fit-margin-left="0"
+     fit-margin-right="0"
+     fit-margin-bottom="0"
+     inkscape:zoom="32"
+     inkscape:cx="5.9792688"
+     inkscape:cy="1.1436277"
+     inkscape:window-x="1920"
+     inkscape:window-y="27"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="svg2" />
+  <circle
+     style="fill:#000000;fill-opacity:0;stroke:#C5C5C5;stroke-width:1.4;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
+     id="path4611"
+     cx="5.5"
+     cy="8.5"
+     r="3.5" />
+  <path
+     style="fill:#C5C5C5;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     d="M 11,7 13.5,10 16,7 Z"
+     id="path4609"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="cccc" />
+  <path
+     style="fill:none;stroke:#C5C5C5;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+     d="m 8.1085854,11.109059 2.7823556,2.782356"
+     id="path4630"
+     inkscape:connector-curvature="0" />
+</svg>
diff --git a/doc/html/search/nomatches.html b/doc/html/search/nomatches.html
new file mode 100644 (file)
index 0000000..2b9360b
--- /dev/null
@@ -0,0 +1,13 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/pages_0.html b/doc/html/search/pages_0.html
new file mode 100644 (file)
index 0000000..e53c280
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="pages_0.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/pages_0.js b/doc/html/search/pages_0.js
new file mode 100644 (file)
index 0000000..597dc4b
--- /dev/null
@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['_25nats_20c_20client_2e_0',['%NATS C client.',['../index.html',1,'']]]
+];
diff --git a/doc/html/search/pages_1.html b/doc/html/search/pages_1.html
new file mode 100644 (file)
index 0000000..73d9bb1
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="pages_1.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/pages_1.js b/doc/html/search/pages_1.js
new file mode 100644 (file)
index 0000000..4d85845
--- /dev/null
@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['deprecated_20list_0',['Deprecated List',['../deprecated.html',1,'']]]
+];
diff --git a/doc/html/search/search.css b/doc/html/search/search.css
new file mode 100644 (file)
index 0000000..19f76f9
--- /dev/null
@@ -0,0 +1,291 @@
+/*---------------- Search Box positioning */
+
+#main-menu > li:last-child {
+    /* This <li> object is the parent of the search bar */
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    height: 36px;
+    margin-right: 1em;
+}
+
+/*---------------- Search box styling */
+
+.SRPage * {
+    font-weight: normal;
+    line-height: normal;
+}
+
+dark-mode-toggle {
+    margin-left: 5px;
+    display: flex;
+    float: right;
+}
+
+#MSearchBox {
+    display: inline-block;
+    white-space : nowrap;
+    background: var(--search-background-color);
+    border-radius: 0.65em;
+    box-shadow: var(--search-box-shadow);
+    z-index: 102;
+}
+
+#MSearchBox .left {
+    display: inline-block;
+    vertical-align: middle;
+    height: 1.4em;
+}
+
+#MSearchSelect {
+    display: inline-block;
+    vertical-align: middle;
+    width: 20px;
+    height: 19px;
+    background-image: var(--search-magnification-select-image);
+    margin: 0 0 0 0.3em;
+    padding: 0;
+}
+
+#MSearchSelectExt {
+    display: inline-block;
+    vertical-align: middle;
+    width: 10px;
+    height: 19px;
+    background-image: var(--search-magnification-image);
+    margin: 0 0 0 0.5em;
+    padding: 0;
+}
+
+
+#MSearchField {
+    display: inline-block;
+    vertical-align: middle;
+    width: 7.5em;
+    height: 19px;
+    margin: 0 0.15em;
+    padding: 0;
+    line-height: 1em;
+    border:none;
+    color: var(--search-foreground-color);
+    outline: none;
+    font-family: var(--font-family-search);
+    -webkit-border-radius: 0px;
+    border-radius: 0px;
+    background: none;
+}
+
+@media(hover: none) {
+    /* to avoid zooming on iOS */
+    #MSearchField {
+        font-size: 16px;
+    }
+}
+
+#MSearchBox .right {
+    display: inline-block;
+    vertical-align: middle;
+    width: 1.4em;
+    height: 1.4em;
+}
+
+#MSearchClose {
+    display: none;
+    font-size: inherit;
+    background : none;
+    border: none;
+    margin: 0;
+    padding: 0;
+    outline: none;
+
+}
+
+#MSearchCloseImg {
+    padding: 0.3em;
+    margin: 0;
+}
+
+.MSearchBoxActive #MSearchField {
+    color: var(--search-active-color);
+}
+
+
+
+/*---------------- Search filter selection */
+
+#MSearchSelectWindow {
+    display: none;
+    position: absolute;
+    left: 0; top: 0;
+    border: 1px solid var(--search-filter-border-color);
+    background-color: var(--search-filter-background-color);
+    z-index: 10001;
+    padding-top: 4px;
+    padding-bottom: 4px;
+    -moz-border-radius: 4px;
+    -webkit-border-top-left-radius: 4px;
+    -webkit-border-top-right-radius: 4px;
+    -webkit-border-bottom-left-radius: 4px;
+    -webkit-border-bottom-right-radius: 4px;
+    -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+}
+
+.SelectItem {
+    font: 8pt var(--font-family-search);
+    padding-left:  2px;
+    padding-right: 12px;
+    border: 0px;
+}
+
+span.SelectionMark {
+    margin-right: 4px;
+    font-family: var(--font-family-monospace);
+    outline-style: none;
+    text-decoration: none;
+}
+
+a.SelectItem {
+    display: block;
+    outline-style: none;
+    color: var(--search-filter-foreground-color);
+    text-decoration: none;
+    padding-left:   6px;
+    padding-right: 12px;
+}
+
+a.SelectItem:focus,
+a.SelectItem:active {
+    color: var(--search-filter-foreground-color);
+    outline-style: none;
+    text-decoration: none;
+}
+
+a.SelectItem:hover {
+    color: var(--search-filter-highlight-text-color);
+    background-color: var(--search-filter-highlight-bg-color);
+    outline-style: none;
+    text-decoration: none;
+    cursor: pointer;
+    display: block;
+}
+
+/*---------------- Search results window */
+
+iframe#MSearchResults {
+    /*width: 60ex;*/
+    height: 15em;
+}
+
+#MSearchResultsWindow {
+    display: none;
+    position: absolute;
+    left: 0; top: 0;
+    border: 1px solid var(--search-results-border-color);
+    background-color: var(--search-results-background-color);
+    z-index:10000;
+    width: 300px;
+    height: 400px;
+    overflow: auto;
+}
+
+/* ----------------------------------- */
+
+
+#SRIndex {
+    clear:both; 
+}
+
+.SREntry {
+    font-size: 10pt;
+    padding-left: 1ex;
+}
+
+.SRPage .SREntry {
+    font-size: 8pt;
+    padding: 1px 5px;
+}
+
+div.SRPage {
+    margin: 5px 2px;
+    background-color: var(--search-results-background-color);
+}
+
+.SRChildren {
+    padding-left: 3ex; padding-bottom: .5em 
+}
+
+.SRPage .SRChildren {
+    display: none;
+}
+
+.SRSymbol {
+    font-weight: bold;
+    color: var(--search-results-foreground-color);
+    font-family: var(--font-family-search);
+    text-decoration: none;
+    outline: none;
+}
+
+a.SRScope {
+    display: block;
+    color: var(--search-results-foreground-color);
+    font-family: var(--font-family-search);
+    font-size: 8pt;
+    text-decoration: none;
+    outline: none;
+}
+
+a.SRSymbol:focus, a.SRSymbol:active,
+a.SRScope:focus, a.SRScope:active {
+    text-decoration: underline;
+}
+
+span.SRScope {
+    padding-left: 4px;
+    font-family: var(--font-family-search);
+}
+
+.SRPage .SRStatus {
+    padding: 2px 5px;
+    font-size: 8pt;
+    font-style: italic;
+    font-family: var(--font-family-search);
+}
+
+.SRResult {
+    display: none;
+}
+
+div.searchresults {
+    margin-left: 10px;
+    margin-right: 10px;
+}
+
+/*---------------- External search page results */
+
+.pages b {
+   color: white;
+   padding: 5px 5px 3px 5px;
+   background-image: var(--nav-gradient-active-image-parent);
+   background-repeat: repeat-x;
+   text-shadow: 0 1px 1px #000000;
+}
+
+.pages {
+    line-height: 17px;
+    margin-left: 4px;
+    text-decoration: none;
+}
+
+.hl {
+    font-weight: bold;
+}
+
+#searchresults {
+    margin-bottom: 20px;
+}
+
+.searchpages {
+    margin-top: 10px;
+}
+
diff --git a/doc/html/search/search.js b/doc/html/search/search.js
new file mode 100644 (file)
index 0000000..e103a26
--- /dev/null
@@ -0,0 +1,816 @@
+/*
+ @licstart  The following is the entire license notice for the JavaScript code in this file.
+
+ The MIT License (MIT)
+
+ Copyright (C) 1997-2020 by Dimitri van Heesch
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+ and associated documentation files (the "Software"), to deal in the Software without restriction,
+ including without limitation the rights to use, copy, modify, merge, publish, distribute,
+ sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all copies or
+ substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+ BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ @licend  The above is the entire license notice for the JavaScript code in this file
+ */
+function convertToId(search)
+{
+  var result = '';
+  for (i=0;i<search.length;i++)
+  {
+    var c = search.charAt(i);
+    var cn = c.charCodeAt(0);
+    if (c.match(/[a-z0-9\u0080-\uFFFF]/))
+    {
+      result+=c;
+    }
+    else if (cn<16)
+    {
+      result+="_0"+cn.toString(16);
+    }
+    else
+    {
+      result+="_"+cn.toString(16);
+    }
+  }
+  return result;
+}
+
+function getXPos(item)
+{
+  var x = 0;
+  if (item.offsetWidth)
+  {
+    while (item && item!=document.body)
+    {
+      x   += item.offsetLeft;
+      item = item.offsetParent;
+    }
+  }
+  return x;
+}
+
+function getYPos(item)
+{
+  var y = 0;
+  if (item.offsetWidth)
+  {
+     while (item && item!=document.body)
+     {
+       y   += item.offsetTop;
+       item = item.offsetParent;
+     }
+  }
+  return y;
+}
+
+var searchResults = new SearchResults("searchResults");
+
+/* A class handling everything associated with the search panel.
+
+   Parameters:
+   name - The name of the global variable that will be
+          storing this instance.  Is needed to be able to set timeouts.
+   resultPath - path to use for external files
+*/
+function SearchBox(name, resultsPath, extension)
+{
+  if (!name || !resultsPath) {  alert("Missing parameters to SearchBox."); }
+  if (!extension || extension == "") { extension = ".html"; }
+
+  // ---------- Instance variables
+  this.name                  = name;
+  this.resultsPath           = resultsPath;
+  this.keyTimeout            = 0;
+  this.keyTimeoutLength      = 500;
+  this.closeSelectionTimeout = 300;
+  this.lastSearchValue       = "";
+  this.lastResultsPage       = "";
+  this.hideTimeout           = 0;
+  this.searchIndex           = 0;
+  this.searchActive          = false;
+  this.extension             = extension;
+
+  // ----------- DOM Elements
+
+  this.DOMSearchField = function()
+  {  return document.getElementById("MSearchField");  }
+
+  this.DOMSearchSelect = function()
+  {  return document.getElementById("MSearchSelect");  }
+
+  this.DOMSearchSelectWindow = function()
+  {  return document.getElementById("MSearchSelectWindow");  }
+
+  this.DOMPopupSearchResults = function()
+  {  return document.getElementById("MSearchResults");  }
+
+  this.DOMPopupSearchResultsWindow = function()
+  {  return document.getElementById("MSearchResultsWindow");  }
+
+  this.DOMSearchClose = function()
+  {  return document.getElementById("MSearchClose"); }
+
+  this.DOMSearchBox = function()
+  {  return document.getElementById("MSearchBox");  }
+
+  // ------------ Event Handlers
+
+  // Called when focus is added or removed from the search field.
+  this.OnSearchFieldFocus = function(isActive)
+  {
+    this.Activate(isActive);
+  }
+
+  this.OnSearchSelectShow = function()
+  {
+    var searchSelectWindow = this.DOMSearchSelectWindow();
+    var searchField        = this.DOMSearchSelect();
+
+    var left = getXPos(searchField);
+    var top  = getYPos(searchField);
+    top += searchField.offsetHeight;
+
+    // show search selection popup
+    searchSelectWindow.style.display='block';
+    searchSelectWindow.style.left =  left + 'px';
+    searchSelectWindow.style.top  =  top  + 'px';
+
+    // stop selection hide timer
+    if (this.hideTimeout)
+    {
+      clearTimeout(this.hideTimeout);
+      this.hideTimeout=0;
+    }
+    return false; // to avoid "image drag" default event
+  }
+
+  this.OnSearchSelectHide = function()
+  {
+    this.hideTimeout = setTimeout(this.name +".CloseSelectionWindow()",
+                                  this.closeSelectionTimeout);
+  }
+
+  // Called when the content of the search field is changed.
+  this.OnSearchFieldChange = function(evt)
+  {
+    if (this.keyTimeout) // kill running timer
+    {
+      clearTimeout(this.keyTimeout);
+      this.keyTimeout = 0;
+    }
+
+    var e  = (evt) ? evt : window.event; // for IE
+    if (e.keyCode==40 || e.keyCode==13)
+    {
+      if (e.shiftKey==1)
+      {
+        this.OnSearchSelectShow();
+        var win=this.DOMSearchSelectWindow();
+        for (i=0;i<win.childNodes.length;i++)
+        {
+          var child = win.childNodes[i]; // get span within a
+          if (child.className=='SelectItem')
+          {
+            child.focus();
+            return;
+          }
+        }
+        return;
+      }
+      else
+      {
+        var elem = searchResults.NavNext(0);
+        if (elem) elem.focus();
+      }
+    }
+    else if (e.keyCode==27) // Escape out of the search field
+    {
+      this.DOMSearchField().blur();
+      this.DOMPopupSearchResultsWindow().style.display = 'none';
+      this.DOMSearchClose().style.display = 'none';
+      this.lastSearchValue = '';
+      this.Activate(false);
+      return;
+    }
+
+    // strip whitespaces
+    var searchValue = this.DOMSearchField().value.replace(/ +/g, "");
+
+    if (searchValue != this.lastSearchValue) // search value has changed
+    {
+      if (searchValue != "") // non-empty search
+      {
+        // set timer for search update
+        this.keyTimeout = setTimeout(this.name + '.Search()',
+                                     this.keyTimeoutLength);
+      }
+      else // empty search field
+      {
+        this.DOMPopupSearchResultsWindow().style.display = 'none';
+        this.DOMSearchClose().style.display = 'none';
+        this.lastSearchValue = '';
+      }
+    }
+  }
+
+  this.SelectItemCount = function(id)
+  {
+    var count=0;
+    var win=this.DOMSearchSelectWindow();
+    for (i=0;i<win.childNodes.length;i++)
+    {
+      var child = win.childNodes[i]; // get span within a
+      if (child.className=='SelectItem')
+      {
+        count++;
+      }
+    }
+    return count;
+  }
+
+  this.SelectItemSet = function(id)
+  {
+    var i,j=0;
+    var win=this.DOMSearchSelectWindow();
+    for (i=0;i<win.childNodes.length;i++)
+    {
+      var child = win.childNodes[i]; // get span within a
+      if (child.className=='SelectItem')
+      {
+        var node = child.firstChild;
+        if (j==id)
+        {
+          node.innerHTML='&#8226;';
+        }
+        else
+        {
+          node.innerHTML='&#160;';
+        }
+        j++;
+      }
+    }
+  }
+
+  // Called when an search filter selection is made.
+  // set item with index id as the active item
+  this.OnSelectItem = function(id)
+  {
+    this.searchIndex = id;
+    this.SelectItemSet(id);
+    var searchValue = this.DOMSearchField().value.replace(/ +/g, "");
+    if (searchValue!="" && this.searchActive) // something was found -> do a search
+    {
+      this.Search();
+    }
+  }
+
+  this.OnSearchSelectKey = function(evt)
+  {
+    var e = (evt) ? evt : window.event; // for IE
+    if (e.keyCode==40 && this.searchIndex<this.SelectItemCount()) // Down
+    {
+      this.searchIndex++;
+      this.OnSelectItem(this.searchIndex);
+    }
+    else if (e.keyCode==38 && this.searchIndex>0) // Up
+    {
+      this.searchIndex--;
+      this.OnSelectItem(this.searchIndex);
+    }
+    else if (e.keyCode==13 || e.keyCode==27)
+    {
+      this.OnSelectItem(this.searchIndex);
+      this.CloseSelectionWindow();
+      this.DOMSearchField().focus();
+    }
+    return false;
+  }
+
+  // --------- Actions
+
+  // Closes the results window.
+  this.CloseResultsWindow = function()
+  {
+    this.DOMPopupSearchResultsWindow().style.display = 'none';
+    this.DOMSearchClose().style.display = 'none';
+    this.Activate(false);
+  }
+
+  this.CloseSelectionWindow = function()
+  {
+    this.DOMSearchSelectWindow().style.display = 'none';
+  }
+
+  // Performs a search.
+  this.Search = function()
+  {
+    this.keyTimeout = 0;
+
+    // strip leading whitespace
+    var searchValue = this.DOMSearchField().value.replace(/^ +/, "");
+
+    var code = searchValue.toLowerCase().charCodeAt(0);
+    var idxChar = searchValue.substr(0, 1).toLowerCase();
+    if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair
+    {
+      idxChar = searchValue.substr(0, 2);
+    }
+
+    var jsFile;
+
+    var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar);
+    if (idx!=-1)
+    {
+       var hexCode=idx.toString(16);
+       jsFile = this.resultsPath + indexSectionNames[this.searchIndex] + '_' + hexCode + '.js';
+    }
+
+    var loadJS = function(url, impl, loc){
+      var scriptTag = document.createElement('script');
+      scriptTag.src = url;
+      scriptTag.onload = impl;
+      scriptTag.onreadystatechange = impl;
+      loc.appendChild(scriptTag);
+    }
+
+    var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow();
+    var domSearchBox = this.DOMSearchBox();
+    var domPopupSearchResults = this.DOMPopupSearchResults();
+    var domSearchClose = this.DOMSearchClose();
+    var resultsPath = this.resultsPath;
+
+    var handleResults = function() {
+      document.getElementById("Loading").style.display="none";
+      if (typeof searchData !== 'undefined') {
+        createResults(resultsPath);
+        document.getElementById("NoMatches").style.display="none";
+      }
+      searchResults.Search(searchValue);
+
+      if (domPopupSearchResultsWindow.style.display!='block')
+      {
+        domSearchClose.style.display = 'inline-block';
+        var left = getXPos(domSearchBox) + 150;
+        var top  = getYPos(domSearchBox) + 20;
+        domPopupSearchResultsWindow.style.display = 'block';
+        left -= domPopupSearchResults.offsetWidth;
+        var maxWidth  = document.body.clientWidth;
+        var maxHeight = document.body.clientHeight;
+        var width = 300;
+        if (left<10) left=10;
+        if (width+left+8>maxWidth) width=maxWidth-left-8;
+        var height = 400;
+        if (height+top+8>maxHeight) height=maxHeight-top-8;
+        domPopupSearchResultsWindow.style.top     = top  + 'px';
+        domPopupSearchResultsWindow.style.left    = left + 'px';
+        domPopupSearchResultsWindow.style.width   = width + 'px';
+        domPopupSearchResultsWindow.style.height  = height + 'px';
+      }
+    }
+
+    if (jsFile) {
+      loadJS(jsFile, handleResults, this.DOMPopupSearchResultsWindow());
+    } else {
+      handleResults();
+    }
+
+    this.lastSearchValue = searchValue;
+  }
+
+  // -------- Activation Functions
+
+  // Activates or deactivates the search panel, resetting things to
+  // their default values if necessary.
+  this.Activate = function(isActive)
+  {
+    if (isActive || // open it
+        this.DOMPopupSearchResultsWindow().style.display == 'block'
+       )
+    {
+      this.DOMSearchBox().className = 'MSearchBoxActive';
+      this.searchActive = true;
+    }
+    else if (!isActive) // directly remove the panel
+    {
+      this.DOMSearchBox().className = 'MSearchBoxInactive';
+      this.searchActive             = false;
+      this.lastSearchValue          = ''
+      this.lastResultsPage          = '';
+      this.DOMSearchField().value   = '';
+    }
+  }
+}
+
+// -----------------------------------------------------------------------
+
+// The class that handles everything on the search results page.
+function SearchResults(name)
+{
+    // The number of matches from the last run of <Search()>.
+    this.lastMatchCount = 0;
+    this.lastKey = 0;
+    this.repeatOn = false;
+
+    // Toggles the visibility of the passed element ID.
+    this.FindChildElement = function(id)
+    {
+      var parentElement = document.getElementById(id);
+      var element = parentElement.firstChild;
+
+      while (element && element!=parentElement)
+      {
+        if (element.nodeName.toLowerCase() == 'div' && element.className == 'SRChildren')
+        {
+          return element;
+        }
+
+        if (element.nodeName.toLowerCase() == 'div' && element.hasChildNodes())
+        {
+           element = element.firstChild;
+        }
+        else if (element.nextSibling)
+        {
+           element = element.nextSibling;
+        }
+        else
+        {
+          do
+          {
+            element = element.parentNode;
+          }
+          while (element && element!=parentElement && !element.nextSibling);
+
+          if (element && element!=parentElement)
+          {
+            element = element.nextSibling;
+          }
+        }
+      }
+    }
+
+    this.Toggle = function(id)
+    {
+      var element = this.FindChildElement(id);
+      if (element)
+      {
+        if (element.style.display == 'block')
+        {
+          element.style.display = 'none';
+        }
+        else
+        {
+          element.style.display = 'block';
+        }
+      }
+    }
+
+    // Searches for the passed string.  If there is no parameter,
+    // it takes it from the URL query.
+    //
+    // Always returns true, since other documents may try to call it
+    // and that may or may not be possible.
+    this.Search = function(search)
+    {
+      if (!search) // get search word from URL
+      {
+        search = window.location.search;
+        search = search.substring(1);  // Remove the leading '?'
+        search = unescape(search);
+      }
+
+      search = search.replace(/^ +/, ""); // strip leading spaces
+      search = search.replace(/ +$/, ""); // strip trailing spaces
+      search = search.toLowerCase();
+      search = convertToId(search);
+
+      var resultRows = document.getElementsByTagName("div");
+      var matches = 0;
+
+      var i = 0;
+      while (i < resultRows.length)
+      {
+        var row = resultRows.item(i);
+        if (row.className == "SRResult")
+        {
+          var rowMatchName = row.id.toLowerCase();
+          rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_'
+
+          if (search.length<=rowMatchName.length &&
+             rowMatchName.substr(0, search.length)==search)
+          {
+            row.style.display = 'block';
+            matches++;
+          }
+          else
+          {
+            row.style.display = 'none';
+          }
+        }
+        i++;
+      }
+      document.getElementById("Searching").style.display='none';
+      if (matches == 0) // no results
+      {
+        document.getElementById("NoMatches").style.display='block';
+      }
+      else // at least one result
+      {
+        document.getElementById("NoMatches").style.display='none';
+      }
+      this.lastMatchCount = matches;
+      return true;
+    }
+
+    // return the first item with index index or higher that is visible
+    this.NavNext = function(index)
+    {
+      var focusItem;
+      while (1)
+      {
+        var focusName = 'Item'+index;
+        focusItem = document.getElementById(focusName);
+        if (focusItem && focusItem.parentNode.parentNode.style.display=='block')
+        {
+          break;
+        }
+        else if (!focusItem) // last element
+        {
+          break;
+        }
+        focusItem=null;
+        index++;
+      }
+      return focusItem;
+    }
+
+    this.NavPrev = function(index)
+    {
+      var focusItem;
+      while (1)
+      {
+        var focusName = 'Item'+index;
+        focusItem = document.getElementById(focusName);
+        if (focusItem && focusItem.parentNode.parentNode.style.display=='block')
+        {
+          break;
+        }
+        else if (!focusItem) // last element
+        {
+          break;
+        }
+        focusItem=null;
+        index--;
+      }
+      return focusItem;
+    }
+
+    this.ProcessKeys = function(e)
+    {
+      if (e.type == "keydown")
+      {
+        this.repeatOn = false;
+        this.lastKey = e.keyCode;
+      }
+      else if (e.type == "keypress")
+      {
+        if (!this.repeatOn)
+        {
+          if (this.lastKey) this.repeatOn = true;
+          return false; // ignore first keypress after keydown
+        }
+      }
+      else if (e.type == "keyup")
+      {
+        this.lastKey = 0;
+        this.repeatOn = false;
+      }
+      return this.lastKey!=0;
+    }
+
+    this.Nav = function(evt,itemIndex)
+    {
+      var e  = (evt) ? evt : window.event; // for IE
+      if (e.keyCode==13) return true;
+      if (!this.ProcessKeys(e)) return false;
+
+      if (this.lastKey==38) // Up
+      {
+        var newIndex = itemIndex-1;
+        var focusItem = this.NavPrev(newIndex);
+        if (focusItem)
+        {
+          var child = this.FindChildElement(focusItem.parentNode.parentNode.id);
+          if (child && child.style.display == 'block') // children visible
+          {
+            var n=0;
+            var tmpElem;
+            while (1) // search for last child
+            {
+              tmpElem = document.getElementById('Item'+newIndex+'_c'+n);
+              if (tmpElem)
+              {
+                focusItem = tmpElem;
+              }
+              else // found it!
+              {
+                break;
+              }
+              n++;
+            }
+          }
+        }
+        if (focusItem)
+        {
+          focusItem.focus();
+        }
+        else // return focus to search field
+        {
+           document.getElementById("MSearchField").focus();
+        }
+      }
+      else if (this.lastKey==40) // Down
+      {
+        var newIndex = itemIndex+1;
+        var focusItem;
+        var item = document.getElementById('Item'+itemIndex);
+        var elem = this.FindChildElement(item.parentNode.parentNode.id);
+        if (elem && elem.style.display == 'block') // children visible
+        {
+          focusItem = document.getElementById('Item'+itemIndex+'_c0');
+        }
+        if (!focusItem) focusItem = this.NavNext(newIndex);
+        if (focusItem)  focusItem.focus();
+      }
+      else if (this.lastKey==39) // Right
+      {
+        var item = document.getElementById('Item'+itemIndex);
+        var elem = this.FindChildElement(item.parentNode.parentNode.id);
+        if (elem) elem.style.display = 'block';
+      }
+      else if (this.lastKey==37) // Left
+      {
+        var item = document.getElementById('Item'+itemIndex);
+        var elem = this.FindChildElement(item.parentNode.parentNode.id);
+        if (elem) elem.style.display = 'none';
+      }
+      else if (this.lastKey==27) // Escape
+      {
+        searchBox.CloseResultsWindow();
+        document.getElementById("MSearchField").focus();
+      }
+      else if (this.lastKey==13) // Enter
+      {
+        return true;
+      }
+      return false;
+    }
+
+    this.NavChild = function(evt,itemIndex,childIndex)
+    {
+      var e  = (evt) ? evt : window.event; // for IE
+      if (e.keyCode==13) return true;
+      if (!this.ProcessKeys(e)) return false;
+
+      if (this.lastKey==38) // Up
+      {
+        if (childIndex>0)
+        {
+          var newIndex = childIndex-1;
+          document.getElementById('Item'+itemIndex+'_c'+newIndex).focus();
+        }
+        else // already at first child, jump to parent
+        {
+          document.getElementById('Item'+itemIndex).focus();
+        }
+      }
+      else if (this.lastKey==40) // Down
+      {
+        var newIndex = childIndex+1;
+        var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex);
+        if (!elem) // last child, jump to parent next parent
+        {
+          elem = this.NavNext(itemIndex+1);
+        }
+        if (elem)
+        {
+          elem.focus();
+        }
+      }
+      else if (this.lastKey==27) // Escape
+      {
+        searchBox.CloseResultsWindow();
+        document.getElementById("MSearchField").focus();
+      }
+      else if (this.lastKey==13) // Enter
+      {
+        return true;
+      }
+      return false;
+    }
+}
+
+function setKeyActions(elem,action)
+{
+  elem.setAttribute('onkeydown',action);
+  elem.setAttribute('onkeypress',action);
+  elem.setAttribute('onkeyup',action);
+}
+
+function setClassAttr(elem,attr)
+{
+  elem.setAttribute('class',attr);
+  elem.setAttribute('className',attr);
+}
+
+function createResults(resultsPath)
+{
+  var results = document.getElementById("SRResults");
+  results.innerHTML = '';
+  for (var e=0; e<searchData.length; e++)
+  {
+    var id = searchData[e][0];
+    var srResult = document.createElement('div');
+    srResult.setAttribute('id','SR_'+id);
+    setClassAttr(srResult,'SRResult');
+    var srEntry = document.createElement('div');
+    setClassAttr(srEntry,'SREntry');
+    var srLink = document.createElement('a');
+    srLink.setAttribute('id','Item'+e);
+    setKeyActions(srLink,'return searchResults.Nav(event,'+e+')');
+    setClassAttr(srLink,'SRSymbol');
+    srLink.innerHTML = searchData[e][1][0];
+    srEntry.appendChild(srLink);
+    if (searchData[e][1].length==2) // single result
+    {
+      srLink.setAttribute('href',resultsPath+searchData[e][1][1][0]);
+      srLink.setAttribute('onclick','searchBox.CloseResultsWindow()');
+      if (searchData[e][1][1][1])
+      {
+       srLink.setAttribute('target','_parent');
+      }
+      else
+      {
+       srLink.setAttribute('target','_blank');
+      }
+      var srScope = document.createElement('span');
+      setClassAttr(srScope,'SRScope');
+      srScope.innerHTML = searchData[e][1][1][2];
+      srEntry.appendChild(srScope);
+    }
+    else // multiple results
+    {
+      srLink.setAttribute('href','javascript:searchResults.Toggle("SR_'+id+'")');
+      var srChildren = document.createElement('div');
+      setClassAttr(srChildren,'SRChildren');
+      for (var c=0; c<searchData[e][1].length-1; c++)
+      {
+        var srChild = document.createElement('a');
+        srChild.setAttribute('id','Item'+e+'_c'+c);
+        setKeyActions(srChild,'return searchResults.NavChild(event,'+e+','+c+')');
+        setClassAttr(srChild,'SRScope');
+        srChild.setAttribute('href',resultsPath+searchData[e][1][c+1][0]);
+        srChild.setAttribute('onclick','searchBox.CloseResultsWindow()');
+        if (searchData[e][1][c+1][1])
+        {
+         srChild.setAttribute('target','_parent');
+        }
+        else
+        {
+         srChild.setAttribute('target','_blank');
+        }
+        srChild.innerHTML = searchData[e][1][c+1][2];
+        srChildren.appendChild(srChild);
+      }
+      srEntry.appendChild(srChildren);
+    }
+    srResult.appendChild(srEntry);
+    results.appendChild(srResult);
+  }
+}
+
+function init_search()
+{
+  var results = document.getElementById("MSearchSelectWindow");
+  for (var key in indexSectionLabels)
+  {
+    var link = document.createElement('a');
+    link.setAttribute('class','SelectItem');
+    link.setAttribute('onclick','searchBox.OnSelectItem('+key+')');
+    link.href='javascript:void(0)';
+    link.innerHTML='<span class="SelectionMark">&#160;</span>'+indexSectionLabels[key];
+    results.appendChild(link);
+  }
+  searchBox.OnSelectItem(0);
+}
+/* @license-end */
diff --git a/doc/html/search/search_l.png b/doc/html/search/search_l.png
new file mode 100644 (file)
index 0000000..fd5f7da
Binary files /dev/null and b/doc/html/search/search_l.png differ
diff --git a/doc/html/search/search_m.png b/doc/html/search/search_m.png
new file mode 100644 (file)
index 0000000..b429a16
Binary files /dev/null and b/doc/html/search/search_m.png differ
diff --git a/doc/html/search/search_r.png b/doc/html/search/search_r.png
new file mode 100644 (file)
index 0000000..1af5d21
Binary files /dev/null and b/doc/html/search/search_r.png differ
diff --git a/doc/html/search/searchdata.js b/doc/html/search/searchdata.js
new file mode 100644 (file)
index 0000000..fe98b92
--- /dev/null
@@ -0,0 +1,45 @@
+var indexSectionsWithContent =
+{
+  0: "%abcdefhijklmnopqrstw",
+  1: "jkn",
+  2: "lns",
+  3: "jkns",
+  4: "abcdefhiklmnopqrstw",
+  5: "jkns",
+  6: "jkn",
+  7: "jkn",
+  8: "jn",
+  9: "cefijklmopstw",
+  10: "%d"
+};
+
+var indexSectionNames =
+{
+  0: "all",
+  1: "classes",
+  2: "files",
+  3: "functions",
+  4: "variables",
+  5: "typedefs",
+  6: "enums",
+  7: "enumvalues",
+  8: "defines",
+  9: "groups",
+  10: "pages"
+};
+
+var indexSectionLabels =
+{
+  0: "All",
+  1: "Classes",
+  2: "Files",
+  3: "Functions",
+  4: "Variables",
+  5: "Typedefs",
+  6: "Enumerations",
+  7: "Enumerator",
+  8: "Macros",
+  9: "Modules",
+  10: "Pages"
+};
+
diff --git a/doc/html/search/typedefs_0.html b/doc/html/search/typedefs_0.html
new file mode 100644 (file)
index 0000000..882b2a1
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="typedefs_0.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/typedefs_0.js b/doc/html/search/typedefs_0.js
new file mode 100644 (file)
index 0000000..f08f7a4
--- /dev/null
@@ -0,0 +1,40 @@
+var searchData=
+[
+  ['jsaccountinfo_0',['jsAccountInfo',['../group__types_group.html#ga57cdc53b29a4fedb5a4140b6e64a4fab',1,'nats.h']]],
+  ['jsaccountlimits_1',['jsAccountLimits',['../group__types_group.html#gaa889f706cce285adb9cea8aba0b76866',1,'nats.h']]],
+  ['jsapistats_2',['jsAPIStats',['../group__types_group.html#gad057a0107367ce5727975f3daf63ff75',1,'nats.h']]],
+  ['jsclusterinfo_3',['jsClusterInfo',['../group__types_group.html#gaaf92318ce94a1ae3547c9a7af5a3f4f6',1,'nats.h']]],
+  ['jsconsumerconfig_4',['jsConsumerConfig',['../group__types_group.html#ga0483b2197c0ddd9082b48c2dd3fe7cee',1,'nats.h']]],
+  ['jsconsumerinfo_5',['jsConsumerInfo',['../group__types_group.html#ga2f21bb79884e56a5613d7fe76b11b1e5',1,'nats.h']]],
+  ['jsconsumerinfolist_6',['jsConsumerInfoList',['../group__types_group.html#gadad3bf72baae970662248d82d9b05d0a',1,'nats.h']]],
+  ['jsconsumernameslist_7',['jsConsumerNamesList',['../group__types_group.html#gad00ab4381eec504ada3272aa9ff8adb2',1,'nats.h']]],
+  ['jsconsumersequencemismatch_8',['jsConsumerSequenceMismatch',['../group__types_group.html#gace471cd2cef1df797b2a1c6b485049bd',1,'nats.h']]],
+  ['jsctx_9',['jsCtx',['../group__types_group.html#gaaf12cdd24c6cc23a57c20466c92ff8c1',1,'nats.h']]],
+  ['jsdirectgetmsgoptions_10',['jsDirectGetMsgOptions',['../group__types_group.html#ga85123afa00d522a249a5b2a8abd7e063',1,'nats.h']]],
+  ['jsexternalstream_11',['jsExternalStream',['../group__types_group.html#gaef6601477f6456bebc229f7f38982a6c',1,'nats.h']]],
+  ['jsfetchrequest_12',['jsFetchRequest',['../group__types_group.html#gaf11e6664c1f335a5287af71c703935fa',1,'nats.h']]],
+  ['jsloststreamdata_13',['jsLostStreamData',['../group__types_group.html#gaf80828510450faf84bbf456e94f5b784',1,'nats.h']]],
+  ['jsmsgmetadata_14',['jsMsgMetaData',['../group__types_group.html#gace9595b1a5ce3f7a13670367fd293b4a',1,'nats.h']]],
+  ['jsoptions_15',['jsOptions',['../group__types_group.html#ga0e3a3b7cf89e7dfa955f0f8f3f1eb6e5',1,'nats.h']]],
+  ['jspeerinfo_16',['jsPeerInfo',['../group__types_group.html#ga1e938dab794089f9329d7b7ece8f3e9b',1,'nats.h']]],
+  ['jsplacement_17',['jsPlacement',['../group__types_group.html#ga49d1138fac9da8b85d00a367081e91c9',1,'nats.h']]],
+  ['jspuback_18',['jsPubAck',['../group__types_group.html#gaf1d5e436c5d41c5b9b96d84e3d2bc86f',1,'nats.h']]],
+  ['jspubackerr_19',['jsPubAckErr',['../group__types_group.html#gadb7c287bc86b92765fbe45a066b96f40',1,'nats.h']]],
+  ['jspubackerrhandler_20',['jsPubAckErrHandler',['../group__callbacks_group.html#ga954768cc1d3388bb6ab723e777647992',1,'nats.h']]],
+  ['jspubackhandler_21',['jsPubAckHandler',['../group__callbacks_group.html#ga4f66e065bd918f02510d4c53d8a5b729',1,'nats.h']]],
+  ['jspuboptions_22',['jsPubOptions',['../group__types_group.html#ga7bbea3575d35dcdbfc9b766b04269eb7',1,'nats.h']]],
+  ['jsrepublish_23',['jsRePublish',['../group__types_group.html#gab991313d33ce270a882e4d0756c138f6',1,'nats.h']]],
+  ['jssequenceinfo_24',['jsSequenceInfo',['../group__types_group.html#ga27e1a5d5b513f9eb7d61a17db71f8003',1,'nats.h']]],
+  ['jssequencepair_25',['jsSequencePair',['../group__types_group.html#ga39011d30b295759b7f6ca0a7539dff8f',1,'nats.h']]],
+  ['jsstreamconfig_26',['jsStreamConfig',['../group__types_group.html#ga26fd6a73df327ca3c271e46ddefc8acf',1,'nats.h']]],
+  ['jsstreaminfo_27',['jsStreamInfo',['../group__types_group.html#ga2629c9454996edf7914be36a9e44921b',1,'nats.h']]],
+  ['jsstreaminfolist_28',['jsStreamInfoList',['../group__types_group.html#ga1e54c2a1bc94834d1670875fc151f565',1,'nats.h']]],
+  ['jsstreamnameslist_29',['jsStreamNamesList',['../group__types_group.html#gaf4d31a4dc83b2805422beafb1f8fa000',1,'nats.h']]],
+  ['jsstreamsource_30',['jsStreamSource',['../group__types_group.html#gab4c43c87d81917aab748a50eee028449',1,'nats.h']]],
+  ['jsstreamsourceinfo_31',['jsStreamSourceInfo',['../group__types_group.html#gab2f33f57188a550f2f747d4f27bc24bd',1,'nats.h']]],
+  ['jsstreamstate_32',['jsStreamState',['../group__types_group.html#ga2bfd6de6ffc84d767482b3dd57cb9271',1,'nats.h']]],
+  ['jsstreamstatesubject_33',['jsStreamStateSubject',['../group__types_group.html#ga55dce2fa9ecd215716cc9ceece7dfefa',1,'nats.h']]],
+  ['jsstreamstatesubjects_34',['jsStreamStateSubjects',['../group__types_group.html#gae8b57d9c40364f97a705f3e61a1156b0',1,'nats.h']]],
+  ['jssuboptions_35',['jsSubOptions',['../group__types_group.html#gaccfaac2079656ffd40d003e4de5d2280',1,'nats.h']]],
+  ['jstier_36',['jsTier',['../group__types_group.html#ga1d48d3eb36b50c9ab6d8477dccf247d8',1,'nats.h']]]
+];
diff --git a/doc/html/search/typedefs_1.html b/doc/html/search/typedefs_1.html
new file mode 100644 (file)
index 0000000..54ce58e
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="typedefs_1.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/typedefs_1.js b/doc/html/search/typedefs_1.js
new file mode 100644 (file)
index 0000000..db56753
--- /dev/null
@@ -0,0 +1,12 @@
+var searchData=
+[
+  ['kvconfig_0',['kvConfig',['../group__types_group.html#ga6d594b091b4bb46192336413066a8edf',1,'nats.h']]],
+  ['kventry_1',['kvEntry',['../group__types_group.html#gad489fb4074f27427560ca71797db6191',1,'nats.h']]],
+  ['kventrylist_2',['kvEntryList',['../group__types_group.html#ga0125d394a3cbae2a1713eed8fab7f78e',1,'nats.h']]],
+  ['kvkeyslist_3',['kvKeysList',['../group__types_group.html#gab36492d9d4370337cfed80edce4144e0',1,'nats.h']]],
+  ['kvpurgeoptions_4',['kvPurgeOptions',['../group__types_group.html#ga90e8de23c4468005488bde690a2ffe9d',1,'nats.h']]],
+  ['kvstatus_5',['kvStatus',['../group__types_group.html#gad3a0dd2dac950d5709ee5772b104fc80',1,'nats.h']]],
+  ['kvstore_6',['kvStore',['../group__types_group.html#ga054c05493dd3cfc5c3e7a665a424e54a',1,'nats.h']]],
+  ['kvwatcher_7',['kvWatcher',['../group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043',1,'nats.h']]],
+  ['kvwatchoptions_8',['kvWatchOptions',['../group__types_group.html#gac32f992fe797a1f7befc7dc3452640b6',1,'nats.h']]]
+];
diff --git a/doc/html/search/typedefs_2.html b/doc/html/search/typedefs_2.html
new file mode 100644 (file)
index 0000000..9fc36bd
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="typedefs_2.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/typedefs_2.js b/doc/html/search/typedefs_2.js
new file mode 100644 (file)
index 0000000..05aeec7
--- /dev/null
@@ -0,0 +1,23 @@
+var searchData=
+[
+  ['natsconnection_0',['natsConnection',['../group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec',1,'nats.h']]],
+  ['natsconnectionhandler_1',['natsConnectionHandler',['../group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c',1,'nats.h']]],
+  ['natscustomreconnectdelayhandler_2',['natsCustomReconnectDelayHandler',['../group__callbacks_group.html#ga3353d4b92851c52121f65aaf0684cba4',1,'nats.h']]],
+  ['natserrhandler_3',['natsErrHandler',['../group__callbacks_group.html#ga9e511dffa471dfb971b7dd2b12329626',1,'nats.h']]],
+  ['natsevloop_5fattach_4',['natsEvLoop_Attach',['../group__callbacks_group.html#ga245eab0a01a485e40fba267f84ec037f',1,'nats.h']]],
+  ['natsevloop_5fdetach_5',['natsEvLoop_Detach',['../group__callbacks_group.html#gab63dee7f7012ba11ae20b76dbc36f2d0',1,'nats.h']]],
+  ['natsevloop_5freadaddremove_6',['natsEvLoop_ReadAddRemove',['../group__callbacks_group.html#gaea4c125ecfb43eaf43da20e8444c2aaa',1,'nats.h']]],
+  ['natsevloop_5fwriteaddremove_7',['natsEvLoop_WriteAddRemove',['../group__callbacks_group.html#ga2bb5dd2d821ca5bbc0488f7e6aceed17',1,'nats.h']]],
+  ['natsinbox_8',['natsInbox',['../group__types_group.html#ga206c3d4d6f4f6f96fd2cae53a3df31c1',1,'nats.h']]],
+  ['natsmsg_9',['natsMsg',['../group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a',1,'nats.h']]],
+  ['natsmsghandler_10',['natsMsgHandler',['../group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe',1,'nats.h']]],
+  ['natsmsglist_11',['natsMsgList',['../group__types_group.html#gafd5523161ec3783e79719cb9a9a66b5b',1,'nats.h']]],
+  ['natsoncompletecb_12',['natsOnCompleteCB',['../group__callbacks_group.html#ga245131e64f1d0dff7edc8ed874a07e9a',1,'nats.h']]],
+  ['natsoptions_13',['natsOptions',['../group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e',1,'nats.h']]],
+  ['natssignaturehandler_14',['natsSignatureHandler',['../group__callbacks_group.html#gab786ffd670c86de0563559351305080b',1,'nats.h']]],
+  ['natssock_15',['natsSock',['../nats_8h.html#af798865ac824e5959987de0fe8d07383',1,'nats.h']]],
+  ['natsstatistics_16',['natsStatistics',['../group__types_group.html#ga57a4b8c7109e2773878655722ce028aa',1,'nats.h']]],
+  ['natssubscription_17',['natsSubscription',['../group__types_group.html#ga87158ec63b4f90f69e20451624ea01d8',1,'nats.h']]],
+  ['natstokenhandler_18',['natsTokenHandler',['../group__callbacks_group.html#ga4b02de70fe9380d184fd01d87527f499',1,'nats.h']]],
+  ['natsuserjwthandler_19',['natsUserJWTHandler',['../group__callbacks_group.html#ga258b30458134be90f17315c037f34b7b',1,'nats.h']]]
+];
diff --git a/doc/html/search/typedefs_3.html b/doc/html/search/typedefs_3.html
new file mode 100644 (file)
index 0000000..05938a1
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="typedefs_3.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/typedefs_3.js b/doc/html/search/typedefs_3.js
new file mode 100644 (file)
index 0000000..dded48c
--- /dev/null
@@ -0,0 +1,11 @@
+var searchData=
+[
+  ['stanconnection_0',['stanConnection',['../group__types_group.html#ga9e826493769d23086cfccefe95cdf64c',1,'nats.h']]],
+  ['stanconnectionlosthandler_1',['stanConnectionLostHandler',['../group__callbacks_group.html#gac34092f6c698374f86ad349302bdd55c',1,'nats.h']]],
+  ['stanconnoptions_2',['stanConnOptions',['../group__types_group.html#ga13d64411878ba13a6ca39c915f2447c1',1,'nats.h']]],
+  ['stanmsg_3',['stanMsg',['../group__types_group.html#ga2cf5db7703b42d97abe56a3e83b2a87d',1,'nats.h']]],
+  ['stanmsghandler_4',['stanMsgHandler',['../group__callbacks_group.html#gaf7456e37fa14f1834d9048d3789e9409',1,'nats.h']]],
+  ['stanpubackhandler_5',['stanPubAckHandler',['../group__callbacks_group.html#gad5d6a685731b3bf635995b7375af4d18',1,'nats.h']]],
+  ['stansuboptions_6',['stanSubOptions',['../group__types_group.html#ga023712711f5c289663fc2223e83686d3',1,'nats.h']]],
+  ['stansubscription_7',['stanSubscription',['../group__types_group.html#gae4dae869fb614536f0f027c2e2660cc5',1,'nats.h']]]
+];
diff --git a/doc/html/search/variables_0.html b/doc/html/search/variables_0.html
new file mode 100644 (file)
index 0000000..950bfc5
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="variables_0.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/variables_0.js b/doc/html/search/variables_0.js
new file mode 100644 (file)
index 0000000..6fc88d0
--- /dev/null
@@ -0,0 +1,13 @@
+var searchData=
+[
+  ['ackfloor_0',['AckFloor',['../structjs_consumer_info.html#ab69c36ae092df9b0663b675a5abbab55',1,'jsConsumerInfo']]],
+  ['ackhandler_1',['AckHandler',['../structjs_options_1_1js_options_publish_async.html#a508140119f40a2c056d4ee8c0cd55df9',1,'jsOptions::jsOptionsPublishAsync']]],
+  ['ackhandlerclosure_2',['AckHandlerClosure',['../structjs_options_1_1js_options_publish_async.html#a60c95f10797c04ea2e625759c6936ec9',1,'jsOptions::jsOptionsPublishAsync']]],
+  ['ackpolicy_3',['AckPolicy',['../structjs_consumer_config.html#a8a311af614dfae1b0f4e4af7db467aab',1,'jsConsumerConfig']]],
+  ['ackwait_4',['AckWait',['../structjs_consumer_config.html#a651a94b9b78668dde830dc7869610e67',1,'jsConsumerConfig']]],
+  ['active_5',['Active',['../structjs_peer_info.html#a8441d023932c388953197f7ea39402fe',1,'jsPeerInfo::Active()'],['../structjs_stream_source_info.html#a28b8cc0a9d487672955d3a3fa03de247',1,'jsStreamSourceInfo::Active()']]],
+  ['allowdirect_6',['AllowDirect',['../structjs_stream_config.html#a28630f6f07ca02553c5d5718d7c29721',1,'jsStreamConfig']]],
+  ['allowrollup_7',['AllowRollup',['../structjs_stream_config.html#aba71cdb342181f52bb9f7ff5f770a1fa',1,'jsStreamConfig']]],
+  ['api_8',['API',['../structjs_account_info.html#a94ab71c69b7883c2731ae8741ddc1e94',1,'jsAccountInfo']]],
+  ['apiprefix_9',['APIPrefix',['../structjs_external_stream.html#a2eaf2c0c3e77c269f44e254af8b24e96',1,'jsExternalStream']]]
+];
diff --git a/doc/html/search/variables_1.html b/doc/html/search/variables_1.html
new file mode 100644 (file)
index 0000000..fed58a5
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="variables_1.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/variables_1.js b/doc/html/search/variables_1.js
new file mode 100644 (file)
index 0000000..0878698
--- /dev/null
@@ -0,0 +1,8 @@
+var searchData=
+[
+  ['backoff_0',['BackOff',['../structjs_consumer_config.html#aa2d0aff64a2c46122d0f0fe89e8ae011',1,'jsConsumerConfig']]],
+  ['backofflen_1',['BackOffLen',['../structjs_consumer_config.html#ad2f6ca3f2d0f977aedb8687c462c1cfc',1,'jsConsumerConfig']]],
+  ['batch_2',['Batch',['../structjs_fetch_request.html#a84f06b60e25decb2674996f0cb315f63',1,'jsFetchRequest']]],
+  ['bucket_3',['Bucket',['../structkv_config.html#a11b636da727c17566d5ab1274f69fee5',1,'kvConfig']]],
+  ['bytes_4',['Bytes',['../structjs_lost_stream_data.html#a841fcadca3f66e9170a51080dc1acf30',1,'jsLostStreamData::Bytes()'],['../structjs_stream_state.html#ae603fa6ecfb63c93b61272b7d1b8fb4d',1,'jsStreamState::Bytes()']]]
+];
diff --git a/doc/html/search/variables_10.html b/doc/html/search/variables_10.html
new file mode 100644 (file)
index 0000000..e2896f5
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="variables_10.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/variables_10.js b/doc/html/search/variables_10.js
new file mode 100644 (file)
index 0000000..b070441
--- /dev/null
@@ -0,0 +1,21 @@
+var searchData=
+[
+  ['samplefrequency_0',['SampleFrequency',['../structjs_consumer_config.html#a43f40b8eef0074b4146fb945b4645584',1,'jsConsumerConfig']]],
+  ['sealed_1',['Sealed',['../structjs_stream_config.html#aede3fd2ab13d230eda14c96f9997e1b7',1,'jsStreamConfig']]],
+  ['sequence_2',['Sequence',['../structjs_msg_meta_data.html#a23d5fd1992033164c73d5c2a16a4e321',1,'jsMsgMetaData::Sequence()'],['../structjs_pub_ack.html#a01d302d5e1a2e71487a8c74c3fed1691',1,'jsPubAck::Sequence()'],['../structjs_direct_get_msg_options.html#a60211d7499cfecdd6e61e6c73af1a2f5',1,'jsDirectGetMsgOptions::Sequence()'],['../structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#a0d61e5d3c9c518f455549086ababe7f6',1,'jsOptions::jsOptionsStream::jsOptionsStreamPurge::Sequence()']]],
+  ['source_3',['Source',['../structjs_re_publish.html#a1acb593929fd69bbe0f4dc8300dfaeb2',1,'jsRePublish']]],
+  ['sources_4',['Sources',['../structjs_stream_config.html#a8f0ee08922e5b2108082b5b9e4a6284b',1,'jsStreamConfig::Sources()'],['../structjs_stream_info.html#a2e7ca48a93fe57265609e7e0cd3fa386',1,'jsStreamInfo::Sources()']]],
+  ['sourceslen_5',['SourcesLen',['../structjs_stream_config.html#a34960d6acc710c2f32b563f4bb7c9c0a',1,'jsStreamConfig::SourcesLen()'],['../structjs_stream_info.html#af14110cb1f8e16e3dade8d9f7c2fd672',1,'jsStreamInfo::SourcesLen()']]],
+  ['stallwait_6',['StallWait',['../structjs_options_1_1js_options_publish_async.html#ada58fefe0ed40157b5f5d44b9dd175f9',1,'jsOptions::jsOptionsPublishAsync']]],
+  ['state_7',['State',['../structjs_stream_info.html#a766ac56dec3bd19fa5b9861fb5f64397',1,'jsStreamInfo']]],
+  ['storage_8',['Storage',['../structjs_stream_config.html#a59c34091f336eafa77da2991c852c0d8',1,'jsStreamConfig']]],
+  ['storagetype_9',['StorageType',['../structkv_config.html#ad5db9a58224d93ab86b4cfc4c46f1897',1,'kvConfig']]],
+  ['store_10',['Store',['../structjs_tier.html#ab16c426e1c35d8c0fd6c460c43580a39',1,'jsTier::Store()'],['../structjs_account_info.html#ad1c254c5b8f11f57062a4e2d5fb10ae3',1,'jsAccountInfo::Store()']]],
+  ['storemaxstreambytes_11',['StoreMaxStreamBytes',['../structjs_account_limits.html#a8cca06ab72b715c02a6a2c72b59f6a52',1,'jsAccountLimits']]],
+  ['stream_12',['Stream',['../structjs_consumer_sequence_mismatch.html#aad6a17af1719c023c38a6fd254b73f8e',1,'jsConsumerSequenceMismatch::Stream()'],['../structjs_sub_options.html#a856a6af4a7ff5aa2e736338091e69484',1,'jsSubOptions::Stream()'],['../structjs_sequence_pair.html#ab051e0815302c48ba6122bd18d9d76f7',1,'jsSequencePair::Stream()'],['../structjs_sequence_info.html#ab52c55c1d0edd20e064870b490b4b990',1,'jsSequenceInfo::Stream()'],['../structjs_consumer_info.html#a8f21939613163a7c0ebfb521aa471260',1,'jsConsumerInfo::Stream()'],['../structjs_msg_meta_data.html#a32e2a9438d2dc769f7f64d2f8897abc4',1,'jsMsgMetaData::Stream()'],['../structjs_pub_ack.html#a4fd5e6cdb7217d72c553afcc75358893',1,'jsPubAck::Stream()'],['../structjs_options.html#ae50544ee0ef8dd7d02ef9802805807ae',1,'jsOptions::Stream()']]],
+  ['streams_13',['Streams',['../structjs_tier.html#a3f9234fde387faf3775d841aa797a6ea',1,'jsTier::Streams()'],['../structjs_account_info.html#a17317abf03effdcdedc2003fca8adc71',1,'jsAccountInfo::Streams()']]],
+  ['subject_14',['Subject',['../structjs_stream_state_subject.html#aa766824a7f8b69db592971af3262640e',1,'jsStreamStateSubject::Subject()'],['../structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#aa99e6ee3bef1c22243f01544181315fe',1,'jsOptions::jsOptionsStream::jsOptionsStreamPurge::Subject()']]],
+  ['subjects_15',['Subjects',['../structjs_stream_config.html#a0c5f3354073dbe72650e3db7f59a47af',1,'jsStreamConfig::Subjects()'],['../structjs_stream_state.html#a4af56e8bee7262ab050f2a25114c5909',1,'jsStreamState::Subjects()']]],
+  ['subjectsfilter_16',['SubjectsFilter',['../structjs_options_1_1js_options_stream_1_1js_options_stream_info.html#af874e0f5aa15fb2a41504631ed786e6d',1,'jsOptions::jsOptionsStream::jsOptionsStreamInfo']]],
+  ['subjectslen_17',['SubjectsLen',['../structjs_stream_config.html#ab2186aae798df6c222b3fa69e31597e1',1,'jsStreamConfig']]]
+];
diff --git a/doc/html/search/variables_11.html b/doc/html/search/variables_11.html
new file mode 100644 (file)
index 0000000..0aedfd5
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="variables_11.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/variables_11.js b/doc/html/search/variables_11.js
new file mode 100644 (file)
index 0000000..17aa038
--- /dev/null
@@ -0,0 +1,12 @@
+var searchData=
+[
+  ['tags_0',['Tags',['../structjs_placement.html#af078a85b744b9ff3771bb2da6005b90d',1,'jsPlacement']]],
+  ['tagslen_1',['TagsLen',['../structjs_placement.html#a35644f07531409518521b1b4fa28c9e3',1,'jsPlacement']]],
+  ['template_2',['Template',['../structjs_stream_config.html#a50f866f0e73c4ff0a5f43b354a059fa9',1,'jsStreamConfig']]],
+  ['tiers_3',['Tiers',['../structjs_account_info.html#ab654d5c7456bb62df1808deb32a620fc',1,'jsAccountInfo']]],
+  ['tierslen_4',['TiersLen',['../structjs_account_info.html#a21c14ca283400c684b18e61a534b6724',1,'jsAccountInfo']]],
+  ['timeout_5',['Timeout',['../structkv_watch_options.html#a56183d56585697d058c7eeb20bdddb66',1,'kvWatchOptions::Timeout()'],['../structkv_purge_options.html#a245c2def0f3aabe617219772cf7680a8',1,'kvPurgeOptions::Timeout()']]],
+  ['timestamp_6',['Timestamp',['../structjs_msg_meta_data.html#abab9ed5600a3629ea6d6c78170d7d5e9',1,'jsMsgMetaData']]],
+  ['total_7',['Total',['../structjs_a_p_i_stats.html#a1545170bebb347d0ea1254f51c3027cf',1,'jsAPIStats']]],
+  ['ttl_8',['TTL',['../structkv_config.html#ad2f5503e2f2522cb52e0ba1b86983dba',1,'kvConfig']]]
+];
diff --git a/doc/html/search/variables_12.html b/doc/html/search/variables_12.html
new file mode 100644 (file)
index 0000000..65ed12b
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="variables_12.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/variables_12.js b/doc/html/search/variables_12.js
new file mode 100644 (file)
index 0000000..a407c05
--- /dev/null
@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['wait_0',['Wait',['../structjs_options.html#a7fd42e1f83da5861e716137c16f8b72f',1,'jsOptions']]]
+];
diff --git a/doc/html/search/variables_2.html b/doc/html/search/variables_2.html
new file mode 100644 (file)
index 0000000..761c194
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="variables_2.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/variables_2.js b/doc/html/search/variables_2.js
new file mode 100644 (file)
index 0000000..25e484d
--- /dev/null
@@ -0,0 +1,12 @@
+var searchData=
+[
+  ['cluster_0',['Cluster',['../structjs_placement.html#ad8c83588d57f0e30959cfb6f3d5d61bf',1,'jsPlacement::Cluster()'],['../structjs_stream_info.html#a8d10d6fdc3f713ac726c72cae06a209a',1,'jsStreamInfo::Cluster()'],['../structjs_consumer_info.html#a6f4401563a9fd102226d82cdc6136e32',1,'jsConsumerInfo::Cluster()']]],
+  ['config_1',['Config',['../structjs_stream_info.html#adcc402d28e0ee443419e9b549da233c6',1,'jsStreamInfo::Config()'],['../structjs_sub_options.html#acab25d71a2efe26bb3b084071435c2b5',1,'jsSubOptions::Config()'],['../structjs_consumer_info.html#a2f63940ca1f024ad3840418c2f6a1ae1',1,'jsConsumerInfo::Config()']]],
+  ['consumer_2',['Consumer',['../structjs_sub_options.html#a7aa5b8439ed288b858943f28c291cb36',1,'jsSubOptions::Consumer()'],['../structjs_sequence_pair.html#a6d205effd29f8994f0028bfaf2e8d816',1,'jsSequencePair::Consumer()'],['../structjs_sequence_info.html#ae4416a5d766e07db207e563668edd06f',1,'jsSequenceInfo::Consumer()'],['../structjs_msg_meta_data.html#a6dcc2a442984b0ca070b3d8077192127',1,'jsMsgMetaData::Consumer()']]],
+  ['consumerclient_3',['ConsumerClient',['../structjs_consumer_sequence_mismatch.html#adb383429dadb1ab0e1f7d013bc546a28',1,'jsConsumerSequenceMismatch']]],
+  ['consumers_4',['Consumers',['../structjs_stream_state.html#a27f4cfb85c0f1b0c5c7ad5275bd25d85',1,'jsStreamState::Consumers()'],['../structjs_tier.html#ac33ce862c041572d10184e7fa0dd0bfe',1,'jsTier::Consumers()'],['../structjs_account_info.html#a1237c3f19a42a3203825971b429312e9',1,'jsAccountInfo::Consumers()']]],
+  ['consumerserver_5',['ConsumerServer',['../structjs_consumer_sequence_mismatch.html#ac1df353001d853c8a56cef9f82fb831c',1,'jsConsumerSequenceMismatch']]],
+  ['count_6',['Count',['../structnats_msg_list.html#a5c48bf6b9e7f1d889d7ad31694911750',1,'natsMsgList::Count()'],['../structjs_stream_state_subjects.html#ab88e2026f518b6cdffd3901b5e5cd374',1,'jsStreamStateSubjects::Count()'],['../structjs_stream_info_list.html#a8bc8490af12bb4f7a245605aecde62c2',1,'jsStreamInfoList::Count()'],['../structjs_stream_names_list.html#ab1385b6333537306d0462946c26cde4f',1,'jsStreamNamesList::Count()'],['../structjs_consumer_info_list.html#a813c908362a6426a929133f7c0d3395f',1,'jsConsumerInfoList::Count()'],['../structjs_consumer_names_list.html#a0bccbad8ac5d335a0ed89970a58900fb',1,'jsConsumerNamesList::Count()'],['../structkv_entry_list.html#a82da55d42e1a6862d3b0034dfc6f321f',1,'kvEntryList::Count()'],['../structkv_keys_list.html#a625f7b34784e024a538359efd9a97265',1,'kvKeysList::Count()']]],
+  ['created_7',['Created',['../structjs_stream_info.html#a578ce52a275c690dd4627c1d119c7838',1,'jsStreamInfo::Created()'],['../structjs_consumer_info.html#a670d38f2e9ba5c354ca3560a8064d00c',1,'jsConsumerInfo::Created()']]],
+  ['current_8',['Current',['../structjs_peer_info.html#ad8cecd039a8ad1c68daba89007b055d4',1,'jsPeerInfo']]]
+];
diff --git a/doc/html/search/variables_3.html b/doc/html/search/variables_3.html
new file mode 100644 (file)
index 0000000..78bfe03
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="variables_3.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/variables_3.js b/doc/html/search/variables_3.js
new file mode 100644 (file)
index 0000000..1836fd7
--- /dev/null
@@ -0,0 +1,22 @@
+var searchData=
+[
+  ['deleted_0',['Deleted',['../structjs_stream_state.html#abcf4d3c581c06d820f1ad21d640bef3f',1,'jsStreamState']]],
+  ['deleteddetails_1',['DeletedDetails',['../structjs_options_1_1js_options_stream_1_1js_options_stream_info.html#a73f847afe18f56eaaf6788900270bef7',1,'jsOptions::jsOptionsStream::jsOptionsStreamInfo']]],
+  ['deletedlen_2',['DeletedLen',['../structjs_stream_state.html#a34a08a64c97269165630bf2e0c78c2c0',1,'jsStreamState']]],
+  ['deletemarkersolderthan_3',['DeleteMarkersOlderThan',['../structkv_purge_options.html#a47fed1e95073666cbe441aba7c149da6',1,'kvPurgeOptions']]],
+  ['delivered_4',['Delivered',['../structjs_consumer_info.html#a15f2d68fbf126acc1907ba9462ad9ee9',1,'jsConsumerInfo']]],
+  ['delivergroup_5',['DeliverGroup',['../structjs_consumer_config.html#ae0765f3b5effe365187d3cf809c6ed3c',1,'jsConsumerConfig']]],
+  ['deliverpolicy_6',['DeliverPolicy',['../structjs_consumer_config.html#a364127e68bf0d3bf13efdc0b416667f4',1,'jsConsumerConfig']]],
+  ['deliverprefix_7',['DeliverPrefix',['../structjs_external_stream.html#a26ca427f3c5be1cae579ddccc16432d3',1,'jsExternalStream']]],
+  ['deliversubject_8',['DeliverSubject',['../structjs_consumer_config.html#a95aa4184ed77f69b7674756572da1ded',1,'jsConsumerConfig']]],
+  ['denydelete_9',['DenyDelete',['../structjs_stream_config.html#af2d42dd29b9a35257937aeeb53c9f287',1,'jsStreamConfig']]],
+  ['denypurge_10',['DenyPurge',['../structjs_stream_config.html#a575ffbaa85b0300032963296b090583a',1,'jsStreamConfig']]],
+  ['description_11',['Description',['../structjs_stream_config.html#a4f9f422d2e9e7389860291ab19bd7f10',1,'jsStreamConfig::Description()'],['../structjs_consumer_config.html#a36a14d666d99bdade87a5e21a25491d6',1,'jsConsumerConfig::Description()'],['../structkv_config.html#a941e9cad2bab67f093bf4d9567b4749a',1,'kvConfig::Description()']]],
+  ['destination_12',['Destination',['../structjs_re_publish.html#a662b2e57d237b171b2b61509f7e1023a',1,'jsRePublish']]],
+  ['discard_13',['Discard',['../structjs_stream_config.html#a0b44ea5251ef20bf5b5658bcfbea832d',1,'jsStreamConfig']]],
+  ['discardnewpersubject_14',['DiscardNewPerSubject',['../structjs_stream_config.html#a3fb7d5e1a09829fe742749da880afe4a',1,'jsStreamConfig']]],
+  ['domain_15',['Domain',['../structjs_account_info.html#ab6ba03298e1863132550b9b08d06048c',1,'jsAccountInfo::Domain()'],['../structjs_msg_meta_data.html#a388e38ccea591181436d199dc7c2f8ea',1,'jsMsgMetaData::Domain()'],['../structjs_pub_ack.html#a0b73200c0b035db3c9c96421706d51b0',1,'jsPubAck::Domain()'],['../structjs_options.html#ae4df6c9c01c0ea9ab0e6d5a6ec8af74e',1,'jsOptions::Domain()']]],
+  ['duplicate_16',['Duplicate',['../structjs_pub_ack.html#a0381a49ff62e8fac7a52cad6a5eb7243',1,'jsPubAck']]],
+  ['duplicates_17',['Duplicates',['../structjs_stream_config.html#a9e0ff10273d0182f885615b4f7d1cc20',1,'jsStreamConfig']]],
+  ['durable_18',['Durable',['../structjs_consumer_config.html#a36cf121162cf0b40edf051991d851ee0',1,'jsConsumerConfig']]]
+];
diff --git a/doc/html/search/variables_4.html b/doc/html/search/variables_4.html
new file mode 100644 (file)
index 0000000..4d608da
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="variables_4.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/variables_4.js b/doc/html/search/variables_4.js
new file mode 100644 (file)
index 0000000..1147843
--- /dev/null
@@ -0,0 +1,17 @@
+var searchData=
+[
+  ['entries_0',['Entries',['../structkv_entry_list.html#a179d4d3e5844d005be1ed9134b969a50',1,'kvEntryList']]],
+  ['err_1',['Err',['../structjs_pub_ack_err.html#a406e39e818f93bc59ac18cbdf035baf5',1,'jsPubAckErr']]],
+  ['errcode_2',['ErrCode',['../structjs_pub_ack_err.html#aa558fd192cc6d6c02ad891445ec5aa8a',1,'jsPubAckErr']]],
+  ['errhandler_3',['ErrHandler',['../structjs_options_1_1js_options_publish_async.html#a0a180995c49990ca277e449b7d43616b',1,'jsOptions::jsOptionsPublishAsync']]],
+  ['errhandlerclosure_4',['ErrHandlerClosure',['../structjs_options_1_1js_options_publish_async.html#a784a0029c30e82ff37c39ae6c276bc81',1,'jsOptions::jsOptionsPublishAsync']]],
+  ['errors_5',['Errors',['../structjs_a_p_i_stats.html#a84e85ad9d94dbe9afd1101388574255d',1,'jsAPIStats']]],
+  ['errtext_6',['ErrText',['../structjs_pub_ack_err.html#ad1a85e6ff4046d7df33c1e24323ddc87',1,'jsPubAckErr']]],
+  ['expectlastmsgid_7',['ExpectLastMsgId',['../structjs_pub_options.html#a095391b33a261586fc02eaf013b65e61',1,'jsPubOptions']]],
+  ['expectlastseq_8',['ExpectLastSeq',['../structjs_pub_options.html#a3b02b60b05caa6d242079a4c26b181bf',1,'jsPubOptions']]],
+  ['expectlastsubjectseq_9',['ExpectLastSubjectSeq',['../structjs_pub_options.html#aeefec1d2c7644562d23b87e55bf2e253',1,'jsPubOptions']]],
+  ['expectnomessage_10',['ExpectNoMessage',['../structjs_pub_options.html#a740a7edee8c832a75b75fded6046ba90',1,'jsPubOptions']]],
+  ['expectstream_11',['ExpectStream',['../structjs_pub_options.html#ac7ac74d2557d772c3092288dacf3711f',1,'jsPubOptions']]],
+  ['expires_12',['Expires',['../structjs_fetch_request.html#ac3351138ce8ac3b321ac1eb78887116e',1,'jsFetchRequest']]],
+  ['external_13',['External',['../structjs_stream_source.html#a295458d156af5373bb3f5ab06612a888',1,'jsStreamSource::External()'],['../structjs_stream_source_info.html#a7eb19dd2637079fd1e970a2b38d33e05',1,'jsStreamSourceInfo::External()']]]
+];
diff --git a/doc/html/search/variables_5.html b/doc/html/search/variables_5.html
new file mode 100644 (file)
index 0000000..6342402
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="variables_5.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/variables_5.js b/doc/html/search/variables_5.js
new file mode 100644 (file)
index 0000000..e5c1d3e
--- /dev/null
@@ -0,0 +1,7 @@
+var searchData=
+[
+  ['filtersubject_0',['FilterSubject',['../structjs_stream_source.html#af787b51dde9d77626f33860564eb08c3',1,'jsStreamSource::FilterSubject()'],['../structjs_consumer_config.html#af56ab7708b11e85e0b9115d152d281ca',1,'jsConsumerConfig::FilterSubject()']]],
+  ['firstseq_1',['FirstSeq',['../structjs_stream_state.html#a55bb6719163acef7fdb6d0bc3ae8d5da',1,'jsStreamState']]],
+  ['firsttime_2',['FirstTime',['../structjs_stream_state.html#afb7a708022faff518c060b33e99b04b0',1,'jsStreamState']]],
+  ['flowcontrol_3',['FlowControl',['../structjs_consumer_config.html#a484c64b6c54f6f758f54315470ed20d0',1,'jsConsumerConfig']]]
+];
diff --git a/doc/html/search/variables_6.html b/doc/html/search/variables_6.html
new file mode 100644 (file)
index 0000000..80db039
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="variables_6.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/variables_6.js b/doc/html/search/variables_6.js
new file mode 100644 (file)
index 0000000..657f082
--- /dev/null
@@ -0,0 +1,6 @@
+var searchData=
+[
+  ['headersonly_0',['HeadersOnly',['../structjs_re_publish.html#a16ebc4cdae4a407cf4e32aad212888db',1,'jsRePublish::HeadersOnly()'],['../structjs_consumer_config.html#a30d4142bac47ab6dc583c5ee193704e6',1,'jsConsumerConfig::HeadersOnly()']]],
+  ['heartbeat_1',['Heartbeat',['../structjs_consumer_config.html#ac439828c3bedb8826a1e92de13280d53',1,'jsConsumerConfig::Heartbeat()'],['../structjs_fetch_request.html#ae8e73c7cc2e2a2d2502407c9b1522496',1,'jsFetchRequest::Heartbeat()']]],
+  ['history_2',['History',['../structkv_config.html#a0ec6b3afbfdaa33436e2ae748e986e98',1,'kvConfig']]]
+];
diff --git a/doc/html/search/variables_7.html b/doc/html/search/variables_7.html
new file mode 100644 (file)
index 0000000..bf8eb38
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="variables_7.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/variables_7.js b/doc/html/search/variables_7.js
new file mode 100644 (file)
index 0000000..a4cc908
--- /dev/null
@@ -0,0 +1,7 @@
+var searchData=
+[
+  ['ignoredeletes_0',['IgnoreDeletes',['../structkv_watch_options.html#a0535edd21b26affc0057575bafc21a07',1,'kvWatchOptions']]],
+  ['inactivethreshold_1',['InactiveThreshold',['../structjs_consumer_config.html#af6376a6009124c25d7016bc548f3855d',1,'jsConsumerConfig']]],
+  ['includehistory_2',['IncludeHistory',['../structkv_watch_options.html#a08274f08ae96e14d9ded326e4e665649',1,'kvWatchOptions']]],
+  ['info_3',['Info',['../structjs_options_1_1js_options_stream.html#a2ca89c298b4df1f5e3e0a44e205c789c',1,'jsOptions::jsOptionsStream']]]
+];
diff --git a/doc/html/search/variables_8.html b/doc/html/search/variables_8.html
new file mode 100644 (file)
index 0000000..92a55e9
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="variables_8.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/variables_8.js b/doc/html/search/variables_8.js
new file mode 100644 (file)
index 0000000..a66461f
--- /dev/null
@@ -0,0 +1,5 @@
+var searchData=
+[
+  ['keep_0',['Keep',['../structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#a882c1ce1e636817450893caa72aa4eda',1,'jsOptions::jsOptionsStream::jsOptionsStreamPurge']]],
+  ['keys_1',['Keys',['../structkv_keys_list.html#aa5cb40820a1a927375215e0a94ecfc18',1,'kvKeysList']]]
+];
diff --git a/doc/html/search/variables_9.html b/doc/html/search/variables_9.html
new file mode 100644 (file)
index 0000000..1aec773
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="variables_9.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/variables_9.js b/doc/html/search/variables_9.js
new file mode 100644 (file)
index 0000000..4db0bab
--- /dev/null
@@ -0,0 +1,12 @@
+var searchData=
+[
+  ['lag_0',['Lag',['../structjs_peer_info.html#a49a2623963dad653a6d7996c750056c9',1,'jsPeerInfo::Lag()'],['../structjs_stream_source_info.html#ab2ee0ca3ecd98c2df6d4e9bd88686863',1,'jsStreamSourceInfo::Lag()']]],
+  ['last_1',['Last',['../structjs_sequence_info.html#a4e94c91650b7db253645515fee4c3b05',1,'jsSequenceInfo']]],
+  ['lastbysubject_2',['LastBySubject',['../structjs_direct_get_msg_options.html#aae968f31cdda96fa3c5e9374a36b9630',1,'jsDirectGetMsgOptions']]],
+  ['lastseq_3',['LastSeq',['../structjs_stream_state.html#a22da809fe7a1ec3101841e86d6708827',1,'jsStreamState']]],
+  ['lasttime_4',['LastTime',['../structjs_stream_state.html#a67cbd0d8b43d8c05c8b4cd6b0e44dab0',1,'jsStreamState']]],
+  ['leader_5',['Leader',['../structjs_cluster_info.html#af7d85652b52f56fa1eedce8f45fe6a19',1,'jsClusterInfo']]],
+  ['limits_6',['Limits',['../structjs_tier.html#af2edbabd5e078b1e31dd73d44fd507d3',1,'jsTier::Limits()'],['../structjs_account_info.html#aad93cf4bb6c1fbb09ae8545c03f315a9',1,'jsAccountInfo::Limits()']]],
+  ['list_7',['List',['../structjs_stream_state_subjects.html#aef3d1e886b16961daa84c43650fa80c0',1,'jsStreamStateSubjects::List()'],['../structjs_stream_info_list.html#a7b096ee7a25363f231f56419a244daef',1,'jsStreamInfoList::List()'],['../structjs_stream_names_list.html#a1875a7e449759dfc2a40b0eb74de0acf',1,'jsStreamNamesList::List()'],['../structjs_consumer_info_list.html#a75354882af5e11959b198a70bde14db8',1,'jsConsumerInfoList::List()'],['../structjs_consumer_names_list.html#aa4b3cf17902a2d580cc3a230bfa5d309',1,'jsConsumerNamesList::List()']]],
+  ['lost_8',['Lost',['../structjs_stream_state.html#a1adf8991f31fc4db9d6907a0316f8eec',1,'jsStreamState']]]
+];
diff --git a/doc/html/search/variables_a.html b/doc/html/search/variables_a.html
new file mode 100644 (file)
index 0000000..8090d16
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="variables_a.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/variables_a.js b/doc/html/search/variables_a.js
new file mode 100644 (file)
index 0000000..1d95955
--- /dev/null
@@ -0,0 +1,33 @@
+var searchData=
+[
+  ['manualack_0',['ManualAck',['../structjs_sub_options.html#a21a905c49dfab61729d8674702d196b2',1,'jsSubOptions']]],
+  ['maxackpending_1',['MaxAckPending',['../structjs_consumer_config.html#aeb2336d480e3885385d1b08410e89892',1,'jsConsumerConfig::MaxAckPending()'],['../structjs_account_limits.html#a4abf1972690c20d73bd314f2059e8013',1,'jsAccountLimits::MaxAckPending()']]],
+  ['maxage_2',['MaxAge',['../structjs_stream_config.html#aa538765ad97d343d60212ebd9894661e',1,'jsStreamConfig']]],
+  ['maxbytes_3',['MaxBytes',['../structjs_stream_config.html#ad75e47d4293441bd5ddbc5eaf01e0451',1,'jsStreamConfig::MaxBytes()'],['../structjs_fetch_request.html#a3298db691c2ecb9725cc029e2c35d6d1',1,'jsFetchRequest::MaxBytes()'],['../structkv_config.html#a1bc37777aa91b8b57a70e7647670cd12',1,'kvConfig::MaxBytes()']]],
+  ['maxbytesrequired_4',['MaxBytesRequired',['../structjs_account_limits.html#a858edf99ee1c60354bdba4e59293fb6a',1,'jsAccountLimits']]],
+  ['maxconsumers_5',['MaxConsumers',['../structjs_stream_config.html#a7338c82c8cbfcd5f4bfb7ad34b1d8395',1,'jsStreamConfig::MaxConsumers()'],['../structjs_account_limits.html#a6169f29101d51d48eed0803b719e6338',1,'jsAccountLimits::MaxConsumers()']]],
+  ['maxdeliver_6',['MaxDeliver',['../structjs_consumer_config.html#ad47e15e1d6a4a8b0b155f9d3d5873c95',1,'jsConsumerConfig']]],
+  ['maxmemory_7',['MaxMemory',['../structjs_account_limits.html#a7bfc63e6f49ce724663ee534c5efdfa4',1,'jsAccountLimits']]],
+  ['maxmsgs_8',['MaxMsgs',['../structjs_stream_config.html#a60a5184d1d97b056dbb31ac6a5b3d82d',1,'jsStreamConfig']]],
+  ['maxmsgsize_9',['MaxMsgSize',['../structjs_stream_config.html#a93a2336a57b6bfb792d530fd13a90641',1,'jsStreamConfig']]],
+  ['maxmsgspersubject_10',['MaxMsgsPerSubject',['../structjs_stream_config.html#aa167c7547d13bf2a01510a375ad38340',1,'jsStreamConfig']]],
+  ['maxpending_11',['MaxPending',['../structjs_options_1_1js_options_publish_async.html#add8dd21cbab2d5df19688c26365fe4d1',1,'jsOptions::jsOptionsPublishAsync']]],
+  ['maxrequestbatch_12',['MaxRequestBatch',['../structjs_consumer_config.html#a4e86deefe08854b9a82b4908397aad32',1,'jsConsumerConfig']]],
+  ['maxrequestexpires_13',['MaxRequestExpires',['../structjs_consumer_config.html#aa71aa3dfe5826466be301097b1bae04d',1,'jsConsumerConfig']]],
+  ['maxrequestmaxbytes_14',['MaxRequestMaxBytes',['../structjs_consumer_config.html#a74a026cdd92c538bcf84297f4468bb21',1,'jsConsumerConfig']]],
+  ['maxstore_15',['MaxStore',['../structjs_account_limits.html#a6fff014c46739410ecf298b0cf643b30',1,'jsAccountLimits']]],
+  ['maxstreams_16',['MaxStreams',['../structjs_account_limits.html#a4710a10950857a322c2a3ad6f946ded2',1,'jsAccountLimits']]],
+  ['maxvaluesize_17',['MaxValueSize',['../structkv_config.html#a281156a9df0130abad7f3b2728ac35a5',1,'kvConfig']]],
+  ['maxwait_18',['MaxWait',['../structjs_pub_options.html#a1b242c9311b904a2e5337417b5c6d143',1,'jsPubOptions']]],
+  ['maxwaiting_19',['MaxWaiting',['../structjs_consumer_config.html#a8472d49fae908ab0291b4d62c8411b76',1,'jsConsumerConfig']]],
+  ['memory_20',['Memory',['../structjs_tier.html#aeff4a4cb86e10d8d7749d6ff69f97ed1',1,'jsTier::Memory()'],['../structjs_account_info.html#a448578d621e878267ad5f1792002a665',1,'jsAccountInfo::Memory()']]],
+  ['memorymaxstreambytes_21',['MemoryMaxStreamBytes',['../structjs_account_limits.html#a38875d969274b0f0fcefc6b04ce56eb8',1,'jsAccountLimits']]],
+  ['memorystorage_22',['MemoryStorage',['../structjs_consumer_config.html#a046177256938d6a601c629f9fd82f888',1,'jsConsumerConfig']]],
+  ['metaonly_23',['MetaOnly',['../structkv_watch_options.html#ac9094bce4f3c6513431ba32fb49e5605',1,'kvWatchOptions']]],
+  ['mirror_24',['Mirror',['../structjs_stream_config.html#acdba5b22e4e60fd81a54769a7d09bc51',1,'jsStreamConfig::Mirror()'],['../structjs_stream_info.html#ab71aae7e4f6c62e2a09a3a52c9e4fa2a',1,'jsStreamInfo::Mirror()']]],
+  ['mirrordirect_25',['MirrorDirect',['../structjs_stream_config.html#a9d67ddcc7c54c345dd60ed5e59234f1e',1,'jsStreamConfig']]],
+  ['msg_26',['Msg',['../structjs_pub_ack_err.html#a156ca2f779d132ffa8c519124cf9739b',1,'jsPubAckErr']]],
+  ['msgid_27',['MsgId',['../structjs_pub_options.html#ac8708487360b784f7dd5d7a21e5617c0',1,'jsPubOptions']]],
+  ['msgs_28',['Msgs',['../structnats_msg_list.html#aa123668879f1c9c11c9be7bd81a205c5',1,'natsMsgList::Msgs()'],['../structjs_lost_stream_data.html#a5d2e87697526033c842a7f955776dfda',1,'jsLostStreamData::Msgs()'],['../structjs_stream_state_subject.html#a8b9b2edc5afe82b7b3bc7dbdd67a4384',1,'jsStreamStateSubject::Msgs()'],['../structjs_stream_state.html#a495269fe83c6bbf2023cca94add0a888',1,'jsStreamState::Msgs()']]],
+  ['msgslen_29',['MsgsLen',['../structjs_lost_stream_data.html#abdc373ed7fc9b7cf161c13da1913fc9a',1,'jsLostStreamData']]]
+];
diff --git a/doc/html/search/variables_b.html b/doc/html/search/variables_b.html
new file mode 100644 (file)
index 0000000..5ceb53f
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="variables_b.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/variables_b.js b/doc/html/search/variables_b.js
new file mode 100644 (file)
index 0000000..8baeaf9
--- /dev/null
@@ -0,0 +1,14 @@
+var searchData=
+[
+  ['name_0',['Name',['../structjs_stream_source.html#a7d9e5c064866b3f0b5601193c5885ec3',1,'jsStreamSource::Name()'],['../structjs_stream_config.html#a7fe3d5086f1c660a6999ae40ecd370e5',1,'jsStreamConfig::Name()'],['../structjs_peer_info.html#abf29230ce03a1c14d50227663e07de6a',1,'jsPeerInfo::Name()'],['../structjs_cluster_info.html#a2e13d7ec417574100c938c4df78e5484',1,'jsClusterInfo::Name()'],['../structjs_stream_source_info.html#a6db3c6ff8a465a45f8bd5c7bdf5f6c04',1,'jsStreamSourceInfo::Name()'],['../structjs_consumer_config.html#a201217d93cfed17eb4d3e2d9579b826a',1,'jsConsumerConfig::Name()'],['../structjs_consumer_info.html#a9359aea7cd05a27b2a15f8a35cdb1008',1,'jsConsumerInfo::Name()'],['../structjs_tier.html#a1ed542b9acccbe7761839f33c43053a6',1,'jsTier::Name()']]],
+  ['nextbysubject_1',['NextBySubject',['../structjs_direct_get_msg_options.html#a16ce7908a3d1690b8ae8bc22350ac238',1,'jsDirectGetMsgOptions']]],
+  ['noack_2',['NoAck',['../structjs_stream_config.html#a8e358fbc569a1c6d49c704e6dbdf8609',1,'jsStreamConfig']]],
+  ['nowait_3',['NoWait',['../structjs_fetch_request.html#ae251eebb1998a39fe3b898302b58293d',1,'jsFetchRequest']]],
+  ['numackpending_4',['NumAckPending',['../structjs_consumer_info.html#a882bebeb7af80fcce088afdf2c98de50',1,'jsConsumerInfo']]],
+  ['numdeleted_5',['NumDeleted',['../structjs_stream_state.html#acbec2f01830b56cb4c0bf54ae5170e51',1,'jsStreamState']]],
+  ['numdelivered_6',['NumDelivered',['../structjs_msg_meta_data.html#a9a50965fac061a9728b160702d3f56ff',1,'jsMsgMetaData']]],
+  ['numpending_7',['NumPending',['../structjs_consumer_info.html#aeaefd5a500996013b1ce13d8872e869b',1,'jsConsumerInfo::NumPending()'],['../structjs_msg_meta_data.html#a02f1bbd37e9650ed6bfda0210f038e30',1,'jsMsgMetaData::NumPending()']]],
+  ['numredelivered_8',['NumRedelivered',['../structjs_consumer_info.html#a932bf14ebb9ce167af8975e3b1f8d001',1,'jsConsumerInfo']]],
+  ['numsubjects_9',['NumSubjects',['../structjs_stream_state.html#aaa43db17641826e7c6ecc1954f641960',1,'jsStreamState']]],
+  ['numwaiting_10',['NumWaiting',['../structjs_consumer_info.html#a57e4a4139310c50a1f3d51af67197af0',1,'jsConsumerInfo']]]
+];
diff --git a/doc/html/search/variables_c.html b/doc/html/search/variables_c.html
new file mode 100644 (file)
index 0000000..5dbea70
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="variables_c.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/variables_c.js b/doc/html/search/variables_c.js
new file mode 100644 (file)
index 0000000..75fd5a6
--- /dev/null
@@ -0,0 +1,7 @@
+var searchData=
+[
+  ['offline_0',['Offline',['../structjs_peer_info.html#a3f3e09c5996858ec5faca2dc7fa5224e',1,'jsPeerInfo']]],
+  ['optstartseq_1',['OptStartSeq',['../structjs_stream_source.html#ad6948b7a34c202f324b6d2beb32fe5ed',1,'jsStreamSource::OptStartSeq()'],['../structjs_consumer_config.html#a2f0243899885dc97f304f48ca52b5356',1,'jsConsumerConfig::OptStartSeq()']]],
+  ['optstarttime_2',['OptStartTime',['../structjs_stream_source.html#a67eb1dac41b2d826a923cfb23baa24a5',1,'jsStreamSource::OptStartTime()'],['../structjs_consumer_config.html#a802ea3bf0669395bee28611f4ecede80',1,'jsConsumerConfig::OptStartTime()']]],
+  ['ordered_3',['Ordered',['../structjs_sub_options.html#a95c5d2db8ca97d644042d436de119be4',1,'jsSubOptions']]]
+];
diff --git a/doc/html/search/variables_d.html b/doc/html/search/variables_d.html
new file mode 100644 (file)
index 0000000..e7cd3a3
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="variables_d.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/variables_d.js b/doc/html/search/variables_d.js
new file mode 100644 (file)
index 0000000..4a487cb
--- /dev/null
@@ -0,0 +1,8 @@
+var searchData=
+[
+  ['placement_0',['Placement',['../structjs_stream_config.html#acee6c66afc78d79c2f518eed89177efb',1,'jsStreamConfig']]],
+  ['prefix_1',['Prefix',['../structjs_options.html#ab06e45296fccf0fe6152e083e38d916f',1,'jsOptions']]],
+  ['publishasync_2',['PublishAsync',['../structjs_options.html#a5ce5c11cc9b9df2b6bc47cd77d7b1dc4',1,'jsOptions']]],
+  ['purge_3',['Purge',['../structjs_options_1_1js_options_stream.html#afe680264223b434ca6959f9e122af029',1,'jsOptions::jsOptionsStream']]],
+  ['pushbound_4',['PushBound',['../structjs_consumer_info.html#a31282cdc72000a91af03f89899740bfa',1,'jsConsumerInfo']]]
+];
diff --git a/doc/html/search/variables_e.html b/doc/html/search/variables_e.html
new file mode 100644 (file)
index 0000000..b2e6719
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="variables_e.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/variables_e.js b/doc/html/search/variables_e.js
new file mode 100644 (file)
index 0000000..f0f9d65
--- /dev/null
@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['queue_0',['Queue',['../structjs_sub_options.html#aaf4b620d112a31f51a20389c5405805d',1,'jsSubOptions']]]
+];
diff --git a/doc/html/search/variables_f.html b/doc/html/search/variables_f.html
new file mode 100644 (file)
index 0000000..fe01445
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.9.3"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="variables_f.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+createResults();
+/* @license-end */
+</script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+window.addEventListener("message", function(event) {
+  if (event.data == "take_focus") {
+    var elem = searchResults.NavNext(0);
+    if (elem) elem.focus();
+  }
+});
+/* @license-end */
+</script>
+</div>
+</body>
+</html>
diff --git a/doc/html/search/variables_f.js b/doc/html/search/variables_f.js
new file mode 100644 (file)
index 0000000..d4e3d56
--- /dev/null
@@ -0,0 +1,9 @@
+var searchData=
+[
+  ['ratelimit_0',['RateLimit',['../structjs_consumer_config.html#a351b388a36ccb7978e6e85a6f4fc0816',1,'jsConsumerConfig']]],
+  ['replaypolicy_1',['ReplayPolicy',['../structjs_consumer_config.html#ade510daf7c5d67553d2cd20b64ab9939',1,'jsConsumerConfig']]],
+  ['replicas_2',['Replicas',['../structjs_stream_config.html#adbf2c948cf8091b149603b918ef49ffc',1,'jsStreamConfig::Replicas()'],['../structjs_cluster_info.html#a8dfcae3bc348a5b595b509e3f3d3500b',1,'jsClusterInfo::Replicas()'],['../structjs_consumer_config.html#acfba6d6ecb6323fd8ffe6c0bb4fbffae',1,'jsConsumerConfig::Replicas()'],['../structkv_config.html#a48f0f70383eff868321f9c94ae1a87cd',1,'kvConfig::Replicas()']]],
+  ['replicaslen_3',['ReplicasLen',['../structjs_cluster_info.html#a237a639579def1345e02f1490a510ed5',1,'jsClusterInfo']]],
+  ['republish_4',['RePublish',['../structjs_stream_config.html#a95ab0061b6e935b129a4a9c133e6b11c',1,'jsStreamConfig::RePublish()'],['../structkv_config.html#ae172d3e442eef1a57cd7cf266d9e8951',1,'kvConfig::RePublish()']]],
+  ['retention_5',['Retention',['../structjs_stream_config.html#a5ebc95b76afafa5e7a129953ba1bb3c7',1,'jsStreamConfig']]]
+];
diff --git a/doc/html/splitbar.png b/doc/html/splitbar.png
new file mode 100644 (file)
index 0000000..fe895f2
Binary files /dev/null and b/doc/html/splitbar.png differ
diff --git a/doc/html/splitbard.png b/doc/html/splitbard.png
new file mode 100644 (file)
index 0000000..8367416
Binary files /dev/null and b/doc/html/splitbard.png differ
diff --git a/doc/html/status_8h.html b/doc/html/status_8h.html
new file mode 100644 (file)
index 0000000..ec86986
--- /dev/null
@@ -0,0 +1,725 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: status.h File Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('status_8h.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#enum-members">Enumerations</a>  </div>
+  <div class="headertitle"><div class="title">status.h File Reference</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><a href="status_8h_source.html">Go to the source code of this file.</a></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="enum-members" name="enum-members"></a>
+Enumerations</h2></td></tr>
+<tr class="memitem:a6d667c1f8dd289a7e0f39bf10e800b51"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51">natsConnStatus</a> { <br />
+&#160;&#160;<a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51a08f92960811d1ff05b91a0870b4ecb92">NATS_CONN_STATUS_DISCONNECTED</a> = 0
+, <a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51a7e4d95cb29122f06e17ca4aff55cc736">NATS_CONN_STATUS_CONNECTING</a>
+, <a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51a0dafab74b55f98cfc1d00e4d1ef38725">NATS_CONN_STATUS_CONNECTED</a>
+, <a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51aa78753a4de2d0379078bb09cdc1acdb2">NATS_CONN_STATUS_CLOSED</a>
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51acfdc4826e08ce4b59f901952038e9206">NATS_CONN_STATUS_RECONNECTING</a>
+, <a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51ab6f9d121707673a61cbe2c591f64fbf1">NATS_CONN_STATUS_DRAINING_SUBS</a>
+, <a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51ac6b8b7f138f6ca285fe1f4da707b2100">NATS_CONN_STATUS_DRAINING_PUBS</a>
+<br />
+ }</td></tr>
+<tr class="memdesc:a6d667c1f8dd289a7e0f39bf10e800b51"><td class="mdescLeft">&#160;</td><td class="mdescRight">The connection state.  <a href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51">More...</a><br /></td></tr>
+<tr class="separator:a6d667c1f8dd289a7e0f39bf10e800b51"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a36c934157b663b7b5fb5d6609c897c80"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> { <br />
+&#160;&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">NATS_OK</a> = 0
+, <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a40a08ae6ae17deaf390b1d0d7550791c">NATS_ERR</a>
+, <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a113ffbe9a1f243582c38ebd876cb736d">NATS_PROTOCOL_ERROR</a>
+, <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a44e8b2590369fb01a1479719c97c2b6f">NATS_IO_ERROR</a>
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a85c29dbfa6b06ffef3418cc9947ffff7">NATS_LINE_TOO_LONG</a>
+, <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a476d7bcf9a593b749e435f20a9156eff">NATS_CONNECTION_CLOSED</a>
+, <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a47034d8889521bbd300f45fdc19e1127">NATS_NO_SERVER</a>
+, <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80aa76d5e3ce051bc7510be90e73663c93d">NATS_STALE_CONNECTION</a>
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a0aa3d1e18a2a217149fa8b1a306c9b08">NATS_SECURE_CONNECTION_WANTED</a>
+, <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80abc76f1b31fdac4525583cc19588240dc">NATS_SECURE_CONNECTION_REQUIRED</a>
+, <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80abef517217119e8446a8e3382e1f37eb3">NATS_CONNECTION_DISCONNECTED</a>
+, <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a473ea6cfa03490838fafee8730b48a2a">NATS_CONNECTION_AUTH_FAILED</a>
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ac3abc147873fe999c86431f9222eebf5">NATS_NOT_PERMITTED</a>
+, <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ad0229a12b17d3d12a28efed6213720d8">NATS_NOT_FOUND</a>
+, <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ae1d2c1366dbed428f6589f057acc507d">NATS_ADDRESS_MISSING</a>
+, <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a790c08a7d33e3aefce07c04120c4c19e">NATS_INVALID_SUBJECT</a>
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a71b57630aebf5c20eecdab832c2a9235">NATS_INVALID_ARG</a>
+, <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a273e92a0ff3b7eaf946b4b7fa6cc6c6c">NATS_INVALID_SUBSCRIPTION</a>
+, <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a827072fc245a99a60691e1e4b173ca86">NATS_INVALID_TIMEOUT</a>
+, <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9bb78b4f245d2870040d25c450febd4b">NATS_ILLEGAL_STATE</a>
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ae93ff5b7fe31f8570308385d92d317b0">NATS_SLOW_CONSUMER</a>
+, <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80af820300473609092a3e97a71b5af9ff9">NATS_MAX_PAYLOAD</a>
+, <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9a6f40b7803639ac18bdf532e93e5ad5">NATS_MAX_DELIVERED_MSGS</a>
+, <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a317fb9be1a80f6b1877f96a9a2db16ad">NATS_INSUFFICIENT_BUFFER</a>
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a62ff6f5cc64399631defc0119731b514">NATS_NO_MEMORY</a>
+, <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a984189ec4cfe3e7647268c99f7e49ec9">NATS_SYS_ERROR</a>
+, <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ab88994c9ea9889ac4d9d656d62f550ed">NATS_TIMEOUT</a>
+, <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a7cb64f52c8d91d6ade3db6bc82a96c42">NATS_FAILED_TO_INITIALIZE</a>
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ae47047f2fac5f2f2a434fc501e5c3d4e">NATS_NOT_INITIALIZED</a>
+, <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a892183c32b4929388bb75dc62230ddf3">NATS_SSL_ERROR</a>
+, <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a8a4e298931ba0698a72e397b1b57c885">NATS_NO_SERVER_SUPPORT</a>
+, <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a49a1ea653ce112b3c53eedebcd60811d">NATS_NOT_YET_CONNECTED</a>
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a07fdbda44f43cef9866a75b25053c2ae">NATS_DRAINING</a>
+, <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a8a0d239cfdfa30fe730afea65941779b">NATS_INVALID_QUEUE_NAME</a>
+, <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80aab97324e40ccfe1360080c651c330e62">NATS_NO_RESPONDERS</a>
+, <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a22fa4802a34bac497f23e269a20a52f2">NATS_MISMATCH</a>
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a37d80c8232775339a32805fe93e0ea7f">NATS_MISSED_HEARTBEAT</a>
+<br />
+ }</td></tr>
+<tr class="memdesc:a36c934157b663b7b5fb5d6609c897c80"><td class="mdescLeft">&#160;</td><td class="mdescRight">Status returned by most of the APIs.  <a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">More...</a><br /></td></tr>
+<tr class="separator:a36c934157b663b7b5fb5d6609c897c80"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a10731415ffcd3e2330df10c4d5fd3d70"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> { <br />
+&#160;&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a26a33a6e2296eb0ac0370176fb08ed9a">JSAccountResourcesExceededErr</a> = 10002
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70acedca75c7ec69c5573da7013f69ede13">JSBadRequestErr</a> = 10003
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aea64a5a017836108cf3da113ad57b6f9">JSClusterIncompleteErr</a> = 10004
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae9b8b81043fea45985f8c29f108594fb">JSClusterNoPeersErr</a> = 10005
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af1efbfa8ad648bf47b4304ea58b0df8c">JSClusterNotActiveErr</a> = 10006
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a99265bcfa283741c3711337dac6718f0">JSClusterNotAssignedErr</a> = 10007
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4ae7ffdfb53fb238a76ebe19c7482696">JSClusterNotAvailErr</a> = 10008
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a32546264d1f24fc9dafe490212bfd893">JSClusterNotLeaderErr</a> = 10009
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a46321fc22a103908324b72259832af60">JSClusterRequiredErr</a> = 10010
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a66240027007033c67fec04f4298311c4">JSClusterTagsErr</a> = 10011
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af86c9c188aaa34a76eee96de9bf6e989">JSConsumerCreateErr</a> = 10012
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4f59c55a24136405b6767e0bf21182c8">JSConsumerNameExistErr</a> = 10013
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9eef13e3281a879f36a30e246fb6021b">JSConsumerNotFoundErr</a> = 10014
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae4eaa258a64f5c12d7fe50ce4c9c6de5">JSSnapshotDeliverSubjectInvalidErr</a> = 10015
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aff9a4fe19078ac3e814989442beaa3a6">JSConsumerDurableNameNotInSubjectErr</a> = 10016
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a17c212f9409e4bd9db060bd2796905e4">JSConsumerDurableNameNotMatchSubjectErr</a> = 10017
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9d9319d172e0a8147949bf40f1b29f28">JSConsumerDurableNameNotSetErr</a> = 10018
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4ef7a2042b48d5e0916e7e90fe691ab3">JSConsumerEphemeralWithDurableInSubjectErr</a> = 10019
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1381bb653998c6ca8b88002d0fe0c829">JSConsumerEphemeralWithDurableNameErr</a> = 10020
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3799b98b675eeca3403a1728bd0cd5f8">JSStreamExternalApiOverlapErr</a> = 10021
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aea055a7802194f8f1e802a8fc461f83a">JSStreamExternalDelPrefixOverlapsErr</a> = 10022
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ad1ec102705e46b5343c2680162f58f49">JSInsufficientResourcesErr</a> = 10023
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7a89433d532a863561087229b19a525f">JSStreamInvalidExternalDeliverySubjErr</a> = 10024
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a50c0beab390506fc6d3495325c0230c1">JSInvalidJSONErr</a> = 10025
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa1b904de1494d20f540c8075f502af24">JSMaximumConsumersLimitErr</a> = 10026
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a739799359c3988ea18fe861eaff6f1f5">JSMaximumStreamsLimitErr</a> = 10027
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae3ac6ea1656f4fcc750ba2ab1649fb57">JSMemoryResourcesExceededErr</a> = 10028
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a94a9b10d712ed764de27a007ac7f04eb">JSMirrorConsumerSetupFailedErr</a> = 10029
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a91020cf9692a06637bdfedd847b259f1">JSMirrorMaxMessageSizeTooBigErr</a> = 10030
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aaad93c7c34cd3283df7369479d4cdb7c">JSMirrorWithSourcesErr</a> = 10031
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a600ddc1915d8bb928fd37f1539440eb3">JSMirrorWithStartSeqAndTimeErr</a> = 10032
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70afcfb372eb2a607f821ad110815acf9d7">JSMirrorWithSubjectFiltersErr</a> = 10033
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a0dc0fcc88a8b39f03924d50ccf731043">JSMirrorWithSubjectsErr</a> = 10034
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a91773a41522fe9a464a0fb28a96b497b">JSNoAccountErr</a> = 10035
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a84864e4bba24ee7354e5bae293c93d00">JSClusterUnSupportFeatureErr</a> = 10036
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a02a521ae52b716a669a3556d63a21410">JSNoMessageFoundErr</a> = 10037
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab23b8553efea2ee0008098fcb109f690">JSNotEmptyRequestErr</a> = 10038
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa88122abfaf173f0411a3642803aac04">JSNotEnabledForAccountErr</a> = 10039
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae7479c265d0e8cace4ab19a59cfcbbbb">JSClusterPeerNotMemberErr</a> = 10040
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa023de74e8bedf88c2f5e4b21e62ea4b">JSRaftGeneralErr</a> = 10041
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4963c5ecd065d3e336daf80a7cd1aa57">JSRestoreSubscribeFailedErr</a> = 10042
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1eaa16332bbe6cb041adbb60383f944c">JSSequenceNotFoundErr</a> = 10043
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aafa71c9cafc975d1a69889f6bf166e93">JSClusterServerNotMemberErr</a> = 10044
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aeaeb1f487667a8d7643cc97bf7b3892a">JSSourceConsumerSetupFailedErr</a> = 10045
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ac75e39643f73b184b22330939c4a564e">JSSourceMaxMessageSizeTooBigErr</a> = 10046
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2f4ee662c9cbaa0355c52de1c2463160">JSStorageResourcesExceededErr</a> = 10047
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2107facbac830a905217916c7d24297a">JSStreamAssignmentErr</a> = 10048
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a866a56223b3e4119184cee9523f98008">JSStreamCreateErr</a> = 10049
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a85f7eee9cccd626e7b99d46c6f076322">JSStreamDeleteErr</a> = 10050
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abc4bf9a7703ef8d3fbf2b1ad2ece3717">JSStreamGeneralError</a> = 10051
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a0c34c56b62e4246560efabd5c762aa03">JSStreamInvalidConfig</a> = 10052
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4f192c39f1d7244ceb639053fad86393">JSStreamLimitsErr</a> = 10053
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a519d32e9718662347753ebffaf731889">JSStreamMessageExceedsMaximumErr</a> = 10054
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a54084c4f82593cf516cd604b34c0dce8">JSStreamMirrorNotUpdatableErr</a> = 10055
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a80d0a9f218207a11b4cc19b9c2aec83f">JSStreamMismatchErr</a> = 10056
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab379e2a2038276dc1eb539bda2e60b68">JSStreamMsgDeleteFailed</a> = 10057
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af68cc43ff7ed51f5557329c35fba949c">JSStreamNameExistErr</a> = 10058
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6a2a1cbd9c2e2dc6dff4fb84be741e0f">JSStreamNotFoundErr</a> = 10059
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6b4c22a03ad4769d09599ac9a75e6435">JSStreamNotMatchErr</a> = 10060
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a58db02b3e72f3b20300344f97c5c7b34">JSStreamReplicasNotUpdatableErr</a> = 10061
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab5213fbb08e833e1c69b8c93c8114506">JSStreamRestoreErr</a> = 10062
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a64dbcba923d50e6f258db59b85eb8b17">JSStreamSequenceNotMatchErr</a> = 10063
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ac3d700ce84bc5df96c383079b093cc45">JSStreamSnapshotErr</a> = 10064
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3e55a221685d96d96c514d6d5c652570">JSStreamSubjectOverlapErr</a> = 10065
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1efc26df606f855cfb9993cbe95c0f46">JSStreamTemplateCreateErr</a> = 10066
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a514184778ad2fa5cf2deaffc0c406272">JSStreamTemplateDeleteErr</a> = 10067
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3552ffc73e39c13d14ae35f52cd3ead7">JSStreamTemplateNotFoundErr</a> = 10068
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a475581c5dfbabb52334ce28013382b58">JSStreamUpdateErr</a> = 10069
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70adc58d142e277166a57672812df6f2c3e">JSStreamWrongLastMsgIDErr</a> = 10070
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aaa5d8be08323568b5f7295feb10d73b4">JSStreamWrongLastSequenceErr</a> = 10071
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ad07006ca41165d13442df8e62ef3f398">JSTempStorageFailedErr</a> = 10072
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab9e493c8837af5f62c6110493c6a70ac">JSTemplateNameNotMatchSubjectErr</a> = 10073
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a8f7f888318e9107bb361d4946197c4c1">JSStreamReplicasNotSupportedErr</a> = 10074
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4d68fa855750f16fdf38c9ed93acacda">JSPeerRemapErr</a> = 10075
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70afe9c20cdb1e88744d9a5f52977e95d1c">JSNotEnabledErr</a> = 10076
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab7df189a360a1d483f9eca4869abdca8">JSStreamStoreFailedErr</a> = 10077
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4a95591dfc0e2ccb1d3ac1b3a04f618f">JSConsumerConfigRequiredErr</a> = 10078
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4712c1322585d712cef9b67cd03a3e00">JSConsumerDeliverToWildcardsErr</a> = 10079
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a914926025dffa9c9b9604646b9e5675e">JSConsumerPushMaxWaitingErr</a> = 10080
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70afc70c6a72061d9c26017a5cf5dec729b">JSConsumerDeliverCycleErr</a> = 10081
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a429a21189134500589ed67ac3701aff4">JSConsumerMaxPendingAckPolicyRequiredErr</a> = 10082
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9422b53061166a064e39d360d21827fd">JSConsumerSmallHeartbeatErr</a> = 10083
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abd3f17c5d6ea86c38c3d8ade18b8445a">JSConsumerPullRequiresAckErr</a> = 10084
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a407efbf6c688cb93fcded08acd2a08ed">JSConsumerPullNotDurableErr</a> = 10085
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2a8844e5d20c55d753ec64bbde4561c8">JSConsumerPullWithRateLimitErr</a> = 10086
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a27579bca64e6f40f9590ef51ac03a219">JSConsumerMaxWaitingNegativeErr</a> = 10087
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6d4bed940055aa46a188a2419a531c63">JSConsumerHBRequiresPushErr</a> = 10088
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a557d48b0334c5ceec0f0ee7cc74d8e79">JSConsumerFCRequiresPushErr</a> = 10089
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a968eff1142ca2f39f3da3da175aeda92">JSConsumerDirectRequiresPushErr</a> = 10090
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6181f797cb27c92473585893b92b95b0">JSConsumerDirectRequiresEphemeralErr</a> = 10091
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6b6aaaa23b1af2caf959529287b2a847">JSConsumerOnMappedErr</a> = 10092
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a0f2007fc94103909ece328bbd77b0cdb">JSConsumerFilterNotSubsetErr</a> = 10093
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a801182af5b4a6b9547d81ec45864b1f3">JSConsumerInvalidPolicyErr</a> = 10094
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab19f95018dff644423d6f34b682d365e">JSConsumerInvalidSamplingErr</a> = 10095
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af0506e3abc3846721ae15755c2a1eb47">JSStreamInvalidErr</a> = 10096
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a76dad06168a8d57e829876c2fcd3af56">JSConsumerWQRequiresExplicitAckErr</a> = 10098
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7adbc8c115996a6f0dfc98fcaac8f09d">JSConsumerWQMultipleUnfilteredErr</a> = 10099
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a5f7b670b9202311da41e6e5026e810d2">JSConsumerWQConsumerNotUniqueErr</a> = 10100
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a00b4ce854e473bb8f49d91c0f982c6f9">JSConsumerWQConsumerNotDeliverAllErr</a> = 10101
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3b1ce6536b249952dc3fb6fe5448140f">JSConsumerNameTooLongErr</a> = 10102
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa0ca5a2e539cec9d33f433f28f2780fe">JSConsumerBadDurableNameErr</a> = 10103
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2984e6b8850b6cfed9506a25bcbe0608">JSConsumerStoreFailedErr</a> = 10104
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a86407070c2bbe04d97a25f2ceda4ea58">JSConsumerExistingActiveErr</a> = 10105
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a051bfd5e3bb9ba2b2398e6501426bc63">JSConsumerReplacementWithDifferentNameErr</a> = 10106
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab1b6c048b0326e3f705b470e5a7f11f5">JSConsumerDescriptionTooLongErr</a> = 10107
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abc25cc794fce2ab7b9757ff506de51c3">JSConsumerWithFlowControlNeedsHeartbeatsErr</a> = 10108
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9bd3f4f7a2eca1f1ed49cc0499cb9c78">JSStreamSealedErr</a> = 10109
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a33f2e301313339eded6163982a680186">JSStreamPurgeFailedErr</a> = 10110
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70affa3c8139019a077fac6d403d7ed0522">JSStreamRollupFailedErr</a> = 10111
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa1242d9e6509f08c01c3373d0e66dc96">JSConsumerInvalidDeliverSubjectErr</a> = 10112
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a61cd7aa9b9e02f410465a61a085fa209">JSStreamMaxBytesRequiredErr</a> = 10113
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abca8571110c4244d218c2dc1779d8786">JSConsumerMaxRequestBatchNegativeErr</a> = 10114
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9c1c31813a713fcee44ec06728cc6382">JSConsumerMaxRequestExpiresToSmallErr</a> = 10115
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af7c1cf2c692140c4b28ebfc47acb0c41">JSConsumerMaxDeliverBackoffErr</a> = 10116
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7b5cebb5aaebd7b3bfa43f5457e97553">JSStreamInfoMaxSubjectsErr</a> = 10117
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7c88e5ccabcb2debe1ce0c1a05bbe18b">JSStreamOfflineErr</a> = 10118
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa0eb191886a17e917f2fa0eaa81d4b61">JSConsumerOfflineErr</a> = 10119
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70acfa2c06f8baef07cd96a3627ddea641b">JSNoLimitsErr</a> = 10120
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ac4afe1d580083bd55c36b3e55a5ef479">JSConsumerMaxPendingAckExcessErr</a> = 10121
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a60fd558fc8d0f31b895c7b579ba0c8b7">JSStreamMaxStreamBytesExceededErr</a> = 10122
+, <br />
+&#160;&#160;<a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a584d0bf058191cf2257d934f0bc5935c">JSStreamMoveAndScaleErr</a> = 10123
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abf7739c7a0569149ed24ae8b9fbaf889">JSStreamMoveInProgressErr</a> = 10124
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a597c98a0637cec454b724b049098cee8">JSConsumerMaxRequestBatchExceededErr</a> = 10125
+, <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1d159f128cd9b261b5270f7e36ed22d1">JSConsumerReplicasExceedsStreamErr</a> = 10126
+<br />
+ }</td></tr>
+<tr class="separator:a10731415ffcd3e2330df10c4d5fd3d70"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<h2 class="groupheader">Enumeration Type Documentation</h2>
+<a id="a6d667c1f8dd289a7e0f39bf10e800b51" name="a6d667c1f8dd289a7e0f39bf10e800b51"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a6d667c1f8dd289a7e0f39bf10e800b51">&#9670;&#160;</a></span>natsConnStatus</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">enum <a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51">natsConnStatus</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<table class="fieldtable">
+<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a6d667c1f8dd289a7e0f39bf10e800b51a08f92960811d1ff05b91a0870b4ecb92" name="a6d667c1f8dd289a7e0f39bf10e800b51a08f92960811d1ff05b91a0870b4ecb92"></a>NATS_CONN_STATUS_DISCONNECTED&#160;</td><td class="fielddoc"><p >The connection has been disconnected. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a6d667c1f8dd289a7e0f39bf10e800b51a7e4d95cb29122f06e17ca4aff55cc736" name="a6d667c1f8dd289a7e0f39bf10e800b51a7e4d95cb29122f06e17ca4aff55cc736"></a>NATS_CONN_STATUS_CONNECTING&#160;</td><td class="fielddoc"><p >The connection is in the process or connecting. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a6d667c1f8dd289a7e0f39bf10e800b51a0dafab74b55f98cfc1d00e4d1ef38725" name="a6d667c1f8dd289a7e0f39bf10e800b51a0dafab74b55f98cfc1d00e4d1ef38725"></a>NATS_CONN_STATUS_CONNECTED&#160;</td><td class="fielddoc"><p >The connection is connected. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a6d667c1f8dd289a7e0f39bf10e800b51aa78753a4de2d0379078bb09cdc1acdb2" name="a6d667c1f8dd289a7e0f39bf10e800b51aa78753a4de2d0379078bb09cdc1acdb2"></a>NATS_CONN_STATUS_CLOSED&#160;</td><td class="fielddoc"><p >The connection is closed. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a6d667c1f8dd289a7e0f39bf10e800b51acfdc4826e08ce4b59f901952038e9206" name="a6d667c1f8dd289a7e0f39bf10e800b51acfdc4826e08ce4b59f901952038e9206"></a>NATS_CONN_STATUS_RECONNECTING&#160;</td><td class="fielddoc"><p >The connection is in the process or reconnecting. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a6d667c1f8dd289a7e0f39bf10e800b51ab6f9d121707673a61cbe2c591f64fbf1" name="a6d667c1f8dd289a7e0f39bf10e800b51ab6f9d121707673a61cbe2c591f64fbf1"></a>NATS_CONN_STATUS_DRAINING_SUBS&#160;</td><td class="fielddoc"><p >The connection is draining subscriptions. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a6d667c1f8dd289a7e0f39bf10e800b51ac6b8b7f138f6ca285fe1f4da707b2100" name="a6d667c1f8dd289a7e0f39bf10e800b51ac6b8b7f138f6ca285fe1f4da707b2100"></a>NATS_CONN_STATUS_DRAINING_PUBS&#160;</td><td class="fielddoc"><p >The connection is draining publishers. </p>
+</td></tr>
+</table>
+
+</div>
+</div>
+<a id="a36c934157b663b7b5fb5d6609c897c80" name="a36c934157b663b7b5fb5d6609c897c80"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a36c934157b663b7b5fb5d6609c897c80">&#9670;&#160;</a></span>natsStatus</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">enum <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<table class="fieldtable">
+<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990" name="a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990"></a>NATS_OK&#160;</td><td class="fielddoc"><p >Success. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80a40a08ae6ae17deaf390b1d0d7550791c" name="a36c934157b663b7b5fb5d6609c897c80a40a08ae6ae17deaf390b1d0d7550791c"></a>NATS_ERR&#160;</td><td class="fielddoc"><p >Generic error. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80a113ffbe9a1f243582c38ebd876cb736d" name="a36c934157b663b7b5fb5d6609c897c80a113ffbe9a1f243582c38ebd876cb736d"></a>NATS_PROTOCOL_ERROR&#160;</td><td class="fielddoc"><p >Error when parsing a protocol message, or not getting the expected message. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80a44e8b2590369fb01a1479719c97c2b6f" name="a36c934157b663b7b5fb5d6609c897c80a44e8b2590369fb01a1479719c97c2b6f"></a>NATS_IO_ERROR&#160;</td><td class="fielddoc"><p >IO Error (network communication). </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80a85c29dbfa6b06ffef3418cc9947ffff7" name="a36c934157b663b7b5fb5d6609c897c80a85c29dbfa6b06ffef3418cc9947ffff7"></a>NATS_LINE_TOO_LONG&#160;</td><td class="fielddoc"><p >The protocol message read from the socket does not fit in the read buffer. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80a476d7bcf9a593b749e435f20a9156eff" name="a36c934157b663b7b5fb5d6609c897c80a476d7bcf9a593b749e435f20a9156eff"></a>NATS_CONNECTION_CLOSED&#160;</td><td class="fielddoc"><p >Operation on this connection failed because the connection is closed. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80a47034d8889521bbd300f45fdc19e1127" name="a36c934157b663b7b5fb5d6609c897c80a47034d8889521bbd300f45fdc19e1127"></a>NATS_NO_SERVER&#160;</td><td class="fielddoc"><p >Unable to connect, the server could not be reached or is not running. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80aa76d5e3ce051bc7510be90e73663c93d" name="a36c934157b663b7b5fb5d6609c897c80aa76d5e3ce051bc7510be90e73663c93d"></a>NATS_STALE_CONNECTION&#160;</td><td class="fielddoc"><p >The server closed our connection because it did not receive PINGs at the expected interval. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80a0aa3d1e18a2a217149fa8b1a306c9b08" name="a36c934157b663b7b5fb5d6609c897c80a0aa3d1e18a2a217149fa8b1a306c9b08"></a>NATS_SECURE_CONNECTION_WANTED&#160;</td><td class="fielddoc"><p >The client is configured to use TLS, but the server is not. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80abc76f1b31fdac4525583cc19588240dc" name="a36c934157b663b7b5fb5d6609c897c80abc76f1b31fdac4525583cc19588240dc"></a>NATS_SECURE_CONNECTION_REQUIRED&#160;</td><td class="fielddoc"><p >The server expects a TLS connection. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80abef517217119e8446a8e3382e1f37eb3" name="a36c934157b663b7b5fb5d6609c897c80abef517217119e8446a8e3382e1f37eb3"></a>NATS_CONNECTION_DISCONNECTED&#160;</td><td class="fielddoc"><p >The connection was disconnected. Depending on the configuration, the connection may reconnect. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80a473ea6cfa03490838fafee8730b48a2a" name="a36c934157b663b7b5fb5d6609c897c80a473ea6cfa03490838fafee8730b48a2a"></a>NATS_CONNECTION_AUTH_FAILED&#160;</td><td class="fielddoc"><p >The connection failed due to authentication error. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80ac3abc147873fe999c86431f9222eebf5" name="a36c934157b663b7b5fb5d6609c897c80ac3abc147873fe999c86431f9222eebf5"></a>NATS_NOT_PERMITTED&#160;</td><td class="fielddoc"><p >The action is not permitted. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80ad0229a12b17d3d12a28efed6213720d8" name="a36c934157b663b7b5fb5d6609c897c80ad0229a12b17d3d12a28efed6213720d8"></a>NATS_NOT_FOUND&#160;</td><td class="fielddoc"><p >An action could not complete because something was not found. So far, this is an internal error. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80ae1d2c1366dbed428f6589f057acc507d" name="a36c934157b663b7b5fb5d6609c897c80ae1d2c1366dbed428f6589f057acc507d"></a>NATS_ADDRESS_MISSING&#160;</td><td class="fielddoc"><p >Incorrect URL. For instance no host specified in the URL. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80a790c08a7d33e3aefce07c04120c4c19e" name="a36c934157b663b7b5fb5d6609c897c80a790c08a7d33e3aefce07c04120c4c19e"></a>NATS_INVALID_SUBJECT&#160;</td><td class="fielddoc"><p >Invalid subject, for instance NULL or empty string. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80a71b57630aebf5c20eecdab832c2a9235" name="a36c934157b663b7b5fb5d6609c897c80a71b57630aebf5c20eecdab832c2a9235"></a>NATS_INVALID_ARG&#160;</td><td class="fielddoc"><p >An invalid argument is passed to a function. For instance passing NULL to an API that does not accept this value. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80a273e92a0ff3b7eaf946b4b7fa6cc6c6c" name="a36c934157b663b7b5fb5d6609c897c80a273e92a0ff3b7eaf946b4b7fa6cc6c6c"></a>NATS_INVALID_SUBSCRIPTION&#160;</td><td class="fielddoc"><p >The call to a subscription function fails because the subscription has previously been closed. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80a827072fc245a99a60691e1e4b173ca86" name="a36c934157b663b7b5fb5d6609c897c80a827072fc245a99a60691e1e4b173ca86"></a>NATS_INVALID_TIMEOUT&#160;</td><td class="fielddoc"><p >Timeout must be positive numbers. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80a9bb78b4f245d2870040d25c450febd4b" name="a36c934157b663b7b5fb5d6609c897c80a9bb78b4f245d2870040d25c450febd4b"></a>NATS_ILLEGAL_STATE&#160;</td><td class="fielddoc"><p >An unexpected state, for instance calling <a class="el" href="group__sub_group.html#ga6538a5d78dfb0f16514b94c8e74c11af" title="Returns the next available message.">natsSubscription_NextMsg()</a> on an asynchronous subscriber. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80ae93ff5b7fe31f8570308385d92d317b0" name="a36c934157b663b7b5fb5d6609c897c80ae93ff5b7fe31f8570308385d92d317b0"></a>NATS_SLOW_CONSUMER&#160;</td><td class="fielddoc"><p >The maximum number of messages waiting to be delivered has been reached. Messages are dropped. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80af820300473609092a3e97a71b5af9ff9" name="a36c934157b663b7b5fb5d6609c897c80af820300473609092a3e97a71b5af9ff9"></a>NATS_MAX_PAYLOAD&#160;</td><td class="fielddoc"><p >Attempt to send a payload larger than the maximum allowed by the NATS Server. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80a9a6f40b7803639ac18bdf532e93e5ad5" name="a36c934157b663b7b5fb5d6609c897c80a9a6f40b7803639ac18bdf532e93e5ad5"></a>NATS_MAX_DELIVERED_MSGS&#160;</td><td class="fielddoc"><p >Attempt to receive more messages than allowed, for instance because of <a class="el" href="group__sub_group.html#ga09f285de2746a6e27fc66efd60bd3116" title="Auto-Unsubscribes.">natsSubscription_AutoUnsubscribe()</a>. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80a317fb9be1a80f6b1877f96a9a2db16ad" name="a36c934157b663b7b5fb5d6609c897c80a317fb9be1a80f6b1877f96a9a2db16ad"></a>NATS_INSUFFICIENT_BUFFER&#160;</td><td class="fielddoc"><p >A buffer is not large enough to accommodate the data. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80a62ff6f5cc64399631defc0119731b514" name="a36c934157b663b7b5fb5d6609c897c80a62ff6f5cc64399631defc0119731b514"></a>NATS_NO_MEMORY&#160;</td><td class="fielddoc"><p >An operation could not complete because of insufficient memory. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80a984189ec4cfe3e7647268c99f7e49ec9" name="a36c934157b663b7b5fb5d6609c897c80a984189ec4cfe3e7647268c99f7e49ec9"></a>NATS_SYS_ERROR&#160;</td><td class="fielddoc"><p >Some system function returned an error. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80ab88994c9ea9889ac4d9d656d62f550ed" name="a36c934157b663b7b5fb5d6609c897c80ab88994c9ea9889ac4d9d656d62f550ed"></a>NATS_TIMEOUT&#160;</td><td class="fielddoc"><p >An operation timed-out. For instance <a class="el" href="group__sub_group.html#ga6538a5d78dfb0f16514b94c8e74c11af" title="Returns the next available message.">natsSubscription_NextMsg()</a>. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80a7cb64f52c8d91d6ade3db6bc82a96c42" name="a36c934157b663b7b5fb5d6609c897c80a7cb64f52c8d91d6ade3db6bc82a96c42"></a>NATS_FAILED_TO_INITIALIZE&#160;</td><td class="fielddoc"><p >The library failed to initialize. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80ae47047f2fac5f2f2a434fc501e5c3d4e" name="a36c934157b663b7b5fb5d6609c897c80ae47047f2fac5f2f2a434fc501e5c3d4e"></a>NATS_NOT_INITIALIZED&#160;</td><td class="fielddoc"><p >The library is not yet initialized. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80a892183c32b4929388bb75dc62230ddf3" name="a36c934157b663b7b5fb5d6609c897c80a892183c32b4929388bb75dc62230ddf3"></a>NATS_SSL_ERROR&#160;</td><td class="fielddoc"><p >An SSL error occurred when trying to establish a connection. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80a8a4e298931ba0698a72e397b1b57c885" name="a36c934157b663b7b5fb5d6609c897c80a8a4e298931ba0698a72e397b1b57c885"></a>NATS_NO_SERVER_SUPPORT&#160;</td><td class="fielddoc"><p >The server does not support this action. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80a49a1ea653ce112b3c53eedebcd60811d" name="a36c934157b663b7b5fb5d6609c897c80a49a1ea653ce112b3c53eedebcd60811d"></a>NATS_NOT_YET_CONNECTED&#160;</td><td class="fielddoc"><p >A connection could not be immediately established and <a class="el" href="group__opts_group.html#ga20946800d024b7089e73d63454d1c19f" title="Indicates if initial connect failure should be retried or not.">natsOptions_SetRetryOnFailedConnect()</a> specified a connected callback. The connect is retried asynchronously. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80a07fdbda44f43cef9866a75b25053c2ae" name="a36c934157b663b7b5fb5d6609c897c80a07fdbda44f43cef9866a75b25053c2ae"></a>NATS_DRAINING&#160;</td><td class="fielddoc"><p >A connection and/or subscription entered the draining mode. Some operations will fail when in that mode. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80a8a0d239cfdfa30fe730afea65941779b" name="a36c934157b663b7b5fb5d6609c897c80a8a0d239cfdfa30fe730afea65941779b"></a>NATS_INVALID_QUEUE_NAME&#160;</td><td class="fielddoc"><p >An invalid queue name was passed when creating a queue subscription. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80aab97324e40ccfe1360080c651c330e62" name="a36c934157b663b7b5fb5d6609c897c80aab97324e40ccfe1360080c651c330e62"></a>NATS_NO_RESPONDERS&#160;</td><td class="fielddoc"><p >No responders were running when the server received the request. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80a22fa4802a34bac497f23e269a20a52f2" name="a36c934157b663b7b5fb5d6609c897c80a22fa4802a34bac497f23e269a20a52f2"></a>NATS_MISMATCH&#160;</td><td class="fielddoc"><p >For JetStream subscriptions, it means that a consumer sequence mismatch was discovered. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a36c934157b663b7b5fb5d6609c897c80a37d80c8232775339a32805fe93e0ea7f" name="a36c934157b663b7b5fb5d6609c897c80a37d80c8232775339a32805fe93e0ea7f"></a>NATS_MISSED_HEARTBEAT&#160;</td><td class="fielddoc"><p >For JetStream subscriptions, it means that the library detected that server heartbeats have been missed. </p>
+</td></tr>
+</table>
+
+</div>
+</div>
+<a id="a10731415ffcd3e2330df10c4d5fd3d70" name="a10731415ffcd3e2330df10c4d5fd3d70"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a10731415ffcd3e2330df10c4d5fd3d70">&#9670;&#160;</a></span>jsErrCode</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">enum <a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<table class="fieldtable">
+<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a26a33a6e2296eb0ac0370176fb08ed9a" name="a10731415ffcd3e2330df10c4d5fd3d70a26a33a6e2296eb0ac0370176fb08ed9a"></a>JSAccountResourcesExceededErr&#160;</td><td class="fielddoc"><p >Resource limits exceeded for account. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70acedca75c7ec69c5573da7013f69ede13" name="a10731415ffcd3e2330df10c4d5fd3d70acedca75c7ec69c5573da7013f69ede13"></a>JSBadRequestErr&#160;</td><td class="fielddoc"><p >Bad request. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70aea64a5a017836108cf3da113ad57b6f9" name="a10731415ffcd3e2330df10c4d5fd3d70aea64a5a017836108cf3da113ad57b6f9"></a>JSClusterIncompleteErr&#160;</td><td class="fielddoc"><p >Incomplete results. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70ae9b8b81043fea45985f8c29f108594fb" name="a10731415ffcd3e2330df10c4d5fd3d70ae9b8b81043fea45985f8c29f108594fb"></a>JSClusterNoPeersErr&#160;</td><td class="fielddoc"><p >No suitable peers for placement. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70af1efbfa8ad648bf47b4304ea58b0df8c" name="a10731415ffcd3e2330df10c4d5fd3d70af1efbfa8ad648bf47b4304ea58b0df8c"></a>JSClusterNotActiveErr&#160;</td><td class="fielddoc"><p >JetStream not in clustered mode. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a99265bcfa283741c3711337dac6718f0" name="a10731415ffcd3e2330df10c4d5fd3d70a99265bcfa283741c3711337dac6718f0"></a>JSClusterNotAssignedErr&#160;</td><td class="fielddoc"><p >JetStream cluster not assigned to this server. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a4ae7ffdfb53fb238a76ebe19c7482696" name="a10731415ffcd3e2330df10c4d5fd3d70a4ae7ffdfb53fb238a76ebe19c7482696"></a>JSClusterNotAvailErr&#160;</td><td class="fielddoc"><p >JetStream system temporarily unavailable. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a32546264d1f24fc9dafe490212bfd893" name="a10731415ffcd3e2330df10c4d5fd3d70a32546264d1f24fc9dafe490212bfd893"></a>JSClusterNotLeaderErr&#160;</td><td class="fielddoc"><p >JetStream cluster can not handle request. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a46321fc22a103908324b72259832af60" name="a10731415ffcd3e2330df10c4d5fd3d70a46321fc22a103908324b72259832af60"></a>JSClusterRequiredErr&#160;</td><td class="fielddoc"><p >JetStream clustering support required. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a66240027007033c67fec04f4298311c4" name="a10731415ffcd3e2330df10c4d5fd3d70a66240027007033c67fec04f4298311c4"></a>JSClusterTagsErr&#160;</td><td class="fielddoc"><p >Tags placement not supported for operation. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70af86c9c188aaa34a76eee96de9bf6e989" name="a10731415ffcd3e2330df10c4d5fd3d70af86c9c188aaa34a76eee96de9bf6e989"></a>JSConsumerCreateErr&#160;</td><td class="fielddoc"><p >General consumer creation failure string. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a4f59c55a24136405b6767e0bf21182c8" name="a10731415ffcd3e2330df10c4d5fd3d70a4f59c55a24136405b6767e0bf21182c8"></a>JSConsumerNameExistErr&#160;</td><td class="fielddoc"><p >Consumer name already in use. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a9eef13e3281a879f36a30e246fb6021b" name="a10731415ffcd3e2330df10c4d5fd3d70a9eef13e3281a879f36a30e246fb6021b"></a>JSConsumerNotFoundErr&#160;</td><td class="fielddoc"><p >Consumer not found. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70ae4eaa258a64f5c12d7fe50ce4c9c6de5" name="a10731415ffcd3e2330df10c4d5fd3d70ae4eaa258a64f5c12d7fe50ce4c9c6de5"></a>JSSnapshotDeliverSubjectInvalidErr&#160;</td><td class="fielddoc"><p >Deliver subject not valid. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70aff9a4fe19078ac3e814989442beaa3a6" name="a10731415ffcd3e2330df10c4d5fd3d70aff9a4fe19078ac3e814989442beaa3a6"></a>JSConsumerDurableNameNotInSubjectErr&#160;</td><td class="fielddoc"><p >Consumer expected to be durable but no durable name set in subject. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a17c212f9409e4bd9db060bd2796905e4" name="a10731415ffcd3e2330df10c4d5fd3d70a17c212f9409e4bd9db060bd2796905e4"></a>JSConsumerDurableNameNotMatchSubjectErr&#160;</td><td class="fielddoc"><p >Consumer name in subject does not match durable name in request. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a9d9319d172e0a8147949bf40f1b29f28" name="a10731415ffcd3e2330df10c4d5fd3d70a9d9319d172e0a8147949bf40f1b29f28"></a>JSConsumerDurableNameNotSetErr&#160;</td><td class="fielddoc"><p >Consumer expected to be durable but a durable name was not set. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a4ef7a2042b48d5e0916e7e90fe691ab3" name="a10731415ffcd3e2330df10c4d5fd3d70a4ef7a2042b48d5e0916e7e90fe691ab3"></a>JSConsumerEphemeralWithDurableInSubjectErr&#160;</td><td class="fielddoc"><p >Consumer expected to be ephemeral but detected a durable name set in subject. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a1381bb653998c6ca8b88002d0fe0c829" name="a10731415ffcd3e2330df10c4d5fd3d70a1381bb653998c6ca8b88002d0fe0c829"></a>JSConsumerEphemeralWithDurableNameErr&#160;</td><td class="fielddoc"><p >Consumer expected to be ephemeral but a durable name was set in request. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a3799b98b675eeca3403a1728bd0cd5f8" name="a10731415ffcd3e2330df10c4d5fd3d70a3799b98b675eeca3403a1728bd0cd5f8"></a>JSStreamExternalApiOverlapErr&#160;</td><td class="fielddoc"><p >Stream external api prefix must not overlap. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70aea055a7802194f8f1e802a8fc461f83a" name="a10731415ffcd3e2330df10c4d5fd3d70aea055a7802194f8f1e802a8fc461f83a"></a>JSStreamExternalDelPrefixOverlapsErr&#160;</td><td class="fielddoc"><p >Stream external delivery prefix overlaps with stream subject. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70ad1ec102705e46b5343c2680162f58f49" name="a10731415ffcd3e2330df10c4d5fd3d70ad1ec102705e46b5343c2680162f58f49"></a>JSInsufficientResourcesErr&#160;</td><td class="fielddoc"><p >Insufficient resources. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a7a89433d532a863561087229b19a525f" name="a10731415ffcd3e2330df10c4d5fd3d70a7a89433d532a863561087229b19a525f"></a>JSStreamInvalidExternalDeliverySubjErr&#160;</td><td class="fielddoc"><p >Stream external delivery prefix must not contain wildcards. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a50c0beab390506fc6d3495325c0230c1" name="a10731415ffcd3e2330df10c4d5fd3d70a50c0beab390506fc6d3495325c0230c1"></a>JSInvalidJSONErr&#160;</td><td class="fielddoc"><p >Invalid JSON. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70aa1b904de1494d20f540c8075f502af24" name="a10731415ffcd3e2330df10c4d5fd3d70aa1b904de1494d20f540c8075f502af24"></a>JSMaximumConsumersLimitErr&#160;</td><td class="fielddoc"><p >Maximum consumers exceeds account limit. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a739799359c3988ea18fe861eaff6f1f5" name="a10731415ffcd3e2330df10c4d5fd3d70a739799359c3988ea18fe861eaff6f1f5"></a>JSMaximumStreamsLimitErr&#160;</td><td class="fielddoc"><p >Maximum number of streams reached. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70ae3ac6ea1656f4fcc750ba2ab1649fb57" name="a10731415ffcd3e2330df10c4d5fd3d70ae3ac6ea1656f4fcc750ba2ab1649fb57"></a>JSMemoryResourcesExceededErr&#160;</td><td class="fielddoc"><p >Insufficient memory resources available. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a94a9b10d712ed764de27a007ac7f04eb" name="a10731415ffcd3e2330df10c4d5fd3d70a94a9b10d712ed764de27a007ac7f04eb"></a>JSMirrorConsumerSetupFailedErr&#160;</td><td class="fielddoc"><p >Generic mirror consumer setup failure. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a91020cf9692a06637bdfedd847b259f1" name="a10731415ffcd3e2330df10c4d5fd3d70a91020cf9692a06637bdfedd847b259f1"></a>JSMirrorMaxMessageSizeTooBigErr&#160;</td><td class="fielddoc"><p >Stream mirror must have max message size &gt;= source. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70aaad93c7c34cd3283df7369479d4cdb7c" name="a10731415ffcd3e2330df10c4d5fd3d70aaad93c7c34cd3283df7369479d4cdb7c"></a>JSMirrorWithSourcesErr&#160;</td><td class="fielddoc"><p >Stream mirrors can not also contain other sources. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a600ddc1915d8bb928fd37f1539440eb3" name="a10731415ffcd3e2330df10c4d5fd3d70a600ddc1915d8bb928fd37f1539440eb3"></a>JSMirrorWithStartSeqAndTimeErr&#160;</td><td class="fielddoc"><p >Stream mirrors can not have both start seq and start time configured. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70afcfb372eb2a607f821ad110815acf9d7" name="a10731415ffcd3e2330df10c4d5fd3d70afcfb372eb2a607f821ad110815acf9d7"></a>JSMirrorWithSubjectFiltersErr&#160;</td><td class="fielddoc"><p >Stream mirrors can not contain filtered subjects. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a0dc0fcc88a8b39f03924d50ccf731043" name="a10731415ffcd3e2330df10c4d5fd3d70a0dc0fcc88a8b39f03924d50ccf731043"></a>JSMirrorWithSubjectsErr&#160;</td><td class="fielddoc"><p >Stream mirrors can not also contain subjects. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a91773a41522fe9a464a0fb28a96b497b" name="a10731415ffcd3e2330df10c4d5fd3d70a91773a41522fe9a464a0fb28a96b497b"></a>JSNoAccountErr&#160;</td><td class="fielddoc"><p >Account not found. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a84864e4bba24ee7354e5bae293c93d00" name="a10731415ffcd3e2330df10c4d5fd3d70a84864e4bba24ee7354e5bae293c93d00"></a>JSClusterUnSupportFeatureErr&#160;</td><td class="fielddoc"><p >Not currently supported in clustered mode. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a02a521ae52b716a669a3556d63a21410" name="a10731415ffcd3e2330df10c4d5fd3d70a02a521ae52b716a669a3556d63a21410"></a>JSNoMessageFoundErr&#160;</td><td class="fielddoc"><p >No message found. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70ab23b8553efea2ee0008098fcb109f690" name="a10731415ffcd3e2330df10c4d5fd3d70ab23b8553efea2ee0008098fcb109f690"></a>JSNotEmptyRequestErr&#160;</td><td class="fielddoc"><p >Expected an empty request payload. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70aa88122abfaf173f0411a3642803aac04" name="a10731415ffcd3e2330df10c4d5fd3d70aa88122abfaf173f0411a3642803aac04"></a>JSNotEnabledForAccountErr&#160;</td><td class="fielddoc"><p >JetStream not enabled for account. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70ae7479c265d0e8cace4ab19a59cfcbbbb" name="a10731415ffcd3e2330df10c4d5fd3d70ae7479c265d0e8cace4ab19a59cfcbbbb"></a>JSClusterPeerNotMemberErr&#160;</td><td class="fielddoc"><p >Peer not a member. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70aa023de74e8bedf88c2f5e4b21e62ea4b" name="a10731415ffcd3e2330df10c4d5fd3d70aa023de74e8bedf88c2f5e4b21e62ea4b"></a>JSRaftGeneralErr&#160;</td><td class="fielddoc"><p >General RAFT error. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a4963c5ecd065d3e336daf80a7cd1aa57" name="a10731415ffcd3e2330df10c4d5fd3d70a4963c5ecd065d3e336daf80a7cd1aa57"></a>JSRestoreSubscribeFailedErr&#160;</td><td class="fielddoc"><p >JetStream unable to subscribe to restore snapshot. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a1eaa16332bbe6cb041adbb60383f944c" name="a10731415ffcd3e2330df10c4d5fd3d70a1eaa16332bbe6cb041adbb60383f944c"></a>JSSequenceNotFoundErr&#160;</td><td class="fielddoc"><p >Sequence not found. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70aafa71c9cafc975d1a69889f6bf166e93" name="a10731415ffcd3e2330df10c4d5fd3d70aafa71c9cafc975d1a69889f6bf166e93"></a>JSClusterServerNotMemberErr&#160;</td><td class="fielddoc"><p >Server is not a member of the cluster. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70aeaeb1f487667a8d7643cc97bf7b3892a" name="a10731415ffcd3e2330df10c4d5fd3d70aeaeb1f487667a8d7643cc97bf7b3892a"></a>JSSourceConsumerSetupFailedErr&#160;</td><td class="fielddoc"><p >General source consumer setup failure. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70ac75e39643f73b184b22330939c4a564e" name="a10731415ffcd3e2330df10c4d5fd3d70ac75e39643f73b184b22330939c4a564e"></a>JSSourceMaxMessageSizeTooBigErr&#160;</td><td class="fielddoc"><p >Stream source must have max message size &gt;= target. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a2f4ee662c9cbaa0355c52de1c2463160" name="a10731415ffcd3e2330df10c4d5fd3d70a2f4ee662c9cbaa0355c52de1c2463160"></a>JSStorageResourcesExceededErr&#160;</td><td class="fielddoc"><p >Insufficient storage resources available. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a2107facbac830a905217916c7d24297a" name="a10731415ffcd3e2330df10c4d5fd3d70a2107facbac830a905217916c7d24297a"></a>JSStreamAssignmentErr&#160;</td><td class="fielddoc"><p >Generic stream assignment error. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a866a56223b3e4119184cee9523f98008" name="a10731415ffcd3e2330df10c4d5fd3d70a866a56223b3e4119184cee9523f98008"></a>JSStreamCreateErr&#160;</td><td class="fielddoc"><p >Generic stream creation error. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a85f7eee9cccd626e7b99d46c6f076322" name="a10731415ffcd3e2330df10c4d5fd3d70a85f7eee9cccd626e7b99d46c6f076322"></a>JSStreamDeleteErr&#160;</td><td class="fielddoc"><p >General stream deletion error. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70abc4bf9a7703ef8d3fbf2b1ad2ece3717" name="a10731415ffcd3e2330df10c4d5fd3d70abc4bf9a7703ef8d3fbf2b1ad2ece3717"></a>JSStreamGeneralError&#160;</td><td class="fielddoc"><p >General stream failure. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a0c34c56b62e4246560efabd5c762aa03" name="a10731415ffcd3e2330df10c4d5fd3d70a0c34c56b62e4246560efabd5c762aa03"></a>JSStreamInvalidConfig&#160;</td><td class="fielddoc"><p >Stream configuration validation error. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a4f192c39f1d7244ceb639053fad86393" name="a10731415ffcd3e2330df10c4d5fd3d70a4f192c39f1d7244ceb639053fad86393"></a>JSStreamLimitsErr&#160;</td><td class="fielddoc"><p >General stream limits exceeded error. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a519d32e9718662347753ebffaf731889" name="a10731415ffcd3e2330df10c4d5fd3d70a519d32e9718662347753ebffaf731889"></a>JSStreamMessageExceedsMaximumErr&#160;</td><td class="fielddoc"><p >Message size exceeds maximum allowed. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a54084c4f82593cf516cd604b34c0dce8" name="a10731415ffcd3e2330df10c4d5fd3d70a54084c4f82593cf516cd604b34c0dce8"></a>JSStreamMirrorNotUpdatableErr&#160;</td><td class="fielddoc"><p >Mirror configuration can not be updated. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a80d0a9f218207a11b4cc19b9c2aec83f" name="a10731415ffcd3e2330df10c4d5fd3d70a80d0a9f218207a11b4cc19b9c2aec83f"></a>JSStreamMismatchErr&#160;</td><td class="fielddoc"><p >Stream name in subject does not match request. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70ab379e2a2038276dc1eb539bda2e60b68" name="a10731415ffcd3e2330df10c4d5fd3d70ab379e2a2038276dc1eb539bda2e60b68"></a>JSStreamMsgDeleteFailed&#160;</td><td class="fielddoc"><p >Generic message deletion failure error. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70af68cc43ff7ed51f5557329c35fba949c" name="a10731415ffcd3e2330df10c4d5fd3d70af68cc43ff7ed51f5557329c35fba949c"></a>JSStreamNameExistErr&#160;</td><td class="fielddoc"><p >Stream name already in use. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a6a2a1cbd9c2e2dc6dff4fb84be741e0f" name="a10731415ffcd3e2330df10c4d5fd3d70a6a2a1cbd9c2e2dc6dff4fb84be741e0f"></a>JSStreamNotFoundErr&#160;</td><td class="fielddoc"><p >Stream not found. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a6b4c22a03ad4769d09599ac9a75e6435" name="a10731415ffcd3e2330df10c4d5fd3d70a6b4c22a03ad4769d09599ac9a75e6435"></a>JSStreamNotMatchErr&#160;</td><td class="fielddoc"><p >Expected stream does not match. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a58db02b3e72f3b20300344f97c5c7b34" name="a10731415ffcd3e2330df10c4d5fd3d70a58db02b3e72f3b20300344f97c5c7b34"></a>JSStreamReplicasNotUpdatableErr&#160;</td><td class="fielddoc"><p >Replicas configuration can not be updated. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70ab5213fbb08e833e1c69b8c93c8114506" name="a10731415ffcd3e2330df10c4d5fd3d70ab5213fbb08e833e1c69b8c93c8114506"></a>JSStreamRestoreErr&#160;</td><td class="fielddoc"><p >Restore failed. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a64dbcba923d50e6f258db59b85eb8b17" name="a10731415ffcd3e2330df10c4d5fd3d70a64dbcba923d50e6f258db59b85eb8b17"></a>JSStreamSequenceNotMatchErr&#160;</td><td class="fielddoc"><p >Expected stream sequence does not match. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70ac3d700ce84bc5df96c383079b093cc45" name="a10731415ffcd3e2330df10c4d5fd3d70ac3d700ce84bc5df96c383079b093cc45"></a>JSStreamSnapshotErr&#160;</td><td class="fielddoc"><p >Snapshot failed. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a3e55a221685d96d96c514d6d5c652570" name="a10731415ffcd3e2330df10c4d5fd3d70a3e55a221685d96d96c514d6d5c652570"></a>JSStreamSubjectOverlapErr&#160;</td><td class="fielddoc"><p >Subjects overlap with an existing stream. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a1efc26df606f855cfb9993cbe95c0f46" name="a10731415ffcd3e2330df10c4d5fd3d70a1efc26df606f855cfb9993cbe95c0f46"></a>JSStreamTemplateCreateErr&#160;</td><td class="fielddoc"><p >Generic template creation failed. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a514184778ad2fa5cf2deaffc0c406272" name="a10731415ffcd3e2330df10c4d5fd3d70a514184778ad2fa5cf2deaffc0c406272"></a>JSStreamTemplateDeleteErr&#160;</td><td class="fielddoc"><p >Generic stream template deletion failed error. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a3552ffc73e39c13d14ae35f52cd3ead7" name="a10731415ffcd3e2330df10c4d5fd3d70a3552ffc73e39c13d14ae35f52cd3ead7"></a>JSStreamTemplateNotFoundErr&#160;</td><td class="fielddoc"><p >Template not found. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a475581c5dfbabb52334ce28013382b58" name="a10731415ffcd3e2330df10c4d5fd3d70a475581c5dfbabb52334ce28013382b58"></a>JSStreamUpdateErr&#160;</td><td class="fielddoc"><p >Generic stream update error. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70adc58d142e277166a57672812df6f2c3e" name="a10731415ffcd3e2330df10c4d5fd3d70adc58d142e277166a57672812df6f2c3e"></a>JSStreamWrongLastMsgIDErr&#160;</td><td class="fielddoc"><p >Wrong last msg ID. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70aaa5d8be08323568b5f7295feb10d73b4" name="a10731415ffcd3e2330df10c4d5fd3d70aaa5d8be08323568b5f7295feb10d73b4"></a>JSStreamWrongLastSequenceErr&#160;</td><td class="fielddoc"><p >Wrong last sequence. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70ad07006ca41165d13442df8e62ef3f398" name="a10731415ffcd3e2330df10c4d5fd3d70ad07006ca41165d13442df8e62ef3f398"></a>JSTempStorageFailedErr&#160;</td><td class="fielddoc"><p >JetStream unable to open temp storage for restore. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70ab9e493c8837af5f62c6110493c6a70ac" name="a10731415ffcd3e2330df10c4d5fd3d70ab9e493c8837af5f62c6110493c6a70ac"></a>JSTemplateNameNotMatchSubjectErr&#160;</td><td class="fielddoc"><p >Template name in subject does not match request. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a8f7f888318e9107bb361d4946197c4c1" name="a10731415ffcd3e2330df10c4d5fd3d70a8f7f888318e9107bb361d4946197c4c1"></a>JSStreamReplicasNotSupportedErr&#160;</td><td class="fielddoc"><p >Replicas &gt; 1 not supported in non-clustered mode. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a4d68fa855750f16fdf38c9ed93acacda" name="a10731415ffcd3e2330df10c4d5fd3d70a4d68fa855750f16fdf38c9ed93acacda"></a>JSPeerRemapErr&#160;</td><td class="fielddoc"><p >Peer remap failed. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70afe9c20cdb1e88744d9a5f52977e95d1c" name="a10731415ffcd3e2330df10c4d5fd3d70afe9c20cdb1e88744d9a5f52977e95d1c"></a>JSNotEnabledErr&#160;</td><td class="fielddoc"><p >JetStream not enabled. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70ab7df189a360a1d483f9eca4869abdca8" name="a10731415ffcd3e2330df10c4d5fd3d70ab7df189a360a1d483f9eca4869abdca8"></a>JSStreamStoreFailedErr&#160;</td><td class="fielddoc"><p >Generic error when storing a message failed. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a4a95591dfc0e2ccb1d3ac1b3a04f618f" name="a10731415ffcd3e2330df10c4d5fd3d70a4a95591dfc0e2ccb1d3ac1b3a04f618f"></a>JSConsumerConfigRequiredErr&#160;</td><td class="fielddoc"><p >Consumer config required. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a4712c1322585d712cef9b67cd03a3e00" name="a10731415ffcd3e2330df10c4d5fd3d70a4712c1322585d712cef9b67cd03a3e00"></a>JSConsumerDeliverToWildcardsErr&#160;</td><td class="fielddoc"><p >Consumer deliver subject has wildcards. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a914926025dffa9c9b9604646b9e5675e" name="a10731415ffcd3e2330df10c4d5fd3d70a914926025dffa9c9b9604646b9e5675e"></a>JSConsumerPushMaxWaitingErr&#160;</td><td class="fielddoc"><p >Consumer in push mode can not set max waiting. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70afc70c6a72061d9c26017a5cf5dec729b" name="a10731415ffcd3e2330df10c4d5fd3d70afc70c6a72061d9c26017a5cf5dec729b"></a>JSConsumerDeliverCycleErr&#160;</td><td class="fielddoc"><p >Consumer deliver subject forms a cycle. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a429a21189134500589ed67ac3701aff4" name="a10731415ffcd3e2330df10c4d5fd3d70a429a21189134500589ed67ac3701aff4"></a>JSConsumerMaxPendingAckPolicyRequiredErr&#160;</td><td class="fielddoc"><p >Consumer requires ack policy for max ack pending. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a9422b53061166a064e39d360d21827fd" name="a10731415ffcd3e2330df10c4d5fd3d70a9422b53061166a064e39d360d21827fd"></a>JSConsumerSmallHeartbeatErr&#160;</td><td class="fielddoc"><p >Consumer idle heartbeat needs to be &gt;= 100ms. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70abd3f17c5d6ea86c38c3d8ade18b8445a" name="a10731415ffcd3e2330df10c4d5fd3d70abd3f17c5d6ea86c38c3d8ade18b8445a"></a>JSConsumerPullRequiresAckErr&#160;</td><td class="fielddoc"><p >Consumer in pull mode requires explicit ack policy. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a407efbf6c688cb93fcded08acd2a08ed" name="a10731415ffcd3e2330df10c4d5fd3d70a407efbf6c688cb93fcded08acd2a08ed"></a>JSConsumerPullNotDurableErr&#160;</td><td class="fielddoc"><p >Consumer in pull mode requires a durable name. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a2a8844e5d20c55d753ec64bbde4561c8" name="a10731415ffcd3e2330df10c4d5fd3d70a2a8844e5d20c55d753ec64bbde4561c8"></a>JSConsumerPullWithRateLimitErr&#160;</td><td class="fielddoc"><p >Consumer in pull mode can not have rate limit set. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a27579bca64e6f40f9590ef51ac03a219" name="a10731415ffcd3e2330df10c4d5fd3d70a27579bca64e6f40f9590ef51ac03a219"></a>JSConsumerMaxWaitingNegativeErr&#160;</td><td class="fielddoc"><p >Consumer max waiting needs to be positive. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a6d4bed940055aa46a188a2419a531c63" name="a10731415ffcd3e2330df10c4d5fd3d70a6d4bed940055aa46a188a2419a531c63"></a>JSConsumerHBRequiresPushErr&#160;</td><td class="fielddoc"><p >Consumer idle heartbeat requires a push based consumer. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a557d48b0334c5ceec0f0ee7cc74d8e79" name="a10731415ffcd3e2330df10c4d5fd3d70a557d48b0334c5ceec0f0ee7cc74d8e79"></a>JSConsumerFCRequiresPushErr&#160;</td><td class="fielddoc"><p >Consumer flow control requires a push based consumer. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a968eff1142ca2f39f3da3da175aeda92" name="a10731415ffcd3e2330df10c4d5fd3d70a968eff1142ca2f39f3da3da175aeda92"></a>JSConsumerDirectRequiresPushErr&#160;</td><td class="fielddoc"><p >Consumer direct requires a push based consumer. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a6181f797cb27c92473585893b92b95b0" name="a10731415ffcd3e2330df10c4d5fd3d70a6181f797cb27c92473585893b92b95b0"></a>JSConsumerDirectRequiresEphemeralErr&#160;</td><td class="fielddoc"><p >Consumer direct requires an ephemeral consumer. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a6b6aaaa23b1af2caf959529287b2a847" name="a10731415ffcd3e2330df10c4d5fd3d70a6b6aaaa23b1af2caf959529287b2a847"></a>JSConsumerOnMappedErr&#160;</td><td class="fielddoc"><p >Consumer direct on a mapped consumer. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a0f2007fc94103909ece328bbd77b0cdb" name="a10731415ffcd3e2330df10c4d5fd3d70a0f2007fc94103909ece328bbd77b0cdb"></a>JSConsumerFilterNotSubsetErr&#160;</td><td class="fielddoc"><p >Consumer filter subject is not a valid subset of the interest subjects. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a801182af5b4a6b9547d81ec45864b1f3" name="a10731415ffcd3e2330df10c4d5fd3d70a801182af5b4a6b9547d81ec45864b1f3"></a>JSConsumerInvalidPolicyErr&#160;</td><td class="fielddoc"><p >Generic delivery policy error. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70ab19f95018dff644423d6f34b682d365e" name="a10731415ffcd3e2330df10c4d5fd3d70ab19f95018dff644423d6f34b682d365e"></a>JSConsumerInvalidSamplingErr&#160;</td><td class="fielddoc"><p >Failed to parse consumer sampling configuration. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70af0506e3abc3846721ae15755c2a1eb47" name="a10731415ffcd3e2330df10c4d5fd3d70af0506e3abc3846721ae15755c2a1eb47"></a>JSStreamInvalidErr&#160;</td><td class="fielddoc"><p >Stream not valid. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a76dad06168a8d57e829876c2fcd3af56" name="a10731415ffcd3e2330df10c4d5fd3d70a76dad06168a8d57e829876c2fcd3af56"></a>JSConsumerWQRequiresExplicitAckErr&#160;</td><td class="fielddoc"><p >Workqueue stream requires explicit ack. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a7adbc8c115996a6f0dfc98fcaac8f09d" name="a10731415ffcd3e2330df10c4d5fd3d70a7adbc8c115996a6f0dfc98fcaac8f09d"></a>JSConsumerWQMultipleUnfilteredErr&#160;</td><td class="fielddoc"><p >Multiple non-filtered consumers not allowed on workqueue stream. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a5f7b670b9202311da41e6e5026e810d2" name="a10731415ffcd3e2330df10c4d5fd3d70a5f7b670b9202311da41e6e5026e810d2"></a>JSConsumerWQConsumerNotUniqueErr&#160;</td><td class="fielddoc"><p >Filtered consumer not unique on workqueue stream. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a00b4ce854e473bb8f49d91c0f982c6f9" name="a10731415ffcd3e2330df10c4d5fd3d70a00b4ce854e473bb8f49d91c0f982c6f9"></a>JSConsumerWQConsumerNotDeliverAllErr&#160;</td><td class="fielddoc"><p >Consumer must be deliver all on workqueue stream. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a3b1ce6536b249952dc3fb6fe5448140f" name="a10731415ffcd3e2330df10c4d5fd3d70a3b1ce6536b249952dc3fb6fe5448140f"></a>JSConsumerNameTooLongErr&#160;</td><td class="fielddoc"><p >Consumer name is too long. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70aa0ca5a2e539cec9d33f433f28f2780fe" name="a10731415ffcd3e2330df10c4d5fd3d70aa0ca5a2e539cec9d33f433f28f2780fe"></a>JSConsumerBadDurableNameErr&#160;</td><td class="fielddoc"><p >Durable name can not contain '.', '*', '&gt;'. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a2984e6b8850b6cfed9506a25bcbe0608" name="a10731415ffcd3e2330df10c4d5fd3d70a2984e6b8850b6cfed9506a25bcbe0608"></a>JSConsumerStoreFailedErr&#160;</td><td class="fielddoc"><p >Error creating store for consumer. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a86407070c2bbe04d97a25f2ceda4ea58" name="a10731415ffcd3e2330df10c4d5fd3d70a86407070c2bbe04d97a25f2ceda4ea58"></a>JSConsumerExistingActiveErr&#160;</td><td class="fielddoc"><p >Consumer already exists and is still active. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a051bfd5e3bb9ba2b2398e6501426bc63" name="a10731415ffcd3e2330df10c4d5fd3d70a051bfd5e3bb9ba2b2398e6501426bc63"></a>JSConsumerReplacementWithDifferentNameErr&#160;</td><td class="fielddoc"><p >Consumer replacement durable config not the same. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70ab1b6c048b0326e3f705b470e5a7f11f5" name="a10731415ffcd3e2330df10c4d5fd3d70ab1b6c048b0326e3f705b470e5a7f11f5"></a>JSConsumerDescriptionTooLongErr&#160;</td><td class="fielddoc"><p >Consumer description is too long. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70abc25cc794fce2ab7b9757ff506de51c3" name="a10731415ffcd3e2330df10c4d5fd3d70abc25cc794fce2ab7b9757ff506de51c3"></a>JSConsumerWithFlowControlNeedsHeartbeatsErr&#160;</td><td class="fielddoc"><p >Consumer with flow control also needs heartbeats. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a9bd3f4f7a2eca1f1ed49cc0499cb9c78" name="a10731415ffcd3e2330df10c4d5fd3d70a9bd3f4f7a2eca1f1ed49cc0499cb9c78"></a>JSStreamSealedErr&#160;</td><td class="fielddoc"><p >Invalid operation on sealed stream. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a33f2e301313339eded6163982a680186" name="a10731415ffcd3e2330df10c4d5fd3d70a33f2e301313339eded6163982a680186"></a>JSStreamPurgeFailedErr&#160;</td><td class="fielddoc"><p >Generic stream purge failure. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70affa3c8139019a077fac6d403d7ed0522" name="a10731415ffcd3e2330df10c4d5fd3d70affa3c8139019a077fac6d403d7ed0522"></a>JSStreamRollupFailedErr&#160;</td><td class="fielddoc"><p >Generic stream rollup failure. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70aa1242d9e6509f08c01c3373d0e66dc96" name="a10731415ffcd3e2330df10c4d5fd3d70aa1242d9e6509f08c01c3373d0e66dc96"></a>JSConsumerInvalidDeliverSubjectErr&#160;</td><td class="fielddoc"><p >Invalid push consumer deliver subject. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a61cd7aa9b9e02f410465a61a085fa209" name="a10731415ffcd3e2330df10c4d5fd3d70a61cd7aa9b9e02f410465a61a085fa209"></a>JSStreamMaxBytesRequiredErr&#160;</td><td class="fielddoc"><p >Account requires a stream config to have max bytes set. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70abca8571110c4244d218c2dc1779d8786" name="a10731415ffcd3e2330df10c4d5fd3d70abca8571110c4244d218c2dc1779d8786"></a>JSConsumerMaxRequestBatchNegativeErr&#160;</td><td class="fielddoc"><p >Consumer max request batch needs to be &gt; 0. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a9c1c31813a713fcee44ec06728cc6382" name="a10731415ffcd3e2330df10c4d5fd3d70a9c1c31813a713fcee44ec06728cc6382"></a>JSConsumerMaxRequestExpiresToSmallErr&#160;</td><td class="fielddoc"><p >Consumer max request expires needs to be &gt; 1ms. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70af7c1cf2c692140c4b28ebfc47acb0c41" name="a10731415ffcd3e2330df10c4d5fd3d70af7c1cf2c692140c4b28ebfc47acb0c41"></a>JSConsumerMaxDeliverBackoffErr&#160;</td><td class="fielddoc"><p >Max deliver is required to be &gt; length of backoff values. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a7b5cebb5aaebd7b3bfa43f5457e97553" name="a10731415ffcd3e2330df10c4d5fd3d70a7b5cebb5aaebd7b3bfa43f5457e97553"></a>JSStreamInfoMaxSubjectsErr&#160;</td><td class="fielddoc"><p >Subject details would exceed maximum allowed. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a7c88e5ccabcb2debe1ce0c1a05bbe18b" name="a10731415ffcd3e2330df10c4d5fd3d70a7c88e5ccabcb2debe1ce0c1a05bbe18b"></a>JSStreamOfflineErr&#160;</td><td class="fielddoc"><p >Stream is offline. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70aa0eb191886a17e917f2fa0eaa81d4b61" name="a10731415ffcd3e2330df10c4d5fd3d70aa0eb191886a17e917f2fa0eaa81d4b61"></a>JSConsumerOfflineErr&#160;</td><td class="fielddoc"><p >Consumer is offline. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70acfa2c06f8baef07cd96a3627ddea641b" name="a10731415ffcd3e2330df10c4d5fd3d70acfa2c06f8baef07cd96a3627ddea641b"></a>JSNoLimitsErr&#160;</td><td class="fielddoc"><p >No JetStream default or applicable tiered limit present. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70ac4afe1d580083bd55c36b3e55a5ef479" name="a10731415ffcd3e2330df10c4d5fd3d70ac4afe1d580083bd55c36b3e55a5ef479"></a>JSConsumerMaxPendingAckExcessErr&#160;</td><td class="fielddoc"><p >Consumer max ack pending exceeds system limit. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a60fd558fc8d0f31b895c7b579ba0c8b7" name="a10731415ffcd3e2330df10c4d5fd3d70a60fd558fc8d0f31b895c7b579ba0c8b7"></a>JSStreamMaxStreamBytesExceededErr&#160;</td><td class="fielddoc"><p >Stream max bytes exceeds account limit max stream bytes. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a584d0bf058191cf2257d934f0bc5935c" name="a10731415ffcd3e2330df10c4d5fd3d70a584d0bf058191cf2257d934f0bc5935c"></a>JSStreamMoveAndScaleErr&#160;</td><td class="fielddoc"><p >Cannot move and scale a stream in a single update. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70abf7739c7a0569149ed24ae8b9fbaf889" name="a10731415ffcd3e2330df10c4d5fd3d70abf7739c7a0569149ed24ae8b9fbaf889"></a>JSStreamMoveInProgressErr&#160;</td><td class="fielddoc"><p >Stream move already in progress. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a597c98a0637cec454b724b049098cee8" name="a10731415ffcd3e2330df10c4d5fd3d70a597c98a0637cec454b724b049098cee8"></a>JSConsumerMaxRequestBatchExceededErr&#160;</td><td class="fielddoc"><p >Consumer max request batch exceeds server limit. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a10731415ffcd3e2330df10c4d5fd3d70a1d159f128cd9b261b5270f7e36ed22d1" name="a10731415ffcd3e2330df10c4d5fd3d70a1d159f128cd9b261b5270f7e36ed22d1"></a>JSConsumerReplicasExceedsStreamErr&#160;</td><td class="fielddoc"><p >Consumer config replica count exceeds parent stream. </p>
+</td></tr>
+</table>
+
+</div>
+</div>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="status_8h.html">status.h</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/status_8h.js b/doc/html/status_8h.js
new file mode 100644 (file)
index 0000000..7837097
--- /dev/null
@@ -0,0 +1,177 @@
+var status_8h =
+[
+    [ "natsConnStatus", "status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51", [
+      [ "NATS_CONN_STATUS_DISCONNECTED", "status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51a08f92960811d1ff05b91a0870b4ecb92", null ],
+      [ "NATS_CONN_STATUS_CONNECTING", "status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51a7e4d95cb29122f06e17ca4aff55cc736", null ],
+      [ "NATS_CONN_STATUS_CONNECTED", "status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51a0dafab74b55f98cfc1d00e4d1ef38725", null ],
+      [ "NATS_CONN_STATUS_CLOSED", "status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51aa78753a4de2d0379078bb09cdc1acdb2", null ],
+      [ "NATS_CONN_STATUS_RECONNECTING", "status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51acfdc4826e08ce4b59f901952038e9206", null ],
+      [ "NATS_CONN_STATUS_DRAINING_SUBS", "status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51ab6f9d121707673a61cbe2c591f64fbf1", null ],
+      [ "NATS_CONN_STATUS_DRAINING_PUBS", "status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51ac6b8b7f138f6ca285fe1f4da707b2100", null ]
+    ] ],
+    [ "natsStatus", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80", [
+      [ "NATS_OK", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990", null ],
+      [ "NATS_ERR", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80a40a08ae6ae17deaf390b1d0d7550791c", null ],
+      [ "NATS_PROTOCOL_ERROR", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80a113ffbe9a1f243582c38ebd876cb736d", null ],
+      [ "NATS_IO_ERROR", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80a44e8b2590369fb01a1479719c97c2b6f", null ],
+      [ "NATS_LINE_TOO_LONG", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80a85c29dbfa6b06ffef3418cc9947ffff7", null ],
+      [ "NATS_CONNECTION_CLOSED", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80a476d7bcf9a593b749e435f20a9156eff", null ],
+      [ "NATS_NO_SERVER", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80a47034d8889521bbd300f45fdc19e1127", null ],
+      [ "NATS_STALE_CONNECTION", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80aa76d5e3ce051bc7510be90e73663c93d", null ],
+      [ "NATS_SECURE_CONNECTION_WANTED", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80a0aa3d1e18a2a217149fa8b1a306c9b08", null ],
+      [ "NATS_SECURE_CONNECTION_REQUIRED", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80abc76f1b31fdac4525583cc19588240dc", null ],
+      [ "NATS_CONNECTION_DISCONNECTED", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80abef517217119e8446a8e3382e1f37eb3", null ],
+      [ "NATS_CONNECTION_AUTH_FAILED", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80a473ea6cfa03490838fafee8730b48a2a", null ],
+      [ "NATS_NOT_PERMITTED", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80ac3abc147873fe999c86431f9222eebf5", null ],
+      [ "NATS_NOT_FOUND", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80ad0229a12b17d3d12a28efed6213720d8", null ],
+      [ "NATS_ADDRESS_MISSING", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80ae1d2c1366dbed428f6589f057acc507d", null ],
+      [ "NATS_INVALID_SUBJECT", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80a790c08a7d33e3aefce07c04120c4c19e", null ],
+      [ "NATS_INVALID_ARG", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80a71b57630aebf5c20eecdab832c2a9235", null ],
+      [ "NATS_INVALID_SUBSCRIPTION", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80a273e92a0ff3b7eaf946b4b7fa6cc6c6c", null ],
+      [ "NATS_INVALID_TIMEOUT", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80a827072fc245a99a60691e1e4b173ca86", null ],
+      [ "NATS_ILLEGAL_STATE", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9bb78b4f245d2870040d25c450febd4b", null ],
+      [ "NATS_SLOW_CONSUMER", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80ae93ff5b7fe31f8570308385d92d317b0", null ],
+      [ "NATS_MAX_PAYLOAD", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80af820300473609092a3e97a71b5af9ff9", null ],
+      [ "NATS_MAX_DELIVERED_MSGS", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9a6f40b7803639ac18bdf532e93e5ad5", null ],
+      [ "NATS_INSUFFICIENT_BUFFER", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80a317fb9be1a80f6b1877f96a9a2db16ad", null ],
+      [ "NATS_NO_MEMORY", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80a62ff6f5cc64399631defc0119731b514", null ],
+      [ "NATS_SYS_ERROR", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80a984189ec4cfe3e7647268c99f7e49ec9", null ],
+      [ "NATS_TIMEOUT", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80ab88994c9ea9889ac4d9d656d62f550ed", null ],
+      [ "NATS_FAILED_TO_INITIALIZE", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80a7cb64f52c8d91d6ade3db6bc82a96c42", null ],
+      [ "NATS_NOT_INITIALIZED", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80ae47047f2fac5f2f2a434fc501e5c3d4e", null ],
+      [ "NATS_SSL_ERROR", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80a892183c32b4929388bb75dc62230ddf3", null ],
+      [ "NATS_NO_SERVER_SUPPORT", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80a8a4e298931ba0698a72e397b1b57c885", null ],
+      [ "NATS_NOT_YET_CONNECTED", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80a49a1ea653ce112b3c53eedebcd60811d", null ],
+      [ "NATS_DRAINING", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80a07fdbda44f43cef9866a75b25053c2ae", null ],
+      [ "NATS_INVALID_QUEUE_NAME", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80a8a0d239cfdfa30fe730afea65941779b", null ],
+      [ "NATS_NO_RESPONDERS", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80aab97324e40ccfe1360080c651c330e62", null ],
+      [ "NATS_MISMATCH", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80a22fa4802a34bac497f23e269a20a52f2", null ],
+      [ "NATS_MISSED_HEARTBEAT", "status_8h.html#a36c934157b663b7b5fb5d6609c897c80a37d80c8232775339a32805fe93e0ea7f", null ]
+    ] ],
+    [ "jsErrCode", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70", [
+      [ "JSAccountResourcesExceededErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a26a33a6e2296eb0ac0370176fb08ed9a", null ],
+      [ "JSBadRequestErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70acedca75c7ec69c5573da7013f69ede13", null ],
+      [ "JSClusterIncompleteErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aea64a5a017836108cf3da113ad57b6f9", null ],
+      [ "JSClusterNoPeersErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae9b8b81043fea45985f8c29f108594fb", null ],
+      [ "JSClusterNotActiveErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af1efbfa8ad648bf47b4304ea58b0df8c", null ],
+      [ "JSClusterNotAssignedErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a99265bcfa283741c3711337dac6718f0", null ],
+      [ "JSClusterNotAvailErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4ae7ffdfb53fb238a76ebe19c7482696", null ],
+      [ "JSClusterNotLeaderErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a32546264d1f24fc9dafe490212bfd893", null ],
+      [ "JSClusterRequiredErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a46321fc22a103908324b72259832af60", null ],
+      [ "JSClusterTagsErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a66240027007033c67fec04f4298311c4", null ],
+      [ "JSConsumerCreateErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af86c9c188aaa34a76eee96de9bf6e989", null ],
+      [ "JSConsumerNameExistErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4f59c55a24136405b6767e0bf21182c8", null ],
+      [ "JSConsumerNotFoundErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9eef13e3281a879f36a30e246fb6021b", null ],
+      [ "JSSnapshotDeliverSubjectInvalidErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae4eaa258a64f5c12d7fe50ce4c9c6de5", null ],
+      [ "JSConsumerDurableNameNotInSubjectErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aff9a4fe19078ac3e814989442beaa3a6", null ],
+      [ "JSConsumerDurableNameNotMatchSubjectErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a17c212f9409e4bd9db060bd2796905e4", null ],
+      [ "JSConsumerDurableNameNotSetErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9d9319d172e0a8147949bf40f1b29f28", null ],
+      [ "JSConsumerEphemeralWithDurableInSubjectErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4ef7a2042b48d5e0916e7e90fe691ab3", null ],
+      [ "JSConsumerEphemeralWithDurableNameErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1381bb653998c6ca8b88002d0fe0c829", null ],
+      [ "JSStreamExternalApiOverlapErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3799b98b675eeca3403a1728bd0cd5f8", null ],
+      [ "JSStreamExternalDelPrefixOverlapsErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aea055a7802194f8f1e802a8fc461f83a", null ],
+      [ "JSInsufficientResourcesErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ad1ec102705e46b5343c2680162f58f49", null ],
+      [ "JSStreamInvalidExternalDeliverySubjErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7a89433d532a863561087229b19a525f", null ],
+      [ "JSInvalidJSONErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a50c0beab390506fc6d3495325c0230c1", null ],
+      [ "JSMaximumConsumersLimitErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa1b904de1494d20f540c8075f502af24", null ],
+      [ "JSMaximumStreamsLimitErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a739799359c3988ea18fe861eaff6f1f5", null ],
+      [ "JSMemoryResourcesExceededErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae3ac6ea1656f4fcc750ba2ab1649fb57", null ],
+      [ "JSMirrorConsumerSetupFailedErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a94a9b10d712ed764de27a007ac7f04eb", null ],
+      [ "JSMirrorMaxMessageSizeTooBigErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a91020cf9692a06637bdfedd847b259f1", null ],
+      [ "JSMirrorWithSourcesErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aaad93c7c34cd3283df7369479d4cdb7c", null ],
+      [ "JSMirrorWithStartSeqAndTimeErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a600ddc1915d8bb928fd37f1539440eb3", null ],
+      [ "JSMirrorWithSubjectFiltersErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70afcfb372eb2a607f821ad110815acf9d7", null ],
+      [ "JSMirrorWithSubjectsErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a0dc0fcc88a8b39f03924d50ccf731043", null ],
+      [ "JSNoAccountErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a91773a41522fe9a464a0fb28a96b497b", null ],
+      [ "JSClusterUnSupportFeatureErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a84864e4bba24ee7354e5bae293c93d00", null ],
+      [ "JSNoMessageFoundErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a02a521ae52b716a669a3556d63a21410", null ],
+      [ "JSNotEmptyRequestErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab23b8553efea2ee0008098fcb109f690", null ],
+      [ "JSNotEnabledForAccountErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa88122abfaf173f0411a3642803aac04", null ],
+      [ "JSClusterPeerNotMemberErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae7479c265d0e8cace4ab19a59cfcbbbb", null ],
+      [ "JSRaftGeneralErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa023de74e8bedf88c2f5e4b21e62ea4b", null ],
+      [ "JSRestoreSubscribeFailedErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4963c5ecd065d3e336daf80a7cd1aa57", null ],
+      [ "JSSequenceNotFoundErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1eaa16332bbe6cb041adbb60383f944c", null ],
+      [ "JSClusterServerNotMemberErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aafa71c9cafc975d1a69889f6bf166e93", null ],
+      [ "JSSourceConsumerSetupFailedErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aeaeb1f487667a8d7643cc97bf7b3892a", null ],
+      [ "JSSourceMaxMessageSizeTooBigErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ac75e39643f73b184b22330939c4a564e", null ],
+      [ "JSStorageResourcesExceededErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2f4ee662c9cbaa0355c52de1c2463160", null ],
+      [ "JSStreamAssignmentErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2107facbac830a905217916c7d24297a", null ],
+      [ "JSStreamCreateErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a866a56223b3e4119184cee9523f98008", null ],
+      [ "JSStreamDeleteErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a85f7eee9cccd626e7b99d46c6f076322", null ],
+      [ "JSStreamGeneralError", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abc4bf9a7703ef8d3fbf2b1ad2ece3717", null ],
+      [ "JSStreamInvalidConfig", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a0c34c56b62e4246560efabd5c762aa03", null ],
+      [ "JSStreamLimitsErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4f192c39f1d7244ceb639053fad86393", null ],
+      [ "JSStreamMessageExceedsMaximumErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a519d32e9718662347753ebffaf731889", null ],
+      [ "JSStreamMirrorNotUpdatableErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a54084c4f82593cf516cd604b34c0dce8", null ],
+      [ "JSStreamMismatchErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a80d0a9f218207a11b4cc19b9c2aec83f", null ],
+      [ "JSStreamMsgDeleteFailed", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab379e2a2038276dc1eb539bda2e60b68", null ],
+      [ "JSStreamNameExistErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af68cc43ff7ed51f5557329c35fba949c", null ],
+      [ "JSStreamNotFoundErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6a2a1cbd9c2e2dc6dff4fb84be741e0f", null ],
+      [ "JSStreamNotMatchErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6b4c22a03ad4769d09599ac9a75e6435", null ],
+      [ "JSStreamReplicasNotUpdatableErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a58db02b3e72f3b20300344f97c5c7b34", null ],
+      [ "JSStreamRestoreErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab5213fbb08e833e1c69b8c93c8114506", null ],
+      [ "JSStreamSequenceNotMatchErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a64dbcba923d50e6f258db59b85eb8b17", null ],
+      [ "JSStreamSnapshotErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ac3d700ce84bc5df96c383079b093cc45", null ],
+      [ "JSStreamSubjectOverlapErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3e55a221685d96d96c514d6d5c652570", null ],
+      [ "JSStreamTemplateCreateErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1efc26df606f855cfb9993cbe95c0f46", null ],
+      [ "JSStreamTemplateDeleteErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a514184778ad2fa5cf2deaffc0c406272", null ],
+      [ "JSStreamTemplateNotFoundErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3552ffc73e39c13d14ae35f52cd3ead7", null ],
+      [ "JSStreamUpdateErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a475581c5dfbabb52334ce28013382b58", null ],
+      [ "JSStreamWrongLastMsgIDErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70adc58d142e277166a57672812df6f2c3e", null ],
+      [ "JSStreamWrongLastSequenceErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aaa5d8be08323568b5f7295feb10d73b4", null ],
+      [ "JSTempStorageFailedErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ad07006ca41165d13442df8e62ef3f398", null ],
+      [ "JSTemplateNameNotMatchSubjectErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab9e493c8837af5f62c6110493c6a70ac", null ],
+      [ "JSStreamReplicasNotSupportedErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a8f7f888318e9107bb361d4946197c4c1", null ],
+      [ "JSPeerRemapErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4d68fa855750f16fdf38c9ed93acacda", null ],
+      [ "JSNotEnabledErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70afe9c20cdb1e88744d9a5f52977e95d1c", null ],
+      [ "JSStreamStoreFailedErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab7df189a360a1d483f9eca4869abdca8", null ],
+      [ "JSConsumerConfigRequiredErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4a95591dfc0e2ccb1d3ac1b3a04f618f", null ],
+      [ "JSConsumerDeliverToWildcardsErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4712c1322585d712cef9b67cd03a3e00", null ],
+      [ "JSConsumerPushMaxWaitingErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a914926025dffa9c9b9604646b9e5675e", null ],
+      [ "JSConsumerDeliverCycleErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70afc70c6a72061d9c26017a5cf5dec729b", null ],
+      [ "JSConsumerMaxPendingAckPolicyRequiredErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a429a21189134500589ed67ac3701aff4", null ],
+      [ "JSConsumerSmallHeartbeatErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9422b53061166a064e39d360d21827fd", null ],
+      [ "JSConsumerPullRequiresAckErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abd3f17c5d6ea86c38c3d8ade18b8445a", null ],
+      [ "JSConsumerPullNotDurableErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a407efbf6c688cb93fcded08acd2a08ed", null ],
+      [ "JSConsumerPullWithRateLimitErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2a8844e5d20c55d753ec64bbde4561c8", null ],
+      [ "JSConsumerMaxWaitingNegativeErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a27579bca64e6f40f9590ef51ac03a219", null ],
+      [ "JSConsumerHBRequiresPushErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6d4bed940055aa46a188a2419a531c63", null ],
+      [ "JSConsumerFCRequiresPushErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a557d48b0334c5ceec0f0ee7cc74d8e79", null ],
+      [ "JSConsumerDirectRequiresPushErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a968eff1142ca2f39f3da3da175aeda92", null ],
+      [ "JSConsumerDirectRequiresEphemeralErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6181f797cb27c92473585893b92b95b0", null ],
+      [ "JSConsumerOnMappedErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6b6aaaa23b1af2caf959529287b2a847", null ],
+      [ "JSConsumerFilterNotSubsetErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a0f2007fc94103909ece328bbd77b0cdb", null ],
+      [ "JSConsumerInvalidPolicyErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a801182af5b4a6b9547d81ec45864b1f3", null ],
+      [ "JSConsumerInvalidSamplingErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab19f95018dff644423d6f34b682d365e", null ],
+      [ "JSStreamInvalidErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af0506e3abc3846721ae15755c2a1eb47", null ],
+      [ "JSConsumerWQRequiresExplicitAckErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a76dad06168a8d57e829876c2fcd3af56", null ],
+      [ "JSConsumerWQMultipleUnfilteredErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7adbc8c115996a6f0dfc98fcaac8f09d", null ],
+      [ "JSConsumerWQConsumerNotUniqueErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a5f7b670b9202311da41e6e5026e810d2", null ],
+      [ "JSConsumerWQConsumerNotDeliverAllErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a00b4ce854e473bb8f49d91c0f982c6f9", null ],
+      [ "JSConsumerNameTooLongErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3b1ce6536b249952dc3fb6fe5448140f", null ],
+      [ "JSConsumerBadDurableNameErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa0ca5a2e539cec9d33f433f28f2780fe", null ],
+      [ "JSConsumerStoreFailedErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2984e6b8850b6cfed9506a25bcbe0608", null ],
+      [ "JSConsumerExistingActiveErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a86407070c2bbe04d97a25f2ceda4ea58", null ],
+      [ "JSConsumerReplacementWithDifferentNameErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a051bfd5e3bb9ba2b2398e6501426bc63", null ],
+      [ "JSConsumerDescriptionTooLongErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab1b6c048b0326e3f705b470e5a7f11f5", null ],
+      [ "JSConsumerWithFlowControlNeedsHeartbeatsErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abc25cc794fce2ab7b9757ff506de51c3", null ],
+      [ "JSStreamSealedErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9bd3f4f7a2eca1f1ed49cc0499cb9c78", null ],
+      [ "JSStreamPurgeFailedErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a33f2e301313339eded6163982a680186", null ],
+      [ "JSStreamRollupFailedErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70affa3c8139019a077fac6d403d7ed0522", null ],
+      [ "JSConsumerInvalidDeliverSubjectErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa1242d9e6509f08c01c3373d0e66dc96", null ],
+      [ "JSStreamMaxBytesRequiredErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a61cd7aa9b9e02f410465a61a085fa209", null ],
+      [ "JSConsumerMaxRequestBatchNegativeErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abca8571110c4244d218c2dc1779d8786", null ],
+      [ "JSConsumerMaxRequestExpiresToSmallErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9c1c31813a713fcee44ec06728cc6382", null ],
+      [ "JSConsumerMaxDeliverBackoffErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af7c1cf2c692140c4b28ebfc47acb0c41", null ],
+      [ "JSStreamInfoMaxSubjectsErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7b5cebb5aaebd7b3bfa43f5457e97553", null ],
+      [ "JSStreamOfflineErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7c88e5ccabcb2debe1ce0c1a05bbe18b", null ],
+      [ "JSConsumerOfflineErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa0eb191886a17e917f2fa0eaa81d4b61", null ],
+      [ "JSNoLimitsErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70acfa2c06f8baef07cd96a3627ddea641b", null ],
+      [ "JSConsumerMaxPendingAckExcessErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ac4afe1d580083bd55c36b3e55a5ef479", null ],
+      [ "JSStreamMaxStreamBytesExceededErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a60fd558fc8d0f31b895c7b579ba0c8b7", null ],
+      [ "JSStreamMoveAndScaleErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a584d0bf058191cf2257d934f0bc5935c", null ],
+      [ "JSStreamMoveInProgressErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abf7739c7a0569149ed24ae8b9fbaf889", null ],
+      [ "JSConsumerMaxRequestBatchExceededErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a597c98a0637cec454b724b049098cee8", null ],
+      [ "JSConsumerReplicasExceedsStreamErr", "status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1d159f128cd9b261b5270f7e36ed22d1", null ]
+    ] ]
+];
\ No newline at end of file
diff --git a/doc/html/status_8h_source.html b/doc/html/status_8h_source.html
new file mode 100644 (file)
index 0000000..a9ec58f
--- /dev/null
@@ -0,0 +1,524 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: status.h Source File</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('status_8h_source.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">status.h</div></div>
+</div><!--header-->
+<div class="contents">
+<a href="status_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">// Copyright 2015-2022 The NATS Authors</span></div>
+<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment">// Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div>
+<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment">// you may not use this file except in compliance with the License.</span></div>
+<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="comment">// You may obtain a copy of the License at</span></div>
+<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="comment">//</span></div>
+<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span><span class="comment">// http://www.apache.org/licenses/LICENSE-2.0</span></div>
+<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="comment">//</span></div>
+<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="comment">// Unless required by applicable law or agreed to in writing, software</span></div>
+<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="comment">// distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
+<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
+<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="comment">// See the License for the specific language governing permissions and</span></div>
+<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="comment">// limitations under the License.</span></div>
+<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span> </div>
+<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span><span class="preprocessor">#ifndef STATUS_H_</span></div>
+<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span><span class="preprocessor">#define STATUS_H_</span></div>
+<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span> </div>
+<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span><span class="preprocessor">#ifdef __cplusplus</span></div>
+<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
+<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span><span class="preprocessor">#endif</span></div>
+<div class="line"><a id="l00020" name="l00020"></a><span class="lineno">   20</span> </div>
+<div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span> </div>
+<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"><a class="line" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51">   23</a></span><span class="keyword">typedef</span> <span class="keyword">enum</span></div>
+<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span>{</div>
+<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span><span class="preprocessor">#if defined(NATS_CONN_STATUS_NO_PREFIX)</span></div>
+<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span>    <span class="comment">// This is deprecated and applications referencing connection</span></div>
+<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span>    <span class="comment">// status should be updated to use the values prefixed with NATS_CONN_STATUS_.</span></div>
+<div class="line"><a id="l00028" name="l00028"></a><span class="lineno">   28</span> </div>
+<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span>    DISCONNECTED = 0, </div>
+<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span>    CONNECTING,       </div>
+<div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span>    CONNECTED,        </div>
+<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span>    CLOSED,           </div>
+<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span>    RECONNECTING,     </div>
+<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span>    DRAINING_SUBS,    </div>
+<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span>    DRAINING_PUBS,    </div>
+<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span><span class="preprocessor">#else</span></div>
+<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"><a class="line" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51a08f92960811d1ff05b91a0870b4ecb92">   37</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51a08f92960811d1ff05b91a0870b4ecb92">NATS_CONN_STATUS_DISCONNECTED</a> = 0, </div>
+<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"><a class="line" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51a7e4d95cb29122f06e17ca4aff55cc736">   38</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51a7e4d95cb29122f06e17ca4aff55cc736">NATS_CONN_STATUS_CONNECTING</a>,       </div>
+<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"><a class="line" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51a0dafab74b55f98cfc1d00e4d1ef38725">   39</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51a0dafab74b55f98cfc1d00e4d1ef38725">NATS_CONN_STATUS_CONNECTED</a>,        </div>
+<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"><a class="line" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51aa78753a4de2d0379078bb09cdc1acdb2">   40</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51aa78753a4de2d0379078bb09cdc1acdb2">NATS_CONN_STATUS_CLOSED</a>,           </div>
+<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"><a class="line" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51acfdc4826e08ce4b59f901952038e9206">   41</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51acfdc4826e08ce4b59f901952038e9206">NATS_CONN_STATUS_RECONNECTING</a>,     </div>
+<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"><a class="line" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51ab6f9d121707673a61cbe2c591f64fbf1">   42</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51ab6f9d121707673a61cbe2c591f64fbf1">NATS_CONN_STATUS_DRAINING_SUBS</a>,    </div>
+<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"><a class="line" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51ac6b8b7f138f6ca285fe1f4da707b2100">   43</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51ac6b8b7f138f6ca285fe1f4da707b2100">NATS_CONN_STATUS_DRAINING_PUBS</a>,    </div>
+<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span><span class="preprocessor">#endif</span></div>
+<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span> </div>
+<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span>} <a class="code hl_enumeration" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51">natsConnStatus</a>;</div>
+<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span> </div>
+<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"><a class="line" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">   49</a></span><span class="keyword">typedef</span> <span class="keyword">enum</span></div>
+<div class="line"><a id="l00050" name="l00050"></a><span class="lineno">   50</span>{</div>
+<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"><a class="line" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">   51</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">NATS_OK</a>         = 0,                </div>
+<div class="line"><a id="l00052" name="l00052"></a><span class="lineno">   52</span> </div>
+<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"><a class="line" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a40a08ae6ae17deaf390b1d0d7550791c">   53</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a40a08ae6ae17deaf390b1d0d7550791c">NATS_ERR</a>,                           </div>
+<div class="line"><a id="l00054" name="l00054"></a><span class="lineno">   54</span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a113ffbe9a1f243582c38ebd876cb736d">NATS_PROTOCOL_ERROR</a>,                </div>
+<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"><a class="line" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a44e8b2590369fb01a1479719c97c2b6f">   56</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a44e8b2590369fb01a1479719c97c2b6f">NATS_IO_ERROR</a>,                      </div>
+<div class="line"><a id="l00057" name="l00057"></a><span class="lineno">   57</span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a85c29dbfa6b06ffef3418cc9947ffff7">NATS_LINE_TOO_LONG</a>,                 </div>
+<div class="line"><a id="l00059" name="l00059"></a><span class="lineno">   59</span> </div>
+<div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a476d7bcf9a593b749e435f20a9156eff">NATS_CONNECTION_CLOSED</a>,             </div>
+<div class="line"><a id="l00062" name="l00062"></a><span class="lineno">   62</span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a47034d8889521bbd300f45fdc19e1127">NATS_NO_SERVER</a>,                     </div>
+<div class="line"><a id="l00064" name="l00064"></a><span class="lineno">   64</span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80aa76d5e3ce051bc7510be90e73663c93d">NATS_STALE_CONNECTION</a>,              </div>
+<div class="line"><a id="l00066" name="l00066"></a><span class="lineno">   66</span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a0aa3d1e18a2a217149fa8b1a306c9b08">NATS_SECURE_CONNECTION_WANTED</a>,      </div>
+<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"><a class="line" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80abc76f1b31fdac4525583cc19588240dc">   68</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80abc76f1b31fdac4525583cc19588240dc">NATS_SECURE_CONNECTION_REQUIRED</a>,    </div>
+<div class="line"><a id="l00069" name="l00069"></a><span class="lineno">   69</span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80abef517217119e8446a8e3382e1f37eb3">NATS_CONNECTION_DISCONNECTED</a>,       </div>
+<div class="line"><a id="l00071" name="l00071"></a><span class="lineno">   71</span> </div>
+<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"><a class="line" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a473ea6cfa03490838fafee8730b48a2a">   72</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a473ea6cfa03490838fafee8730b48a2a">NATS_CONNECTION_AUTH_FAILED</a>,        </div>
+<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"><a class="line" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ac3abc147873fe999c86431f9222eebf5">   73</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ac3abc147873fe999c86431f9222eebf5">NATS_NOT_PERMITTED</a>,                 </div>
+<div class="line"><a id="l00074" name="l00074"></a><span class="lineno">   74</span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ad0229a12b17d3d12a28efed6213720d8">NATS_NOT_FOUND</a>,                     </div>
+<div class="line"><a id="l00076" name="l00076"></a><span class="lineno">   76</span> </div>
+<div class="line"><a id="l00077" name="l00077"></a><span class="lineno">   77</span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ae1d2c1366dbed428f6589f057acc507d">NATS_ADDRESS_MISSING</a>,               </div>
+<div class="line"><a id="l00079" name="l00079"></a><span class="lineno">   79</span> </div>
+<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"><a class="line" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a790c08a7d33e3aefce07c04120c4c19e">   80</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a790c08a7d33e3aefce07c04120c4c19e">NATS_INVALID_SUBJECT</a>,               </div>
+<div class="line"><a id="l00081" name="l00081"></a><span class="lineno">   81</span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a71b57630aebf5c20eecdab832c2a9235">NATS_INVALID_ARG</a>,                   </div>
+<div class="line"><a id="l00084" name="l00084"></a><span class="lineno">   84</span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a273e92a0ff3b7eaf946b4b7fa6cc6c6c">NATS_INVALID_SUBSCRIPTION</a>,          </div>
+<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"><a class="line" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a827072fc245a99a60691e1e4b173ca86">   86</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a827072fc245a99a60691e1e4b173ca86">NATS_INVALID_TIMEOUT</a>,               </div>
+<div class="line"><a id="l00087" name="l00087"></a><span class="lineno">   87</span> </div>
+<div class="line"><a id="l00088" name="l00088"></a><span class="lineno">   88</span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9bb78b4f245d2870040d25c450febd4b">NATS_ILLEGAL_STATE</a>,                 </div>
+<div class="line"><a id="l00091" name="l00091"></a><span class="lineno">   91</span> </div>
+<div class="line"><a id="l00092" name="l00092"></a><span class="lineno">   92</span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ae93ff5b7fe31f8570308385d92d317b0">NATS_SLOW_CONSUMER</a>,                 </div>
+<div class="line"><a id="l00094" name="l00094"></a><span class="lineno">   94</span> </div>
+<div class="line"><a id="l00095" name="l00095"></a><span class="lineno">   95</span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80af820300473609092a3e97a71b5af9ff9">NATS_MAX_PAYLOAD</a>,                   </div>
+<div class="line"><a id="l00097" name="l00097"></a><span class="lineno">   97</span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9a6f40b7803639ac18bdf532e93e5ad5">NATS_MAX_DELIVERED_MSGS</a>,            </div>
+<div class="line"><a id="l00099" name="l00099"></a><span class="lineno">   99</span> </div>
+<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"><a class="line" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a317fb9be1a80f6b1877f96a9a2db16ad">  100</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a317fb9be1a80f6b1877f96a9a2db16ad">NATS_INSUFFICIENT_BUFFER</a>,           </div>
+<div class="line"><a id="l00101" name="l00101"></a><span class="lineno">  101</span> </div>
+<div class="line"><a id="l00102" name="l00102"></a><span class="lineno">  102</span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a62ff6f5cc64399631defc0119731b514">NATS_NO_MEMORY</a>,                     </div>
+<div class="line"><a id="l00104" name="l00104"></a><span class="lineno">  104</span> </div>
+<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"><a class="line" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a984189ec4cfe3e7647268c99f7e49ec9">  105</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a984189ec4cfe3e7647268c99f7e49ec9">NATS_SYS_ERROR</a>,                     </div>
+<div class="line"><a id="l00106" name="l00106"></a><span class="lineno">  106</span> </div>
+<div class="line"><a id="l00107" name="l00107"></a><span class="lineno">  107</span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ab88994c9ea9889ac4d9d656d62f550ed">NATS_TIMEOUT</a>,                       </div>
+<div class="line"><a id="l00109" name="l00109"></a><span class="lineno">  109</span> </div>
+<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"><a class="line" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a7cb64f52c8d91d6ade3db6bc82a96c42">  110</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a7cb64f52c8d91d6ade3db6bc82a96c42">NATS_FAILED_TO_INITIALIZE</a>,          </div>
+<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"><a class="line" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ae47047f2fac5f2f2a434fc501e5c3d4e">  111</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ae47047f2fac5f2f2a434fc501e5c3d4e">NATS_NOT_INITIALIZED</a>,               </div>
+<div class="line"><a id="l00112" name="l00112"></a><span class="lineno">  112</span> </div>
+<div class="line"><a id="l00113" name="l00113"></a><span class="lineno">  113</span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a892183c32b4929388bb75dc62230ddf3">NATS_SSL_ERROR</a>,                     </div>
+<div class="line"><a id="l00115" name="l00115"></a><span class="lineno">  115</span> </div>
+<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"><a class="line" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a8a4e298931ba0698a72e397b1b57c885">  116</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a8a4e298931ba0698a72e397b1b57c885">NATS_NO_SERVER_SUPPORT</a>,             </div>
+<div class="line"><a id="l00117" name="l00117"></a><span class="lineno">  117</span> </div>
+<div class="line"><a id="l00118" name="l00118"></a><span class="lineno">  118</span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a49a1ea653ce112b3c53eedebcd60811d">NATS_NOT_YET_CONNECTED</a>,             </div>
+<div class="line"><a id="l00121" name="l00121"></a><span class="lineno">  121</span> </div>
+<div class="line"><a id="l00122" name="l00122"></a><span class="lineno">  122</span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a07fdbda44f43cef9866a75b25053c2ae">NATS_DRAINING</a>,                      </div>
+<div class="line"><a id="l00124" name="l00124"></a><span class="lineno">  124</span> </div>
+<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"><a class="line" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a8a0d239cfdfa30fe730afea65941779b">  125</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a8a0d239cfdfa30fe730afea65941779b">NATS_INVALID_QUEUE_NAME</a>,            </div>
+<div class="line"><a id="l00126" name="l00126"></a><span class="lineno">  126</span> </div>
+<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"><a class="line" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80aab97324e40ccfe1360080c651c330e62">  127</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80aab97324e40ccfe1360080c651c330e62">NATS_NO_RESPONDERS</a>,                 </div>
+<div class="line"><a id="l00128" name="l00128"></a><span class="lineno">  128</span> </div>
+<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"><a class="line" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a22fa4802a34bac497f23e269a20a52f2">  129</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a22fa4802a34bac497f23e269a20a52f2">NATS_MISMATCH</a>,                      </div>
+<div class="line"><a id="l00130" name="l00130"></a><span class="lineno">  130</span> </div>
+<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"><a class="line" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a37d80c8232775339a32805fe93e0ea7f">  131</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a37d80c8232775339a32805fe93e0ea7f">NATS_MISSED_HEARTBEAT</a>,              </div>
+<div class="line"><a id="l00132" name="l00132"></a><span class="lineno">  132</span> </div>
+<div class="line"><a id="l00133" name="l00133"></a><span class="lineno">  133</span>} <a class="code hl_enumeration" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>;</div>
+<div class="line"><a id="l00134" name="l00134"></a><span class="lineno">  134</span> </div>
+<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">  135</a></span><span class="keyword">typedef</span> <span class="keyword">enum</span> {</div>
+<div class="line"><a id="l00136" name="l00136"></a><span class="lineno">  136</span> </div>
+<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a26a33a6e2296eb0ac0370176fb08ed9a">  137</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a26a33a6e2296eb0ac0370176fb08ed9a">JSAccountResourcesExceededErr</a> = 10002,              </div>
+<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70acedca75c7ec69c5573da7013f69ede13">  138</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70acedca75c7ec69c5573da7013f69ede13">JSBadRequestErr</a> = 10003,                            </div>
+<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aea64a5a017836108cf3da113ad57b6f9">  139</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aea64a5a017836108cf3da113ad57b6f9">JSClusterIncompleteErr</a> = 10004,                     </div>
+<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae9b8b81043fea45985f8c29f108594fb">  140</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae9b8b81043fea45985f8c29f108594fb">JSClusterNoPeersErr</a> = 10005,                        </div>
+<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af1efbfa8ad648bf47b4304ea58b0df8c">  141</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af1efbfa8ad648bf47b4304ea58b0df8c">JSClusterNotActiveErr</a> = 10006,                      </div>
+<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a99265bcfa283741c3711337dac6718f0">  142</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a99265bcfa283741c3711337dac6718f0">JSClusterNotAssignedErr</a> = 10007,                    </div>
+<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4ae7ffdfb53fb238a76ebe19c7482696">  143</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4ae7ffdfb53fb238a76ebe19c7482696">JSClusterNotAvailErr</a> = 10008,                       </div>
+<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a32546264d1f24fc9dafe490212bfd893">  144</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a32546264d1f24fc9dafe490212bfd893">JSClusterNotLeaderErr</a> = 10009,                      </div>
+<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a46321fc22a103908324b72259832af60">  145</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a46321fc22a103908324b72259832af60">JSClusterRequiredErr</a> = 10010,                       </div>
+<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a66240027007033c67fec04f4298311c4">  146</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a66240027007033c67fec04f4298311c4">JSClusterTagsErr</a> = 10011,                           </div>
+<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af86c9c188aaa34a76eee96de9bf6e989">  147</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af86c9c188aaa34a76eee96de9bf6e989">JSConsumerCreateErr</a> = 10012,                        </div>
+<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4f59c55a24136405b6767e0bf21182c8">  148</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4f59c55a24136405b6767e0bf21182c8">JSConsumerNameExistErr</a> = 10013,                     </div>
+<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9eef13e3281a879f36a30e246fb6021b">  149</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9eef13e3281a879f36a30e246fb6021b">JSConsumerNotFoundErr</a> = 10014,                      </div>
+<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae4eaa258a64f5c12d7fe50ce4c9c6de5">  150</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae4eaa258a64f5c12d7fe50ce4c9c6de5">JSSnapshotDeliverSubjectInvalidErr</a> = 10015,         </div>
+<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aff9a4fe19078ac3e814989442beaa3a6">  151</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aff9a4fe19078ac3e814989442beaa3a6">JSConsumerDurableNameNotInSubjectErr</a> = 10016,       </div>
+<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a17c212f9409e4bd9db060bd2796905e4">  152</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a17c212f9409e4bd9db060bd2796905e4">JSConsumerDurableNameNotMatchSubjectErr</a> = 10017,    </div>
+<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9d9319d172e0a8147949bf40f1b29f28">  153</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9d9319d172e0a8147949bf40f1b29f28">JSConsumerDurableNameNotSetErr</a> = 10018,             </div>
+<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4ef7a2042b48d5e0916e7e90fe691ab3">  154</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4ef7a2042b48d5e0916e7e90fe691ab3">JSConsumerEphemeralWithDurableInSubjectErr</a> = 10019, </div>
+<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1381bb653998c6ca8b88002d0fe0c829">  155</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1381bb653998c6ca8b88002d0fe0c829">JSConsumerEphemeralWithDurableNameErr</a> = 10020,      </div>
+<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3799b98b675eeca3403a1728bd0cd5f8">  156</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3799b98b675eeca3403a1728bd0cd5f8">JSStreamExternalApiOverlapErr</a> = 10021,              </div>
+<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aea055a7802194f8f1e802a8fc461f83a">  157</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aea055a7802194f8f1e802a8fc461f83a">JSStreamExternalDelPrefixOverlapsErr</a> = 10022,       </div>
+<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ad1ec102705e46b5343c2680162f58f49">  158</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ad1ec102705e46b5343c2680162f58f49">JSInsufficientResourcesErr</a> = 10023,                 </div>
+<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7a89433d532a863561087229b19a525f">  159</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7a89433d532a863561087229b19a525f">JSStreamInvalidExternalDeliverySubjErr</a> = 10024,     </div>
+<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a50c0beab390506fc6d3495325c0230c1">  160</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a50c0beab390506fc6d3495325c0230c1">JSInvalidJSONErr</a> = 10025,                           </div>
+<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa1b904de1494d20f540c8075f502af24">  161</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa1b904de1494d20f540c8075f502af24">JSMaximumConsumersLimitErr</a> = 10026,                 </div>
+<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a739799359c3988ea18fe861eaff6f1f5">  162</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a739799359c3988ea18fe861eaff6f1f5">JSMaximumStreamsLimitErr</a> = 10027,                   </div>
+<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae3ac6ea1656f4fcc750ba2ab1649fb57">  163</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae3ac6ea1656f4fcc750ba2ab1649fb57">JSMemoryResourcesExceededErr</a> = 10028,               </div>
+<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a94a9b10d712ed764de27a007ac7f04eb">  164</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a94a9b10d712ed764de27a007ac7f04eb">JSMirrorConsumerSetupFailedErr</a> = 10029,             </div>
+<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a91020cf9692a06637bdfedd847b259f1">  165</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a91020cf9692a06637bdfedd847b259f1">JSMirrorMaxMessageSizeTooBigErr</a> = 10030,            </div>
+<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aaad93c7c34cd3283df7369479d4cdb7c">  166</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aaad93c7c34cd3283df7369479d4cdb7c">JSMirrorWithSourcesErr</a> = 10031,                     </div>
+<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a600ddc1915d8bb928fd37f1539440eb3">  167</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a600ddc1915d8bb928fd37f1539440eb3">JSMirrorWithStartSeqAndTimeErr</a> = 10032,             </div>
+<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70afcfb372eb2a607f821ad110815acf9d7">  168</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70afcfb372eb2a607f821ad110815acf9d7">JSMirrorWithSubjectFiltersErr</a> = 10033,              </div>
+<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a0dc0fcc88a8b39f03924d50ccf731043">  169</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a0dc0fcc88a8b39f03924d50ccf731043">JSMirrorWithSubjectsErr</a> = 10034,                    </div>
+<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a91773a41522fe9a464a0fb28a96b497b">  170</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a91773a41522fe9a464a0fb28a96b497b">JSNoAccountErr</a> = 10035,                             </div>
+<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a84864e4bba24ee7354e5bae293c93d00">  171</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a84864e4bba24ee7354e5bae293c93d00">JSClusterUnSupportFeatureErr</a> = 10036,               </div>
+<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a02a521ae52b716a669a3556d63a21410">  172</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a02a521ae52b716a669a3556d63a21410">JSNoMessageFoundErr</a> = 10037,                        </div>
+<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab23b8553efea2ee0008098fcb109f690">  173</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab23b8553efea2ee0008098fcb109f690">JSNotEmptyRequestErr</a> = 10038,                       </div>
+<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa88122abfaf173f0411a3642803aac04">  174</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa88122abfaf173f0411a3642803aac04">JSNotEnabledForAccountErr</a> = 10039,                  </div>
+<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae7479c265d0e8cace4ab19a59cfcbbbb">  175</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae7479c265d0e8cace4ab19a59cfcbbbb">JSClusterPeerNotMemberErr</a> = 10040,                  </div>
+<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa023de74e8bedf88c2f5e4b21e62ea4b">  176</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa023de74e8bedf88c2f5e4b21e62ea4b">JSRaftGeneralErr</a> = 10041,                           </div>
+<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4963c5ecd065d3e336daf80a7cd1aa57">  177</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4963c5ecd065d3e336daf80a7cd1aa57">JSRestoreSubscribeFailedErr</a> = 10042,                </div>
+<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1eaa16332bbe6cb041adbb60383f944c">  178</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1eaa16332bbe6cb041adbb60383f944c">JSSequenceNotFoundErr</a> = 10043,                      </div>
+<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aafa71c9cafc975d1a69889f6bf166e93">  179</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aafa71c9cafc975d1a69889f6bf166e93">JSClusterServerNotMemberErr</a> = 10044,                </div>
+<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aeaeb1f487667a8d7643cc97bf7b3892a">  180</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aeaeb1f487667a8d7643cc97bf7b3892a">JSSourceConsumerSetupFailedErr</a> = 10045,             </div>
+<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ac75e39643f73b184b22330939c4a564e">  181</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ac75e39643f73b184b22330939c4a564e">JSSourceMaxMessageSizeTooBigErr</a> = 10046,            </div>
+<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2f4ee662c9cbaa0355c52de1c2463160">  182</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2f4ee662c9cbaa0355c52de1c2463160">JSStorageResourcesExceededErr</a> = 10047,              </div>
+<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2107facbac830a905217916c7d24297a">  183</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2107facbac830a905217916c7d24297a">JSStreamAssignmentErr</a> = 10048,                      </div>
+<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a866a56223b3e4119184cee9523f98008">  184</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a866a56223b3e4119184cee9523f98008">JSStreamCreateErr</a> = 10049,                          </div>
+<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a85f7eee9cccd626e7b99d46c6f076322">  185</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a85f7eee9cccd626e7b99d46c6f076322">JSStreamDeleteErr</a> = 10050,                          </div>
+<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abc4bf9a7703ef8d3fbf2b1ad2ece3717">  186</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abc4bf9a7703ef8d3fbf2b1ad2ece3717">JSStreamGeneralError</a> = 10051,                       </div>
+<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a0c34c56b62e4246560efabd5c762aa03">  187</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a0c34c56b62e4246560efabd5c762aa03">JSStreamInvalidConfig</a> = 10052,                      </div>
+<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4f192c39f1d7244ceb639053fad86393">  188</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4f192c39f1d7244ceb639053fad86393">JSStreamLimitsErr</a> = 10053,                          </div>
+<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a519d32e9718662347753ebffaf731889">  189</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a519d32e9718662347753ebffaf731889">JSStreamMessageExceedsMaximumErr</a> = 10054,           </div>
+<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a54084c4f82593cf516cd604b34c0dce8">  190</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a54084c4f82593cf516cd604b34c0dce8">JSStreamMirrorNotUpdatableErr</a> = 10055,              </div>
+<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a80d0a9f218207a11b4cc19b9c2aec83f">  191</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a80d0a9f218207a11b4cc19b9c2aec83f">JSStreamMismatchErr</a> = 10056,                        </div>
+<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab379e2a2038276dc1eb539bda2e60b68">  192</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab379e2a2038276dc1eb539bda2e60b68">JSStreamMsgDeleteFailed</a> = 10057,                    </div>
+<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af68cc43ff7ed51f5557329c35fba949c">  193</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af68cc43ff7ed51f5557329c35fba949c">JSStreamNameExistErr</a> = 10058,                       </div>
+<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6a2a1cbd9c2e2dc6dff4fb84be741e0f">  194</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6a2a1cbd9c2e2dc6dff4fb84be741e0f">JSStreamNotFoundErr</a> = 10059,                        </div>
+<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6b4c22a03ad4769d09599ac9a75e6435">  195</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6b4c22a03ad4769d09599ac9a75e6435">JSStreamNotMatchErr</a> = 10060,                        </div>
+<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a58db02b3e72f3b20300344f97c5c7b34">  196</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a58db02b3e72f3b20300344f97c5c7b34">JSStreamReplicasNotUpdatableErr</a> = 10061,            </div>
+<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab5213fbb08e833e1c69b8c93c8114506">  197</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab5213fbb08e833e1c69b8c93c8114506">JSStreamRestoreErr</a> = 10062,                         </div>
+<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a64dbcba923d50e6f258db59b85eb8b17">  198</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a64dbcba923d50e6f258db59b85eb8b17">JSStreamSequenceNotMatchErr</a> = 10063,                </div>
+<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ac3d700ce84bc5df96c383079b093cc45">  199</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ac3d700ce84bc5df96c383079b093cc45">JSStreamSnapshotErr</a> = 10064,                        </div>
+<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3e55a221685d96d96c514d6d5c652570">  200</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3e55a221685d96d96c514d6d5c652570">JSStreamSubjectOverlapErr</a> = 10065,                  </div>
+<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1efc26df606f855cfb9993cbe95c0f46">  201</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1efc26df606f855cfb9993cbe95c0f46">JSStreamTemplateCreateErr</a> = 10066,                  </div>
+<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a514184778ad2fa5cf2deaffc0c406272">  202</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a514184778ad2fa5cf2deaffc0c406272">JSStreamTemplateDeleteErr</a> = 10067,                  </div>
+<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3552ffc73e39c13d14ae35f52cd3ead7">  203</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3552ffc73e39c13d14ae35f52cd3ead7">JSStreamTemplateNotFoundErr</a> = 10068,                </div>
+<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a475581c5dfbabb52334ce28013382b58">  204</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a475581c5dfbabb52334ce28013382b58">JSStreamUpdateErr</a> = 10069,                          </div>
+<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70adc58d142e277166a57672812df6f2c3e">  205</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70adc58d142e277166a57672812df6f2c3e">JSStreamWrongLastMsgIDErr</a> = 10070,                  </div>
+<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aaa5d8be08323568b5f7295feb10d73b4">  206</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aaa5d8be08323568b5f7295feb10d73b4">JSStreamWrongLastSequenceErr</a> = 10071,               </div>
+<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ad07006ca41165d13442df8e62ef3f398">  207</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ad07006ca41165d13442df8e62ef3f398">JSTempStorageFailedErr</a> = 10072,                     </div>
+<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab9e493c8837af5f62c6110493c6a70ac">  208</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab9e493c8837af5f62c6110493c6a70ac">JSTemplateNameNotMatchSubjectErr</a> = 10073,           </div>
+<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a8f7f888318e9107bb361d4946197c4c1">  209</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a8f7f888318e9107bb361d4946197c4c1">JSStreamReplicasNotSupportedErr</a> = 10074,            </div>
+<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4d68fa855750f16fdf38c9ed93acacda">  210</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4d68fa855750f16fdf38c9ed93acacda">JSPeerRemapErr</a> = 10075,                             </div>
+<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70afe9c20cdb1e88744d9a5f52977e95d1c">  211</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70afe9c20cdb1e88744d9a5f52977e95d1c">JSNotEnabledErr</a> = 10076,                            </div>
+<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab7df189a360a1d483f9eca4869abdca8">  212</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab7df189a360a1d483f9eca4869abdca8">JSStreamStoreFailedErr</a> = 10077,                     </div>
+<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4a95591dfc0e2ccb1d3ac1b3a04f618f">  213</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4a95591dfc0e2ccb1d3ac1b3a04f618f">JSConsumerConfigRequiredErr</a> = 10078,                </div>
+<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4712c1322585d712cef9b67cd03a3e00">  214</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4712c1322585d712cef9b67cd03a3e00">JSConsumerDeliverToWildcardsErr</a> = 10079,            </div>
+<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a914926025dffa9c9b9604646b9e5675e">  215</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a914926025dffa9c9b9604646b9e5675e">JSConsumerPushMaxWaitingErr</a> = 10080,                </div>
+<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70afc70c6a72061d9c26017a5cf5dec729b">  216</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70afc70c6a72061d9c26017a5cf5dec729b">JSConsumerDeliverCycleErr</a> = 10081,                  </div>
+<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a429a21189134500589ed67ac3701aff4">  217</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a429a21189134500589ed67ac3701aff4">JSConsumerMaxPendingAckPolicyRequiredErr</a> = 10082,   </div>
+<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9422b53061166a064e39d360d21827fd">  218</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9422b53061166a064e39d360d21827fd">JSConsumerSmallHeartbeatErr</a> = 10083,                </div>
+<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abd3f17c5d6ea86c38c3d8ade18b8445a">  219</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abd3f17c5d6ea86c38c3d8ade18b8445a">JSConsumerPullRequiresAckErr</a> = 10084,               </div>
+<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a407efbf6c688cb93fcded08acd2a08ed">  220</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a407efbf6c688cb93fcded08acd2a08ed">JSConsumerPullNotDurableErr</a> = 10085,                </div>
+<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2a8844e5d20c55d753ec64bbde4561c8">  221</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2a8844e5d20c55d753ec64bbde4561c8">JSConsumerPullWithRateLimitErr</a> = 10086,             </div>
+<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a27579bca64e6f40f9590ef51ac03a219">  222</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a27579bca64e6f40f9590ef51ac03a219">JSConsumerMaxWaitingNegativeErr</a> = 10087,            </div>
+<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6d4bed940055aa46a188a2419a531c63">  223</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6d4bed940055aa46a188a2419a531c63">JSConsumerHBRequiresPushErr</a> = 10088,                </div>
+<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a557d48b0334c5ceec0f0ee7cc74d8e79">  224</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a557d48b0334c5ceec0f0ee7cc74d8e79">JSConsumerFCRequiresPushErr</a> = 10089,                </div>
+<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a968eff1142ca2f39f3da3da175aeda92">  225</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a968eff1142ca2f39f3da3da175aeda92">JSConsumerDirectRequiresPushErr</a> = 10090,            </div>
+<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6181f797cb27c92473585893b92b95b0">  226</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6181f797cb27c92473585893b92b95b0">JSConsumerDirectRequiresEphemeralErr</a> = 10091,       </div>
+<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6b6aaaa23b1af2caf959529287b2a847">  227</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6b6aaaa23b1af2caf959529287b2a847">JSConsumerOnMappedErr</a> = 10092,                      </div>
+<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a0f2007fc94103909ece328bbd77b0cdb">  228</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a0f2007fc94103909ece328bbd77b0cdb">JSConsumerFilterNotSubsetErr</a> = 10093,               </div>
+<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a801182af5b4a6b9547d81ec45864b1f3">  229</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a801182af5b4a6b9547d81ec45864b1f3">JSConsumerInvalidPolicyErr</a> = 10094,                 </div>
+<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab19f95018dff644423d6f34b682d365e">  230</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab19f95018dff644423d6f34b682d365e">JSConsumerInvalidSamplingErr</a> = 10095,               </div>
+<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af0506e3abc3846721ae15755c2a1eb47">  231</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af0506e3abc3846721ae15755c2a1eb47">JSStreamInvalidErr</a> = 10096,                         </div>
+<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a76dad06168a8d57e829876c2fcd3af56">  232</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a76dad06168a8d57e829876c2fcd3af56">JSConsumerWQRequiresExplicitAckErr</a> = 10098,         </div>
+<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7adbc8c115996a6f0dfc98fcaac8f09d">  233</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7adbc8c115996a6f0dfc98fcaac8f09d">JSConsumerWQMultipleUnfilteredErr</a> = 10099,          </div>
+<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a5f7b670b9202311da41e6e5026e810d2">  234</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a5f7b670b9202311da41e6e5026e810d2">JSConsumerWQConsumerNotUniqueErr</a> = 10100,           </div>
+<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a00b4ce854e473bb8f49d91c0f982c6f9">  235</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a00b4ce854e473bb8f49d91c0f982c6f9">JSConsumerWQConsumerNotDeliverAllErr</a> = 10101,       </div>
+<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3b1ce6536b249952dc3fb6fe5448140f">  236</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3b1ce6536b249952dc3fb6fe5448140f">JSConsumerNameTooLongErr</a> = 10102,                   </div>
+<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa0ca5a2e539cec9d33f433f28f2780fe">  237</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa0ca5a2e539cec9d33f433f28f2780fe">JSConsumerBadDurableNameErr</a> = 10103,                </div>
+<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2984e6b8850b6cfed9506a25bcbe0608">  238</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2984e6b8850b6cfed9506a25bcbe0608">JSConsumerStoreFailedErr</a> = 10104,                   </div>
+<div class="line"><a id="l00239" name="l00239"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a86407070c2bbe04d97a25f2ceda4ea58">  239</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a86407070c2bbe04d97a25f2ceda4ea58">JSConsumerExistingActiveErr</a> = 10105,                </div>
+<div class="line"><a id="l00240" name="l00240"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a051bfd5e3bb9ba2b2398e6501426bc63">  240</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a051bfd5e3bb9ba2b2398e6501426bc63">JSConsumerReplacementWithDifferentNameErr</a> = 10106,  </div>
+<div class="line"><a id="l00241" name="l00241"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab1b6c048b0326e3f705b470e5a7f11f5">  241</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab1b6c048b0326e3f705b470e5a7f11f5">JSConsumerDescriptionTooLongErr</a> = 10107,            </div>
+<div class="line"><a id="l00242" name="l00242"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abc25cc794fce2ab7b9757ff506de51c3">  242</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abc25cc794fce2ab7b9757ff506de51c3">JSConsumerWithFlowControlNeedsHeartbeatsErr</a> = 10108,</div>
+<div class="line"><a id="l00243" name="l00243"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9bd3f4f7a2eca1f1ed49cc0499cb9c78">  243</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9bd3f4f7a2eca1f1ed49cc0499cb9c78">JSStreamSealedErr</a> = 10109,                          </div>
+<div class="line"><a id="l00244" name="l00244"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a33f2e301313339eded6163982a680186">  244</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a33f2e301313339eded6163982a680186">JSStreamPurgeFailedErr</a> = 10110,                     </div>
+<div class="line"><a id="l00245" name="l00245"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70affa3c8139019a077fac6d403d7ed0522">  245</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70affa3c8139019a077fac6d403d7ed0522">JSStreamRollupFailedErr</a> = 10111,                    </div>
+<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa1242d9e6509f08c01c3373d0e66dc96">  246</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa1242d9e6509f08c01c3373d0e66dc96">JSConsumerInvalidDeliverSubjectErr</a> = 10112,         </div>
+<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a61cd7aa9b9e02f410465a61a085fa209">  247</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a61cd7aa9b9e02f410465a61a085fa209">JSStreamMaxBytesRequiredErr</a> = 10113,                </div>
+<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abca8571110c4244d218c2dc1779d8786">  248</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abca8571110c4244d218c2dc1779d8786">JSConsumerMaxRequestBatchNegativeErr</a> = 10114,       </div>
+<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9c1c31813a713fcee44ec06728cc6382">  249</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9c1c31813a713fcee44ec06728cc6382">JSConsumerMaxRequestExpiresToSmallErr</a> = 10115,      </div>
+<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af7c1cf2c692140c4b28ebfc47acb0c41">  250</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af7c1cf2c692140c4b28ebfc47acb0c41">JSConsumerMaxDeliverBackoffErr</a> = 10116,             </div>
+<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7b5cebb5aaebd7b3bfa43f5457e97553">  251</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7b5cebb5aaebd7b3bfa43f5457e97553">JSStreamInfoMaxSubjectsErr</a> = 10117,                 </div>
+<div class="line"><a id="l00252" name="l00252"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7c88e5ccabcb2debe1ce0c1a05bbe18b">  252</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7c88e5ccabcb2debe1ce0c1a05bbe18b">JSStreamOfflineErr</a> = 10118,                         </div>
+<div class="line"><a id="l00253" name="l00253"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa0eb191886a17e917f2fa0eaa81d4b61">  253</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa0eb191886a17e917f2fa0eaa81d4b61">JSConsumerOfflineErr</a> = 10119,                       </div>
+<div class="line"><a id="l00254" name="l00254"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70acfa2c06f8baef07cd96a3627ddea641b">  254</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70acfa2c06f8baef07cd96a3627ddea641b">JSNoLimitsErr</a> = 10120,                              </div>
+<div class="line"><a id="l00255" name="l00255"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ac4afe1d580083bd55c36b3e55a5ef479">  255</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ac4afe1d580083bd55c36b3e55a5ef479">JSConsumerMaxPendingAckExcessErr</a> = 10121,           </div>
+<div class="line"><a id="l00256" name="l00256"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a60fd558fc8d0f31b895c7b579ba0c8b7">  256</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a60fd558fc8d0f31b895c7b579ba0c8b7">JSStreamMaxStreamBytesExceededErr</a> = 10122,          </div>
+<div class="line"><a id="l00257" name="l00257"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a584d0bf058191cf2257d934f0bc5935c">  257</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a584d0bf058191cf2257d934f0bc5935c">JSStreamMoveAndScaleErr</a> = 10123,                    </div>
+<div class="line"><a id="l00258" name="l00258"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abf7739c7a0569149ed24ae8b9fbaf889">  258</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abf7739c7a0569149ed24ae8b9fbaf889">JSStreamMoveInProgressErr</a> = 10124,                  </div>
+<div class="line"><a id="l00259" name="l00259"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a597c98a0637cec454b724b049098cee8">  259</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a597c98a0637cec454b724b049098cee8">JSConsumerMaxRequestBatchExceededErr</a> = 10125,       </div>
+<div class="line"><a id="l00260" name="l00260"></a><span class="lineno"><a class="line" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1d159f128cd9b261b5270f7e36ed22d1">  260</a></span>    <a class="code hl_enumvalue" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1d159f128cd9b261b5270f7e36ed22d1">JSConsumerReplicasExceedsStreamErr</a> = 10126,         </div>
+<div class="line"><a id="l00261" name="l00261"></a><span class="lineno">  261</span> </div>
+<div class="line"><a id="l00262" name="l00262"></a><span class="lineno">  262</span>} <a class="code hl_enumeration" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a>;</div>
+<div class="line"><a id="l00263" name="l00263"></a><span class="lineno">  263</span> </div>
+<div class="line"><a id="l00264" name="l00264"></a><span class="lineno">  264</span><span class="preprocessor">#ifdef __cplusplus</span></div>
+<div class="line"><a id="l00265" name="l00265"></a><span class="lineno">  265</span>}</div>
+<div class="line"><a id="l00266" name="l00266"></a><span class="lineno">  266</span><span class="preprocessor">#endif</span></div>
+<div class="line"><a id="l00267" name="l00267"></a><span class="lineno">  267</span> </div>
+<div class="line"><a id="l00268" name="l00268"></a><span class="lineno">  268</span><span class="preprocessor">#endif </span><span class="comment">/* STATUS_H_ */</span><span class="preprocessor"></span></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a></div><div class="ttdeci">jsErrCode</div><div class="ttdef"><b>Definition:</b> status.h:135</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a00b4ce854e473bb8f49d91c0f982c6f9"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a00b4ce854e473bb8f49d91c0f982c6f9">JSConsumerWQConsumerNotDeliverAllErr</a></div><div class="ttdeci">@ JSConsumerWQConsumerNotDeliverAllErr</div><div class="ttdoc">Consumer must be deliver all on workqueue stream.</div><div class="ttdef"><b>Definition:</b> status.h:235</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a02a521ae52b716a669a3556d63a21410"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a02a521ae52b716a669a3556d63a21410">JSNoMessageFoundErr</a></div><div class="ttdeci">@ JSNoMessageFoundErr</div><div class="ttdoc">No message found.</div><div class="ttdef"><b>Definition:</b> status.h:172</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a051bfd5e3bb9ba2b2398e6501426bc63"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a051bfd5e3bb9ba2b2398e6501426bc63">JSConsumerReplacementWithDifferentNameErr</a></div><div class="ttdeci">@ JSConsumerReplacementWithDifferentNameErr</div><div class="ttdoc">Consumer replacement durable config not the same.</div><div class="ttdef"><b>Definition:</b> status.h:240</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a0c34c56b62e4246560efabd5c762aa03"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a0c34c56b62e4246560efabd5c762aa03">JSStreamInvalidConfig</a></div><div class="ttdeci">@ JSStreamInvalidConfig</div><div class="ttdoc">Stream configuration validation error.</div><div class="ttdef"><b>Definition:</b> status.h:187</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a0dc0fcc88a8b39f03924d50ccf731043"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a0dc0fcc88a8b39f03924d50ccf731043">JSMirrorWithSubjectsErr</a></div><div class="ttdeci">@ JSMirrorWithSubjectsErr</div><div class="ttdoc">Stream mirrors can not also contain subjects.</div><div class="ttdef"><b>Definition:</b> status.h:169</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a0f2007fc94103909ece328bbd77b0cdb"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a0f2007fc94103909ece328bbd77b0cdb">JSConsumerFilterNotSubsetErr</a></div><div class="ttdeci">@ JSConsumerFilterNotSubsetErr</div><div class="ttdoc">Consumer filter subject is not a valid subset of the interest subjects.</div><div class="ttdef"><b>Definition:</b> status.h:228</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a1381bb653998c6ca8b88002d0fe0c829"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1381bb653998c6ca8b88002d0fe0c829">JSConsumerEphemeralWithDurableNameErr</a></div><div class="ttdeci">@ JSConsumerEphemeralWithDurableNameErr</div><div class="ttdoc">Consumer expected to be ephemeral but a durable name was set in request.</div><div class="ttdef"><b>Definition:</b> status.h:155</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a17c212f9409e4bd9db060bd2796905e4"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a17c212f9409e4bd9db060bd2796905e4">JSConsumerDurableNameNotMatchSubjectErr</a></div><div class="ttdeci">@ JSConsumerDurableNameNotMatchSubjectErr</div><div class="ttdoc">Consumer name in subject does not match durable name in request.</div><div class="ttdef"><b>Definition:</b> status.h:152</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a1d159f128cd9b261b5270f7e36ed22d1"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1d159f128cd9b261b5270f7e36ed22d1">JSConsumerReplicasExceedsStreamErr</a></div><div class="ttdeci">@ JSConsumerReplicasExceedsStreamErr</div><div class="ttdoc">Consumer config replica count exceeds parent stream.</div><div class="ttdef"><b>Definition:</b> status.h:260</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a1eaa16332bbe6cb041adbb60383f944c"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1eaa16332bbe6cb041adbb60383f944c">JSSequenceNotFoundErr</a></div><div class="ttdeci">@ JSSequenceNotFoundErr</div><div class="ttdoc">Sequence not found.</div><div class="ttdef"><b>Definition:</b> status.h:178</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a1efc26df606f855cfb9993cbe95c0f46"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a1efc26df606f855cfb9993cbe95c0f46">JSStreamTemplateCreateErr</a></div><div class="ttdeci">@ JSStreamTemplateCreateErr</div><div class="ttdoc">Generic template creation failed.</div><div class="ttdef"><b>Definition:</b> status.h:201</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a2107facbac830a905217916c7d24297a"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2107facbac830a905217916c7d24297a">JSStreamAssignmentErr</a></div><div class="ttdeci">@ JSStreamAssignmentErr</div><div class="ttdoc">Generic stream assignment error.</div><div class="ttdef"><b>Definition:</b> status.h:183</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a26a33a6e2296eb0ac0370176fb08ed9a"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a26a33a6e2296eb0ac0370176fb08ed9a">JSAccountResourcesExceededErr</a></div><div class="ttdeci">@ JSAccountResourcesExceededErr</div><div class="ttdoc">Resource limits exceeded for account.</div><div class="ttdef"><b>Definition:</b> status.h:137</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a27579bca64e6f40f9590ef51ac03a219"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a27579bca64e6f40f9590ef51ac03a219">JSConsumerMaxWaitingNegativeErr</a></div><div class="ttdeci">@ JSConsumerMaxWaitingNegativeErr</div><div class="ttdoc">Consumer max waiting needs to be positive.</div><div class="ttdef"><b>Definition:</b> status.h:222</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a2984e6b8850b6cfed9506a25bcbe0608"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2984e6b8850b6cfed9506a25bcbe0608">JSConsumerStoreFailedErr</a></div><div class="ttdeci">@ JSConsumerStoreFailedErr</div><div class="ttdoc">Error creating store for consumer.</div><div class="ttdef"><b>Definition:</b> status.h:238</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a2a8844e5d20c55d753ec64bbde4561c8"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2a8844e5d20c55d753ec64bbde4561c8">JSConsumerPullWithRateLimitErr</a></div><div class="ttdeci">@ JSConsumerPullWithRateLimitErr</div><div class="ttdoc">Consumer in pull mode can not have rate limit set.</div><div class="ttdef"><b>Definition:</b> status.h:221</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a2f4ee662c9cbaa0355c52de1c2463160"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a2f4ee662c9cbaa0355c52de1c2463160">JSStorageResourcesExceededErr</a></div><div class="ttdeci">@ JSStorageResourcesExceededErr</div><div class="ttdoc">Insufficient storage resources available.</div><div class="ttdef"><b>Definition:</b> status.h:182</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a32546264d1f24fc9dafe490212bfd893"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a32546264d1f24fc9dafe490212bfd893">JSClusterNotLeaderErr</a></div><div class="ttdeci">@ JSClusterNotLeaderErr</div><div class="ttdoc">JetStream cluster can not handle request.</div><div class="ttdef"><b>Definition:</b> status.h:144</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a33f2e301313339eded6163982a680186"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a33f2e301313339eded6163982a680186">JSStreamPurgeFailedErr</a></div><div class="ttdeci">@ JSStreamPurgeFailedErr</div><div class="ttdoc">Generic stream purge failure.</div><div class="ttdef"><b>Definition:</b> status.h:244</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a3552ffc73e39c13d14ae35f52cd3ead7"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3552ffc73e39c13d14ae35f52cd3ead7">JSStreamTemplateNotFoundErr</a></div><div class="ttdeci">@ JSStreamTemplateNotFoundErr</div><div class="ttdoc">Template not found.</div><div class="ttdef"><b>Definition:</b> status.h:203</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a3799b98b675eeca3403a1728bd0cd5f8"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3799b98b675eeca3403a1728bd0cd5f8">JSStreamExternalApiOverlapErr</a></div><div class="ttdeci">@ JSStreamExternalApiOverlapErr</div><div class="ttdoc">Stream external api prefix must not overlap.</div><div class="ttdef"><b>Definition:</b> status.h:156</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a3b1ce6536b249952dc3fb6fe5448140f"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3b1ce6536b249952dc3fb6fe5448140f">JSConsumerNameTooLongErr</a></div><div class="ttdeci">@ JSConsumerNameTooLongErr</div><div class="ttdoc">Consumer name is too long.</div><div class="ttdef"><b>Definition:</b> status.h:236</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a3e55a221685d96d96c514d6d5c652570"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a3e55a221685d96d96c514d6d5c652570">JSStreamSubjectOverlapErr</a></div><div class="ttdeci">@ JSStreamSubjectOverlapErr</div><div class="ttdoc">Subjects overlap with an existing stream.</div><div class="ttdef"><b>Definition:</b> status.h:200</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a407efbf6c688cb93fcded08acd2a08ed"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a407efbf6c688cb93fcded08acd2a08ed">JSConsumerPullNotDurableErr</a></div><div class="ttdeci">@ JSConsumerPullNotDurableErr</div><div class="ttdoc">Consumer in pull mode requires a durable name.</div><div class="ttdef"><b>Definition:</b> status.h:220</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a429a21189134500589ed67ac3701aff4"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a429a21189134500589ed67ac3701aff4">JSConsumerMaxPendingAckPolicyRequiredErr</a></div><div class="ttdeci">@ JSConsumerMaxPendingAckPolicyRequiredErr</div><div class="ttdoc">Consumer requires ack policy for max ack pending.</div><div class="ttdef"><b>Definition:</b> status.h:217</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a46321fc22a103908324b72259832af60"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a46321fc22a103908324b72259832af60">JSClusterRequiredErr</a></div><div class="ttdeci">@ JSClusterRequiredErr</div><div class="ttdoc">JetStream clustering support required.</div><div class="ttdef"><b>Definition:</b> status.h:145</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a4712c1322585d712cef9b67cd03a3e00"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4712c1322585d712cef9b67cd03a3e00">JSConsumerDeliverToWildcardsErr</a></div><div class="ttdeci">@ JSConsumerDeliverToWildcardsErr</div><div class="ttdoc">Consumer deliver subject has wildcards.</div><div class="ttdef"><b>Definition:</b> status.h:214</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a475581c5dfbabb52334ce28013382b58"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a475581c5dfbabb52334ce28013382b58">JSStreamUpdateErr</a></div><div class="ttdeci">@ JSStreamUpdateErr</div><div class="ttdoc">Generic stream update error.</div><div class="ttdef"><b>Definition:</b> status.h:204</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a4963c5ecd065d3e336daf80a7cd1aa57"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4963c5ecd065d3e336daf80a7cd1aa57">JSRestoreSubscribeFailedErr</a></div><div class="ttdeci">@ JSRestoreSubscribeFailedErr</div><div class="ttdoc">JetStream unable to subscribe to restore snapshot.</div><div class="ttdef"><b>Definition:</b> status.h:177</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a4a95591dfc0e2ccb1d3ac1b3a04f618f"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4a95591dfc0e2ccb1d3ac1b3a04f618f">JSConsumerConfigRequiredErr</a></div><div class="ttdeci">@ JSConsumerConfigRequiredErr</div><div class="ttdoc">Consumer config required.</div><div class="ttdef"><b>Definition:</b> status.h:213</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a4ae7ffdfb53fb238a76ebe19c7482696"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4ae7ffdfb53fb238a76ebe19c7482696">JSClusterNotAvailErr</a></div><div class="ttdeci">@ JSClusterNotAvailErr</div><div class="ttdoc">JetStream system temporarily unavailable.</div><div class="ttdef"><b>Definition:</b> status.h:143</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a4d68fa855750f16fdf38c9ed93acacda"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4d68fa855750f16fdf38c9ed93acacda">JSPeerRemapErr</a></div><div class="ttdeci">@ JSPeerRemapErr</div><div class="ttdoc">Peer remap failed.</div><div class="ttdef"><b>Definition:</b> status.h:210</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a4ef7a2042b48d5e0916e7e90fe691ab3"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4ef7a2042b48d5e0916e7e90fe691ab3">JSConsumerEphemeralWithDurableInSubjectErr</a></div><div class="ttdeci">@ JSConsumerEphemeralWithDurableInSubjectErr</div><div class="ttdoc">Consumer expected to be ephemeral but detected a durable name set in subject.</div><div class="ttdef"><b>Definition:</b> status.h:154</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a4f192c39f1d7244ceb639053fad86393"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4f192c39f1d7244ceb639053fad86393">JSStreamLimitsErr</a></div><div class="ttdeci">@ JSStreamLimitsErr</div><div class="ttdoc">General stream limits exceeded error.</div><div class="ttdef"><b>Definition:</b> status.h:188</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a4f59c55a24136405b6767e0bf21182c8"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a4f59c55a24136405b6767e0bf21182c8">JSConsumerNameExistErr</a></div><div class="ttdeci">@ JSConsumerNameExistErr</div><div class="ttdoc">Consumer name already in use.</div><div class="ttdef"><b>Definition:</b> status.h:148</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a50c0beab390506fc6d3495325c0230c1"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a50c0beab390506fc6d3495325c0230c1">JSInvalidJSONErr</a></div><div class="ttdeci">@ JSInvalidJSONErr</div><div class="ttdoc">Invalid JSON.</div><div class="ttdef"><b>Definition:</b> status.h:160</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a514184778ad2fa5cf2deaffc0c406272"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a514184778ad2fa5cf2deaffc0c406272">JSStreamTemplateDeleteErr</a></div><div class="ttdeci">@ JSStreamTemplateDeleteErr</div><div class="ttdoc">Generic stream template deletion failed error.</div><div class="ttdef"><b>Definition:</b> status.h:202</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a519d32e9718662347753ebffaf731889"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a519d32e9718662347753ebffaf731889">JSStreamMessageExceedsMaximumErr</a></div><div class="ttdeci">@ JSStreamMessageExceedsMaximumErr</div><div class="ttdoc">Message size exceeds maximum allowed.</div><div class="ttdef"><b>Definition:</b> status.h:189</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a54084c4f82593cf516cd604b34c0dce8"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a54084c4f82593cf516cd604b34c0dce8">JSStreamMirrorNotUpdatableErr</a></div><div class="ttdeci">@ JSStreamMirrorNotUpdatableErr</div><div class="ttdoc">Mirror configuration can not be updated.</div><div class="ttdef"><b>Definition:</b> status.h:190</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a557d48b0334c5ceec0f0ee7cc74d8e79"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a557d48b0334c5ceec0f0ee7cc74d8e79">JSConsumerFCRequiresPushErr</a></div><div class="ttdeci">@ JSConsumerFCRequiresPushErr</div><div class="ttdoc">Consumer flow control requires a push based consumer.</div><div class="ttdef"><b>Definition:</b> status.h:224</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a584d0bf058191cf2257d934f0bc5935c"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a584d0bf058191cf2257d934f0bc5935c">JSStreamMoveAndScaleErr</a></div><div class="ttdeci">@ JSStreamMoveAndScaleErr</div><div class="ttdoc">Cannot move and scale a stream in a single update.</div><div class="ttdef"><b>Definition:</b> status.h:257</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a58db02b3e72f3b20300344f97c5c7b34"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a58db02b3e72f3b20300344f97c5c7b34">JSStreamReplicasNotUpdatableErr</a></div><div class="ttdeci">@ JSStreamReplicasNotUpdatableErr</div><div class="ttdoc">Replicas configuration can not be updated.</div><div class="ttdef"><b>Definition:</b> status.h:196</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a597c98a0637cec454b724b049098cee8"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a597c98a0637cec454b724b049098cee8">JSConsumerMaxRequestBatchExceededErr</a></div><div class="ttdeci">@ JSConsumerMaxRequestBatchExceededErr</div><div class="ttdoc">Consumer max request batch exceeds server limit.</div><div class="ttdef"><b>Definition:</b> status.h:259</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a5f7b670b9202311da41e6e5026e810d2"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a5f7b670b9202311da41e6e5026e810d2">JSConsumerWQConsumerNotUniqueErr</a></div><div class="ttdeci">@ JSConsumerWQConsumerNotUniqueErr</div><div class="ttdoc">Filtered consumer not unique on workqueue stream.</div><div class="ttdef"><b>Definition:</b> status.h:234</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a600ddc1915d8bb928fd37f1539440eb3"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a600ddc1915d8bb928fd37f1539440eb3">JSMirrorWithStartSeqAndTimeErr</a></div><div class="ttdeci">@ JSMirrorWithStartSeqAndTimeErr</div><div class="ttdoc">Stream mirrors can not have both start seq and start time configured.</div><div class="ttdef"><b>Definition:</b> status.h:167</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a60fd558fc8d0f31b895c7b579ba0c8b7"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a60fd558fc8d0f31b895c7b579ba0c8b7">JSStreamMaxStreamBytesExceededErr</a></div><div class="ttdeci">@ JSStreamMaxStreamBytesExceededErr</div><div class="ttdoc">Stream max bytes exceeds account limit max stream bytes.</div><div class="ttdef"><b>Definition:</b> status.h:256</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a6181f797cb27c92473585893b92b95b0"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6181f797cb27c92473585893b92b95b0">JSConsumerDirectRequiresEphemeralErr</a></div><div class="ttdeci">@ JSConsumerDirectRequiresEphemeralErr</div><div class="ttdoc">Consumer direct requires an ephemeral consumer.</div><div class="ttdef"><b>Definition:</b> status.h:226</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a61cd7aa9b9e02f410465a61a085fa209"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a61cd7aa9b9e02f410465a61a085fa209">JSStreamMaxBytesRequiredErr</a></div><div class="ttdeci">@ JSStreamMaxBytesRequiredErr</div><div class="ttdoc">Account requires a stream config to have max bytes set.</div><div class="ttdef"><b>Definition:</b> status.h:247</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a64dbcba923d50e6f258db59b85eb8b17"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a64dbcba923d50e6f258db59b85eb8b17">JSStreamSequenceNotMatchErr</a></div><div class="ttdeci">@ JSStreamSequenceNotMatchErr</div><div class="ttdoc">Expected stream sequence does not match.</div><div class="ttdef"><b>Definition:</b> status.h:198</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a66240027007033c67fec04f4298311c4"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a66240027007033c67fec04f4298311c4">JSClusterTagsErr</a></div><div class="ttdeci">@ JSClusterTagsErr</div><div class="ttdoc">Tags placement not supported for operation.</div><div class="ttdef"><b>Definition:</b> status.h:146</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a6a2a1cbd9c2e2dc6dff4fb84be741e0f"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6a2a1cbd9c2e2dc6dff4fb84be741e0f">JSStreamNotFoundErr</a></div><div class="ttdeci">@ JSStreamNotFoundErr</div><div class="ttdoc">Stream not found.</div><div class="ttdef"><b>Definition:</b> status.h:194</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a6b4c22a03ad4769d09599ac9a75e6435"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6b4c22a03ad4769d09599ac9a75e6435">JSStreamNotMatchErr</a></div><div class="ttdeci">@ JSStreamNotMatchErr</div><div class="ttdoc">Expected stream does not match.</div><div class="ttdef"><b>Definition:</b> status.h:195</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a6b6aaaa23b1af2caf959529287b2a847"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6b6aaaa23b1af2caf959529287b2a847">JSConsumerOnMappedErr</a></div><div class="ttdeci">@ JSConsumerOnMappedErr</div><div class="ttdoc">Consumer direct on a mapped consumer.</div><div class="ttdef"><b>Definition:</b> status.h:227</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a6d4bed940055aa46a188a2419a531c63"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a6d4bed940055aa46a188a2419a531c63">JSConsumerHBRequiresPushErr</a></div><div class="ttdeci">@ JSConsumerHBRequiresPushErr</div><div class="ttdoc">Consumer idle heartbeat requires a push based consumer.</div><div class="ttdef"><b>Definition:</b> status.h:223</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a739799359c3988ea18fe861eaff6f1f5"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a739799359c3988ea18fe861eaff6f1f5">JSMaximumStreamsLimitErr</a></div><div class="ttdeci">@ JSMaximumStreamsLimitErr</div><div class="ttdoc">Maximum number of streams reached.</div><div class="ttdef"><b>Definition:</b> status.h:162</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a76dad06168a8d57e829876c2fcd3af56"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a76dad06168a8d57e829876c2fcd3af56">JSConsumerWQRequiresExplicitAckErr</a></div><div class="ttdeci">@ JSConsumerWQRequiresExplicitAckErr</div><div class="ttdoc">Workqueue stream requires explicit ack.</div><div class="ttdef"><b>Definition:</b> status.h:232</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a7a89433d532a863561087229b19a525f"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7a89433d532a863561087229b19a525f">JSStreamInvalidExternalDeliverySubjErr</a></div><div class="ttdeci">@ JSStreamInvalidExternalDeliverySubjErr</div><div class="ttdoc">Stream external delivery prefix must not contain wildcards.</div><div class="ttdef"><b>Definition:</b> status.h:159</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a7adbc8c115996a6f0dfc98fcaac8f09d"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7adbc8c115996a6f0dfc98fcaac8f09d">JSConsumerWQMultipleUnfilteredErr</a></div><div class="ttdeci">@ JSConsumerWQMultipleUnfilteredErr</div><div class="ttdoc">Multiple non-filtered consumers not allowed on workqueue stream.</div><div class="ttdef"><b>Definition:</b> status.h:233</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a7b5cebb5aaebd7b3bfa43f5457e97553"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7b5cebb5aaebd7b3bfa43f5457e97553">JSStreamInfoMaxSubjectsErr</a></div><div class="ttdeci">@ JSStreamInfoMaxSubjectsErr</div><div class="ttdoc">Subject details would exceed maximum allowed.</div><div class="ttdef"><b>Definition:</b> status.h:251</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a7c88e5ccabcb2debe1ce0c1a05bbe18b"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a7c88e5ccabcb2debe1ce0c1a05bbe18b">JSStreamOfflineErr</a></div><div class="ttdeci">@ JSStreamOfflineErr</div><div class="ttdoc">Stream is offline.</div><div class="ttdef"><b>Definition:</b> status.h:252</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a801182af5b4a6b9547d81ec45864b1f3"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a801182af5b4a6b9547d81ec45864b1f3">JSConsumerInvalidPolicyErr</a></div><div class="ttdeci">@ JSConsumerInvalidPolicyErr</div><div class="ttdoc">Generic delivery policy error.</div><div class="ttdef"><b>Definition:</b> status.h:229</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a80d0a9f218207a11b4cc19b9c2aec83f"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a80d0a9f218207a11b4cc19b9c2aec83f">JSStreamMismatchErr</a></div><div class="ttdeci">@ JSStreamMismatchErr</div><div class="ttdoc">Stream name in subject does not match request.</div><div class="ttdef"><b>Definition:</b> status.h:191</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a84864e4bba24ee7354e5bae293c93d00"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a84864e4bba24ee7354e5bae293c93d00">JSClusterUnSupportFeatureErr</a></div><div class="ttdeci">@ JSClusterUnSupportFeatureErr</div><div class="ttdoc">Not currently supported in clustered mode.</div><div class="ttdef"><b>Definition:</b> status.h:171</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a85f7eee9cccd626e7b99d46c6f076322"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a85f7eee9cccd626e7b99d46c6f076322">JSStreamDeleteErr</a></div><div class="ttdeci">@ JSStreamDeleteErr</div><div class="ttdoc">General stream deletion error.</div><div class="ttdef"><b>Definition:</b> status.h:185</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a86407070c2bbe04d97a25f2ceda4ea58"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a86407070c2bbe04d97a25f2ceda4ea58">JSConsumerExistingActiveErr</a></div><div class="ttdeci">@ JSConsumerExistingActiveErr</div><div class="ttdoc">Consumer already exists and is still active.</div><div class="ttdef"><b>Definition:</b> status.h:239</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a866a56223b3e4119184cee9523f98008"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a866a56223b3e4119184cee9523f98008">JSStreamCreateErr</a></div><div class="ttdeci">@ JSStreamCreateErr</div><div class="ttdoc">Generic stream creation error.</div><div class="ttdef"><b>Definition:</b> status.h:184</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a8f7f888318e9107bb361d4946197c4c1"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a8f7f888318e9107bb361d4946197c4c1">JSStreamReplicasNotSupportedErr</a></div><div class="ttdeci">@ JSStreamReplicasNotSupportedErr</div><div class="ttdoc">Replicas &gt; 1 not supported in non-clustered mode.</div><div class="ttdef"><b>Definition:</b> status.h:209</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a91020cf9692a06637bdfedd847b259f1"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a91020cf9692a06637bdfedd847b259f1">JSMirrorMaxMessageSizeTooBigErr</a></div><div class="ttdeci">@ JSMirrorMaxMessageSizeTooBigErr</div><div class="ttdoc">Stream mirror must have max message size &gt;= source.</div><div class="ttdef"><b>Definition:</b> status.h:165</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a914926025dffa9c9b9604646b9e5675e"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a914926025dffa9c9b9604646b9e5675e">JSConsumerPushMaxWaitingErr</a></div><div class="ttdeci">@ JSConsumerPushMaxWaitingErr</div><div class="ttdoc">Consumer in push mode can not set max waiting.</div><div class="ttdef"><b>Definition:</b> status.h:215</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a91773a41522fe9a464a0fb28a96b497b"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a91773a41522fe9a464a0fb28a96b497b">JSNoAccountErr</a></div><div class="ttdeci">@ JSNoAccountErr</div><div class="ttdoc">Account not found.</div><div class="ttdef"><b>Definition:</b> status.h:170</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a9422b53061166a064e39d360d21827fd"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9422b53061166a064e39d360d21827fd">JSConsumerSmallHeartbeatErr</a></div><div class="ttdeci">@ JSConsumerSmallHeartbeatErr</div><div class="ttdoc">Consumer idle heartbeat needs to be &gt;= 100ms.</div><div class="ttdef"><b>Definition:</b> status.h:218</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a94a9b10d712ed764de27a007ac7f04eb"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a94a9b10d712ed764de27a007ac7f04eb">JSMirrorConsumerSetupFailedErr</a></div><div class="ttdeci">@ JSMirrorConsumerSetupFailedErr</div><div class="ttdoc">Generic mirror consumer setup failure.</div><div class="ttdef"><b>Definition:</b> status.h:164</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a968eff1142ca2f39f3da3da175aeda92"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a968eff1142ca2f39f3da3da175aeda92">JSConsumerDirectRequiresPushErr</a></div><div class="ttdeci">@ JSConsumerDirectRequiresPushErr</div><div class="ttdoc">Consumer direct requires a push based consumer.</div><div class="ttdef"><b>Definition:</b> status.h:225</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a99265bcfa283741c3711337dac6718f0"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a99265bcfa283741c3711337dac6718f0">JSClusterNotAssignedErr</a></div><div class="ttdeci">@ JSClusterNotAssignedErr</div><div class="ttdoc">JetStream cluster not assigned to this server.</div><div class="ttdef"><b>Definition:</b> status.h:142</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a9bd3f4f7a2eca1f1ed49cc0499cb9c78"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9bd3f4f7a2eca1f1ed49cc0499cb9c78">JSStreamSealedErr</a></div><div class="ttdeci">@ JSStreamSealedErr</div><div class="ttdoc">Invalid operation on sealed stream.</div><div class="ttdef"><b>Definition:</b> status.h:243</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a9c1c31813a713fcee44ec06728cc6382"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9c1c31813a713fcee44ec06728cc6382">JSConsumerMaxRequestExpiresToSmallErr</a></div><div class="ttdeci">@ JSConsumerMaxRequestExpiresToSmallErr</div><div class="ttdoc">Consumer max request expires needs to be &gt; 1ms.</div><div class="ttdef"><b>Definition:</b> status.h:249</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a9d9319d172e0a8147949bf40f1b29f28"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9d9319d172e0a8147949bf40f1b29f28">JSConsumerDurableNameNotSetErr</a></div><div class="ttdeci">@ JSConsumerDurableNameNotSetErr</div><div class="ttdoc">Consumer expected to be durable but a durable name was not set.</div><div class="ttdef"><b>Definition:</b> status.h:153</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70a9eef13e3281a879f36a30e246fb6021b"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70a9eef13e3281a879f36a30e246fb6021b">JSConsumerNotFoundErr</a></div><div class="ttdeci">@ JSConsumerNotFoundErr</div><div class="ttdoc">Consumer not found.</div><div class="ttdef"><b>Definition:</b> status.h:149</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70aa023de74e8bedf88c2f5e4b21e62ea4b"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa023de74e8bedf88c2f5e4b21e62ea4b">JSRaftGeneralErr</a></div><div class="ttdeci">@ JSRaftGeneralErr</div><div class="ttdoc">General RAFT error.</div><div class="ttdef"><b>Definition:</b> status.h:176</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70aa0ca5a2e539cec9d33f433f28f2780fe"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa0ca5a2e539cec9d33f433f28f2780fe">JSConsumerBadDurableNameErr</a></div><div class="ttdeci">@ JSConsumerBadDurableNameErr</div><div class="ttdoc">Durable name can not contain '.', '*', '&gt;'.</div><div class="ttdef"><b>Definition:</b> status.h:237</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70aa0eb191886a17e917f2fa0eaa81d4b61"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa0eb191886a17e917f2fa0eaa81d4b61">JSConsumerOfflineErr</a></div><div class="ttdeci">@ JSConsumerOfflineErr</div><div class="ttdoc">Consumer is offline.</div><div class="ttdef"><b>Definition:</b> status.h:253</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70aa1242d9e6509f08c01c3373d0e66dc96"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa1242d9e6509f08c01c3373d0e66dc96">JSConsumerInvalidDeliverSubjectErr</a></div><div class="ttdeci">@ JSConsumerInvalidDeliverSubjectErr</div><div class="ttdoc">Invalid push consumer deliver subject.</div><div class="ttdef"><b>Definition:</b> status.h:246</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70aa1b904de1494d20f540c8075f502af24"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa1b904de1494d20f540c8075f502af24">JSMaximumConsumersLimitErr</a></div><div class="ttdeci">@ JSMaximumConsumersLimitErr</div><div class="ttdoc">Maximum consumers exceeds account limit.</div><div class="ttdef"><b>Definition:</b> status.h:161</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70aa88122abfaf173f0411a3642803aac04"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aa88122abfaf173f0411a3642803aac04">JSNotEnabledForAccountErr</a></div><div class="ttdeci">@ JSNotEnabledForAccountErr</div><div class="ttdoc">JetStream not enabled for account.</div><div class="ttdef"><b>Definition:</b> status.h:174</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70aaa5d8be08323568b5f7295feb10d73b4"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aaa5d8be08323568b5f7295feb10d73b4">JSStreamWrongLastSequenceErr</a></div><div class="ttdeci">@ JSStreamWrongLastSequenceErr</div><div class="ttdoc">Wrong last sequence.</div><div class="ttdef"><b>Definition:</b> status.h:206</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70aaad93c7c34cd3283df7369479d4cdb7c"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aaad93c7c34cd3283df7369479d4cdb7c">JSMirrorWithSourcesErr</a></div><div class="ttdeci">@ JSMirrorWithSourcesErr</div><div class="ttdoc">Stream mirrors can not also contain other sources.</div><div class="ttdef"><b>Definition:</b> status.h:166</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70aafa71c9cafc975d1a69889f6bf166e93"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aafa71c9cafc975d1a69889f6bf166e93">JSClusterServerNotMemberErr</a></div><div class="ttdeci">@ JSClusterServerNotMemberErr</div><div class="ttdoc">Server is not a member of the cluster.</div><div class="ttdef"><b>Definition:</b> status.h:179</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70ab19f95018dff644423d6f34b682d365e"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab19f95018dff644423d6f34b682d365e">JSConsumerInvalidSamplingErr</a></div><div class="ttdeci">@ JSConsumerInvalidSamplingErr</div><div class="ttdoc">Failed to parse consumer sampling configuration.</div><div class="ttdef"><b>Definition:</b> status.h:230</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70ab1b6c048b0326e3f705b470e5a7f11f5"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab1b6c048b0326e3f705b470e5a7f11f5">JSConsumerDescriptionTooLongErr</a></div><div class="ttdeci">@ JSConsumerDescriptionTooLongErr</div><div class="ttdoc">Consumer description is too long.</div><div class="ttdef"><b>Definition:</b> status.h:241</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70ab23b8553efea2ee0008098fcb109f690"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab23b8553efea2ee0008098fcb109f690">JSNotEmptyRequestErr</a></div><div class="ttdeci">@ JSNotEmptyRequestErr</div><div class="ttdoc">Expected an empty request payload.</div><div class="ttdef"><b>Definition:</b> status.h:173</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70ab379e2a2038276dc1eb539bda2e60b68"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab379e2a2038276dc1eb539bda2e60b68">JSStreamMsgDeleteFailed</a></div><div class="ttdeci">@ JSStreamMsgDeleteFailed</div><div class="ttdoc">Generic message deletion failure error.</div><div class="ttdef"><b>Definition:</b> status.h:192</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70ab5213fbb08e833e1c69b8c93c8114506"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab5213fbb08e833e1c69b8c93c8114506">JSStreamRestoreErr</a></div><div class="ttdeci">@ JSStreamRestoreErr</div><div class="ttdoc">Restore failed.</div><div class="ttdef"><b>Definition:</b> status.h:197</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70ab7df189a360a1d483f9eca4869abdca8"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab7df189a360a1d483f9eca4869abdca8">JSStreamStoreFailedErr</a></div><div class="ttdeci">@ JSStreamStoreFailedErr</div><div class="ttdoc">Generic error when storing a message failed.</div><div class="ttdef"><b>Definition:</b> status.h:212</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70ab9e493c8837af5f62c6110493c6a70ac"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ab9e493c8837af5f62c6110493c6a70ac">JSTemplateNameNotMatchSubjectErr</a></div><div class="ttdeci">@ JSTemplateNameNotMatchSubjectErr</div><div class="ttdoc">Template name in subject does not match request.</div><div class="ttdef"><b>Definition:</b> status.h:208</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70abc25cc794fce2ab7b9757ff506de51c3"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abc25cc794fce2ab7b9757ff506de51c3">JSConsumerWithFlowControlNeedsHeartbeatsErr</a></div><div class="ttdeci">@ JSConsumerWithFlowControlNeedsHeartbeatsErr</div><div class="ttdoc">Consumer with flow control also needs heartbeats.</div><div class="ttdef"><b>Definition:</b> status.h:242</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70abc4bf9a7703ef8d3fbf2b1ad2ece3717"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abc4bf9a7703ef8d3fbf2b1ad2ece3717">JSStreamGeneralError</a></div><div class="ttdeci">@ JSStreamGeneralError</div><div class="ttdoc">General stream failure.</div><div class="ttdef"><b>Definition:</b> status.h:186</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70abca8571110c4244d218c2dc1779d8786"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abca8571110c4244d218c2dc1779d8786">JSConsumerMaxRequestBatchNegativeErr</a></div><div class="ttdeci">@ JSConsumerMaxRequestBatchNegativeErr</div><div class="ttdoc">Consumer max request batch needs to be &gt; 0.</div><div class="ttdef"><b>Definition:</b> status.h:248</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70abd3f17c5d6ea86c38c3d8ade18b8445a"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abd3f17c5d6ea86c38c3d8ade18b8445a">JSConsumerPullRequiresAckErr</a></div><div class="ttdeci">@ JSConsumerPullRequiresAckErr</div><div class="ttdoc">Consumer in pull mode requires explicit ack policy.</div><div class="ttdef"><b>Definition:</b> status.h:219</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70abf7739c7a0569149ed24ae8b9fbaf889"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70abf7739c7a0569149ed24ae8b9fbaf889">JSStreamMoveInProgressErr</a></div><div class="ttdeci">@ JSStreamMoveInProgressErr</div><div class="ttdoc">Stream move already in progress.</div><div class="ttdef"><b>Definition:</b> status.h:258</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70ac3d700ce84bc5df96c383079b093cc45"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ac3d700ce84bc5df96c383079b093cc45">JSStreamSnapshotErr</a></div><div class="ttdeci">@ JSStreamSnapshotErr</div><div class="ttdoc">Snapshot failed.</div><div class="ttdef"><b>Definition:</b> status.h:199</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70ac4afe1d580083bd55c36b3e55a5ef479"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ac4afe1d580083bd55c36b3e55a5ef479">JSConsumerMaxPendingAckExcessErr</a></div><div class="ttdeci">@ JSConsumerMaxPendingAckExcessErr</div><div class="ttdoc">Consumer max ack pending exceeds system limit.</div><div class="ttdef"><b>Definition:</b> status.h:255</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70ac75e39643f73b184b22330939c4a564e"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ac75e39643f73b184b22330939c4a564e">JSSourceMaxMessageSizeTooBigErr</a></div><div class="ttdeci">@ JSSourceMaxMessageSizeTooBigErr</div><div class="ttdoc">Stream source must have max message size &gt;= target.</div><div class="ttdef"><b>Definition:</b> status.h:181</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70acedca75c7ec69c5573da7013f69ede13"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70acedca75c7ec69c5573da7013f69ede13">JSBadRequestErr</a></div><div class="ttdeci">@ JSBadRequestErr</div><div class="ttdoc">Bad request.</div><div class="ttdef"><b>Definition:</b> status.h:138</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70acfa2c06f8baef07cd96a3627ddea641b"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70acfa2c06f8baef07cd96a3627ddea641b">JSNoLimitsErr</a></div><div class="ttdeci">@ JSNoLimitsErr</div><div class="ttdoc">No JetStream default or applicable tiered limit present.</div><div class="ttdef"><b>Definition:</b> status.h:254</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70ad07006ca41165d13442df8e62ef3f398"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ad07006ca41165d13442df8e62ef3f398">JSTempStorageFailedErr</a></div><div class="ttdeci">@ JSTempStorageFailedErr</div><div class="ttdoc">JetStream unable to open temp storage for restore.</div><div class="ttdef"><b>Definition:</b> status.h:207</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70ad1ec102705e46b5343c2680162f58f49"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ad1ec102705e46b5343c2680162f58f49">JSInsufficientResourcesErr</a></div><div class="ttdeci">@ JSInsufficientResourcesErr</div><div class="ttdoc">Insufficient resources.</div><div class="ttdef"><b>Definition:</b> status.h:158</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70adc58d142e277166a57672812df6f2c3e"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70adc58d142e277166a57672812df6f2c3e">JSStreamWrongLastMsgIDErr</a></div><div class="ttdeci">@ JSStreamWrongLastMsgIDErr</div><div class="ttdoc">Wrong last msg ID.</div><div class="ttdef"><b>Definition:</b> status.h:205</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70ae3ac6ea1656f4fcc750ba2ab1649fb57"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae3ac6ea1656f4fcc750ba2ab1649fb57">JSMemoryResourcesExceededErr</a></div><div class="ttdeci">@ JSMemoryResourcesExceededErr</div><div class="ttdoc">Insufficient memory resources available.</div><div class="ttdef"><b>Definition:</b> status.h:163</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70ae4eaa258a64f5c12d7fe50ce4c9c6de5"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae4eaa258a64f5c12d7fe50ce4c9c6de5">JSSnapshotDeliverSubjectInvalidErr</a></div><div class="ttdeci">@ JSSnapshotDeliverSubjectInvalidErr</div><div class="ttdoc">Deliver subject not valid.</div><div class="ttdef"><b>Definition:</b> status.h:150</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70ae7479c265d0e8cace4ab19a59cfcbbbb"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae7479c265d0e8cace4ab19a59cfcbbbb">JSClusterPeerNotMemberErr</a></div><div class="ttdeci">@ JSClusterPeerNotMemberErr</div><div class="ttdoc">Peer not a member.</div><div class="ttdef"><b>Definition:</b> status.h:175</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70ae9b8b81043fea45985f8c29f108594fb"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70ae9b8b81043fea45985f8c29f108594fb">JSClusterNoPeersErr</a></div><div class="ttdeci">@ JSClusterNoPeersErr</div><div class="ttdoc">No suitable peers for placement.</div><div class="ttdef"><b>Definition:</b> status.h:140</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70aea055a7802194f8f1e802a8fc461f83a"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aea055a7802194f8f1e802a8fc461f83a">JSStreamExternalDelPrefixOverlapsErr</a></div><div class="ttdeci">@ JSStreamExternalDelPrefixOverlapsErr</div><div class="ttdoc">Stream external delivery prefix overlaps with stream subject.</div><div class="ttdef"><b>Definition:</b> status.h:157</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70aea64a5a017836108cf3da113ad57b6f9"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aea64a5a017836108cf3da113ad57b6f9">JSClusterIncompleteErr</a></div><div class="ttdeci">@ JSClusterIncompleteErr</div><div class="ttdoc">Incomplete results.</div><div class="ttdef"><b>Definition:</b> status.h:139</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70aeaeb1f487667a8d7643cc97bf7b3892a"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aeaeb1f487667a8d7643cc97bf7b3892a">JSSourceConsumerSetupFailedErr</a></div><div class="ttdeci">@ JSSourceConsumerSetupFailedErr</div><div class="ttdoc">General source consumer setup failure.</div><div class="ttdef"><b>Definition:</b> status.h:180</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70af0506e3abc3846721ae15755c2a1eb47"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af0506e3abc3846721ae15755c2a1eb47">JSStreamInvalidErr</a></div><div class="ttdeci">@ JSStreamInvalidErr</div><div class="ttdoc">Stream not valid.</div><div class="ttdef"><b>Definition:</b> status.h:231</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70af1efbfa8ad648bf47b4304ea58b0df8c"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af1efbfa8ad648bf47b4304ea58b0df8c">JSClusterNotActiveErr</a></div><div class="ttdeci">@ JSClusterNotActiveErr</div><div class="ttdoc">JetStream not in clustered mode.</div><div class="ttdef"><b>Definition:</b> status.h:141</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70af68cc43ff7ed51f5557329c35fba949c"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af68cc43ff7ed51f5557329c35fba949c">JSStreamNameExistErr</a></div><div class="ttdeci">@ JSStreamNameExistErr</div><div class="ttdoc">Stream name already in use.</div><div class="ttdef"><b>Definition:</b> status.h:193</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70af7c1cf2c692140c4b28ebfc47acb0c41"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af7c1cf2c692140c4b28ebfc47acb0c41">JSConsumerMaxDeliverBackoffErr</a></div><div class="ttdeci">@ JSConsumerMaxDeliverBackoffErr</div><div class="ttdoc">Max deliver is required to be &gt; length of backoff values.</div><div class="ttdef"><b>Definition:</b> status.h:250</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70af86c9c188aaa34a76eee96de9bf6e989"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70af86c9c188aaa34a76eee96de9bf6e989">JSConsumerCreateErr</a></div><div class="ttdeci">@ JSConsumerCreateErr</div><div class="ttdoc">General consumer creation failure string.</div><div class="ttdef"><b>Definition:</b> status.h:147</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70afc70c6a72061d9c26017a5cf5dec729b"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70afc70c6a72061d9c26017a5cf5dec729b">JSConsumerDeliverCycleErr</a></div><div class="ttdeci">@ JSConsumerDeliverCycleErr</div><div class="ttdoc">Consumer deliver subject forms a cycle.</div><div class="ttdef"><b>Definition:</b> status.h:216</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70afcfb372eb2a607f821ad110815acf9d7"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70afcfb372eb2a607f821ad110815acf9d7">JSMirrorWithSubjectFiltersErr</a></div><div class="ttdeci">@ JSMirrorWithSubjectFiltersErr</div><div class="ttdoc">Stream mirrors can not contain filtered subjects.</div><div class="ttdef"><b>Definition:</b> status.h:168</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70afe9c20cdb1e88744d9a5f52977e95d1c"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70afe9c20cdb1e88744d9a5f52977e95d1c">JSNotEnabledErr</a></div><div class="ttdeci">@ JSNotEnabledErr</div><div class="ttdoc">JetStream not enabled.</div><div class="ttdef"><b>Definition:</b> status.h:211</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70aff9a4fe19078ac3e814989442beaa3a6"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70aff9a4fe19078ac3e814989442beaa3a6">JSConsumerDurableNameNotInSubjectErr</a></div><div class="ttdeci">@ JSConsumerDurableNameNotInSubjectErr</div><div class="ttdoc">Consumer expected to be durable but no durable name set in subject.</div><div class="ttdef"><b>Definition:</b> status.h:151</div></div>
+<div class="ttc" id="astatus_8h_html_a10731415ffcd3e2330df10c4d5fd3d70affa3c8139019a077fac6d403d7ed0522"><div class="ttname"><a href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70affa3c8139019a077fac6d403d7ed0522">JSStreamRollupFailedErr</a></div><div class="ttdeci">@ JSStreamRollupFailedErr</div><div class="ttdoc">Generic stream rollup failure.</div><div class="ttdef"><b>Definition:</b> status.h:245</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a></div><div class="ttdeci">natsStatus</div><div class="ttdoc">Status returned by most of the APIs.</div><div class="ttdef"><b>Definition:</b> status.h:50</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80a07fdbda44f43cef9866a75b25053c2ae"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a07fdbda44f43cef9866a75b25053c2ae">NATS_DRAINING</a></div><div class="ttdeci">@ NATS_DRAINING</div><div class="ttdef"><b>Definition:</b> status.h:122</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80a0aa3d1e18a2a217149fa8b1a306c9b08"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a0aa3d1e18a2a217149fa8b1a306c9b08">NATS_SECURE_CONNECTION_WANTED</a></div><div class="ttdeci">@ NATS_SECURE_CONNECTION_WANTED</div><div class="ttdef"><b>Definition:</b> status.h:66</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80a113ffbe9a1f243582c38ebd876cb736d"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a113ffbe9a1f243582c38ebd876cb736d">NATS_PROTOCOL_ERROR</a></div><div class="ttdeci">@ NATS_PROTOCOL_ERROR</div><div class="ttdef"><b>Definition:</b> status.h:54</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80a22fa4802a34bac497f23e269a20a52f2"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a22fa4802a34bac497f23e269a20a52f2">NATS_MISMATCH</a></div><div class="ttdeci">@ NATS_MISMATCH</div><div class="ttdoc">For JetStream subscriptions, it means that a consumer sequence mismatch was discovered.</div><div class="ttdef"><b>Definition:</b> status.h:129</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80a273e92a0ff3b7eaf946b4b7fa6cc6c6c"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a273e92a0ff3b7eaf946b4b7fa6cc6c6c">NATS_INVALID_SUBSCRIPTION</a></div><div class="ttdeci">@ NATS_INVALID_SUBSCRIPTION</div><div class="ttdef"><b>Definition:</b> status.h:84</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80a317fb9be1a80f6b1877f96a9a2db16ad"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a317fb9be1a80f6b1877f96a9a2db16ad">NATS_INSUFFICIENT_BUFFER</a></div><div class="ttdeci">@ NATS_INSUFFICIENT_BUFFER</div><div class="ttdoc">A buffer is not large enough to accommodate the data.</div><div class="ttdef"><b>Definition:</b> status.h:100</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80a37d80c8232775339a32805fe93e0ea7f"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a37d80c8232775339a32805fe93e0ea7f">NATS_MISSED_HEARTBEAT</a></div><div class="ttdeci">@ NATS_MISSED_HEARTBEAT</div><div class="ttdoc">For JetStream subscriptions, it means that the library detected that server heartbeats have been miss...</div><div class="ttdef"><b>Definition:</b> status.h:131</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80a40a08ae6ae17deaf390b1d0d7550791c"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a40a08ae6ae17deaf390b1d0d7550791c">NATS_ERR</a></div><div class="ttdeci">@ NATS_ERR</div><div class="ttdoc">Generic error.</div><div class="ttdef"><b>Definition:</b> status.h:53</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80a44e8b2590369fb01a1479719c97c2b6f"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a44e8b2590369fb01a1479719c97c2b6f">NATS_IO_ERROR</a></div><div class="ttdeci">@ NATS_IO_ERROR</div><div class="ttdoc">IO Error (network communication).</div><div class="ttdef"><b>Definition:</b> status.h:56</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80a47034d8889521bbd300f45fdc19e1127"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a47034d8889521bbd300f45fdc19e1127">NATS_NO_SERVER</a></div><div class="ttdeci">@ NATS_NO_SERVER</div><div class="ttdef"><b>Definition:</b> status.h:62</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80a473ea6cfa03490838fafee8730b48a2a"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a473ea6cfa03490838fafee8730b48a2a">NATS_CONNECTION_AUTH_FAILED</a></div><div class="ttdeci">@ NATS_CONNECTION_AUTH_FAILED</div><div class="ttdoc">The connection failed due to authentication error.</div><div class="ttdef"><b>Definition:</b> status.h:72</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80a476d7bcf9a593b749e435f20a9156eff"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a476d7bcf9a593b749e435f20a9156eff">NATS_CONNECTION_CLOSED</a></div><div class="ttdeci">@ NATS_CONNECTION_CLOSED</div><div class="ttdef"><b>Definition:</b> status.h:60</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80a49a1ea653ce112b3c53eedebcd60811d"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a49a1ea653ce112b3c53eedebcd60811d">NATS_NOT_YET_CONNECTED</a></div><div class="ttdeci">@ NATS_NOT_YET_CONNECTED</div><div class="ttdef"><b>Definition:</b> status.h:118</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80a62ff6f5cc64399631defc0119731b514"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a62ff6f5cc64399631defc0119731b514">NATS_NO_MEMORY</a></div><div class="ttdeci">@ NATS_NO_MEMORY</div><div class="ttdef"><b>Definition:</b> status.h:102</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80a71b57630aebf5c20eecdab832c2a9235"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a71b57630aebf5c20eecdab832c2a9235">NATS_INVALID_ARG</a></div><div class="ttdeci">@ NATS_INVALID_ARG</div><div class="ttdef"><b>Definition:</b> status.h:81</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80a790c08a7d33e3aefce07c04120c4c19e"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a790c08a7d33e3aefce07c04120c4c19e">NATS_INVALID_SUBJECT</a></div><div class="ttdeci">@ NATS_INVALID_SUBJECT</div><div class="ttdoc">Invalid subject, for instance NULL or empty string.</div><div class="ttdef"><b>Definition:</b> status.h:80</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80a7cb64f52c8d91d6ade3db6bc82a96c42"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a7cb64f52c8d91d6ade3db6bc82a96c42">NATS_FAILED_TO_INITIALIZE</a></div><div class="ttdeci">@ NATS_FAILED_TO_INITIALIZE</div><div class="ttdoc">The library failed to initialize.</div><div class="ttdef"><b>Definition:</b> status.h:110</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80a827072fc245a99a60691e1e4b173ca86"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a827072fc245a99a60691e1e4b173ca86">NATS_INVALID_TIMEOUT</a></div><div class="ttdeci">@ NATS_INVALID_TIMEOUT</div><div class="ttdoc">Timeout must be positive numbers.</div><div class="ttdef"><b>Definition:</b> status.h:86</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80a85c29dbfa6b06ffef3418cc9947ffff7"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a85c29dbfa6b06ffef3418cc9947ffff7">NATS_LINE_TOO_LONG</a></div><div class="ttdeci">@ NATS_LINE_TOO_LONG</div><div class="ttdef"><b>Definition:</b> status.h:57</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80a892183c32b4929388bb75dc62230ddf3"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a892183c32b4929388bb75dc62230ddf3">NATS_SSL_ERROR</a></div><div class="ttdeci">@ NATS_SSL_ERROR</div><div class="ttdef"><b>Definition:</b> status.h:113</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80a8a0d239cfdfa30fe730afea65941779b"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a8a0d239cfdfa30fe730afea65941779b">NATS_INVALID_QUEUE_NAME</a></div><div class="ttdeci">@ NATS_INVALID_QUEUE_NAME</div><div class="ttdoc">An invalid queue name was passed when creating a queue subscription.</div><div class="ttdef"><b>Definition:</b> status.h:125</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80a8a4e298931ba0698a72e397b1b57c885"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a8a4e298931ba0698a72e397b1b57c885">NATS_NO_SERVER_SUPPORT</a></div><div class="ttdeci">@ NATS_NO_SERVER_SUPPORT</div><div class="ttdoc">The server does not support this action.</div><div class="ttdef"><b>Definition:</b> status.h:116</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80a984189ec4cfe3e7647268c99f7e49ec9"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a984189ec4cfe3e7647268c99f7e49ec9">NATS_SYS_ERROR</a></div><div class="ttdeci">@ NATS_SYS_ERROR</div><div class="ttdoc">Some system function returned an error.</div><div class="ttdef"><b>Definition:</b> status.h:105</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80a9a6f40b7803639ac18bdf532e93e5ad5"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9a6f40b7803639ac18bdf532e93e5ad5">NATS_MAX_DELIVERED_MSGS</a></div><div class="ttdeci">@ NATS_MAX_DELIVERED_MSGS</div><div class="ttdef"><b>Definition:</b> status.h:97</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80a9bb78b4f245d2870040d25c450febd4b"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9bb78b4f245d2870040d25c450febd4b">NATS_ILLEGAL_STATE</a></div><div class="ttdeci">@ NATS_ILLEGAL_STATE</div><div class="ttdef"><b>Definition:</b> status.h:88</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990">NATS_OK</a></div><div class="ttdeci">@ NATS_OK</div><div class="ttdoc">Success.</div><div class="ttdef"><b>Definition:</b> status.h:51</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80aa76d5e3ce051bc7510be90e73663c93d"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80aa76d5e3ce051bc7510be90e73663c93d">NATS_STALE_CONNECTION</a></div><div class="ttdeci">@ NATS_STALE_CONNECTION</div><div class="ttdef"><b>Definition:</b> status.h:64</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80aab97324e40ccfe1360080c651c330e62"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80aab97324e40ccfe1360080c651c330e62">NATS_NO_RESPONDERS</a></div><div class="ttdeci">@ NATS_NO_RESPONDERS</div><div class="ttdoc">No responders were running when the server received the request.</div><div class="ttdef"><b>Definition:</b> status.h:127</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80ab88994c9ea9889ac4d9d656d62f550ed"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ab88994c9ea9889ac4d9d656d62f550ed">NATS_TIMEOUT</a></div><div class="ttdeci">@ NATS_TIMEOUT</div><div class="ttdef"><b>Definition:</b> status.h:107</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80abc76f1b31fdac4525583cc19588240dc"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80abc76f1b31fdac4525583cc19588240dc">NATS_SECURE_CONNECTION_REQUIRED</a></div><div class="ttdeci">@ NATS_SECURE_CONNECTION_REQUIRED</div><div class="ttdoc">The server expects a TLS connection.</div><div class="ttdef"><b>Definition:</b> status.h:68</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80abef517217119e8446a8e3382e1f37eb3"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80abef517217119e8446a8e3382e1f37eb3">NATS_CONNECTION_DISCONNECTED</a></div><div class="ttdeci">@ NATS_CONNECTION_DISCONNECTED</div><div class="ttdef"><b>Definition:</b> status.h:69</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80ac3abc147873fe999c86431f9222eebf5"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ac3abc147873fe999c86431f9222eebf5">NATS_NOT_PERMITTED</a></div><div class="ttdeci">@ NATS_NOT_PERMITTED</div><div class="ttdoc">The action is not permitted.</div><div class="ttdef"><b>Definition:</b> status.h:73</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80ad0229a12b17d3d12a28efed6213720d8"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ad0229a12b17d3d12a28efed6213720d8">NATS_NOT_FOUND</a></div><div class="ttdeci">@ NATS_NOT_FOUND</div><div class="ttdef"><b>Definition:</b> status.h:74</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80ae1d2c1366dbed428f6589f057acc507d"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ae1d2c1366dbed428f6589f057acc507d">NATS_ADDRESS_MISSING</a></div><div class="ttdeci">@ NATS_ADDRESS_MISSING</div><div class="ttdef"><b>Definition:</b> status.h:77</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80ae47047f2fac5f2f2a434fc501e5c3d4e"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ae47047f2fac5f2f2a434fc501e5c3d4e">NATS_NOT_INITIALIZED</a></div><div class="ttdeci">@ NATS_NOT_INITIALIZED</div><div class="ttdoc">The library is not yet initialized.</div><div class="ttdef"><b>Definition:</b> status.h:111</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80ae93ff5b7fe31f8570308385d92d317b0"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ae93ff5b7fe31f8570308385d92d317b0">NATS_SLOW_CONSUMER</a></div><div class="ttdeci">@ NATS_SLOW_CONSUMER</div><div class="ttdef"><b>Definition:</b> status.h:92</div></div>
+<div class="ttc" id="astatus_8h_html_a36c934157b663b7b5fb5d6609c897c80af820300473609092a3e97a71b5af9ff9"><div class="ttname"><a href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80af820300473609092a3e97a71b5af9ff9">NATS_MAX_PAYLOAD</a></div><div class="ttdeci">@ NATS_MAX_PAYLOAD</div><div class="ttdef"><b>Definition:</b> status.h:95</div></div>
+<div class="ttc" id="astatus_8h_html_a6d667c1f8dd289a7e0f39bf10e800b51"><div class="ttname"><a href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51">natsConnStatus</a></div><div class="ttdeci">natsConnStatus</div><div class="ttdoc">The connection state.</div><div class="ttdef"><b>Definition:</b> status.h:24</div></div>
+<div class="ttc" id="astatus_8h_html_a6d667c1f8dd289a7e0f39bf10e800b51a08f92960811d1ff05b91a0870b4ecb92"><div class="ttname"><a href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51a08f92960811d1ff05b91a0870b4ecb92">NATS_CONN_STATUS_DISCONNECTED</a></div><div class="ttdeci">@ NATS_CONN_STATUS_DISCONNECTED</div><div class="ttdoc">The connection has been disconnected.</div><div class="ttdef"><b>Definition:</b> status.h:37</div></div>
+<div class="ttc" id="astatus_8h_html_a6d667c1f8dd289a7e0f39bf10e800b51a0dafab74b55f98cfc1d00e4d1ef38725"><div class="ttname"><a href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51a0dafab74b55f98cfc1d00e4d1ef38725">NATS_CONN_STATUS_CONNECTED</a></div><div class="ttdeci">@ NATS_CONN_STATUS_CONNECTED</div><div class="ttdoc">The connection is connected.</div><div class="ttdef"><b>Definition:</b> status.h:39</div></div>
+<div class="ttc" id="astatus_8h_html_a6d667c1f8dd289a7e0f39bf10e800b51a7e4d95cb29122f06e17ca4aff55cc736"><div class="ttname"><a href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51a7e4d95cb29122f06e17ca4aff55cc736">NATS_CONN_STATUS_CONNECTING</a></div><div class="ttdeci">@ NATS_CONN_STATUS_CONNECTING</div><div class="ttdoc">The connection is in the process or connecting.</div><div class="ttdef"><b>Definition:</b> status.h:38</div></div>
+<div class="ttc" id="astatus_8h_html_a6d667c1f8dd289a7e0f39bf10e800b51aa78753a4de2d0379078bb09cdc1acdb2"><div class="ttname"><a href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51aa78753a4de2d0379078bb09cdc1acdb2">NATS_CONN_STATUS_CLOSED</a></div><div class="ttdeci">@ NATS_CONN_STATUS_CLOSED</div><div class="ttdoc">The connection is closed.</div><div class="ttdef"><b>Definition:</b> status.h:40</div></div>
+<div class="ttc" id="astatus_8h_html_a6d667c1f8dd289a7e0f39bf10e800b51ab6f9d121707673a61cbe2c591f64fbf1"><div class="ttname"><a href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51ab6f9d121707673a61cbe2c591f64fbf1">NATS_CONN_STATUS_DRAINING_SUBS</a></div><div class="ttdeci">@ NATS_CONN_STATUS_DRAINING_SUBS</div><div class="ttdoc">The connection is draining subscriptions.</div><div class="ttdef"><b>Definition:</b> status.h:42</div></div>
+<div class="ttc" id="astatus_8h_html_a6d667c1f8dd289a7e0f39bf10e800b51ac6b8b7f138f6ca285fe1f4da707b2100"><div class="ttname"><a href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51ac6b8b7f138f6ca285fe1f4da707b2100">NATS_CONN_STATUS_DRAINING_PUBS</a></div><div class="ttdeci">@ NATS_CONN_STATUS_DRAINING_PUBS</div><div class="ttdoc">The connection is draining publishers.</div><div class="ttdef"><b>Definition:</b> status.h:43</div></div>
+<div class="ttc" id="astatus_8h_html_a6d667c1f8dd289a7e0f39bf10e800b51acfdc4826e08ce4b59f901952038e9206"><div class="ttname"><a href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51acfdc4826e08ce4b59f901952038e9206">NATS_CONN_STATUS_RECONNECTING</a></div><div class="ttdeci">@ NATS_CONN_STATUS_RECONNECTING</div><div class="ttdoc">The connection is in the process or reconnecting.</div><div class="ttdef"><b>Definition:</b> status.h:41</div></div>
+</div><!-- fragment --></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="status_8h.html">status.h</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_a_p_i_stats-members.html b/doc/html/structjs_a_p_i_stats-members.html
new file mode 100644 (file)
index 0000000..32302f3
--- /dev/null
@@ -0,0 +1,114 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_a_p_i_stats.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsAPIStats Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_a_p_i_stats.html">jsAPIStats</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_a_p_i_stats.html#a84e85ad9d94dbe9afd1101388574255d">Errors</a></td><td class="entry"><a class="el" href="structjs_a_p_i_stats.html">jsAPIStats</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_a_p_i_stats.html#a1545170bebb347d0ea1254f51c3027cf">Total</a></td><td class="entry"><a class="el" href="structjs_a_p_i_stats.html">jsAPIStats</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_a_p_i_stats.html b/doc/html/structjs_a_p_i_stats.html
new file mode 100644 (file)
index 0000000..1e19c78
--- /dev/null
@@ -0,0 +1,157 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsAPIStats Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_a_p_i_stats.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_a_p_i_stats-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsAPIStats Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:a1545170bebb347d0ea1254f51c3027cf"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_a_p_i_stats.html#a1545170bebb347d0ea1254f51c3027cf">Total</a></td></tr>
+<tr class="separator:a1545170bebb347d0ea1254f51c3027cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a84e85ad9d94dbe9afd1101388574255d"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_a_p_i_stats.html#a84e85ad9d94dbe9afd1101388574255d">Errors</a></td></tr>
+<tr class="separator:a84e85ad9d94dbe9afd1101388574255d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >Reports on API calls to JetStream for this account. </p>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="a1545170bebb347d0ea1254f51c3027cf" name="a1545170bebb347d0ea1254f51c3027cf"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a1545170bebb347d0ea1254f51c3027cf">&#9670;&#160;</a></span>Total</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t jsAPIStats::Total</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a84e85ad9d94dbe9afd1101388574255d" name="a84e85ad9d94dbe9afd1101388574255d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a84e85ad9d94dbe9afd1101388574255d">&#9670;&#160;</a></span>Errors</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t jsAPIStats::Errors</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_a_p_i_stats.html">jsAPIStats</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_a_p_i_stats.js b/doc/html/structjs_a_p_i_stats.js
new file mode 100644 (file)
index 0000000..68b7e53
--- /dev/null
@@ -0,0 +1,5 @@
+var structjs_a_p_i_stats =
+[
+    [ "Total", "structjs_a_p_i_stats.html#a1545170bebb347d0ea1254f51c3027cf", null ],
+    [ "Errors", "structjs_a_p_i_stats.html#a84e85ad9d94dbe9afd1101388574255d", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_account_info-members.html b/doc/html/structjs_account_info-members.html
new file mode 100644 (file)
index 0000000..d85ea1a
--- /dev/null
@@ -0,0 +1,121 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_account_info.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsAccountInfo Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_account_info.html">jsAccountInfo</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_account_info.html#a94ab71c69b7883c2731ae8741ddc1e94">API</a></td><td class="entry"><a class="el" href="structjs_account_info.html">jsAccountInfo</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_account_info.html#a1237c3f19a42a3203825971b429312e9">Consumers</a></td><td class="entry"><a class="el" href="structjs_account_info.html">jsAccountInfo</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_account_info.html#ab6ba03298e1863132550b9b08d06048c">Domain</a></td><td class="entry"><a class="el" href="structjs_account_info.html">jsAccountInfo</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_account_info.html#aad93cf4bb6c1fbb09ae8545c03f315a9">Limits</a></td><td class="entry"><a class="el" href="structjs_account_info.html">jsAccountInfo</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_account_info.html#a448578d621e878267ad5f1792002a665">Memory</a></td><td class="entry"><a class="el" href="structjs_account_info.html">jsAccountInfo</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_account_info.html#ad1c254c5b8f11f57062a4e2d5fb10ae3">Store</a></td><td class="entry"><a class="el" href="structjs_account_info.html">jsAccountInfo</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_account_info.html#a17317abf03effdcdedc2003fca8adc71">Streams</a></td><td class="entry"><a class="el" href="structjs_account_info.html">jsAccountInfo</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_account_info.html#ab654d5c7456bb62df1808deb32a620fc">Tiers</a></td><td class="entry"><a class="el" href="structjs_account_info.html">jsAccountInfo</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_account_info.html#a21c14ca283400c684b18e61a534b6724">TiersLen</a></td><td class="entry"><a class="el" href="structjs_account_info.html">jsAccountInfo</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_account_info.html b/doc/html/structjs_account_info.html
new file mode 100644 (file)
index 0000000..85a379c
--- /dev/null
@@ -0,0 +1,269 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsAccountInfo Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_account_info.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_account_info-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsAccountInfo Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:a448578d621e878267ad5f1792002a665"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_account_info.html#a448578d621e878267ad5f1792002a665">Memory</a></td></tr>
+<tr class="separator:a448578d621e878267ad5f1792002a665"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ad1c254c5b8f11f57062a4e2d5fb10ae3"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_account_info.html#ad1c254c5b8f11f57062a4e2d5fb10ae3">Store</a></td></tr>
+<tr class="separator:ad1c254c5b8f11f57062a4e2d5fb10ae3"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a17317abf03effdcdedc2003fca8adc71"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_account_info.html#a17317abf03effdcdedc2003fca8adc71">Streams</a></td></tr>
+<tr class="separator:a17317abf03effdcdedc2003fca8adc71"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a1237c3f19a42a3203825971b429312e9"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_account_info.html#a1237c3f19a42a3203825971b429312e9">Consumers</a></td></tr>
+<tr class="separator:a1237c3f19a42a3203825971b429312e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ab6ba03298e1863132550b9b08d06048c"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_account_info.html#ab6ba03298e1863132550b9b08d06048c">Domain</a></td></tr>
+<tr class="separator:ab6ba03298e1863132550b9b08d06048c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a94ab71c69b7883c2731ae8741ddc1e94"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structjs_a_p_i_stats.html">jsAPIStats</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_account_info.html#a94ab71c69b7883c2731ae8741ddc1e94">API</a></td></tr>
+<tr class="separator:a94ab71c69b7883c2731ae8741ddc1e94"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aad93cf4bb6c1fbb09ae8545c03f315a9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structjs_account_limits.html">jsAccountLimits</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_account_info.html#aad93cf4bb6c1fbb09ae8545c03f315a9">Limits</a></td></tr>
+<tr class="separator:aad93cf4bb6c1fbb09ae8545c03f315a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ab654d5c7456bb62df1808deb32a620fc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structjs_tier.html">jsTier</a> **&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_account_info.html#ab654d5c7456bb62df1808deb32a620fc">Tiers</a></td></tr>
+<tr class="separator:ab654d5c7456bb62df1808deb32a620fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a21c14ca283400c684b18e61a534b6724"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_account_info.html#a21c14ca283400c684b18e61a534b6724">TiersLen</a></td></tr>
+<tr class="separator:a21c14ca283400c684b18e61a534b6724"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >Information about the JetStream usage from the current account. </p>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="a448578d621e878267ad5f1792002a665" name="a448578d621e878267ad5f1792002a665"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a448578d621e878267ad5f1792002a665">&#9670;&#160;</a></span>Memory</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t jsAccountInfo::Memory</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ad1c254c5b8f11f57062a4e2d5fb10ae3" name="ad1c254c5b8f11f57062a4e2d5fb10ae3"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ad1c254c5b8f11f57062a4e2d5fb10ae3">&#9670;&#160;</a></span>Store</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t jsAccountInfo::Store</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a17317abf03effdcdedc2003fca8adc71" name="a17317abf03effdcdedc2003fca8adc71"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a17317abf03effdcdedc2003fca8adc71">&#9670;&#160;</a></span>Streams</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsAccountInfo::Streams</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a1237c3f19a42a3203825971b429312e9" name="a1237c3f19a42a3203825971b429312e9"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a1237c3f19a42a3203825971b429312e9">&#9670;&#160;</a></span>Consumers</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsAccountInfo::Consumers</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ab6ba03298e1863132550b9b08d06048c" name="ab6ba03298e1863132550b9b08d06048c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ab6ba03298e1863132550b9b08d06048c">&#9670;&#160;</a></span>Domain</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">char* jsAccountInfo::Domain</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a94ab71c69b7883c2731ae8741ddc1e94" name="a94ab71c69b7883c2731ae8741ddc1e94"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a94ab71c69b7883c2731ae8741ddc1e94">&#9670;&#160;</a></span>API</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="structjs_a_p_i_stats.html">jsAPIStats</a> jsAccountInfo::API</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="aad93cf4bb6c1fbb09ae8545c03f315a9" name="aad93cf4bb6c1fbb09ae8545c03f315a9"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aad93cf4bb6c1fbb09ae8545c03f315a9">&#9670;&#160;</a></span>Limits</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="structjs_account_limits.html">jsAccountLimits</a> jsAccountInfo::Limits</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ab654d5c7456bb62df1808deb32a620fc" name="ab654d5c7456bb62df1808deb32a620fc"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ab654d5c7456bb62df1808deb32a620fc">&#9670;&#160;</a></span>Tiers</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="structjs_tier.html">jsTier</a>** jsAccountInfo::Tiers</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a21c14ca283400c684b18e61a534b6724" name="a21c14ca283400c684b18e61a534b6724"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a21c14ca283400c684b18e61a534b6724">&#9670;&#160;</a></span>TiersLen</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int jsAccountInfo::TiersLen</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_account_info.html">jsAccountInfo</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_account_info.js b/doc/html/structjs_account_info.js
new file mode 100644 (file)
index 0000000..87e377d
--- /dev/null
@@ -0,0 +1,12 @@
+var structjs_account_info =
+[
+    [ "Memory", "structjs_account_info.html#a448578d621e878267ad5f1792002a665", null ],
+    [ "Store", "structjs_account_info.html#ad1c254c5b8f11f57062a4e2d5fb10ae3", null ],
+    [ "Streams", "structjs_account_info.html#a17317abf03effdcdedc2003fca8adc71", null ],
+    [ "Consumers", "structjs_account_info.html#a1237c3f19a42a3203825971b429312e9", null ],
+    [ "Domain", "structjs_account_info.html#ab6ba03298e1863132550b9b08d06048c", null ],
+    [ "API", "structjs_account_info.html#a94ab71c69b7883c2731ae8741ddc1e94", null ],
+    [ "Limits", "structjs_account_info.html#aad93cf4bb6c1fbb09ae8545c03f315a9", null ],
+    [ "Tiers", "structjs_account_info.html#ab654d5c7456bb62df1808deb32a620fc", null ],
+    [ "TiersLen", "structjs_account_info.html#a21c14ca283400c684b18e61a534b6724", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_account_limits-members.html b/doc/html/structjs_account_limits-members.html
new file mode 100644 (file)
index 0000000..57ffab0
--- /dev/null
@@ -0,0 +1,120 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_account_limits.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsAccountLimits Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_account_limits.html">jsAccountLimits</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_account_limits.html#a4abf1972690c20d73bd314f2059e8013">MaxAckPending</a></td><td class="entry"><a class="el" href="structjs_account_limits.html">jsAccountLimits</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_account_limits.html#a858edf99ee1c60354bdba4e59293fb6a">MaxBytesRequired</a></td><td class="entry"><a class="el" href="structjs_account_limits.html">jsAccountLimits</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_account_limits.html#a6169f29101d51d48eed0803b719e6338">MaxConsumers</a></td><td class="entry"><a class="el" href="structjs_account_limits.html">jsAccountLimits</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_account_limits.html#a7bfc63e6f49ce724663ee534c5efdfa4">MaxMemory</a></td><td class="entry"><a class="el" href="structjs_account_limits.html">jsAccountLimits</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_account_limits.html#a6fff014c46739410ecf298b0cf643b30">MaxStore</a></td><td class="entry"><a class="el" href="structjs_account_limits.html">jsAccountLimits</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_account_limits.html#a4710a10950857a322c2a3ad6f946ded2">MaxStreams</a></td><td class="entry"><a class="el" href="structjs_account_limits.html">jsAccountLimits</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_account_limits.html#a38875d969274b0f0fcefc6b04ce56eb8">MemoryMaxStreamBytes</a></td><td class="entry"><a class="el" href="structjs_account_limits.html">jsAccountLimits</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_account_limits.html#a8cca06ab72b715c02a6a2c72b59f6a52">StoreMaxStreamBytes</a></td><td class="entry"><a class="el" href="structjs_account_limits.html">jsAccountLimits</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_account_limits.html b/doc/html/structjs_account_limits.html
new file mode 100644 (file)
index 0000000..cf70cff
--- /dev/null
@@ -0,0 +1,253 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsAccountLimits Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_account_limits.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_account_limits-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsAccountLimits Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:a7bfc63e6f49ce724663ee534c5efdfa4"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_account_limits.html#a7bfc63e6f49ce724663ee534c5efdfa4">MaxMemory</a></td></tr>
+<tr class="separator:a7bfc63e6f49ce724663ee534c5efdfa4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a6fff014c46739410ecf298b0cf643b30"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_account_limits.html#a6fff014c46739410ecf298b0cf643b30">MaxStore</a></td></tr>
+<tr class="separator:a6fff014c46739410ecf298b0cf643b30"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a4710a10950857a322c2a3ad6f946ded2"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_account_limits.html#a4710a10950857a322c2a3ad6f946ded2">MaxStreams</a></td></tr>
+<tr class="separator:a4710a10950857a322c2a3ad6f946ded2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a6169f29101d51d48eed0803b719e6338"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_account_limits.html#a6169f29101d51d48eed0803b719e6338">MaxConsumers</a></td></tr>
+<tr class="separator:a6169f29101d51d48eed0803b719e6338"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a4abf1972690c20d73bd314f2059e8013"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_account_limits.html#a4abf1972690c20d73bd314f2059e8013">MaxAckPending</a></td></tr>
+<tr class="separator:a4abf1972690c20d73bd314f2059e8013"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a38875d969274b0f0fcefc6b04ce56eb8"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_account_limits.html#a38875d969274b0f0fcefc6b04ce56eb8">MemoryMaxStreamBytes</a></td></tr>
+<tr class="separator:a38875d969274b0f0fcefc6b04ce56eb8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a8cca06ab72b715c02a6a2c72b59f6a52"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_account_limits.html#a8cca06ab72b715c02a6a2c72b59f6a52">StoreMaxStreamBytes</a></td></tr>
+<tr class="separator:a8cca06ab72b715c02a6a2c72b59f6a52"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a858edf99ee1c60354bdba4e59293fb6a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_account_limits.html#a858edf99ee1c60354bdba4e59293fb6a">MaxBytesRequired</a></td></tr>
+<tr class="separator:a858edf99ee1c60354bdba4e59293fb6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >Includes the JetStream limits of the current account. </p>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="a7bfc63e6f49ce724663ee534c5efdfa4" name="a7bfc63e6f49ce724663ee534c5efdfa4"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a7bfc63e6f49ce724663ee534c5efdfa4">&#9670;&#160;</a></span>MaxMemory</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsAccountLimits::MaxMemory</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a6fff014c46739410ecf298b0cf643b30" name="a6fff014c46739410ecf298b0cf643b30"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a6fff014c46739410ecf298b0cf643b30">&#9670;&#160;</a></span>MaxStore</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsAccountLimits::MaxStore</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a4710a10950857a322c2a3ad6f946ded2" name="a4710a10950857a322c2a3ad6f946ded2"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a4710a10950857a322c2a3ad6f946ded2">&#9670;&#160;</a></span>MaxStreams</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsAccountLimits::MaxStreams</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a6169f29101d51d48eed0803b719e6338" name="a6169f29101d51d48eed0803b719e6338"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a6169f29101d51d48eed0803b719e6338">&#9670;&#160;</a></span>MaxConsumers</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsAccountLimits::MaxConsumers</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a4abf1972690c20d73bd314f2059e8013" name="a4abf1972690c20d73bd314f2059e8013"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a4abf1972690c20d73bd314f2059e8013">&#9670;&#160;</a></span>MaxAckPending</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsAccountLimits::MaxAckPending</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a38875d969274b0f0fcefc6b04ce56eb8" name="a38875d969274b0f0fcefc6b04ce56eb8"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a38875d969274b0f0fcefc6b04ce56eb8">&#9670;&#160;</a></span>MemoryMaxStreamBytes</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsAccountLimits::MemoryMaxStreamBytes</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a8cca06ab72b715c02a6a2c72b59f6a52" name="a8cca06ab72b715c02a6a2c72b59f6a52"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a8cca06ab72b715c02a6a2c72b59f6a52">&#9670;&#160;</a></span>StoreMaxStreamBytes</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsAccountLimits::StoreMaxStreamBytes</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a858edf99ee1c60354bdba4e59293fb6a" name="a858edf99ee1c60354bdba4e59293fb6a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a858edf99ee1c60354bdba4e59293fb6a">&#9670;&#160;</a></span>MaxBytesRequired</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool jsAccountLimits::MaxBytesRequired</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_account_limits.html">jsAccountLimits</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_account_limits.js b/doc/html/structjs_account_limits.js
new file mode 100644 (file)
index 0000000..b539cd3
--- /dev/null
@@ -0,0 +1,11 @@
+var structjs_account_limits =
+[
+    [ "MaxMemory", "structjs_account_limits.html#a7bfc63e6f49ce724663ee534c5efdfa4", null ],
+    [ "MaxStore", "structjs_account_limits.html#a6fff014c46739410ecf298b0cf643b30", null ],
+    [ "MaxStreams", "structjs_account_limits.html#a4710a10950857a322c2a3ad6f946ded2", null ],
+    [ "MaxConsumers", "structjs_account_limits.html#a6169f29101d51d48eed0803b719e6338", null ],
+    [ "MaxAckPending", "structjs_account_limits.html#a4abf1972690c20d73bd314f2059e8013", null ],
+    [ "MemoryMaxStreamBytes", "structjs_account_limits.html#a38875d969274b0f0fcefc6b04ce56eb8", null ],
+    [ "StoreMaxStreamBytes", "structjs_account_limits.html#a8cca06ab72b715c02a6a2c72b59f6a52", null ],
+    [ "MaxBytesRequired", "structjs_account_limits.html#a858edf99ee1c60354bdba4e59293fb6a", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_cluster_info-members.html b/doc/html/structjs_cluster_info-members.html
new file mode 100644 (file)
index 0000000..79baef2
--- /dev/null
@@ -0,0 +1,116 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_cluster_info.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsClusterInfo Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_cluster_info.html">jsClusterInfo</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_cluster_info.html#af7d85652b52f56fa1eedce8f45fe6a19">Leader</a></td><td class="entry"><a class="el" href="structjs_cluster_info.html">jsClusterInfo</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_cluster_info.html#a2e13d7ec417574100c938c4df78e5484">Name</a></td><td class="entry"><a class="el" href="structjs_cluster_info.html">jsClusterInfo</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_cluster_info.html#a8dfcae3bc348a5b595b509e3f3d3500b">Replicas</a></td><td class="entry"><a class="el" href="structjs_cluster_info.html">jsClusterInfo</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_cluster_info.html#a237a639579def1345e02f1490a510ed5">ReplicasLen</a></td><td class="entry"><a class="el" href="structjs_cluster_info.html">jsClusterInfo</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_cluster_info.html b/doc/html/structjs_cluster_info.html
new file mode 100644 (file)
index 0000000..ebd16a7
--- /dev/null
@@ -0,0 +1,189 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsClusterInfo Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_cluster_info.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_cluster_info-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsClusterInfo Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:a2e13d7ec417574100c938c4df78e5484"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_cluster_info.html#a2e13d7ec417574100c938c4df78e5484">Name</a></td></tr>
+<tr class="separator:a2e13d7ec417574100c938c4df78e5484"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:af7d85652b52f56fa1eedce8f45fe6a19"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_cluster_info.html#af7d85652b52f56fa1eedce8f45fe6a19">Leader</a></td></tr>
+<tr class="separator:af7d85652b52f56fa1eedce8f45fe6a19"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a8dfcae3bc348a5b595b509e3f3d3500b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structjs_peer_info.html">jsPeerInfo</a> **&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_cluster_info.html#a8dfcae3bc348a5b595b509e3f3d3500b">Replicas</a></td></tr>
+<tr class="separator:a8dfcae3bc348a5b595b509e3f3d3500b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a237a639579def1345e02f1490a510ed5"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_cluster_info.html#a237a639579def1345e02f1490a510ed5">ReplicasLen</a></td></tr>
+<tr class="separator:a237a639579def1345e02f1490a510ed5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >Information about the underlying set of servers that make up the stream or consumer. </p>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="a2e13d7ec417574100c938c4df78e5484" name="a2e13d7ec417574100c938c4df78e5484"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a2e13d7ec417574100c938c4df78e5484">&#9670;&#160;</a></span>Name</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">char* jsClusterInfo::Name</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="af7d85652b52f56fa1eedce8f45fe6a19" name="af7d85652b52f56fa1eedce8f45fe6a19"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#af7d85652b52f56fa1eedce8f45fe6a19">&#9670;&#160;</a></span>Leader</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">char* jsClusterInfo::Leader</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a8dfcae3bc348a5b595b509e3f3d3500b" name="a8dfcae3bc348a5b595b509e3f3d3500b"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a8dfcae3bc348a5b595b509e3f3d3500b">&#9670;&#160;</a></span>Replicas</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="structjs_peer_info.html">jsPeerInfo</a>** jsClusterInfo::Replicas</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a237a639579def1345e02f1490a510ed5" name="a237a639579def1345e02f1490a510ed5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a237a639579def1345e02f1490a510ed5">&#9670;&#160;</a></span>ReplicasLen</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int jsClusterInfo::ReplicasLen</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_cluster_info.html">jsClusterInfo</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_cluster_info.js b/doc/html/structjs_cluster_info.js
new file mode 100644 (file)
index 0000000..d03f17e
--- /dev/null
@@ -0,0 +1,7 @@
+var structjs_cluster_info =
+[
+    [ "Name", "structjs_cluster_info.html#a2e13d7ec417574100c938c4df78e5484", null ],
+    [ "Leader", "structjs_cluster_info.html#af7d85652b52f56fa1eedce8f45fe6a19", null ],
+    [ "Replicas", "structjs_cluster_info.html#a8dfcae3bc348a5b595b509e3f3d3500b", null ],
+    [ "ReplicasLen", "structjs_cluster_info.html#a237a639579def1345e02f1490a510ed5", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_consumer_config-members.html b/doc/html/structjs_consumer_config-members.html
new file mode 100644 (file)
index 0000000..4ee77e3
--- /dev/null
@@ -0,0 +1,140 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_consumer_config.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsConsumerConfig Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_consumer_config.html#a8a311af614dfae1b0f4e4af7db467aab">AckPolicy</a></td><td class="entry"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_consumer_config.html#a651a94b9b78668dde830dc7869610e67">AckWait</a></td><td class="entry"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_consumer_config.html#aa2d0aff64a2c46122d0f0fe89e8ae011">BackOff</a></td><td class="entry"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_consumer_config.html#ad2f6ca3f2d0f977aedb8687c462c1cfc">BackOffLen</a></td><td class="entry"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_consumer_config.html#ae0765f3b5effe365187d3cf809c6ed3c">DeliverGroup</a></td><td class="entry"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_consumer_config.html#a364127e68bf0d3bf13efdc0b416667f4">DeliverPolicy</a></td><td class="entry"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_consumer_config.html#a95aa4184ed77f69b7674756572da1ded">DeliverSubject</a></td><td class="entry"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_consumer_config.html#a36a14d666d99bdade87a5e21a25491d6">Description</a></td><td class="entry"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_consumer_config.html#a36cf121162cf0b40edf051991d851ee0">Durable</a></td><td class="entry"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_consumer_config.html#af56ab7708b11e85e0b9115d152d281ca">FilterSubject</a></td><td class="entry"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_consumer_config.html#a484c64b6c54f6f758f54315470ed20d0">FlowControl</a></td><td class="entry"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_consumer_config.html#a30d4142bac47ab6dc583c5ee193704e6">HeadersOnly</a></td><td class="entry"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_consumer_config.html#ac439828c3bedb8826a1e92de13280d53">Heartbeat</a></td><td class="entry"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_consumer_config.html#af6376a6009124c25d7016bc548f3855d">InactiveThreshold</a></td><td class="entry"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_consumer_config.html#aeb2336d480e3885385d1b08410e89892">MaxAckPending</a></td><td class="entry"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_consumer_config.html#ad47e15e1d6a4a8b0b155f9d3d5873c95">MaxDeliver</a></td><td class="entry"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_consumer_config.html#a4e86deefe08854b9a82b4908397aad32">MaxRequestBatch</a></td><td class="entry"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_consumer_config.html#aa71aa3dfe5826466be301097b1bae04d">MaxRequestExpires</a></td><td class="entry"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_consumer_config.html#a74a026cdd92c538bcf84297f4468bb21">MaxRequestMaxBytes</a></td><td class="entry"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_consumer_config.html#a8472d49fae908ab0291b4d62c8411b76">MaxWaiting</a></td><td class="entry"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_consumer_config.html#a046177256938d6a601c629f9fd82f888">MemoryStorage</a></td><td class="entry"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_consumer_config.html#a201217d93cfed17eb4d3e2d9579b826a">Name</a></td><td class="entry"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_consumer_config.html#a2f0243899885dc97f304f48ca52b5356">OptStartSeq</a></td><td class="entry"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_consumer_config.html#a802ea3bf0669395bee28611f4ecede80">OptStartTime</a></td><td class="entry"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_consumer_config.html#a351b388a36ccb7978e6e85a6f4fc0816">RateLimit</a></td><td class="entry"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_consumer_config.html#ade510daf7c5d67553d2cd20b64ab9939">ReplayPolicy</a></td><td class="entry"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_consumer_config.html#acfba6d6ecb6323fd8ffe6c0bb4fbffae">Replicas</a></td><td class="entry"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_consumer_config.html#a43f40b8eef0074b4146fb945b4645584">SampleFrequency</a></td><td class="entry"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_consumer_config.html b/doc/html/structjs_consumer_config.html
new file mode 100644 (file)
index 0000000..dc67834
--- /dev/null
@@ -0,0 +1,600 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsConsumerConfig Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_consumer_config.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_consumer_config-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsConsumerConfig Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:a201217d93cfed17eb4d3e2d9579b826a"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_config.html#a201217d93cfed17eb4d3e2d9579b826a">Name</a></td></tr>
+<tr class="separator:a201217d93cfed17eb4d3e2d9579b826a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a36cf121162cf0b40edf051991d851ee0"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_config.html#a36cf121162cf0b40edf051991d851ee0">Durable</a></td></tr>
+<tr class="separator:a36cf121162cf0b40edf051991d851ee0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a36a14d666d99bdade87a5e21a25491d6"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_config.html#a36a14d666d99bdade87a5e21a25491d6">Description</a></td></tr>
+<tr class="separator:a36a14d666d99bdade87a5e21a25491d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a364127e68bf0d3bf13efdc0b416667f4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types_group.html#ga117ed2c35f89ef3144540ed9cbadc818">jsDeliverPolicy</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_config.html#a364127e68bf0d3bf13efdc0b416667f4">DeliverPolicy</a></td></tr>
+<tr class="separator:a364127e68bf0d3bf13efdc0b416667f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a2f0243899885dc97f304f48ca52b5356"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_config.html#a2f0243899885dc97f304f48ca52b5356">OptStartSeq</a></td></tr>
+<tr class="separator:a2f0243899885dc97f304f48ca52b5356"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a802ea3bf0669395bee28611f4ecede80"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_config.html#a802ea3bf0669395bee28611f4ecede80">OptStartTime</a></td></tr>
+<tr class="memdesc:a802ea3bf0669395bee28611f4ecede80"><td class="mdescLeft">&#160;</td><td class="mdescRight">UTC time expressed as number of nanoseconds since epoch.  <a href="structjs_consumer_config.html#a802ea3bf0669395bee28611f4ecede80">More...</a><br /></td></tr>
+<tr class="separator:a802ea3bf0669395bee28611f4ecede80"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a8a311af614dfae1b0f4e4af7db467aab"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types_group.html#ga8fcb50e6e7312834791f9e237d28e873">jsAckPolicy</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_config.html#a8a311af614dfae1b0f4e4af7db467aab">AckPolicy</a></td></tr>
+<tr class="separator:a8a311af614dfae1b0f4e4af7db467aab"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a651a94b9b78668dde830dc7869610e67"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_config.html#a651a94b9b78668dde830dc7869610e67">AckWait</a></td></tr>
+<tr class="separator:a651a94b9b78668dde830dc7869610e67"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ad47e15e1d6a4a8b0b155f9d3d5873c95"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_config.html#ad47e15e1d6a4a8b0b155f9d3d5873c95">MaxDeliver</a></td></tr>
+<tr class="separator:ad47e15e1d6a4a8b0b155f9d3d5873c95"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aa2d0aff64a2c46122d0f0fe89e8ae011"><td class="memItemLeft" align="right" valign="top">int64_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_config.html#aa2d0aff64a2c46122d0f0fe89e8ae011">BackOff</a></td></tr>
+<tr class="memdesc:aa2d0aff64a2c46122d0f0fe89e8ae011"><td class="mdescLeft">&#160;</td><td class="mdescRight">Redelivery durations expressed in nanoseconds.  <a href="structjs_consumer_config.html#aa2d0aff64a2c46122d0f0fe89e8ae011">More...</a><br /></td></tr>
+<tr class="separator:aa2d0aff64a2c46122d0f0fe89e8ae011"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ad2f6ca3f2d0f977aedb8687c462c1cfc"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_config.html#ad2f6ca3f2d0f977aedb8687c462c1cfc">BackOffLen</a></td></tr>
+<tr class="separator:ad2f6ca3f2d0f977aedb8687c462c1cfc"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:af56ab7708b11e85e0b9115d152d281ca"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_config.html#af56ab7708b11e85e0b9115d152d281ca">FilterSubject</a></td></tr>
+<tr class="separator:af56ab7708b11e85e0b9115d152d281ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ade510daf7c5d67553d2cd20b64ab9939"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types_group.html#ga8650faf52b0b6b23df376eebeb9d0354">jsReplayPolicy</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_config.html#ade510daf7c5d67553d2cd20b64ab9939">ReplayPolicy</a></td></tr>
+<tr class="separator:ade510daf7c5d67553d2cd20b64ab9939"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a351b388a36ccb7978e6e85a6f4fc0816"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_config.html#a351b388a36ccb7978e6e85a6f4fc0816">RateLimit</a></td></tr>
+<tr class="separator:a351b388a36ccb7978e6e85a6f4fc0816"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a43f40b8eef0074b4146fb945b4645584"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_config.html#a43f40b8eef0074b4146fb945b4645584">SampleFrequency</a></td></tr>
+<tr class="separator:a43f40b8eef0074b4146fb945b4645584"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a8472d49fae908ab0291b4d62c8411b76"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_config.html#a8472d49fae908ab0291b4d62c8411b76">MaxWaiting</a></td></tr>
+<tr class="separator:a8472d49fae908ab0291b4d62c8411b76"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aeb2336d480e3885385d1b08410e89892"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_config.html#aeb2336d480e3885385d1b08410e89892">MaxAckPending</a></td></tr>
+<tr class="separator:aeb2336d480e3885385d1b08410e89892"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a484c64b6c54f6f758f54315470ed20d0"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_config.html#a484c64b6c54f6f758f54315470ed20d0">FlowControl</a></td></tr>
+<tr class="separator:a484c64b6c54f6f758f54315470ed20d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ac439828c3bedb8826a1e92de13280d53"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_config.html#ac439828c3bedb8826a1e92de13280d53">Heartbeat</a></td></tr>
+<tr class="memdesc:ac439828c3bedb8826a1e92de13280d53"><td class="mdescLeft">&#160;</td><td class="mdescRight">Heartbeat interval expressed in number of nanoseconds.  <a href="structjs_consumer_config.html#ac439828c3bedb8826a1e92de13280d53">More...</a><br /></td></tr>
+<tr class="separator:ac439828c3bedb8826a1e92de13280d53"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a30d4142bac47ab6dc583c5ee193704e6"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_config.html#a30d4142bac47ab6dc583c5ee193704e6">HeadersOnly</a></td></tr>
+<tr class="separator:a30d4142bac47ab6dc583c5ee193704e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a4e86deefe08854b9a82b4908397aad32"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_config.html#a4e86deefe08854b9a82b4908397aad32">MaxRequestBatch</a></td></tr>
+<tr class="memdesc:a4e86deefe08854b9a82b4908397aad32"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum Pull Consumer request batch size.  <a href="structjs_consumer_config.html#a4e86deefe08854b9a82b4908397aad32">More...</a><br /></td></tr>
+<tr class="separator:a4e86deefe08854b9a82b4908397aad32"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aa71aa3dfe5826466be301097b1bae04d"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_config.html#aa71aa3dfe5826466be301097b1bae04d">MaxRequestExpires</a></td></tr>
+<tr class="memdesc:aa71aa3dfe5826466be301097b1bae04d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum Pull Consumer request expiration, expressed in number of nanoseconds.  <a href="structjs_consumer_config.html#aa71aa3dfe5826466be301097b1bae04d">More...</a><br /></td></tr>
+<tr class="separator:aa71aa3dfe5826466be301097b1bae04d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a74a026cdd92c538bcf84297f4468bb21"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_config.html#a74a026cdd92c538bcf84297f4468bb21">MaxRequestMaxBytes</a></td></tr>
+<tr class="memdesc:a74a026cdd92c538bcf84297f4468bb21"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum Pull Consumer request maximum bytes.  <a href="structjs_consumer_config.html#a74a026cdd92c538bcf84297f4468bb21">More...</a><br /></td></tr>
+<tr class="separator:a74a026cdd92c538bcf84297f4468bb21"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a95aa4184ed77f69b7674756572da1ded"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_config.html#a95aa4184ed77f69b7674756572da1ded">DeliverSubject</a></td></tr>
+<tr class="separator:a95aa4184ed77f69b7674756572da1ded"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ae0765f3b5effe365187d3cf809c6ed3c"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_config.html#ae0765f3b5effe365187d3cf809c6ed3c">DeliverGroup</a></td></tr>
+<tr class="separator:ae0765f3b5effe365187d3cf809c6ed3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:af6376a6009124c25d7016bc548f3855d"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_config.html#af6376a6009124c25d7016bc548f3855d">InactiveThreshold</a></td></tr>
+<tr class="memdesc:af6376a6009124c25d7016bc548f3855d"><td class="mdescLeft">&#160;</td><td class="mdescRight">How long the server keeps an ephemeral after detecting loss of interest, expressed in number of nanoseconds.  <a href="structjs_consumer_config.html#af6376a6009124c25d7016bc548f3855d">More...</a><br /></td></tr>
+<tr class="separator:af6376a6009124c25d7016bc548f3855d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:acfba6d6ecb6323fd8ffe6c0bb4fbffae"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_config.html#acfba6d6ecb6323fd8ffe6c0bb4fbffae">Replicas</a></td></tr>
+<tr class="separator:acfba6d6ecb6323fd8ffe6c0bb4fbffae"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a046177256938d6a601c629f9fd82f888"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_config.html#a046177256938d6a601c629f9fd82f888">MemoryStorage</a></td></tr>
+<tr class="separator:a046177256938d6a601c629f9fd82f888"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >Configuration of a JetStream consumer.</p>
+<p >In order to add a consumer, a configuration needs to be set. The typical usage would be to initialize all required objects on the stack and configure them, then pass the pointer to the configuration to <a class="el" href="group__js_assets_group.html#gaf2efb63db150e782d9007090b49d4115" title="Adds a JetStream consumer.">js_AddConsumer</a>.</p>
+<dl class="section note"><dt>Note</dt><dd><code>OptStartTime</code> needs to be expressed as the number of nanoseconds passed since 00:00:00 UTC Thursday, 1 January 1970.</dd>
+<dd>
+The strings are applications owned and will not be freed by the library.</dd>
+<dd>
+<code>SampleFrequency</code> is a sampling value, represented as a string such as "50" for 50%, that causes the server to produce advisories for consumer ack metrics.</dd>
+<dd>
+<code>Durable</code> cannot contain the character ".".</dd>
+<dd>
+<code>HeadersOnly</code> means that the subscription will not receive any message payload, instead, it will receive only messages headers (if present) with the addition of the header <a class="el" href="nats_8h.html#a5ce9005964bd9cf0604a9ef1afa87ea4" title="Message header for JetStream messages representing the message payload size.">JSMsgSize</a> ("Nats-Msg-Size"), whose value is the payload size.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__js_assets_group.html#ga3381bb05c05bf4a8979adde68d37dd66" title="Initializes a consumer configuration structure.">jsConsumerConfig_Init</a></dd></dl>
+<div class="fragment"><div class="line">jsConsumerInfo   *ci = NULL;</div>
+<div class="line">jsConsumerConfig cc;</div>
+<div class="line"> </div>
+<div class="line">jsConsumerConfig_Init(&amp;cc);</div>
+<div class="line">cc.Durable = &quot;MY_DURABLE&quot;;</div>
+<div class="line">cc.DeliverSubject = &quot;foo&quot;;</div>
+<div class="line">cc.DeliverPolicy = js_DeliverNew;</div>
+<div class="line"> </div>
+<div class="line">s = js_AddConsumer(&amp;ci, js, &amp;cc, NULL, &amp;jerr);</div>
+</div><!-- fragment --> </div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="a201217d93cfed17eb4d3e2d9579b826a" name="a201217d93cfed17eb4d3e2d9579b826a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a201217d93cfed17eb4d3e2d9579b826a">&#9670;&#160;</a></span>Name</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* jsConsumerConfig::Name</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a36cf121162cf0b40edf051991d851ee0" name="a36cf121162cf0b40edf051991d851ee0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a36cf121162cf0b40edf051991d851ee0">&#9670;&#160;</a></span>Durable</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* jsConsumerConfig::Durable</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a36a14d666d99bdade87a5e21a25491d6" name="a36a14d666d99bdade87a5e21a25491d6"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a36a14d666d99bdade87a5e21a25491d6">&#9670;&#160;</a></span>Description</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* jsConsumerConfig::Description</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a364127e68bf0d3bf13efdc0b416667f4" name="a364127e68bf0d3bf13efdc0b416667f4"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a364127e68bf0d3bf13efdc0b416667f4">&#9670;&#160;</a></span>DeliverPolicy</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="group__types_group.html#ga117ed2c35f89ef3144540ed9cbadc818">jsDeliverPolicy</a> jsConsumerConfig::DeliverPolicy</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a2f0243899885dc97f304f48ca52b5356" name="a2f0243899885dc97f304f48ca52b5356"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a2f0243899885dc97f304f48ca52b5356">&#9670;&#160;</a></span>OptStartSeq</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t jsConsumerConfig::OptStartSeq</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a802ea3bf0669395bee28611f4ecede80" name="a802ea3bf0669395bee28611f4ecede80"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a802ea3bf0669395bee28611f4ecede80">&#9670;&#160;</a></span>OptStartTime</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsConsumerConfig::OptStartTime</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a8a311af614dfae1b0f4e4af7db467aab" name="a8a311af614dfae1b0f4e4af7db467aab"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a8a311af614dfae1b0f4e4af7db467aab">&#9670;&#160;</a></span>AckPolicy</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="group__types_group.html#ga8fcb50e6e7312834791f9e237d28e873">jsAckPolicy</a> jsConsumerConfig::AckPolicy</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a651a94b9b78668dde830dc7869610e67" name="a651a94b9b78668dde830dc7869610e67"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a651a94b9b78668dde830dc7869610e67">&#9670;&#160;</a></span>AckWait</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsConsumerConfig::AckWait</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ad47e15e1d6a4a8b0b155f9d3d5873c95" name="ad47e15e1d6a4a8b0b155f9d3d5873c95"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ad47e15e1d6a4a8b0b155f9d3d5873c95">&#9670;&#160;</a></span>MaxDeliver</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsConsumerConfig::MaxDeliver</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="aa2d0aff64a2c46122d0f0fe89e8ae011" name="aa2d0aff64a2c46122d0f0fe89e8ae011"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aa2d0aff64a2c46122d0f0fe89e8ae011">&#9670;&#160;</a></span>BackOff</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t* jsConsumerConfig::BackOff</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ad2f6ca3f2d0f977aedb8687c462c1cfc" name="ad2f6ca3f2d0f977aedb8687c462c1cfc"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ad2f6ca3f2d0f977aedb8687c462c1cfc">&#9670;&#160;</a></span>BackOffLen</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int jsConsumerConfig::BackOffLen</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="af56ab7708b11e85e0b9115d152d281ca" name="af56ab7708b11e85e0b9115d152d281ca"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#af56ab7708b11e85e0b9115d152d281ca">&#9670;&#160;</a></span>FilterSubject</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* jsConsumerConfig::FilterSubject</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ade510daf7c5d67553d2cd20b64ab9939" name="ade510daf7c5d67553d2cd20b64ab9939"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ade510daf7c5d67553d2cd20b64ab9939">&#9670;&#160;</a></span>ReplayPolicy</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="group__types_group.html#ga8650faf52b0b6b23df376eebeb9d0354">jsReplayPolicy</a> jsConsumerConfig::ReplayPolicy</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a351b388a36ccb7978e6e85a6f4fc0816" name="a351b388a36ccb7978e6e85a6f4fc0816"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a351b388a36ccb7978e6e85a6f4fc0816">&#9670;&#160;</a></span>RateLimit</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t jsConsumerConfig::RateLimit</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a43f40b8eef0074b4146fb945b4645584" name="a43f40b8eef0074b4146fb945b4645584"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a43f40b8eef0074b4146fb945b4645584">&#9670;&#160;</a></span>SampleFrequency</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* jsConsumerConfig::SampleFrequency</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a8472d49fae908ab0291b4d62c8411b76" name="a8472d49fae908ab0291b4d62c8411b76"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a8472d49fae908ab0291b4d62c8411b76">&#9670;&#160;</a></span>MaxWaiting</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsConsumerConfig::MaxWaiting</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="aeb2336d480e3885385d1b08410e89892" name="aeb2336d480e3885385d1b08410e89892"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aeb2336d480e3885385d1b08410e89892">&#9670;&#160;</a></span>MaxAckPending</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsConsumerConfig::MaxAckPending</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a484c64b6c54f6f758f54315470ed20d0" name="a484c64b6c54f6f758f54315470ed20d0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a484c64b6c54f6f758f54315470ed20d0">&#9670;&#160;</a></span>FlowControl</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool jsConsumerConfig::FlowControl</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ac439828c3bedb8826a1e92de13280d53" name="ac439828c3bedb8826a1e92de13280d53"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ac439828c3bedb8826a1e92de13280d53">&#9670;&#160;</a></span>Heartbeat</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsConsumerConfig::Heartbeat</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a30d4142bac47ab6dc583c5ee193704e6" name="a30d4142bac47ab6dc583c5ee193704e6"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a30d4142bac47ab6dc583c5ee193704e6">&#9670;&#160;</a></span>HeadersOnly</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool jsConsumerConfig::HeadersOnly</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a4e86deefe08854b9a82b4908397aad32" name="a4e86deefe08854b9a82b4908397aad32"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a4e86deefe08854b9a82b4908397aad32">&#9670;&#160;</a></span>MaxRequestBatch</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsConsumerConfig::MaxRequestBatch</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="aa71aa3dfe5826466be301097b1bae04d" name="aa71aa3dfe5826466be301097b1bae04d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aa71aa3dfe5826466be301097b1bae04d">&#9670;&#160;</a></span>MaxRequestExpires</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsConsumerConfig::MaxRequestExpires</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a74a026cdd92c538bcf84297f4468bb21" name="a74a026cdd92c538bcf84297f4468bb21"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a74a026cdd92c538bcf84297f4468bb21">&#9670;&#160;</a></span>MaxRequestMaxBytes</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsConsumerConfig::MaxRequestMaxBytes</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a95aa4184ed77f69b7674756572da1ded" name="a95aa4184ed77f69b7674756572da1ded"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a95aa4184ed77f69b7674756572da1ded">&#9670;&#160;</a></span>DeliverSubject</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* jsConsumerConfig::DeliverSubject</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ae0765f3b5effe365187d3cf809c6ed3c" name="ae0765f3b5effe365187d3cf809c6ed3c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ae0765f3b5effe365187d3cf809c6ed3c">&#9670;&#160;</a></span>DeliverGroup</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* jsConsumerConfig::DeliverGroup</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="af6376a6009124c25d7016bc548f3855d" name="af6376a6009124c25d7016bc548f3855d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#af6376a6009124c25d7016bc548f3855d">&#9670;&#160;</a></span>InactiveThreshold</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsConsumerConfig::InactiveThreshold</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="acfba6d6ecb6323fd8ffe6c0bb4fbffae" name="acfba6d6ecb6323fd8ffe6c0bb4fbffae"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#acfba6d6ecb6323fd8ffe6c0bb4fbffae">&#9670;&#160;</a></span>Replicas</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsConsumerConfig::Replicas</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a046177256938d6a601c629f9fd82f888" name="a046177256938d6a601c629f9fd82f888"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a046177256938d6a601c629f9fd82f888">&#9670;&#160;</a></span>MemoryStorage</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool jsConsumerConfig::MemoryStorage</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_consumer_config.js b/doc/html/structjs_consumer_config.js
new file mode 100644 (file)
index 0000000..b280317
--- /dev/null
@@ -0,0 +1,31 @@
+var structjs_consumer_config =
+[
+    [ "Name", "structjs_consumer_config.html#a201217d93cfed17eb4d3e2d9579b826a", null ],
+    [ "Durable", "structjs_consumer_config.html#a36cf121162cf0b40edf051991d851ee0", null ],
+    [ "Description", "structjs_consumer_config.html#a36a14d666d99bdade87a5e21a25491d6", null ],
+    [ "DeliverPolicy", "structjs_consumer_config.html#a364127e68bf0d3bf13efdc0b416667f4", null ],
+    [ "OptStartSeq", "structjs_consumer_config.html#a2f0243899885dc97f304f48ca52b5356", null ],
+    [ "OptStartTime", "structjs_consumer_config.html#a802ea3bf0669395bee28611f4ecede80", null ],
+    [ "AckPolicy", "structjs_consumer_config.html#a8a311af614dfae1b0f4e4af7db467aab", null ],
+    [ "AckWait", "structjs_consumer_config.html#a651a94b9b78668dde830dc7869610e67", null ],
+    [ "MaxDeliver", "structjs_consumer_config.html#ad47e15e1d6a4a8b0b155f9d3d5873c95", null ],
+    [ "BackOff", "structjs_consumer_config.html#aa2d0aff64a2c46122d0f0fe89e8ae011", null ],
+    [ "BackOffLen", "structjs_consumer_config.html#ad2f6ca3f2d0f977aedb8687c462c1cfc", null ],
+    [ "FilterSubject", "structjs_consumer_config.html#af56ab7708b11e85e0b9115d152d281ca", null ],
+    [ "ReplayPolicy", "structjs_consumer_config.html#ade510daf7c5d67553d2cd20b64ab9939", null ],
+    [ "RateLimit", "structjs_consumer_config.html#a351b388a36ccb7978e6e85a6f4fc0816", null ],
+    [ "SampleFrequency", "structjs_consumer_config.html#a43f40b8eef0074b4146fb945b4645584", null ],
+    [ "MaxWaiting", "structjs_consumer_config.html#a8472d49fae908ab0291b4d62c8411b76", null ],
+    [ "MaxAckPending", "structjs_consumer_config.html#aeb2336d480e3885385d1b08410e89892", null ],
+    [ "FlowControl", "structjs_consumer_config.html#a484c64b6c54f6f758f54315470ed20d0", null ],
+    [ "Heartbeat", "structjs_consumer_config.html#ac439828c3bedb8826a1e92de13280d53", null ],
+    [ "HeadersOnly", "structjs_consumer_config.html#a30d4142bac47ab6dc583c5ee193704e6", null ],
+    [ "MaxRequestBatch", "structjs_consumer_config.html#a4e86deefe08854b9a82b4908397aad32", null ],
+    [ "MaxRequestExpires", "structjs_consumer_config.html#aa71aa3dfe5826466be301097b1bae04d", null ],
+    [ "MaxRequestMaxBytes", "structjs_consumer_config.html#a74a026cdd92c538bcf84297f4468bb21", null ],
+    [ "DeliverSubject", "structjs_consumer_config.html#a95aa4184ed77f69b7674756572da1ded", null ],
+    [ "DeliverGroup", "structjs_consumer_config.html#ae0765f3b5effe365187d3cf809c6ed3c", null ],
+    [ "InactiveThreshold", "structjs_consumer_config.html#af6376a6009124c25d7016bc548f3855d", null ],
+    [ "Replicas", "structjs_consumer_config.html#acfba6d6ecb6323fd8ffe6c0bb4fbffae", null ],
+    [ "MemoryStorage", "structjs_consumer_config.html#a046177256938d6a601c629f9fd82f888", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_consumer_info-members.html b/doc/html/structjs_consumer_info-members.html
new file mode 100644 (file)
index 0000000..a76b972
--- /dev/null
@@ -0,0 +1,124 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_consumer_info.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsConsumerInfo Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_consumer_info.html#ab69c36ae092df9b0663b675a5abbab55">AckFloor</a></td><td class="entry"><a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_consumer_info.html#a6f4401563a9fd102226d82cdc6136e32">Cluster</a></td><td class="entry"><a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_consumer_info.html#a2f63940ca1f024ad3840418c2f6a1ae1">Config</a></td><td class="entry"><a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_consumer_info.html#a670d38f2e9ba5c354ca3560a8064d00c">Created</a></td><td class="entry"><a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_consumer_info.html#a15f2d68fbf126acc1907ba9462ad9ee9">Delivered</a></td><td class="entry"><a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_consumer_info.html#a9359aea7cd05a27b2a15f8a35cdb1008">Name</a></td><td class="entry"><a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_consumer_info.html#a882bebeb7af80fcce088afdf2c98de50">NumAckPending</a></td><td class="entry"><a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_consumer_info.html#aeaefd5a500996013b1ce13d8872e869b">NumPending</a></td><td class="entry"><a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_consumer_info.html#a932bf14ebb9ce167af8975e3b1f8d001">NumRedelivered</a></td><td class="entry"><a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_consumer_info.html#a57e4a4139310c50a1f3d51af67197af0">NumWaiting</a></td><td class="entry"><a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_consumer_info.html#a31282cdc72000a91af03f89899740bfa">PushBound</a></td><td class="entry"><a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_consumer_info.html#a8f21939613163a7c0ebfb521aa471260">Stream</a></td><td class="entry"><a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_consumer_info.html b/doc/html/structjs_consumer_info.html
new file mode 100644 (file)
index 0000000..5ef38a1
--- /dev/null
@@ -0,0 +1,319 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsConsumerInfo Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_consumer_info.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_consumer_info-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsConsumerInfo Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:a8f21939613163a7c0ebfb521aa471260"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_info.html#a8f21939613163a7c0ebfb521aa471260">Stream</a></td></tr>
+<tr class="separator:a8f21939613163a7c0ebfb521aa471260"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a9359aea7cd05a27b2a15f8a35cdb1008"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_info.html#a9359aea7cd05a27b2a15f8a35cdb1008">Name</a></td></tr>
+<tr class="separator:a9359aea7cd05a27b2a15f8a35cdb1008"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a670d38f2e9ba5c354ca3560a8064d00c"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_info.html#a670d38f2e9ba5c354ca3560a8064d00c">Created</a></td></tr>
+<tr class="memdesc:a670d38f2e9ba5c354ca3560a8064d00c"><td class="mdescLeft">&#160;</td><td class="mdescRight">UTC time expressed as number of nanoseconds since epoch.  <a href="structjs_consumer_info.html#a670d38f2e9ba5c354ca3560a8064d00c">More...</a><br /></td></tr>
+<tr class="separator:a670d38f2e9ba5c354ca3560a8064d00c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a2f63940ca1f024ad3840418c2f6a1ae1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_info.html#a2f63940ca1f024ad3840418c2f6a1ae1">Config</a></td></tr>
+<tr class="separator:a2f63940ca1f024ad3840418c2f6a1ae1"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a15f2d68fbf126acc1907ba9462ad9ee9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structjs_sequence_info.html">jsSequenceInfo</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_info.html#a15f2d68fbf126acc1907ba9462ad9ee9">Delivered</a></td></tr>
+<tr class="separator:a15f2d68fbf126acc1907ba9462ad9ee9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ab69c36ae092df9b0663b675a5abbab55"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structjs_sequence_info.html">jsSequenceInfo</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_info.html#ab69c36ae092df9b0663b675a5abbab55">AckFloor</a></td></tr>
+<tr class="separator:ab69c36ae092df9b0663b675a5abbab55"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a882bebeb7af80fcce088afdf2c98de50"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_info.html#a882bebeb7af80fcce088afdf2c98de50">NumAckPending</a></td></tr>
+<tr class="separator:a882bebeb7af80fcce088afdf2c98de50"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a932bf14ebb9ce167af8975e3b1f8d001"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_info.html#a932bf14ebb9ce167af8975e3b1f8d001">NumRedelivered</a></td></tr>
+<tr class="separator:a932bf14ebb9ce167af8975e3b1f8d001"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a57e4a4139310c50a1f3d51af67197af0"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_info.html#a57e4a4139310c50a1f3d51af67197af0">NumWaiting</a></td></tr>
+<tr class="separator:a57e4a4139310c50a1f3d51af67197af0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aeaefd5a500996013b1ce13d8872e869b"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_info.html#aeaefd5a500996013b1ce13d8872e869b">NumPending</a></td></tr>
+<tr class="separator:aeaefd5a500996013b1ce13d8872e869b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a6f4401563a9fd102226d82cdc6136e32"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structjs_cluster_info.html">jsClusterInfo</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_info.html#a6f4401563a9fd102226d82cdc6136e32">Cluster</a></td></tr>
+<tr class="separator:a6f4401563a9fd102226d82cdc6136e32"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a31282cdc72000a91af03f89899740bfa"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_info.html#a31282cdc72000a91af03f89899740bfa">PushBound</a></td></tr>
+<tr class="separator:a31282cdc72000a91af03f89899740bfa"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >Configuration and current state for this consumer.</p>
+<dl class="section note"><dt>Note</dt><dd><code>Created</code> is the timestamp when the consumer was created, expressed as the number of nanoseconds passed since 00:00:00 UTC Thursday, 1 January 1970. </dd></dl>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="a8f21939613163a7c0ebfb521aa471260" name="a8f21939613163a7c0ebfb521aa471260"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a8f21939613163a7c0ebfb521aa471260">&#9670;&#160;</a></span>Stream</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">char* jsConsumerInfo::Stream</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a9359aea7cd05a27b2a15f8a35cdb1008" name="a9359aea7cd05a27b2a15f8a35cdb1008"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a9359aea7cd05a27b2a15f8a35cdb1008">&#9670;&#160;</a></span>Name</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">char* jsConsumerInfo::Name</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a670d38f2e9ba5c354ca3560a8064d00c" name="a670d38f2e9ba5c354ca3560a8064d00c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a670d38f2e9ba5c354ca3560a8064d00c">&#9670;&#160;</a></span>Created</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsConsumerInfo::Created</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a2f63940ca1f024ad3840418c2f6a1ae1" name="a2f63940ca1f024ad3840418c2f6a1ae1"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a2f63940ca1f024ad3840418c2f6a1ae1">&#9670;&#160;</a></span>Config</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a>* jsConsumerInfo::Config</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a15f2d68fbf126acc1907ba9462ad9ee9" name="a15f2d68fbf126acc1907ba9462ad9ee9"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a15f2d68fbf126acc1907ba9462ad9ee9">&#9670;&#160;</a></span>Delivered</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="structjs_sequence_info.html">jsSequenceInfo</a> jsConsumerInfo::Delivered</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ab69c36ae092df9b0663b675a5abbab55" name="ab69c36ae092df9b0663b675a5abbab55"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ab69c36ae092df9b0663b675a5abbab55">&#9670;&#160;</a></span>AckFloor</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="structjs_sequence_info.html">jsSequenceInfo</a> jsConsumerInfo::AckFloor</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a882bebeb7af80fcce088afdf2c98de50" name="a882bebeb7af80fcce088afdf2c98de50"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a882bebeb7af80fcce088afdf2c98de50">&#9670;&#160;</a></span>NumAckPending</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsConsumerInfo::NumAckPending</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a932bf14ebb9ce167af8975e3b1f8d001" name="a932bf14ebb9ce167af8975e3b1f8d001"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a932bf14ebb9ce167af8975e3b1f8d001">&#9670;&#160;</a></span>NumRedelivered</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsConsumerInfo::NumRedelivered</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a57e4a4139310c50a1f3d51af67197af0" name="a57e4a4139310c50a1f3d51af67197af0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a57e4a4139310c50a1f3d51af67197af0">&#9670;&#160;</a></span>NumWaiting</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsConsumerInfo::NumWaiting</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="aeaefd5a500996013b1ce13d8872e869b" name="aeaefd5a500996013b1ce13d8872e869b"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aeaefd5a500996013b1ce13d8872e869b">&#9670;&#160;</a></span>NumPending</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t jsConsumerInfo::NumPending</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a6f4401563a9fd102226d82cdc6136e32" name="a6f4401563a9fd102226d82cdc6136e32"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a6f4401563a9fd102226d82cdc6136e32">&#9670;&#160;</a></span>Cluster</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="structjs_cluster_info.html">jsClusterInfo</a>* jsConsumerInfo::Cluster</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a31282cdc72000a91af03f89899740bfa" name="a31282cdc72000a91af03f89899740bfa"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a31282cdc72000a91af03f89899740bfa">&#9670;&#160;</a></span>PushBound</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool jsConsumerInfo::PushBound</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_consumer_info.js b/doc/html/structjs_consumer_info.js
new file mode 100644 (file)
index 0000000..a5f3c2f
--- /dev/null
@@ -0,0 +1,15 @@
+var structjs_consumer_info =
+[
+    [ "Stream", "structjs_consumer_info.html#a8f21939613163a7c0ebfb521aa471260", null ],
+    [ "Name", "structjs_consumer_info.html#a9359aea7cd05a27b2a15f8a35cdb1008", null ],
+    [ "Created", "structjs_consumer_info.html#a670d38f2e9ba5c354ca3560a8064d00c", null ],
+    [ "Config", "structjs_consumer_info.html#a2f63940ca1f024ad3840418c2f6a1ae1", null ],
+    [ "Delivered", "structjs_consumer_info.html#a15f2d68fbf126acc1907ba9462ad9ee9", null ],
+    [ "AckFloor", "structjs_consumer_info.html#ab69c36ae092df9b0663b675a5abbab55", null ],
+    [ "NumAckPending", "structjs_consumer_info.html#a882bebeb7af80fcce088afdf2c98de50", null ],
+    [ "NumRedelivered", "structjs_consumer_info.html#a932bf14ebb9ce167af8975e3b1f8d001", null ],
+    [ "NumWaiting", "structjs_consumer_info.html#a57e4a4139310c50a1f3d51af67197af0", null ],
+    [ "NumPending", "structjs_consumer_info.html#aeaefd5a500996013b1ce13d8872e869b", null ],
+    [ "Cluster", "structjs_consumer_info.html#a6f4401563a9fd102226d82cdc6136e32", null ],
+    [ "PushBound", "structjs_consumer_info.html#a31282cdc72000a91af03f89899740bfa", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_consumer_info_list-members.html b/doc/html/structjs_consumer_info_list-members.html
new file mode 100644 (file)
index 0000000..0d7a451
--- /dev/null
@@ -0,0 +1,114 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_consumer_info_list.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsConsumerInfoList Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_consumer_info_list.html">jsConsumerInfoList</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_consumer_info_list.html#a813c908362a6426a929133f7c0d3395f">Count</a></td><td class="entry"><a class="el" href="structjs_consumer_info_list.html">jsConsumerInfoList</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_consumer_info_list.html#a75354882af5e11959b198a70bde14db8">List</a></td><td class="entry"><a class="el" href="structjs_consumer_info_list.html">jsConsumerInfoList</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_consumer_info_list.html b/doc/html/structjs_consumer_info_list.html
new file mode 100644 (file)
index 0000000..4fa5eac
--- /dev/null
@@ -0,0 +1,159 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsConsumerInfoList Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_consumer_info_list.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_consumer_info_list-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsConsumerInfoList Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:a75354882af5e11959b198a70bde14db8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a> **&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_info_list.html#a75354882af5e11959b198a70bde14db8">List</a></td></tr>
+<tr class="separator:a75354882af5e11959b198a70bde14db8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a813c908362a6426a929133f7c0d3395f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_info_list.html#a813c908362a6426a929133f7c0d3395f">Count</a></td></tr>
+<tr class="separator:a813c908362a6426a929133f7c0d3395f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >List of consumers information objects returned by <a class="el" href="group__js_assets_group.html#gaf28097ede3e9ba9926fb00856e63ffd9" title="Retrieves the list of all available consumers for a stream.">js_Consumers</a></p>
+<dl class="section note"><dt>Note</dt><dd>Once done, the list should be destroyed calling <a class="el" href="group__js_assets_group.html#ga421de40d8e91658353111c3f2ea90ec8" title="Destroys the consumer information list object.">jsConsumerInfoList_Destroy</a></dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__js_assets_group.html#ga38cdcc339eb8976d23296b99aa37d629" title="Destroys the stream information list object.">jsStreamInfoList_Destroy</a> </dd></dl>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="a75354882af5e11959b198a70bde14db8" name="a75354882af5e11959b198a70bde14db8"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a75354882af5e11959b198a70bde14db8">&#9670;&#160;</a></span>List</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="structjs_consumer_info.html">jsConsumerInfo</a>** jsConsumerInfoList::List</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a813c908362a6426a929133f7c0d3395f" name="a813c908362a6426a929133f7c0d3395f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a813c908362a6426a929133f7c0d3395f">&#9670;&#160;</a></span>Count</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int jsConsumerInfoList::Count</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_consumer_info_list.html">jsConsumerInfoList</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_consumer_info_list.js b/doc/html/structjs_consumer_info_list.js
new file mode 100644 (file)
index 0000000..7962ad9
--- /dev/null
@@ -0,0 +1,5 @@
+var structjs_consumer_info_list =
+[
+    [ "List", "structjs_consumer_info_list.html#a75354882af5e11959b198a70bde14db8", null ],
+    [ "Count", "structjs_consumer_info_list.html#a813c908362a6426a929133f7c0d3395f", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_consumer_names_list-members.html b/doc/html/structjs_consumer_names_list-members.html
new file mode 100644 (file)
index 0000000..cb4a570
--- /dev/null
@@ -0,0 +1,114 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_consumer_names_list.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsConsumerNamesList Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_consumer_names_list.html">jsConsumerNamesList</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_consumer_names_list.html#a0bccbad8ac5d335a0ed89970a58900fb">Count</a></td><td class="entry"><a class="el" href="structjs_consumer_names_list.html">jsConsumerNamesList</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_consumer_names_list.html#aa4b3cf17902a2d580cc3a230bfa5d309">List</a></td><td class="entry"><a class="el" href="structjs_consumer_names_list.html">jsConsumerNamesList</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_consumer_names_list.html b/doc/html/structjs_consumer_names_list.html
new file mode 100644 (file)
index 0000000..aa39da7
--- /dev/null
@@ -0,0 +1,159 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsConsumerNamesList Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_consumer_names_list.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_consumer_names_list-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsConsumerNamesList Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:aa4b3cf17902a2d580cc3a230bfa5d309"><td class="memItemLeft" align="right" valign="top">char **&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_names_list.html#aa4b3cf17902a2d580cc3a230bfa5d309">List</a></td></tr>
+<tr class="separator:aa4b3cf17902a2d580cc3a230bfa5d309"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a0bccbad8ac5d335a0ed89970a58900fb"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_names_list.html#a0bccbad8ac5d335a0ed89970a58900fb">Count</a></td></tr>
+<tr class="separator:a0bccbad8ac5d335a0ed89970a58900fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >List of consumer names returned by <a class="el" href="group__js_assets_group.html#ga690d19af55d12b82c8523d1861cef8d0" title="Retrieves the list of all available consumer names for a stream.">js_ConsumerNames</a></p>
+<dl class="section note"><dt>Note</dt><dd>Once done, the list should be destroyed calling <a class="el" href="group__js_assets_group.html#ga2ced0d190131460bf4608ab893dffc50" title="Destroys the consumer names list object.">jsConsumerNamesList_Destroy</a></dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__js_assets_group.html#ga2ced0d190131460bf4608ab893dffc50" title="Destroys the consumer names list object.">jsConsumerNamesList_Destroy</a> </dd></dl>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="aa4b3cf17902a2d580cc3a230bfa5d309" name="aa4b3cf17902a2d580cc3a230bfa5d309"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aa4b3cf17902a2d580cc3a230bfa5d309">&#9670;&#160;</a></span>List</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">char** jsConsumerNamesList::List</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a0bccbad8ac5d335a0ed89970a58900fb" name="a0bccbad8ac5d335a0ed89970a58900fb"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a0bccbad8ac5d335a0ed89970a58900fb">&#9670;&#160;</a></span>Count</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int jsConsumerNamesList::Count</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_consumer_names_list.html">jsConsumerNamesList</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_consumer_names_list.js b/doc/html/structjs_consumer_names_list.js
new file mode 100644 (file)
index 0000000..72aef8b
--- /dev/null
@@ -0,0 +1,5 @@
+var structjs_consumer_names_list =
+[
+    [ "List", "structjs_consumer_names_list.html#aa4b3cf17902a2d580cc3a230bfa5d309", null ],
+    [ "Count", "structjs_consumer_names_list.html#a0bccbad8ac5d335a0ed89970a58900fb", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_consumer_sequence_mismatch-members.html b/doc/html/structjs_consumer_sequence_mismatch-members.html
new file mode 100644 (file)
index 0000000..e233119
--- /dev/null
@@ -0,0 +1,115 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_consumer_sequence_mismatch.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsConsumerSequenceMismatch Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_consumer_sequence_mismatch.html">jsConsumerSequenceMismatch</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_consumer_sequence_mismatch.html#adb383429dadb1ab0e1f7d013bc546a28">ConsumerClient</a></td><td class="entry"><a class="el" href="structjs_consumer_sequence_mismatch.html">jsConsumerSequenceMismatch</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_consumer_sequence_mismatch.html#ac1df353001d853c8a56cef9f82fb831c">ConsumerServer</a></td><td class="entry"><a class="el" href="structjs_consumer_sequence_mismatch.html">jsConsumerSequenceMismatch</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_consumer_sequence_mismatch.html#aad6a17af1719c023c38a6fd254b73f8e">Stream</a></td><td class="entry"><a class="el" href="structjs_consumer_sequence_mismatch.html">jsConsumerSequenceMismatch</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_consumer_sequence_mismatch.html b/doc/html/structjs_consumer_sequence_mismatch.html
new file mode 100644 (file)
index 0000000..5f721b2
--- /dev/null
@@ -0,0 +1,179 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsConsumerSequenceMismatch Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_consumer_sequence_mismatch.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_consumer_sequence_mismatch-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsConsumerSequenceMismatch Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:aad6a17af1719c023c38a6fd254b73f8e"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_sequence_mismatch.html#aad6a17af1719c023c38a6fd254b73f8e">Stream</a></td></tr>
+<tr class="memdesc:aad6a17af1719c023c38a6fd254b73f8e"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is the stream sequence that the application should resume from.  <a href="structjs_consumer_sequence_mismatch.html#aad6a17af1719c023c38a6fd254b73f8e">More...</a><br /></td></tr>
+<tr class="separator:aad6a17af1719c023c38a6fd254b73f8e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:adb383429dadb1ab0e1f7d013bc546a28"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_sequence_mismatch.html#adb383429dadb1ab0e1f7d013bc546a28">ConsumerClient</a></td></tr>
+<tr class="memdesc:adb383429dadb1ab0e1f7d013bc546a28"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is the consumer sequence that was last received by the library.  <a href="structjs_consumer_sequence_mismatch.html#adb383429dadb1ab0e1f7d013bc546a28">More...</a><br /></td></tr>
+<tr class="separator:adb383429dadb1ab0e1f7d013bc546a28"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ac1df353001d853c8a56cef9f82fb831c"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_consumer_sequence_mismatch.html#ac1df353001d853c8a56cef9f82fb831c">ConsumerServer</a></td></tr>
+<tr class="memdesc:ac1df353001d853c8a56cef9f82fb831c"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is the consumer sequence last sent by the server.  <a href="structjs_consumer_sequence_mismatch.html#ac1df353001d853c8a56cef9f82fb831c">More...</a><br /></td></tr>
+<tr class="separator:ac1df353001d853c8a56cef9f82fb831c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >This represents a consumer sequence mismatch between the server and client views.</p>
+<p >This can help applications find out if messages have been missed. Without this and during a disconnect, it would be possible that a subscription is not aware that it missed messages from the server. When acknowledgment mode is other than <a class="el" href="group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873afd91fe31cf57c68863ca3090b07c296c" title="Requires no acks for delivered messages.">js_AckNone</a>, messages would ultimately be redelivered, but for <a class="el" href="group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873afd91fe31cf57c68863ca3090b07c296c" title="Requires no acks for delivered messages.">js_AckNone</a>, they would not. But even with an acknowledgment mode this may help finding sooner that something went wrong and let the application decide if it wants to recreate the subscription starting at a given sequence.</p>
+<p >The gap of missing messages could be calculated as <code>ConsumerServer-ConsumerClient</code>.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__js_sub_group.html#ga0daed9f0d2d00cb14314ecc180a6fa84" title="Returns the consumer sequence mismatch information.">natsSubscription_GetSequenceMismatch</a> </dd></dl>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="aad6a17af1719c023c38a6fd254b73f8e" name="aad6a17af1719c023c38a6fd254b73f8e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aad6a17af1719c023c38a6fd254b73f8e">&#9670;&#160;</a></span>Stream</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t jsConsumerSequenceMismatch::Stream</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="adb383429dadb1ab0e1f7d013bc546a28" name="adb383429dadb1ab0e1f7d013bc546a28"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#adb383429dadb1ab0e1f7d013bc546a28">&#9670;&#160;</a></span>ConsumerClient</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t jsConsumerSequenceMismatch::ConsumerClient</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ac1df353001d853c8a56cef9f82fb831c" name="ac1df353001d853c8a56cef9f82fb831c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ac1df353001d853c8a56cef9f82fb831c">&#9670;&#160;</a></span>ConsumerServer</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t jsConsumerSequenceMismatch::ConsumerServer</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_consumer_sequence_mismatch.html">jsConsumerSequenceMismatch</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_consumer_sequence_mismatch.js b/doc/html/structjs_consumer_sequence_mismatch.js
new file mode 100644 (file)
index 0000000..f356a4c
--- /dev/null
@@ -0,0 +1,6 @@
+var structjs_consumer_sequence_mismatch =
+[
+    [ "Stream", "structjs_consumer_sequence_mismatch.html#aad6a17af1719c023c38a6fd254b73f8e", null ],
+    [ "ConsumerClient", "structjs_consumer_sequence_mismatch.html#adb383429dadb1ab0e1f7d013bc546a28", null ],
+    [ "ConsumerServer", "structjs_consumer_sequence_mismatch.html#ac1df353001d853c8a56cef9f82fb831c", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_direct_get_msg_options-members.html b/doc/html/structjs_direct_get_msg_options-members.html
new file mode 100644 (file)
index 0000000..52f8edf
--- /dev/null
@@ -0,0 +1,115 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_direct_get_msg_options.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsDirectGetMsgOptions Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_direct_get_msg_options.html">jsDirectGetMsgOptions</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_direct_get_msg_options.html#aae968f31cdda96fa3c5e9374a36b9630">LastBySubject</a></td><td class="entry"><a class="el" href="structjs_direct_get_msg_options.html">jsDirectGetMsgOptions</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_direct_get_msg_options.html#a16ce7908a3d1690b8ae8bc22350ac238">NextBySubject</a></td><td class="entry"><a class="el" href="structjs_direct_get_msg_options.html">jsDirectGetMsgOptions</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_direct_get_msg_options.html#a60211d7499cfecdd6e61e6c73af1a2f5">Sequence</a></td><td class="entry"><a class="el" href="structjs_direct_get_msg_options.html">jsDirectGetMsgOptions</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_direct_get_msg_options.html b/doc/html/structjs_direct_get_msg_options.html
new file mode 100644 (file)
index 0000000..b55b94a
--- /dev/null
@@ -0,0 +1,177 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsDirectGetMsgOptions Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_direct_get_msg_options.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_direct_get_msg_options-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsDirectGetMsgOptions Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:a60211d7499cfecdd6e61e6c73af1a2f5"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_direct_get_msg_options.html#a60211d7499cfecdd6e61e6c73af1a2f5">Sequence</a></td></tr>
+<tr class="memdesc:a60211d7499cfecdd6e61e6c73af1a2f5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the message at this sequence.  <a href="structjs_direct_get_msg_options.html#a60211d7499cfecdd6e61e6c73af1a2f5">More...</a><br /></td></tr>
+<tr class="separator:a60211d7499cfecdd6e61e6c73af1a2f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a16ce7908a3d1690b8ae8bc22350ac238"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_direct_get_msg_options.html#a16ce7908a3d1690b8ae8bc22350ac238">NextBySubject</a></td></tr>
+<tr class="memdesc:a16ce7908a3d1690b8ae8bc22350ac238"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the next message (based on sequence) for that subject.  <a href="structjs_direct_get_msg_options.html#a16ce7908a3d1690b8ae8bc22350ac238">More...</a><br /></td></tr>
+<tr class="separator:a16ce7908a3d1690b8ae8bc22350ac238"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aae968f31cdda96fa3c5e9374a36b9630"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_direct_get_msg_options.html#aae968f31cdda96fa3c5e9374a36b9630">LastBySubject</a></td></tr>
+<tr class="memdesc:aae968f31cdda96fa3c5e9374a36b9630"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the last message on that subject.  <a href="structjs_direct_get_msg_options.html#aae968f31cdda96fa3c5e9374a36b9630">More...</a><br /></td></tr>
+<tr class="separator:aae968f31cdda96fa3c5e9374a36b9630"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >Options for the <a class="el" href="group__js_assets_group.html#ga62c250cecc650b1eed0fa1691893e2ae" title="Retrieves directly a JetStream message based on provided options.">js_DirectGetMsg()</a> call, which retrieves a message from any server (not only the leader) as long as the stream has been created with a AllowDirect option.</p>
+<p >Note that some options are mutually exclusive but are not checked byt the library. The server will reject invalid requests and the library will return the error returned from the server. </p>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="a60211d7499cfecdd6e61e6c73af1a2f5" name="a60211d7499cfecdd6e61e6c73af1a2f5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a60211d7499cfecdd6e61e6c73af1a2f5">&#9670;&#160;</a></span>Sequence</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t jsDirectGetMsgOptions::Sequence</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a16ce7908a3d1690b8ae8bc22350ac238" name="a16ce7908a3d1690b8ae8bc22350ac238"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a16ce7908a3d1690b8ae8bc22350ac238">&#9670;&#160;</a></span>NextBySubject</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* jsDirectGetMsgOptions::NextBySubject</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="aae968f31cdda96fa3c5e9374a36b9630" name="aae968f31cdda96fa3c5e9374a36b9630"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aae968f31cdda96fa3c5e9374a36b9630">&#9670;&#160;</a></span>LastBySubject</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* jsDirectGetMsgOptions::LastBySubject</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_direct_get_msg_options.html">jsDirectGetMsgOptions</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_direct_get_msg_options.js b/doc/html/structjs_direct_get_msg_options.js
new file mode 100644 (file)
index 0000000..c11246a
--- /dev/null
@@ -0,0 +1,6 @@
+var structjs_direct_get_msg_options =
+[
+    [ "Sequence", "structjs_direct_get_msg_options.html#a60211d7499cfecdd6e61e6c73af1a2f5", null ],
+    [ "NextBySubject", "structjs_direct_get_msg_options.html#a16ce7908a3d1690b8ae8bc22350ac238", null ],
+    [ "LastBySubject", "structjs_direct_get_msg_options.html#aae968f31cdda96fa3c5e9374a36b9630", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_external_stream-members.html b/doc/html/structjs_external_stream-members.html
new file mode 100644 (file)
index 0000000..16a97e3
--- /dev/null
@@ -0,0 +1,114 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_external_stream.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsExternalStream Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_external_stream.html">jsExternalStream</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_external_stream.html#a2eaf2c0c3e77c269f44e254af8b24e96">APIPrefix</a></td><td class="entry"><a class="el" href="structjs_external_stream.html">jsExternalStream</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_external_stream.html#a26ca427f3c5be1cae579ddccc16432d3">DeliverPrefix</a></td><td class="entry"><a class="el" href="structjs_external_stream.html">jsExternalStream</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_external_stream.html b/doc/html/structjs_external_stream.html
new file mode 100644 (file)
index 0000000..4032c0a
--- /dev/null
@@ -0,0 +1,160 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsExternalStream Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_external_stream.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_external_stream-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsExternalStream Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:a2eaf2c0c3e77c269f44e254af8b24e96"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_external_stream.html#a2eaf2c0c3e77c269f44e254af8b24e96">APIPrefix</a></td></tr>
+<tr class="separator:a2eaf2c0c3e77c269f44e254af8b24e96"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a26ca427f3c5be1cae579ddccc16432d3"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_external_stream.html#a26ca427f3c5be1cae579ddccc16432d3">DeliverPrefix</a></td></tr>
+<tr class="separator:a26ca427f3c5be1cae579ddccc16432d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >Allows you to qualify access to a stream source in another account.</p>
+<p >Initialize the object with <a class="el" href="group__js_assets_group.html#ga81aebebcd79922104720da51e95020d4" title="Initializes an external stream configuration structure.">jsExternalStream_Init</a>.</p>
+<dl class="section note"><dt>Note</dt><dd>The strings are applications owned and will not be freed by the library.</dd></dl>
+<p>See <a class="el" href="structjs_stream_config.html">jsStreamConfig</a> for information on how to configure a stream. </p>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="a2eaf2c0c3e77c269f44e254af8b24e96" name="a2eaf2c0c3e77c269f44e254af8b24e96"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a2eaf2c0c3e77c269f44e254af8b24e96">&#9670;&#160;</a></span>APIPrefix</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* jsExternalStream::APIPrefix</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a26ca427f3c5be1cae579ddccc16432d3" name="a26ca427f3c5be1cae579ddccc16432d3"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a26ca427f3c5be1cae579ddccc16432d3">&#9670;&#160;</a></span>DeliverPrefix</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* jsExternalStream::DeliverPrefix</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_external_stream.html">jsExternalStream</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_external_stream.js b/doc/html/structjs_external_stream.js
new file mode 100644 (file)
index 0000000..10aa11a
--- /dev/null
@@ -0,0 +1,5 @@
+var structjs_external_stream =
+[
+    [ "APIPrefix", "structjs_external_stream.html#a2eaf2c0c3e77c269f44e254af8b24e96", null ],
+    [ "DeliverPrefix", "structjs_external_stream.html#a26ca427f3c5be1cae579ddccc16432d3", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_fetch_request-members.html b/doc/html/structjs_fetch_request-members.html
new file mode 100644 (file)
index 0000000..0c233b5
--- /dev/null
@@ -0,0 +1,117 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_fetch_request.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsFetchRequest Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_fetch_request.html">jsFetchRequest</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_fetch_request.html#a84f06b60e25decb2674996f0cb315f63">Batch</a></td><td class="entry"><a class="el" href="structjs_fetch_request.html">jsFetchRequest</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_fetch_request.html#ac3351138ce8ac3b321ac1eb78887116e">Expires</a></td><td class="entry"><a class="el" href="structjs_fetch_request.html">jsFetchRequest</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_fetch_request.html#ae8e73c7cc2e2a2d2502407c9b1522496">Heartbeat</a></td><td class="entry"><a class="el" href="structjs_fetch_request.html">jsFetchRequest</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_fetch_request.html#a3298db691c2ecb9725cc029e2c35d6d1">MaxBytes</a></td><td class="entry"><a class="el" href="structjs_fetch_request.html">jsFetchRequest</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_fetch_request.html#ae251eebb1998a39fe3b898302b58293d">NoWait</a></td><td class="entry"><a class="el" href="structjs_fetch_request.html">jsFetchRequest</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_fetch_request.html b/doc/html/structjs_fetch_request.html
new file mode 100644 (file)
index 0000000..c360f28
--- /dev/null
@@ -0,0 +1,210 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsFetchRequest Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_fetch_request.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_fetch_request-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsFetchRequest Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:ac3351138ce8ac3b321ac1eb78887116e"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_fetch_request.html#ac3351138ce8ac3b321ac1eb78887116e">Expires</a></td></tr>
+<tr class="memdesc:ac3351138ce8ac3b321ac1eb78887116e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Expiration of the request, expressed in nanoseconds.  <a href="structjs_fetch_request.html#ac3351138ce8ac3b321ac1eb78887116e">More...</a><br /></td></tr>
+<tr class="separator:ac3351138ce8ac3b321ac1eb78887116e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a84f06b60e25decb2674996f0cb315f63"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_fetch_request.html#a84f06b60e25decb2674996f0cb315f63">Batch</a></td></tr>
+<tr class="memdesc:a84f06b60e25decb2674996f0cb315f63"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum number of messages to be received (see MaxBytes)  <a href="structjs_fetch_request.html#a84f06b60e25decb2674996f0cb315f63">More...</a><br /></td></tr>
+<tr class="separator:a84f06b60e25decb2674996f0cb315f63"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a3298db691c2ecb9725cc029e2c35d6d1"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_fetch_request.html#a3298db691c2ecb9725cc029e2c35d6d1">MaxBytes</a></td></tr>
+<tr class="memdesc:a3298db691c2ecb9725cc029e2c35d6d1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum bytes for the request (request complete based on whichever Batch or MaxBytes comes first)  <a href="structjs_fetch_request.html#a3298db691c2ecb9725cc029e2c35d6d1">More...</a><br /></td></tr>
+<tr class="separator:a3298db691c2ecb9725cc029e2c35d6d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ae251eebb1998a39fe3b898302b58293d"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_fetch_request.html#ae251eebb1998a39fe3b898302b58293d">NoWait</a></td></tr>
+<tr class="memdesc:ae251eebb1998a39fe3b898302b58293d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Will not wait if the request cannot be completed.  <a href="structjs_fetch_request.html#ae251eebb1998a39fe3b898302b58293d">More...</a><br /></td></tr>
+<tr class="separator:ae251eebb1998a39fe3b898302b58293d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ae8e73c7cc2e2a2d2502407c9b1522496"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_fetch_request.html#ae8e73c7cc2e2a2d2502407c9b1522496">Heartbeat</a></td></tr>
+<tr class="memdesc:ae8e73c7cc2e2a2d2502407c9b1522496"><td class="mdescLeft">&#160;</td><td class="mdescRight">Have server sends heartbeats to help detect communication failures.  <a href="structjs_fetch_request.html#ae8e73c7cc2e2a2d2502407c9b1522496">More...</a><br /></td></tr>
+<tr class="separator:ae8e73c7cc2e2a2d2502407c9b1522496"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >Options for the <a class="el" href="group__js_sub_group.html#ga676292505e7fde8688cfd886b79a10ed" title="Fetches messages for a pull subscription with a complete request configuration.">natsSubscription_FetchRequest()</a> call, which is similar to <a class="el" href="group__js_sub_group.html#gafc5e0d2269bd23b4d5fb7f3b05278e50" title="Fetches messages for a pull subscription.">natsSubscription_Fetch()</a> but gives more control in the configuration of the fetch. </p>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="ac3351138ce8ac3b321ac1eb78887116e" name="ac3351138ce8ac3b321ac1eb78887116e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ac3351138ce8ac3b321ac1eb78887116e">&#9670;&#160;</a></span>Expires</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsFetchRequest::Expires</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a84f06b60e25decb2674996f0cb315f63" name="a84f06b60e25decb2674996f0cb315f63"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a84f06b60e25decb2674996f0cb315f63">&#9670;&#160;</a></span>Batch</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int jsFetchRequest::Batch</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a3298db691c2ecb9725cc029e2c35d6d1" name="a3298db691c2ecb9725cc029e2c35d6d1"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a3298db691c2ecb9725cc029e2c35d6d1">&#9670;&#160;</a></span>MaxBytes</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsFetchRequest::MaxBytes</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ae251eebb1998a39fe3b898302b58293d" name="ae251eebb1998a39fe3b898302b58293d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ae251eebb1998a39fe3b898302b58293d">&#9670;&#160;</a></span>NoWait</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool jsFetchRequest::NoWait</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ae8e73c7cc2e2a2d2502407c9b1522496" name="ae8e73c7cc2e2a2d2502407c9b1522496"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ae8e73c7cc2e2a2d2502407c9b1522496">&#9670;&#160;</a></span>Heartbeat</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsFetchRequest::Heartbeat</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_fetch_request.html">jsFetchRequest</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_fetch_request.js b/doc/html/structjs_fetch_request.js
new file mode 100644 (file)
index 0000000..eb2f163
--- /dev/null
@@ -0,0 +1,8 @@
+var structjs_fetch_request =
+[
+    [ "Expires", "structjs_fetch_request.html#ac3351138ce8ac3b321ac1eb78887116e", null ],
+    [ "Batch", "structjs_fetch_request.html#a84f06b60e25decb2674996f0cb315f63", null ],
+    [ "MaxBytes", "structjs_fetch_request.html#a3298db691c2ecb9725cc029e2c35d6d1", null ],
+    [ "NoWait", "structjs_fetch_request.html#ae251eebb1998a39fe3b898302b58293d", null ],
+    [ "Heartbeat", "structjs_fetch_request.html#ae8e73c7cc2e2a2d2502407c9b1522496", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_lost_stream_data-members.html b/doc/html/structjs_lost_stream_data-members.html
new file mode 100644 (file)
index 0000000..b617d35
--- /dev/null
@@ -0,0 +1,115 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_lost_stream_data.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsLostStreamData Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_lost_stream_data.html">jsLostStreamData</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_lost_stream_data.html#a841fcadca3f66e9170a51080dc1acf30">Bytes</a></td><td class="entry"><a class="el" href="structjs_lost_stream_data.html">jsLostStreamData</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_lost_stream_data.html#a5d2e87697526033c842a7f955776dfda">Msgs</a></td><td class="entry"><a class="el" href="structjs_lost_stream_data.html">jsLostStreamData</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_lost_stream_data.html#abdc373ed7fc9b7cf161c13da1913fc9a">MsgsLen</a></td><td class="entry"><a class="el" href="structjs_lost_stream_data.html">jsLostStreamData</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_lost_stream_data.html b/doc/html/structjs_lost_stream_data.html
new file mode 100644 (file)
index 0000000..8dbd820
--- /dev/null
@@ -0,0 +1,173 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsLostStreamData Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_lost_stream_data.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_lost_stream_data-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsLostStreamData Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:a5d2e87697526033c842a7f955776dfda"><td class="memItemLeft" align="right" valign="top">uint64_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_lost_stream_data.html#a5d2e87697526033c842a7f955776dfda">Msgs</a></td></tr>
+<tr class="separator:a5d2e87697526033c842a7f955776dfda"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:abdc373ed7fc9b7cf161c13da1913fc9a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_lost_stream_data.html#abdc373ed7fc9b7cf161c13da1913fc9a">MsgsLen</a></td></tr>
+<tr class="separator:abdc373ed7fc9b7cf161c13da1913fc9a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a841fcadca3f66e9170a51080dc1acf30"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_lost_stream_data.html#a841fcadca3f66e9170a51080dc1acf30">Bytes</a></td></tr>
+<tr class="separator:a841fcadca3f66e9170a51080dc1acf30"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >Information about messages that have been lost </p>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="a5d2e87697526033c842a7f955776dfda" name="a5d2e87697526033c842a7f955776dfda"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a5d2e87697526033c842a7f955776dfda">&#9670;&#160;</a></span>Msgs</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t* jsLostStreamData::Msgs</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="abdc373ed7fc9b7cf161c13da1913fc9a" name="abdc373ed7fc9b7cf161c13da1913fc9a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#abdc373ed7fc9b7cf161c13da1913fc9a">&#9670;&#160;</a></span>MsgsLen</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int jsLostStreamData::MsgsLen</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a841fcadca3f66e9170a51080dc1acf30" name="a841fcadca3f66e9170a51080dc1acf30"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a841fcadca3f66e9170a51080dc1acf30">&#9670;&#160;</a></span>Bytes</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t jsLostStreamData::Bytes</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_lost_stream_data.html">jsLostStreamData</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_lost_stream_data.js b/doc/html/structjs_lost_stream_data.js
new file mode 100644 (file)
index 0000000..b43c8f1
--- /dev/null
@@ -0,0 +1,6 @@
+var structjs_lost_stream_data =
+[
+    [ "Msgs", "structjs_lost_stream_data.html#a5d2e87697526033c842a7f955776dfda", null ],
+    [ "MsgsLen", "structjs_lost_stream_data.html#abdc373ed7fc9b7cf161c13da1913fc9a", null ],
+    [ "Bytes", "structjs_lost_stream_data.html#a841fcadca3f66e9170a51080dc1acf30", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_msg_meta_data-members.html b/doc/html/structjs_msg_meta_data-members.html
new file mode 100644 (file)
index 0000000..76c1b8a
--- /dev/null
@@ -0,0 +1,119 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_msg_meta_data.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsMsgMetaData Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_msg_meta_data.html">jsMsgMetaData</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_msg_meta_data.html#a6dcc2a442984b0ca070b3d8077192127">Consumer</a></td><td class="entry"><a class="el" href="structjs_msg_meta_data.html">jsMsgMetaData</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_msg_meta_data.html#a388e38ccea591181436d199dc7c2f8ea">Domain</a></td><td class="entry"><a class="el" href="structjs_msg_meta_data.html">jsMsgMetaData</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_msg_meta_data.html#a9a50965fac061a9728b160702d3f56ff">NumDelivered</a></td><td class="entry"><a class="el" href="structjs_msg_meta_data.html">jsMsgMetaData</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_msg_meta_data.html#a02f1bbd37e9650ed6bfda0210f038e30">NumPending</a></td><td class="entry"><a class="el" href="structjs_msg_meta_data.html">jsMsgMetaData</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_msg_meta_data.html#a23d5fd1992033164c73d5c2a16a4e321">Sequence</a></td><td class="entry"><a class="el" href="structjs_msg_meta_data.html">jsMsgMetaData</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_msg_meta_data.html#a32e2a9438d2dc769f7f64d2f8897abc4">Stream</a></td><td class="entry"><a class="el" href="structjs_msg_meta_data.html">jsMsgMetaData</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_msg_meta_data.html#abab9ed5600a3629ea6d6c78170d7d5e9">Timestamp</a></td><td class="entry"><a class="el" href="structjs_msg_meta_data.html">jsMsgMetaData</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_msg_meta_data.html b/doc/html/structjs_msg_meta_data.html
new file mode 100644 (file)
index 0000000..827169f
--- /dev/null
@@ -0,0 +1,240 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsMsgMetaData Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_msg_meta_data.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_msg_meta_data-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsMsgMetaData Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:a23d5fd1992033164c73d5c2a16a4e321"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structjs_sequence_pair.html">jsSequencePair</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_msg_meta_data.html#a23d5fd1992033164c73d5c2a16a4e321">Sequence</a></td></tr>
+<tr class="separator:a23d5fd1992033164c73d5c2a16a4e321"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a9a50965fac061a9728b160702d3f56ff"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_msg_meta_data.html#a9a50965fac061a9728b160702d3f56ff">NumDelivered</a></td></tr>
+<tr class="separator:a9a50965fac061a9728b160702d3f56ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a02f1bbd37e9650ed6bfda0210f038e30"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_msg_meta_data.html#a02f1bbd37e9650ed6bfda0210f038e30">NumPending</a></td></tr>
+<tr class="separator:a02f1bbd37e9650ed6bfda0210f038e30"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:abab9ed5600a3629ea6d6c78170d7d5e9"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_msg_meta_data.html#abab9ed5600a3629ea6d6c78170d7d5e9">Timestamp</a></td></tr>
+<tr class="separator:abab9ed5600a3629ea6d6c78170d7d5e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a32e2a9438d2dc769f7f64d2f8897abc4"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_msg_meta_data.html#a32e2a9438d2dc769f7f64d2f8897abc4">Stream</a></td></tr>
+<tr class="separator:a32e2a9438d2dc769f7f64d2f8897abc4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a6dcc2a442984b0ca070b3d8077192127"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_msg_meta_data.html#a6dcc2a442984b0ca070b3d8077192127">Consumer</a></td></tr>
+<tr class="separator:a6dcc2a442984b0ca070b3d8077192127"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a388e38ccea591181436d199dc7c2f8ea"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_msg_meta_data.html#a388e38ccea591181436d199dc7c2f8ea">Domain</a></td></tr>
+<tr class="separator:a388e38ccea591181436d199dc7c2f8ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >This represents the JetStream metadata associated with received messages.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__js_msg.html#gacf48e59038fab35849e9dc6f8fcf6328" title="Returns metadata from this JetStream message.">natsMsg_GetMetaData</a> </dd>
+<dd>
+<a class="el" href="group__js_msg.html#gaf9bf92294342bcb27053de7038606d12" title="Destroys the message metadata object.">jsMsgMetaData_Destroy</a> </dd></dl>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="a23d5fd1992033164c73d5c2a16a4e321" name="a23d5fd1992033164c73d5c2a16a4e321"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a23d5fd1992033164c73d5c2a16a4e321">&#9670;&#160;</a></span>Sequence</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="structjs_sequence_pair.html">jsSequencePair</a> jsMsgMetaData::Sequence</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a9a50965fac061a9728b160702d3f56ff" name="a9a50965fac061a9728b160702d3f56ff"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a9a50965fac061a9728b160702d3f56ff">&#9670;&#160;</a></span>NumDelivered</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t jsMsgMetaData::NumDelivered</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a02f1bbd37e9650ed6bfda0210f038e30" name="a02f1bbd37e9650ed6bfda0210f038e30"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a02f1bbd37e9650ed6bfda0210f038e30">&#9670;&#160;</a></span>NumPending</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t jsMsgMetaData::NumPending</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="abab9ed5600a3629ea6d6c78170d7d5e9" name="abab9ed5600a3629ea6d6c78170d7d5e9"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#abab9ed5600a3629ea6d6c78170d7d5e9">&#9670;&#160;</a></span>Timestamp</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsMsgMetaData::Timestamp</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a32e2a9438d2dc769f7f64d2f8897abc4" name="a32e2a9438d2dc769f7f64d2f8897abc4"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a32e2a9438d2dc769f7f64d2f8897abc4">&#9670;&#160;</a></span>Stream</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">char* jsMsgMetaData::Stream</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a6dcc2a442984b0ca070b3d8077192127" name="a6dcc2a442984b0ca070b3d8077192127"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a6dcc2a442984b0ca070b3d8077192127">&#9670;&#160;</a></span>Consumer</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">char* jsMsgMetaData::Consumer</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a388e38ccea591181436d199dc7c2f8ea" name="a388e38ccea591181436d199dc7c2f8ea"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a388e38ccea591181436d199dc7c2f8ea">&#9670;&#160;</a></span>Domain</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">char* jsMsgMetaData::Domain</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_msg_meta_data.html">jsMsgMetaData</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_msg_meta_data.js b/doc/html/structjs_msg_meta_data.js
new file mode 100644 (file)
index 0000000..cf39214
--- /dev/null
@@ -0,0 +1,10 @@
+var structjs_msg_meta_data =
+[
+    [ "Sequence", "structjs_msg_meta_data.html#a23d5fd1992033164c73d5c2a16a4e321", null ],
+    [ "NumDelivered", "structjs_msg_meta_data.html#a9a50965fac061a9728b160702d3f56ff", null ],
+    [ "NumPending", "structjs_msg_meta_data.html#a02f1bbd37e9650ed6bfda0210f038e30", null ],
+    [ "Timestamp", "structjs_msg_meta_data.html#abab9ed5600a3629ea6d6c78170d7d5e9", null ],
+    [ "Stream", "structjs_msg_meta_data.html#a32e2a9438d2dc769f7f64d2f8897abc4", null ],
+    [ "Consumer", "structjs_msg_meta_data.html#a6dcc2a442984b0ca070b3d8077192127", null ],
+    [ "Domain", "structjs_msg_meta_data.html#a388e38ccea591181436d199dc7c2f8ea", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_options-members.html b/doc/html/structjs_options-members.html
new file mode 100644 (file)
index 0000000..7dc8d13
--- /dev/null
@@ -0,0 +1,117 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_options.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsOptions Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_options.html">jsOptions</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_options.html#ae4df6c9c01c0ea9ab0e6d5a6ec8af74e">Domain</a></td><td class="entry"><a class="el" href="structjs_options.html">jsOptions</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_options.html#ab06e45296fccf0fe6152e083e38d916f">Prefix</a></td><td class="entry"><a class="el" href="structjs_options.html">jsOptions</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_options.html#a5ce5c11cc9b9df2b6bc47cd77d7b1dc4">PublishAsync</a></td><td class="entry"><a class="el" href="structjs_options.html">jsOptions</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_options.html#ae50544ee0ef8dd7d02ef9802805807ae">Stream</a></td><td class="entry"><a class="el" href="structjs_options.html">jsOptions</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_options.html#a7fd42e1f83da5861e716137c16f8b72f">Wait</a></td><td class="entry"><a class="el" href="structjs_options.html">jsOptions</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_options.html b/doc/html/structjs_options.html
new file mode 100644 (file)
index 0000000..c8bcbd0
--- /dev/null
@@ -0,0 +1,218 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsOptions Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_options.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#nested-classes">Classes</a> &#124;
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_options-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsOptions Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
+Classes</h2></td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_options_1_1js_options_publish_async.html">jsOptionsPublishAsync</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_options_1_1js_options_stream.html">jsOptionsStream</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:ab06e45296fccf0fe6152e083e38d916f"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_options.html#ab06e45296fccf0fe6152e083e38d916f">Prefix</a></td></tr>
+<tr class="memdesc:ab06e45296fccf0fe6152e083e38d916f"><td class="mdescLeft">&#160;</td><td class="mdescRight">JetStream prefix, default is "$JS.API".  <a href="structjs_options.html#ab06e45296fccf0fe6152e083e38d916f">More...</a><br /></td></tr>
+<tr class="separator:ab06e45296fccf0fe6152e083e38d916f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ae4df6c9c01c0ea9ab0e6d5a6ec8af74e"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_options.html#ae4df6c9c01c0ea9ab0e6d5a6ec8af74e">Domain</a></td></tr>
+<tr class="memdesc:ae4df6c9c01c0ea9ab0e6d5a6ec8af74e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Domain changes the domain part of JetSteam API prefix.  <a href="structjs_options.html#ae4df6c9c01c0ea9ab0e6d5a6ec8af74e">More...</a><br /></td></tr>
+<tr class="separator:ae4df6c9c01c0ea9ab0e6d5a6ec8af74e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a7fd42e1f83da5861e716137c16f8b72f"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_options.html#a7fd42e1f83da5861e716137c16f8b72f">Wait</a></td></tr>
+<tr class="memdesc:a7fd42e1f83da5861e716137c16f8b72f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Amount of time (in milliseconds) to wait for various JetStream API requests, default is 5000 ms (5 seconds).  <a href="structjs_options.html#a7fd42e1f83da5861e716137c16f8b72f">More...</a><br /></td></tr>
+<tr class="separator:a7fd42e1f83da5861e716137c16f8b72f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a5ce5c11cc9b9df2b6bc47cd77d7b1dc4"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="structjs_options_1_1js_options_publish_async.html">jsOptions::jsOptionsPublishAsync</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_options.html#a5ce5c11cc9b9df2b6bc47cd77d7b1dc4">PublishAsync</a></td></tr>
+<tr class="separator:a5ce5c11cc9b9df2b6bc47cd77d7b1dc4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ae50544ee0ef8dd7d02ef9802805807ae"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="structjs_options_1_1js_options_stream.html">jsOptions::jsOptionsStream</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_options.html#ae50544ee0ef8dd7d02ef9802805807ae">Stream</a></td></tr>
+<tr class="memdesc:ae50544ee0ef8dd7d02ef9802805807ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Optional stream options.  <a href="structjs_options.html#ae50544ee0ef8dd7d02ef9802805807ae">More...</a><br /></td></tr>
+<tr class="separator:ae50544ee0ef8dd7d02ef9802805807ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >JetStream context options.</p>
+<p >Initialize the object with <a class="el" href="group__js_group.html#ga855ff9a04888d696785cc5ede96112e4" title="Initializes a streaming context options structure.">jsOptions_Init</a>. </p>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="ab06e45296fccf0fe6152e083e38d916f" name="ab06e45296fccf0fe6152e083e38d916f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ab06e45296fccf0fe6152e083e38d916f">&#9670;&#160;</a></span>Prefix</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* jsOptions::Prefix</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ae4df6c9c01c0ea9ab0e6d5a6ec8af74e" name="ae4df6c9c01c0ea9ab0e6d5a6ec8af74e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ae4df6c9c01c0ea9ab0e6d5a6ec8af74e">&#9670;&#160;</a></span>Domain</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* jsOptions::Domain</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a7fd42e1f83da5861e716137c16f8b72f" name="a7fd42e1f83da5861e716137c16f8b72f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a7fd42e1f83da5861e716137c16f8b72f">&#9670;&#160;</a></span>Wait</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsOptions::Wait</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a5ce5c11cc9b9df2b6bc47cd77d7b1dc4" name="a5ce5c11cc9b9df2b6bc47cd77d7b1dc4"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a5ce5c11cc9b9df2b6bc47cd77d7b1dc4">&#9670;&#160;</a></span>PublishAsync</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">struct <a class="el" href="structjs_options_1_1js_options_publish_async.html">jsOptions::jsOptionsPublishAsync</a> jsOptions::PublishAsync</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ae50544ee0ef8dd7d02ef9802805807ae" name="ae50544ee0ef8dd7d02ef9802805807ae"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ae50544ee0ef8dd7d02ef9802805807ae">&#9670;&#160;</a></span>Stream</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">struct <a class="el" href="structjs_options_1_1js_options_stream.html">jsOptions::jsOptionsStream</a> jsOptions::Stream</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_options.html">jsOptions</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_options.js b/doc/html/structjs_options.js
new file mode 100644 (file)
index 0000000..a2a5c57
--- /dev/null
@@ -0,0 +1,10 @@
+var structjs_options =
+[
+    [ "jsOptionsPublishAsync", "structjs_options_1_1js_options_publish_async.html", "structjs_options_1_1js_options_publish_async" ],
+    [ "jsOptionsStream", "structjs_options_1_1js_options_stream.html", "structjs_options_1_1js_options_stream" ],
+    [ "Prefix", "structjs_options.html#ab06e45296fccf0fe6152e083e38d916f", null ],
+    [ "Domain", "structjs_options.html#ae4df6c9c01c0ea9ab0e6d5a6ec8af74e", null ],
+    [ "Wait", "structjs_options.html#a7fd42e1f83da5861e716137c16f8b72f", null ],
+    [ "PublishAsync", "structjs_options.html#a5ce5c11cc9b9df2b6bc47cd77d7b1dc4", null ],
+    [ "Stream", "structjs_options.html#ae50544ee0ef8dd7d02ef9802805807ae", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_options_1_1js_options_publish_async-members.html b/doc/html/structjs_options_1_1js_options_publish_async-members.html
new file mode 100644 (file)
index 0000000..544ce79
--- /dev/null
@@ -0,0 +1,118 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_options_1_1js_options_publish_async.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsOptions::jsOptionsPublishAsync Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_options_1_1js_options_publish_async.html">jsOptions::jsOptionsPublishAsync</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_options_1_1js_options_publish_async.html#a508140119f40a2c056d4ee8c0cd55df9">AckHandler</a></td><td class="entry"><a class="el" href="structjs_options_1_1js_options_publish_async.html">jsOptions::jsOptionsPublishAsync</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_options_1_1js_options_publish_async.html#a60c95f10797c04ea2e625759c6936ec9">AckHandlerClosure</a></td><td class="entry"><a class="el" href="structjs_options_1_1js_options_publish_async.html">jsOptions::jsOptionsPublishAsync</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_options_1_1js_options_publish_async.html#a0a180995c49990ca277e449b7d43616b">ErrHandler</a></td><td class="entry"><a class="el" href="structjs_options_1_1js_options_publish_async.html">jsOptions::jsOptionsPublishAsync</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_options_1_1js_options_publish_async.html#a784a0029c30e82ff37c39ae6c276bc81">ErrHandlerClosure</a></td><td class="entry"><a class="el" href="structjs_options_1_1js_options_publish_async.html">jsOptions::jsOptionsPublishAsync</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_options_1_1js_options_publish_async.html#add8dd21cbab2d5df19688c26365fe4d1">MaxPending</a></td><td class="entry"><a class="el" href="structjs_options_1_1js_options_publish_async.html">jsOptions::jsOptionsPublishAsync</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_options_1_1js_options_publish_async.html#ada58fefe0ed40157b5f5d44b9dd175f9">StallWait</a></td><td class="entry"><a class="el" href="structjs_options_1_1js_options_publish_async.html">jsOptions::jsOptionsPublishAsync</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_options_1_1js_options_publish_async.html b/doc/html/structjs_options_1_1js_options_publish_async.html
new file mode 100644 (file)
index 0000000..a46b62f
--- /dev/null
@@ -0,0 +1,227 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsOptions::jsOptionsPublishAsync Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_options_1_1js_options_publish_async.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_options_1_1js_options_publish_async-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsOptions::jsOptionsPublishAsync Struct Reference</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:add8dd21cbab2d5df19688c26365fe4d1"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_options_1_1js_options_publish_async.html#add8dd21cbab2d5df19688c26365fe4d1">MaxPending</a></td></tr>
+<tr class="memdesc:add8dd21cbab2d5df19688c26365fe4d1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum outstanding asynchronous publishes that can be inflight at one time.  <a href="structjs_options_1_1js_options_publish_async.html#add8dd21cbab2d5df19688c26365fe4d1">More...</a><br /></td></tr>
+<tr class="separator:add8dd21cbab2d5df19688c26365fe4d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a508140119f40a2c056d4ee8c0cd55df9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__callbacks_group.html#ga4f66e065bd918f02510d4c53d8a5b729">jsPubAckHandler</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_options_1_1js_options_publish_async.html#a508140119f40a2c056d4ee8c0cd55df9">AckHandler</a></td></tr>
+<tr class="memdesc:a508140119f40a2c056d4ee8c0cd55df9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback invoked for each asynchronous published message.  <a href="structjs_options_1_1js_options_publish_async.html#a508140119f40a2c056d4ee8c0cd55df9">More...</a><br /></td></tr>
+<tr class="separator:a508140119f40a2c056d4ee8c0cd55df9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a60c95f10797c04ea2e625759c6936ec9"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_options_1_1js_options_publish_async.html#a60c95f10797c04ea2e625759c6936ec9">AckHandlerClosure</a></td></tr>
+<tr class="memdesc:a60c95f10797c04ea2e625759c6936ec9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Closure (or user data) passed to <a class="el" href="group__callbacks_group.html#ga4f66e065bd918f02510d4c53d8a5b729" title="Callback used to process asynchronous publish responses from JetStream.">jsPubAckHandler</a> callback.  <a href="structjs_options_1_1js_options_publish_async.html#a60c95f10797c04ea2e625759c6936ec9">More...</a><br /></td></tr>
+<tr class="separator:a60c95f10797c04ea2e625759c6936ec9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a0a180995c49990ca277e449b7d43616b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__callbacks_group.html#ga954768cc1d3388bb6ab723e777647992">jsPubAckErrHandler</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_options_1_1js_options_publish_async.html#a0a180995c49990ca277e449b7d43616b">ErrHandler</a></td></tr>
+<tr class="memdesc:a0a180995c49990ca277e449b7d43616b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback invoked when error encountered publishing a given message.  <a href="structjs_options_1_1js_options_publish_async.html#a0a180995c49990ca277e449b7d43616b">More...</a><br /></td></tr>
+<tr class="separator:a0a180995c49990ca277e449b7d43616b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a784a0029c30e82ff37c39ae6c276bc81"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_options_1_1js_options_publish_async.html#a784a0029c30e82ff37c39ae6c276bc81">ErrHandlerClosure</a></td></tr>
+<tr class="memdesc:a784a0029c30e82ff37c39ae6c276bc81"><td class="mdescLeft">&#160;</td><td class="mdescRight">Closure (or user data) passed to <a class="el" href="group__callbacks_group.html#ga954768cc1d3388bb6ab723e777647992" title="Callback used to process asynchronous publish errors from JetStream.">jsPubAckErrHandler</a> callback.  <a href="structjs_options_1_1js_options_publish_async.html#a784a0029c30e82ff37c39ae6c276bc81">More...</a><br /></td></tr>
+<tr class="separator:a784a0029c30e82ff37c39ae6c276bc81"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ada58fefe0ed40157b5f5d44b9dd175f9"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_options_1_1js_options_publish_async.html#ada58fefe0ed40157b5f5d44b9dd175f9">StallWait</a></td></tr>
+<tr class="memdesc:ada58fefe0ed40157b5f5d44b9dd175f9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Amount of time (in milliseconds) to wait in a PublishAsync call when there is MaxPending inflight messages, default is 200 ms.  <a href="structjs_options_1_1js_options_publish_async.html#ada58fefe0ed40157b5f5d44b9dd175f9">More...</a><br /></td></tr>
+<tr class="separator:ada58fefe0ed40157b5f5d44b9dd175f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >Publish Async options </p>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="add8dd21cbab2d5df19688c26365fe4d1" name="add8dd21cbab2d5df19688c26365fe4d1"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#add8dd21cbab2d5df19688c26365fe4d1">&#9670;&#160;</a></span>MaxPending</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsOptions::jsOptionsPublishAsync::MaxPending</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a508140119f40a2c056d4ee8c0cd55df9" name="a508140119f40a2c056d4ee8c0cd55df9"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a508140119f40a2c056d4ee8c0cd55df9">&#9670;&#160;</a></span>AckHandler</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="group__callbacks_group.html#ga4f66e065bd918f02510d4c53d8a5b729">jsPubAckHandler</a> jsOptions::jsOptionsPublishAsync::AckHandler</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a60c95f10797c04ea2e625759c6936ec9" name="a60c95f10797c04ea2e625759c6936ec9"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a60c95f10797c04ea2e625759c6936ec9">&#9670;&#160;</a></span>AckHandlerClosure</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void* jsOptions::jsOptionsPublishAsync::AckHandlerClosure</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a0a180995c49990ca277e449b7d43616b" name="a0a180995c49990ca277e449b7d43616b"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a0a180995c49990ca277e449b7d43616b">&#9670;&#160;</a></span>ErrHandler</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="group__callbacks_group.html#ga954768cc1d3388bb6ab723e777647992">jsPubAckErrHandler</a> jsOptions::jsOptionsPublishAsync::ErrHandler</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a784a0029c30e82ff37c39ae6c276bc81" name="a784a0029c30e82ff37c39ae6c276bc81"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a784a0029c30e82ff37c39ae6c276bc81">&#9670;&#160;</a></span>ErrHandlerClosure</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void* jsOptions::jsOptionsPublishAsync::ErrHandlerClosure</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ada58fefe0ed40157b5f5d44b9dd175f9" name="ada58fefe0ed40157b5f5d44b9dd175f9"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ada58fefe0ed40157b5f5d44b9dd175f9">&#9670;&#160;</a></span>StallWait</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsOptions::jsOptionsPublishAsync::StallWait</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_options.html">jsOptions</a></li><li class="navelem"><a class="el" href="structjs_options_1_1js_options_publish_async.html">jsOptionsPublishAsync</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_options_1_1js_options_publish_async.js b/doc/html/structjs_options_1_1js_options_publish_async.js
new file mode 100644 (file)
index 0000000..5d88506
--- /dev/null
@@ -0,0 +1,9 @@
+var structjs_options_1_1js_options_publish_async =
+[
+    [ "MaxPending", "structjs_options_1_1js_options_publish_async.html#add8dd21cbab2d5df19688c26365fe4d1", null ],
+    [ "AckHandler", "structjs_options_1_1js_options_publish_async.html#a508140119f40a2c056d4ee8c0cd55df9", null ],
+    [ "AckHandlerClosure", "structjs_options_1_1js_options_publish_async.html#a60c95f10797c04ea2e625759c6936ec9", null ],
+    [ "ErrHandler", "structjs_options_1_1js_options_publish_async.html#a0a180995c49990ca277e449b7d43616b", null ],
+    [ "ErrHandlerClosure", "structjs_options_1_1js_options_publish_async.html#a784a0029c30e82ff37c39ae6c276bc81", null ],
+    [ "StallWait", "structjs_options_1_1js_options_publish_async.html#ada58fefe0ed40157b5f5d44b9dd175f9", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_options_1_1js_options_stream-members.html b/doc/html/structjs_options_1_1js_options_stream-members.html
new file mode 100644 (file)
index 0000000..711d9b4
--- /dev/null
@@ -0,0 +1,114 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_options_1_1js_options_stream.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsOptions::jsOptionsStream Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_options_1_1js_options_stream.html">jsOptions::jsOptionsStream</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_options_1_1js_options_stream.html#a2ca89c298b4df1f5e3e0a44e205c789c">Info</a></td><td class="entry"><a class="el" href="structjs_options_1_1js_options_stream.html">jsOptions::jsOptionsStream</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_options_1_1js_options_stream.html#afe680264223b434ca6959f9e122af029">Purge</a></td><td class="entry"><a class="el" href="structjs_options_1_1js_options_stream.html">jsOptions::jsOptionsStream</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_options_1_1js_options_stream.html b/doc/html/structjs_options_1_1js_options_stream.html
new file mode 100644 (file)
index 0000000..9a4e35d
--- /dev/null
@@ -0,0 +1,171 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsOptions::jsOptionsStream Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_options_1_1js_options_stream.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#nested-classes">Classes</a> &#124;
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_options_1_1js_options_stream-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsOptions::jsOptionsStream Struct Reference</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
+Classes</h2></td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_info.html">jsOptionsStreamInfo</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html">jsOptionsStreamPurge</a></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:afe680264223b434ca6959f9e122af029"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html">jsOptions::jsOptionsStream::jsOptionsStreamPurge</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_options_1_1js_options_stream.html#afe680264223b434ca6959f9e122af029">Purge</a></td></tr>
+<tr class="memdesc:afe680264223b434ca6959f9e122af029"><td class="mdescLeft">&#160;</td><td class="mdescRight">Optional stream purge options.  <a href="structjs_options_1_1js_options_stream.html#afe680264223b434ca6959f9e122af029">More...</a><br /></td></tr>
+<tr class="separator:afe680264223b434ca6959f9e122af029"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a2ca89c298b4df1f5e3e0a44e205c789c"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_info.html">jsOptions::jsOptionsStream::jsOptionsStreamInfo</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_options_1_1js_options_stream.html#a2ca89c298b4df1f5e3e0a44e205c789c">Info</a></td></tr>
+<tr class="memdesc:a2ca89c298b4df1f5e3e0a44e205c789c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Optional stream information retrieval options.  <a href="structjs_options_1_1js_options_stream.html#a2ca89c298b4df1f5e3e0a44e205c789c">More...</a><br /></td></tr>
+<tr class="separator:a2ca89c298b4df1f5e3e0a44e205c789c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >Advanced stream options</p>
+<ul>
+<li><code>Purge</code> for advanced purge options.</li>
+<li><code>Info</code> for advanced information retrieval options. </li>
+</ul>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="afe680264223b434ca6959f9e122af029" name="afe680264223b434ca6959f9e122af029"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#afe680264223b434ca6959f9e122af029">&#9670;&#160;</a></span>Purge</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">struct <a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html">jsOptions::jsOptionsStream::jsOptionsStreamPurge</a> jsOptions::jsOptionsStream::Purge</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a2ca89c298b4df1f5e3e0a44e205c789c" name="a2ca89c298b4df1f5e3e0a44e205c789c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a2ca89c298b4df1f5e3e0a44e205c789c">&#9670;&#160;</a></span>Info</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">struct <a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_info.html">jsOptions::jsOptionsStream::jsOptionsStreamInfo</a> jsOptions::jsOptionsStream::Info</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_options.html">jsOptions</a></li><li class="navelem"><a class="el" href="structjs_options_1_1js_options_stream.html">jsOptionsStream</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_options_1_1js_options_stream.js b/doc/html/structjs_options_1_1js_options_stream.js
new file mode 100644 (file)
index 0000000..2e350c0
--- /dev/null
@@ -0,0 +1,7 @@
+var structjs_options_1_1js_options_stream =
+[
+    [ "jsOptionsStreamInfo", "structjs_options_1_1js_options_stream_1_1js_options_stream_info.html", "structjs_options_1_1js_options_stream_1_1js_options_stream_info" ],
+    [ "jsOptionsStreamPurge", "structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html", "structjs_options_1_1js_options_stream_1_1js_options_stream_purge" ],
+    [ "Purge", "structjs_options_1_1js_options_stream.html#afe680264223b434ca6959f9e122af029", null ],
+    [ "Info", "structjs_options_1_1js_options_stream.html#a2ca89c298b4df1f5e3e0a44e205c789c", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_options_1_1js_options_stream_1_1js_options_stream_info-members.html b/doc/html/structjs_options_1_1js_options_stream_1_1js_options_stream_info-members.html
new file mode 100644 (file)
index 0000000..72d502b
--- /dev/null
@@ -0,0 +1,114 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_options_1_1js_options_stream_1_1js_options_stream_info.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsOptions::jsOptionsStream::jsOptionsStreamInfo Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_info.html">jsOptions::jsOptionsStream::jsOptionsStreamInfo</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_info.html#a73f847afe18f56eaaf6788900270bef7">DeletedDetails</a></td><td class="entry"><a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_info.html">jsOptions::jsOptionsStream::jsOptionsStreamInfo</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_info.html#af874e0f5aa15fb2a41504631ed786e6d">SubjectsFilter</a></td><td class="entry"><a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_info.html">jsOptions::jsOptionsStream::jsOptionsStreamInfo</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_options_1_1js_options_stream_1_1js_options_stream_info.html b/doc/html/structjs_options_1_1js_options_stream_1_1js_options_stream_info.html
new file mode 100644 (file)
index 0000000..b6d78aa
--- /dev/null
@@ -0,0 +1,159 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsOptions::jsOptionsStream::jsOptionsStreamInfo Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_options_1_1js_options_stream_1_1js_options_stream_info.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_options_1_1js_options_stream_1_1js_options_stream_info-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsOptions::jsOptionsStream::jsOptionsStreamInfo Struct Reference</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:a73f847afe18f56eaaf6788900270bef7"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_info.html#a73f847afe18f56eaaf6788900270bef7">DeletedDetails</a></td></tr>
+<tr class="memdesc:a73f847afe18f56eaaf6788900270bef7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the list of deleted message sequences.  <a href="structjs_options_1_1js_options_stream_1_1js_options_stream_info.html#a73f847afe18f56eaaf6788900270bef7">More...</a><br /></td></tr>
+<tr class="separator:a73f847afe18f56eaaf6788900270bef7"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:af874e0f5aa15fb2a41504631ed786e6d"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_info.html#af874e0f5aa15fb2a41504631ed786e6d">SubjectsFilter</a></td></tr>
+<tr class="memdesc:af874e0f5aa15fb2a41504631ed786e6d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the list of subjects in this stream.  <a href="structjs_options_1_1js_options_stream_1_1js_options_stream_info.html#af874e0f5aa15fb2a41504631ed786e6d">More...</a><br /></td></tr>
+<tr class="separator:af874e0f5aa15fb2a41504631ed786e6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >Advance stream information retrieval options </p>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="a73f847afe18f56eaaf6788900270bef7" name="a73f847afe18f56eaaf6788900270bef7"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a73f847afe18f56eaaf6788900270bef7">&#9670;&#160;</a></span>DeletedDetails</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool jsOptions::jsOptionsStream::jsOptionsStreamInfo::DeletedDetails</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="af874e0f5aa15fb2a41504631ed786e6d" name="af874e0f5aa15fb2a41504631ed786e6d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#af874e0f5aa15fb2a41504631ed786e6d">&#9670;&#160;</a></span>SubjectsFilter</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* jsOptions::jsOptionsStream::jsOptionsStreamInfo::SubjectsFilter</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_options.html">jsOptions</a></li><li class="navelem"><a class="el" href="structjs_options_1_1js_options_stream.html">jsOptionsStream</a></li><li class="navelem"><a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_info.html">jsOptionsStreamInfo</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_options_1_1js_options_stream_1_1js_options_stream_info.js b/doc/html/structjs_options_1_1js_options_stream_1_1js_options_stream_info.js
new file mode 100644 (file)
index 0000000..b78664d
--- /dev/null
@@ -0,0 +1,5 @@
+var structjs_options_1_1js_options_stream_1_1js_options_stream_info =
+[
+    [ "DeletedDetails", "structjs_options_1_1js_options_stream_1_1js_options_stream_info.html#a73f847afe18f56eaaf6788900270bef7", null ],
+    [ "SubjectsFilter", "structjs_options_1_1js_options_stream_1_1js_options_stream_info.html#af874e0f5aa15fb2a41504631ed786e6d", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_options_1_1js_options_stream_1_1js_options_stream_purge-members.html b/doc/html/structjs_options_1_1js_options_stream_1_1js_options_stream_purge-members.html
new file mode 100644 (file)
index 0000000..77dcba7
--- /dev/null
@@ -0,0 +1,115 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsOptions::jsOptionsStream::jsOptionsStreamPurge Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html">jsOptions::jsOptionsStream::jsOptionsStreamPurge</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#a882c1ce1e636817450893caa72aa4eda">Keep</a></td><td class="entry"><a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html">jsOptions::jsOptionsStream::jsOptionsStreamPurge</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#a0d61e5d3c9c518f455549086ababe7f6">Sequence</a></td><td class="entry"><a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html">jsOptions::jsOptionsStream::jsOptionsStreamPurge</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#aa99e6ee3bef1c22243f01544181315fe">Subject</a></td><td class="entry"><a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html">jsOptions::jsOptionsStream::jsOptionsStreamPurge</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html b/doc/html/structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html
new file mode 100644 (file)
index 0000000..064e8da
--- /dev/null
@@ -0,0 +1,185 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsOptions::jsOptionsStream::jsOptionsStreamPurge Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsOptions::jsOptionsStream::jsOptionsStreamPurge Struct Reference</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:aa99e6ee3bef1c22243f01544181315fe"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#aa99e6ee3bef1c22243f01544181315fe">Subject</a></td></tr>
+<tr class="memdesc:aa99e6ee3bef1c22243f01544181315fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is the subject to match against messages for the purge command.  <a href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#aa99e6ee3bef1c22243f01544181315fe">More...</a><br /></td></tr>
+<tr class="separator:aa99e6ee3bef1c22243f01544181315fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a0d61e5d3c9c518f455549086ababe7f6"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#a0d61e5d3c9c518f455549086ababe7f6">Sequence</a></td></tr>
+<tr class="memdesc:a0d61e5d3c9c518f455549086ababe7f6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Purge up to but not including sequence.  <a href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#a0d61e5d3c9c518f455549086ababe7f6">More...</a><br /></td></tr>
+<tr class="separator:a0d61e5d3c9c518f455549086ababe7f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a882c1ce1e636817450893caa72aa4eda"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#a882c1ce1e636817450893caa72aa4eda">Keep</a></td></tr>
+<tr class="memdesc:a882c1ce1e636817450893caa72aa4eda"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of messages to keep.  <a href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#a882c1ce1e636817450893caa72aa4eda">More...</a><br /></td></tr>
+<tr class="separator:a882c1ce1e636817450893caa72aa4eda"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >Advanced stream purge options</p>
+<ul>
+<li><code>Subject</code> will filter the purge request to only messages that match the subject, which can have wildcards.<br  />
+</li>
+<li><code>Sequence</code> will purge up to but not including this sequence and can be combined with subject filtering.<br  />
+</li>
+<li><code>Keep</code> will specify how many messages to keep and can be combined with subject filtering.<br  />
+</li>
+</ul>
+<dl class="section note"><dt>Note</dt><dd><code>Sequence</code> and <code>Keep</code> are mutually exclusive, so both can not be set at the same time. </dd></dl>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="aa99e6ee3bef1c22243f01544181315fe" name="aa99e6ee3bef1c22243f01544181315fe"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aa99e6ee3bef1c22243f01544181315fe">&#9670;&#160;</a></span>Subject</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* jsOptions::jsOptionsStream::jsOptionsStreamPurge::Subject</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a0d61e5d3c9c518f455549086ababe7f6" name="a0d61e5d3c9c518f455549086ababe7f6"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a0d61e5d3c9c518f455549086ababe7f6">&#9670;&#160;</a></span>Sequence</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t jsOptions::jsOptionsStream::jsOptionsStreamPurge::Sequence</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a882c1ce1e636817450893caa72aa4eda" name="a882c1ce1e636817450893caa72aa4eda"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a882c1ce1e636817450893caa72aa4eda">&#9670;&#160;</a></span>Keep</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t jsOptions::jsOptionsStream::jsOptionsStreamPurge::Keep</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_options.html">jsOptions</a></li><li class="navelem"><a class="el" href="structjs_options_1_1js_options_stream.html">jsOptionsStream</a></li><li class="navelem"><a class="el" href="structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html">jsOptionsStreamPurge</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_options_1_1js_options_stream_1_1js_options_stream_purge.js b/doc/html/structjs_options_1_1js_options_stream_1_1js_options_stream_purge.js
new file mode 100644 (file)
index 0000000..df5211a
--- /dev/null
@@ -0,0 +1,6 @@
+var structjs_options_1_1js_options_stream_1_1js_options_stream_purge =
+[
+    [ "Subject", "structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#aa99e6ee3bef1c22243f01544181315fe", null ],
+    [ "Sequence", "structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#a0d61e5d3c9c518f455549086ababe7f6", null ],
+    [ "Keep", "structjs_options_1_1js_options_stream_1_1js_options_stream_purge.html#a882c1ce1e636817450893caa72aa4eda", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_peer_info-members.html b/doc/html/structjs_peer_info-members.html
new file mode 100644 (file)
index 0000000..4405a52
--- /dev/null
@@ -0,0 +1,117 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_peer_info.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsPeerInfo Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_peer_info.html">jsPeerInfo</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_peer_info.html#a8441d023932c388953197f7ea39402fe">Active</a></td><td class="entry"><a class="el" href="structjs_peer_info.html">jsPeerInfo</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_peer_info.html#ad8cecd039a8ad1c68daba89007b055d4">Current</a></td><td class="entry"><a class="el" href="structjs_peer_info.html">jsPeerInfo</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_peer_info.html#a49a2623963dad653a6d7996c750056c9">Lag</a></td><td class="entry"><a class="el" href="structjs_peer_info.html">jsPeerInfo</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_peer_info.html#abf29230ce03a1c14d50227663e07de6a">Name</a></td><td class="entry"><a class="el" href="structjs_peer_info.html">jsPeerInfo</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_peer_info.html#a3f3e09c5996858ec5faca2dc7fa5224e">Offline</a></td><td class="entry"><a class="el" href="structjs_peer_info.html">jsPeerInfo</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_peer_info.html b/doc/html/structjs_peer_info.html
new file mode 100644 (file)
index 0000000..fb1129c
--- /dev/null
@@ -0,0 +1,205 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsPeerInfo Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_peer_info.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_peer_info-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsPeerInfo Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:abf29230ce03a1c14d50227663e07de6a"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_peer_info.html#abf29230ce03a1c14d50227663e07de6a">Name</a></td></tr>
+<tr class="separator:abf29230ce03a1c14d50227663e07de6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ad8cecd039a8ad1c68daba89007b055d4"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_peer_info.html#ad8cecd039a8ad1c68daba89007b055d4">Current</a></td></tr>
+<tr class="separator:ad8cecd039a8ad1c68daba89007b055d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a3f3e09c5996858ec5faca2dc7fa5224e"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_peer_info.html#a3f3e09c5996858ec5faca2dc7fa5224e">Offline</a></td></tr>
+<tr class="separator:a3f3e09c5996858ec5faca2dc7fa5224e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a8441d023932c388953197f7ea39402fe"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_peer_info.html#a8441d023932c388953197f7ea39402fe">Active</a></td></tr>
+<tr class="separator:a8441d023932c388953197f7ea39402fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a49a2623963dad653a6d7996c750056c9"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_peer_info.html#a49a2623963dad653a6d7996c750056c9">Lag</a></td></tr>
+<tr class="separator:a49a2623963dad653a6d7996c750056c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >Information about all the peers in the cluster that are supporting the stream or consumer. </p>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="abf29230ce03a1c14d50227663e07de6a" name="abf29230ce03a1c14d50227663e07de6a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#abf29230ce03a1c14d50227663e07de6a">&#9670;&#160;</a></span>Name</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">char* jsPeerInfo::Name</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ad8cecd039a8ad1c68daba89007b055d4" name="ad8cecd039a8ad1c68daba89007b055d4"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ad8cecd039a8ad1c68daba89007b055d4">&#9670;&#160;</a></span>Current</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool jsPeerInfo::Current</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a3f3e09c5996858ec5faca2dc7fa5224e" name="a3f3e09c5996858ec5faca2dc7fa5224e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a3f3e09c5996858ec5faca2dc7fa5224e">&#9670;&#160;</a></span>Offline</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool jsPeerInfo::Offline</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a8441d023932c388953197f7ea39402fe" name="a8441d023932c388953197f7ea39402fe"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a8441d023932c388953197f7ea39402fe">&#9670;&#160;</a></span>Active</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsPeerInfo::Active</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a49a2623963dad653a6d7996c750056c9" name="a49a2623963dad653a6d7996c750056c9"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a49a2623963dad653a6d7996c750056c9">&#9670;&#160;</a></span>Lag</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t jsPeerInfo::Lag</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_peer_info.html">jsPeerInfo</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_peer_info.js b/doc/html/structjs_peer_info.js
new file mode 100644 (file)
index 0000000..69c5525
--- /dev/null
@@ -0,0 +1,8 @@
+var structjs_peer_info =
+[
+    [ "Name", "structjs_peer_info.html#abf29230ce03a1c14d50227663e07de6a", null ],
+    [ "Current", "structjs_peer_info.html#ad8cecd039a8ad1c68daba89007b055d4", null ],
+    [ "Offline", "structjs_peer_info.html#a3f3e09c5996858ec5faca2dc7fa5224e", null ],
+    [ "Active", "structjs_peer_info.html#a8441d023932c388953197f7ea39402fe", null ],
+    [ "Lag", "structjs_peer_info.html#a49a2623963dad653a6d7996c750056c9", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_placement-members.html b/doc/html/structjs_placement-members.html
new file mode 100644 (file)
index 0000000..f321537
--- /dev/null
@@ -0,0 +1,115 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_placement.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsPlacement Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_placement.html">jsPlacement</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_placement.html#ad8c83588d57f0e30959cfb6f3d5d61bf">Cluster</a></td><td class="entry"><a class="el" href="structjs_placement.html">jsPlacement</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_placement.html#af078a85b744b9ff3771bb2da6005b90d">Tags</a></td><td class="entry"><a class="el" href="structjs_placement.html">jsPlacement</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_placement.html#a35644f07531409518521b1b4fa28c9e3">TagsLen</a></td><td class="entry"><a class="el" href="structjs_placement.html">jsPlacement</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_placement.html b/doc/html/structjs_placement.html
new file mode 100644 (file)
index 0000000..81ed1f0
--- /dev/null
@@ -0,0 +1,177 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsPlacement Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_placement.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_placement-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsPlacement Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:ad8c83588d57f0e30959cfb6f3d5d61bf"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_placement.html#ad8c83588d57f0e30959cfb6f3d5d61bf">Cluster</a></td></tr>
+<tr class="separator:ad8c83588d57f0e30959cfb6f3d5d61bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:af078a85b744b9ff3771bb2da6005b90d"><td class="memItemLeft" align="right" valign="top">const char **&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_placement.html#af078a85b744b9ff3771bb2da6005b90d">Tags</a></td></tr>
+<tr class="separator:af078a85b744b9ff3771bb2da6005b90d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a35644f07531409518521b1b4fa28c9e3"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_placement.html#a35644f07531409518521b1b4fa28c9e3">TagsLen</a></td></tr>
+<tr class="separator:a35644f07531409518521b1b4fa28c9e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >Used to guide placement of streams in clustered JetStream.</p>
+<p >Initialize the object with <a class="el" href="group__js_assets_group.html#ga223691e6831072a0b8f8103a778293b0" title="Initializes a placement configuration structure.">jsPlacement_Init</a>.</p>
+<dl class="section note"><dt>Note</dt><dd>The strings are applications owned and will not be freed by the library.</dd></dl>
+<p>See <a class="el" href="structjs_stream_config.html">jsStreamConfig</a> for information on how to configure a stream.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__js_assets_group.html#ga223691e6831072a0b8f8103a778293b0" title="Initializes a placement configuration structure.">jsPlacement_Init</a> </dd></dl>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="ad8c83588d57f0e30959cfb6f3d5d61bf" name="ad8c83588d57f0e30959cfb6f3d5d61bf"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ad8c83588d57f0e30959cfb6f3d5d61bf">&#9670;&#160;</a></span>Cluster</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* jsPlacement::Cluster</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="af078a85b744b9ff3771bb2da6005b90d" name="af078a85b744b9ff3771bb2da6005b90d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#af078a85b744b9ff3771bb2da6005b90d">&#9670;&#160;</a></span>Tags</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char** jsPlacement::Tags</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a35644f07531409518521b1b4fa28c9e3" name="a35644f07531409518521b1b4fa28c9e3"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a35644f07531409518521b1b4fa28c9e3">&#9670;&#160;</a></span>TagsLen</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int jsPlacement::TagsLen</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_placement.html">jsPlacement</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_placement.js b/doc/html/structjs_placement.js
new file mode 100644 (file)
index 0000000..a7ca1fd
--- /dev/null
@@ -0,0 +1,6 @@
+var structjs_placement =
+[
+    [ "Cluster", "structjs_placement.html#ad8c83588d57f0e30959cfb6f3d5d61bf", null ],
+    [ "Tags", "structjs_placement.html#af078a85b744b9ff3771bb2da6005b90d", null ],
+    [ "TagsLen", "structjs_placement.html#a35644f07531409518521b1b4fa28c9e3", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_pub_ack-members.html b/doc/html/structjs_pub_ack-members.html
new file mode 100644 (file)
index 0000000..34f10d5
--- /dev/null
@@ -0,0 +1,116 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_pub_ack.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsPubAck Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_pub_ack.html">jsPubAck</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_pub_ack.html#a0b73200c0b035db3c9c96421706d51b0">Domain</a></td><td class="entry"><a class="el" href="structjs_pub_ack.html">jsPubAck</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_pub_ack.html#a0381a49ff62e8fac7a52cad6a5eb7243">Duplicate</a></td><td class="entry"><a class="el" href="structjs_pub_ack.html">jsPubAck</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_pub_ack.html#a01d302d5e1a2e71487a8c74c3fed1691">Sequence</a></td><td class="entry"><a class="el" href="structjs_pub_ack.html">jsPubAck</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_pub_ack.html#a4fd5e6cdb7217d72c553afcc75358893">Stream</a></td><td class="entry"><a class="el" href="structjs_pub_ack.html">jsPubAck</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_pub_ack.html b/doc/html/structjs_pub_ack.html
new file mode 100644 (file)
index 0000000..e2df044
--- /dev/null
@@ -0,0 +1,189 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsPubAck Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_pub_ack.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_pub_ack-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsPubAck Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:a4fd5e6cdb7217d72c553afcc75358893"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_pub_ack.html#a4fd5e6cdb7217d72c553afcc75358893">Stream</a></td></tr>
+<tr class="separator:a4fd5e6cdb7217d72c553afcc75358893"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a01d302d5e1a2e71487a8c74c3fed1691"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_pub_ack.html#a01d302d5e1a2e71487a8c74c3fed1691">Sequence</a></td></tr>
+<tr class="separator:a01d302d5e1a2e71487a8c74c3fed1691"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a0b73200c0b035db3c9c96421706d51b0"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_pub_ack.html#a0b73200c0b035db3c9c96421706d51b0">Domain</a></td></tr>
+<tr class="separator:a0b73200c0b035db3c9c96421706d51b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a0381a49ff62e8fac7a52cad6a5eb7243"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_pub_ack.html#a0381a49ff62e8fac7a52cad6a5eb7243">Duplicate</a></td></tr>
+<tr class="separator:a0381a49ff62e8fac7a52cad6a5eb7243"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >Ack received after successfully publishing a message. </p>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="a4fd5e6cdb7217d72c553afcc75358893" name="a4fd5e6cdb7217d72c553afcc75358893"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a4fd5e6cdb7217d72c553afcc75358893">&#9670;&#160;</a></span>Stream</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">char* jsPubAck::Stream</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a01d302d5e1a2e71487a8c74c3fed1691" name="a01d302d5e1a2e71487a8c74c3fed1691"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a01d302d5e1a2e71487a8c74c3fed1691">&#9670;&#160;</a></span>Sequence</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t jsPubAck::Sequence</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a0b73200c0b035db3c9c96421706d51b0" name="a0b73200c0b035db3c9c96421706d51b0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a0b73200c0b035db3c9c96421706d51b0">&#9670;&#160;</a></span>Domain</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">char* jsPubAck::Domain</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a0381a49ff62e8fac7a52cad6a5eb7243" name="a0381a49ff62e8fac7a52cad6a5eb7243"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a0381a49ff62e8fac7a52cad6a5eb7243">&#9670;&#160;</a></span>Duplicate</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool jsPubAck::Duplicate</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_pub_ack.html">jsPubAck</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_pub_ack.js b/doc/html/structjs_pub_ack.js
new file mode 100644 (file)
index 0000000..2a18262
--- /dev/null
@@ -0,0 +1,7 @@
+var structjs_pub_ack =
+[
+    [ "Stream", "structjs_pub_ack.html#a4fd5e6cdb7217d72c553afcc75358893", null ],
+    [ "Sequence", "structjs_pub_ack.html#a01d302d5e1a2e71487a8c74c3fed1691", null ],
+    [ "Domain", "structjs_pub_ack.html#a0b73200c0b035db3c9c96421706d51b0", null ],
+    [ "Duplicate", "structjs_pub_ack.html#a0381a49ff62e8fac7a52cad6a5eb7243", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_pub_ack_err-members.html b/doc/html/structjs_pub_ack_err-members.html
new file mode 100644 (file)
index 0000000..4fb5bb3
--- /dev/null
@@ -0,0 +1,116 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_pub_ack_err.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsPubAckErr Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_pub_ack_err.html">jsPubAckErr</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_pub_ack_err.html#a406e39e818f93bc59ac18cbdf035baf5">Err</a></td><td class="entry"><a class="el" href="structjs_pub_ack_err.html">jsPubAckErr</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_pub_ack_err.html#aa558fd192cc6d6c02ad891445ec5aa8a">ErrCode</a></td><td class="entry"><a class="el" href="structjs_pub_ack_err.html">jsPubAckErr</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_pub_ack_err.html#ad1a85e6ff4046d7df33c1e24323ddc87">ErrText</a></td><td class="entry"><a class="el" href="structjs_pub_ack_err.html">jsPubAckErr</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_pub_ack_err.html#a156ca2f779d132ffa8c519124cf9739b">Msg</a></td><td class="entry"><a class="el" href="structjs_pub_ack_err.html">jsPubAckErr</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_pub_ack_err.html b/doc/html/structjs_pub_ack_err.html
new file mode 100644 (file)
index 0000000..96f0737
--- /dev/null
@@ -0,0 +1,189 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsPubAckErr Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_pub_ack_err.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_pub_ack_err-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsPubAckErr Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:a156ca2f779d132ffa8c519124cf9739b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_pub_ack_err.html#a156ca2f779d132ffa8c519124cf9739b">Msg</a></td></tr>
+<tr class="separator:a156ca2f779d132ffa8c519124cf9739b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a406e39e818f93bc59ac18cbdf035baf5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_pub_ack_err.html#a406e39e818f93bc59ac18cbdf035baf5">Err</a></td></tr>
+<tr class="separator:a406e39e818f93bc59ac18cbdf035baf5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aa558fd192cc6d6c02ad891445ec5aa8a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_pub_ack_err.html#aa558fd192cc6d6c02ad891445ec5aa8a">ErrCode</a></td></tr>
+<tr class="separator:aa558fd192cc6d6c02ad891445ec5aa8a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ad1a85e6ff4046d7df33c1e24323ddc87"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_pub_ack_err.html#ad1a85e6ff4046d7df33c1e24323ddc87">ErrText</a></td></tr>
+<tr class="separator:ad1a85e6ff4046d7df33c1e24323ddc87"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >Publish acknowledgment failure that will be passed to the optional <a class="el" href="group__callbacks_group.html#ga954768cc1d3388bb6ab723e777647992" title="Callback used to process asynchronous publish errors from JetStream.">jsPubAckErrHandler</a> callback. </p>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="a156ca2f779d132ffa8c519124cf9739b" name="a156ca2f779d132ffa8c519124cf9739b"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a156ca2f779d132ffa8c519124cf9739b">&#9670;&#160;</a></span>Msg</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a>* jsPubAckErr::Msg</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a406e39e818f93bc59ac18cbdf035baf5" name="a406e39e818f93bc59ac18cbdf035baf5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a406e39e818f93bc59ac18cbdf035baf5">&#9670;&#160;</a></span>Err</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> jsPubAckErr::Err</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="aa558fd192cc6d6c02ad891445ec5aa8a" name="aa558fd192cc6d6c02ad891445ec5aa8a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aa558fd192cc6d6c02ad891445ec5aa8a">&#9670;&#160;</a></span>ErrCode</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="status_8h.html#a10731415ffcd3e2330df10c4d5fd3d70">jsErrCode</a> jsPubAckErr::ErrCode</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ad1a85e6ff4046d7df33c1e24323ddc87" name="ad1a85e6ff4046d7df33c1e24323ddc87"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ad1a85e6ff4046d7df33c1e24323ddc87">&#9670;&#160;</a></span>ErrText</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* jsPubAckErr::ErrText</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_pub_ack_err.html">jsPubAckErr</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_pub_ack_err.js b/doc/html/structjs_pub_ack_err.js
new file mode 100644 (file)
index 0000000..3f868ea
--- /dev/null
@@ -0,0 +1,7 @@
+var structjs_pub_ack_err =
+[
+    [ "Msg", "structjs_pub_ack_err.html#a156ca2f779d132ffa8c519124cf9739b", null ],
+    [ "Err", "structjs_pub_ack_err.html#a406e39e818f93bc59ac18cbdf035baf5", null ],
+    [ "ErrCode", "structjs_pub_ack_err.html#aa558fd192cc6d6c02ad891445ec5aa8a", null ],
+    [ "ErrText", "structjs_pub_ack_err.html#ad1a85e6ff4046d7df33c1e24323ddc87", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_pub_options-members.html b/doc/html/structjs_pub_options-members.html
new file mode 100644 (file)
index 0000000..5176411
--- /dev/null
@@ -0,0 +1,119 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_pub_options.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsPubOptions Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_pub_options.html">jsPubOptions</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_pub_options.html#a095391b33a261586fc02eaf013b65e61">ExpectLastMsgId</a></td><td class="entry"><a class="el" href="structjs_pub_options.html">jsPubOptions</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_pub_options.html#a3b02b60b05caa6d242079a4c26b181bf">ExpectLastSeq</a></td><td class="entry"><a class="el" href="structjs_pub_options.html">jsPubOptions</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_pub_options.html#aeefec1d2c7644562d23b87e55bf2e253">ExpectLastSubjectSeq</a></td><td class="entry"><a class="el" href="structjs_pub_options.html">jsPubOptions</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_pub_options.html#a740a7edee8c832a75b75fded6046ba90">ExpectNoMessage</a></td><td class="entry"><a class="el" href="structjs_pub_options.html">jsPubOptions</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_pub_options.html#ac7ac74d2557d772c3092288dacf3711f">ExpectStream</a></td><td class="entry"><a class="el" href="structjs_pub_options.html">jsPubOptions</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_pub_options.html#a1b242c9311b904a2e5337417b5c6d143">MaxWait</a></td><td class="entry"><a class="el" href="structjs_pub_options.html">jsPubOptions</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_pub_options.html#ac8708487360b784f7dd5d7a21e5617c0">MsgId</a></td><td class="entry"><a class="el" href="structjs_pub_options.html">jsPubOptions</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_pub_options.html b/doc/html/structjs_pub_options.html
new file mode 100644 (file)
index 0000000..d12bac9
--- /dev/null
@@ -0,0 +1,248 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsPubOptions Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_pub_options.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_pub_options-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsPubOptions Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:a1b242c9311b904a2e5337417b5c6d143"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_pub_options.html#a1b242c9311b904a2e5337417b5c6d143">MaxWait</a></td></tr>
+<tr class="memdesc:a1b242c9311b904a2e5337417b5c6d143"><td class="mdescLeft">&#160;</td><td class="mdescRight">Amount of time (in milliseconds) to wait for a publish response, default will the context's Wait value.  <a href="structjs_pub_options.html#a1b242c9311b904a2e5337417b5c6d143">More...</a><br /></td></tr>
+<tr class="separator:a1b242c9311b904a2e5337417b5c6d143"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ac8708487360b784f7dd5d7a21e5617c0"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_pub_options.html#ac8708487360b784f7dd5d7a21e5617c0">MsgId</a></td></tr>
+<tr class="memdesc:ac8708487360b784f7dd5d7a21e5617c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Message ID used for de-duplication.  <a href="structjs_pub_options.html#ac8708487360b784f7dd5d7a21e5617c0">More...</a><br /></td></tr>
+<tr class="separator:ac8708487360b784f7dd5d7a21e5617c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ac7ac74d2557d772c3092288dacf3711f"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_pub_options.html#ac7ac74d2557d772c3092288dacf3711f">ExpectStream</a></td></tr>
+<tr class="memdesc:ac7ac74d2557d772c3092288dacf3711f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Expected stream to respond from the publish call.  <a href="structjs_pub_options.html#ac7ac74d2557d772c3092288dacf3711f">More...</a><br /></td></tr>
+<tr class="separator:ac7ac74d2557d772c3092288dacf3711f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a095391b33a261586fc02eaf013b65e61"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_pub_options.html#a095391b33a261586fc02eaf013b65e61">ExpectLastMsgId</a></td></tr>
+<tr class="memdesc:a095391b33a261586fc02eaf013b65e61"><td class="mdescLeft">&#160;</td><td class="mdescRight">Expected last message ID in the stream.  <a href="structjs_pub_options.html#a095391b33a261586fc02eaf013b65e61">More...</a><br /></td></tr>
+<tr class="separator:a095391b33a261586fc02eaf013b65e61"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a3b02b60b05caa6d242079a4c26b181bf"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_pub_options.html#a3b02b60b05caa6d242079a4c26b181bf">ExpectLastSeq</a></td></tr>
+<tr class="memdesc:a3b02b60b05caa6d242079a4c26b181bf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Expected last message sequence in the stream.  <a href="structjs_pub_options.html#a3b02b60b05caa6d242079a4c26b181bf">More...</a><br /></td></tr>
+<tr class="separator:a3b02b60b05caa6d242079a4c26b181bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aeefec1d2c7644562d23b87e55bf2e253"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_pub_options.html#aeefec1d2c7644562d23b87e55bf2e253">ExpectLastSubjectSeq</a></td></tr>
+<tr class="memdesc:aeefec1d2c7644562d23b87e55bf2e253"><td class="mdescLeft">&#160;</td><td class="mdescRight">Expected last message sequence for the subject in the stream.  <a href="structjs_pub_options.html#aeefec1d2c7644562d23b87e55bf2e253">More...</a><br /></td></tr>
+<tr class="separator:aeefec1d2c7644562d23b87e55bf2e253"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a740a7edee8c832a75b75fded6046ba90"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_pub_options.html#a740a7edee8c832a75b75fded6046ba90">ExpectNoMessage</a></td></tr>
+<tr class="memdesc:a740a7edee8c832a75b75fded6046ba90"><td class="mdescLeft">&#160;</td><td class="mdescRight">Expected no message (that is, sequence == 0) for the subject in the stream.  <a href="structjs_pub_options.html#a740a7edee8c832a75b75fded6046ba90">More...</a><br /></td></tr>
+<tr class="separator:a740a7edee8c832a75b75fded6046ba90"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >JetStream publish options.</p>
+<p >These are options that you can provide to JetStream publish APIs.</p>
+<p >The common usage will be to initialize a structure on the stack by calling <a class="el" href="group__js_pub_group.html#gaf09f333a8675a8060c5ede07a6bdeef9" title="Initializes a publish options structure.">jsPubOptions_Init</a>. Note that strings are owned by the application and need to be valid for the duration of the API call this object is passed to.</p>
+<dl class="section note"><dt>Note</dt><dd>It is the user responsibility to free the strings if they have been allocated.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__js_pub_group.html#gaf09f333a8675a8060c5ede07a6bdeef9" title="Initializes a publish options structure.">jsPubOptions_Init</a> </dd></dl>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="a1b242c9311b904a2e5337417b5c6d143" name="a1b242c9311b904a2e5337417b5c6d143"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a1b242c9311b904a2e5337417b5c6d143">&#9670;&#160;</a></span>MaxWait</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsPubOptions::MaxWait</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ac8708487360b784f7dd5d7a21e5617c0" name="ac8708487360b784f7dd5d7a21e5617c0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ac8708487360b784f7dd5d7a21e5617c0">&#9670;&#160;</a></span>MsgId</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* jsPubOptions::MsgId</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ac7ac74d2557d772c3092288dacf3711f" name="ac7ac74d2557d772c3092288dacf3711f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ac7ac74d2557d772c3092288dacf3711f">&#9670;&#160;</a></span>ExpectStream</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* jsPubOptions::ExpectStream</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a095391b33a261586fc02eaf013b65e61" name="a095391b33a261586fc02eaf013b65e61"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a095391b33a261586fc02eaf013b65e61">&#9670;&#160;</a></span>ExpectLastMsgId</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* jsPubOptions::ExpectLastMsgId</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a3b02b60b05caa6d242079a4c26b181bf" name="a3b02b60b05caa6d242079a4c26b181bf"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a3b02b60b05caa6d242079a4c26b181bf">&#9670;&#160;</a></span>ExpectLastSeq</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t jsPubOptions::ExpectLastSeq</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="aeefec1d2c7644562d23b87e55bf2e253" name="aeefec1d2c7644562d23b87e55bf2e253"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aeefec1d2c7644562d23b87e55bf2e253">&#9670;&#160;</a></span>ExpectLastSubjectSeq</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t jsPubOptions::ExpectLastSubjectSeq</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a740a7edee8c832a75b75fded6046ba90" name="a740a7edee8c832a75b75fded6046ba90"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a740a7edee8c832a75b75fded6046ba90">&#9670;&#160;</a></span>ExpectNoMessage</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool jsPubOptions::ExpectNoMessage</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_pub_options.html">jsPubOptions</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_pub_options.js b/doc/html/structjs_pub_options.js
new file mode 100644 (file)
index 0000000..2261b1d
--- /dev/null
@@ -0,0 +1,10 @@
+var structjs_pub_options =
+[
+    [ "MaxWait", "structjs_pub_options.html#a1b242c9311b904a2e5337417b5c6d143", null ],
+    [ "MsgId", "structjs_pub_options.html#ac8708487360b784f7dd5d7a21e5617c0", null ],
+    [ "ExpectStream", "structjs_pub_options.html#ac7ac74d2557d772c3092288dacf3711f", null ],
+    [ "ExpectLastMsgId", "structjs_pub_options.html#a095391b33a261586fc02eaf013b65e61", null ],
+    [ "ExpectLastSeq", "structjs_pub_options.html#a3b02b60b05caa6d242079a4c26b181bf", null ],
+    [ "ExpectLastSubjectSeq", "structjs_pub_options.html#aeefec1d2c7644562d23b87e55bf2e253", null ],
+    [ "ExpectNoMessage", "structjs_pub_options.html#a740a7edee8c832a75b75fded6046ba90", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_re_publish-members.html b/doc/html/structjs_re_publish-members.html
new file mode 100644 (file)
index 0000000..437d9d3
--- /dev/null
@@ -0,0 +1,115 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_re_publish.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsRePublish Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_re_publish.html">jsRePublish</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_re_publish.html#a662b2e57d237b171b2b61509f7e1023a">Destination</a></td><td class="entry"><a class="el" href="structjs_re_publish.html">jsRePublish</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_re_publish.html#a16ebc4cdae4a407cf4e32aad212888db">HeadersOnly</a></td><td class="entry"><a class="el" href="structjs_re_publish.html">jsRePublish</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_re_publish.html#a1acb593929fd69bbe0f4dc8300dfaeb2">Source</a></td><td class="entry"><a class="el" href="structjs_re_publish.html">jsRePublish</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_re_publish.html b/doc/html/structjs_re_publish.html
new file mode 100644 (file)
index 0000000..89b6719
--- /dev/null
@@ -0,0 +1,173 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsRePublish Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_re_publish.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_re_publish-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsRePublish Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:a1acb593929fd69bbe0f4dc8300dfaeb2"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_re_publish.html#a1acb593929fd69bbe0f4dc8300dfaeb2">Source</a></td></tr>
+<tr class="separator:a1acb593929fd69bbe0f4dc8300dfaeb2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a662b2e57d237b171b2b61509f7e1023a"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_re_publish.html#a662b2e57d237b171b2b61509f7e1023a">Destination</a></td></tr>
+<tr class="separator:a662b2e57d237b171b2b61509f7e1023a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a16ebc4cdae4a407cf4e32aad212888db"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_re_publish.html#a16ebc4cdae4a407cf4e32aad212888db">HeadersOnly</a></td></tr>
+<tr class="separator:a16ebc4cdae4a407cf4e32aad212888db"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >Allows a source subject to be mapped to a destination subject for republishing. </p>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="a1acb593929fd69bbe0f4dc8300dfaeb2" name="a1acb593929fd69bbe0f4dc8300dfaeb2"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a1acb593929fd69bbe0f4dc8300dfaeb2">&#9670;&#160;</a></span>Source</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* jsRePublish::Source</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a662b2e57d237b171b2b61509f7e1023a" name="a662b2e57d237b171b2b61509f7e1023a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a662b2e57d237b171b2b61509f7e1023a">&#9670;&#160;</a></span>Destination</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* jsRePublish::Destination</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a16ebc4cdae4a407cf4e32aad212888db" name="a16ebc4cdae4a407cf4e32aad212888db"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a16ebc4cdae4a407cf4e32aad212888db">&#9670;&#160;</a></span>HeadersOnly</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool jsRePublish::HeadersOnly</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_re_publish.html">jsRePublish</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_re_publish.js b/doc/html/structjs_re_publish.js
new file mode 100644 (file)
index 0000000..9c5ba89
--- /dev/null
@@ -0,0 +1,6 @@
+var structjs_re_publish =
+[
+    [ "Source", "structjs_re_publish.html#a1acb593929fd69bbe0f4dc8300dfaeb2", null ],
+    [ "Destination", "structjs_re_publish.html#a662b2e57d237b171b2b61509f7e1023a", null ],
+    [ "HeadersOnly", "structjs_re_publish.html#a16ebc4cdae4a407cf4e32aad212888db", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_sequence_info-members.html b/doc/html/structjs_sequence_info-members.html
new file mode 100644 (file)
index 0000000..6434e37
--- /dev/null
@@ -0,0 +1,115 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_sequence_info.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsSequenceInfo Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_sequence_info.html">jsSequenceInfo</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_sequence_info.html#ae4416a5d766e07db207e563668edd06f">Consumer</a></td><td class="entry"><a class="el" href="structjs_sequence_info.html">jsSequenceInfo</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_sequence_info.html#a4e94c91650b7db253645515fee4c3b05">Last</a></td><td class="entry"><a class="el" href="structjs_sequence_info.html">jsSequenceInfo</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_sequence_info.html#ab52c55c1d0edd20e064870b490b4b990">Stream</a></td><td class="entry"><a class="el" href="structjs_sequence_info.html">jsSequenceInfo</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_sequence_info.html b/doc/html/structjs_sequence_info.html
new file mode 100644 (file)
index 0000000..8f1d70f
--- /dev/null
@@ -0,0 +1,174 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsSequenceInfo Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_sequence_info.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_sequence_info-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsSequenceInfo Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:ae4416a5d766e07db207e563668edd06f"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_sequence_info.html#ae4416a5d766e07db207e563668edd06f">Consumer</a></td></tr>
+<tr class="separator:ae4416a5d766e07db207e563668edd06f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ab52c55c1d0edd20e064870b490b4b990"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_sequence_info.html#ab52c55c1d0edd20e064870b490b4b990">Stream</a></td></tr>
+<tr class="separator:ab52c55c1d0edd20e064870b490b4b990"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a4e94c91650b7db253645515fee4c3b05"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_sequence_info.html#a4e94c91650b7db253645515fee4c3b05">Last</a></td></tr>
+<tr class="memdesc:a4e94c91650b7db253645515fee4c3b05"><td class="mdescLeft">&#160;</td><td class="mdescRight">UTC time expressed as number of nanoseconds since epoch.  <a href="structjs_sequence_info.html#a4e94c91650b7db253645515fee4c3b05">More...</a><br /></td></tr>
+<tr class="separator:a4e94c91650b7db253645515fee4c3b05"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >Has both the consumer and the stream sequence and last activity. </p>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="ae4416a5d766e07db207e563668edd06f" name="ae4416a5d766e07db207e563668edd06f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ae4416a5d766e07db207e563668edd06f">&#9670;&#160;</a></span>Consumer</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t jsSequenceInfo::Consumer</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ab52c55c1d0edd20e064870b490b4b990" name="ab52c55c1d0edd20e064870b490b4b990"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ab52c55c1d0edd20e064870b490b4b990">&#9670;&#160;</a></span>Stream</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t jsSequenceInfo::Stream</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a4e94c91650b7db253645515fee4c3b05" name="a4e94c91650b7db253645515fee4c3b05"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a4e94c91650b7db253645515fee4c3b05">&#9670;&#160;</a></span>Last</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsSequenceInfo::Last</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_sequence_info.html">jsSequenceInfo</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_sequence_info.js b/doc/html/structjs_sequence_info.js
new file mode 100644 (file)
index 0000000..458b1e1
--- /dev/null
@@ -0,0 +1,6 @@
+var structjs_sequence_info =
+[
+    [ "Consumer", "structjs_sequence_info.html#ae4416a5d766e07db207e563668edd06f", null ],
+    [ "Stream", "structjs_sequence_info.html#ab52c55c1d0edd20e064870b490b4b990", null ],
+    [ "Last", "structjs_sequence_info.html#a4e94c91650b7db253645515fee4c3b05", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_sequence_pair-members.html b/doc/html/structjs_sequence_pair-members.html
new file mode 100644 (file)
index 0000000..6d67c26
--- /dev/null
@@ -0,0 +1,114 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_sequence_pair.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsSequencePair Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_sequence_pair.html">jsSequencePair</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_sequence_pair.html#a6d205effd29f8994f0028bfaf2e8d816">Consumer</a></td><td class="entry"><a class="el" href="structjs_sequence_pair.html">jsSequencePair</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_sequence_pair.html#ab051e0815302c48ba6122bd18d9d76f7">Stream</a></td><td class="entry"><a class="el" href="structjs_sequence_pair.html">jsSequencePair</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_sequence_pair.html b/doc/html/structjs_sequence_pair.html
new file mode 100644 (file)
index 0000000..2a92114
--- /dev/null
@@ -0,0 +1,157 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsSequencePair Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_sequence_pair.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_sequence_pair-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsSequencePair Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:a6d205effd29f8994f0028bfaf2e8d816"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_sequence_pair.html#a6d205effd29f8994f0028bfaf2e8d816">Consumer</a></td></tr>
+<tr class="separator:a6d205effd29f8994f0028bfaf2e8d816"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ab051e0815302c48ba6122bd18d9d76f7"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_sequence_pair.html#ab051e0815302c48ba6122bd18d9d76f7">Stream</a></td></tr>
+<tr class="separator:ab051e0815302c48ba6122bd18d9d76f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >Includes the consumer and stream sequence info from a JetStream consumer. </p>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="a6d205effd29f8994f0028bfaf2e8d816" name="a6d205effd29f8994f0028bfaf2e8d816"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a6d205effd29f8994f0028bfaf2e8d816">&#9670;&#160;</a></span>Consumer</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t jsSequencePair::Consumer</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ab051e0815302c48ba6122bd18d9d76f7" name="ab051e0815302c48ba6122bd18d9d76f7"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ab051e0815302c48ba6122bd18d9d76f7">&#9670;&#160;</a></span>Stream</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t jsSequencePair::Stream</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_sequence_pair.html">jsSequencePair</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_sequence_pair.js b/doc/html/structjs_sequence_pair.js
new file mode 100644 (file)
index 0000000..b847eaa
--- /dev/null
@@ -0,0 +1,5 @@
+var structjs_sequence_pair =
+[
+    [ "Consumer", "structjs_sequence_pair.html#a6d205effd29f8994f0028bfaf2e8d816", null ],
+    [ "Stream", "structjs_sequence_pair.html#ab051e0815302c48ba6122bd18d9d76f7", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_stream_config-members.html b/doc/html/structjs_stream_config-members.html
new file mode 100644 (file)
index 0000000..7be3d72
--- /dev/null
@@ -0,0 +1,141 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_stream_config.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsStreamConfig Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_stream_config.html">jsStreamConfig</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_stream_config.html#a28630f6f07ca02553c5d5718d7c29721">AllowDirect</a></td><td class="entry"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_stream_config.html#aba71cdb342181f52bb9f7ff5f770a1fa">AllowRollup</a></td><td class="entry"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_stream_config.html#af2d42dd29b9a35257937aeeb53c9f287">DenyDelete</a></td><td class="entry"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_stream_config.html#a575ffbaa85b0300032963296b090583a">DenyPurge</a></td><td class="entry"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_stream_config.html#a4f9f422d2e9e7389860291ab19bd7f10">Description</a></td><td class="entry"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_stream_config.html#a0b44ea5251ef20bf5b5658bcfbea832d">Discard</a></td><td class="entry"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_stream_config.html#a3fb7d5e1a09829fe742749da880afe4a">DiscardNewPerSubject</a></td><td class="entry"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_stream_config.html#a9e0ff10273d0182f885615b4f7d1cc20">Duplicates</a></td><td class="entry"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_stream_config.html#aa538765ad97d343d60212ebd9894661e">MaxAge</a></td><td class="entry"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_stream_config.html#ad75e47d4293441bd5ddbc5eaf01e0451">MaxBytes</a></td><td class="entry"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_stream_config.html#a7338c82c8cbfcd5f4bfb7ad34b1d8395">MaxConsumers</a></td><td class="entry"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_stream_config.html#a60a5184d1d97b056dbb31ac6a5b3d82d">MaxMsgs</a></td><td class="entry"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_stream_config.html#a93a2336a57b6bfb792d530fd13a90641">MaxMsgSize</a></td><td class="entry"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_stream_config.html#aa167c7547d13bf2a01510a375ad38340">MaxMsgsPerSubject</a></td><td class="entry"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_stream_config.html#acdba5b22e4e60fd81a54769a7d09bc51">Mirror</a></td><td class="entry"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_stream_config.html#a9d67ddcc7c54c345dd60ed5e59234f1e">MirrorDirect</a></td><td class="entry"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_stream_config.html#a7fe3d5086f1c660a6999ae40ecd370e5">Name</a></td><td class="entry"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_stream_config.html#a8e358fbc569a1c6d49c704e6dbdf8609">NoAck</a></td><td class="entry"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_stream_config.html#acee6c66afc78d79c2f518eed89177efb">Placement</a></td><td class="entry"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_stream_config.html#adbf2c948cf8091b149603b918ef49ffc">Replicas</a></td><td class="entry"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_stream_config.html#a95ab0061b6e935b129a4a9c133e6b11c">RePublish</a></td><td class="entry"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_stream_config.html#a5ebc95b76afafa5e7a129953ba1bb3c7">Retention</a></td><td class="entry"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_stream_config.html#aede3fd2ab13d230eda14c96f9997e1b7">Sealed</a></td><td class="entry"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_stream_config.html#a8f0ee08922e5b2108082b5b9e4a6284b">Sources</a></td><td class="entry"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_stream_config.html#a34960d6acc710c2f32b563f4bb7c9c0a">SourcesLen</a></td><td class="entry"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_stream_config.html#a59c34091f336eafa77da2991c852c0d8">Storage</a></td><td class="entry"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_stream_config.html#a0c5f3354073dbe72650e3db7f59a47af">Subjects</a></td><td class="entry"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_stream_config.html#ab2186aae798df6c222b3fa69e31597e1">SubjectsLen</a></td><td class="entry"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_stream_config.html#a50f866f0e73c4ff0a5f43b354a059fa9">Template</a></td><td class="entry"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_stream_config.html b/doc/html/structjs_stream_config.html
new file mode 100644 (file)
index 0000000..045b519
--- /dev/null
@@ -0,0 +1,655 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsStreamConfig Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_stream_config.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_stream_config-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsStreamConfig Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:a7fe3d5086f1c660a6999ae40ecd370e5"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_config.html#a7fe3d5086f1c660a6999ae40ecd370e5">Name</a></td></tr>
+<tr class="separator:a7fe3d5086f1c660a6999ae40ecd370e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a4f9f422d2e9e7389860291ab19bd7f10"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_config.html#a4f9f422d2e9e7389860291ab19bd7f10">Description</a></td></tr>
+<tr class="separator:a4f9f422d2e9e7389860291ab19bd7f10"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a0c5f3354073dbe72650e3db7f59a47af"><td class="memItemLeft" align="right" valign="top">const char **&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_config.html#a0c5f3354073dbe72650e3db7f59a47af">Subjects</a></td></tr>
+<tr class="separator:a0c5f3354073dbe72650e3db7f59a47af"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ab2186aae798df6c222b3fa69e31597e1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_config.html#ab2186aae798df6c222b3fa69e31597e1">SubjectsLen</a></td></tr>
+<tr class="separator:ab2186aae798df6c222b3fa69e31597e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a5ebc95b76afafa5e7a129953ba1bb3c7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types_group.html#ga410f8fb053efa02b2ca1de0c02fa4b6d">jsRetentionPolicy</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_config.html#a5ebc95b76afafa5e7a129953ba1bb3c7">Retention</a></td></tr>
+<tr class="separator:a5ebc95b76afafa5e7a129953ba1bb3c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a7338c82c8cbfcd5f4bfb7ad34b1d8395"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_config.html#a7338c82c8cbfcd5f4bfb7ad34b1d8395">MaxConsumers</a></td></tr>
+<tr class="separator:a7338c82c8cbfcd5f4bfb7ad34b1d8395"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a60a5184d1d97b056dbb31ac6a5b3d82d"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_config.html#a60a5184d1d97b056dbb31ac6a5b3d82d">MaxMsgs</a></td></tr>
+<tr class="separator:a60a5184d1d97b056dbb31ac6a5b3d82d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ad75e47d4293441bd5ddbc5eaf01e0451"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_config.html#ad75e47d4293441bd5ddbc5eaf01e0451">MaxBytes</a></td></tr>
+<tr class="separator:ad75e47d4293441bd5ddbc5eaf01e0451"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aa538765ad97d343d60212ebd9894661e"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_config.html#aa538765ad97d343d60212ebd9894661e">MaxAge</a></td></tr>
+<tr class="separator:aa538765ad97d343d60212ebd9894661e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aa167c7547d13bf2a01510a375ad38340"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_config.html#aa167c7547d13bf2a01510a375ad38340">MaxMsgsPerSubject</a></td></tr>
+<tr class="separator:aa167c7547d13bf2a01510a375ad38340"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a93a2336a57b6bfb792d530fd13a90641"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_config.html#a93a2336a57b6bfb792d530fd13a90641">MaxMsgSize</a></td></tr>
+<tr class="separator:a93a2336a57b6bfb792d530fd13a90641"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a0b44ea5251ef20bf5b5658bcfbea832d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types_group.html#ga7f88b7d482488398074f9d1419a9b8c2">jsDiscardPolicy</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_config.html#a0b44ea5251ef20bf5b5658bcfbea832d">Discard</a></td></tr>
+<tr class="separator:a0b44ea5251ef20bf5b5658bcfbea832d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a59c34091f336eafa77da2991c852c0d8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types_group.html#ga1802a53c79e667f093bba033b16adc98">jsStorageType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_config.html#a59c34091f336eafa77da2991c852c0d8">Storage</a></td></tr>
+<tr class="separator:a59c34091f336eafa77da2991c852c0d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:adbf2c948cf8091b149603b918ef49ffc"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_config.html#adbf2c948cf8091b149603b918ef49ffc">Replicas</a></td></tr>
+<tr class="separator:adbf2c948cf8091b149603b918ef49ffc"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a8e358fbc569a1c6d49c704e6dbdf8609"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_config.html#a8e358fbc569a1c6d49c704e6dbdf8609">NoAck</a></td></tr>
+<tr class="separator:a8e358fbc569a1c6d49c704e6dbdf8609"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a50f866f0e73c4ff0a5f43b354a059fa9"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_config.html#a50f866f0e73c4ff0a5f43b354a059fa9">Template</a></td></tr>
+<tr class="separator:a50f866f0e73c4ff0a5f43b354a059fa9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a9e0ff10273d0182f885615b4f7d1cc20"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_config.html#a9e0ff10273d0182f885615b4f7d1cc20">Duplicates</a></td></tr>
+<tr class="separator:a9e0ff10273d0182f885615b4f7d1cc20"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:acee6c66afc78d79c2f518eed89177efb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structjs_placement.html">jsPlacement</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_config.html#acee6c66afc78d79c2f518eed89177efb">Placement</a></td></tr>
+<tr class="separator:acee6c66afc78d79c2f518eed89177efb"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:acdba5b22e4e60fd81a54769a7d09bc51"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structjs_stream_source.html">jsStreamSource</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_config.html#acdba5b22e4e60fd81a54769a7d09bc51">Mirror</a></td></tr>
+<tr class="separator:acdba5b22e4e60fd81a54769a7d09bc51"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a8f0ee08922e5b2108082b5b9e4a6284b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structjs_stream_source.html">jsStreamSource</a> **&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_config.html#a8f0ee08922e5b2108082b5b9e4a6284b">Sources</a></td></tr>
+<tr class="separator:a8f0ee08922e5b2108082b5b9e4a6284b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a34960d6acc710c2f32b563f4bb7c9c0a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_config.html#a34960d6acc710c2f32b563f4bb7c9c0a">SourcesLen</a></td></tr>
+<tr class="separator:a34960d6acc710c2f32b563f4bb7c9c0a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aede3fd2ab13d230eda14c96f9997e1b7"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_config.html#aede3fd2ab13d230eda14c96f9997e1b7">Sealed</a></td></tr>
+<tr class="memdesc:aede3fd2ab13d230eda14c96f9997e1b7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Seal a stream so no messages can get our or in.  <a href="structjs_stream_config.html#aede3fd2ab13d230eda14c96f9997e1b7">More...</a><br /></td></tr>
+<tr class="separator:aede3fd2ab13d230eda14c96f9997e1b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:af2d42dd29b9a35257937aeeb53c9f287"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_config.html#af2d42dd29b9a35257937aeeb53c9f287">DenyDelete</a></td></tr>
+<tr class="memdesc:af2d42dd29b9a35257937aeeb53c9f287"><td class="mdescLeft">&#160;</td><td class="mdescRight">Restrict the ability to delete messages.  <a href="structjs_stream_config.html#af2d42dd29b9a35257937aeeb53c9f287">More...</a><br /></td></tr>
+<tr class="separator:af2d42dd29b9a35257937aeeb53c9f287"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a575ffbaa85b0300032963296b090583a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_config.html#a575ffbaa85b0300032963296b090583a">DenyPurge</a></td></tr>
+<tr class="memdesc:a575ffbaa85b0300032963296b090583a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Restrict the ability to purge messages.  <a href="structjs_stream_config.html#a575ffbaa85b0300032963296b090583a">More...</a><br /></td></tr>
+<tr class="separator:a575ffbaa85b0300032963296b090583a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aba71cdb342181f52bb9f7ff5f770a1fa"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_config.html#aba71cdb342181f52bb9f7ff5f770a1fa">AllowRollup</a></td></tr>
+<tr class="separator:aba71cdb342181f52bb9f7ff5f770a1fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a95ab0061b6e935b129a4a9c133e6b11c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structjs_re_publish.html">jsRePublish</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_config.html#a95ab0061b6e935b129a4a9c133e6b11c">RePublish</a></td></tr>
+<tr class="separator:a95ab0061b6e935b129a4a9c133e6b11c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a28630f6f07ca02553c5d5718d7c29721"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_config.html#a28630f6f07ca02553c5d5718d7c29721">AllowDirect</a></td></tr>
+<tr class="separator:a28630f6f07ca02553c5d5718d7c29721"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a9d67ddcc7c54c345dd60ed5e59234f1e"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_config.html#a9d67ddcc7c54c345dd60ed5e59234f1e">MirrorDirect</a></td></tr>
+<tr class="separator:a9d67ddcc7c54c345dd60ed5e59234f1e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a3fb7d5e1a09829fe742749da880afe4a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_config.html#a3fb7d5e1a09829fe742749da880afe4a">DiscardNewPerSubject</a></td></tr>
+<tr class="separator:a3fb7d5e1a09829fe742749da880afe4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >Configuration of a JetStream stream.</p>
+<p >There are sensible defaults for most. If no subjects are given the name will be used as the only subject.</p>
+<p >In order to add/update a stream, a configuration needs to be set. The typical usage would be to initialize all required objects on the stack and configure them, then pass the pointer to the configuration to <a class="el" href="group__js_assets_group.html#ga5efc5136d33ba52161e6732f88f1ee75" title="Creates a stream.">js_AddStream</a> or <a class="el" href="group__js_assets_group.html#ga75a5c44304e24481c67e17fbccc15c31" title="Updates a stream.">js_UpdateStream</a>.</p>
+<dl class="section note"><dt>Note</dt><dd>The strings are applications owned and will not be freed by the library.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__js_assets_group.html#gac230f71dbdc4d10bc7471d01763881d6" title="Initializes a streaming configuration structure.">jsStreamConfig_Init</a></dd></dl>
+<div class="fragment"><div class="line">jsStreamConfig   sc;</div>
+<div class="line">jsPlacement      p;</div>
+<div class="line">jsStreamSource   m;</div>
+<div class="line">jsExternalStream esm;</div>
+<div class="line">jsStreamSource   s1;</div>
+<div class="line">jsStreamSource   s2;</div>
+<div class="line">jsExternalStream esmS2;</div>
+<div class="line">const char       *subjects[]     = {&quot;foo&quot;, &quot;bar&quot;};</div>
+<div class="line">const char       *tags[]         = {&quot;tag1&quot;, &quot;tag2&quot;};</div>
+<div class="line">jsStreamSource   *sources[]      = {&amp;s1, &amp;s2};</div>
+<div class="line">jsRePublish      rp;</div>
+<div class="line"> </div>
+<div class="line">jsStreamConfig_Init(&amp;sc);</div>
+<div class="line"> </div>
+<div class="line">jsPlacement_Init(&amp;p);</div>
+<div class="line">p.Cluster = &quot;MyCluster&quot;;</div>
+<div class="line">p.Tags = tags;</div>
+<div class="line">p.TagsLen = 2;</div>
+<div class="line"> </div>
+<div class="line">jsStreamSource_Init(&amp;m);</div>
+<div class="line">m.Name = &quot;AStream&quot;;</div>
+<div class="line">m.OptStartSeq = 100;</div>
+<div class="line">m.FilterSubject = &quot;foo&quot;;</div>
+<div class="line">jsExternalStream_Init(&amp;esm);</div>
+<div class="line">esm.APIPrefix = &quot;mirror.prefix.&quot;;</div>
+<div class="line">esm.DeliverPrefix = &quot;deliver.prefix.&quot;;</div>
+<div class="line">m.External = &amp;esm;</div>
+<div class="line"> </div>
+<div class="line">jsStreamSource_Init(&amp;s1);</div>
+<div class="line">s1.Name = &quot;StreamOne&quot;;</div>
+<div class="line">s1.OptStartSeq = 10;</div>
+<div class="line">s1.FilterSubject = &quot;stream.one&quot;;</div>
+<div class="line"> </div>
+<div class="line">jsStreamSource_Init(&amp;s2);</div>
+<div class="line">s2.Name = &quot;StreamTwo&quot;;</div>
+<div class="line">s2.FilterSubject = &quot;stream.two&quot;;</div>
+<div class="line">jsExternalStream_Init(&amp;esmS2);</div>
+<div class="line">esmS2.APIPrefix = &quot;mirror.prefix.&quot;;</div>
+<div class="line">esmS2.DeliverPrefix = &quot;deliver.prefix.&quot;;</div>
+<div class="line">s2.External = &amp;esmS2;</div>
+<div class="line"> </div>
+<div class="line">sc.Name = &quot;MyStream&quot;;</div>
+<div class="line">sc.Subjects = subjects;</div>
+<div class="line">sc.SubjectsLen = 2;</div>
+<div class="line">sc.Retention = js_InterestPolicy;</div>
+<div class="line">sc.Replicas = 3;</div>
+<div class="line">sc.Placement = &amp;p;</div>
+<div class="line">sc.Mirror = &amp;m;</div>
+<div class="line">sc.Sources = sources;</div>
+<div class="line">sc.SourcesLen = 2;</div>
+<div class="line"> </div>
+<div class="line">// For RePublish subject:</div>
+<div class="line">jsRePublish_Init(&amp;rp);</div>
+<div class="line">rp.Source = &quot;&gt;&quot;;</div>
+<div class="line">rp.Destination = &quot;RP.&gt;&quot;;</div>
+<div class="line">sc.RePublish = &amp;rp;</div>
+<div class="line"> </div>
+<div class="line">s = js_AddStream(&amp;si, js, &amp;sc, NULL, &amp;jerr);</div>
+</div><!-- fragment --> </div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="a7fe3d5086f1c660a6999ae40ecd370e5" name="a7fe3d5086f1c660a6999ae40ecd370e5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a7fe3d5086f1c660a6999ae40ecd370e5">&#9670;&#160;</a></span>Name</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* jsStreamConfig::Name</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a4f9f422d2e9e7389860291ab19bd7f10" name="a4f9f422d2e9e7389860291ab19bd7f10"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a4f9f422d2e9e7389860291ab19bd7f10">&#9670;&#160;</a></span>Description</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* jsStreamConfig::Description</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a0c5f3354073dbe72650e3db7f59a47af" name="a0c5f3354073dbe72650e3db7f59a47af"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a0c5f3354073dbe72650e3db7f59a47af">&#9670;&#160;</a></span>Subjects</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char** jsStreamConfig::Subjects</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ab2186aae798df6c222b3fa69e31597e1" name="ab2186aae798df6c222b3fa69e31597e1"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ab2186aae798df6c222b3fa69e31597e1">&#9670;&#160;</a></span>SubjectsLen</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int jsStreamConfig::SubjectsLen</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a5ebc95b76afafa5e7a129953ba1bb3c7" name="a5ebc95b76afafa5e7a129953ba1bb3c7"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a5ebc95b76afafa5e7a129953ba1bb3c7">&#9670;&#160;</a></span>Retention</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="group__types_group.html#ga410f8fb053efa02b2ca1de0c02fa4b6d">jsRetentionPolicy</a> jsStreamConfig::Retention</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a7338c82c8cbfcd5f4bfb7ad34b1d8395" name="a7338c82c8cbfcd5f4bfb7ad34b1d8395"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a7338c82c8cbfcd5f4bfb7ad34b1d8395">&#9670;&#160;</a></span>MaxConsumers</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsStreamConfig::MaxConsumers</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a60a5184d1d97b056dbb31ac6a5b3d82d" name="a60a5184d1d97b056dbb31ac6a5b3d82d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a60a5184d1d97b056dbb31ac6a5b3d82d">&#9670;&#160;</a></span>MaxMsgs</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsStreamConfig::MaxMsgs</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ad75e47d4293441bd5ddbc5eaf01e0451" name="ad75e47d4293441bd5ddbc5eaf01e0451"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ad75e47d4293441bd5ddbc5eaf01e0451">&#9670;&#160;</a></span>MaxBytes</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsStreamConfig::MaxBytes</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="aa538765ad97d343d60212ebd9894661e" name="aa538765ad97d343d60212ebd9894661e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aa538765ad97d343d60212ebd9894661e">&#9670;&#160;</a></span>MaxAge</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsStreamConfig::MaxAge</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="aa167c7547d13bf2a01510a375ad38340" name="aa167c7547d13bf2a01510a375ad38340"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aa167c7547d13bf2a01510a375ad38340">&#9670;&#160;</a></span>MaxMsgsPerSubject</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsStreamConfig::MaxMsgsPerSubject</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a93a2336a57b6bfb792d530fd13a90641" name="a93a2336a57b6bfb792d530fd13a90641"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a93a2336a57b6bfb792d530fd13a90641">&#9670;&#160;</a></span>MaxMsgSize</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int32_t jsStreamConfig::MaxMsgSize</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a0b44ea5251ef20bf5b5658bcfbea832d" name="a0b44ea5251ef20bf5b5658bcfbea832d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a0b44ea5251ef20bf5b5658bcfbea832d">&#9670;&#160;</a></span>Discard</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="group__types_group.html#ga7f88b7d482488398074f9d1419a9b8c2">jsDiscardPolicy</a> jsStreamConfig::Discard</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a59c34091f336eafa77da2991c852c0d8" name="a59c34091f336eafa77da2991c852c0d8"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a59c34091f336eafa77da2991c852c0d8">&#9670;&#160;</a></span>Storage</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="group__types_group.html#ga1802a53c79e667f093bba033b16adc98">jsStorageType</a> jsStreamConfig::Storage</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="adbf2c948cf8091b149603b918ef49ffc" name="adbf2c948cf8091b149603b918ef49ffc"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#adbf2c948cf8091b149603b918ef49ffc">&#9670;&#160;</a></span>Replicas</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsStreamConfig::Replicas</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a8e358fbc569a1c6d49c704e6dbdf8609" name="a8e358fbc569a1c6d49c704e6dbdf8609"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a8e358fbc569a1c6d49c704e6dbdf8609">&#9670;&#160;</a></span>NoAck</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool jsStreamConfig::NoAck</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a50f866f0e73c4ff0a5f43b354a059fa9" name="a50f866f0e73c4ff0a5f43b354a059fa9"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a50f866f0e73c4ff0a5f43b354a059fa9">&#9670;&#160;</a></span>Template</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* jsStreamConfig::Template</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a9e0ff10273d0182f885615b4f7d1cc20" name="a9e0ff10273d0182f885615b4f7d1cc20"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a9e0ff10273d0182f885615b4f7d1cc20">&#9670;&#160;</a></span>Duplicates</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsStreamConfig::Duplicates</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="acee6c66afc78d79c2f518eed89177efb" name="acee6c66afc78d79c2f518eed89177efb"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#acee6c66afc78d79c2f518eed89177efb">&#9670;&#160;</a></span>Placement</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="structjs_placement.html">jsPlacement</a>* jsStreamConfig::Placement</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="acdba5b22e4e60fd81a54769a7d09bc51" name="acdba5b22e4e60fd81a54769a7d09bc51"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#acdba5b22e4e60fd81a54769a7d09bc51">&#9670;&#160;</a></span>Mirror</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="structjs_stream_source.html">jsStreamSource</a>* jsStreamConfig::Mirror</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a8f0ee08922e5b2108082b5b9e4a6284b" name="a8f0ee08922e5b2108082b5b9e4a6284b"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a8f0ee08922e5b2108082b5b9e4a6284b">&#9670;&#160;</a></span>Sources</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="structjs_stream_source.html">jsStreamSource</a>** jsStreamConfig::Sources</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a34960d6acc710c2f32b563f4bb7c9c0a" name="a34960d6acc710c2f32b563f4bb7c9c0a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a34960d6acc710c2f32b563f4bb7c9c0a">&#9670;&#160;</a></span>SourcesLen</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int jsStreamConfig::SourcesLen</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="aede3fd2ab13d230eda14c96f9997e1b7" name="aede3fd2ab13d230eda14c96f9997e1b7"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aede3fd2ab13d230eda14c96f9997e1b7">&#9670;&#160;</a></span>Sealed</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool jsStreamConfig::Sealed</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="af2d42dd29b9a35257937aeeb53c9f287" name="af2d42dd29b9a35257937aeeb53c9f287"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#af2d42dd29b9a35257937aeeb53c9f287">&#9670;&#160;</a></span>DenyDelete</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool jsStreamConfig::DenyDelete</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a575ffbaa85b0300032963296b090583a" name="a575ffbaa85b0300032963296b090583a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a575ffbaa85b0300032963296b090583a">&#9670;&#160;</a></span>DenyPurge</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool jsStreamConfig::DenyPurge</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="aba71cdb342181f52bb9f7ff5f770a1fa" name="aba71cdb342181f52bb9f7ff5f770a1fa"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aba71cdb342181f52bb9f7ff5f770a1fa">&#9670;&#160;</a></span>AllowRollup</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool jsStreamConfig::AllowRollup</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >Allows messages to be placed into the system and purge all older messages using a special message header. </p>
+
+</div>
+</div>
+<a id="a95ab0061b6e935b129a4a9c133e6b11c" name="a95ab0061b6e935b129a4a9c133e6b11c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a95ab0061b6e935b129a4a9c133e6b11c">&#9670;&#160;</a></span>RePublish</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="structjs_re_publish.html">jsRePublish</a>* jsStreamConfig::RePublish</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a28630f6f07ca02553c5d5718d7c29721" name="a28630f6f07ca02553c5d5718d7c29721"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a28630f6f07ca02553c5d5718d7c29721">&#9670;&#160;</a></span>AllowDirect</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool jsStreamConfig::AllowDirect</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a9d67ddcc7c54c345dd60ed5e59234f1e" name="a9d67ddcc7c54c345dd60ed5e59234f1e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a9d67ddcc7c54c345dd60ed5e59234f1e">&#9670;&#160;</a></span>MirrorDirect</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool jsStreamConfig::MirrorDirect</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a3fb7d5e1a09829fe742749da880afe4a" name="a3fb7d5e1a09829fe742749da880afe4a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a3fb7d5e1a09829fe742749da880afe4a">&#9670;&#160;</a></span>DiscardNewPerSubject</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool jsStreamConfig::DiscardNewPerSubject</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_stream_config.js b/doc/html/structjs_stream_config.js
new file mode 100644 (file)
index 0000000..0c17ac2
--- /dev/null
@@ -0,0 +1,32 @@
+var structjs_stream_config =
+[
+    [ "Name", "structjs_stream_config.html#a7fe3d5086f1c660a6999ae40ecd370e5", null ],
+    [ "Description", "structjs_stream_config.html#a4f9f422d2e9e7389860291ab19bd7f10", null ],
+    [ "Subjects", "structjs_stream_config.html#a0c5f3354073dbe72650e3db7f59a47af", null ],
+    [ "SubjectsLen", "structjs_stream_config.html#ab2186aae798df6c222b3fa69e31597e1", null ],
+    [ "Retention", "structjs_stream_config.html#a5ebc95b76afafa5e7a129953ba1bb3c7", null ],
+    [ "MaxConsumers", "structjs_stream_config.html#a7338c82c8cbfcd5f4bfb7ad34b1d8395", null ],
+    [ "MaxMsgs", "structjs_stream_config.html#a60a5184d1d97b056dbb31ac6a5b3d82d", null ],
+    [ "MaxBytes", "structjs_stream_config.html#ad75e47d4293441bd5ddbc5eaf01e0451", null ],
+    [ "MaxAge", "structjs_stream_config.html#aa538765ad97d343d60212ebd9894661e", null ],
+    [ "MaxMsgsPerSubject", "structjs_stream_config.html#aa167c7547d13bf2a01510a375ad38340", null ],
+    [ "MaxMsgSize", "structjs_stream_config.html#a93a2336a57b6bfb792d530fd13a90641", null ],
+    [ "Discard", "structjs_stream_config.html#a0b44ea5251ef20bf5b5658bcfbea832d", null ],
+    [ "Storage", "structjs_stream_config.html#a59c34091f336eafa77da2991c852c0d8", null ],
+    [ "Replicas", "structjs_stream_config.html#adbf2c948cf8091b149603b918ef49ffc", null ],
+    [ "NoAck", "structjs_stream_config.html#a8e358fbc569a1c6d49c704e6dbdf8609", null ],
+    [ "Template", "structjs_stream_config.html#a50f866f0e73c4ff0a5f43b354a059fa9", null ],
+    [ "Duplicates", "structjs_stream_config.html#a9e0ff10273d0182f885615b4f7d1cc20", null ],
+    [ "Placement", "structjs_stream_config.html#acee6c66afc78d79c2f518eed89177efb", null ],
+    [ "Mirror", "structjs_stream_config.html#acdba5b22e4e60fd81a54769a7d09bc51", null ],
+    [ "Sources", "structjs_stream_config.html#a8f0ee08922e5b2108082b5b9e4a6284b", null ],
+    [ "SourcesLen", "structjs_stream_config.html#a34960d6acc710c2f32b563f4bb7c9c0a", null ],
+    [ "Sealed", "structjs_stream_config.html#aede3fd2ab13d230eda14c96f9997e1b7", null ],
+    [ "DenyDelete", "structjs_stream_config.html#af2d42dd29b9a35257937aeeb53c9f287", null ],
+    [ "DenyPurge", "structjs_stream_config.html#a575ffbaa85b0300032963296b090583a", null ],
+    [ "AllowRollup", "structjs_stream_config.html#aba71cdb342181f52bb9f7ff5f770a1fa", null ],
+    [ "RePublish", "structjs_stream_config.html#a95ab0061b6e935b129a4a9c133e6b11c", null ],
+    [ "AllowDirect", "structjs_stream_config.html#a28630f6f07ca02553c5d5718d7c29721", null ],
+    [ "MirrorDirect", "structjs_stream_config.html#a9d67ddcc7c54c345dd60ed5e59234f1e", null ],
+    [ "DiscardNewPerSubject", "structjs_stream_config.html#a3fb7d5e1a09829fe742749da880afe4a", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_stream_info-members.html b/doc/html/structjs_stream_info-members.html
new file mode 100644 (file)
index 0000000..a37623d
--- /dev/null
@@ -0,0 +1,119 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_stream_info.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsStreamInfo Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_stream_info.html">jsStreamInfo</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_stream_info.html#a8d10d6fdc3f713ac726c72cae06a209a">Cluster</a></td><td class="entry"><a class="el" href="structjs_stream_info.html">jsStreamInfo</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_stream_info.html#adcc402d28e0ee443419e9b549da233c6">Config</a></td><td class="entry"><a class="el" href="structjs_stream_info.html">jsStreamInfo</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_stream_info.html#a578ce52a275c690dd4627c1d119c7838">Created</a></td><td class="entry"><a class="el" href="structjs_stream_info.html">jsStreamInfo</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_stream_info.html#ab71aae7e4f6c62e2a09a3a52c9e4fa2a">Mirror</a></td><td class="entry"><a class="el" href="structjs_stream_info.html">jsStreamInfo</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_stream_info.html#a2e7ca48a93fe57265609e7e0cd3fa386">Sources</a></td><td class="entry"><a class="el" href="structjs_stream_info.html">jsStreamInfo</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_stream_info.html#af14110cb1f8e16e3dade8d9f7c2fd672">SourcesLen</a></td><td class="entry"><a class="el" href="structjs_stream_info.html">jsStreamInfo</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_stream_info.html#a766ac56dec3bd19fa5b9861fb5f64397">State</a></td><td class="entry"><a class="el" href="structjs_stream_info.html">jsStreamInfo</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_stream_info.html b/doc/html/structjs_stream_info.html
new file mode 100644 (file)
index 0000000..ea62945
--- /dev/null
@@ -0,0 +1,239 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsStreamInfo Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_stream_info.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_stream_info-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsStreamInfo Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:adcc402d28e0ee443419e9b549da233c6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_info.html#adcc402d28e0ee443419e9b549da233c6">Config</a></td></tr>
+<tr class="separator:adcc402d28e0ee443419e9b549da233c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a578ce52a275c690dd4627c1d119c7838"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_info.html#a578ce52a275c690dd4627c1d119c7838">Created</a></td></tr>
+<tr class="memdesc:a578ce52a275c690dd4627c1d119c7838"><td class="mdescLeft">&#160;</td><td class="mdescRight">UTC time expressed as number of nanoseconds since epoch.  <a href="structjs_stream_info.html#a578ce52a275c690dd4627c1d119c7838">More...</a><br /></td></tr>
+<tr class="separator:a578ce52a275c690dd4627c1d119c7838"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a766ac56dec3bd19fa5b9861fb5f64397"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structjs_stream_state.html">jsStreamState</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_info.html#a766ac56dec3bd19fa5b9861fb5f64397">State</a></td></tr>
+<tr class="separator:a766ac56dec3bd19fa5b9861fb5f64397"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a8d10d6fdc3f713ac726c72cae06a209a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structjs_cluster_info.html">jsClusterInfo</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_info.html#a8d10d6fdc3f713ac726c72cae06a209a">Cluster</a></td></tr>
+<tr class="separator:a8d10d6fdc3f713ac726c72cae06a209a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ab71aae7e4f6c62e2a09a3a52c9e4fa2a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structjs_stream_source_info.html">jsStreamSourceInfo</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_info.html#ab71aae7e4f6c62e2a09a3a52c9e4fa2a">Mirror</a></td></tr>
+<tr class="separator:ab71aae7e4f6c62e2a09a3a52c9e4fa2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a2e7ca48a93fe57265609e7e0cd3fa386"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structjs_stream_source_info.html">jsStreamSourceInfo</a> **&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_info.html#a2e7ca48a93fe57265609e7e0cd3fa386">Sources</a></td></tr>
+<tr class="separator:a2e7ca48a93fe57265609e7e0cd3fa386"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:af14110cb1f8e16e3dade8d9f7c2fd672"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_info.html#af14110cb1f8e16e3dade8d9f7c2fd672">SourcesLen</a></td></tr>
+<tr class="separator:af14110cb1f8e16e3dade8d9f7c2fd672"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >Configuration and current state for this stream.</p>
+<dl class="section note"><dt>Note</dt><dd><code>Created</code> is the timestamp when the stream was created, expressed as the number of nanoseconds passed since 00:00:00 UTC Thursday, 1 January 1970. </dd></dl>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="adcc402d28e0ee443419e9b549da233c6" name="adcc402d28e0ee443419e9b549da233c6"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#adcc402d28e0ee443419e9b549da233c6">&#9670;&#160;</a></span>Config</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="structjs_stream_config.html">jsStreamConfig</a>* jsStreamInfo::Config</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a578ce52a275c690dd4627c1d119c7838" name="a578ce52a275c690dd4627c1d119c7838"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a578ce52a275c690dd4627c1d119c7838">&#9670;&#160;</a></span>Created</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsStreamInfo::Created</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a766ac56dec3bd19fa5b9861fb5f64397" name="a766ac56dec3bd19fa5b9861fb5f64397"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a766ac56dec3bd19fa5b9861fb5f64397">&#9670;&#160;</a></span>State</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="structjs_stream_state.html">jsStreamState</a> jsStreamInfo::State</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a8d10d6fdc3f713ac726c72cae06a209a" name="a8d10d6fdc3f713ac726c72cae06a209a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a8d10d6fdc3f713ac726c72cae06a209a">&#9670;&#160;</a></span>Cluster</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="structjs_cluster_info.html">jsClusterInfo</a>* jsStreamInfo::Cluster</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ab71aae7e4f6c62e2a09a3a52c9e4fa2a" name="ab71aae7e4f6c62e2a09a3a52c9e4fa2a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ab71aae7e4f6c62e2a09a3a52c9e4fa2a">&#9670;&#160;</a></span>Mirror</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="structjs_stream_source_info.html">jsStreamSourceInfo</a>* jsStreamInfo::Mirror</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a2e7ca48a93fe57265609e7e0cd3fa386" name="a2e7ca48a93fe57265609e7e0cd3fa386"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a2e7ca48a93fe57265609e7e0cd3fa386">&#9670;&#160;</a></span>Sources</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="structjs_stream_source_info.html">jsStreamSourceInfo</a>** jsStreamInfo::Sources</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="af14110cb1f8e16e3dade8d9f7c2fd672" name="af14110cb1f8e16e3dade8d9f7c2fd672"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#af14110cb1f8e16e3dade8d9f7c2fd672">&#9670;&#160;</a></span>SourcesLen</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int jsStreamInfo::SourcesLen</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_stream_info.html">jsStreamInfo</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_stream_info.js b/doc/html/structjs_stream_info.js
new file mode 100644 (file)
index 0000000..f32d129
--- /dev/null
@@ -0,0 +1,10 @@
+var structjs_stream_info =
+[
+    [ "Config", "structjs_stream_info.html#adcc402d28e0ee443419e9b549da233c6", null ],
+    [ "Created", "structjs_stream_info.html#a578ce52a275c690dd4627c1d119c7838", null ],
+    [ "State", "structjs_stream_info.html#a766ac56dec3bd19fa5b9861fb5f64397", null ],
+    [ "Cluster", "structjs_stream_info.html#a8d10d6fdc3f713ac726c72cae06a209a", null ],
+    [ "Mirror", "structjs_stream_info.html#ab71aae7e4f6c62e2a09a3a52c9e4fa2a", null ],
+    [ "Sources", "structjs_stream_info.html#a2e7ca48a93fe57265609e7e0cd3fa386", null ],
+    [ "SourcesLen", "structjs_stream_info.html#af14110cb1f8e16e3dade8d9f7c2fd672", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_stream_info_list-members.html b/doc/html/structjs_stream_info_list-members.html
new file mode 100644 (file)
index 0000000..43383b0
--- /dev/null
@@ -0,0 +1,114 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_stream_info_list.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsStreamInfoList Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_stream_info_list.html">jsStreamInfoList</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_stream_info_list.html#a8bc8490af12bb4f7a245605aecde62c2">Count</a></td><td class="entry"><a class="el" href="structjs_stream_info_list.html">jsStreamInfoList</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_stream_info_list.html#a7b096ee7a25363f231f56419a244daef">List</a></td><td class="entry"><a class="el" href="structjs_stream_info_list.html">jsStreamInfoList</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_stream_info_list.html b/doc/html/structjs_stream_info_list.html
new file mode 100644 (file)
index 0000000..8562741
--- /dev/null
@@ -0,0 +1,159 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsStreamInfoList Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_stream_info_list.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_stream_info_list-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsStreamInfoList Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:a7b096ee7a25363f231f56419a244daef"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structjs_stream_info.html">jsStreamInfo</a> **&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_info_list.html#a7b096ee7a25363f231f56419a244daef">List</a></td></tr>
+<tr class="separator:a7b096ee7a25363f231f56419a244daef"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a8bc8490af12bb4f7a245605aecde62c2"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_info_list.html#a8bc8490af12bb4f7a245605aecde62c2">Count</a></td></tr>
+<tr class="separator:a8bc8490af12bb4f7a245605aecde62c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >List of stream information objects returned by <a class="el" href="group__js_assets_group.html#ga531d91de372f0dffb8d64abecf88b0c0" title="Retrieves the list of all available streams.">js_Streams</a></p>
+<dl class="section note"><dt>Note</dt><dd>Once done, the list should be destroyed calling <a class="el" href="group__js_assets_group.html#ga38cdcc339eb8976d23296b99aa37d629" title="Destroys the stream information list object.">jsStreamInfoList_Destroy</a></dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__js_assets_group.html#ga38cdcc339eb8976d23296b99aa37d629" title="Destroys the stream information list object.">jsStreamInfoList_Destroy</a> </dd></dl>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="a7b096ee7a25363f231f56419a244daef" name="a7b096ee7a25363f231f56419a244daef"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a7b096ee7a25363f231f56419a244daef">&#9670;&#160;</a></span>List</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="structjs_stream_info.html">jsStreamInfo</a>** jsStreamInfoList::List</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a8bc8490af12bb4f7a245605aecde62c2" name="a8bc8490af12bb4f7a245605aecde62c2"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a8bc8490af12bb4f7a245605aecde62c2">&#9670;&#160;</a></span>Count</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int jsStreamInfoList::Count</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_stream_info_list.html">jsStreamInfoList</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_stream_info_list.js b/doc/html/structjs_stream_info_list.js
new file mode 100644 (file)
index 0000000..c52c46a
--- /dev/null
@@ -0,0 +1,5 @@
+var structjs_stream_info_list =
+[
+    [ "List", "structjs_stream_info_list.html#a7b096ee7a25363f231f56419a244daef", null ],
+    [ "Count", "structjs_stream_info_list.html#a8bc8490af12bb4f7a245605aecde62c2", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_stream_names_list-members.html b/doc/html/structjs_stream_names_list-members.html
new file mode 100644 (file)
index 0000000..91245a8
--- /dev/null
@@ -0,0 +1,114 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_stream_names_list.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsStreamNamesList Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_stream_names_list.html">jsStreamNamesList</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_stream_names_list.html#ab1385b6333537306d0462946c26cde4f">Count</a></td><td class="entry"><a class="el" href="structjs_stream_names_list.html">jsStreamNamesList</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_stream_names_list.html#a1875a7e449759dfc2a40b0eb74de0acf">List</a></td><td class="entry"><a class="el" href="structjs_stream_names_list.html">jsStreamNamesList</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_stream_names_list.html b/doc/html/structjs_stream_names_list.html
new file mode 100644 (file)
index 0000000..74a1f48
--- /dev/null
@@ -0,0 +1,159 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsStreamNamesList Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_stream_names_list.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_stream_names_list-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsStreamNamesList Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:a1875a7e449759dfc2a40b0eb74de0acf"><td class="memItemLeft" align="right" valign="top">char **&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_names_list.html#a1875a7e449759dfc2a40b0eb74de0acf">List</a></td></tr>
+<tr class="separator:a1875a7e449759dfc2a40b0eb74de0acf"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ab1385b6333537306d0462946c26cde4f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_names_list.html#ab1385b6333537306d0462946c26cde4f">Count</a></td></tr>
+<tr class="separator:ab1385b6333537306d0462946c26cde4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >List of stream names returned by <a class="el" href="group__js_assets_group.html#gac3dfc87863dbbb3c959ecde4bce905bc" title="Retrieves the list of all available stream names.">js_StreamNames</a></p>
+<dl class="section note"><dt>Note</dt><dd>Once done, the list should be destroyed calling <a class="el" href="group__js_assets_group.html#gaf8644f281d4e24893a6a170b4f7faa65" title="Destroys the stream names list object.">jsStreamNamesList_Destroy</a></dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__js_assets_group.html#gaf8644f281d4e24893a6a170b4f7faa65" title="Destroys the stream names list object.">jsStreamNamesList_Destroy</a> </dd></dl>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="a1875a7e449759dfc2a40b0eb74de0acf" name="a1875a7e449759dfc2a40b0eb74de0acf"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a1875a7e449759dfc2a40b0eb74de0acf">&#9670;&#160;</a></span>List</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">char** jsStreamNamesList::List</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ab1385b6333537306d0462946c26cde4f" name="ab1385b6333537306d0462946c26cde4f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ab1385b6333537306d0462946c26cde4f">&#9670;&#160;</a></span>Count</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int jsStreamNamesList::Count</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_stream_names_list.html">jsStreamNamesList</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_stream_names_list.js b/doc/html/structjs_stream_names_list.js
new file mode 100644 (file)
index 0000000..afdb572
--- /dev/null
@@ -0,0 +1,5 @@
+var structjs_stream_names_list =
+[
+    [ "List", "structjs_stream_names_list.html#a1875a7e449759dfc2a40b0eb74de0acf", null ],
+    [ "Count", "structjs_stream_names_list.html#ab1385b6333537306d0462946c26cde4f", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_stream_source-members.html b/doc/html/structjs_stream_source-members.html
new file mode 100644 (file)
index 0000000..9149f62
--- /dev/null
@@ -0,0 +1,117 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_stream_source.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsStreamSource Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_stream_source.html">jsStreamSource</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_stream_source.html#a295458d156af5373bb3f5ab06612a888">External</a></td><td class="entry"><a class="el" href="structjs_stream_source.html">jsStreamSource</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_stream_source.html#af787b51dde9d77626f33860564eb08c3">FilterSubject</a></td><td class="entry"><a class="el" href="structjs_stream_source.html">jsStreamSource</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_stream_source.html#a7d9e5c064866b3f0b5601193c5885ec3">Name</a></td><td class="entry"><a class="el" href="structjs_stream_source.html">jsStreamSource</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_stream_source.html#ad6948b7a34c202f324b6d2beb32fe5ed">OptStartSeq</a></td><td class="entry"><a class="el" href="structjs_stream_source.html">jsStreamSource</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_stream_source.html#a67eb1dac41b2d826a923cfb23baa24a5">OptStartTime</a></td><td class="entry"><a class="el" href="structjs_stream_source.html">jsStreamSource</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_stream_source.html b/doc/html/structjs_stream_source.html
new file mode 100644 (file)
index 0000000..28a8449
--- /dev/null
@@ -0,0 +1,211 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsStreamSource Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_stream_source.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_stream_source-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsStreamSource Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:a7d9e5c064866b3f0b5601193c5885ec3"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_source.html#a7d9e5c064866b3f0b5601193c5885ec3">Name</a></td></tr>
+<tr class="separator:a7d9e5c064866b3f0b5601193c5885ec3"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ad6948b7a34c202f324b6d2beb32fe5ed"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_source.html#ad6948b7a34c202f324b6d2beb32fe5ed">OptStartSeq</a></td></tr>
+<tr class="separator:ad6948b7a34c202f324b6d2beb32fe5ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a67eb1dac41b2d826a923cfb23baa24a5"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_source.html#a67eb1dac41b2d826a923cfb23baa24a5">OptStartTime</a></td></tr>
+<tr class="memdesc:a67eb1dac41b2d826a923cfb23baa24a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">UTC time expressed as number of nanoseconds since epoch.  <a href="structjs_stream_source.html#a67eb1dac41b2d826a923cfb23baa24a5">More...</a><br /></td></tr>
+<tr class="separator:a67eb1dac41b2d826a923cfb23baa24a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:af787b51dde9d77626f33860564eb08c3"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_source.html#af787b51dde9d77626f33860564eb08c3">FilterSubject</a></td></tr>
+<tr class="separator:af787b51dde9d77626f33860564eb08c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a295458d156af5373bb3f5ab06612a888"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structjs_external_stream.html">jsExternalStream</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_source.html#a295458d156af5373bb3f5ab06612a888">External</a></td></tr>
+<tr class="separator:a295458d156af5373bb3f5ab06612a888"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >Dictates how streams can source from other streams.</p>
+<p >Initialize the object with <a class="el" href="group__js_assets_group.html#ga7fe8e0bf98a38eb59372e7cd78aaaf56" title="Initializes a stream source configuration structure.">jsStreamSource_Init</a>.</p>
+<dl class="section note"><dt>Note</dt><dd>The strings are applications owned and will not be freed by the library.</dd>
+<dd>
+The <code>OptStartTime</code> needs to be expressed as the number of nanoseconds passed since 00:00:00 UTC Thursday, 1 January 1970.</dd></dl>
+<p>See <a class="el" href="structjs_stream_config.html">jsStreamConfig</a> for information on how to configure a stream. </p>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="a7d9e5c064866b3f0b5601193c5885ec3" name="a7d9e5c064866b3f0b5601193c5885ec3"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a7d9e5c064866b3f0b5601193c5885ec3">&#9670;&#160;</a></span>Name</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* jsStreamSource::Name</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ad6948b7a34c202f324b6d2beb32fe5ed" name="ad6948b7a34c202f324b6d2beb32fe5ed"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ad6948b7a34c202f324b6d2beb32fe5ed">&#9670;&#160;</a></span>OptStartSeq</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t jsStreamSource::OptStartSeq</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a67eb1dac41b2d826a923cfb23baa24a5" name="a67eb1dac41b2d826a923cfb23baa24a5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a67eb1dac41b2d826a923cfb23baa24a5">&#9670;&#160;</a></span>OptStartTime</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsStreamSource::OptStartTime</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="af787b51dde9d77626f33860564eb08c3" name="af787b51dde9d77626f33860564eb08c3"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#af787b51dde9d77626f33860564eb08c3">&#9670;&#160;</a></span>FilterSubject</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* jsStreamSource::FilterSubject</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a295458d156af5373bb3f5ab06612a888" name="a295458d156af5373bb3f5ab06612a888"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a295458d156af5373bb3f5ab06612a888">&#9670;&#160;</a></span>External</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="structjs_external_stream.html">jsExternalStream</a>* jsStreamSource::External</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_stream_source.html">jsStreamSource</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_stream_source.js b/doc/html/structjs_stream_source.js
new file mode 100644 (file)
index 0000000..591743b
--- /dev/null
@@ -0,0 +1,8 @@
+var structjs_stream_source =
+[
+    [ "Name", "structjs_stream_source.html#a7d9e5c064866b3f0b5601193c5885ec3", null ],
+    [ "OptStartSeq", "structjs_stream_source.html#ad6948b7a34c202f324b6d2beb32fe5ed", null ],
+    [ "OptStartTime", "structjs_stream_source.html#a67eb1dac41b2d826a923cfb23baa24a5", null ],
+    [ "FilterSubject", "structjs_stream_source.html#af787b51dde9d77626f33860564eb08c3", null ],
+    [ "External", "structjs_stream_source.html#a295458d156af5373bb3f5ab06612a888", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_stream_source_info-members.html b/doc/html/structjs_stream_source_info-members.html
new file mode 100644 (file)
index 0000000..7048046
--- /dev/null
@@ -0,0 +1,116 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_stream_source_info.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsStreamSourceInfo Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_stream_source_info.html">jsStreamSourceInfo</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_stream_source_info.html#a28b8cc0a9d487672955d3a3fa03de247">Active</a></td><td class="entry"><a class="el" href="structjs_stream_source_info.html">jsStreamSourceInfo</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_stream_source_info.html#a7eb19dd2637079fd1e970a2b38d33e05">External</a></td><td class="entry"><a class="el" href="structjs_stream_source_info.html">jsStreamSourceInfo</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_stream_source_info.html#ab2ee0ca3ecd98c2df6d4e9bd88686863">Lag</a></td><td class="entry"><a class="el" href="structjs_stream_source_info.html">jsStreamSourceInfo</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_stream_source_info.html#a6db3c6ff8a465a45f8bd5c7bdf5f6c04">Name</a></td><td class="entry"><a class="el" href="structjs_stream_source_info.html">jsStreamSourceInfo</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_stream_source_info.html b/doc/html/structjs_stream_source_info.html
new file mode 100644 (file)
index 0000000..a21bbee
--- /dev/null
@@ -0,0 +1,189 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsStreamSourceInfo Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_stream_source_info.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_stream_source_info-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsStreamSourceInfo Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:a6db3c6ff8a465a45f8bd5c7bdf5f6c04"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_source_info.html#a6db3c6ff8a465a45f8bd5c7bdf5f6c04">Name</a></td></tr>
+<tr class="separator:a6db3c6ff8a465a45f8bd5c7bdf5f6c04"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a7eb19dd2637079fd1e970a2b38d33e05"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structjs_external_stream.html">jsExternalStream</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_source_info.html#a7eb19dd2637079fd1e970a2b38d33e05">External</a></td></tr>
+<tr class="separator:a7eb19dd2637079fd1e970a2b38d33e05"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ab2ee0ca3ecd98c2df6d4e9bd88686863"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_source_info.html#ab2ee0ca3ecd98c2df6d4e9bd88686863">Lag</a></td></tr>
+<tr class="separator:ab2ee0ca3ecd98c2df6d4e9bd88686863"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a28b8cc0a9d487672955d3a3fa03de247"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_source_info.html#a28b8cc0a9d487672955d3a3fa03de247">Active</a></td></tr>
+<tr class="separator:a28b8cc0a9d487672955d3a3fa03de247"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >Information about an upstream stream source. </p>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="a6db3c6ff8a465a45f8bd5c7bdf5f6c04" name="a6db3c6ff8a465a45f8bd5c7bdf5f6c04"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a6db3c6ff8a465a45f8bd5c7bdf5f6c04">&#9670;&#160;</a></span>Name</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">char* jsStreamSourceInfo::Name</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a7eb19dd2637079fd1e970a2b38d33e05" name="a7eb19dd2637079fd1e970a2b38d33e05"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a7eb19dd2637079fd1e970a2b38d33e05">&#9670;&#160;</a></span>External</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="structjs_external_stream.html">jsExternalStream</a>* jsStreamSourceInfo::External</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ab2ee0ca3ecd98c2df6d4e9bd88686863" name="ab2ee0ca3ecd98c2df6d4e9bd88686863"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ab2ee0ca3ecd98c2df6d4e9bd88686863">&#9670;&#160;</a></span>Lag</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t jsStreamSourceInfo::Lag</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a28b8cc0a9d487672955d3a3fa03de247" name="a28b8cc0a9d487672955d3a3fa03de247"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a28b8cc0a9d487672955d3a3fa03de247">&#9670;&#160;</a></span>Active</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsStreamSourceInfo::Active</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_stream_source_info.html">jsStreamSourceInfo</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_stream_source_info.js b/doc/html/structjs_stream_source_info.js
new file mode 100644 (file)
index 0000000..81cc80b
--- /dev/null
@@ -0,0 +1,7 @@
+var structjs_stream_source_info =
+[
+    [ "Name", "structjs_stream_source_info.html#a6db3c6ff8a465a45f8bd5c7bdf5f6c04", null ],
+    [ "External", "structjs_stream_source_info.html#a7eb19dd2637079fd1e970a2b38d33e05", null ],
+    [ "Lag", "structjs_stream_source_info.html#ab2ee0ca3ecd98c2df6d4e9bd88686863", null ],
+    [ "Active", "structjs_stream_source_info.html#a28b8cc0a9d487672955d3a3fa03de247", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_stream_state-members.html b/doc/html/structjs_stream_state-members.html
new file mode 100644 (file)
index 0000000..4baa017
--- /dev/null
@@ -0,0 +1,125 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_stream_state.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsStreamState Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_stream_state.html">jsStreamState</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_stream_state.html#ae603fa6ecfb63c93b61272b7d1b8fb4d">Bytes</a></td><td class="entry"><a class="el" href="structjs_stream_state.html">jsStreamState</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_stream_state.html#a27f4cfb85c0f1b0c5c7ad5275bd25d85">Consumers</a></td><td class="entry"><a class="el" href="structjs_stream_state.html">jsStreamState</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_stream_state.html#abcf4d3c581c06d820f1ad21d640bef3f">Deleted</a></td><td class="entry"><a class="el" href="structjs_stream_state.html">jsStreamState</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_stream_state.html#a34a08a64c97269165630bf2e0c78c2c0">DeletedLen</a></td><td class="entry"><a class="el" href="structjs_stream_state.html">jsStreamState</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_stream_state.html#a55bb6719163acef7fdb6d0bc3ae8d5da">FirstSeq</a></td><td class="entry"><a class="el" href="structjs_stream_state.html">jsStreamState</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_stream_state.html#afb7a708022faff518c060b33e99b04b0">FirstTime</a></td><td class="entry"><a class="el" href="structjs_stream_state.html">jsStreamState</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_stream_state.html#a22da809fe7a1ec3101841e86d6708827">LastSeq</a></td><td class="entry"><a class="el" href="structjs_stream_state.html">jsStreamState</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_stream_state.html#a67cbd0d8b43d8c05c8b4cd6b0e44dab0">LastTime</a></td><td class="entry"><a class="el" href="structjs_stream_state.html">jsStreamState</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_stream_state.html#a1adf8991f31fc4db9d6907a0316f8eec">Lost</a></td><td class="entry"><a class="el" href="structjs_stream_state.html">jsStreamState</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_stream_state.html#a495269fe83c6bbf2023cca94add0a888">Msgs</a></td><td class="entry"><a class="el" href="structjs_stream_state.html">jsStreamState</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_stream_state.html#acbec2f01830b56cb4c0bf54ae5170e51">NumDeleted</a></td><td class="entry"><a class="el" href="structjs_stream_state.html">jsStreamState</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_stream_state.html#aaa43db17641826e7c6ecc1954f641960">NumSubjects</a></td><td class="entry"><a class="el" href="structjs_stream_state.html">jsStreamState</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_stream_state.html#a4af56e8bee7262ab050f2a25114c5909">Subjects</a></td><td class="entry"><a class="el" href="structjs_stream_state.html">jsStreamState</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_stream_state.html b/doc/html/structjs_stream_state.html
new file mode 100644 (file)
index 0000000..cc33a90
--- /dev/null
@@ -0,0 +1,336 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsStreamState Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_stream_state.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_stream_state-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsStreamState Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:a495269fe83c6bbf2023cca94add0a888"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_state.html#a495269fe83c6bbf2023cca94add0a888">Msgs</a></td></tr>
+<tr class="separator:a495269fe83c6bbf2023cca94add0a888"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ae603fa6ecfb63c93b61272b7d1b8fb4d"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_state.html#ae603fa6ecfb63c93b61272b7d1b8fb4d">Bytes</a></td></tr>
+<tr class="separator:ae603fa6ecfb63c93b61272b7d1b8fb4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a55bb6719163acef7fdb6d0bc3ae8d5da"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_state.html#a55bb6719163acef7fdb6d0bc3ae8d5da">FirstSeq</a></td></tr>
+<tr class="separator:a55bb6719163acef7fdb6d0bc3ae8d5da"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:afb7a708022faff518c060b33e99b04b0"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_state.html#afb7a708022faff518c060b33e99b04b0">FirstTime</a></td></tr>
+<tr class="memdesc:afb7a708022faff518c060b33e99b04b0"><td class="mdescLeft">&#160;</td><td class="mdescRight">UTC time expressed as number of nanoseconds since epoch.  <a href="structjs_stream_state.html#afb7a708022faff518c060b33e99b04b0">More...</a><br /></td></tr>
+<tr class="separator:afb7a708022faff518c060b33e99b04b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a22da809fe7a1ec3101841e86d6708827"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_state.html#a22da809fe7a1ec3101841e86d6708827">LastSeq</a></td></tr>
+<tr class="separator:a22da809fe7a1ec3101841e86d6708827"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a67cbd0d8b43d8c05c8b4cd6b0e44dab0"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_state.html#a67cbd0d8b43d8c05c8b4cd6b0e44dab0">LastTime</a></td></tr>
+<tr class="memdesc:a67cbd0d8b43d8c05c8b4cd6b0e44dab0"><td class="mdescLeft">&#160;</td><td class="mdescRight">UTC time expressed as number of nanoseconds since epoch.  <a href="structjs_stream_state.html#a67cbd0d8b43d8c05c8b4cd6b0e44dab0">More...</a><br /></td></tr>
+<tr class="separator:a67cbd0d8b43d8c05c8b4cd6b0e44dab0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aaa43db17641826e7c6ecc1954f641960"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_state.html#aaa43db17641826e7c6ecc1954f641960">NumSubjects</a></td></tr>
+<tr class="separator:aaa43db17641826e7c6ecc1954f641960"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a4af56e8bee7262ab050f2a25114c5909"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structjs_stream_state_subjects.html">jsStreamStateSubjects</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_state.html#a4af56e8bee7262ab050f2a25114c5909">Subjects</a></td></tr>
+<tr class="separator:a4af56e8bee7262ab050f2a25114c5909"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:acbec2f01830b56cb4c0bf54ae5170e51"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_state.html#acbec2f01830b56cb4c0bf54ae5170e51">NumDeleted</a></td></tr>
+<tr class="separator:acbec2f01830b56cb4c0bf54ae5170e51"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:abcf4d3c581c06d820f1ad21d640bef3f"><td class="memItemLeft" align="right" valign="top">uint64_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_state.html#abcf4d3c581c06d820f1ad21d640bef3f">Deleted</a></td></tr>
+<tr class="separator:abcf4d3c581c06d820f1ad21d640bef3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a34a08a64c97269165630bf2e0c78c2c0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_state.html#a34a08a64c97269165630bf2e0c78c2c0">DeletedLen</a></td></tr>
+<tr class="separator:a34a08a64c97269165630bf2e0c78c2c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a1adf8991f31fc4db9d6907a0316f8eec"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structjs_lost_stream_data.html">jsLostStreamData</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_state.html#a1adf8991f31fc4db9d6907a0316f8eec">Lost</a></td></tr>
+<tr class="separator:a1adf8991f31fc4db9d6907a0316f8eec"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a27f4cfb85c0f1b0c5c7ad5275bd25d85"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_state.html#a27f4cfb85c0f1b0c5c7ad5275bd25d85">Consumers</a></td></tr>
+<tr class="separator:a27f4cfb85c0f1b0c5c7ad5275bd25d85"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >Information about the given stream</p>
+<dl class="section note"><dt>Note</dt><dd><code>FirstTime</code> and <code>LastTime</code> are message timestamps expressed as the number of nanoseconds passed since 00:00:00 UTC Thursday, 1 January 1970. </dd></dl>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="a495269fe83c6bbf2023cca94add0a888" name="a495269fe83c6bbf2023cca94add0a888"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a495269fe83c6bbf2023cca94add0a888">&#9670;&#160;</a></span>Msgs</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t jsStreamState::Msgs</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ae603fa6ecfb63c93b61272b7d1b8fb4d" name="ae603fa6ecfb63c93b61272b7d1b8fb4d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ae603fa6ecfb63c93b61272b7d1b8fb4d">&#9670;&#160;</a></span>Bytes</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t jsStreamState::Bytes</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a55bb6719163acef7fdb6d0bc3ae8d5da" name="a55bb6719163acef7fdb6d0bc3ae8d5da"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a55bb6719163acef7fdb6d0bc3ae8d5da">&#9670;&#160;</a></span>FirstSeq</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t jsStreamState::FirstSeq</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="afb7a708022faff518c060b33e99b04b0" name="afb7a708022faff518c060b33e99b04b0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#afb7a708022faff518c060b33e99b04b0">&#9670;&#160;</a></span>FirstTime</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsStreamState::FirstTime</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a22da809fe7a1ec3101841e86d6708827" name="a22da809fe7a1ec3101841e86d6708827"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a22da809fe7a1ec3101841e86d6708827">&#9670;&#160;</a></span>LastSeq</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t jsStreamState::LastSeq</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a67cbd0d8b43d8c05c8b4cd6b0e44dab0" name="a67cbd0d8b43d8c05c8b4cd6b0e44dab0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a67cbd0d8b43d8c05c8b4cd6b0e44dab0">&#9670;&#160;</a></span>LastTime</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsStreamState::LastTime</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="aaa43db17641826e7c6ecc1954f641960" name="aaa43db17641826e7c6ecc1954f641960"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aaa43db17641826e7c6ecc1954f641960">&#9670;&#160;</a></span>NumSubjects</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsStreamState::NumSubjects</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a4af56e8bee7262ab050f2a25114c5909" name="a4af56e8bee7262ab050f2a25114c5909"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a4af56e8bee7262ab050f2a25114c5909">&#9670;&#160;</a></span>Subjects</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="structjs_stream_state_subjects.html">jsStreamStateSubjects</a>* jsStreamState::Subjects</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="acbec2f01830b56cb4c0bf54ae5170e51" name="acbec2f01830b56cb4c0bf54ae5170e51"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#acbec2f01830b56cb4c0bf54ae5170e51">&#9670;&#160;</a></span>NumDeleted</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t jsStreamState::NumDeleted</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="abcf4d3c581c06d820f1ad21d640bef3f" name="abcf4d3c581c06d820f1ad21d640bef3f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#abcf4d3c581c06d820f1ad21d640bef3f">&#9670;&#160;</a></span>Deleted</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t* jsStreamState::Deleted</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a34a08a64c97269165630bf2e0c78c2c0" name="a34a08a64c97269165630bf2e0c78c2c0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a34a08a64c97269165630bf2e0c78c2c0">&#9670;&#160;</a></span>DeletedLen</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int jsStreamState::DeletedLen</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a1adf8991f31fc4db9d6907a0316f8eec" name="a1adf8991f31fc4db9d6907a0316f8eec"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a1adf8991f31fc4db9d6907a0316f8eec">&#9670;&#160;</a></span>Lost</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="structjs_lost_stream_data.html">jsLostStreamData</a>* jsStreamState::Lost</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a27f4cfb85c0f1b0c5c7ad5275bd25d85" name="a27f4cfb85c0f1b0c5c7ad5275bd25d85"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a27f4cfb85c0f1b0c5c7ad5275bd25d85">&#9670;&#160;</a></span>Consumers</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsStreamState::Consumers</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_stream_state.html">jsStreamState</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_stream_state.js b/doc/html/structjs_stream_state.js
new file mode 100644 (file)
index 0000000..f28ac4c
--- /dev/null
@@ -0,0 +1,16 @@
+var structjs_stream_state =
+[
+    [ "Msgs", "structjs_stream_state.html#a495269fe83c6bbf2023cca94add0a888", null ],
+    [ "Bytes", "structjs_stream_state.html#ae603fa6ecfb63c93b61272b7d1b8fb4d", null ],
+    [ "FirstSeq", "structjs_stream_state.html#a55bb6719163acef7fdb6d0bc3ae8d5da", null ],
+    [ "FirstTime", "structjs_stream_state.html#afb7a708022faff518c060b33e99b04b0", null ],
+    [ "LastSeq", "structjs_stream_state.html#a22da809fe7a1ec3101841e86d6708827", null ],
+    [ "LastTime", "structjs_stream_state.html#a67cbd0d8b43d8c05c8b4cd6b0e44dab0", null ],
+    [ "NumSubjects", "structjs_stream_state.html#aaa43db17641826e7c6ecc1954f641960", null ],
+    [ "Subjects", "structjs_stream_state.html#a4af56e8bee7262ab050f2a25114c5909", null ],
+    [ "NumDeleted", "structjs_stream_state.html#acbec2f01830b56cb4c0bf54ae5170e51", null ],
+    [ "Deleted", "structjs_stream_state.html#abcf4d3c581c06d820f1ad21d640bef3f", null ],
+    [ "DeletedLen", "structjs_stream_state.html#a34a08a64c97269165630bf2e0c78c2c0", null ],
+    [ "Lost", "structjs_stream_state.html#a1adf8991f31fc4db9d6907a0316f8eec", null ],
+    [ "Consumers", "structjs_stream_state.html#a27f4cfb85c0f1b0c5c7ad5275bd25d85", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_stream_state_subject-members.html b/doc/html/structjs_stream_state_subject-members.html
new file mode 100644 (file)
index 0000000..0bf54be
--- /dev/null
@@ -0,0 +1,114 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_stream_state_subject.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsStreamStateSubject Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_stream_state_subject.html">jsStreamStateSubject</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_stream_state_subject.html#a8b9b2edc5afe82b7b3bc7dbdd67a4384">Msgs</a></td><td class="entry"><a class="el" href="structjs_stream_state_subject.html">jsStreamStateSubject</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_stream_state_subject.html#aa766824a7f8b69db592971af3262640e">Subject</a></td><td class="entry"><a class="el" href="structjs_stream_state_subject.html">jsStreamStateSubject</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_stream_state_subject.html b/doc/html/structjs_stream_state_subject.html
new file mode 100644 (file)
index 0000000..19825ef
--- /dev/null
@@ -0,0 +1,158 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsStreamStateSubject Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_stream_state_subject.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_stream_state_subject-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsStreamStateSubject Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:aa766824a7f8b69db592971af3262640e"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_state_subject.html#aa766824a7f8b69db592971af3262640e">Subject</a></td></tr>
+<tr class="separator:aa766824a7f8b69db592971af3262640e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a8b9b2edc5afe82b7b3bc7dbdd67a4384"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_state_subject.html#a8b9b2edc5afe82b7b3bc7dbdd67a4384">Msgs</a></td></tr>
+<tr class="separator:a8b9b2edc5afe82b7b3bc7dbdd67a4384"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >This indicate that the given <code>Subject</code> in a stream contains <code>Msgs</code> messages.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="structjs_stream_state_subjects.html">jsStreamStateSubjects</a> </dd></dl>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="aa766824a7f8b69db592971af3262640e" name="aa766824a7f8b69db592971af3262640e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aa766824a7f8b69db592971af3262640e">&#9670;&#160;</a></span>Subject</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* jsStreamStateSubject::Subject</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a8b9b2edc5afe82b7b3bc7dbdd67a4384" name="a8b9b2edc5afe82b7b3bc7dbdd67a4384"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a8b9b2edc5afe82b7b3bc7dbdd67a4384">&#9670;&#160;</a></span>Msgs</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t jsStreamStateSubject::Msgs</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_stream_state_subject.html">jsStreamStateSubject</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_stream_state_subject.js b/doc/html/structjs_stream_state_subject.js
new file mode 100644 (file)
index 0000000..26a3dde
--- /dev/null
@@ -0,0 +1,5 @@
+var structjs_stream_state_subject =
+[
+    [ "Subject", "structjs_stream_state_subject.html#aa766824a7f8b69db592971af3262640e", null ],
+    [ "Msgs", "structjs_stream_state_subject.html#a8b9b2edc5afe82b7b3bc7dbdd67a4384", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_stream_state_subjects-members.html b/doc/html/structjs_stream_state_subjects-members.html
new file mode 100644 (file)
index 0000000..269d49a
--- /dev/null
@@ -0,0 +1,114 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_stream_state_subjects.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsStreamStateSubjects Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_stream_state_subjects.html">jsStreamStateSubjects</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_stream_state_subjects.html#ab88e2026f518b6cdffd3901b5e5cd374">Count</a></td><td class="entry"><a class="el" href="structjs_stream_state_subjects.html">jsStreamStateSubjects</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_stream_state_subjects.html#aef3d1e886b16961daa84c43650fa80c0">List</a></td><td class="entry"><a class="el" href="structjs_stream_state_subjects.html">jsStreamStateSubjects</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_stream_state_subjects.html b/doc/html/structjs_stream_state_subjects.html
new file mode 100644 (file)
index 0000000..c6ecefe
--- /dev/null
@@ -0,0 +1,178 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsStreamStateSubjects Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_stream_state_subjects.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_stream_state_subjects-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsStreamStateSubjects Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:aef3d1e886b16961daa84c43650fa80c0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structjs_stream_state_subject.html">jsStreamStateSubject</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_state_subjects.html#aef3d1e886b16961daa84c43650fa80c0">List</a></td></tr>
+<tr class="separator:aef3d1e886b16961daa84c43650fa80c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ab88e2026f518b6cdffd3901b5e5cd374"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_stream_state_subjects.html#ab88e2026f518b6cdffd3901b5e5cd374">Count</a></td></tr>
+<tr class="separator:ab88e2026f518b6cdffd3901b5e5cd374"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >List of subjects optionally returned in the stream information request.</p>
+<p >This structure indicates the number of elements in the list, that is, the list contains <code>Count</code> <a class="el" href="structjs_stream_state_subject.html">jsStreamStateSubject</a> elements.</p>
+<p >To get this list in <a class="el" href="structjs_stream_state.html">jsStreamState</a>, you have to ask for it through <a class="el" href="structjs_options.html">jsOptions</a>.</p>
+<div class="fragment"><div class="line">jsStreamInfo *si = NULL;</div>
+<div class="line">jsOptions    o;</div>
+<div class="line"> </div>
+<div class="line">jsOptions_Init(&amp;o);</div>
+<div class="line">o.Stream.Info.SubjectsFilter = &quot;foo.&gt;&quot;;</div>
+<div class="line">s = js_GetStreamInfo(&amp;si, js, &quot;MY_STREAM&quot;, &amp;o, &amp;jerr);</div>
+<div class="line"> </div>
+<div class="line">// handle errors and assume si-&gt;State.Subjects is not NULL</div>
+<div class="line"> </div>
+<div class="line">for (i=0; i&lt;si-&gt;State.Subjects-&gt;Count; i++)</div>
+<div class="line">{</div>
+<div class="line">     jsStreamStateSubject *subj = &amp;(si-&gt;State.Subjects-&gt;List[i]);</div>
+<div class="line">     printf(&quot;Subject=%s Messages count=%d\n&quot;, subj-&gt;Subject, (int) subj-&gt;Msgs);</div>
+<div class="line">}</div>
+</div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><a class="el" href="structjs_stream_state_subject.html">jsStreamStateSubject</a> </dd>
+<dd>
+<a class="el" href="group__js_assets_group.html#ga94cb23a35516b7779de28fcbb263180a" title="Retreives information from a stream.">js_GetStreamInfo</a> </dd>
+<dd>
+jsOptions.Stream.Info.SubjectsFilter </dd></dl>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="aef3d1e886b16961daa84c43650fa80c0" name="aef3d1e886b16961daa84c43650fa80c0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aef3d1e886b16961daa84c43650fa80c0">&#9670;&#160;</a></span>List</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="structjs_stream_state_subject.html">jsStreamStateSubject</a>* jsStreamStateSubjects::List</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ab88e2026f518b6cdffd3901b5e5cd374" name="ab88e2026f518b6cdffd3901b5e5cd374"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ab88e2026f518b6cdffd3901b5e5cd374">&#9670;&#160;</a></span>Count</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int jsStreamStateSubjects::Count</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_stream_state_subjects.html">jsStreamStateSubjects</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_stream_state_subjects.js b/doc/html/structjs_stream_state_subjects.js
new file mode 100644 (file)
index 0000000..cfd65cc
--- /dev/null
@@ -0,0 +1,5 @@
+var structjs_stream_state_subjects =
+[
+    [ "List", "structjs_stream_state_subjects.html#aef3d1e886b16961daa84c43650fa80c0", null ],
+    [ "Count", "structjs_stream_state_subjects.html#ab88e2026f518b6cdffd3901b5e5cd374", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_sub_options-members.html b/doc/html/structjs_sub_options-members.html
new file mode 100644 (file)
index 0000000..24f96f6
--- /dev/null
@@ -0,0 +1,118 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_sub_options.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsSubOptions Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_sub_options.html">jsSubOptions</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_sub_options.html#acab25d71a2efe26bb3b084071435c2b5">Config</a></td><td class="entry"><a class="el" href="structjs_sub_options.html">jsSubOptions</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_sub_options.html#a7aa5b8439ed288b858943f28c291cb36">Consumer</a></td><td class="entry"><a class="el" href="structjs_sub_options.html">jsSubOptions</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_sub_options.html#a21a905c49dfab61729d8674702d196b2">ManualAck</a></td><td class="entry"><a class="el" href="structjs_sub_options.html">jsSubOptions</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_sub_options.html#a95c5d2db8ca97d644042d436de119be4">Ordered</a></td><td class="entry"><a class="el" href="structjs_sub_options.html">jsSubOptions</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_sub_options.html#aaf4b620d112a31f51a20389c5405805d">Queue</a></td><td class="entry"><a class="el" href="structjs_sub_options.html">jsSubOptions</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_sub_options.html#a856a6af4a7ff5aa2e736338091e69484">Stream</a></td><td class="entry"><a class="el" href="structjs_sub_options.html">jsSubOptions</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_sub_options.html b/doc/html/structjs_sub_options.html
new file mode 100644 (file)
index 0000000..773924e
--- /dev/null
@@ -0,0 +1,242 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsSubOptions Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_sub_options.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_sub_options-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsSubOptions Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:a856a6af4a7ff5aa2e736338091e69484"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_sub_options.html#a856a6af4a7ff5aa2e736338091e69484">Stream</a></td></tr>
+<tr class="memdesc:a856a6af4a7ff5aa2e736338091e69484"><td class="mdescLeft">&#160;</td><td class="mdescRight">If specified, the consumer will be bound to this stream name.  <a href="structjs_sub_options.html#a856a6af4a7ff5aa2e736338091e69484">More...</a><br /></td></tr>
+<tr class="separator:a856a6af4a7ff5aa2e736338091e69484"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a7aa5b8439ed288b858943f28c291cb36"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_sub_options.html#a7aa5b8439ed288b858943f28c291cb36">Consumer</a></td></tr>
+<tr class="memdesc:a7aa5b8439ed288b858943f28c291cb36"><td class="mdescLeft">&#160;</td><td class="mdescRight">If specified, the subscription will be bound to an existing consumer from the <code>Stream</code> without attempting to create.  <a href="structjs_sub_options.html#a7aa5b8439ed288b858943f28c291cb36">More...</a><br /></td></tr>
+<tr class="separator:a7aa5b8439ed288b858943f28c291cb36"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aaf4b620d112a31f51a20389c5405805d"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_sub_options.html#aaf4b620d112a31f51a20389c5405805d">Queue</a></td></tr>
+<tr class="memdesc:aaf4b620d112a31f51a20389c5405805d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Queue name for queue subscriptions.  <a href="structjs_sub_options.html#aaf4b620d112a31f51a20389c5405805d">More...</a><br /></td></tr>
+<tr class="separator:aaf4b620d112a31f51a20389c5405805d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a21a905c49dfab61729d8674702d196b2"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_sub_options.html#a21a905c49dfab61729d8674702d196b2">ManualAck</a></td></tr>
+<tr class="memdesc:a21a905c49dfab61729d8674702d196b2"><td class="mdescLeft">&#160;</td><td class="mdescRight">If true, the user will have to acknowledge the messages.  <a href="structjs_sub_options.html#a21a905c49dfab61729d8674702d196b2">More...</a><br /></td></tr>
+<tr class="separator:a21a905c49dfab61729d8674702d196b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:acab25d71a2efe26bb3b084071435c2b5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_sub_options.html#acab25d71a2efe26bb3b084071435c2b5">Config</a></td></tr>
+<tr class="memdesc:acab25d71a2efe26bb3b084071435c2b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Consumer configuration.  <a href="structjs_sub_options.html#acab25d71a2efe26bb3b084071435c2b5">More...</a><br /></td></tr>
+<tr class="separator:acab25d71a2efe26bb3b084071435c2b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a95c5d2db8ca97d644042d436de119be4"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_sub_options.html#a95c5d2db8ca97d644042d436de119be4">Ordered</a></td></tr>
+<tr class="memdesc:a95c5d2db8ca97d644042d436de119be4"><td class="mdescLeft">&#160;</td><td class="mdescRight">If true, this will be an ordered consumer.  <a href="structjs_sub_options.html#a95c5d2db8ca97d644042d436de119be4">More...</a><br /></td></tr>
+<tr class="separator:a95c5d2db8ca97d644042d436de119be4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >JetStream subscribe options.</p>
+<p >These are options that you can provide to JetStream subscribe APIs.</p>
+<p >The common usage will be to initialize a structure on the stack by calling <a class="el" href="group__js_sub_group.html#ga472adb949d1af9d8f07bda99f5d7f3f8" title="Initializes a subscribe options structure.">jsSubOptions_Init</a>. Note that strings are owned by the application and need to be valid for the duration of the API call this object is passed to.</p>
+<dl class="section note"><dt>Note</dt><dd>It is the user responsibility to free the strings if they have been allocated.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__js_sub_group.html#ga472adb949d1af9d8f07bda99f5d7f3f8" title="Initializes a subscribe options structure.">jsSubOptions_Init</a> </dd></dl>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="a856a6af4a7ff5aa2e736338091e69484" name="a856a6af4a7ff5aa2e736338091e69484"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a856a6af4a7ff5aa2e736338091e69484">&#9670;&#160;</a></span>Stream</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* jsSubOptions::Stream</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >If specified, the library will only bind to this stream, otherwise, the library communicates with the server to get the stream name that has the matching subject given to the <a class="el" href="group__js_sub_group.html#gaa686c6efd84ef963de1925108e896515" title="Create an asynchronous subscription.">js_Subscribe</a> family calls. </p>
+
+</div>
+</div>
+<a id="a7aa5b8439ed288b858943f28c291cb36" name="a7aa5b8439ed288b858943f28c291cb36"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a7aa5b8439ed288b858943f28c291cb36">&#9670;&#160;</a></span>Consumer</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* jsSubOptions::Consumer</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >If specified, the <a class="el" href="group__js_sub_group.html#gaa686c6efd84ef963de1925108e896515" title="Create an asynchronous subscription.">js_Subscribe</a> family calls will only attempt to create a subscription for this matching consumer.</p>
+<p >That is, the consumer should exist prior to the call, either created by the application calling <a class="el" href="group__js_assets_group.html#gaf2efb63db150e782d9007090b49d4115" title="Adds a JetStream consumer.">js_AddConsumer</a> or it should have been created with some other tools such as the NATS cli. </p>
+
+</div>
+</div>
+<a id="aaf4b620d112a31f51a20389c5405805d" name="aaf4b620d112a31f51a20389c5405805d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aaf4b620d112a31f51a20389c5405805d">&#9670;&#160;</a></span>Queue</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* jsSubOptions::Queue</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >If specified, the low level NATS subscription will be a queue subscription, which means that the load on the delivery subject will be balanced across multiple members of the same queue group.</p>
+<p >This makes sense only if the delivery subject in the <code>Config</code> field of <a class="el" href="structjs_sub_options.html">jsSubOptions</a> is the same for the members of the same group.</p>
+<p >When no <code>Durable</code> name is specified in the <code>Config</code> block, then the queue name will be used as the consumer's durable name. In this case, the queue name cannot contain the character ".". </p>
+
+</div>
+</div>
+<a id="a21a905c49dfab61729d8674702d196b2" name="a21a905c49dfab61729d8674702d196b2"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a21a905c49dfab61729d8674702d196b2">&#9670;&#160;</a></span>ManualAck</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool jsSubOptions::ManualAck</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This has meaning only for asynchronous subscriptions, and only if the consumer's acknowledgment mode is other than <a class="el" href="group__types_group.html#gga8fcb50e6e7312834791f9e237d28e873afd91fe31cf57c68863ca3090b07c296c" title="Requires no acks for delivered messages.">js_AckNone</a>.</p>
+<p >For asynchronous subscriptions, the default behavior is for the library to acknowledge the message once the user callback returns.</p>
+<p >This option allows you to take control of when the message should be acknowledged. </p>
+
+</div>
+</div>
+<a id="acab25d71a2efe26bb3b084071435c2b5" name="acab25d71a2efe26bb3b084071435c2b5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#acab25d71a2efe26bb3b084071435c2b5">&#9670;&#160;</a></span>Config</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="structjs_consumer_config.html">jsConsumerConfig</a> jsSubOptions::Config</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This allows the user to fully configure the JetStream consumer. </p>
+
+</div>
+</div>
+<a id="a95c5d2db8ca97d644042d436de119be4" name="a95c5d2db8ca97d644042d436de119be4"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a95c5d2db8ca97d644042d436de119be4">&#9670;&#160;</a></span>Ordered</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool jsSubOptions::Ordered</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p >This will create a fifo ephemeral consumer for in order delivery of messages. There are no redeliveries and no acks. Flow control and heartbeats are required and set by default, but the heartbeats value can be overridden in the consumer configuration. </p>
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_sub_options.html">jsSubOptions</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_sub_options.js b/doc/html/structjs_sub_options.js
new file mode 100644 (file)
index 0000000..e42ac49
--- /dev/null
@@ -0,0 +1,9 @@
+var structjs_sub_options =
+[
+    [ "Stream", "structjs_sub_options.html#a856a6af4a7ff5aa2e736338091e69484", null ],
+    [ "Consumer", "structjs_sub_options.html#a7aa5b8439ed288b858943f28c291cb36", null ],
+    [ "Queue", "structjs_sub_options.html#aaf4b620d112a31f51a20389c5405805d", null ],
+    [ "ManualAck", "structjs_sub_options.html#a21a905c49dfab61729d8674702d196b2", null ],
+    [ "Config", "structjs_sub_options.html#acab25d71a2efe26bb3b084071435c2b5", null ],
+    [ "Ordered", "structjs_sub_options.html#a95c5d2db8ca97d644042d436de119be4", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structjs_tier-members.html b/doc/html/structjs_tier-members.html
new file mode 100644 (file)
index 0000000..ba49b45
--- /dev/null
@@ -0,0 +1,118 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_tier.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">jsTier Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structjs_tier.html">jsTier</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structjs_tier.html#ac33ce862c041572d10184e7fa0dd0bfe">Consumers</a></td><td class="entry"><a class="el" href="structjs_tier.html">jsTier</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_tier.html#af2edbabd5e078b1e31dd73d44fd507d3">Limits</a></td><td class="entry"><a class="el" href="structjs_tier.html">jsTier</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_tier.html#aeff4a4cb86e10d8d7749d6ff69f97ed1">Memory</a></td><td class="entry"><a class="el" href="structjs_tier.html">jsTier</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_tier.html#a1ed542b9acccbe7761839f33c43053a6">Name</a></td><td class="entry"><a class="el" href="structjs_tier.html">jsTier</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structjs_tier.html#ab16c426e1c35d8c0fd6c460c43580a39">Store</a></td><td class="entry"><a class="el" href="structjs_tier.html">jsTier</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structjs_tier.html#a3f9234fde387faf3775d841aa797a6ea">Streams</a></td><td class="entry"><a class="el" href="structjs_tier.html">jsTier</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_tier.html b/doc/html/structjs_tier.html
new file mode 100644 (file)
index 0000000..339aaaf
--- /dev/null
@@ -0,0 +1,219 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: jsTier Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structjs_tier.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structjs_tier-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">jsTier Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:a1ed542b9acccbe7761839f33c43053a6"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_tier.html#a1ed542b9acccbe7761839f33c43053a6">Name</a></td></tr>
+<tr class="separator:a1ed542b9acccbe7761839f33c43053a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aeff4a4cb86e10d8d7749d6ff69f97ed1"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_tier.html#aeff4a4cb86e10d8d7749d6ff69f97ed1">Memory</a></td></tr>
+<tr class="separator:aeff4a4cb86e10d8d7749d6ff69f97ed1"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ab16c426e1c35d8c0fd6c460c43580a39"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_tier.html#ab16c426e1c35d8c0fd6c460c43580a39">Store</a></td></tr>
+<tr class="separator:ab16c426e1c35d8c0fd6c460c43580a39"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a3f9234fde387faf3775d841aa797a6ea"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_tier.html#a3f9234fde387faf3775d841aa797a6ea">Streams</a></td></tr>
+<tr class="separator:a3f9234fde387faf3775d841aa797a6ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ac33ce862c041572d10184e7fa0dd0bfe"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_tier.html#ac33ce862c041572d10184e7fa0dd0bfe">Consumers</a></td></tr>
+<tr class="separator:ac33ce862c041572d10184e7fa0dd0bfe"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:af2edbabd5e078b1e31dd73d44fd507d3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structjs_account_limits.html">jsAccountLimits</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjs_tier.html#af2edbabd5e078b1e31dd73d44fd507d3">Limits</a></td></tr>
+<tr class="separator:af2edbabd5e078b1e31dd73d44fd507d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<h2 class="groupheader">Member Data Documentation</h2>
+<a id="a1ed542b9acccbe7761839f33c43053a6" name="a1ed542b9acccbe7761839f33c43053a6"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a1ed542b9acccbe7761839f33c43053a6">&#9670;&#160;</a></span>Name</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* jsTier::Name</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="aeff4a4cb86e10d8d7749d6ff69f97ed1" name="aeff4a4cb86e10d8d7749d6ff69f97ed1"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aeff4a4cb86e10d8d7749d6ff69f97ed1">&#9670;&#160;</a></span>Memory</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t jsTier::Memory</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ab16c426e1c35d8c0fd6c460c43580a39" name="ab16c426e1c35d8c0fd6c460c43580a39"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ab16c426e1c35d8c0fd6c460c43580a39">&#9670;&#160;</a></span>Store</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint64_t jsTier::Store</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a3f9234fde387faf3775d841aa797a6ea" name="a3f9234fde387faf3775d841aa797a6ea"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a3f9234fde387faf3775d841aa797a6ea">&#9670;&#160;</a></span>Streams</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsTier::Streams</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ac33ce862c041572d10184e7fa0dd0bfe" name="ac33ce862c041572d10184e7fa0dd0bfe"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ac33ce862c041572d10184e7fa0dd0bfe">&#9670;&#160;</a></span>Consumers</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t jsTier::Consumers</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="af2edbabd5e078b1e31dd73d44fd507d3" name="af2edbabd5e078b1e31dd73d44fd507d3"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#af2edbabd5e078b1e31dd73d44fd507d3">&#9670;&#160;</a></span>Limits</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="structjs_account_limits.html">jsAccountLimits</a> jsTier::Limits</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structjs_tier.html">jsTier</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structjs_tier.js b/doc/html/structjs_tier.js
new file mode 100644 (file)
index 0000000..bb7cd66
--- /dev/null
@@ -0,0 +1,9 @@
+var structjs_tier =
+[
+    [ "Name", "structjs_tier.html#a1ed542b9acccbe7761839f33c43053a6", null ],
+    [ "Memory", "structjs_tier.html#aeff4a4cb86e10d8d7749d6ff69f97ed1", null ],
+    [ "Store", "structjs_tier.html#ab16c426e1c35d8c0fd6c460c43580a39", null ],
+    [ "Streams", "structjs_tier.html#a3f9234fde387faf3775d841aa797a6ea", null ],
+    [ "Consumers", "structjs_tier.html#ac33ce862c041572d10184e7fa0dd0bfe", null ],
+    [ "Limits", "structjs_tier.html#af2edbabd5e078b1e31dd73d44fd507d3", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structkv_config-members.html b/doc/html/structkv_config-members.html
new file mode 100644 (file)
index 0000000..385d876
--- /dev/null
@@ -0,0 +1,121 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structkv_config.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">kvConfig Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structkv_config.html">kvConfig</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structkv_config.html#a11b636da727c17566d5ab1274f69fee5">Bucket</a></td><td class="entry"><a class="el" href="structkv_config.html">kvConfig</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structkv_config.html#a941e9cad2bab67f093bf4d9567b4749a">Description</a></td><td class="entry"><a class="el" href="structkv_config.html">kvConfig</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structkv_config.html#a0ec6b3afbfdaa33436e2ae748e986e98">History</a></td><td class="entry"><a class="el" href="structkv_config.html">kvConfig</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structkv_config.html#a1bc37777aa91b8b57a70e7647670cd12">MaxBytes</a></td><td class="entry"><a class="el" href="structkv_config.html">kvConfig</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structkv_config.html#a281156a9df0130abad7f3b2728ac35a5">MaxValueSize</a></td><td class="entry"><a class="el" href="structkv_config.html">kvConfig</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structkv_config.html#a48f0f70383eff868321f9c94ae1a87cd">Replicas</a></td><td class="entry"><a class="el" href="structkv_config.html">kvConfig</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structkv_config.html#ae172d3e442eef1a57cd7cf266d9e8951">RePublish</a></td><td class="entry"><a class="el" href="structkv_config.html">kvConfig</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structkv_config.html#ad5db9a58224d93ab86b4cfc4c46f1897">StorageType</a></td><td class="entry"><a class="el" href="structkv_config.html">kvConfig</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structkv_config.html#ad2f5503e2f2522cb52e0ba1b86983dba">TTL</a></td><td class="entry"><a class="el" href="structkv_config.html">kvConfig</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structkv_config.html b/doc/html/structkv_config.html
new file mode 100644 (file)
index 0000000..faf0d96
--- /dev/null
@@ -0,0 +1,270 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: kvConfig Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structkv_config.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structkv_config-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">kvConfig Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:a11b636da727c17566d5ab1274f69fee5"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkv_config.html#a11b636da727c17566d5ab1274f69fee5">Bucket</a></td></tr>
+<tr class="separator:a11b636da727c17566d5ab1274f69fee5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a941e9cad2bab67f093bf4d9567b4749a"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkv_config.html#a941e9cad2bab67f093bf4d9567b4749a">Description</a></td></tr>
+<tr class="separator:a941e9cad2bab67f093bf4d9567b4749a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a281156a9df0130abad7f3b2728ac35a5"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkv_config.html#a281156a9df0130abad7f3b2728ac35a5">MaxValueSize</a></td></tr>
+<tr class="separator:a281156a9df0130abad7f3b2728ac35a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a0ec6b3afbfdaa33436e2ae748e986e98"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkv_config.html#a0ec6b3afbfdaa33436e2ae748e986e98">History</a></td></tr>
+<tr class="separator:a0ec6b3afbfdaa33436e2ae748e986e98"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ad2f5503e2f2522cb52e0ba1b86983dba"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkv_config.html#ad2f5503e2f2522cb52e0ba1b86983dba">TTL</a></td></tr>
+<tr class="separator:ad2f5503e2f2522cb52e0ba1b86983dba"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a1bc37777aa91b8b57a70e7647670cd12"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkv_config.html#a1bc37777aa91b8b57a70e7647670cd12">MaxBytes</a></td></tr>
+<tr class="separator:a1bc37777aa91b8b57a70e7647670cd12"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ad5db9a58224d93ab86b4cfc4c46f1897"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types_group.html#ga1802a53c79e667f093bba033b16adc98">jsStorageType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkv_config.html#ad5db9a58224d93ab86b4cfc4c46f1897">StorageType</a></td></tr>
+<tr class="separator:ad5db9a58224d93ab86b4cfc4c46f1897"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a48f0f70383eff868321f9c94ae1a87cd"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkv_config.html#a48f0f70383eff868321f9c94ae1a87cd">Replicas</a></td></tr>
+<tr class="separator:a48f0f70383eff868321f9c94ae1a87cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ae172d3e442eef1a57cd7cf266d9e8951"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structjs_re_publish.html">jsRePublish</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkv_config.html#ae172d3e442eef1a57cd7cf266d9e8951">RePublish</a></td></tr>
+<tr class="separator:ae172d3e442eef1a57cd7cf266d9e8951"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >KeyValue configuration object.</p>
+<p >Initialize the object with <a class="el" href="group__kv_group_mgt.html#ga16d4c27d8ac62bb86ba601bc40f53172" title="Initializes a KeyValue configuration structure.">kvConfig_Init</a>. </p>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="a11b636da727c17566d5ab1274f69fee5" name="a11b636da727c17566d5ab1274f69fee5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a11b636da727c17566d5ab1274f69fee5">&#9670;&#160;</a></span>Bucket</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* kvConfig::Bucket</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a941e9cad2bab67f093bf4d9567b4749a" name="a941e9cad2bab67f093bf4d9567b4749a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a941e9cad2bab67f093bf4d9567b4749a">&#9670;&#160;</a></span>Description</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* kvConfig::Description</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a281156a9df0130abad7f3b2728ac35a5" name="a281156a9df0130abad7f3b2728ac35a5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a281156a9df0130abad7f3b2728ac35a5">&#9670;&#160;</a></span>MaxValueSize</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int32_t kvConfig::MaxValueSize</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a0ec6b3afbfdaa33436e2ae748e986e98" name="a0ec6b3afbfdaa33436e2ae748e986e98"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a0ec6b3afbfdaa33436e2ae748e986e98">&#9670;&#160;</a></span>History</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">uint8_t kvConfig::History</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ad2f5503e2f2522cb52e0ba1b86983dba" name="ad2f5503e2f2522cb52e0ba1b86983dba"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ad2f5503e2f2522cb52e0ba1b86983dba">&#9670;&#160;</a></span>TTL</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t kvConfig::TTL</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a1bc37777aa91b8b57a70e7647670cd12" name="a1bc37777aa91b8b57a70e7647670cd12"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a1bc37777aa91b8b57a70e7647670cd12">&#9670;&#160;</a></span>MaxBytes</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t kvConfig::MaxBytes</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ad5db9a58224d93ab86b4cfc4c46f1897" name="ad5db9a58224d93ab86b4cfc4c46f1897"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ad5db9a58224d93ab86b4cfc4c46f1897">&#9670;&#160;</a></span>StorageType</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="group__types_group.html#ga1802a53c79e667f093bba033b16adc98">jsStorageType</a> kvConfig::StorageType</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a48f0f70383eff868321f9c94ae1a87cd" name="a48f0f70383eff868321f9c94ae1a87cd"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a48f0f70383eff868321f9c94ae1a87cd">&#9670;&#160;</a></span>Replicas</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int kvConfig::Replicas</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ae172d3e442eef1a57cd7cf266d9e8951" name="ae172d3e442eef1a57cd7cf266d9e8951"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ae172d3e442eef1a57cd7cf266d9e8951">&#9670;&#160;</a></span>RePublish</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="structjs_re_publish.html">jsRePublish</a>* kvConfig::RePublish</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structkv_config.html">kvConfig</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structkv_config.js b/doc/html/structkv_config.js
new file mode 100644 (file)
index 0000000..31d08ce
--- /dev/null
@@ -0,0 +1,12 @@
+var structkv_config =
+[
+    [ "Bucket", "structkv_config.html#a11b636da727c17566d5ab1274f69fee5", null ],
+    [ "Description", "structkv_config.html#a941e9cad2bab67f093bf4d9567b4749a", null ],
+    [ "MaxValueSize", "structkv_config.html#a281156a9df0130abad7f3b2728ac35a5", null ],
+    [ "History", "structkv_config.html#a0ec6b3afbfdaa33436e2ae748e986e98", null ],
+    [ "TTL", "structkv_config.html#ad2f5503e2f2522cb52e0ba1b86983dba", null ],
+    [ "MaxBytes", "structkv_config.html#a1bc37777aa91b8b57a70e7647670cd12", null ],
+    [ "StorageType", "structkv_config.html#ad5db9a58224d93ab86b4cfc4c46f1897", null ],
+    [ "Replicas", "structkv_config.html#a48f0f70383eff868321f9c94ae1a87cd", null ],
+    [ "RePublish", "structkv_config.html#ae172d3e442eef1a57cd7cf266d9e8951", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structkv_entry_list-members.html b/doc/html/structkv_entry_list-members.html
new file mode 100644 (file)
index 0000000..dc48a48
--- /dev/null
@@ -0,0 +1,114 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structkv_entry_list.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">kvEntryList Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structkv_entry_list.html">kvEntryList</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structkv_entry_list.html#a82da55d42e1a6862d3b0034dfc6f321f">Count</a></td><td class="entry"><a class="el" href="structkv_entry_list.html">kvEntryList</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structkv_entry_list.html#a179d4d3e5844d005be1ed9134b969a50">Entries</a></td><td class="entry"><a class="el" href="structkv_entry_list.html">kvEntryList</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structkv_entry_list.html b/doc/html/structkv_entry_list.html
new file mode 100644 (file)
index 0000000..eb6cdf0
--- /dev/null
@@ -0,0 +1,164 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: kvEntryList Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structkv_entry_list.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structkv_entry_list-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">kvEntryList Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>A list of KeyValue store entries.  
+ <a href="structkv_entry_list.html#details">More...</a></p>
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:a179d4d3e5844d005be1ed9134b969a50"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> **&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkv_entry_list.html#a179d4d3e5844d005be1ed9134b969a50">Entries</a></td></tr>
+<tr class="separator:a179d4d3e5844d005be1ed9134b969a50"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a82da55d42e1a6862d3b0034dfc6f321f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkv_entry_list.html#a82da55d42e1a6862d3b0034dfc6f321f">Count</a></td></tr>
+<tr class="separator:a82da55d42e1a6862d3b0034dfc6f321f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >Used by some APIs which return a list of <a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> objects.</p>
+<p >Those APIs will not create the object, but instead initialize the object.</p>
+<p >Typically, the user will define the object on the stack and pass a pointer to this object to APIs that require a pointer to a <a class="el" href="structkv_entry_list.html" title="A list of KeyValue store entries.">kvEntryList</a> object.</p>
+<p >Similarly, calling <a class="el" href="group__kv_group.html#gae783352ab81e22aa3173057d117518e6" title="Destroys this list of KeyValue store entries.">kvEntryList_Destroy</a> will call <a class="el" href="group__kv_entry.html#ga8359ffcdeefb9c5821e6442d0d5ee388" title="Destroys the KeyValue entry object.">kvEntry_Destroy</a> on entries in the list, free the array containing pointers to the entries, but not free the <a class="el" href="structkv_entry_list.html" title="A list of KeyValue store entries.">kvEntryList</a> object itself.</p>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__kv_group.html#gae783352ab81e22aa3173057d117518e6" title="Destroys this list of KeyValue store entries.">kvEntryList_Destroy</a> </dd></dl>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="a179d4d3e5844d005be1ed9134b969a50" name="a179d4d3e5844d005be1ed9134b969a50"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a179d4d3e5844d005be1ed9134b969a50">&#9670;&#160;</a></span>Entries</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a>** kvEntryList::Entries</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a82da55d42e1a6862d3b0034dfc6f321f" name="a82da55d42e1a6862d3b0034dfc6f321f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a82da55d42e1a6862d3b0034dfc6f321f">&#9670;&#160;</a></span>Count</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int kvEntryList::Count</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structkv_entry_list.html">kvEntryList</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structkv_entry_list.js b/doc/html/structkv_entry_list.js
new file mode 100644 (file)
index 0000000..24d99f7
--- /dev/null
@@ -0,0 +1,5 @@
+var structkv_entry_list =
+[
+    [ "Entries", "structkv_entry_list.html#a179d4d3e5844d005be1ed9134b969a50", null ],
+    [ "Count", "structkv_entry_list.html#a82da55d42e1a6862d3b0034dfc6f321f", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structkv_keys_list-members.html b/doc/html/structkv_keys_list-members.html
new file mode 100644 (file)
index 0000000..ba6aa0a
--- /dev/null
@@ -0,0 +1,114 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structkv_keys_list.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">kvKeysList Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structkv_keys_list.html">kvKeysList</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structkv_keys_list.html#a625f7b34784e024a538359efd9a97265">Count</a></td><td class="entry"><a class="el" href="structkv_keys_list.html">kvKeysList</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structkv_keys_list.html#aa5cb40820a1a927375215e0a94ecfc18">Keys</a></td><td class="entry"><a class="el" href="structkv_keys_list.html">kvKeysList</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structkv_keys_list.html b/doc/html/structkv_keys_list.html
new file mode 100644 (file)
index 0000000..1048c28
--- /dev/null
@@ -0,0 +1,164 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: kvKeysList Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structkv_keys_list.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structkv_keys_list-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">kvKeysList Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>A list of KeyValue store keys.  
+ <a href="structkv_keys_list.html#details">More...</a></p>
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:aa5cb40820a1a927375215e0a94ecfc18"><td class="memItemLeft" align="right" valign="top">char **&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkv_keys_list.html#aa5cb40820a1a927375215e0a94ecfc18">Keys</a></td></tr>
+<tr class="separator:aa5cb40820a1a927375215e0a94ecfc18"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a625f7b34784e024a538359efd9a97265"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkv_keys_list.html#a625f7b34784e024a538359efd9a97265">Count</a></td></tr>
+<tr class="separator:a625f7b34784e024a538359efd9a97265"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >Used by some APIs which return a list of key names.</p>
+<p >Those APIs will not create the object, but instead initialize the object.</p>
+<p >Typically, the user will define the object on the stack and pass a pointer to this object to APIs that require a pointer to a <a class="el" href="structkv_keys_list.html" title="A list of KeyValue store keys.">kvKeysList</a> object.</p>
+<p >Similarly, calling <a class="el" href="group__kv_group.html#ga02ccd58bc5062f6ce6f94bf05e3dfe45" title="Destroys this list of KeyValue store key strings.">kvKeysList_Destroy</a> will free key strings in the list, free the array containing pointers to the keys, but not free the <a class="el" href="structkv_keys_list.html" title="A list of KeyValue store keys.">kvKeysList</a> object itself.</p>
+<dl class="section see"><dt>See also</dt><dd>kvKeysList_Cleanup </dd></dl>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="aa5cb40820a1a927375215e0a94ecfc18" name="aa5cb40820a1a927375215e0a94ecfc18"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aa5cb40820a1a927375215e0a94ecfc18">&#9670;&#160;</a></span>Keys</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">char** kvKeysList::Keys</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a625f7b34784e024a538359efd9a97265" name="a625f7b34784e024a538359efd9a97265"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a625f7b34784e024a538359efd9a97265">&#9670;&#160;</a></span>Count</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int kvKeysList::Count</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structkv_keys_list.html">kvKeysList</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structkv_keys_list.js b/doc/html/structkv_keys_list.js
new file mode 100644 (file)
index 0000000..1360cf1
--- /dev/null
@@ -0,0 +1,5 @@
+var structkv_keys_list =
+[
+    [ "Keys", "structkv_keys_list.html#aa5cb40820a1a927375215e0a94ecfc18", null ],
+    [ "Count", "structkv_keys_list.html#a625f7b34784e024a538359efd9a97265", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structkv_purge_options-members.html b/doc/html/structkv_purge_options-members.html
new file mode 100644 (file)
index 0000000..7591e55
--- /dev/null
@@ -0,0 +1,114 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structkv_purge_options.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">kvPurgeOptions Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structkv_purge_options.html">kvPurgeOptions</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structkv_purge_options.html#a47fed1e95073666cbe441aba7c149da6">DeleteMarkersOlderThan</a></td><td class="entry"><a class="el" href="structkv_purge_options.html">kvPurgeOptions</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structkv_purge_options.html#a245c2def0f3aabe617219772cf7680a8">Timeout</a></td><td class="entry"><a class="el" href="structkv_purge_options.html">kvPurgeOptions</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structkv_purge_options.html b/doc/html/structkv_purge_options.html
new file mode 100644 (file)
index 0000000..fe6058d
--- /dev/null
@@ -0,0 +1,158 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: kvPurgeOptions Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structkv_purge_options.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structkv_purge_options-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">kvPurgeOptions Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:a245c2def0f3aabe617219772cf7680a8"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkv_purge_options.html#a245c2def0f3aabe617219772cf7680a8">Timeout</a></td></tr>
+<tr class="separator:a245c2def0f3aabe617219772cf7680a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a47fed1e95073666cbe441aba7c149da6"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkv_purge_options.html#a47fed1e95073666cbe441aba7c149da6">DeleteMarkersOlderThan</a></td></tr>
+<tr class="separator:a47fed1e95073666cbe441aba7c149da6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >KeyValue purge options object.</p>
+<p >Initialize the object with <a class="el" href="group__kv_group.html#ga243113fd7df34ce104850ab888f04021" title="Initializes a KeyValue purge options structure.">kvPurgeOptions_Init</a> </p>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="a245c2def0f3aabe617219772cf7680a8" name="a245c2def0f3aabe617219772cf7680a8"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a245c2def0f3aabe617219772cf7680a8">&#9670;&#160;</a></span>Timeout</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t kvPurgeOptions::Timeout</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a47fed1e95073666cbe441aba7c149da6" name="a47fed1e95073666cbe441aba7c149da6"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a47fed1e95073666cbe441aba7c149da6">&#9670;&#160;</a></span>DeleteMarkersOlderThan</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t kvPurgeOptions::DeleteMarkersOlderThan</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structkv_purge_options.html">kvPurgeOptions</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structkv_purge_options.js b/doc/html/structkv_purge_options.js
new file mode 100644 (file)
index 0000000..97f3086
--- /dev/null
@@ -0,0 +1,5 @@
+var structkv_purge_options =
+[
+    [ "Timeout", "structkv_purge_options.html#a245c2def0f3aabe617219772cf7680a8", null ],
+    [ "DeleteMarkersOlderThan", "structkv_purge_options.html#a47fed1e95073666cbe441aba7c149da6", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structkv_watch_options-members.html b/doc/html/structkv_watch_options-members.html
new file mode 100644 (file)
index 0000000..fb4545e
--- /dev/null
@@ -0,0 +1,116 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structkv_watch_options.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">kvWatchOptions Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structkv_watch_options.html">kvWatchOptions</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structkv_watch_options.html#a0535edd21b26affc0057575bafc21a07">IgnoreDeletes</a></td><td class="entry"><a class="el" href="structkv_watch_options.html">kvWatchOptions</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structkv_watch_options.html#a08274f08ae96e14d9ded326e4e665649">IncludeHistory</a></td><td class="entry"><a class="el" href="structkv_watch_options.html">kvWatchOptions</a></td><td class="entry"></td></tr>
+  <tr class="even"><td class="entry"><a class="el" href="structkv_watch_options.html#ac9094bce4f3c6513431ba32fb49e5605">MetaOnly</a></td><td class="entry"><a class="el" href="structkv_watch_options.html">kvWatchOptions</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structkv_watch_options.html#a56183d56585697d058c7eeb20bdddb66">Timeout</a></td><td class="entry"><a class="el" href="structkv_watch_options.html">kvWatchOptions</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structkv_watch_options.html b/doc/html/structkv_watch_options.html
new file mode 100644 (file)
index 0000000..e8f158d
--- /dev/null
@@ -0,0 +1,191 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: kvWatchOptions Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structkv_watch_options.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structkv_watch_options-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">kvWatchOptions Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:a0535edd21b26affc0057575bafc21a07"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkv_watch_options.html#a0535edd21b26affc0057575bafc21a07">IgnoreDeletes</a></td></tr>
+<tr class="separator:a0535edd21b26affc0057575bafc21a07"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a08274f08ae96e14d9ded326e4e665649"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkv_watch_options.html#a08274f08ae96e14d9ded326e4e665649">IncludeHistory</a></td></tr>
+<tr class="separator:a08274f08ae96e14d9ded326e4e665649"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ac9094bce4f3c6513431ba32fb49e5605"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkv_watch_options.html#ac9094bce4f3c6513431ba32fb49e5605">MetaOnly</a></td></tr>
+<tr class="separator:ac9094bce4f3c6513431ba32fb49e5605"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a56183d56585697d058c7eeb20bdddb66"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structkv_watch_options.html#a56183d56585697d058c7eeb20bdddb66">Timeout</a></td></tr>
+<tr class="memdesc:a56183d56585697d058c7eeb20bdddb66"><td class="mdescLeft">&#160;</td><td class="mdescRight">How long to wait (in milliseconds) for some operations to complete.  <a href="structkv_watch_options.html#a56183d56585697d058c7eeb20bdddb66">More...</a><br /></td></tr>
+<tr class="separator:a56183d56585697d058c7eeb20bdddb66"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >KeyValue watcher options object.</p>
+<p >Initialize the object with <a class="el" href="group__kv_group.html#ga762fd5de8cde683e46a6736a51e575f5" title="Initializes a KeyValue watcher options structure.">kvWatchOptions_Init</a> </p>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="a0535edd21b26affc0057575bafc21a07" name="a0535edd21b26affc0057575bafc21a07"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a0535edd21b26affc0057575bafc21a07">&#9670;&#160;</a></span>IgnoreDeletes</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool kvWatchOptions::IgnoreDeletes</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a08274f08ae96e14d9ded326e4e665649" name="a08274f08ae96e14d9ded326e4e665649"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a08274f08ae96e14d9ded326e4e665649">&#9670;&#160;</a></span>IncludeHistory</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool kvWatchOptions::IncludeHistory</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="ac9094bce4f3c6513431ba32fb49e5605" name="ac9094bce4f3c6513431ba32fb49e5605"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ac9094bce4f3c6513431ba32fb49e5605">&#9670;&#160;</a></span>MetaOnly</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool kvWatchOptions::MetaOnly</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a56183d56585697d058c7eeb20bdddb66" name="a56183d56585697d058c7eeb20bdddb66"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a56183d56585697d058c7eeb20bdddb66">&#9670;&#160;</a></span>Timeout</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int64_t kvWatchOptions::Timeout</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structkv_watch_options.html">kvWatchOptions</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structkv_watch_options.js b/doc/html/structkv_watch_options.js
new file mode 100644 (file)
index 0000000..f9e7d4a
--- /dev/null
@@ -0,0 +1,7 @@
+var structkv_watch_options =
+[
+    [ "IgnoreDeletes", "structkv_watch_options.html#a0535edd21b26affc0057575bafc21a07", null ],
+    [ "IncludeHistory", "structkv_watch_options.html#a08274f08ae96e14d9ded326e4e665649", null ],
+    [ "MetaOnly", "structkv_watch_options.html#ac9094bce4f3c6513431ba32fb49e5605", null ],
+    [ "Timeout", "structkv_watch_options.html#a56183d56585697d058c7eeb20bdddb66", null ]
+];
\ No newline at end of file
diff --git a/doc/html/structnats_msg_list-members.html b/doc/html/structnats_msg_list-members.html
new file mode 100644 (file)
index 0000000..bd6afb8
--- /dev/null
@@ -0,0 +1,114 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structnats_msg_list.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="headertitle"><div class="title">natsMsgList Member List</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="structnats_msg_list.html">natsMsgList</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="structnats_msg_list.html#a5c48bf6b9e7f1d889d7ad31694911750">Count</a></td><td class="entry"><a class="el" href="structnats_msg_list.html">natsMsgList</a></td><td class="entry"></td></tr>
+  <tr class="odd"><td class="entry"><a class="el" href="structnats_msg_list.html#aa123668879f1c9c11c9be7bd81a205c5">Msgs</a></td><td class="entry"><a class="el" href="structnats_msg_list.html">natsMsgList</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structnats_msg_list.html b/doc/html/structnats_msg_list.html
new file mode 100644 (file)
index 0000000..a28c776
--- /dev/null
@@ -0,0 +1,164 @@
+<!-- HTML header for doxygen 1.8.10-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.9.5"/>
+<title>NATS C Client with JetStream and Streaming support: natsMsgList Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;" >
+   <div id="projectname">NATS C Client with JetStream and Streaming support
+   &#160;<span id="projectnumber">3.4.1</span>
+   </div>
+   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.5 -->
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+var searchBox = new SearchBox("searchBox", "search/",'.html');
+/* @license-end */
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+/* @license-end */
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+  <div id="nav-tree">
+    <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
+    </div>
+  </div>
+  <div id="splitbar" style="-moz-user-select:none;" 
+       class="ui-resizable-handle">
+  </div>
+</div>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function(){initNavTree('structnats_msg_list.html',''); initResizable(); });
+/* @license-end */
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<div id="MSearchResults">
+<div class="SRPage">
+<div id="SRIndex">
+<div id="SRResults"></div>
+<div class="SRStatus" id="Loading">Loading...</div>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</div>
+</div>
+</div>
+
+<div class="header">
+  <div class="summary">
+<a href="#pub-attribs">Public Attributes</a> &#124;
+<a href="structnats_msg_list-members.html">List of all members</a>  </div>
+  <div class="headertitle"><div class="title">natsMsgList Struct Reference<div class="ingroups"><a class="el" href="group__types_group.html">Types</a></div></div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>A list of NATS messages.  
+ <a href="structnats_msg_list.html#details">More...</a></p>
+
+<p><code>#include &lt;<a class="el" href="nats_8h_source.html">nats.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Public Attributes</h2></td></tr>
+<tr class="memitem:aa123668879f1c9c11c9be7bd81a205c5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnats_msg_list.html#aa123668879f1c9c11c9be7bd81a205c5">Msgs</a></td></tr>
+<tr class="separator:aa123668879f1c9c11c9be7bd81a205c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a5c48bf6b9e7f1d889d7ad31694911750"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnats_msg_list.html#a5c48bf6b9e7f1d889d7ad31694911750">Count</a></td></tr>
+<tr class="separator:a5c48bf6b9e7f1d889d7ad31694911750"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p >Used by some APIs which return a list of <a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a" title="A structure holding a subject, optional reply and payload.">natsMsg</a> objects.</p>
+<p >Those APIs will not create the object, but instead initialize the object to which a pointer to that object will be passed to it. Typically, the user will define the object on the stack and pass a pointer to this object to APIs that require a pointer to a <a class="el" href="structnats_msg_list.html" title="A list of NATS messages.">natsMsgList</a> object.</p>
+<p >Similarly, calling <a class="el" href="group__msg_group.html#ga1a091d24f939d881bf04fba78b8995c2" title="Destroys this list of messages.">natsMsgList_Destroy</a> will call <a class="el" href="group__msg_group.html#ga9e9590018284939f43f60964283f33ae" title="Destroys the message object.">natsMsg_Destroy</a> on any message still in the list, free the array containing pointers to the messages, but not free the <a class="el" href="structnats_msg_list.html" title="A list of NATS messages.">natsMsgList</a> object itself.</p>
+<dl class="section note"><dt>Note</dt><dd>If the user wants to keep some of the messages from the list, the pointers of those messages in the <code>Msgs</code> array should be set to <code>NULL</code>. The value <code>Count</code> MUST not be changed. The function <a class="el" href="group__msg_group.html#ga1a091d24f939d881bf04fba78b8995c2" title="Destroys this list of messages.">natsMsgList_Destroy</a> will iterate through all pointers in the list and only destroy the ones that have not been set to <code>NULL</code>.</dd></dl>
+<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__msg_group.html#ga1a091d24f939d881bf04fba78b8995c2" title="Destroys this list of messages.">natsMsgList_Destroy</a> </dd></dl>
+</div><h2 class="groupheader">Member Data Documentation</h2>
+<a id="aa123668879f1c9c11c9be7bd81a205c5" name="aa123668879f1c9c11c9be7bd81a205c5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aa123668879f1c9c11c9be7bd81a205c5">&#9670;&#160;</a></span>Msgs</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a>** natsMsgList::Msgs</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a id="a5c48bf6b9e7f1d889d7ad31694911750" name="a5c48bf6b9e7f1d889d7ad31694911750"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a5c48bf6b9e7f1d889d7ad31694911750">&#9670;&#160;</a></span>Count</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int natsMsgList::Count</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="nats_8h_source.html">nats.h</a></li>
+</ul>
+</div><!-- contents -->
+</div><!-- doc-content -->
+<!-- HTML footer for doxygen 1.8.10-->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="structnats_msg_list.html">natsMsgList</a></li>
+    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
+    <a href="http://www.nats.io">
+    </a></li>
+  </ul>
+</div>
+</body>
+</html>
diff --git a/doc/html/structnats_msg_list.js b/doc/html/structnats_msg_list.js
new file mode 100644 (file)
index 0000000..fb29389
--- /dev/null
@@ -0,0 +1,5 @@
+var structnats_msg_list =
+[
+    [ "Msgs", "structnats_msg_list.html#aa123668879f1c9c11c9be7bd81a205c5", null ],
+    [ "Count", "structnats_msg_list.html#a5c48bf6b9e7f1d889d7ad31694911750", null ]
+];
\ No newline at end of file
diff --git a/doc/html/sync_off.png b/doc/html/sync_off.png
new file mode 100644 (file)
index 0000000..3b443fc
Binary files /dev/null and b/doc/html/sync_off.png differ
diff --git a/doc/html/sync_on.png b/doc/html/sync_on.png
new file mode 100644 (file)
index 0000000..e08320f
Binary files /dev/null and b/doc/html/sync_on.png differ
diff --git a/doc/html/tab_a.png b/doc/html/tab_a.png
new file mode 100644 (file)
index 0000000..3b725c4
Binary files /dev/null and b/doc/html/tab_a.png differ
diff --git a/doc/html/tab_ad.png b/doc/html/tab_ad.png
new file mode 100644 (file)
index 0000000..e34850a
Binary files /dev/null and b/doc/html/tab_ad.png differ
diff --git a/doc/html/tab_b.png b/doc/html/tab_b.png
new file mode 100644 (file)
index 0000000..e2b4a86
Binary files /dev/null and b/doc/html/tab_b.png differ
diff --git a/doc/html/tab_bd.png b/doc/html/tab_bd.png
new file mode 100644 (file)
index 0000000..91c2524
Binary files /dev/null and b/doc/html/tab_bd.png differ
diff --git a/doc/html/tab_h.png b/doc/html/tab_h.png
new file mode 100644 (file)
index 0000000..fd5cb70
Binary files /dev/null and b/doc/html/tab_h.png differ
diff --git a/doc/html/tab_hd.png b/doc/html/tab_hd.png
new file mode 100644 (file)
index 0000000..2489273
Binary files /dev/null and b/doc/html/tab_hd.png differ
diff --git a/doc/html/tab_s.png b/doc/html/tab_s.png
new file mode 100644 (file)
index 0000000..ab478c9
Binary files /dev/null and b/doc/html/tab_s.png differ
diff --git a/doc/html/tab_sd.png b/doc/html/tab_sd.png
new file mode 100644 (file)
index 0000000..757a565
Binary files /dev/null and b/doc/html/tab_sd.png differ
diff --git a/doc/html/tabs.css b/doc/html/tabs.css
new file mode 100644 (file)
index 0000000..71c8a47
--- /dev/null
@@ -0,0 +1 @@
+.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.main-menu-btn{position:relative;display:inline-block;width:36px;height:36px;text-indent:36px;margin-left:8px;white-space:nowrap;overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0)}.main-menu-btn-icon,.main-menu-btn-icon:before,.main-menu-btn-icon:after{position:absolute;top:50%;left:2px;height:2px;width:24px;background:var(--nav-menu-button-color);-webkit-transition:all .25s;transition:all .25s}.main-menu-btn-icon:before{content:'';top:-7px;left:0}.main-menu-btn-icon:after{content:'';top:7px;left:0}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon{height:0}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:before{top:0;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:after{top:0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}#main-menu-state{position:absolute;width:1px;height:1px;margin:-1px;border:0;padding:0;overflow:hidden;clip:rect(1px,1px,1px,1px)}#main-menu-state:not(:checked) ~ #main-menu{display:none}#main-menu-state:checked ~ #main-menu{display:block}@media(min-width:768px){.main-menu-btn{position:absolute;top:-99999px}#main-menu-state:not(:checked) ~ #main-menu{display:block}}.sm-dox{background-image:var(--nav-gradient-image)}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0 12px;padding-right:43px;font-family:var(--font-family-nav);font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:var(--nav-text-normal-shadow);color:var(--nav-text-normal-color);outline:0}.sm-dox a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox a.current{color:#d23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace !important;text-align:center;text-shadow:none;background:var(--nav-menu-toggle-color);-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox a span.sub-arrow:before{display:block;content:'+'}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px;border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{-moz-border-radius:0 0 5px 5px;-webkit-border-radius:0;border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox ul{background:var(--nav-menu-background-color)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:var(--nav-menu-background-color);background-image:none}.sm-dox ul a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:0 1px 1px black}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media(min-width:768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:var(--nav-gradient-image);line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:var(--nav-text-normal-color) transparent transparent transparent;background:transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0 12px;background-image:var(--nav-separator-image);background-repeat:no-repeat;background-position:right;-moz-border-radius:0 !important;-webkit-border-radius:0;border-radius:0 !important}.sm-dox a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox a:hover span.sub-arrow{border-color:var(--nav-text-hover-color) transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent var(--nav-menu-background-color) transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:var(--nav-menu-background-color);-moz-border-radius:5px !important;-webkit-border-radius:5px;border-radius:5px !important;-moz-box-shadow:0 5px 9px rgba(0,0,0,0.2);-webkit-box-shadow:0 5px 9px rgba(0,0,0,0.2);box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent var(--nav-menu-foreground-color);border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:var(--nav-menu-foreground-color);background-image:none;border:0 !important;color:var(--nav-menu-foreground-color);background-image:none}.sm-dox ul a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent var(--nav-text-hover-color)}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:var(--nav-menu-background-color);height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #d23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#d23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent var(--nav-menu-foreground-color) transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:var(--nav-menu-foreground-color) transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px !important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:var(--nav-gradient-image)}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:var(--nav-menu-background-color)}}
\ No newline at end of file
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
new file mode 100644 (file)
index 0000000..7b4bfcf
--- /dev/null
@@ -0,0 +1,89 @@
+if(NOT NATS_BUILD_EXAMPLES)
+  return()
+endif()
+if(NOT NATS_BUILD_STATIC_EXAMPLES AND NOT NATS_BUILD_LIB_SHARED)
+  MESSAGE(FATAL_ERROR
+    "Building examples require shared library, or run CMake with -DNATS_BUILD_STATIC_EXAMPLES=ON")
+endif()
+
+# We need this directory to build the examples
+include_directories(${PROJECT_SOURCE_DIR}/src)
+include_directories(${PROJECT_SOURCE_DIR}/examples)
+
+if(NATS_BUILD_LIBUV_EXAMPLE AND LIBUV_DIR)
+  include_directories(${LIBUV_DIR}/include)
+endif()
+
+if(NATS_BUILD_LIBEVENT_EXAMPLE AND LIBEVENT_DIR)
+  include_directories(${LIBEVENT_DIR}/include)
+endif()
+
+if(WIN32)
+  set(LIB_SUFFIX ${CMAKE_STATIC_LIBRARY_SUFFIX})
+else()
+  if(NATS_BUILD_STATIC_EXAMPLES)
+    set(LIB_SUFFIX ${CMAKE_STATIC_LIBRARY_SUFFIX})
+  else()
+    set(LIB_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX})
+  endif()
+endif()
+
+# Get all the .c files in the examples directory
+file(GLOB EXAMPLES_SOURCES RELATIVE ${PROJECT_SOURCE_DIR}/examples *.c)
+
+if(NOT NATS_BUILD_STATIC_EXAMPLES)
+  add_definitions(-Dnats_IMPORTS)
+endif()
+
+# For each file...
+foreach(examples_src ${EXAMPLES_SOURCES})
+
+    # Remove the suffix so that it becomes the executable name
+    string(REPLACE ".c" "" examplename ${examples_src})
+    set(exampleexe "nats-${examplename}")
+
+    set(buildExample OFF)
+    set(NATS_ASYNC_IO_LIB "")
+
+    if(examplename MATCHES "libuv")
+      if(NATS_BUILD_LIBUV_EXAMPLE)
+        set(buildExample ON)
+        if(LIBUV_DIR)
+          set(NATS_ASYNC_IO_LIB ${LIBUV_DIR}/lib/libuv${LIB_SUFFIX})
+        else()
+          set(NATS_ASYNC_IO_LIB uv)
+        endif()
+      endif()
+    elseif(examplename MATCHES "libevent")
+      if(NATS_BUILD_LIBEVENT_EXAMPLE)
+        set(buildExample ON)
+        if(LIBEVENT_DIR)
+          if(WIN32)
+            set(NATS_ASYNC_IO_LIB ${LIBEVENT_DIR}/lib/event${LIB_SUFFIX})
+          else()
+            set(NATS_ASYNC_IO_LIB ${LIBEVENT_DIR}/lib/libevent${LIB_SUFFIX} ${LIBEVENT_DIR}/lib/libevent_pthreads${LIB_SUFFIX})
+          endif()
+        else()
+          set(NATS_ASYNC_IO_LIB event)
+          if(UNIX)
+            list(APPEND NATS_ASYNC_IO_LIB event_pthreads)
+          endif()
+        endif()
+      endif()
+    else()
+      set(buildExample ON)
+    endif()
+
+    if(buildExample)
+      # Build the executable
+      add_executable(${exampleexe} ${PROJECT_SOURCE_DIR}/examples/${examples_src})
+
+      # Link
+      if(NATS_BUILD_STATIC_EXAMPLES)
+        target_link_libraries(${exampleexe} nats_static ${NATS_EXTRA_LIB} ${NATS_ASYNC_IO_LIB})
+      else()
+        target_link_libraries(${exampleexe} nats ${NATS_EXTRA_LIB} ${NATS_ASYNC_IO_LIB})
+      endif()
+    endif()
+
+endforeach()
diff --git a/examples/asynctimeout.c b/examples/asynctimeout.c
new file mode 100644 (file)
index 0000000..8fc7629
--- /dev/null
@@ -0,0 +1,94 @@
+// Copyright 2015-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "examples.h"
+
+static const char *usage = ""\
+"-gd            use global message delivery thread pool\n" \
+"-queue         use a queue subscriber with this name\n" \
+"-timeout <ms>  timeout in milliseconds (default is 10sec)\n" \
+"-count         number of expected messages\n";
+
+static volatile bool done = false;
+
+static void
+onMsg(natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure)
+{
+    // This callback will be invoked with a NULL message when the
+    // subscription times out.
+    if (print && (msg != NULL))
+        printf("Received msg: %s - %.*s\n",
+               natsMsg_GetSubject(msg),
+               natsMsg_GetDataLength(msg),
+               natsMsg_GetData(msg));
+
+    // We should be using a mutex to protect those variables since
+    // they are used from the subscription's delivery and the main
+    // threads. For demo purposes, this is fine.
+    if ((msg == NULL) || (++count == total))
+    {
+        printf("%s, destroying subscription\n",
+               (msg == NULL ? "Subscription timed-out" : "All messages received"));
+
+        natsSubscription_Destroy(sub);
+        done = true;
+    }
+
+    // It is safe to call natsMsg_Destroy() with a NULL message.
+    natsMsg_Destroy(msg);
+}
+
+int main(int argc, char **argv)
+{
+    natsConnection      *conn = NULL;
+    natsOptions         *opts  = NULL;
+    natsSubscription    *sub   = NULL;
+    natsStatus          s;
+
+    opts = parseArgs(argc, argv, usage);
+
+    printf("Listening asynchronously on '%s' with a timeout of %d ms.\n",
+           subj, (int) timeout);
+
+    s = natsConnection_Connect(&conn, opts);
+    if (s == NATS_OK)
+    {
+        if (name != NULL)
+            s = natsConnection_QueueSubscribeTimeout(&sub, conn, subj, name,
+                                                     timeout, onMsg, NULL);
+        else
+            s = natsConnection_SubscribeTimeout(&sub, conn, subj,
+                                                timeout, onMsg, NULL);
+    }
+    // Check every half a second for end of test.
+    while ((s == NATS_OK) && !done)
+    {
+        nats_Sleep(500);
+    }
+
+    if (s != NATS_OK)
+    {
+        printf("Error: %u - %s\n", s, natsStatus_GetText(s));
+        nats_PrintLastErrorStack(stderr);
+    }
+
+    // Destroy all our objects to avoid report of memory leak
+    // Do not destroy subscription since it is done in the callback
+    natsConnection_Destroy(conn);
+    natsOptions_Destroy(opts);
+
+    // To silence reports of memory still in used with valgrind
+    nats_Close();
+
+    return 0;
+}
diff --git a/examples/connect.c b/examples/connect.c
new file mode 100644 (file)
index 0000000..dd89c8b
--- /dev/null
@@ -0,0 +1,171 @@
+// Copyright 2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "examples.h"
+
+static void
+onMsg(natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure)
+{
+    if (print)
+        printf("Received msg: %s - %.*s\n",
+               natsMsg_GetSubject(msg),
+               natsMsg_GetDataLength(msg),
+               natsMsg_GetData(msg));
+
+    // We should be using a mutex to protect those variables since
+    // they are used from the subscription's delivery and the main
+    // threads. For demo purposes, this is fine.
+    count++;
+
+    natsMsg_Destroy(msg);
+}
+
+static void
+connectedCB(natsConnection *nc, void *closure)
+{
+    char url[256];
+
+    natsConnection_GetConnectedUrl(nc, url, sizeof(url));
+    printf("Connected to %s\n", url);
+}
+
+static void
+closedCB(natsConnection *nc, void *closure)
+{
+    bool        *closed = (bool*)closure;
+    const char  *err    = NULL;
+
+    natsConnection_GetLastError(nc, &err);
+    printf("Connect failed: %s\n", err);
+    *closed = true;
+}
+
+int main(int argc, char **argv)
+{
+    natsConnection      *conn  = NULL;
+    natsOptions         *opts  = NULL;
+    natsSubscription    *sub   = NULL;
+    bool                closed = false;
+    natsStatus          s;
+
+    opts = parseArgs(argc, argv, "");
+
+    // Set a max (re)connect attempts of 50 with a delay of 100 msec.
+    // Total time will then be around 5 seconds.
+
+    s = natsOptions_SetMaxReconnect(opts, 50);
+    if (s == NATS_OK)
+        s = natsOptions_SetReconnectWait(opts, 100);
+
+    // Instruct the library to block the connect call for that
+    // long until it can get a connection or fails.
+    if (s == NATS_OK)
+        s = natsOptions_SetRetryOnFailedConnect(opts, true, NULL, NULL);
+
+    if (s != NATS_OK)
+    {
+        printf("Error: %u - %s\n", s, natsStatus_GetText(s));
+        nats_PrintLastErrorStack(stderr);
+        exit(1);
+    }
+
+    printf("Ensure no server is running, attempt to connect...\n");
+
+    // If the server is not running, this will block for about 5 seconds.
+    start = nats_Now();
+    s = natsConnection_Connect(&conn, opts);
+    elapsed = nats_Now() - start;
+
+    printf("natsConnection_Connect call took %" PRId64 " ms and returned: %s\n", elapsed, natsStatus_GetText(s));
+
+    // Close/destroy the connection in case you had a server running...
+    natsConnection_Destroy(conn);
+    conn = NULL;
+
+    // Now reduce the count, set a connected callback to allow
+    // connect to be done asynchronously and a closed callback
+    // to show that if connect fails, the callback is invoked.
+    s = natsOptions_SetMaxReconnect(opts, 10);
+    if (s == NATS_OK)
+        s = natsOptions_SetRetryOnFailedConnect(opts, true, connectedCB, NULL);
+    if (s == NATS_OK)
+        s = natsOptions_SetClosedCB(opts, closedCB, (void*)&closed);
+
+    if (s != NATS_OK)
+    {
+        printf("Error: %u - %s\n", s, natsStatus_GetText(s));
+        nats_PrintLastErrorStack(stderr);
+        exit(1);
+    }
+
+    printf("\n\n");
+    printf("Ensure no server is running, attempt to connect with async connect...\n");
+
+    // Start the connect. If no server is running, it should return
+    // NATS_NOT_YET_CONNECTED.
+    s = natsConnection_Connect(&conn, opts);
+    printf("natsConnection_Connect call returned: %s\n", natsStatus_GetText(s));
+
+    // Wait for the closed callback to be invoked
+    while (!closed)
+        nats_Sleep(100);
+
+    // Destroy the connection object
+    natsConnection_Destroy(conn);
+    conn = NULL;
+
+
+    // Now change the options to increase the attempts again.
+    s = natsOptions_SetMaxReconnect(opts, 10);
+    if (s == NATS_OK)
+        s = natsOptions_SetReconnectWait(opts, 1000);
+    // Remove the closed CB for this test
+    if (s == NATS_OK)
+        s = natsOptions_SetClosedCB(opts, NULL, NULL);
+
+    if (s != NATS_OK)
+    {
+        printf("Error: %u - %s\n", s, natsStatus_GetText(s));
+        nats_PrintLastErrorStack(stderr);
+        exit(1);
+    }
+
+    printf("\n\n");
+    printf("Ensure no server is running, attempt to connect with async connect...\n");
+
+    s = natsConnection_Connect(&conn, opts);
+    printf("Connect returned: %s\n", natsStatus_GetText(s));
+
+    // Create a subscription and send a message...
+    s = natsConnection_Subscribe(&sub, conn, subj, onMsg, NULL);
+    if (s == NATS_OK)
+        s = natsConnection_Publish(conn, "foo", (const void*)"hello", 5);
+
+    printf("\nStart a server now...\n\n");
+
+    // Wait for the connect to succeed and message to be received.
+    while ((s == NATS_OK) && (count != 1))
+        nats_Sleep(100);
+
+    printf("Received %d message\n", (int) count);
+
+    // Destroy all our objects to avoid report of memory leak
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(conn);
+    natsOptions_Destroy(opts);
+
+    // To silence reports of memory still in used with valgrind
+    nats_Close();
+
+    return 0;
+}
diff --git a/examples/examples.h b/examples/examples.h
new file mode 100644 (file)
index 0000000..83670b5
--- /dev/null
@@ -0,0 +1,433 @@
+// Copyright 2015-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef EXAMPLES_H_
+#define EXAMPLES_H_
+
+#include <nats.h>
+#include <stdio.h>
+#include <string.h>
+
+#ifdef _WIN32
+#define strcasecmp  _stricmp
+#define strdup      _strdup
+#else
+#include <strings.h>
+#include <signal.h>
+#endif
+
+#define STATS_IN        0x1
+#define STATS_OUT       0x2
+#define STATS_COUNT     0x4
+
+#define MAX_SERVERS     (10)
+
+bool        async   = true;
+const char  *subj   = "foo";
+const char  *payload= "hello";
+const char  *name   = "worker";
+int64_t     total   = 1000000;
+
+volatile int64_t count   = 0;
+volatile int64_t dropped = 0;
+int64_t          start   = 0;
+volatile int64_t elapsed = 0;
+bool             print   = false;
+int64_t          timeout = 10000; // 10 seconds.
+
+natsOptions      *opts   = NULL;
+
+const char       *certFile = NULL;
+const char       *keyFile  = NULL;
+
+const char  *cluster    = "test-cluster";
+const char  *clientID   = "client";
+const char  *qgroup     = NULL;
+const char  *durable    = NULL;
+bool        deliverAll  = false;
+bool        deliverLast = true;
+uint64_t    deliverSeq  = 0;
+bool        unsubscribe = false;
+
+const char  *stream     = NULL;
+bool        pull        = false;
+bool        flowctrl    = false;
+
+static natsStatus
+printStats(int mode, natsConnection *conn, natsSubscription *sub,
+           natsStatistics *stats)
+{
+    natsStatus  s           = NATS_OK;
+    uint64_t    inMsgs      = 0;
+    uint64_t    inBytes     = 0;
+    uint64_t    outMsgs     = 0;
+    uint64_t    outBytes    = 0;
+    uint64_t    reconnected = 0;
+    int         pending     = 0;
+    int64_t     delivered   = 0;
+    int64_t     sdropped    = 0;
+
+    s = natsConnection_GetStats(conn, stats);
+    if (s == NATS_OK)
+        s = natsStatistics_GetCounts(stats, &inMsgs, &inBytes,
+                                     &outMsgs, &outBytes, &reconnected);
+    if ((s == NATS_OK) && (sub != NULL))
+    {
+        s = natsSubscription_GetStats(sub, &pending, NULL, NULL, NULL,
+                                      &delivered, &sdropped);
+
+        // Since we use AutoUnsubscribe(), when the max has been reached,
+        // the subscription is automatically closed, so this call would
+        // return "Invalid Subscription". Ignore this error.
+        if (s == NATS_INVALID_SUBSCRIPTION)
+        {
+            s = NATS_OK;
+            pending = 0;
+        }
+    }
+
+    if (s == NATS_OK)
+    {
+        if (mode & STATS_IN)
+        {
+            printf("In Msgs: %9" PRIu64 " - "\
+                   "In Bytes: %9" PRIu64 " - ", inMsgs, inBytes);
+        }
+        if (mode & STATS_OUT)
+        {
+            printf("Out Msgs: %9" PRIu64 " - "\
+                   "Out Bytes: %9" PRIu64 " - ", outMsgs, outBytes);
+        }
+        if (mode & STATS_COUNT)
+        {
+            printf("Delivered: %9" PRId64 " - ", delivered);
+            printf("Pending: %5d - ", pending);
+            printf("Dropped: %5" PRId64 " - ", sdropped);
+        }
+        printf("Reconnected: %3" PRIu64 "\n", reconnected);
+    }
+
+    return s;
+}
+
+static void
+printPerf(const char *perfTxt)
+{
+    if ((start > 0) && (elapsed == 0))
+        elapsed = nats_Now() - start;
+
+    if (elapsed <= 0)
+        printf("\nNot enough messages or too fast to report performance!\n");
+    else
+        printf("\n%s %" PRId64 " messages in "\
+               "%" PRId64 " milliseconds (%d msgs/sec)\n",
+               perfTxt, count, elapsed, (int)((count * 1000) / elapsed));
+}
+
+static void
+printUsageAndExit(const char *progName, const char *usage)
+{
+    printf("\nUsage: %s [options]\n\nThe options are:\n\n"\
+"-h             prints the usage\n" \
+"-s             server url(s) (list of comma separated nats urls)\n" \
+"-tls           use secure (SSL/TLS) connection\n" \
+"-tlscacert     trusted certificates file\n" \
+"-tlscert       client certificate (PEM format only)\n" \
+"-tlskey        client private key file (PEM format only)\n" \
+"-tlsciphers    ciphers suite\n"
+"-tlshost       server certificate's expected hostname\n" \
+"-tlsskip       skip server certificate verification\n" \
+"-creds         user credentials chained file\n" \
+"-subj          subject (default is 'foo')\n" \
+"-print         for consumers, print received messages (default is false)\n" \
+"-wd            write deadline in milliseconds\n" \
+                "%s\n",
+                progName, usage);
+
+    natsOptions_Destroy(opts);
+    nats_Close();
+
+    exit(1);
+}
+
+static natsStatus
+parseUrls(const char *urls, natsOptions *gopts)
+{
+    char        *serverUrls[MAX_SERVERS];
+    int         num       = 0;
+    natsStatus  s         = NATS_OK;
+    char        *urlsCopy = NULL;
+    char        *commaPos = NULL;
+    char        *ptr      = NULL;
+
+    urlsCopy = strdup(urls);
+    if (urlsCopy == NULL)
+        return NATS_NO_MEMORY;
+
+    memset(serverUrls, 0, sizeof(serverUrls));
+
+    ptr = urlsCopy;
+
+    do
+    {
+        if (num == MAX_SERVERS)
+        {
+            s = NATS_INSUFFICIENT_BUFFER;
+            break;
+        }
+
+        serverUrls[num++] = ptr;
+        commaPos = strchr(ptr, ',');
+        if (commaPos != NULL)
+        {
+            ptr = (char*)(commaPos + 1);
+            *(commaPos) = '\0';
+        }
+        else
+        {
+            ptr = NULL;
+        }
+    } while (ptr != NULL);
+
+    if (s == NATS_OK)
+        s = natsOptions_SetServers(gopts, (const char**) serverUrls, num);
+
+    free(urlsCopy);
+
+    return s;
+}
+
+static natsOptions*
+parseArgs(int argc, char **argv, const char *usage)
+{
+    natsStatus  s       = NATS_OK;
+    bool        urlsSet = false;
+    int         i;
+
+    if (natsOptions_Create(&opts) != NATS_OK)
+        s = NATS_NO_MEMORY;
+
+    for (i=1; (i<argc) && (s == NATS_OK); i++)
+    {
+        if ((strcasecmp(argv[i], "-h") == 0)
+            || (strcasecmp(argv[i], "-help") == 0))
+        {
+            printUsageAndExit(argv[0], usage);
+        }
+        else if (strcasecmp(argv[i], "-s") == 0)
+        {
+            if (i + 1 == argc)
+                printUsageAndExit(argv[0], usage);
+
+            s = parseUrls(argv[++i], opts);
+            if (s == NATS_OK)
+                urlsSet = true;
+        }
+        else if (strcasecmp(argv[i], "-tls") == 0)
+        {
+            s = natsOptions_SetSecure(opts, true);
+        }
+        else if (strcasecmp(argv[i], "-tlscacert") == 0)
+        {
+            if (i + 1 == argc)
+                printUsageAndExit(argv[0], usage);
+
+            s = natsOptions_LoadCATrustedCertificates(opts, argv[++i]);
+        }
+        else if (strcasecmp(argv[i], "-tlscert") == 0)
+        {
+            if (i + 1 == argc)
+                printUsageAndExit(argv[0], usage);
+
+            certFile = argv[++i];
+        }
+        else if (strcasecmp(argv[i], "-tlskey") == 0)
+        {
+            if (i + 1 == argc)
+                printUsageAndExit(argv[0], usage);
+
+            keyFile = argv[++i];
+        }
+        else if (strcasecmp(argv[i], "-tlsciphers") == 0)
+        {
+            if (i + 1 == argc)
+                printUsageAndExit(argv[0], usage);
+
+            s = natsOptions_SetCiphers(opts, argv[++i]);
+        }
+        else if (strcasecmp(argv[i], "-tlshost") == 0)
+        {
+            if (i + 1 == argc)
+                printUsageAndExit(argv[0], usage);
+
+            s = natsOptions_SetExpectedHostname(opts, argv[++i]);
+        }
+        else if (strcasecmp(argv[i], "-tlsskip") == 0)
+        {
+            s = natsOptions_SkipServerVerification(opts, true);
+        }
+        else if (strcasecmp(argv[i], "-sync") == 0)
+        {
+            async = false;
+            pull  = false;
+        }
+        else if (strcasecmp(argv[i], "-subj") == 0)
+        {
+            if (i + 1 == argc)
+                printUsageAndExit(argv[0], usage);
+
+            subj = argv[++i];
+        }
+        else if (strcasecmp(argv[i], "-print") == 0)
+        {
+            print = true;
+        }
+        else if ((strcasecmp(argv[i], "-name") == 0) ||
+                 (strcasecmp(argv[i], "-queue") == 0))
+        {
+            if (i + 1 == argc)
+                printUsageAndExit(argv[0], usage);
+
+            name = argv[++i];
+        }
+        else if (strcasecmp(argv[i], "-count") == 0)
+        {
+            if (i + 1 == argc)
+                printUsageAndExit(argv[0], usage);
+
+            total = atol(argv[++i]);
+        }
+        else if (strcasecmp(argv[i], "-txt") == 0)
+        {
+            if (i + 1 == argc)
+                printUsageAndExit(argv[0], usage);
+
+            payload = argv[++i];
+        }
+        else if (strcasecmp(argv[i], "-timeout") == 0)
+        {
+            if (i + 1 == argc)
+                printUsageAndExit(argv[0], usage);
+
+            timeout = atol(argv[++i]);
+        }
+        else if (strcasecmp(argv[i], "-gd") == 0)
+        {
+            s = natsOptions_UseGlobalMessageDelivery(opts, true);
+        }
+        else if (strcasecmp(argv[i], "-c") == 0)
+        {
+            if (i + 1 == argc)
+                printUsageAndExit(argv[0], usage);
+
+            cluster = argv[++i];
+        }
+        else if (strcasecmp(argv[i], "-id") == 0)
+        {
+            if (i + 1 == argc)
+                printUsageAndExit(argv[0], usage);
+
+            clientID = argv[++i];
+        }
+        else if (strcasecmp(argv[i], "-last") == 0)
+        {
+            deliverLast = true;
+        }
+        else if (strcasecmp(argv[i], "-all") == 0)
+        {
+            deliverAll = true;
+        }
+        else if (strcasecmp(argv[i], "-seq") == 0)
+        {
+            if (i + 1 == argc)
+                printUsageAndExit(argv[0], usage);
+
+            deliverSeq = atol(argv[++i]);
+        }
+        else if (strcasecmp(argv[i], "-durable") == 0)
+        {
+            if (i + 1 == argc)
+                printUsageAndExit(argv[0], usage);
+
+            durable = argv[++i];
+        }
+        else if (strcasecmp(argv[i], "-qgroup") == 0)
+        {
+            if (i + 1 == argc)
+                printUsageAndExit(argv[0], usage);
+
+            qgroup = argv[++i];
+        }
+        else if (strcasecmp(argv[i], "-unsubscribe") == 0)
+        {
+            unsubscribe = true;
+        }
+        else if (strcasecmp(argv[i], "-creds") == 0)
+        {
+            if (i + 1 == argc)
+                printUsageAndExit(argv[0], usage);
+
+            s = natsOptions_SetUserCredentialsFromFiles(opts, argv[++i], NULL);
+        }
+        else if (strcasecmp(argv[i], "-wd") == 0)
+        {
+            if (i + 1 == argc)
+                printUsageAndExit(argv[0], usage);
+
+            s = natsOptions_SetWriteDeadline(opts, atol(argv[++i]));
+        }
+        else if (strcasecmp(argv[i], "-stream") == 0)
+        {
+            if (i + 1 == argc)
+                printUsageAndExit(argv[0], usage);
+
+            stream = argv[++i];
+        }
+        else if (strcasecmp(argv[i], "-pull") == 0)
+        {
+            async = false;
+            pull  = true;
+        }
+        else if (strcasecmp(argv[i], "-fc") == 0)
+        {
+            flowctrl = true;
+        }
+        else
+        {
+            printf("Unknown option: '%s'\n", argv[i]);
+            printUsageAndExit(argv[0], usage);
+        }
+    }
+
+    if ((s == NATS_OK) && ((certFile != NULL) || (keyFile != NULL)))
+        s = natsOptions_LoadCertificatesChain(opts, certFile, keyFile);
+
+    if ((s == NATS_OK) && !urlsSet)
+        s = parseUrls(NATS_DEFAULT_URL, opts);
+
+    if (s != NATS_OK)
+    {
+        printf("Error parsing arguments: %u - %s\n",
+               s, natsStatus_GetText(s));
+
+        nats_PrintLastErrorStack(stderr);
+
+        natsOptions_Destroy(opts);
+        nats_Close();
+        exit(1);
+    }
+
+    return opts;
+}
+
+#endif /* EXAMPLES_H_ */
diff --git a/examples/getstarted/CMakeLists.txt b/examples/getstarted/CMakeLists.txt
new file mode 100644 (file)
index 0000000..2ad0738
--- /dev/null
@@ -0,0 +1,33 @@
+if(NOT NATS_BUILD_EXAMPLES)
+  return()
+endif()
+
+# We need this directory to build the examples
+include_directories(${PROJECT_SOURCE_DIR}/src)
+include_directories(${PROJECT_SOURCE_DIR}/examples/getstarted)
+
+# Get all the .c files in the examples directory
+file(GLOB EXAMPLES_SOURCES RELATIVE ${PROJECT_SOURCE_DIR}/examples/getstarted *.c)
+
+if(NOT NATS_BUILD_STATIC_EXAMPLES)
+  add_definitions(-Dnats_IMPORTS)
+endif()
+
+# For each file...
+foreach(examples_src ${EXAMPLES_SOURCES})
+
+    # Remove the suffix so that it becomes the executable name
+    string(REPLACE ".c" "" examplename ${examples_src})
+    set(exampleexe "${examplename}")
+
+    # Build the executable
+    add_executable(${exampleexe} ${PROJECT_SOURCE_DIR}/examples/getstarted/${examples_src})
+
+    # Link
+    if(NATS_BUILD_STATIC_EXAMPLES)
+               target_link_libraries(${exampleexe} nats_static ${NATS_EXTRA_LIB})
+       else()
+               target_link_libraries(${exampleexe} nats ${NATS_EXTRA_LIB})
+       endif()
+
+endforeach()
diff --git a/examples/getstarted/asyncsub.c b/examples/getstarted/asyncsub.c
new file mode 100644 (file)
index 0000000..29b1aa4
--- /dev/null
@@ -0,0 +1,69 @@
+// Copyright 2017-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include <nats.h>
+
+static void
+onMsg(natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure)
+{
+    printf("Received msg: %s - %.*s\n",
+           natsMsg_GetSubject(msg),
+           natsMsg_GetDataLength(msg),
+           natsMsg_GetData(msg));
+
+    // Need to destroy the message!
+    natsMsg_Destroy(msg);
+
+    // Notify the main thread that we are done.
+    *(bool *)(closure) = true;
+}
+
+int main(int argc, char **argv)
+{
+    natsConnection      *conn = NULL;
+    natsSubscription    *sub  = NULL;
+    natsStatus          s;
+    volatile bool       done  = false;
+
+    printf("Listening on subject 'foo'\n");
+
+    // Creates a connection to the default NATS URL
+    s = natsConnection_ConnectTo(&conn, NATS_DEFAULT_URL);
+    if (s == NATS_OK)
+    {
+        // Creates an asynchronous subscription on subject "foo".
+        // When a message is sent on subject "foo", the callback
+        // onMsg() will be invoked by the client library.
+        // You can pass a closure as the last argument.
+        s = natsConnection_Subscribe(&sub, conn, "foo", onMsg, (void*) &done);
+    }
+    if (s == NATS_OK)
+    {
+        for (;!done;) {
+            nats_Sleep(100);
+        }
+    }
+
+    // Anything that is created need to be destroyed
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(conn);
+
+    // If there was an error, print a stack trace and exit
+    if (s != NATS_OK)
+    {
+        nats_PrintLastErrorStack(stderr);
+        exit(2);
+    }
+
+    return 0;
+}
diff --git a/examples/getstarted/headers.c b/examples/getstarted/headers.c
new file mode 100644 (file)
index 0000000..8562a38
--- /dev/null
@@ -0,0 +1,135 @@
+// Copyright 2020-2021 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include <nats.h>
+
+int main(int argc, char **argv)
+{
+    natsConnection      *conn = NULL;
+    natsSubscription    *sub  = NULL;
+    natsMsg             *msg  = NULL;
+    natsMsg             *rmsg = NULL;
+    natsStatus          s;
+
+    // Creates a connection to the default NATS URL
+    s = natsConnection_ConnectTo(&conn, NATS_DEFAULT_URL);
+
+    // Create a message
+    if (s == NATS_OK)
+        s = natsMsg_Create(&msg, "foo", NULL, "body", 4);
+
+    // Create a header by setting a key/value
+    if (s == NATS_OK)
+        s = natsMsgHeader_Set(msg, "My-Key1", "value1");
+
+    // Let's set a new key
+    if (s == NATS_OK)
+        s = natsMsgHeader_Set(msg, "My-Key2", "value2");
+
+    // Here we add a value to the first key
+    if (s == NATS_OK)
+        s = natsMsgHeader_Add(msg, "My-Key1", "value3");
+
+    // Adding yet another key
+    if (s == NATS_OK)
+        s = natsMsgHeader_Set(msg, "My-Key3", "value4");
+
+    // Remove a key
+    if (s == NATS_OK)
+        s = natsMsgHeader_Delete(msg, "My-Key3");
+
+    // Let's print all the keys that are currently set
+    if (s == NATS_OK)
+    {
+        const char* *keys = NULL;
+        int         nkeys = 0;
+        int         i;
+
+        s = natsMsgHeader_Keys(msg, &keys, &nkeys);
+        for (i=0; (s == NATS_OK) && (i<nkeys); i++)
+        {
+            // To get all values that are associated with a key
+            const char* *values = NULL;
+            int         nvalues = 0;
+            int         j;
+
+            s = natsMsgHeader_Values(msg, keys[i], &values, &nvalues);
+
+            for (j=0; (s == NATS_OK) && (j < nvalues); j++)
+                printf("Key: '%s' Value: '%s'\n", keys[i], values[j]);
+
+            // We need to free the returned array of pointers.
+            free((void*) values);
+        }
+        // We need to free the returned array of pointers.
+        free((void*) keys);
+    }
+
+    // Create a subscription that we will use to receive this message
+    if (s == NATS_OK)
+        s = natsConnection_SubscribeSync(&sub, conn, "foo");
+
+    // Now publish the message
+    if (s == NATS_OK)
+        s = natsConnection_PublishMsg(conn, msg);
+
+    // We should receive it
+    if (s == NATS_OK)
+        s = natsSubscription_NextMsg(&rmsg, sub, 1000);
+
+    // Now let's check some headers from the received message
+    if (s == NATS_OK)
+    {
+        const char *val = NULL;
+
+        // Notice that calling natsMsgHeader_Get() on a key that has
+        // several values will return the first entry.
+        s = natsMsgHeader_Get(rmsg, "My-Key1", &val);
+        if (s == NATS_OK)
+            printf("For key 'My-Key1', got value: '%s'\n", val);
+
+        // If we lookup for a key that does not exist, we get NATS_NOT_FOUND.
+        if (s == NATS_OK)
+        {
+            s = natsMsgHeader_Get(rmsg, "key-does-not-exist", &val);
+            if (s == NATS_NOT_FOUND)
+                s = NATS_OK;
+            else
+                printf("Should not have found that key!\n");
+        }
+        // Same for delete
+        if (s == NATS_OK)
+        {
+            s = natsMsgHeader_Delete(rmsg, "key-does-not-exist");
+            if (s == NATS_NOT_FOUND)
+                s = NATS_OK;
+            else
+                printf("Should not have found that key!\n");
+        }
+    }
+
+    // Anything that is created need to be destroyed
+    natsMsg_Destroy(msg);
+    natsMsg_Destroy(rmsg);
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(conn);
+
+    // If there was an error, print a stack trace and exit
+    if (s != NATS_OK)
+    {
+        nats_PrintLastErrorStack(stderr);
+        exit(2);
+    }
+
+    return 0;
+}
diff --git a/examples/getstarted/pubbytes.c b/examples/getstarted/pubbytes.c
new file mode 100644 (file)
index 0000000..227c1bf
--- /dev/null
@@ -0,0 +1,48 @@
+// Copyright 2017-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include <nats.h>
+
+int main(int argc, char **argv)
+{
+    natsConnection      *conn = NULL;
+    natsStatus          s;
+
+    printf("Publishes a message on subject 'foo'\n");
+
+    // Creates a connection to the default NATS URL
+    s = natsConnection_ConnectTo(&conn, NATS_DEFAULT_URL);
+    if (s == NATS_OK)
+    {
+        const char data[] = {104, 101, 108, 108, 111, 33};
+
+        // Publishes the sequence of bytes on subject "foo".
+        s = natsConnection_Publish(conn, "foo", data, sizeof(data));
+    }
+
+    // Anything that is created need to be destroyed
+    natsConnection_Destroy(conn);
+
+    // If there was an error, print a stack trace and exit
+    if (s != NATS_OK)
+    {
+        nats_PrintLastErrorStack(stderr);
+        exit(2);
+    }
+
+    return 0;
+}
+
+
+
+
diff --git a/examples/getstarted/pubmsg.c b/examples/getstarted/pubmsg.c
new file mode 100644 (file)
index 0000000..66b369d
--- /dev/null
@@ -0,0 +1,56 @@
+// Copyright 2017-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include <nats.h>
+
+int main(int argc, char **argv)
+{
+    natsConnection      *conn = NULL;
+    natsMsg             *msg  = NULL;
+    natsStatus          s;
+
+    printf("Publishes a message on subject 'foo'\n");
+
+    // Creates a connection to the default NATS URL
+    s = natsConnection_ConnectTo(&conn, NATS_DEFAULT_URL);
+    if (s == NATS_OK)
+    {
+        const char data[] = {104, 101, 108, 108, 111, 33};
+
+        // Creates a message for subject "foo", no reply, and
+        // with the given payload.
+        s = natsMsg_Create(&msg, "foo", NULL, data, sizeof(data));
+    }
+    if (s == NATS_OK)
+    {
+        // Publishes the message on subject "foo".
+        s = natsConnection_PublishMsg(conn, msg);
+    }
+
+    // Anything that is created need to be destroyed
+    natsMsg_Destroy(msg);
+    natsConnection_Destroy(conn);
+
+    // If there was an error, print a stack trace and exit
+    if (s != NATS_OK)
+    {
+        nats_PrintLastErrorStack(stderr);
+        exit(2);
+    }
+
+    return 0;
+}
+
+
+
+
diff --git a/examples/getstarted/pubstr.c b/examples/getstarted/pubstr.c
new file mode 100644 (file)
index 0000000..6cf0f82
--- /dev/null
@@ -0,0 +1,47 @@
+// Copyright 2017-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include <nats.h>
+
+int main(int argc, char **argv)
+{
+    natsConnection      *conn = NULL;
+    natsStatus          s;
+
+    printf("Publishes a message on subject 'foo'\n");
+
+    // Creates a connection to the default NATS URL
+    s = natsConnection_ConnectTo(&conn, NATS_DEFAULT_URL);
+    if (s == NATS_OK)
+    {
+        // This is a convenient function to send a message on "foo"
+        // as a string.
+        s = natsConnection_PublishString(conn, "foo", "hello!");
+    }
+
+    // Anything that is created need to be destroyed
+    natsConnection_Destroy(conn);
+
+    // If there was an error, print a stack trace and exit
+    if (s != NATS_OK)
+    {
+        nats_PrintLastErrorStack(stderr);
+        exit(2);
+    }
+
+    return 0;
+}
+
+
+
+
diff --git a/examples/getstarted/replier.c b/examples/getstarted/replier.c
new file mode 100644 (file)
index 0000000..fef1769
--- /dev/null
@@ -0,0 +1,76 @@
+// Copyright 2017-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include <nats.h>
+
+static void
+onMsg(natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure)
+{
+    printf("Received msg: %s - %.*s\n",
+           natsMsg_GetSubject(msg),
+           natsMsg_GetDataLength(msg),
+           natsMsg_GetData(msg));
+
+    // Sends a reply
+    if (natsMsg_GetReply(msg) != NULL)
+    {
+        natsConnection_PublishString(nc, natsMsg_GetReply(msg),
+                                     "here's some help");
+    }
+
+    // Need to destroy the message!
+    natsMsg_Destroy(msg);
+
+    // Notify the main thread that we are done.
+    *(bool *)(closure) = true;
+}
+
+int main(int argc, char **argv)
+{
+    natsConnection      *conn = NULL;
+    natsSubscription    *sub  = NULL;
+    natsStatus          s;
+    volatile bool       done  = false;
+
+    printf("Listening for requests on subject 'help'\n");
+
+    // Creates a connection to the default NATS URL
+    s = natsConnection_ConnectTo(&conn, NATS_DEFAULT_URL);
+    if (s == NATS_OK)
+    {
+        // Creates an asynchronous subscription on subject "help",
+        // waiting for a request. If a message arrives on this
+        // subject, the callback onMsg() will be invoked and it
+        // will send a reply.
+        s = natsConnection_Subscribe(&sub, conn, "help", onMsg, (void*) &done);
+    }
+    if (s == NATS_OK)
+    {
+        for (;!done;) {
+            nats_Sleep(100);
+        }
+    }
+
+    // Anything that is created need to be destroyed
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(conn);
+
+    // If there was an error, print a stack trace and exit
+    if (s != NATS_OK)
+    {
+        nats_PrintLastErrorStack(stderr);
+        exit(2);
+    }
+
+    return 0;
+}
diff --git a/examples/getstarted/requestor.c b/examples/getstarted/requestor.c
new file mode 100644 (file)
index 0000000..82cceaf
--- /dev/null
@@ -0,0 +1,60 @@
+// Copyright 2017-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include <nats.h>
+
+int main(int argc, char **argv)
+{
+    natsConnection      *conn = NULL;
+    natsMsg             *reply= NULL;
+    natsStatus          s;
+
+    printf("Publishes a message on subject 'help'\n");
+
+    // Creates a connection to the default NATS URL
+    s = natsConnection_ConnectTo(&conn, NATS_DEFAULT_URL);
+    if (s == NATS_OK)
+    {
+        // Sends a request on "help" and expects a reply.
+        // Will wait only for a given number of milliseconds,
+        // say for 5 seconds in this example.
+        s = natsConnection_RequestString(&reply, conn, "help",
+                "really need some", 5000);
+    }
+    if (s == NATS_OK)
+    {
+        // If we are here, we should have received the reply
+        printf("Received reply: %.*s\n",
+               natsMsg_GetDataLength(reply),
+               natsMsg_GetData(reply));
+
+        // Need to destroy the message!
+        natsMsg_Destroy(reply);
+    }
+
+    // Anything that is created need to be destroyed
+    natsConnection_Destroy(conn);
+
+    // If there was an error, print a stack trace and exit
+    if (s != NATS_OK)
+    {
+        nats_PrintLastErrorStack(stderr);
+        exit(2);
+    }
+
+    return 0;
+}
+
+
+
+
diff --git a/examples/getstarted/syncsub.c b/examples/getstarted/syncsub.c
new file mode 100644 (file)
index 0000000..0365c1b
--- /dev/null
@@ -0,0 +1,64 @@
+// Copyright 2017-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include <nats.h>
+
+int main(int argc, char **argv)
+{
+    natsConnection      *conn = NULL;
+    natsSubscription    *sub  = NULL;
+    natsMsg             *msg  = NULL;
+    natsStatus          s;
+
+    printf("Listening on subject 'foo'\n");
+
+    // Creates a connection to the default NATS URL
+    s = natsConnection_ConnectTo(&conn, NATS_DEFAULT_URL);
+    if (s == NATS_OK)
+    {
+        // Creates an synchronous subscription on subject "foo".
+        s = natsConnection_SubscribeSync(&sub, conn, "foo");
+    }
+    if (s == NATS_OK)
+    {
+        // With synchronous subscriptions, one need to poll
+        // using this function. A timeout is used to instruct
+        // how long we are willing to wait. The wait is in milliseconds.
+        // So here, we are going to wait for 5 seconds.
+        s = natsSubscription_NextMsg(&msg, sub, 5000);
+    }
+    if (s == NATS_OK)
+    {
+        // If we are here, we should have received a message.
+        printf("Received msg: %s - %.*s\n",
+               natsMsg_GetSubject(msg),
+               natsMsg_GetDataLength(msg),
+               natsMsg_GetData(msg));
+
+        // Need to destroy the message!
+        natsMsg_Destroy(msg);
+    }
+
+    // Anything that is created need to be destroyed
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(conn);
+
+    // If there was an error, print a stack trace and exit
+    if (s != NATS_OK)
+    {
+        nats_PrintLastErrorStack(stderr);
+        exit(2);
+    }
+
+    return 0;
+}
diff --git a/examples/js-pub.c b/examples/js-pub.c
new file mode 100644 (file)
index 0000000..791ba81
--- /dev/null
@@ -0,0 +1,201 @@
+// Copyright 2021 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "examples.h"
+
+static const char *usage = ""\
+"-stream        stream name (default is 'foo')\n" \
+"-txt           text to send (default is 'hello')\n" \
+"-count         number of messages to send\n" \
+"-sync          publish synchronously (default is async)\n";
+
+static void
+_jsPubErr(jsCtx *js, jsPubAckErr *pae, void *closure)
+{
+    int *errors = (int*) closure;
+
+    printf("Error: %u - Code: %u - Text: %s\n", pae->Err, pae->ErrCode, pae->ErrText);
+    printf("Original message: %.*s\n", natsMsg_GetDataLength(pae->Msg), natsMsg_GetData(pae->Msg));
+
+    *errors = (*errors + 1);
+
+    // If we wanted to resend the original message, we would do something like that:
+    //
+    // js_PublishMsgAsync(js, &(pae->Msg), NULL);
+    //
+    // Note that we use `&(pae->Msg)` so that the library set it to NULL if it takes
+    // ownership, and the library will not destroy the message when this callback returns.
+
+    // No need to destroy anything, everything is handled by the library.
+}
+
+int main(int argc, char **argv)
+{
+    natsConnection      *conn  = NULL;
+    natsStatistics      *stats = NULL;
+    natsOptions         *opts  = NULL;
+    jsCtx               *js    = NULL;
+    jsOptions           jsOpts;
+    jsErrCode           jerr   = 0;
+    natsStatus          s;
+    int                 dataLen=0;
+    volatile int        errors = 0;
+    bool                delStream = false;
+
+    opts = parseArgs(argc, argv, usage);
+    dataLen = (int) strlen(payload);
+
+    s = natsConnection_Connect(&conn, opts);
+
+    if (s == NATS_OK)
+        s = jsOptions_Init(&jsOpts);
+
+    if (s == NATS_OK)
+    {
+        if (async)
+        {
+            jsOpts.PublishAsync.ErrHandler           = _jsPubErr;
+            jsOpts.PublishAsync.ErrHandlerClosure    = (void*) &errors;
+        }
+        s = natsConnection_JetStream(&js, conn, &jsOpts);
+    }
+
+    if (s == NATS_OK)
+    {
+        jsStreamInfo    *si = NULL;
+
+        // First check if the stream already exists.
+        s = js_GetStreamInfo(&si, js, stream, NULL, &jerr);
+        if (s == NATS_NOT_FOUND)
+        {
+            jsStreamConfig  cfg;
+
+            // Since we are the one creating this stream, we can delete at the end.
+            delStream = true;
+
+            // Initialize the configuration structure.
+            jsStreamConfig_Init(&cfg);
+            cfg.Name = stream;
+            // Set the subject
+            cfg.Subjects = (const char*[1]){subj};
+            cfg.SubjectsLen = 1;
+            // Make it a memory stream.
+            cfg.Storage = js_MemoryStorage;
+            // Add the stream,
+            s = js_AddStream(&si, js, &cfg, NULL, &jerr);
+        }
+        if (s == NATS_OK)
+        {
+            printf("Stream %s has %" PRIu64 " messages (%" PRIu64 " bytes)\n",
+                si->Config->Name, si->State.Msgs, si->State.Bytes);
+
+            // Need to destroy the returned stream object.
+            jsStreamInfo_Destroy(si);
+        }
+    }
+
+    if (s == NATS_OK)
+        s = natsStatistics_Create(&stats);
+
+    if (s == NATS_OK)
+    {
+        printf("\nSending %" PRId64 " messages to subject '%s'\n", total, stream);
+        start = nats_Now();
+    }
+
+    for (count = 0; (s == NATS_OK) && (count < total); count++)
+    {
+        if (async)
+            s = js_PublishAsync(js, subj, (const void*) payload, dataLen, NULL);
+        else
+        {
+            jsPubAck *pa = NULL;
+
+            s = js_Publish(&pa, js, subj, (const void*) payload, dataLen, NULL, &jerr);
+            if (s == NATS_OK)
+            {
+                if (pa->Duplicate)
+                    printf("Got a duplicate message! Sequence=%" PRIu64 "\n", pa->Sequence);
+
+                jsPubAck_Destroy(pa);
+            }
+        }
+    }
+
+    if ((s == NATS_OK) && async)
+    {
+        jsPubOptions    jsPubOpts;
+
+        jsPubOptions_Init(&jsPubOpts);
+        // Let's set it to 30 seconds, if getting "Timeout" errors,
+        // this may need to be increased based on the number of messages
+        // being sent.
+        jsPubOpts.MaxWait = 30000;
+        s = js_PublishAsyncComplete(js, &jsPubOpts);
+        if (s == NATS_TIMEOUT)
+        {
+            // Let's get the list of pending messages. We could resend,
+            // etc, but for now, just destroy them.
+            natsMsgList list;
+
+            js_PublishAsyncGetPendingList(&list, js);
+            natsMsgList_Destroy(&list);
+        }
+    }
+
+    if (s == NATS_OK)
+    {
+        jsStreamInfo *si = NULL;
+
+        elapsed = nats_Now() - start;
+        printStats(STATS_OUT, conn, NULL, stats);
+        printPerf("Sent");
+
+        if (errors != 0)
+            printf("There were %d asynchronous errors\n", errors);
+
+        // Let's report some stats after the run
+        s = js_GetStreamInfo(&si, js, stream, NULL, &jerr);
+        if (s == NATS_OK)
+        {
+            printf("\nStream %s has %" PRIu64 " messages (%" PRIu64 " bytes)\n",
+                si->Config->Name, si->State.Msgs, si->State.Bytes);
+
+            jsStreamInfo_Destroy(si);
+        }
+    }
+    if (delStream && (js != NULL))
+    {
+        printf("\nDeleting stream %s: ", stream);
+        s = js_DeleteStream(js, stream, NULL, &jerr);
+        if (s == NATS_OK)
+            printf("OK!");
+        printf("\n");
+    }
+    if (s != NATS_OK)
+    {
+        printf("Error: %u - %s - jerr=%u\n", s, natsStatus_GetText(s), jerr);
+        nats_PrintLastErrorStack(stderr);
+    }
+
+    // Destroy all our objects to avoid report of memory leak
+    jsCtx_Destroy(js);
+    natsStatistics_Destroy(stats);
+    natsConnection_Destroy(conn);
+    natsOptions_Destroy(opts);
+
+    // To silence reports of memory still in used with valgrind
+    nats_Close();
+
+    return 0;
+}
diff --git a/examples/js-sub.c b/examples/js-sub.c
new file mode 100644 (file)
index 0000000..edb279d
--- /dev/null
@@ -0,0 +1,236 @@
+// Copyright 2021 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "examples.h"
+
+static const char *usage = ""\
+"-gd            use global message delivery thread pool\n" \
+"-sync          receive synchronously (default is asynchronous)\n" \
+"-pull          use pull subscription\n" \
+"-fc            enable flow control\n" \
+"-count         number of expected messages\n";
+
+static void
+onMsg(natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure)
+{
+    if (print)
+        printf("Received msg: %s - %.*s\n",
+               natsMsg_GetSubject(msg),
+               natsMsg_GetDataLength(msg),
+               natsMsg_GetData(msg));
+
+    if (start == 0)
+        start = nats_Now();
+
+    // We should be using a mutex to protect those variables since
+    // they are used from the subscription's delivery and the main
+    // threads. For demo purposes, this is fine.
+    if (++count == total)
+        elapsed = nats_Now() - start;
+
+    // Since this is auto-ack callback, we don't need to ack here.
+    natsMsg_Destroy(msg);
+}
+
+static void
+asyncCb(natsConnection *nc, natsSubscription *sub, natsStatus err, void *closure)
+{
+    printf("Async error: %u - %s\n", err, natsStatus_GetText(err));
+
+    natsSubscription_GetDropped(sub, (int64_t*) &dropped);
+}
+
+int main(int argc, char **argv)
+{
+    natsConnection      *conn  = NULL;
+    natsStatistics      *stats = NULL;
+    natsOptions         *opts  = NULL;
+    natsSubscription    *sub   = NULL;
+    natsMsg             *msg   = NULL;
+    jsCtx               *js    = NULL;
+    jsErrCode           jerr   = 0;
+    jsOptions           jsOpts;
+    jsSubOptions        so;
+    natsStatus          s;
+    bool                delStream = false;
+
+    opts = parseArgs(argc, argv, usage);
+
+    printf("Created %s subscription on '%s'.\n",
+        (pull ? "pull" : (async ? "asynchronous" : "synchronous")), subj);
+
+    s = natsOptions_SetErrorHandler(opts, asyncCb, NULL);
+
+    if (s == NATS_OK)
+        s = natsConnection_Connect(&conn, opts);
+
+    if (s == NATS_OK)
+        s = jsOptions_Init(&jsOpts);
+
+    if (s == NATS_OK)
+        s = jsSubOptions_Init(&so);
+    if (s == NATS_OK)
+    {
+        so.Stream = stream;
+        so.Consumer = durable;
+        if (flowctrl)
+        {
+            so.Config.FlowControl = true;
+            so.Config.Heartbeat = (int64_t)1E9;
+        }
+    }
+
+    if (s == NATS_OK)
+        s = natsConnection_JetStream(&js, conn, &jsOpts);
+
+    if (s == NATS_OK)
+    {
+        jsStreamInfo    *si = NULL;
+
+        // First check if the stream already exists.
+        s = js_GetStreamInfo(&si, js, stream, NULL, &jerr);
+        if (s == NATS_NOT_FOUND)
+        {
+            jsStreamConfig  cfg;
+
+            // Since we are the one creating this stream, we can delete at the end.
+            delStream = true;
+
+            // Initialize the configuration structure.
+            jsStreamConfig_Init(&cfg);
+            cfg.Name = stream;
+            // Set the subject
+            cfg.Subjects = (const char*[1]){subj};
+            cfg.SubjectsLen = 1;
+            // Make it a memory stream.
+            cfg.Storage = js_MemoryStorage;
+            // Add the stream,
+            s = js_AddStream(&si, js, &cfg, NULL, &jerr);
+        }
+        if (s == NATS_OK)
+        {
+            printf("Stream %s has %" PRIu64 " messages (%" PRIu64 " bytes)\n",
+                si->Config->Name, si->State.Msgs, si->State.Bytes);
+
+            // Need to destroy the returned stream object.
+            jsStreamInfo_Destroy(si);
+        }
+    }
+
+    if (s == NATS_OK)
+    {
+        if (pull)
+            s = js_PullSubscribe(&sub, js, subj, durable, &jsOpts, &so, &jerr);
+        else if (async)
+            s = js_Subscribe(&sub, js, subj, onMsg, NULL, &jsOpts, &so, &jerr);
+        else
+            s = js_SubscribeSync(&sub, js, subj, &jsOpts, &so, &jerr);
+    }
+    if (s == NATS_OK)
+        s = natsSubscription_SetPendingLimits(sub, -1, -1);
+
+    if (s == NATS_OK)
+        s = natsStatistics_Create(&stats);
+
+    if ((s == NATS_OK) && pull)
+    {
+        natsMsgList list;
+        int         i;
+
+        for (count = 0; (s == NATS_OK) && (count < total); )
+        {
+            s = natsSubscription_Fetch(&list, sub, 1024, 5000, &jerr);
+            if (s != NATS_OK)
+                break;
+
+            if (start == 0)
+                start = nats_Now();
+
+            count += (int64_t) list.Count;
+            for (i=0; (s == NATS_OK) && (i<list.Count); i++)
+                s = natsMsg_Ack(list.Msgs[i], &jsOpts);
+
+            natsMsgList_Destroy(&list);
+        }
+    }
+    else if ((s == NATS_OK) && async)
+    {
+        while (s == NATS_OK)
+        {
+            if (count + dropped == total)
+                break;
+
+            nats_Sleep(1000);
+        }
+    }
+    else if (s == NATS_OK)
+    {
+        for (count = 0; (s == NATS_OK) && (count < total); count++)
+        {
+            s = natsSubscription_NextMsg(&msg, sub, 5000);
+            if (s != NATS_OK)
+                break;
+
+            if (start == 0)
+                start = nats_Now();
+
+            s = natsMsg_Ack(msg, &jsOpts);
+            natsMsg_Destroy(msg);
+        }
+    }
+
+    if (s == NATS_OK)
+    {
+        printStats(STATS_IN|STATS_COUNT, conn, sub, stats);
+        printPerf("Received");
+    }
+    if (s == NATS_OK)
+    {
+        jsStreamInfo *si = NULL;
+
+        // Let's report some stats after the run
+        s = js_GetStreamInfo(&si, js, stream, NULL, &jerr);
+        if (s == NATS_OK)
+        {
+            printf("\nStream %s has %" PRIu64 " messages (%" PRIu64 " bytes)\n",
+                si->Config->Name, si->State.Msgs, si->State.Bytes);
+
+            jsStreamInfo_Destroy(si);
+        }
+        if (delStream)
+        {
+            printf("\nDeleting stream %s: ", stream);
+            s = js_DeleteStream(js, stream, NULL, &jerr);
+            if (s == NATS_OK)
+                printf("OK!");
+            printf("\n");
+        }
+    }
+    else
+    {
+        printf("Error: %u - %s - jerr=%u\n", s, natsStatus_GetText(s), jerr);
+        nats_PrintLastErrorStack(stderr);
+    }
+
+    // Destroy all our objects to avoid report of memory leak
+    jsCtx_Destroy(js);
+    natsStatistics_Destroy(stats);
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(conn);
+    natsOptions_Destroy(opts);
+
+    // To silence reports of memory still in used with valgrind
+    nats_Close();
+
+    return 0;
+}
diff --git a/examples/libevent-pub.c b/examples/libevent-pub.c
new file mode 100644 (file)
index 0000000..d9449ee
--- /dev/null
@@ -0,0 +1,147 @@
+// Copyright 2016-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "adapters/libevent.h"
+#include "examples.h"
+
+#ifndef WIN32
+#include <pthread.h>
+#define THREAD_T pthread_t
+#define THREAD_FN void *
+#define THREAD_RETURN() return (NULL)
+#define THREAD_START(threadvar, fn, arg) \
+    pthread_create(&(threadvar), NULL, fn, arg)
+#define THREAD_JOIN(th) pthread_join(th, NULL)
+#else
+#include <process.h>
+#define THREAD_T HANDLE
+#define THREAD_FN unsigned __stdcall
+#define THREAD_RETURN() return (0)
+#define THREAD_START(threadvar, fn, arg) do {       \
+    uintptr_t threadhandle = _beginthreadex(NULL,0,fn,(arg),0,NULL); \
+    (threadvar) = (HANDLE) threadhandle; \
+    } while (0)
+#define THREAD_JOIN(th) WaitForSingleObject(th, INFINITE)
+#endif
+
+static const char *usage = ""\
+"-txt           text to send (default is 'hello')\n" \
+"-count         number of messages to send\n";
+
+typedef struct
+{
+    natsConnection  *conn;
+    natsStatus      status;
+
+} threadInfo;
+
+static THREAD_FN
+pubThread(void *arg)
+{
+    threadInfo  *info = (threadInfo*) arg;
+    natsStatus  s     = NATS_OK;
+
+    for (count = 0; (s == NATS_OK) && (count < total); count++)
+        s = natsConnection_PublishString(info->conn, subj, payload);
+
+    if (s == NATS_OK)
+        s = natsConnection_Flush(info->conn);
+
+    natsConnection_Close(info->conn);
+
+    info->status = s;
+
+    if (s != NATS_OK)
+        nats_PrintLastErrorStack(stderr);
+
+    THREAD_RETURN();
+}
+
+int main(int argc, char **argv)
+{
+    natsConnection      *conn  = NULL;
+    natsOptions         *opts  = NULL;
+    natsSubscription    *sub   = NULL;
+    natsStatus          s      = NATS_OK;
+    struct event_base   *evLoop= NULL;
+    THREAD_T            pub;
+    threadInfo          info;
+
+    nats_Open(-1);
+
+    opts = parseArgs(argc, argv, usage);
+
+    printf("Sending %" PRId64 " messages to subject '%s'\n", total, subj);
+
+    // One time initialization of things that we need.
+    natsLibevent_Init();
+
+    // Create a loop.
+    evLoop = event_base_new();
+    if (evLoop == NULL)
+        s = NATS_ERR;
+
+    // Indicate which loop and callbacks to use once connected.
+    if (s == NATS_OK)
+        s = natsOptions_SetEventLoop(opts, (void*) evLoop,
+                                     natsLibevent_Attach,
+                                     natsLibevent_Read,
+                                     natsLibevent_Write,
+                                     natsLibevent_Detach);
+
+    if (s == NATS_OK)
+        s = natsConnection_Connect(&conn, opts);
+
+    if (s == NATS_OK)
+        start = nats_Now();
+
+    if (s == NATS_OK)
+    {
+        info.conn   = conn;
+        info.status = NATS_OK;
+
+        THREAD_START(pub, pubThread, (void*) &info);
+    }
+
+    if (s == NATS_OK)
+    {
+        event_base_dispatch(evLoop);
+
+        THREAD_JOIN(pub);
+        s = info.status;
+    }
+
+    if (s == NATS_OK)
+    {
+        printPerf("Sent");
+    }
+    else
+    {
+        printf("Error: %d - %s\n", s, natsStatus_GetText(s));
+        nats_PrintLastErrorStack(stderr);
+    }
+
+    // Destroy all our objects to avoid report of memory leak
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(conn);
+    natsOptions_Destroy(opts);
+
+    if (evLoop != NULL)
+        event_base_free(evLoop);
+
+    // To silence reports of memory still in used with valgrind
+    nats_Close();
+    libevent_global_shutdown();
+
+    return 0;
+}
diff --git a/examples/libevent-sub.c b/examples/libevent-sub.c
new file mode 100644 (file)
index 0000000..63ef072
--- /dev/null
@@ -0,0 +1,115 @@
+// Copyright 2016-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "adapters/libevent.h"
+#include "examples.h"
+
+static const char *usage = ""\
+"-gd            use global message delivery thread pool\n" \
+"-count         number of expected messages\n";
+
+static void
+onMsg(natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure)
+{
+    if (print)
+        printf("Received msg: %s - %.*s\n",
+               natsMsg_GetSubject(msg),
+               natsMsg_GetDataLength(msg),
+               natsMsg_GetData(msg));
+
+    natsMsg_Destroy(msg);
+
+    if (start == 0)
+        start = nats_Now();
+
+    // We should be using a mutex to protect those variables since
+    // they are used from the subscription's delivery and the main
+    // threads. For demo purposes, this is fine.
+    if (++count == total)
+    {
+        elapsed = nats_Now() - start;
+
+        natsConnection_Close(nc);
+    }
+}
+
+int main(int argc, char **argv)
+{
+    natsConnection      *conn  = NULL;
+    natsOptions         *opts  = NULL;
+    natsSubscription    *sub   = NULL;
+    natsStatus          s      = NATS_OK;
+    struct event_base   *evLoop= NULL;
+
+    nats_Open(-1);
+
+    opts = parseArgs(argc, argv, usage);
+
+    printf("Listening on '%s'.\n", subj);
+
+    // One time initialization of things that we need.
+    natsLibevent_Init();
+
+    // Create a loop.
+    evLoop = event_base_new();
+    if (evLoop == NULL)
+        s = NATS_ERR;
+
+    // Indicate which loop and callbacks to use once connected.
+    if (s == NATS_OK)
+        s = natsOptions_SetEventLoop(opts, (void*) evLoop,
+                                     natsLibevent_Attach,
+                                     natsLibevent_Read,
+                                     natsLibevent_Write,
+                                     natsLibevent_Detach);
+
+    if (s == NATS_OK)
+        s = natsConnection_Connect(&conn, opts);
+
+    if (s == NATS_OK)
+        s = natsConnection_Subscribe(&sub, conn, subj, onMsg, NULL);
+
+    // For maximum performance, set no limit on the number of pending messages.
+    if (s == NATS_OK)
+        s = natsSubscription_SetPendingLimits(sub, -1, -1);
+
+    // Run the event loop.
+    // This call will return when the connection is closed (either after
+    // receiving all messages, or disconnected and unable to reconnect).
+    if (s == NATS_OK)
+        event_base_dispatch(evLoop);
+
+    if (s == NATS_OK)
+    {
+        printPerf("Received");
+    }
+    else
+    {
+        printf("Error: %d - %s\n", s, natsStatus_GetText(s));
+        nats_PrintLastErrorStack(stderr);
+    }
+
+    // Destroy all our objects to avoid report of memory leak
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(conn);
+    natsOptions_Destroy(opts);
+
+    if (evLoop != NULL)
+        event_base_free(evLoop);
+
+    // To silence reports of memory still in used with valgrind
+    nats_Close();
+    libevent_global_shutdown();
+
+    return 0;
+}
diff --git a/examples/libuv-pub.c b/examples/libuv-pub.c
new file mode 100644 (file)
index 0000000..a8a356a
--- /dev/null
@@ -0,0 +1,135 @@
+// Copyright 2016-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "adapters/libuv.h"
+#include "examples.h"
+
+static const char *usage = ""\
+"-txt           text to send (default is 'hello')\n" \
+"-count         number of messages to send\n";
+
+typedef struct
+{
+    natsConnection  *conn;
+    natsStatus      status;
+
+} threadInfo;
+
+static void
+pubThread(void *arg)
+{
+    threadInfo  *info = (threadInfo*) arg;
+    natsStatus  s     = NATS_OK;
+
+    for (count = 0; (s == NATS_OK) && (count < total); count++)
+        s = natsConnection_PublishString(info->conn, subj, payload);
+
+    if (s == NATS_OK)
+        s = natsConnection_Flush(info->conn);
+
+    natsConnection_Close(info->conn);
+
+    info->status = s;
+
+    // Since this is a user-thread, call this function to release
+    // possible thread-local memory allocated by the library.
+    nats_ReleaseThreadMemory();
+}
+
+int main(int argc, char **argv)
+{
+    natsConnection      *conn  = NULL;
+    natsOptions         *opts  = NULL;
+    natsSubscription    *sub   = NULL;
+    natsStatus          s      = NATS_OK;
+    uv_loop_t           *uvLoop= NULL;
+    uv_thread_t         pub;
+    threadInfo          info;
+
+    opts = parseArgs(argc, argv, usage);
+
+    printf("Sending %" PRId64 " messages to subject '%s'\n", total, subj);
+
+    // One time initialization of things that we need.
+    natsLibuv_Init();
+
+    // Create a loop.
+    uvLoop = uv_default_loop();
+    if (uvLoop != NULL)
+    {
+        // Libuv is not thread-safe. Almost all calls to libuv need to
+        // occur from the thread where the loop is running. NATS library
+        // may have to call into the event loop from different threads.
+        // This call allows natsLibuv APIs to know if they are executing
+        // from the event loop thread or not.
+        natsLibuv_SetThreadLocalLoop(uvLoop);
+    }
+    else
+    {
+        s = NATS_ERR;
+    }
+
+    // Indicate which loop and callbacks to use once connected.
+    if (s == NATS_OK)
+        s = natsOptions_SetEventLoop(opts, (void*) uvLoop,
+                                     natsLibuv_Attach,
+                                     natsLibuv_Read,
+                                     natsLibuv_Write,
+                                     natsLibuv_Detach);
+
+    if (s == NATS_OK)
+        s = natsConnection_Connect(&conn, opts);
+
+    if (s == NATS_OK)
+        start = nats_Now();
+
+    if (s == NATS_OK)
+    {
+        info.conn   = conn;
+        info.status = NATS_OK;
+
+        if (uv_thread_create(&pub, pubThread, (void*) &info) != 0)
+            s = NATS_ERR;
+    }
+
+    if (s == NATS_OK)
+    {
+        uv_run(uvLoop, UV_RUN_DEFAULT);
+
+        uv_thread_join(&pub);
+        s = info.status;
+    }
+
+    if (s == NATS_OK)
+    {
+        printPerf("Sent");
+    }
+    else
+    {
+        printf("Error: %d - %s\n", s, natsStatus_GetText(s));
+        nats_PrintLastErrorStack(stderr);
+    }
+
+    // Destroy all our objects to avoid report of memory leak
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(conn);
+    natsOptions_Destroy(opts);
+
+    if (uvLoop != NULL)
+        uv_loop_close(uvLoop);
+
+    // To silence reports of memory still in used with valgrind
+    nats_Close();
+
+    return 0;
+}
diff --git a/examples/libuv-sub.c b/examples/libuv-sub.c
new file mode 100644 (file)
index 0000000..f0ce356
--- /dev/null
@@ -0,0 +1,125 @@
+// Copyright 2016-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "adapters/libuv.h"
+#include "examples.h"
+
+static const char *usage = ""\
+"-gd            use global message delivery thread pool\n" \
+"-count         number of expected messages\n";
+
+static void
+onMsg(natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure)
+{
+    if (print)
+        printf("Received msg: %s - %.*s\n",
+               natsMsg_GetSubject(msg),
+               natsMsg_GetDataLength(msg),
+               natsMsg_GetData(msg));
+
+    natsMsg_Destroy(msg);
+
+    if (start == 0)
+        start = nats_Now();
+
+    // We should be using a mutex to protect those variables since
+    // they are used from the subscription's delivery and the main
+    // threads. For demo purposes, this is fine.
+    if (++count == total)
+    {
+        elapsed = nats_Now() - start;
+
+        natsConnection_Close(nc);
+    }
+}
+
+int main(int argc, char **argv)
+{
+    natsConnection      *conn  = NULL;
+    natsOptions         *opts  = NULL;
+    natsSubscription    *sub   = NULL;
+    natsStatus          s      = NATS_OK;
+    uv_loop_t           *uvLoop= NULL;
+
+    opts = parseArgs(argc, argv, usage);
+
+    printf("Listening on '%s'.\n", subj);
+
+    // One time initialization of things that we need.
+    natsLibuv_Init();
+
+    // Create a loop.
+    uvLoop = uv_default_loop();
+    if (uvLoop != NULL)
+    {
+        // Libuv is not thread-safe. Almost all calls to libuv need to
+        // occur from the thread where the loop is running. NATS library
+        // may have to call into the event loop from different threads.
+        // This call allows natsLibuv APIs to know if they are executing
+        // from the event loop thread or not.
+        natsLibuv_SetThreadLocalLoop(uvLoop);
+    }
+    else
+    {
+        s = NATS_ERR;
+    }
+
+    // Indicate which loop and callbacks to use once connected.
+    if (s == NATS_OK)
+        s = natsOptions_SetEventLoop(opts, (void*) uvLoop,
+                                     natsLibuv_Attach,
+                                     natsLibuv_Read,
+                                     natsLibuv_Write,
+                                     natsLibuv_Detach);
+
+    if (s == NATS_OK)
+        s = natsConnection_Connect(&conn, opts);
+
+    if (s == NATS_OK)
+        s = natsConnection_Subscribe(&sub, conn, subj, onMsg, NULL);
+
+    // For maximum performance, set no limit on the number of pending messages.
+    if (s == NATS_OK)
+        s = natsSubscription_SetPendingLimits(sub, -1, -1);
+
+    // Run the event loop.
+    // This call will return when the connection is closed (either after
+    // receiving all messages, or disconnected and unable to reconnect).
+    if (s == NATS_OK)
+    {
+        uv_run(uvLoop, UV_RUN_DEFAULT);
+    }
+
+    if (s == NATS_OK)
+    {
+        printPerf("Received");
+    }
+    else
+    {
+        printf("Error: %d - %s\n", s, natsStatus_GetText(s));
+        nats_PrintLastErrorStack(stderr);
+    }
+
+    // Destroy all our objects to avoid report of memory leak
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(conn);
+    natsOptions_Destroy(opts);
+
+    if (uvLoop != NULL)
+        uv_loop_close(uvLoop);
+
+    // To silence reports of memory still in used with valgrind
+    nats_Close();
+
+    return 0;
+}
diff --git a/examples/publisher.c b/examples/publisher.c
new file mode 100644 (file)
index 0000000..2aa521f
--- /dev/null
@@ -0,0 +1,67 @@
+// Copyright 2015-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "examples.h"
+
+static const char *usage = ""\
+"-txt           text to send (default is 'hello')\n" \
+"-count         number of messages to send\n";
+
+int main(int argc, char **argv)
+{
+    natsConnection  *conn  = NULL;
+    natsStatistics  *stats = NULL;
+    natsOptions     *opts  = NULL;
+    natsStatus      s;
+    int             dataLen=0;
+
+    opts = parseArgs(argc, argv, usage);
+
+    printf("Sending %" PRId64 " messages to subject '%s'\n", total, subj);
+
+    s = natsConnection_Connect(&conn, opts);
+
+    if (s == NATS_OK)
+        s = natsStatistics_Create(&stats);
+
+    if (s == NATS_OK)
+        start = nats_Now();
+
+    dataLen = (int) strlen(payload);
+    for (count = 0; (s == NATS_OK) && (count < total); count++)
+        s = natsConnection_Publish(conn, subj, (const void*) payload, dataLen);
+
+    if (s == NATS_OK)
+        s = natsConnection_FlushTimeout(conn, 1000);
+
+    if (s == NATS_OK)
+    {
+        printStats(STATS_OUT, conn, NULL, stats);
+        printPerf("Sent");
+    }
+    else
+    {
+        printf("Error: %u - %s\n", s, natsStatus_GetText(s));
+        nats_PrintLastErrorStack(stderr);
+    }
+
+    // Destroy all our objects to avoid report of memory leak
+    natsStatistics_Destroy(stats);
+    natsConnection_Destroy(conn);
+    natsOptions_Destroy(opts);
+
+    // To silence reports of memory still in used with valgrind
+    nats_Close();
+
+    return 0;
+}
diff --git a/examples/queuegroup.c b/examples/queuegroup.c
new file mode 100644 (file)
index 0000000..42e6543
--- /dev/null
@@ -0,0 +1,144 @@
+// Copyright 2015-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "examples.h"
+
+static const char *usage = "" \
+"-gd            use global message delivery thread pool\n" \
+"-name          queue name (default is 'worker')\n" \
+"-count         number of expected messages\n";
+
+static void
+onMsg(natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure)
+{
+    // If 'print' is on, the server is likely to break the connection
+    // since the client library will become a slow consumer.
+    if (print)
+        printf("Received msg: %s - %.*s\n",
+               natsMsg_GetSubject(msg),
+               natsMsg_GetDataLength(msg),
+               natsMsg_GetData(msg));
+
+    if (start == 0)
+        start = nats_Now();
+
+    // We should be using a mutex to protect those variables since
+    // they are used from the subscription's delivery and the main
+    // threads. For demo purposes, this is fine.
+    if (++count == total)
+        elapsed = nats_Now() - start;
+
+    natsMsg_Destroy(msg);
+}
+
+static void
+asyncCb(natsConnection *nc, natsSubscription *sub, natsStatus err, void *closure)
+{
+    printf("Async error: %u - %s\n", err, natsStatus_GetText(err));
+}
+
+int main(int argc, char **argv)
+{
+    natsConnection      *conn = NULL;
+    natsOptions         *opts  = NULL;
+    natsSubscription    *sub   = NULL;
+    natsStatistics      *stats = NULL;
+    natsMsg             *msg   = NULL;
+    natsStatus          s;
+
+    opts = parseArgs(argc, argv, usage);
+
+    printf("Listening %ssynchronously on '%s' with name '%s'.\n",
+           (async ? "a" : ""), subj, name);
+
+    s = natsOptions_SetErrorHandler(opts, asyncCb, NULL);
+
+    if (s == NATS_OK)
+        s = natsConnection_Connect(&conn, opts);
+
+    if (s == NATS_OK)
+    {
+        if (async)
+            s = natsConnection_QueueSubscribe(&sub, conn, subj, name, onMsg, NULL);
+        else
+            s = natsConnection_QueueSubscribeSync(&sub, conn, subj, name);
+    }
+
+    // For maximum performance, set no limit on the number of pending messages.
+    if (s == NATS_OK)
+        s = natsSubscription_SetPendingLimits(sub, -1, -1);
+
+    if (s == NATS_OK)
+        s = natsSubscription_AutoUnsubscribe(sub, (int) total);
+
+    if (s == NATS_OK)
+        s = natsStatistics_Create(&stats);
+
+    if ((s == NATS_OK) && async)
+    {
+        while (s == NATS_OK)
+        {
+            s = printStats(STATS_IN|STATS_COUNT,conn, sub, stats);
+
+            if (count == total)
+                break;
+
+            if (s == NATS_OK)
+                nats_Sleep(1000);
+        }
+    }
+    else if (s == NATS_OK)
+    {
+        int64_t last = 0;
+
+        for (count = 0; (s == NATS_OK) && (count < total); count++)
+        {
+            s = natsSubscription_NextMsg(&msg, sub, 10000);
+            if (s != NATS_OK)
+                break;
+
+            if (start == 0)
+                start = nats_Now();
+
+            if (nats_Now() - last >= 1000)
+            {
+                s = printStats(STATS_IN|STATS_COUNT,conn, sub, stats);
+                last = nats_Now();
+            }
+
+            natsMsg_Destroy(msg);
+        }
+    }
+
+    if (s == NATS_OK)
+    {
+        printStats(STATS_IN|STATS_COUNT,conn, sub, stats);
+        printPerf("Received");
+    }
+    else
+    {
+        printf("Error: %u - %s\n", s, natsStatus_GetText(s));
+        nats_PrintLastErrorStack(stderr);
+    }
+
+    // Destroy all our objects to avoid report of memory leak
+    natsStatistics_Destroy(stats);
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(conn);
+    natsOptions_Destroy(opts);
+
+    // To silence reports of memory still in used with valgrind
+    nats_Close();
+
+    return 0;
+}
diff --git a/examples/replier.c b/examples/replier.c
new file mode 100644 (file)
index 0000000..5fe7666
--- /dev/null
@@ -0,0 +1,160 @@
+// Copyright 2015-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "examples.h"
+
+static const char *usage = "" \
+"-gd            use global message delivery thread pool\n" \
+"-sync          receive synchronously (default is asynchronous)\n" \
+"-count         number of expected requests\n";
+
+static void
+onMsg(natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure)
+{
+    if (print)
+        printf("Received msg: %s - %.*s\n",
+               natsMsg_GetSubject(msg),
+               natsMsg_GetDataLength(msg),
+               natsMsg_GetData(msg));
+
+    if (start == 0)
+        start = nats_Now();
+
+    natsConnection_PublishString(nc, natsMsg_GetReply(msg),
+                                 "here's some help");
+
+    // We should be using a mutex to protect those variables since
+    // they are used from the subscription's delivery and the main
+    // threads. For demo purposes, this is fine.
+    if (++count == total)
+        elapsed = nats_Now() - start;
+
+    natsMsg_Destroy(msg);
+}
+
+static void
+asyncCb(natsConnection *nc, natsSubscription *sub, natsStatus err, void *closure)
+{
+    if (print)
+        printf("Async error: %u - %s\n", err, natsStatus_GetText(err));
+
+    natsSubscription_GetDropped(sub, (int64_t*) &dropped);
+}
+
+int main(int argc, char **argv)
+{
+    natsConnection      *conn = NULL;
+    natsOptions         *opts  = NULL;
+    natsSubscription    *sub   = NULL;
+    natsStatistics      *stats = NULL;
+    natsMsg             *msg   = NULL;
+    natsStatus          s;
+
+    opts = parseArgs(argc, argv, usage);
+
+    printf("Listening %ssynchronously for requests on '%s'\n",
+           (async ? "a" : ""), subj);
+
+    s = natsOptions_SetErrorHandler(opts, asyncCb, NULL);
+    // Since the replier is sending one message at a time, reduce
+    // latency by making Publish calls send data right away
+    // instead of buffering them.
+    if (s == NATS_OK)
+        s = natsOptions_SetSendAsap(opts, true);
+
+    if (s == NATS_OK)
+        s = natsConnection_Connect(&conn, opts);
+
+    if (s == NATS_OK)
+    {
+        if (async)
+            s = natsConnection_Subscribe(&sub, conn, subj, onMsg, NULL);
+        else
+            s = natsConnection_SubscribeSync(&sub, conn, subj);
+    }
+
+    // For maximum performance, set no limit on the number of pending messages.
+    if (s == NATS_OK)
+        s = natsSubscription_SetPendingLimits(sub, -1, -1);
+
+    if (s == NATS_OK)
+        s = natsSubscription_AutoUnsubscribe(sub, (int) total);
+
+    if (s == NATS_OK)
+        s = natsStatistics_Create(&stats);
+
+    if ((s == NATS_OK) && async)
+    {
+        while (s == NATS_OK)
+        {
+            s = printStats(STATS_IN|STATS_COUNT,conn, sub, stats);
+
+            if (count + dropped == total)
+                break;
+
+            if (s == NATS_OK)
+                nats_Sleep(1000);
+        }
+    }
+    else if (s == NATS_OK)
+    {
+        int64_t last = 0;
+
+        for (count = 0; (s == NATS_OK) && (count < total); count++)
+        {
+            s = natsSubscription_NextMsg(&msg, sub, 10000);
+            if (s == NATS_OK)
+                s = natsConnection_PublishString(conn,
+                                                 natsMsg_GetReply(msg),
+                                                 "here's some help");
+            if (s == NATS_OK)
+            {
+                if (start == 0)
+                    start = nats_Now();
+
+                if (nats_Now() - last >= 1000)
+                {
+                    s = printStats(STATS_IN|STATS_COUNT,conn, sub, stats);
+                    last = nats_Now();
+                }
+            }
+
+            natsMsg_Destroy(msg);
+        }
+
+        if (s == NATS_OK)
+            s = natsConnection_FlushTimeout(conn, 1000);
+    }
+
+    if (s == NATS_OK)
+    {
+        printStats(STATS_IN|STATS_COUNT,conn, sub, stats);
+        printPerf("Received");
+    }
+    else
+    {
+        printf("Error: %u - %s\n", s, natsStatus_GetText(s));
+        nats_PrintLastErrorStack(stderr);
+    }
+
+    // Destroy all our objects to avoid report of memory leak
+    natsStatistics_Destroy(stats);
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(conn);
+    natsOptions_Destroy(opts);
+
+    // To silence reports of memory still in used with valgrind
+    nats_Close();
+
+    return 0;
+}
diff --git a/examples/requestor.c b/examples/requestor.c
new file mode 100644 (file)
index 0000000..3278efe
--- /dev/null
@@ -0,0 +1,87 @@
+// Copyright 2015-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "examples.h"
+
+static const char *usage = "" \
+"-txt           text to send (default is 'hello')\n" \
+"-count         number of requests to send\n";
+
+int main(int argc, char **argv)
+{
+    natsConnection  *conn  = NULL;
+    natsStatistics  *stats = NULL;
+    natsOptions     *opts  = NULL;
+    natsMsg         *reply = NULL;
+    int64_t         last   = 0;
+    natsStatus      s;
+
+    opts = parseArgs(argc, argv, usage);
+
+    printf("Sending %" PRId64 " requests to subject '%s'\n", total, subj);
+
+    s = natsConnection_Connect(&conn, opts);
+
+    if (s == NATS_OK)
+        s = natsStatistics_Create(&stats);
+
+    if (s == NATS_OK)
+        start = nats_Now();
+
+    for (count = 0; (s == NATS_OK) && (count < total); count++)
+    {
+        s = natsConnection_RequestString(&reply, conn, subj, payload, 1000);
+        if (s != NATS_OK)
+            break;
+
+        if (print)
+        {
+            printf("Received reply: %s - %.*s\n",
+                   natsMsg_GetSubject(reply),
+                   natsMsg_GetDataLength(reply),
+                   natsMsg_GetData(reply));
+        }
+
+        if (nats_Now() - last >= 1000)
+        {
+            s = printStats(STATS_OUT,conn, NULL, stats);
+            last = nats_Now();
+        }
+
+        natsMsg_Destroy(reply);
+    }
+
+    if (s == NATS_OK)
+        s = natsConnection_FlushTimeout(conn, 1000);
+
+    if (s == NATS_OK)
+    {
+        printStats(STATS_OUT, conn, NULL, stats);
+        printPerf("Sent");
+    }
+    else
+    {
+        printf("Error: %u - %s\n", s, natsStatus_GetText(s));
+        nats_PrintLastErrorStack(stderr);
+    }
+
+    // Destroy all our objects to avoid report of memory leak
+    natsStatistics_Destroy(stats);
+    natsConnection_Destroy(conn);
+    natsOptions_Destroy(opts);
+
+    // To silence reports of memory still in used with valgrind
+    nats_Close();
+
+    return 0;
+}
diff --git a/examples/stan/CMakeLists.txt b/examples/stan/CMakeLists.txt
new file mode 100644 (file)
index 0000000..550ce15
--- /dev/null
@@ -0,0 +1,29 @@
+if(NOT NATS_BUILD_EXAMPLES)
+  return()
+endif()
+
+# We need this directory to build the examples
+include_directories(${PROJECT_SOURCE_DIR}/src)
+include_directories(${PROJECT_SOURCE_DIR}/examples/stan)
+
+# Get all the .c files in the examples directory
+file(GLOB EXAMPLES_SOURCES RELATIVE ${PROJECT_SOURCE_DIR}/examples/stan *.c)
+
+# For each file...
+foreach(examples_src ${EXAMPLES_SOURCES})
+
+    # Remove the suffix so that it becomes the executable name
+    string(REPLACE ".c" "" examplename ${examples_src})
+    set(exampleexe "stan-${examplename}")
+
+    # Build the executable
+    add_executable(${exampleexe} ${PROJECT_SOURCE_DIR}/examples/stan/${examples_src})
+
+    # Link
+    if(NATS_BUILD_STATIC_EXAMPLES)
+      target_link_libraries(${exampleexe} nats_static ${NATS_EXTRA_LIB})
+    else()
+      target_link_libraries(${exampleexe} nats ${NATS_EXTRA_LIB})
+    endif()
+
+endforeach()
diff --git a/examples/stan/pub-async.c b/examples/stan/pub-async.c
new file mode 100644 (file)
index 0000000..695c444
--- /dev/null
@@ -0,0 +1,127 @@
+// Copyright 2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "../examples.h"
+
+static const char *usage = ""\
+"-txt           text to send (default is 'hello')\n";
+
+typedef struct __myPubMsgInfo
+{
+    const char  *payload;
+    int         size;
+    char        ID[30];
+
+} myPubMsgInfo;
+
+static volatile bool done = false;
+
+static void
+_pubAckHandler(const char *guid, const char *error, void *closure)
+{
+    myPubMsgInfo *pubMsg = (myPubMsgInfo*) closure;
+
+    printf("Ack handler for message ID=%s Data=%.*s GUID=%s - ",
+           pubMsg->ID, pubMsg->size, pubMsg->payload, guid);
+
+    if (error != NULL)
+        printf("Error= %s\n", error);
+    else
+        printf("Success!\n");
+
+    // This is a good place to free the pubMsg info since
+    // we no longer need it.
+    free(pubMsg);
+
+    // Notify the main thread that we are done. This is
+    // not the proper way and you should use some locking.
+    done = true;
+}
+
+int main(int argc, char **argv)
+{
+    natsStatus      s;
+    stanConnOptions *connOpts = NULL;
+    stanConnection  *sc       = NULL;
+    myPubMsgInfo    *pubMsg   = NULL;
+
+    // This example demonstrates the use of the pubAckHandler closure
+    // to correlate published messages and their acks.
+
+    opts = parseArgs(argc, argv, usage);
+
+    printf("Sending 1 message to channel '%s'\n", subj);
+
+    // Now create STAN Connection Options and set the NATS Options.
+    s = stanConnOptions_Create(&connOpts);
+    if (s == NATS_OK)
+        s = stanConnOptions_SetNATSOptions(connOpts, opts);
+
+    // Create the Connection using the STAN Connection Options
+    if (s == NATS_OK)
+        s = stanConnection_Connect(&sc, cluster, clientID, connOpts);
+
+    // Once the connection is created, we can destroy the options
+    natsOptions_Destroy(opts);
+    stanConnOptions_Destroy(connOpts);
+
+    // Create an object that represents our message
+    if (s == NATS_OK)
+    {
+        pubMsg = (myPubMsgInfo*) calloc(1, sizeof(myPubMsgInfo));
+        if (pubMsg == NULL)
+            s = NATS_NO_MEMORY;
+
+        if (s == NATS_OK)
+        {
+            // Say we want to bind the data that we are going to send
+            // to some unique ID that we know about this message.
+            pubMsg->payload = payload;
+            pubMsg->size    = (int)strlen(payload);
+            snprintf(pubMsg->ID, sizeof(pubMsg->ID), "%s:%d", "xyz", 234);
+        }
+    }
+    // We send the message and pass our message info as the closure
+    // for the pubAckHandler.
+    if (s == NATS_OK)
+    {
+        s = stanConnection_PublishAsync(sc, subj, pubMsg->payload, pubMsg->size,
+                                        _pubAckHandler, (void*) pubMsg);
+
+        // Note that if this call fails, then we need to free the pubMsg
+        // object here since it won't be passed to the ack handler.
+        if (s != NATS_OK)
+            free(pubMsg);
+    }
+
+    if (s == NATS_OK)
+    {
+        while (!done)
+            nats_Sleep(15);
+    }
+
+    if (s != NATS_OK)
+    {
+        printf("Error: %d - %s\n", s, natsStatus_GetText(s));
+        nats_PrintLastErrorStack(stderr);
+    }
+
+    // Destroy the connection
+    stanConnection_Destroy(sc);
+
+    // To silence reports of memory still in-use with valgrind.
+    nats_Sleep(50);
+    nats_Close();
+
+    return 0;
+}
diff --git a/examples/stan/pub.c b/examples/stan/pub.c
new file mode 100644 (file)
index 0000000..6e042ab
--- /dev/null
@@ -0,0 +1,143 @@
+// Copyright 2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "../examples.h"
+
+static const char *usage = ""\
+"-txt           text to send (default is 'hello')\n" \
+"-count         number of messages to send\n" \
+"-sync          publish synchronously (default is async)\n";
+
+static volatile int ackCount = 0;
+static volatile int errCount = 0;
+
+static void
+_pubAckHandler(const char *guid, const char *error, void *closure)
+{
+    // This callback can be invoked by different threads for the
+    // same connection, so access should be protected. For this
+    // example, we don't.
+    ackCount++;
+    if (error != NULL)
+    {
+        printf("pub ack for guid:%s error=%s\n", guid, error);
+        errCount++;
+    }
+}
+
+static void
+connectionLostCB(stanConnection *sc, const char *errTxt, void *closure)
+{
+    bool *connLost = (bool*) closure;
+
+    printf("Connection lost: %s\n", errTxt);
+    *connLost = true;
+}
+
+int main(int argc, char **argv)
+{
+    natsStatus      s;
+    stanConnOptions *connOpts = NULL;
+    stanConnection  *sc       = NULL;
+    int             len;
+    bool            connLost = false;
+
+    opts = parseArgs(argc, argv, usage);
+    len = (int) strlen(payload);
+
+    printf("Sending %" PRId64 " messages to channel '%s'\n", total, subj);
+
+    // Now create STAN Connection Options and set the NATS Options.
+    s = stanConnOptions_Create(&connOpts);
+    if (s == NATS_OK)
+        s = stanConnOptions_SetNATSOptions(connOpts, opts);
+
+    // Set smaller ping intervals
+    if (s == NATS_OK)
+        s = stanConnOptions_SetPings(connOpts, 1, 5);
+
+    // Add a callback to be notified if the STAN connection is lost for good.
+    if (s == NATS_OK)
+        s = stanConnOptions_SetConnectionLostHandler(connOpts, connectionLostCB, (void*)&connLost);
+
+    /*
+    // To reduce MaxPubAcksInflight to 1000 and factor of 1.0
+    if (s == NATS_OK)
+        s = stanConnOptions_SetMaxPubAcksInflight(connOpts, 1000, 1.0);
+    */
+
+    // Create the Connection using the STAN Connection Options
+    if (s == NATS_OK)
+        s = stanConnection_Connect(&sc, cluster, clientID, connOpts);
+
+    // Once the connection is created, we can destroy the options
+    natsOptions_Destroy(opts);
+    stanConnOptions_Destroy(connOpts);
+
+    if (s == NATS_OK)
+        start = nats_Now();
+
+    for (count = 0; (s == NATS_OK) && (count < total); count++)
+    {
+        if (async)
+            s = stanConnection_PublishAsync(sc, subj, (const void*) payload, len, _pubAckHandler, NULL);
+        else
+            s = stanConnection_Publish(sc, subj, (const void*) payload, len);
+    }
+
+    if (!connLost && (s == NATS_OK))
+    {
+        if (async)
+        {
+            while (ackCount != total)
+                nats_Sleep(15);
+        }
+
+        printPerf("Sent");
+        printf("Publish ack received: %d - with error: %d\n", ackCount, errCount);
+    }
+
+    // If the connection was created, try to close it
+    if (!connLost && (sc != NULL))
+    {
+        natsStatus closeSts = stanConnection_Close(sc);
+
+        if ((s == NATS_OK) && (closeSts != NATS_OK))
+            s = closeSts;
+    }
+
+    if (s != NATS_OK)
+    {
+        // If we finished before the end, let's wait a tiny
+        // bit to see if the failure is due to connection lost.
+        if (ackCount != total)
+            nats_Sleep(100);
+
+        // If connection was lost, the real reason is reported
+        // the the connectionLostCB callback.
+        if (!connLost)
+        {
+            printf("Error: %d - %s\n", s, natsStatus_GetText(s));
+            nats_PrintLastErrorStack(stderr);
+        }
+    }
+
+    // Destroy the connection
+    stanConnection_Destroy(sc);
+
+    // To silence reports of memory still in-use with valgrind.
+    nats_Sleep(50);
+    nats_Close();
+
+    return 0;
+}
diff --git a/examples/stan/sub.c b/examples/stan/sub.c
new file mode 100644 (file)
index 0000000..fa89635
--- /dev/null
@@ -0,0 +1,235 @@
+// Copyright 2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "../examples.h"
+
+static const char *usage = ""\
+"-c             cluster name (default \"test-cluster\")\n" \
+"-id            client ID (default \"client\"\n" \
+"-count         number of messages to receive\n" \
+"-last          deliver starting with last published message (default)\n" \
+"-all           deliver all available messages\n" \
+"-seq           deliver starting at given sequence number\n" \
+"-durable       durable subscription name\n" \
+"-qgroup        queue group name\n" \
+"-unsubscribe   unsubscribe the durable on exit\n";
+
+static volatile bool done = false;
+
+static void
+onMsg(stanConnection *sc, stanSubscription *sub, const char *channel, stanMsg *msg, void *closure)
+{
+    if (print)
+        printf("Received on [%s]: sequence:%" PRIu64 " data:%.*s timestamp:%" PRId64 " redelivered: %s\n",
+                channel,
+                stanMsg_GetSequence(msg),
+                stanMsg_GetDataLength(msg),
+                stanMsg_GetData(msg),
+                stanMsg_GetTimestamp(msg),
+                stanMsg_IsRedelivered(msg) ? "yes" : "no");
+
+    if (start == 0)
+        start = nats_Now();
+
+    // We should be using a mutex to protect those variables since
+    // they are used from the subscription's delivery and the main
+    // threads. For demo purposes, this is fine.
+    if (count == total-1)
+    {
+        natsStatus s;
+
+        elapsed = nats_Now() - start;
+
+        if (unsubscribe)
+            s = stanSubscription_Unsubscribe(sub);
+        else
+            s = stanSubscription_Close(sub);
+
+        if (s != NATS_OK)
+        {
+            printf("Error: %d - %s\n", s, natsStatus_GetText(s));
+            nats_PrintLastErrorStack(stderr);
+        }
+    }
+
+    /*
+    // If manual acknowledgment was selected, we would acknowledge
+    // the message this way:
+    stanSubscription_AckMsg(sub, msg);
+    */
+
+    stanMsg_Destroy(msg);
+
+    // Increment only here so that when the main thread detects
+    // that the total has been sent, it does not start cleaning
+    // objects before we have closed the subscription and destroyed
+    // the last message. This is to reduce risk of valgrind reporting
+    // memory still in-use.
+    count++;
+}
+
+#if WIN32
+static BOOL
+sigHandler(DWORD fdwCtrlType)
+{
+    if (fdwCtrlType==CTRL_C_EVENT)
+    {
+        done = true;
+        return TRUE;
+    }
+    return FALSE;
+}
+#else
+static void
+sigHandler(int ignored) {
+    done = true;
+}
+#endif
+
+static void
+connectionLostCB(stanConnection *sc, const char *errTxt, void *closure)
+{
+    bool *connLost = (bool*) closure;
+
+    printf("Connection lost: %s\n", errTxt);
+    *connLost = true;
+}
+
+int main(int argc, char **argv)
+{
+    natsStatus          s;
+    stanConnOptions     *connOpts   = NULL;
+    stanSubOptions      *subOpts    = NULL;
+    stanConnection      *sc         = NULL;
+    stanSubscription    *sub        = NULL;
+    bool                connLost    = false;
+
+    opts = parseArgs(argc, argv, usage);
+
+    printf("Receiving %" PRId64 " messages from channel '%s'\n", total, subj);
+
+    // Now create STAN Connection Options and set the NATS Options.
+    s = stanConnOptions_Create(&connOpts);
+    if (s == NATS_OK)
+        s = stanConnOptions_SetNATSOptions(connOpts, opts);
+
+    // Add a callback to be notified if the STAN connection is lost for good.
+    if (s == NATS_OK)
+        s = stanConnOptions_SetConnectionLostHandler(connOpts, connectionLostCB, (void*)&connLost);
+
+    // Create the Connection using the STAN Connection Options
+    if (s == NATS_OK)
+        s = stanConnection_Connect(&sc, cluster, clientID, connOpts);
+
+    // Once connection is created, we can destroy opts and connOpts
+    natsOptions_Destroy(opts);
+    stanConnOptions_Destroy(connOpts);
+
+    if (s == NATS_OK)
+        s = stanSubOptions_Create(&subOpts);
+
+    // If durable
+    if ((s == NATS_OK) && (durable != NULL))
+        s = stanSubOptions_SetDurableName(subOpts, durable);
+
+    // Set position
+    if (s == NATS_OK)
+    {
+        if (deliverAll)
+            s = stanSubOptions_DeliverAllAvailable(subOpts);
+        else if (deliverLast)
+            s = stanSubOptions_StartWithLastReceived(subOpts);
+        else if (deliverSeq > 0)
+            s = stanSubOptions_StartAtSequence(subOpts, deliverSeq);
+    }
+
+    /*
+    // To manually acknowledge the messages, you would need to set this option
+    if (s == NATS_OK)
+        s = stanSubOptions_SetManualAckMode(subOpts, true);
+
+    // To change the number of MaxInflight messages, set this option.
+    // For instance, to receive a single message between each ACK, set
+    // the value to 1.
+    if (s == NATS_OK)
+        s = stanSubOptions_SetMaxInflight(subOpts, 1);
+
+    // To change the duration after which the server resends unacknowledged
+    // messages, use this option. For instance, cause re-delivery after 5 seconds:
+    if (s == NATS_OK)
+        s = stanSubOptions_SetAckWait(subOpts, 5000);
+    */
+
+    // Create subscription
+    if (s == NATS_OK)
+    {
+        if (qgroup != NULL)
+            s = stanConnection_QueueSubscribe(&sub, sc, subj, qgroup, onMsg, NULL, subOpts);
+        else
+            s = stanConnection_Subscribe(&sub, sc, subj, onMsg, NULL, subOpts);
+    }
+
+    // Once subscription is created, we can destroy the subOpts object
+    stanSubOptions_Destroy(subOpts);
+
+    if (s == NATS_OK)
+    {
+#if WIN32
+        SetConsoleCtrlHandler((PHANDLER_ROUTINE) sigHandler, TRUE);
+#else
+        signal(SIGINT, sigHandler);
+#endif
+
+        while (!done && !connLost && (count < total))
+            nats_Sleep(15);
+
+        if (!connLost)
+            printPerf("Received");
+    }
+
+    // If test was interrupted before receiving all expected messages,
+    // close or unsubscribe. Otherwise, this is done in the message
+    // callback.
+    if (!connLost && ((sub != NULL) && (count < total)))
+    {
+        if (unsubscribe)
+            s = stanSubscription_Unsubscribe(sub);
+        else
+            s = stanSubscription_Close(sub);
+    }
+
+    // If the connection was created, try to close it
+    if (!connLost && (sc != NULL))
+    {
+        natsStatus closeSts = stanConnection_Close(sc);
+
+        if ((s == NATS_OK) && (closeSts != NATS_OK))
+            s = closeSts;
+    }
+
+    if (s != NATS_OK)
+    {
+        printf("Error: %d - %s\n", s, natsStatus_GetText(s));
+        nats_PrintLastErrorStack(stderr);
+    }
+
+    // Destroy our objects
+    stanSubscription_Destroy(sub);
+    stanConnection_Destroy(sc);
+
+    // To silence reports of memory still in-use with valgrind.
+    nats_Sleep(50);
+    nats_Close();
+
+    return 0;
+}
diff --git a/examples/subscriber.c b/examples/subscriber.c
new file mode 100644 (file)
index 0000000..7ba0873
--- /dev/null
@@ -0,0 +1,145 @@
+// Copyright 2015-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "examples.h"
+
+static const char *usage = ""\
+"-gd            use global message delivery thread pool\n" \
+"-sync          receive synchronously (default is asynchronous)\n" \
+"-count         number of expected messages\n";
+
+static void
+onMsg(natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure)
+{
+    if (print)
+        printf("Received msg: %s - %.*s\n",
+               natsMsg_GetSubject(msg),
+               natsMsg_GetDataLength(msg),
+               natsMsg_GetData(msg));
+
+    if (start == 0)
+        start = nats_Now();
+
+    // We should be using a mutex to protect those variables since
+    // they are used from the subscription's delivery and the main
+    // threads. For demo purposes, this is fine.
+    if (++count == total)
+        elapsed = nats_Now() - start;
+
+    natsMsg_Destroy(msg);
+}
+
+static void
+asyncCb(natsConnection *nc, natsSubscription *sub, natsStatus err, void *closure)
+{
+    if (print)
+        printf("Async error: %u - %s\n", err, natsStatus_GetText(err));
+
+    natsSubscription_GetDropped(sub, (int64_t*) &dropped);
+}
+
+int main(int argc, char **argv)
+{
+    natsConnection      *conn = NULL;
+    natsOptions         *opts  = NULL;
+    natsSubscription    *sub   = NULL;
+    natsStatistics      *stats = NULL;
+    natsMsg             *msg   = NULL;
+    natsStatus          s;
+
+    opts = parseArgs(argc, argv, usage);
+
+    printf("Listening %ssynchronously on '%s'.\n",
+           (async ? "a" : ""), subj);
+
+    s = natsOptions_SetErrorHandler(opts, asyncCb, NULL);
+
+    if (s == NATS_OK)
+        s = natsConnection_Connect(&conn, opts);
+
+    if (s == NATS_OK)
+    {
+        if (async)
+            s = natsConnection_Subscribe(&sub, conn, subj, onMsg, NULL);
+        else
+            s = natsConnection_SubscribeSync(&sub, conn, subj);
+    }
+
+    // For maximum performance, set no limit on the number of pending messages.
+    if (s == NATS_OK)
+        s = natsSubscription_SetPendingLimits(sub, -1, -1);
+
+    if (s == NATS_OK)
+        s = natsSubscription_AutoUnsubscribe(sub, (int) total);
+
+    if (s == NATS_OK)
+        s = natsStatistics_Create(&stats);
+
+    if ((s == NATS_OK) && async)
+    {
+        while (s == NATS_OK)
+        {
+            s = printStats(STATS_IN|STATS_COUNT, conn, sub, stats);
+
+            if (count + dropped == total)
+                break;
+
+            if (s == NATS_OK)
+                nats_Sleep(1000);
+        }
+    }
+    else if (s == NATS_OK)
+    {
+        int64_t last = 0;
+
+        for (count = 0; (s == NATS_OK) && (count < total); count++)
+        {
+            s = natsSubscription_NextMsg(&msg, sub, 10000);
+            if (s != NATS_OK)
+                break;
+
+            if (start == 0)
+                start = nats_Now();
+
+            if (nats_Now() - last >= 1000)
+            {
+                s = printStats(STATS_IN|STATS_COUNT, conn, sub, stats);
+                last = nats_Now();
+            }
+
+            natsMsg_Destroy(msg);
+        }
+    }
+
+    if (s == NATS_OK)
+    {
+        printStats(STATS_IN|STATS_COUNT,conn, sub, stats);
+        printPerf("Received");
+    }
+    else
+    {
+        printf("Error: %u - %s\n", s, natsStatus_GetText(s));
+        nats_PrintLastErrorStack(stderr);
+    }
+
+    // Destroy all our objects to avoid report of memory leak
+    natsStatistics_Destroy(stats);
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(conn);
+    natsOptions_Destroy(opts);
+
+    // To silence reports of memory still in used with valgrind
+    nats_Close();
+
+    return 0;
+}
diff --git a/install_deps.sh b/install_deps.sh
new file mode 100755 (executable)
index 0000000..0909f21
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+set -ex
+# check to see if the deps folder is empty
+if [ ! "$(ls -A $HOME/deps)" ]; then
+  mkdir -p $HOME/deps
+  git clone https://github.com/nats-io/nats.c.deps.git $HOME/deps
+
+  wget --no-check-certificate https://cmake.org/files/v3.20/cmake-3.20.4-linux-x86_64.tar.gz
+  tar -xvf cmake-3.20.4-linux-x86_64.tar.gz > /dev/null
+  mv cmake-3.20.4-linux-x86_64 $HOME/deps/cmake-install
+
+else
+  echo 'Using cached directory.';
+fi
+cd $HOME
\ No newline at end of file
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644 (file)
index 0000000..ea536de
--- /dev/null
@@ -0,0 +1,98 @@
+#------------------------
+# Add the sub-directories
+#------------------------
+include_directories(include)
+include_directories(${NATS_PLATFORM_INCLUDE})
+
+if(NATS_BUILD_WITH_TLS)
+  include_directories(${OPENSSL_INCLUDE_DIR})
+  set(NATS_OPENSSL_LIBS "${OPENSSL_LIBRARIES}")
+endif(NATS_BUILD_WITH_TLS)
+
+if(NATS_BUILD_STREAMING)
+  include_directories(${NATS_PROTOBUF_INCLUDE_DIRS})
+  include_directories(stan)
+endif(NATS_BUILD_STREAMING)
+
+if(NATS_BUILD_USE_SODIUM)
+  include_directories(${NATS_SODIUM_INCLUDE_DIRS})
+endif(NATS_BUILD_USE_SODIUM)
+
+#---------------------------------------
+# Grab all files in 'src' and 'src/unix'
+# or 'src/win' depending on the platform
+#---------------------------------------
+file(GLOB SOURCES "*.c")
+file(GLOB PS_SOURCES "${NATS_PLATFORM_INCLUDE}/*.c")
+
+# Add stan directory if building with Streaming support
+if(NATS_BUILD_STREAMING)
+  file(GLOB S_SOURCES "stan/*.c")
+endif(NATS_BUILD_STREAMING)
+
+# --------------------------------------
+# Create the shared and static libraries
+# --------------------------------------
+if(NATS_BUILD_LIB_SHARED)
+  add_library(nats SHARED ${SOURCES} ${PS_SOURCES} ${S_SOURCES})
+  target_link_libraries(nats ${NATS_OPENSSL_LIBS} ${NATS_EXTRA_LIB} ${NATS_PROTOBUF_LIBRARIES} ${NATS_SODIUM_LIBRARIES})
+  set_target_properties(nats PROPERTIES
+    VERSION ${NATS_VERSION_MAJOR}.${NATS_VERSION_MINOR}.${NATS_VERSION_PATCH}
+    SOVERSION ${NATS_VERSION_MAJOR}.${NATS_VERSION_MINOR})
+endif(NATS_BUILD_LIB_SHARED)
+
+if(NATS_BUILD_LIB_STATIC)
+  add_library(nats_static STATIC ${SOURCES} ${PS_SOURCES} ${S_SOURCES})
+  target_link_libraries(nats_static ${NATS_OPENSSL_LIBS} ${NATS_PROTOBUF_LIBRARIES} ${NATS_SODIUM_LIBRARIES})
+  set_target_properties(nats_static PROPERTIES
+    VERSION ${NATS_VERSION_MAJOR}.${NATS_VERSION_MINOR}.${NATS_VERSION_PATCH}
+    SOVERSION ${NATS_VERSION_MAJOR}.${NATS_VERSION_MINOR})
+  target_compile_definitions(nats_static PRIVATE -DNATS_STATIC)
+endif(NATS_BUILD_LIB_STATIC)
+
+# --------------------------------------
+# Install the libraries and header files
+# --------------------------------------
+
+
+if(NATS_BUILD_LIB_SHARED)
+  set_property(TARGET nats PROPERTY DEBUG_POSTFIX d)
+  target_include_directories(nats PUBLIC
+        $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
+        $<INSTALL_INTERFACE:include>)
+  install(TARGETS nats EXPORT cnats-targets DESTINATION ${NATS_LIBDIR})
+  install(EXPORT cnats-targets
+        NAMESPACE cnats::
+        FILE cnats-config.cmake
+        DESTINATION ${NATS_LIBDIR}/cmake/cnats)
+endif(NATS_BUILD_LIB_SHARED)
+
+if(NATS_BUILD_LIB_STATIC)
+  set_property(TARGET nats_static PROPERTY DEBUG_POSTFIX d)
+  target_include_directories(nats_static PUBLIC
+        $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
+        $<INSTALL_INTERFACE:include>)
+  install(TARGETS nats_static EXPORT cnats-targets ARCHIVE DESTINATION ${NATS_LIBDIR})
+  install(EXPORT cnats-targets
+        NAMESPACE cnats::
+        FILE cnats-config.cmake
+        DESTINATION ${NATS_LIBDIR}/cmake/cnats)
+endif(NATS_BUILD_LIB_STATIC)
+
+install(FILES deprnats.h DESTINATION ${NATS_INCLUDE_DIR} RENAME nats.h)
+install(FILES nats.h status.h version.h DESTINATION ${NATS_INCLUDE_DIR}/nats)
+install(FILES adapters/libevent.h adapters/libuv.h DESTINATION ${NATS_INCLUDE_DIR}/nats/adapters)
+
+# --------------------------------------
+# Setup the coveralls target and tell it
+# to gather coverage data for all the
+# lib sources.
+# --------------------------------------
+if(NATS_COVERAGE)
+       set(COVERAGE_SRCS ${SOURCES} ${S_SOURCES})
+       list(REMOVE_ITEM COVERAGE_SRCS "${PROJECT_SOURCE_DIR}/src/stan/protocol.pb-c.c")
+       coveralls_setup(
+        "${COVERAGE_SRCS}"
+        ${NATS_COVERAGE_UPLOAD}
+        "${PROJECT_SOURCE_DIR}/coveralls-cmake/cmake")
+endif(NATS_COVERAGE)
diff --git a/src/adapters/libevent.h b/src/adapters/libevent.h
new file mode 100644 (file)
index 0000000..c986324
--- /dev/null
@@ -0,0 +1,239 @@
+// Copyright 2016-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef LIBEVENT_H_
+#define LIBEVENT_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** \cond
+ *
+ */
+#include <event.h>
+#include <event2/thread.h>
+#include "../nats.h"
+
+typedef struct
+{
+    natsConnection      *nc;
+    struct event_base   *loop;
+    struct event        *read;
+    struct event        *write;
+    struct event        *keepActive;
+
+} natsLibeventEvents;
+
+// Forward declarations
+natsStatus natsLibevent_Read(void *userData, bool add);
+natsStatus natsLibevent_Detach(void *userData);
+
+/** \endcond
+ *
+ */
+
+
+/** \defgroup libeventFunctions Libevent Adapter
+ *
+ *  Adapter to plug a `NATS` connection to a `libevent` event loop.
+ *  @{
+ */
+
+/** \brief Initialize the adapter.
+ *
+ * Needs to be called once so that the adapter can initialize some state.
+ */
+void
+natsLibevent_Init(void)
+{
+#if _WIN32
+    evthread_use_windows_threads();
+#else
+    evthread_use_pthreads();
+#endif
+}
+
+static void
+natsLibevent_ProcessEvent(evutil_socket_t fd, short event, void *arg)
+{
+    natsLibeventEvents *nle = (natsLibeventEvents*) arg;
+
+    if (event & EV_READ)
+        natsConnection_ProcessReadEvent(nle->nc);
+
+    if (event & EV_WRITE)
+        natsConnection_ProcessWriteEvent(nle->nc);
+}
+
+static void
+keepAliveCb(evutil_socket_t fd, short flags, void * arg)
+{
+    // do nothing...
+}
+
+/** \brief Attach a connection to the given event loop.
+ *
+ * This callback is invoked after `NATS` library has connected, or reconnected.
+ * For a reconnect event, `*userData` will not be `NULL`. This function will
+ * start polling on READ events for the given `socket`.
+ *
+ * @param userData the location where the adapter stores the user object passed
+ * to the other callbacks.
+ * @param loop the event loop as a generic pointer. Cast to appropriate type.
+ * @param nc the connection to attach to the event loop
+ * @param socket the socket to start polling on.
+ */
+natsStatus
+natsLibevent_Attach(void **userData, void *loop, natsConnection *nc, natsSock socket)
+{
+    struct event_base   *libeventLoop = (struct event_base*) loop;
+    natsLibeventEvents  *nle          = (natsLibeventEvents*) (*userData);
+    natsStatus          s             = NATS_OK;
+
+    // This is the first attach (when reconnecting, nle will be non-NULL).
+    if (nle == NULL)
+    {
+        nle = (natsLibeventEvents*) calloc(1, sizeof(natsLibeventEvents));
+        if (nle == NULL)
+            return NATS_NO_MEMORY;
+
+        nle->nc   = nc;
+        nle->loop = libeventLoop;
+
+        nle->keepActive = event_new(nle->loop, -1, EV_PERSIST, keepAliveCb, NULL);
+        if (nle->keepActive == NULL)
+            s = NATS_NO_MEMORY;
+
+        if (s == NATS_OK)
+        {
+            struct timeval timeout;
+
+            timeout.tv_sec = 100000;
+            timeout.tv_usec = 0;
+
+            if (event_add(nle->keepActive, &timeout) != 0)
+                s = NATS_ERR;
+        }
+    }
+    else
+    {
+        if (nle->read != NULL)
+        {
+            event_free(nle->read);
+            nle->read = NULL;
+        }
+        if (nle->write != NULL)
+        {
+            event_free(nle->write);
+            nle->write = NULL;
+        }
+    }
+
+    if (s == NATS_OK)
+    {
+        nle->read = event_new(nle->loop, socket, EV_READ|EV_PERSIST,
+                              natsLibevent_ProcessEvent, (void*) nle);
+        natsLibevent_Read((void*) nle, true);
+
+        nle->write = event_new(nle->loop, socket, EV_WRITE|EV_PERSIST,
+                               natsLibevent_ProcessEvent, (void*) nle);
+    }
+
+    if (s == NATS_OK)
+        *userData = (void*) nle;
+    else
+        natsLibevent_Detach((void*) nle);
+
+    return s;
+}
+
+/** \brief Start or stop polling on READ events.
+ *
+ * This callback is invoked to notify that the event library should start
+ * or stop polling for READ events.
+ *
+ * @param userData the user object created in #natsLibevent_Attach
+ * @param add `true` if the library needs to start polling, `false` otherwise.
+ */
+natsStatus
+natsLibevent_Read(void *userData, bool add)
+{
+    natsLibeventEvents  *nle = (natsLibeventEvents*) userData;
+    int                 res;
+
+    if (add)
+        res = event_add(nle->read, NULL);
+    else
+        res = event_del_noblock(nle->read);
+
+    return (res == 0 ? NATS_OK : NATS_ERR);
+}
+
+/** \brief Start or stop polling on WRITE events.
+ *
+ * This callback is invoked to notify that the event library should start
+ * or stop polling for WRITE events.
+ *
+ * @param userData the user object created in #natsLibevent_Attach
+ * @param add `true` if the library needs to start polling, `false` otherwise.
+ */
+natsStatus
+natsLibevent_Write(void *userData, bool add)
+{
+    natsLibeventEvents  *nle = (natsLibeventEvents*) userData;
+    int                 res;
+
+    if (add)
+        res = event_add(nle->write, NULL);
+    else
+        res = event_del_noblock(nle->write);
+
+    return (res == 0 ? NATS_OK : NATS_ERR);
+}
+
+/** \brief The connection is closed, it can be safely detached.
+ *
+ * When a connection is closed (not disconnected, pending a reconnect), this
+ * callback will be invoked. This is the opportunity to cleanup the state
+ * maintained by the adapter for this connection.
+ *
+ * @param userData the user object created in #natsLibevent_Attach
+ */
+natsStatus
+natsLibevent_Detach(void *userData)
+{
+    natsLibeventEvents *nle = (natsLibeventEvents*) userData;
+
+    if (nle->read != NULL)
+        event_free(nle->read);
+    if (nle->write != NULL)
+        event_free(nle->write);
+    if (nle->keepActive != NULL)
+    {
+        event_active(nle->keepActive, 0, 0);
+        event_free(nle->keepActive);
+    }
+
+    free(nle);
+
+    return NATS_OK;
+}
+
+/** @} */ // end of libeventFunctions
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBEVENT_H_ */
diff --git a/src/adapters/libuv.h b/src/adapters/libuv.h
new file mode 100644 (file)
index 0000000..50499e9
--- /dev/null
@@ -0,0 +1,500 @@
+// Copyright 2016-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef LIBUV_H_
+#define LIBUV_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** \cond
+ *
+ */
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
+#define NATS_LIBUV_INCLUDE
+
+#include <uv.h>
+#include "../nats.h"
+
+#define NATS_LIBUV_ATTACH   (1)
+#define NATS_LIBUV_READ     (2)
+#define NATS_LIBUV_WRITE    (3)
+#define NATS_LIBUV_DETACH   (4)
+
+struct __natsLibuvEvent;
+
+typedef struct __natsLibuvEvent
+{
+    int                     type;
+    bool                    add;
+    struct __natsLibuvEvent *next;
+
+} natsLibuvEvent;
+
+typedef struct
+{
+    natsConnection  *nc;
+    uv_loop_t       *loop;
+    uv_poll_t       *handle;
+    uv_async_t      *scheduler;
+    int             events;
+    natsSock        socket;
+    uv_mutex_t      *lock;
+    natsLibuvEvent  *head;
+    natsLibuvEvent  *tail;
+
+} natsLibuvEvents;
+
+// Forward declarations
+natsStatus natsLibuv_Detach(void *userData);
+
+/** \endcond
+ *
+ */
+
+static uv_once_t    uvOnce = UV_ONCE_INIT;
+static uv_key_t     uvLoopThreadKey;
+
+static void
+_initOnce(void)
+{
+    if (uv_key_create(&uvLoopThreadKey) != 0)
+        abort();
+}
+
+/** \defgroup libuvFunctions Libuv Adapter
+ *
+ *  Adapter to plug a `NATS` connection to a `libuv` event loop.
+ *  @{
+ */
+
+/** \brief Initialize the adapter.
+ *
+ * Needs to be called once so that the adapter can initialize some state.
+ */
+void
+natsLibuv_Init(void)
+{
+    uv_once(&uvOnce, _initOnce);
+}
+
+/** \brief Register the event loop with the thread running `uv_run()`.
+ *
+ * Since `libuv` is not thread-safe, the adapter needs to know in which
+ * thread `uv_run()` will run for the given `loop`. It allows the adapter
+ * to schedule events so that they are executed in the event loop thread.
+ *
+ * @param loop an event loop.
+ */
+void
+natsLibuv_SetThreadLocalLoop(uv_loop_t *loop)
+{
+    uv_key_set(&uvLoopThreadKey, (void*) loop);
+}
+
+static natsStatus
+uvScheduleToEventLoop(natsLibuvEvents *nle, int eventType, bool add)
+{
+    natsLibuvEvent  *newEvent = NULL;
+    int             res;
+
+    newEvent = (natsLibuvEvent*) malloc(sizeof(natsLibuvEvent));
+    if (newEvent == NULL)
+        return NATS_NO_MEMORY;
+
+    newEvent->type  = eventType;
+    newEvent->add   = add;
+    newEvent->next  = NULL;
+
+    uv_mutex_lock(nle->lock);
+
+    if (nle->head == NULL)
+        nle->head = newEvent;
+
+    if (nle->tail != NULL)
+        nle->tail->next = newEvent;
+
+    nle->tail = newEvent;
+
+    uv_mutex_unlock(nle->lock);
+
+    res = uv_async_send(nle->scheduler);
+
+    return (res == 0 ? NATS_OK : NATS_ERR);
+}
+
+static void
+natsLibuvPoll(uv_poll_t* handle, int status, int events)
+{
+    natsLibuvEvents *nle = (natsLibuvEvents*)handle->data;
+
+    if (status != 0)
+    {
+        // There was an error, try to process as a read event.
+        // If we had an issue with the socket, this will cause
+        // an auto-reconnect.
+        natsConnection_ProcessReadEvent(nle->nc);
+        return;
+    }
+
+    if (events & UV_READABLE)
+        natsConnection_ProcessReadEvent(nle->nc);
+
+    if (events & UV_WRITABLE)
+        natsConnection_ProcessWriteEvent(nle->nc);
+}
+
+static natsStatus
+uvPollUpdate(natsLibuvEvents *nle, int eventType, bool add)
+{
+    int res;
+
+    if (eventType == NATS_LIBUV_READ)
+    {
+        if (add)
+            nle->events |= UV_READABLE;
+        else
+            nle->events &= ~UV_READABLE;
+    }
+    else
+    {
+        if (add)
+            nle->events |= UV_WRITABLE;
+        else
+            nle->events &= ~UV_WRITABLE;
+    }
+
+    if (nle->events)
+        res = uv_poll_start(nle->handle, nle->events, natsLibuvPoll);
+    else
+        res = uv_poll_stop(nle->handle);
+
+    if (res != 0)
+        return NATS_ERR;
+
+    return NATS_OK;
+}
+
+static void
+uvHandleClosedCb(uv_handle_t *handle)
+{
+    free(handle);
+}
+
+static natsStatus
+uvAsyncAttach(natsLibuvEvents *nle)
+{
+    natsStatus  s = NATS_OK;
+
+    // We are reconnecting, destroy the old handle, create a new one
+    if (nle->handle != NULL)
+    {
+        uv_close((uv_handle_t*) nle->handle, uvHandleClosedCb);
+        nle->handle = NULL;
+    }
+
+    nle->handle = (uv_poll_t*) malloc(sizeof(uv_poll_t));
+    if (nle->handle == NULL)
+        s = NATS_NO_MEMORY;
+
+    if (s == NATS_OK)
+    {
+#if UV_VERSION_MAJOR <= 1
+        if (uv_poll_init_socket(nle->loop, nle->handle, nle->socket) != 0)
+#else
+        if (uv_poll_init(nle->loop, nle->handle, nle->socket) != 0)
+#endif
+            s = NATS_ERR;
+    }
+
+    if ((s == NATS_OK)
+        && (nle->handle->data = (void*) nle)
+        && (uv_poll_start(nle->handle, UV_READABLE, natsLibuvPoll) != 0))
+    {
+        s = NATS_ERR;
+    }
+
+    return s;
+}
+
+static void
+finalCloseCb(uv_handle_t* handle)
+{
+    natsLibuvEvents *nle = (natsLibuvEvents*)handle->data;
+    natsLibuvEvent  *event;
+
+    while ((event = nle->head) != NULL)
+    {
+        nle->head = event->next;
+        free(event);
+    }
+    free(nle->handle);
+    free(nle->scheduler);
+    uv_mutex_destroy(nle->lock);
+    free(nle->lock);
+    free(nle);
+}
+
+static void
+closeSchedulerCb(uv_handle_t* scheduler)
+{
+    natsLibuvEvents *nle = (natsLibuvEvents*) scheduler->data;
+
+    uv_close((uv_handle_t*) nle->handle, finalCloseCb);
+}
+
+static void
+uvAsyncDetach(natsLibuvEvents *nle)
+{
+    uv_close((uv_handle_t*) nle->scheduler, closeSchedulerCb);
+}
+
+static void
+uvAsyncCb(uv_async_t *handle)
+{
+    natsLibuvEvents *nle    = (natsLibuvEvents*) handle->data;
+    natsStatus      s       = NATS_OK;
+    natsLibuvEvent  *event  = NULL;
+    bool            more    = false;
+
+    while (1)
+    {
+        uv_mutex_lock(nle->lock);
+
+        event = nle->head;
+        if (event == NULL)
+        {
+            // This is possible, even on entry of this function because
+            // the callback is called when the handle is initialized.
+            uv_mutex_unlock(nle->lock);
+            return;
+        }
+
+        nle->head = event->next;
+        if (event == nle->tail)
+            nle->tail = NULL;
+
+        more = (nle->head != NULL ? true : false);
+
+        uv_mutex_unlock(nle->lock);
+
+        switch (event->type)
+        {
+            case NATS_LIBUV_ATTACH:
+            {
+                s = uvAsyncAttach(nle);
+                break;
+            }
+            case NATS_LIBUV_READ:
+            case NATS_LIBUV_WRITE:
+            {
+                s = uvPollUpdate(nle, event->type, event->add);
+                break;
+            }
+            case NATS_LIBUV_DETACH:
+            {
+                uvAsyncDetach(nle);
+                break;
+            }
+            default:
+            {
+                s = NATS_ERR;
+                break;
+            }
+        }
+
+        free(event);
+
+        if ((s != NATS_OK) || !more)
+            break;
+    }
+
+    if (s != NATS_OK)
+        natsConnection_Close(nle->nc);
+}
+
+/** \brief Attach a connection to the given event loop.
+ *
+ * This callback is invoked after `NATS` library has connected, or reconnected.
+ * For a reconnect event, `*userData` will not be `NULL`. This function will
+ * start polling on READ events for the given `socket`.
+ *
+ * @param userData the location where the adapter stores the user object passed
+ * to the other callbacks.
+ * @param loop the event loop as a generic pointer. Cast to appropriate type.
+ * @param nc the connection to attach to the event loop
+ * @param socket the socket to start polling on.
+ */
+natsStatus
+natsLibuv_Attach(void **userData, void *loop, natsConnection *nc, natsSock socket)
+{
+    uv_loop_t       *uvLoop = (uv_loop_t*) loop;
+    bool            sched   = false;
+    natsLibuvEvents *nle    = (natsLibuvEvents*) (*userData);
+    natsStatus      s       = NATS_OK;
+
+    sched = ((uv_key_get(&uvLoopThreadKey) != loop) ? true : false);
+
+    // This is the first attach (when reconnecting, nle will be non-NULL).
+    if (nle == NULL)
+    {
+        // This has to run from the event loop!
+        if (sched)
+            return NATS_ILLEGAL_STATE;
+
+        nle = (natsLibuvEvents*) calloc(1, sizeof(natsLibuvEvents));
+        if (nle == NULL)
+            return NATS_NO_MEMORY;
+
+        nle->lock = (uv_mutex_t*) malloc(sizeof(uv_mutex_t));
+        if (nle->lock == NULL)
+            s = NATS_NO_MEMORY;
+
+        if ((s == NATS_OK) && (uv_mutex_init(nle->lock) != 0))
+            s = NATS_ERR;
+
+        if ((s == NATS_OK)
+            && ((nle->scheduler = (uv_async_t*) malloc(sizeof(uv_async_t))) == NULL))
+        {
+            s = NATS_NO_MEMORY;
+        }
+
+        if ((s == NATS_OK)
+            && (uv_async_init(uvLoop, nle->scheduler, uvAsyncCb) != 0))
+        {
+            s = NATS_ERR;
+        }
+
+        if (s == NATS_OK)
+        {
+            nle->nc              = nc;
+            nle->loop            = uvLoop;
+            nle->scheduler->data = (void*) nle;
+        }
+    }
+
+    if (s == NATS_OK)
+    {
+        nle->socket = socket;
+        nle->events = UV_READABLE;
+
+        if (sched)
+            s = uvScheduleToEventLoop(nle, NATS_LIBUV_ATTACH, true);
+        else
+            s = uvAsyncAttach(nle);
+    }
+
+    if (s == NATS_OK)
+        *userData = (void*) nle;
+    else
+        natsLibuv_Detach((void*) nle);
+
+    return s;
+}
+
+/** \brief Start or stop polling on READ events.
+ *
+ * This callback is invoked to notify that the event library should start
+ * or stop polling for READ events.
+ *
+ * @param userData the user object created in #natsLibuv_Attach
+ * @param add `true` if the library needs to start polling, `false` otherwise.
+ */
+natsStatus
+natsLibuv_Read(void *userData, bool add)
+{
+    natsLibuvEvents *nle = (natsLibuvEvents*) userData;
+    natsStatus      s    = NATS_OK;
+    bool            sched;
+
+    sched = ((uv_key_get(&uvLoopThreadKey) != nle->loop) ? true : false);
+
+    // If this call is made from a different thread than the event loop's
+    // thread, or if there are already scheduled events, then schedule
+    // this new event.
+
+    // We don't need to get the lock for nle->head because if sched is
+    // false, we are in the event loop thread, which is the thread removing
+    // events from the list. Also, all calls to the read/write/etc.. callbacks
+    // are protected by the connection's lock in the NATS library.
+    if (sched || (nle->head != NULL))
+        s = uvScheduleToEventLoop(nle, NATS_LIBUV_READ, add);
+    else
+        s = uvPollUpdate(nle, NATS_LIBUV_READ, add);
+
+    return s;
+}
+
+/** \brief Start or stop polling on WRITE events.
+ *
+ * This callback is invoked to notify that the event library should start
+ * or stop polling for WRITE events.
+ *
+ * @param userData the user object created in #natsLibuv_Attach
+ * @param add `true` if the library needs to start polling, `false` otherwise.
+ */
+natsStatus
+natsLibuv_Write(void *userData, bool add)
+{
+    natsLibuvEvents *nle = (natsLibuvEvents*) userData;
+    natsStatus      s    = NATS_OK;
+    bool            sched;
+
+    sched = ((uv_key_get(&uvLoopThreadKey) != nle->loop) ? true : false);
+
+    // See comment in natsLibuvRead
+    if (sched || (nle->head != NULL))
+        s = uvScheduleToEventLoop(nle, NATS_LIBUV_WRITE, add);
+    else
+        s = uvPollUpdate(nle, NATS_LIBUV_WRITE, add);
+
+    return s;
+}
+
+/** \brief The connection is closed, it can be safely detached.
+ *
+ * When a connection is closed (not disconnected, pending a reconnect), this
+ * callback will be invoked. This is the opportunity to cleanup the state
+ * maintained by the adapter for this connection.
+ *
+ * @param userData the user object created in #natsLibuv_Attach
+ */
+natsStatus
+natsLibuv_Detach(void *userData)
+{
+    natsLibuvEvents *nle = (natsLibuvEvents*) userData;
+    natsStatus      s    = NATS_OK;
+    bool            sched;
+
+    sched = ((uv_key_get(&uvLoopThreadKey) != nle->loop) ? true : false);
+
+    // See comment in natsLibuvRead
+    if (sched || (nle->head != NULL))
+        s = uvScheduleToEventLoop(nle, NATS_LIBUV_DETACH, true);
+    else
+        uvAsyncDetach(nle);
+
+    return s;
+}
+
+/** @} */ // end of libuvFunctions
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBUV_H_ */
diff --git a/src/asynccb.c b/src/asynccb.c
new file mode 100644 (file)
index 0000000..30b707d
--- /dev/null
@@ -0,0 +1,106 @@
+// Copyright 2015-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "natsp.h"
+#include "mem.h"
+#include "conn.h"
+#if defined(NATS_HAS_STREAMING)
+#include "stan/conn.h"
+#endif
+
+static void
+_freeAsyncCbInfo(natsAsyncCbInfo *info)
+{
+    NATS_FREE(info->errTxt);
+    NATS_FREE(info);
+}
+
+static void
+_createAndPostCb(natsAsyncCbType type, natsConnection *nc, natsSubscription *sub, natsStatus err,
+                 char *errTxt, void* scPtr)
+{
+    natsStatus          s  = NATS_OK;
+    natsAsyncCbInfo     *cb;
+#if defined(NATS_HAS_STREAMING)
+    stanConnection      *sc = (stanConnection*) scPtr;
+#endif
+
+    cb = NATS_CALLOC(1, sizeof(natsAsyncCbInfo));
+    if (cb == NULL)
+    {
+        // We will ignore for now since that makes the caller handle the
+        // possibility of having to run the callbacks in-line...
+        return;
+    }
+
+    cb->type = type;
+    cb->nc   = nc;
+    cb->sub  = sub;
+    cb->err     = err;
+    cb->errTxt  = errTxt;
+#if defined(NATS_HAS_STREAMING)
+    cb->sc   = sc;
+    stanConn_retain(sc);
+#endif
+    natsConn_retain(nc);
+
+    s = nats_postAsyncCbInfo(cb);
+    if (s != NATS_OK)
+    {
+        _freeAsyncCbInfo(cb);
+        natsConn_release(nc);
+    }
+}
+
+void
+natsAsyncCb_PostConnHandler(natsConnection *nc, natsAsyncCbType type)
+{
+    _createAndPostCb(type, nc, NULL, NATS_OK, NULL, NULL);
+}
+
+void
+natsAsyncCb_PostErrHandler(natsConnection *nc, natsSubscription *sub, natsStatus err, char *errTxt)
+{
+    _createAndPostCb(ASYNC_ERROR, nc, sub, err, errTxt, NULL);
+}
+
+#if defined(NATS_HAS_STREAMING)
+void
+natsAsyncCb_PostStanConnLostHandler(stanConnection *sc)
+{
+    _createAndPostCb(ASYNC_STAN_CONN_LOST, NULL, NULL, NATS_CONNECTION_CLOSED, NULL, (void*) sc);
+}
+#endif
+
+void
+natsAsyncCb_Destroy(natsAsyncCbInfo *info)
+{
+    natsConnection *nc = NULL;
+#if defined(NATS_HAS_STREAMING)
+    stanConnection *sc = NULL;
+#endif
+
+    if (info == NULL)
+        return;
+
+    nc = info->nc;
+#if defined(NATS_HAS_STREAMING)
+    sc = info->sc;
+#endif
+
+    _freeAsyncCbInfo(info);
+    natsConn_release(nc);
+#if defined(NATS_HAS_STREAMING)
+    stanConn_release(sc);
+#endif
+}
diff --git a/src/asynccb.h b/src/asynccb.h
new file mode 100644 (file)
index 0000000..5731e4f
--- /dev/null
@@ -0,0 +1,70 @@
+// Copyright 2015-2020 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef ASYNCCB_H_
+#define ASYNCCB_H_
+
+#include "status.h"
+
+typedef enum
+{
+    ASYNC_CLOSED          = 0,
+    ASYNC_DISCONNECTED,
+    ASYNC_RECONNECTED,
+    ASYNC_ERROR,
+    ASYNC_DISCOVERED_SERVERS,
+    ASYNC_CONNECTED,
+    ASYNC_LAME_DUCK_MODE,
+
+#if defined(NATS_HAS_STREAMING)
+    ASYNC_STAN_CONN_LOST
+#endif
+
+} natsAsyncCbType;
+
+struct __natsConnection;
+struct __natsSubscription;
+struct __natsAsyncCbInfo;
+
+typedef struct __natsAsyncCbInfo
+{
+    natsAsyncCbType             type;
+    struct __natsConnection     *nc;
+    struct __natsSubscription   *sub;
+    natsStatus                  err;
+    char                        *errTxt;
+
+#if defined(NATS_HAS_STREAMING)
+    struct __stanConnection     *sc;
+#endif
+
+    struct __natsAsyncCbInfo    *next;
+
+} natsAsyncCbInfo;
+
+void
+natsAsyncCb_PostConnHandler(struct __natsConnection *nc, natsAsyncCbType type);
+
+void
+natsAsyncCb_PostErrHandler(struct __natsConnection *nc,
+                           struct __natsSubscription *sub, natsStatus err, char *errTxt);
+
+#if defined(NATS_HAS_STREAMING)
+void
+natsAsyncCb_PostStanConnLostHandler(struct __stanConnection *sc);
+#endif
+
+void
+natsAsyncCb_Destroy(natsAsyncCbInfo *info);
+
+#endif /* ASYNCCB_H_ */
diff --git a/src/buf.c b/src/buf.c
new file mode 100644 (file)
index 0000000..8ce3b25
--- /dev/null
+++ b/src/buf.c
@@ -0,0 +1,259 @@
+// Copyright 2015-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include <string.h>
+#include <assert.h>
+
+#include "err.h"
+#include "mem.h"
+#include "buf.h"
+
+static natsStatus
+_init(natsBuffer *newBuf, char *data, int len, int capacity)
+{
+    natsBuffer *buf = newBuf;
+
+    // Since we explicitly set all fields, no need for memset
+
+    buf->doFree = false;
+
+    if (data != NULL)
+    {
+        buf->data    = data;
+        buf->ownData = false;
+    }
+    else
+    {
+        buf->data = (char*) NATS_MALLOC(capacity);
+        if (buf->data == NULL)
+            return nats_setDefaultError(NATS_NO_MEMORY);
+
+        buf->ownData = true;
+    }
+
+    buf->pos      = buf->data + len;
+    buf->len      = len;
+    buf->capacity = capacity;
+
+    return NATS_OK;
+}
+
+natsStatus
+natsBuf_InitWithBackend(natsBuffer *newBuf, char *data, int len, int capacity)
+{
+    if (data == NULL)
+        return NATS_INVALID_ARG;
+
+    return _init(newBuf, data, len, capacity);
+}
+
+natsStatus
+natsBuf_Init(natsBuffer *buf, int capacity)
+{
+    return _init(buf, NULL, 0, capacity);
+}
+
+static natsStatus
+_newBuf(natsBuffer **newBuf, char *data, int len, int capacity)
+{
+    natsBuffer  *buf;
+
+    buf = (natsBuffer*) NATS_MALLOC(sizeof(natsBuffer));
+    if (buf == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    if (_init(buf, data, len, capacity) != NATS_OK)
+    {
+        NATS_FREE(buf);
+        return NATS_UPDATE_ERR_STACK(NATS_NO_MEMORY);
+    }
+
+    buf->doFree = true;
+
+    *newBuf = buf;
+
+    return NATS_OK;
+}
+
+natsStatus
+natsBuf_CreateWithBackend(natsBuffer **newBuf, char *data, int len, int capacity)
+{
+    natsStatus s;
+
+    if (data == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    s = _newBuf(newBuf, data, len, capacity);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsBuf_Create(natsBuffer **newBuf, int capacity)
+{
+    natsStatus s = _newBuf(newBuf, NULL, 0, capacity);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+void
+natsBuf_Reset(natsBuffer *buf)
+{
+    buf->len = 0;
+    buf->pos = buf->data;
+}
+
+void
+natsBuf_MoveTo(natsBuffer *buf, int newPosition)
+{
+    assert(newPosition <= buf->capacity);
+
+    buf->len = newPosition;
+    buf->pos = buf->data + newPosition;
+}
+
+natsStatus
+natsBuf_Expand(natsBuffer *buf, int newSize)
+{
+    int     offset   = (int) (buf->pos - buf->data);
+    char    *newData = NULL;
+
+    if (newSize <= buf->capacity)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    if (buf->ownData)
+    {
+        newData = NATS_REALLOC(buf->data, newSize);
+        if (newData == NULL)
+            return nats_setDefaultError(NATS_NO_MEMORY);
+    }
+    else
+    {
+        newData = NATS_MALLOC(newSize);
+        if (newData == NULL)
+            return nats_setDefaultError(NATS_NO_MEMORY);
+
+        memcpy(newData, buf->data, buf->len);
+        buf->ownData = true;
+    }
+
+    if (buf->data != newData)
+    {
+        buf->data = newData;
+        buf->pos  = (char*) (buf->data + offset);
+    }
+
+    buf->capacity = newSize;
+
+    return NATS_OK;
+}
+
+natsStatus
+natsBuf_Append(natsBuffer *buf, const char* data, int dataLen)
+{
+    natsStatus  s = NATS_OK;
+    int64_t     n;
+
+    if (dataLen == -1)
+        dataLen = (int) strlen(data);
+
+    n = (int64_t) buf->len + dataLen;
+
+    if ((n < 0) || (n >= 0x7FFFFFFF))
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    if (n > (int64_t) buf->capacity)
+    {
+        // Increase by 10%
+        int64_t extra = (int64_t) (n * 0.1);
+        int64_t newSize;
+
+        // Make sure that we have at least some bytes left after adding.
+        newSize = (n + (extra < 64 ? 64 : extra));
+
+        // Overrun.
+        if (newSize >= 0x7FFFFFFF)
+            return nats_setDefaultError(NATS_NO_MEMORY);
+
+        s = natsBuf_Expand(buf, (int) newSize);
+    }
+
+    if (s == NATS_OK)
+    {
+        memcpy(buf->pos, data, dataLen);
+        buf->pos += dataLen;
+        buf->len += dataLen;
+    }
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsBuf_AppendByte(natsBuffer *buf, char b)
+{
+    natsStatus  s = NATS_OK;
+    int         c = buf->capacity;
+
+    if (buf->len == c)
+    {
+        // Increase by 10%
+        int extra = (int) (c * 0.1);
+        int newSize;
+
+        // Make sure that we have at least some bytes left after adding.
+        newSize = (c + (extra < 64 ? 64 : extra));
+
+        // Overrun.
+        if (newSize < 0)
+            return nats_setDefaultError(NATS_NO_MEMORY);
+
+        s = natsBuf_Expand(buf, newSize);
+    }
+
+    if (s == NATS_OK)
+    {
+        *(buf->pos++) = b;
+        buf->len++;
+    }
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+void
+natsBuf_Consume(natsBuffer *buf, int n)
+{
+    int remaining;
+
+    assert(n <= buf->len);
+
+    remaining = buf->len - n;
+    if (remaining > 0)
+        memmove(buf->data, buf->data + n, remaining);
+
+    buf->len = remaining;
+    buf->pos = buf->data + remaining;
+}
+
+void
+natsBuf_Destroy(natsBuffer *buf)
+{
+    if (buf == NULL)
+        return;
+
+    if (buf->ownData)
+        NATS_FREE(buf->data);
+
+    if (buf->doFree)
+        NATS_FREE(buf);
+    else
+        memset(buf, 0, sizeof(natsBuffer));
+}
diff --git a/src/buf.h b/src/buf.h
new file mode 100644 (file)
index 0000000..761571f
--- /dev/null
+++ b/src/buf.h
@@ -0,0 +1,127 @@
+// Copyright 2015-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef BUF_H_
+#define BUF_H_
+
+#include <stdbool.h>
+
+#include "status.h"
+
+typedef struct __natsBuffer
+{
+    char*       data;
+    char*       pos;
+    int         len;
+    int         capacity;
+    bool        ownData;
+    bool        doFree;
+
+} natsBuffer;
+
+#define natsBuf_Data(b)         ((b)->data)
+#define natsBuf_Capacity(b)     ((b)->capacity)
+#define natsBuf_Len(b)          ((b)->len)
+#define natsBuf_Available(b)    ((b)->capacity - (b)->len)
+
+
+// Initializes a natsBuffer using 'data' as the back-end byte array.
+// The length and capacity are set based on the given parameters.
+// Since the 'data' is not owned, and as long as the buffer does not need
+// to be expanded, the byte buffer will not be freed when this natsBuffer
+// is destroyed. Check natsBuf_Expand() for more details.
+//
+// One would use this call to initialize a natsBuffer without the added cost
+// of allocating memory for the natsBuffer structure itself, for instance
+// initializing an natsBuffer on the stack.
+natsStatus
+natsBuf_InitWithBackend(natsBuffer *buf, char *data, int len, int capacity);
+
+// Initializes a natsBuffer and creates a byte buffer of 'capacity' bytes.
+// The natsBuffer owns the buffer and will therefore free the memory used
+// when destroyed.
+//
+// One would use this call to initialize a natsBuffer without the added cost
+// of allocating memory for the natsBuffer structure itself, for instance
+// initializing an natsBuffer on the stack.
+natsStatus
+natsBuf_Init(natsBuffer *buf, int capacity);
+
+// Creates a new natsBuffer using 'data' as the back-end byte array.
+// The length and capacity are set based on the given parameters.
+// Since the 'data' is not owned, and as long as the buffer does not need
+// to be expanded, the byte buffer will not be freed when this natsBuffer
+// is destroyed. Check natsBuf_Expand() for more details.
+natsStatus
+natsBuf_CreateWithBackend(natsBuffer **newBuf, char *data, int len, int capacity);
+
+// Creates a new natsBuffer and creates a byte buffer of 'capacity' bytes.
+// The natsBuffer owns the buffer and will therefore free the memory used
+// when destroyed.
+natsStatus
+natsBuf_Create(natsBuffer **newBuf, int capacity);
+
+// Resets the length to zero, and the position to the beginning of the buffer.
+void
+natsBuf_Reset(natsBuffer *buf);
+
+// Sets the size of the buffer to 'newPosition' and new data will be appended
+// starting at this position.
+void
+natsBuf_MoveTo(natsBuffer *buf, int newPosition);
+
+// Expands 'buf' underlying buffer to the given new size 'newSize'.
+//
+// If 'buf' did not own the underlying buffer, a new buffer is
+// created and data copied over. The original data is now detached.
+// The underlying buffer is now owned by 'buf' and will be freed when
+// the natsBuffer is destroyed.
+//
+// When 'buf' owns the underlying buffer and it is expanded, a memory
+// reallocation of the buffer occurs to satisfy the new size requirement.
+//
+// Note that one should not save the returned value of natsBuf_Data() and
+// use it after any call to natsBuf_Expand/Append/AppendByte() since
+// the memory address for the underlying byte buffer may have changed due
+// to the buffer expansion.
+natsStatus
+natsBuf_Expand(natsBuffer *buf, int newSize);
+
+// Appends 'dataLen' bytes from the 'data' byte array to the buffer,
+// potentially expanding the buffer.
+// See natsBuf_Expand for details about natsBuffer not owning the data.
+natsStatus
+natsBuf_Append(natsBuffer *buf, const char* data, int dataLen);
+
+// Appends a byte to the buffer, potentially expanding the buffer.
+// See natsBuf_Expand for details about natsBuffer not owning the data.
+natsStatus
+natsBuf_AppendByte(natsBuffer *buf, char b);
+
+// Consume data from a buffer, overwriting the 'n' first bytes by the remaining
+// of data in this buffer.
+void
+natsBuf_Consume(natsBuffer *buf, int n);
+
+// Reads better when dealing with a buffer that was initialized as opposed to
+// created, but calling natsBuf_Destroy() will do the right thing regardless
+// of how the buffer was created.
+#define natsBuf_Cleanup(b)  natsBuf_Destroy((b))
+
+// Frees the data if owned (otherwise leaves it untouched) and the structure
+// if the buffer was created with one of the natsBuf_CreateX() function,
+// otherwise simply 'memset' the structure.
+void
+natsBuf_Destroy(natsBuffer *buf);
+
+#endif /* BUF_H_ */
diff --git a/src/comsock.c b/src/comsock.c
new file mode 100644 (file)
index 0000000..c556701
--- /dev/null
@@ -0,0 +1,663 @@
+// Copyright 2015-2021 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "natsp.h"
+
+#include <errno.h>
+#include <string.h>
+#include <stdio.h>
+#include <assert.h>
+#include <time.h>
+
+#include "status.h"
+#include "comsock.h"
+#include "mem.h"
+#include "util.h"
+
+natsStatus
+natsSock_Init(natsSockCtx *ctx)
+{
+    memset(ctx, 0, sizeof(natsSockCtx));
+    ctx->fd = NATS_SOCK_INVALID;
+    return NATS_OK;
+}
+
+static void
+_closeFd(natsSock fd)
+{
+    if (fd != NATS_SOCK_INVALID)
+        NATS_SOCK_CLOSE(fd);
+}
+
+void
+natsSock_Close(natsSock fd)
+{
+    _closeFd(fd);
+}
+
+void
+natsSock_Shutdown(natsSock fd)
+{
+    if (fd != NATS_SOCK_INVALID)
+        NATS_SOCK_SHUTDOWN(fd);
+}
+
+natsStatus
+natsSock_SetCommonTcpOptions(natsSock fd)
+{
+    struct linger   l;
+    int             yes = 1;
+
+    if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (const char*) &yes, sizeof(yes)) == -1)
+        return nats_setError(NATS_SYS_ERROR, "setsockopt TCP_NO_DELAY error: %d",
+                             NATS_SOCK_GET_ERROR);
+
+    yes = 1;
+
+    if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (const char*) &yes, sizeof(yes)) == -1)
+        return nats_setError(NATS_SYS_ERROR, "setsockopt SO_REUSEADDR error: %d",
+                             NATS_SOCK_GET_ERROR);
+
+    l.l_onoff  = 1;
+    l.l_linger = 0;
+
+    if (setsockopt(fd, SOL_SOCKET, SO_LINGER, (void*)&l, sizeof(l)) == -1)
+        return nats_setError(NATS_SYS_ERROR, "setsockopt SO_LINGER error: %d",
+                             NATS_SOCK_GET_ERROR);
+
+    return NATS_OK;
+}
+
+void
+natsSock_ShuffleIPs(natsSockCtx *ctx, struct addrinfo **tmp, int tmpSize, struct addrinfo **ipListHead, int count)
+{
+    struct addrinfo **ips   = NULL;
+    struct addrinfo *p      = NULL;
+    bool            doFree  = false;
+    int             i, j;
+
+    if (ctx->noRandomize || (ipListHead == NULL) || (*ipListHead == NULL) || count <= 1)
+        return;
+
+    if (count > tmpSize)
+    {
+        ips = (struct addrinfo**) NATS_CALLOC(count, sizeof(struct addrinfo*));
+        // Let's not fail the caller, simply don't shuffle.
+        if (ips == NULL)
+            return;
+        doFree = true;
+    }
+    else
+    {
+        ips = tmp;
+    }
+    p = *ipListHead;
+    // Put them in a array
+    for (i=0; i<count; i++)
+    {
+        ips[i] = p;
+        p = p->ai_next;
+    }
+    // Shuffle the array
+    for (i=0; i<count; i++)
+    {
+        j = rand() % (i + 1);
+        p = ips[i];
+        ips[i] = ips[j];
+        ips[j] = p;
+    }
+    // Relink them
+    for (i=0; i<count; i++)
+    {
+        if (i < count-1)
+            ips[i]->ai_next = ips[i+1];
+        else
+            ips[i]->ai_next = NULL;
+    }
+    // Update the list head with the first in the array.
+    *ipListHead = ips[0];
+
+    // If we allocated the array, free it.
+    if (doFree)
+        NATS_FREE(ips);
+}
+
+#define MAX_HOST_NAME   (256)
+
+natsStatus
+natsSock_ConnectTcp(natsSockCtx *ctx, const char *phost, int port)
+{
+    natsStatus      s    = NATS_OK;
+    int             res;
+    char            sport[6];
+    int             i;
+    int             max = 1;
+    char            hosta[MAX_HOST_NAME];
+    int             hostLen;
+    char            *host;
+    struct addrinfo *servInfos[2] = {NULL, NULL};
+    int             numServInfo   = 0;
+    int             numIPs        = 0;
+    int64_t         start         = 0;
+    int64_t         totalTimeout  = 0;
+    int64_t         timeoutPerIP  = 0;
+    struct addrinfo *tmpStorage[64];
+
+    if (phost == NULL)
+        return nats_setError(NATS_ADDRESS_MISSING, "%s", "No host specified");
+
+    hostLen = (int) strlen(phost);
+    if ((hostLen == 0) || ((hostLen == 1) && phost[0] == '['))
+        return nats_setError(NATS_INVALID_ARG, "Invalid host name: %s", phost);
+
+    if (phost[0] == '[')
+    {
+        snprintf(hosta, sizeof(hosta), "%.*s", hostLen - 2, phost + 1);
+        host = (char*) hosta;
+    }
+    else
+        host = (char*) phost;
+
+    snprintf(sport, sizeof(sport), "%d", port);
+
+    if ((ctx->orderIP == 46) || (ctx->orderIP == 64))
+        max = 2;
+
+    start = nats_Now();
+
+    for (i=0; i<max; i++)
+    {
+        struct addrinfo hints;
+        struct addrinfo *servinfo = NULL;
+        int             count     = 0;
+        struct addrinfo *p;
+
+        memset(&hints,0,sizeof(hints));
+        hints.ai_socktype = SOCK_STREAM;
+
+        switch (ctx->orderIP)
+        {
+            case  4: hints.ai_family = AF_INET; break;
+            case  6: hints.ai_family = AF_INET6; break;
+            case 46: hints.ai_family = (i == 0 ? AF_INET : AF_INET6); break;
+            case 64: hints.ai_family = (i == 0 ? AF_INET6 : AF_INET); break;
+            default: hints.ai_family = AF_UNSPEC;
+        }
+
+        if ((res = getaddrinfo(host, sport, &hints, &servinfo)) != 0)
+        {
+            s = nats_setError(NATS_SYS_ERROR, "getaddrinfo error: %s",
+                              gai_strerror(res));
+            continue;
+        }
+        servInfos[numServInfo] = servinfo;
+        for (p = servinfo; (p != NULL); p = p->ai_next)
+        {
+            count++;
+            numIPs++;
+        }
+        natsSock_ShuffleIPs(ctx, tmpStorage, sizeof(tmpStorage), &(servInfos[numServInfo]), count);
+        numServInfo++;
+    }
+    // If we got a getaddrinfo() and there is no servInfos to try to connect to
+    // bail out now.
+    if ((s != NATS_OK) && (numServInfo == 0))
+        return NATS_UPDATE_ERR_STACK(s);
+
+    // I don't think it can be the case if s == OK and/or numServInfo >= 1...
+    if (numIPs == 0)
+    {
+        for (i=0; i<numServInfo; i++)
+            nats_FreeAddrInfo(servInfos[i]);
+
+        return NATS_UPDATE_ERR_STACK(NATS_NO_SERVER);
+    }
+
+    // Check if there has been a deadline set.
+    totalTimeout = natsDeadline_GetTimeout(&(ctx->writeDeadline));
+    if (totalTimeout > 0)
+    {
+        // If so, compute a timeout based on the number of IPs we are going
+        // to possibly try to connect to.
+        timeoutPerIP = totalTimeout / numIPs;
+        // If really small, give at least a 10ms timeout
+        if (timeoutPerIP < 10)
+            timeoutPerIP = 10;
+    }
+
+    for (i=0; i<numServInfo; i++)
+    {
+        struct addrinfo *p;
+
+        for (p = servInfos[i]; (p != NULL); p = p->ai_next)
+        {
+            ctx->fd = socket(p->ai_family, p->ai_socktype, p->ai_protocol);
+            if (ctx->fd == NATS_SOCK_INVALID)
+            {
+                s = nats_setError(NATS_SYS_ERROR, "socket error: %d", NATS_SOCK_GET_ERROR);
+                continue;
+            }
+
+            // Reset 's' for this loop iteration.
+            s = NATS_OK;
+
+#ifdef SO_NOSIGPIPE
+            int set = 1;
+            if (setsockopt(ctx->fd, SOL_SOCKET, SO_NOSIGPIPE, (void*)&set, sizeof(int)) == -1)
+            {
+                s = nats_setError(NATS_SYS_ERROR,
+                                  "setsockopt SO_NOSIGPIPE error: %d",
+                                  NATS_SOCK_GET_ERROR);
+            }
+#endif
+            if (s == NATS_OK)
+                s = natsSock_SetBlocking(ctx->fd, false);
+
+            if (s == NATS_OK)
+            {
+                res = connect(ctx->fd, p->ai_addr, (natsSockLen) p->ai_addrlen);
+                if ((res == NATS_SOCK_ERROR)
+                    && (NATS_SOCK_GET_ERROR == NATS_SOCK_CONNECT_IN_PROGRESS))
+                {
+                    if (timeoutPerIP > 0)
+                        natsDeadline_Init(&(ctx->writeDeadline), timeoutPerIP);
+
+                    s = natsSock_WaitReady(WAIT_FOR_CONNECT, ctx);
+                    if ((s == NATS_OK) && !natsSock_IsConnected(ctx->fd))
+                        s = NATS_TIMEOUT;
+                }
+                else if (res == NATS_SOCK_ERROR)
+                {
+                    s = nats_setDefaultError(NATS_NO_SERVER);
+                }
+            }
+
+            if (s == NATS_OK)
+            {
+                s = natsSock_SetCommonTcpOptions(ctx->fd);
+                // We have connected OK and completed setting options, so we are done.
+                if (s == NATS_OK)
+                    break;
+            }
+
+            _closeFd(ctx->fd);
+            ctx->fd = NATS_SOCK_INVALID;
+        }
+        if (s == NATS_OK)
+        {
+            // Clear the error stack in case we got errors in the loop until
+            // being able to successfully connect.
+            nats_clearLastError();
+            break;
+        }
+    }
+    for (i=0; i<numServInfo; i++)
+        nats_FreeAddrInfo(servInfos[i]);
+
+    // If there was a deadline, reset the deadline with whatever is left.
+    if (totalTimeout > 0)
+    {
+        int64_t used = nats_Now() - start;
+        int64_t left = totalTimeout - used;
+
+        natsDeadline_Init(&(ctx->writeDeadline), (left > 0 ? left : 0));
+    }
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsSock_ReadLine(natsSockCtx *ctx, char *buffer, size_t maxBufferSize)
+{
+    natsStatus  s           = NATS_OK;
+    int         readBytes   = 0;
+    size_t      totalBytes  = 0;
+    char        *p          = buffer;
+    char        *eol;
+
+    // By contract, the caller needs to set buffer[0] to '\0' before the first
+    // call.
+    if (*p != '\0')
+    {
+        // We assume that this is not the first call with the given buffer.
+        // Move possible data after the first line to the beginning of the
+        // buffer.
+        char    *nextLine;
+        size_t  nextStart;
+        size_t  len = 0;
+
+        // The start of the next line will be the length of the line at the
+        // start of the buffer + 2, which is the number of characters
+        // representing CRLF.
+        nextStart = strlen(buffer) + 2;
+        nextLine  = (char*) (buffer + nextStart);
+
+        // There is some data...
+        if (*nextLine != '\0')
+        {
+            // The next line (even if partial) is guaranteed to be NULL
+            // terminated.
+            len = strlen(nextLine);
+
+            // Move to the beginning of the buffer (and include the NULL char)
+            memmove(buffer, nextLine, len + 1);
+
+            // Now, if the string contains a CRLF, we don't even need to read
+            // from the socket. Update the buffer and return.
+            if ((eol = strstr(buffer, _CRLF_)) != NULL)
+            {
+                // Replace the '\r' with '\0' to NULL terminate the string.
+                *eol = '\0';
+
+                // We are done!
+                return NATS_OK;
+            }
+
+            // This is a partial, we need to read more data until we get to
+            // the end of the line (\r\n).
+            p = (char*) (p + len);
+        }
+        else
+        {
+            *p = '\0';
+        }
+    }
+
+    while (1)
+    {
+        s = natsSock_Read(ctx, p, (maxBufferSize - totalBytes), &readBytes);
+        if (s != NATS_OK)
+            return NATS_UPDATE_ERR_STACK(s);
+
+        if (totalBytes + readBytes == maxBufferSize)
+            return nats_setDefaultError(NATS_LINE_TOO_LONG);
+
+        // We need to append a NULL character after what we have received.
+        *(p + readBytes) = '\0';
+
+        if ((eol = strstr(p, _CRLF_)) != NULL)
+        {
+            *eol = '\0';
+            return NATS_OK;
+        }
+
+        p          += readBytes;
+        totalBytes += readBytes;
+    }
+}
+
+natsStatus
+natsSock_Read(natsSockCtx *ctx, char *buffer, size_t maxBufferSize, int *n)
+{
+    natsStatus  s         = NATS_OK;
+    int         readBytes = 0;
+    bool        needRead  = true;
+
+    while (needRead)
+    {
+#if defined(NATS_HAS_TLS)
+        if (ctx->ssl != NULL)
+            readBytes = SSL_read(ctx->ssl, buffer, (int) maxBufferSize);
+        else
+#endif
+            readBytes = recv(ctx->fd, buffer, (natsRecvLen) maxBufferSize, 0);
+
+        if (readBytes == 0)
+        {
+            return nats_setDefaultError(NATS_CONNECTION_CLOSED);
+        }
+        else if (readBytes < 0)
+        {
+#if defined(NATS_HAS_TLS)
+            if (ctx->ssl != NULL)
+            {
+                int sslErr = SSL_get_error(ctx->ssl, readBytes);
+
+                if (sslErr == SSL_ERROR_ZERO_RETURN)
+                    return nats_setDefaultError(NATS_CONNECTION_CLOSED);
+
+                if ((sslErr == SSL_ERROR_WANT_READ) || (sslErr == SSL_ERROR_WANT_WRITE))
+                {
+                    int waitMode = (sslErr == SSL_ERROR_WANT_READ ? WAIT_FOR_READ : WAIT_FOR_WRITE);
+
+                    if ((s = natsSock_WaitReady(waitMode, ctx)) != NATS_OK)
+                        return NATS_UPDATE_ERR_STACK(s);
+
+                    // SSL requires that we go back with the same buffer
+                    // and size. We can't return until SSL_read returns
+                    // success (bytes read) or a different error.
+                    continue;
+                }
+            }
+#endif
+
+            if (NATS_SOCK_GET_ERROR != NATS_SOCK_WOULD_BLOCK)
+            {
+#if defined(NATS_HAS_TLS)
+                if (ctx->ssl != NULL)
+                    return nats_setError(NATS_IO_ERROR, "SSL_read error: %s",
+                                        NATS_SSL_ERR_REASON_STRING);
+                else
+#endif
+                    return nats_setError(NATS_IO_ERROR, "recv error: %d",
+                                        NATS_SOCK_GET_ERROR);
+            }
+            else if (ctx->useEventLoop)
+            {
+                // When using an external event loop, we are done. We will be
+                // called again...
+                if (n != NULL)
+                    *n = 0;
+
+                return NATS_OK;
+            }
+
+            // For non-blocking sockets, if the read would block, we need to
+            // wait up to the deadline.
+            s = natsSock_WaitReady(WAIT_FOR_READ, ctx);
+            if (s != NATS_OK)
+                return NATS_UPDATE_ERR_STACK(s);
+
+            continue;
+        }
+
+        if (n != NULL)
+            *n = readBytes;
+
+        needRead = false;
+    }
+
+    return NATS_OK;
+}
+
+natsStatus
+natsSock_Write(natsSockCtx *ctx, const char *data, int len, int *n)
+{
+    natsStatus  s         = NATS_OK;
+    int         bytes     = 0;
+    bool        needWrite = true;
+
+    while (needWrite)
+    {
+#if defined(NATS_HAS_TLS)
+        if (ctx->ssl != NULL)
+            bytes = SSL_write(ctx->ssl, data, len);
+        else
+#endif
+#ifdef MSG_NOSIGNAL
+            bytes = send(ctx->fd, data, len, MSG_NOSIGNAL);
+#else
+            bytes = send(ctx->fd, data, len, 0);
+#endif
+
+        if (bytes == 0)
+        {
+            return nats_setDefaultError(NATS_CONNECTION_CLOSED);
+        }
+        else if (bytes < 0)
+        {
+#if defined(NATS_HAS_TLS)
+            if (ctx->ssl != NULL)
+            {
+                int sslErr = SSL_get_error(ctx->ssl, bytes);
+
+                if (sslErr == SSL_ERROR_ZERO_RETURN)
+                    return nats_setDefaultError(NATS_CONNECTION_CLOSED);
+
+                if ((sslErr == SSL_ERROR_WANT_READ) || (sslErr == SSL_ERROR_WANT_WRITE))
+                {
+                    int waitMode = (sslErr == SSL_ERROR_WANT_READ ? WAIT_FOR_READ : WAIT_FOR_WRITE);
+
+                    if ((s = natsSock_WaitReady(waitMode, ctx)) != NATS_OK)
+                        return NATS_UPDATE_ERR_STACK(s);
+
+                    // SSL requires that we go back with the same buffer
+                    // and size. We can't return until SSL_write returns
+                    // success (bytes written) or a different error.
+                    continue;
+                }
+            }
+#endif
+
+            if (NATS_SOCK_GET_ERROR != NATS_SOCK_WOULD_BLOCK)
+            {
+#if defined(NATS_HAS_TLS)
+                if (ctx->ssl != NULL)
+                    return nats_setError(NATS_IO_ERROR, "SSL_write error: %s",
+                                         NATS_SSL_ERR_REASON_STRING);
+                else
+#endif
+                    return nats_setError(NATS_IO_ERROR, "send error: %d",
+                                         NATS_SOCK_GET_ERROR);
+            }
+            else if (ctx->useEventLoop)
+            {
+                // With external event loop, we are done now, we will be
+                // called later for more.
+                if (n != NULL)
+                    *n = 0;
+
+                return NATS_OK;
+            }
+
+            // For non-blocking sockets, if the write would block, we need to
+            // wait up to the deadline.
+            s = natsSock_WaitReady(WAIT_FOR_WRITE, ctx);
+            if (s != NATS_OK)
+                return NATS_UPDATE_ERR_STACK(s);
+
+            continue;
+        }
+
+        if (n != NULL)
+            *n = bytes;
+
+        needWrite = false;
+    }
+
+    return NATS_OK;
+}
+
+natsStatus
+natsSock_WriteFully(natsSockCtx *ctx, const char *data, int len)
+{
+    natsStatus  s     = NATS_OK;
+    int         n     = 0;
+
+    if (len == 0)
+        return NATS_OK;
+
+    do
+    {
+        s = natsSock_Write(ctx, data, len, &n);
+        if (s == NATS_OK)
+        {
+            data += n;
+            len  -= n;
+
+            // We have sent the whole buffer. Return.
+            if (len == 0)
+                return NATS_OK;
+        }
+    }
+    while (s == NATS_OK);
+
+    // If we are using a write deadline, shutdown the socket to trigger a
+    // possible reconnect
+    if (s == NATS_TIMEOUT)
+    {
+        natsSock_Shutdown(ctx->fd);
+        ctx->fdActive = false;
+    }
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+void
+natsSock_ClearDeadline(natsSockCtx *ctx)
+{
+    natsDeadline_Clear(&ctx->readDeadline);
+    natsDeadline_Clear(&ctx->writeDeadline);
+}
+
+void
+natsSock_InitDeadline(natsSockCtx *ctx, int64_t timeout)
+{
+    natsDeadline_Init(&ctx->readDeadline, timeout);
+    natsDeadline_Init(&ctx->writeDeadline, timeout);
+}
+
+natsStatus
+natsSock_GetLocalIPAndPort(natsSockCtx *ctx, char **ip, int *port)
+{
+    struct sockaddr_storage addr;
+    natsSockLen             addrLen = (natsSockLen) sizeof(addr);
+    char                    localIP[64];
+    void                    *laddr = NULL;
+    int                     fam;
+
+    *ip = NULL;
+    *port = 0;
+
+    if (getsockname(ctx->fd, (struct sockaddr*) &addr, &addrLen) != 0)
+        return nats_setError(NATS_SYS_ERROR, "getsockname error: %d", NATS_SOCK_GET_ERROR);
+
+    fam = ((struct sockaddr*) &addr)->sa_family;
+
+    if (fam == AF_INET)
+    {
+        struct sockaddr_in *addr4 = (struct sockaddr_in*) &addr;
+
+        laddr = &(addr4->sin_addr);
+        *port = (int) ntohs(addr4->sin_port);
+    }
+    else if (fam == AF_INET6)
+    {
+        struct sockaddr_in6 *addr6 = (struct sockaddr_in6*) &addr;
+
+        laddr = &(addr6->sin6_addr);
+        *port = (int) ntohs(addr6->sin6_port);
+    }
+    else
+    {
+        return nats_setError(NATS_SYS_ERROR, "unknown INET family: %d", fam);
+    }
+
+    if (inet_ntop(fam, laddr, localIP, sizeof(localIP)) == NULL)
+        return nats_setError(NATS_SYS_ERROR, "inet_ntop error: %d", NATS_SOCK_GET_ERROR);
+
+    if ((*ip = NATS_STRDUP(localIP)) == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    return NATS_OK;
+}
diff --git a/src/comsock.h b/src/comsock.h
new file mode 100644 (file)
index 0000000..73c01fa
--- /dev/null
@@ -0,0 +1,96 @@
+// Copyright 2015-2019 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef SOCK_H_
+#define SOCK_H_
+
+#include "natsp.h"
+
+natsStatus
+natsSock_Init(natsSockCtx *ctx);
+
+
+natsStatus
+natsSock_WaitReady(int waitMode, natsSockCtx *ctx);
+
+void
+natsSock_ShuffleIPs(natsSockCtx *ctx, struct addrinfo **tmp, int tmpSize, struct addrinfo **ipListHead, int count);
+
+natsStatus
+natsSock_ConnectTcp(natsSockCtx *ctx, const char *host, int port);
+
+natsStatus
+natsSock_SetBlocking(natsSock fd, bool blocking);
+
+bool
+natsSock_IsConnected(natsSock fd);
+
+// Reads a line from the socket and returns it without the line-ending characters.
+// This call blocks until the line is complete, or the socket is closed or an
+// error occurs.
+// Handles blocking and non-blocking sockets. For the later, an optional 'deadline'
+// indicates how long it can wait for the full read to complete.
+//
+// NOTE: 'buffer[0]' must be set to '\0' prior to the very first call. If the
+// peer is sending multiple lines, it is possible that this function reads the
+// next line(s) (or partials) in a single call. In this case, the caller needs
+// to repeat the call with the same buffer to "read" the next line.
+natsStatus
+natsSock_ReadLine(natsSockCtx *ctx, char *buffer, size_t maxBufferSize);
+
+// Reads up to 'maxBufferSize' bytes from the socket and put them in 'buffer'.
+// If the socket is blocking, wait until some data is available or the socket
+// is closed or an error occurs.
+// If the socket is non-blocking, wait up to the optional deadline (set in
+// the context). If NULL, behaves like a blocking socket.
+// If an external event loop is used, it is possible that this function
+// returns NATS_OK with 'n' == 0.
+natsStatus
+natsSock_Read(natsSockCtx *ctx, char *buffer, size_t maxBufferSize, int *n);
+
+// Writes up to 'len' bytes to the socket. If the socket is blocking,
+// wait for some data to be sent. If the socket is non-blocking, wait up
+// to the optional deadline (set in ctx).
+// If an external event loop is used, it is possible that this function
+// returns NATS_OK with 'n' == 0.
+natsStatus
+natsSock_Write(natsSockCtx *ctx, const char *data, int len, int *n);
+
+// Writes 'len' bytes to the socket. Does not return until all bytes
+// have been written, unless the socket is closed or an error occurs
+// (including write timeout).
+natsStatus
+natsSock_WriteFully(natsSockCtx *ctx, const char *data, int len);
+
+natsStatus
+natsSock_Flush(natsSock fd);
+
+void
+natsSock_Close(natsSock fd);
+
+natsStatus
+natsSock_SetCommonTcpOptions(natsSock fd);
+
+void
+natsSock_Shutdown(natsSock fd);
+
+void
+natsSock_ClearDeadline(natsSockCtx *ctx);
+
+void
+natsSock_InitDeadline(natsSockCtx *ctx, int64_t timeout);
+
+natsStatus
+natsSock_GetLocalIPAndPort(natsSockCtx *ctx, char **ip, int *port);
+
+#endif /* SOCK_H_ */
diff --git a/src/conn.c b/src/conn.c
new file mode 100644 (file)
index 0000000..524d1d3
--- /dev/null
@@ -0,0 +1,4405 @@
+// Copyright 2015-2021 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "natsp.h"
+
+#include <assert.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <ctype.h>
+
+#include "conn.h"
+#include "mem.h"
+#include "buf.h"
+#include "parser.h"
+#include "srvpool.h"
+#include "url.h"
+#include "opts.h"
+#include "util.h"
+#include "timer.h"
+#include "sub.h"
+#include "msg.h"
+#include "asynccb.h"
+#include "comsock.h"
+#include "nkeys.h"
+#include "crypto.h"
+#include "js.h"
+
+#define DEFAULT_SCRATCH_SIZE    (512)
+#define MAX_INFO_MESSAGE_SIZE   (32768)
+#define DEFAULT_FLUSH_TIMEOUT   (10000)
+
+#define NATS_EVENT_ACTION_ADD       (true)
+#define NATS_EVENT_ACTION_REMOVE    (false)
+
+#ifdef DEV_MODE
+// For type safety
+
+static void _retain(natsConnection *nc)  { nc->refs++; }
+static void _release(natsConnection *nc) { nc->refs--; }
+
+void natsConn_Lock(natsConnection *nc)   { natsMutex_Lock(nc->mu);   }
+void natsConn_Unlock(natsConnection *nc) { natsMutex_Unlock(nc->mu); }
+
+#else
+// We know what we are doing :-)
+
+#define _retain(c)  ((c)->refs++)
+#define _release(c) ((c)->refs--)
+
+#endif // DEV_MODE
+
+
+// CLIENT_PROTO_ZERO is the original client protocol from 2009.
+// http://nats.io/documentation/internals/nats-protocol/
+#define CLIENT_PROTO_ZERO   (0)
+
+// CLIENT_PROTO_INFO signals a client can receive more then the original INFO block.
+// This can be used to update clients on other cluster members, etc.
+#define CLIENT_PROTO_INFO   (1)
+
+/*
+ * Forward declarations:
+ */
+static natsStatus
+_spinUpSocketWatchers(natsConnection *nc);
+
+static natsStatus
+_processConnInit(natsConnection *nc);
+
+static void
+_close(natsConnection *nc, natsConnStatus status, bool fromPublicClose, bool doCBs);
+
+static bool
+_processOpError(natsConnection *nc, natsStatus s, bool initialConnect);
+
+static natsStatus
+_flushTimeout(natsConnection *nc, int64_t timeout);
+
+static bool
+_processAuthError(natsConnection *nc, int errCode, char *error);
+
+static int
+_checkAuthError(char *error);
+
+/*
+ * ----------------------------------------
+ */
+
+struct threadsToJoin
+{
+    natsThread  *readLoop;
+    natsThread  *flusher;
+    natsThread  *reconnect;
+    bool        joinReconnect;
+
+} threadsToJoin;
+
+static void
+_initThreadsToJoin(struct threadsToJoin *ttj, natsConnection *nc, bool joinReconnect)
+{
+    memset(ttj, 0, sizeof(threadsToJoin));
+
+    ttj->joinReconnect = joinReconnect;
+
+    if (nc->readLoopThread != NULL)
+    {
+        ttj->readLoop = nc->readLoopThread;
+        nc->readLoopThread = NULL;
+    }
+
+    if (joinReconnect && (nc->reconnectThread != NULL))
+    {
+        ttj->reconnect = nc->reconnectThread;
+        nc->reconnectThread = NULL;
+    }
+
+    if (nc->flusherThread != NULL)
+    {
+        nc->flusherStop = true;
+        natsCondition_Signal(nc->flusherCond);
+
+        ttj->flusher = nc->flusherThread;
+        nc->flusherThread = NULL;
+    }
+}
+
+static void
+_joinThreads(struct threadsToJoin *ttj)
+{
+    if (ttj->readLoop != NULL)
+    {
+        natsThread_Join(ttj->readLoop);
+        natsThread_Destroy(ttj->readLoop);
+    }
+
+    if (ttj->joinReconnect && (ttj->reconnect != NULL))
+    {
+        natsThread_Join(ttj->reconnect);
+        natsThread_Destroy(ttj->reconnect);
+    }
+
+    if (ttj->flusher != NULL)
+    {
+        natsThread_Join(ttj->flusher);
+        natsThread_Destroy(ttj->flusher);
+    }
+}
+
+static void
+_clearServerInfo(natsServerInfo *si)
+{
+    int i;
+
+    NATS_FREE(si->id);
+    NATS_FREE(si->host);
+    NATS_FREE(si->version);
+
+    for (i=0; i<si->connectURLsCount; i++)
+        NATS_FREE(si->connectURLs[i]);
+    NATS_FREE(si->connectURLs);
+
+    NATS_FREE(si->nonce);
+    NATS_FREE(si->clientIP);
+
+    memset(si, 0, sizeof(natsServerInfo));
+}
+
+static void
+_freeConn(natsConnection *nc)
+{
+    if (nc == NULL)
+        return;
+
+    natsTimer_Destroy(nc->ptmr);
+    natsBuf_Destroy(nc->pending);
+    natsBuf_Destroy(nc->scratch);
+    natsBuf_Destroy(nc->bw);
+    natsSrvPool_Destroy(nc->srvPool);
+    _clearServerInfo(&(nc->info));
+    natsCondition_Destroy(nc->flusherCond);
+    natsCondition_Destroy(nc->pongs.cond);
+    natsParser_Destroy(nc->ps);
+    natsThread_Destroy(nc->readLoopThread);
+    natsThread_Destroy(nc->flusherThread);
+    natsHash_Destroy(nc->subs);
+    natsOptions_Destroy(nc->opts);
+    if (nc->sockCtx.ssl != NULL)
+        SSL_free(nc->sockCtx.ssl);
+    NATS_FREE(nc->el.buffer);
+    natsConn_destroyRespPool(nc);
+    natsInbox_Destroy(nc->respSub);
+    natsStrHash_Destroy(nc->respMap);
+    natsCondition_Destroy(nc->reconnectCond);
+    natsMutex_Destroy(nc->subsMu);
+    natsMutex_Destroy(nc->mu);
+
+    NATS_FREE(nc);
+
+    natsLib_Release();
+}
+
+void
+natsConn_retain(natsConnection *nc)
+{
+    if (nc == NULL)
+        return;
+
+    natsConn_Lock(nc);
+
+    nc->refs++;
+
+    natsConn_Unlock(nc);
+}
+
+void
+natsConn_release(natsConnection *nc)
+{
+    int refs = 0;
+
+    if (nc == NULL)
+        return;
+
+    natsConn_Lock(nc);
+
+    refs = --(nc->refs);
+
+    natsConn_Unlock(nc);
+
+    if (refs == 0)
+        _freeConn(nc);
+}
+
+void
+natsConn_lockAndRetain(natsConnection *nc)
+{
+    natsConn_Lock(nc);
+    nc->refs++;
+}
+
+void
+natsConn_unlockAndRelease(natsConnection *nc)
+{
+    int refs = 0;
+
+    refs = --(nc->refs);
+
+    natsConn_Unlock(nc);
+
+    if (refs == 0)
+        _freeConn(nc);
+}
+
+natsStatus
+natsConn_bufferFlush(natsConnection *nc)
+{
+    natsStatus  s      = NATS_OK;
+    int         bufLen = natsBuf_Len(nc->bw);
+
+    if (bufLen == 0)
+        return NATS_OK;
+
+    if (nc->usePending)
+    {
+        s = natsBuf_Append(nc->pending, natsBuf_Data(nc->bw), bufLen);
+    }
+    else if (nc->sockCtx.useEventLoop)
+    {
+        if (!(nc->el.writeAdded))
+        {
+            nc->el.writeAdded = true;
+            s = nc->opts->evCbs.write(nc->el.data, NATS_EVENT_ACTION_ADD);
+            if (s != NATS_OK)
+                nats_setError(s, "Error processing write request: %d - %s",
+                              s, natsStatus_GetText(s));
+        }
+
+        return NATS_UPDATE_ERR_STACK(s);
+    }
+    else
+    {
+        s = natsSock_WriteFully(&(nc->sockCtx), natsBuf_Data(nc->bw), bufLen);
+    }
+
+    natsBuf_Reset(nc->bw);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsConn_bufferWrite(natsConnection *nc, const char *buffer, int len)
+{
+    natsStatus  s = NATS_OK;
+    int         offset = 0;
+    int         avail  = 0;
+
+    if (len <= 0)
+        return NATS_OK;
+
+    if (nc->usePending)
+        return natsBuf_Append(nc->pending, buffer, len);
+
+    if (nc->sockCtx.useEventLoop)
+    {
+        s = natsBuf_Append(nc->bw, buffer, len);
+        if ((s == NATS_OK)
+            && (natsBuf_Len(nc->bw) >= nc->opts->ioBufSize)
+            && !(nc->el.writeAdded))
+        {
+            nc->el.writeAdded = true;
+            s = nc->opts->evCbs.write(nc->el.data, NATS_EVENT_ACTION_ADD);
+            if (s != NATS_OK)
+                nats_setError(s, "Error processing write request: %d - %s",
+                              s, natsStatus_GetText(s));
+        }
+
+        return NATS_UPDATE_ERR_STACK(s);
+    }
+
+    if (nc->dontSendInPlace)
+    {
+        s = natsBuf_Append(nc->bw, buffer, len);
+
+        return NATS_UPDATE_ERR_STACK(s);
+    }
+
+    // If we have more data that can fit..
+    while ((s == NATS_OK) && (len > natsBuf_Available(nc->bw)))
+    {
+        // If there is nothing in the buffer...
+        if (natsBuf_Len(nc->bw) == 0)
+        {
+            // Do a single socket write to avoid a copy
+            s = natsSock_WriteFully(&(nc->sockCtx), buffer + offset, len);
+
+            // We are done
+            return NATS_UPDATE_ERR_STACK(s);
+        }
+
+        // We already have data in the buffer, check how many more bytes
+        // can we fit
+        avail = natsBuf_Available(nc->bw);
+
+        // Append that much bytes
+        s = natsBuf_Append(nc->bw, buffer + offset, avail);
+
+        // Flush the buffer
+        if (s == NATS_OK)
+            s = natsConn_bufferFlush(nc);
+
+        // If success, then decrement what's left to send and update the
+        // offset.
+        if (s == NATS_OK)
+        {
+            len    -= avail;
+            offset += avail;
+        }
+    }
+
+    // If there is data left, the buffer can now hold this data.
+    if ((s == NATS_OK) && (len > 0))
+        s = natsBuf_Append(nc->bw, buffer + offset, len);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsConn_bufferWriteString(natsConnection *nc, const char *string)
+{
+    natsStatus s = natsConn_bufferWrite(nc, string, (int) strlen(string));
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+// _createConn will connect to the server and do the right thing when an
+// existing connection is in place.
+static natsStatus
+_createConn(natsConnection *nc)
+{
+    natsStatus  s = NATS_OK;
+
+    // Sets a deadline for the connect process (not just the low level
+    // tcp connect. The deadline will be removed when we have received
+    // the PONG to our initial PING. See _processConnInit().
+    natsSock_InitDeadline(&nc->sockCtx, nc->opts->timeout);
+
+    // Set the IP resolution order
+    nc->sockCtx.orderIP = nc->opts->orderIP;
+
+    // Set ctx.noRandomize based on public NoRandomize option.
+    nc->sockCtx.noRandomize = nc->opts->noRandomize;
+
+    s = natsSock_ConnectTcp(&(nc->sockCtx), nc->cur->url->host, nc->cur->url->port);
+    if (s == NATS_OK)
+        nc->sockCtx.fdActive = true;
+
+    // Need to create or reset the buffer even on failure in case we allow
+    // retry on failed connect
+    if ((s == NATS_OK) || nc->opts->retryOnFailedConnect)
+    {
+        natsStatus ls = NATS_OK;
+
+        if (nc->bw == NULL)
+            ls = natsBuf_Create(&(nc->bw), nc->opts->ioBufSize);
+        else
+            natsBuf_Reset(nc->bw);
+
+        if (s == NATS_OK)
+            s = ls;
+    }
+
+    if (s != NATS_OK)
+    {
+        // reset the deadline
+        natsSock_ClearDeadline(&nc->sockCtx);
+    }
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static void
+_clearControlContent(natsControl *control)
+{
+    NATS_FREE(control->op);
+    NATS_FREE(control->args);
+}
+
+static void
+_initControlContent(natsControl *control)
+{
+    control->op     = NULL;
+    control->args   = NULL;
+}
+
+static bool
+_isConnecting(natsConnection *nc)
+{
+    return nc->status == NATS_CONN_STATUS_CONNECTING;
+}
+
+static bool
+_isConnected(natsConnection *nc)
+{
+    return ((nc->status == NATS_CONN_STATUS_CONNECTED) || natsConn_isDraining(nc));
+}
+
+bool
+natsConn_isClosed(natsConnection *nc)
+{
+    return nc->status == NATS_CONN_STATUS_CLOSED;
+}
+
+bool
+natsConn_isReconnecting(natsConnection *nc)
+{
+    return (nc->pending != NULL);
+}
+
+bool
+natsConn_isDraining(natsConnection *nc)
+{
+    return ((nc->status == NATS_CONN_STATUS_DRAINING_SUBS) || (nc->status == NATS_CONN_STATUS_DRAINING_PUBS));
+}
+
+bool
+natsConn_isDrainingPubs(natsConnection *nc)
+{
+    return nc->status == NATS_CONN_STATUS_DRAINING_PUBS;
+}
+
+static natsStatus
+_readOp(natsConnection *nc, natsControl *control)
+{
+    natsStatus  s = NATS_OK;
+    char        buffer[MAX_INFO_MESSAGE_SIZE];
+
+    buffer[0] = '\0';
+
+    s = natsSock_ReadLine(&(nc->sockCtx), buffer, sizeof(buffer));
+    if (s == NATS_OK)
+        s = nats_ParseControl(control, buffer);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static void
+_unpackSrvVersion(natsConnection *nc)
+{
+    nc->srvVersion.ma  = 0;
+    nc->srvVersion.mi = 0;
+    nc->srvVersion.up  = 0;
+
+    if (nats_IsStringEmpty(nc->info.version))
+        return;
+
+    sscanf(nc->info.version, "%d.%d.%d", &(nc->srvVersion.ma), &(nc->srvVersion.mi), &(nc->srvVersion.up));
+}
+
+bool
+natsConn_srvVersionAtLeast(natsConnection *nc, int major, int minor, int update)
+{
+    bool ok;
+    natsConn_Lock(nc);
+    ok = (((nc->srvVersion.ma > major)
+            || ((nc->srvVersion.ma == major) && (nc->srvVersion.mi > minor))
+            || ((nc->srvVersion.ma == major) && (nc->srvVersion.mi == minor) && (nc->srvVersion.up >= update))) ? true : false);
+    natsConn_Unlock(nc);
+    return ok;
+}
+
+// _processInfo is used to parse the info messages sent
+// from the server.
+// This function may update the server pool.
+static natsStatus
+_processInfo(natsConnection *nc, char *info, int len)
+{
+    natsStatus  s     = NATS_OK;
+    nats_JSON   *json = NULL;
+
+    if (info == NULL)
+        return NATS_OK;
+
+    _clearServerInfo(&(nc->info));
+
+    s = nats_JSONParse(&json, info, len);
+    if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    IFOK(s, nats_JSONGetStr(json, "server_id", &(nc->info.id)));
+    IFOK(s, nats_JSONGetStr(json, "version", &(nc->info.version)));
+    IFOK(s, nats_JSONGetStr(json, "host", &(nc->info.host)));
+    IFOK(s, nats_JSONGetInt(json, "port", &(nc->info.port)));
+    IFOK(s, nats_JSONGetBool(json, "auth_required", &(nc->info.authRequired)));
+    IFOK(s, nats_JSONGetBool(json, "tls_required", &(nc->info.tlsRequired)));
+    IFOK(s, nats_JSONGetLong(json, "max_payload", &(nc->info.maxPayload)));
+    IFOK(s, nats_JSONGetArrayStr(json, "connect_urls",
+                                 &(nc->info.connectURLs),
+                                 &(nc->info.connectURLsCount)));
+    IFOK(s, nats_JSONGetInt(json, "proto", &(nc->info.proto)));
+    IFOK(s, nats_JSONGetULong(json, "client_id", &(nc->info.CID)));
+    IFOK(s, nats_JSONGetStr(json, "nonce", &(nc->info.nonce)));
+    IFOK(s, nats_JSONGetStr(json, "client_ip", &(nc->info.clientIP)));
+    IFOK(s, nats_JSONGetBool(json, "ldm", &(nc->info.lameDuckMode)));
+    IFOK(s, nats_JSONGetBool(json, "headers", &(nc->info.headers)));
+
+    if (s == NATS_OK)
+        _unpackSrvVersion(nc);
+
+    // The array could be empty/not present on initial connect,
+    // if advertise is disabled on that server, or servers that
+    // did not include themselves in the async INFO protocol.
+    // If empty, do not remove the implicit servers from the pool.
+    if ((s == NATS_OK) && !nc->opts->ignoreDiscoveredServers && (nc->info.connectURLsCount > 0))
+    {
+        bool        added    = false;
+        const char  *tlsName = NULL;
+
+        if ((nc->cur != NULL) && (nc->cur->url != NULL) && !nats_HostIsIP(nc->cur->url->host))
+            tlsName = (const char*) nc->cur->url->host;
+
+        s = natsSrvPool_addNewURLs(nc->srvPool,
+                                   nc->cur->url,
+                                   nc->info.connectURLs,
+                                   nc->info.connectURLsCount,
+                                   tlsName,
+                                   &added);
+        if ((s == NATS_OK) && added && !nc->initc && (nc->opts->discoveredServersCb != NULL))
+            natsAsyncCb_PostConnHandler(nc, ASYNC_DISCOVERED_SERVERS);
+    }
+    // Process the LDM callback after the above. It will cover cases where
+    // we have connect URLs and invoke discovered server callback, and case
+    // where we don't.
+    if ((s == NATS_OK) && nc->info.lameDuckMode && (nc->opts->lameDuckCb != NULL))
+        natsAsyncCb_PostConnHandler(nc, ASYNC_LAME_DUCK_MODE);
+
+    if (s != NATS_OK)
+        s = nats_setError(NATS_PROTOCOL_ERROR,
+                          "Invalid protocol: %s", nats_GetLastError(NULL));
+
+    nats_JSONDestroy(json);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+// natsConn_processAsyncINFO does the same than processInfo, but is called
+// from the parser. Calls processInfo under connection's lock
+// protection.
+void
+natsConn_processAsyncINFO(natsConnection *nc, char *buf, int len)
+{
+    natsConn_Lock(nc);
+    // Ignore errors, we will simply not update the server pool...
+    (void) _processInfo(nc, buf, len);
+    natsConn_Unlock(nc);
+}
+
+#if defined(NATS_HAS_TLS)
+static int
+_collectSSLErr(int preverifyOk, X509_STORE_CTX* ctx)
+{
+    SSL             *ssl  = NULL;
+    X509            *cert = X509_STORE_CTX_get_current_cert(ctx);
+    int             depth = X509_STORE_CTX_get_error_depth(ctx);
+    int             err   = X509_STORE_CTX_get_error(ctx);
+    natsConnection  *nc   = NULL;
+
+    // Retrieve the SSL object, then our connection...
+    ssl = X509_STORE_CTX_get_ex_data(ctx, SSL_get_ex_data_X509_STORE_CTX_idx());
+    nc = (natsConnection*) SSL_get_ex_data(ssl, 0);
+
+    // Should we skip serve certificate verification?
+    if (nc->opts->sslCtx->skipVerify)
+        return 1;
+
+    if (!preverifyOk)
+    {
+        char certName[256]= {0};
+
+        X509_NAME_oneline(X509_get_subject_name(cert), certName, sizeof(certName));
+
+        if (err == X509_V_ERR_HOSTNAME_MISMATCH)
+        {
+            snprintf_truncate(nc->errStr, sizeof(nc->errStr), "%d:%s:expected=%s:cert=%s",
+                              err, X509_verify_cert_error_string(err), nc->tlsName,
+                              certName);
+        }
+        else
+        {
+            char issuer[256]  = {0};
+
+            X509_NAME_oneline(X509_get_issuer_name(cert), issuer, sizeof(issuer));
+
+            snprintf_truncate(nc->errStr, sizeof(nc->errStr), "%d:%s:depth=%d:cert=%s:issuer=%s",
+                              err, X509_verify_cert_error_string(err), depth,
+                              certName, issuer);
+        }
+    }
+
+    return preverifyOk;
+}
+#endif
+
+// makeTLSConn will wrap an existing Conn using TLS
+static natsStatus
+_makeTLSConn(natsConnection *nc)
+{
+#if defined(NATS_HAS_TLS)
+    natsStatus  s       = NATS_OK;
+    SSL         *ssl    = NULL;
+
+    // Reset nc->errStr before initiating the handshake...
+    nc->errStr[0] = '\0';
+
+    natsMutex_Lock(nc->opts->sslCtx->lock);
+
+    s = natsSock_SetBlocking(nc->sockCtx.fd, true);
+    if (s == NATS_OK)
+    {
+        ssl = SSL_new(nc->opts->sslCtx->ctx);
+        if (ssl == NULL)
+        {
+            s = nats_setError(NATS_SSL_ERROR,
+                              "Error creating SSL object: %s",
+                              NATS_SSL_ERR_REASON_STRING);
+        }
+        else
+        {
+            nats_sslRegisterThreadForCleanup();
+
+            SSL_set_ex_data(ssl, 0, (void*) nc);
+        }
+    }
+    if (s == NATS_OK)
+    {
+        SSL_set_connect_state(ssl);
+
+        if (SSL_set_fd(ssl, (int) nc->sockCtx.fd) != 1)
+        {
+            s = nats_setError(NATS_SSL_ERROR,
+                              "Error connecting the SSL object to a file descriptor : %s",
+                              NATS_SSL_ERR_REASON_STRING);
+        }
+    }
+    if (s == NATS_OK)
+    {
+        if (nc->opts->sslCtx->skipVerify)
+        {
+            SSL_set_verify(ssl, SSL_VERIFY_NONE, NULL);
+        }
+        else
+        {
+            nc->tlsName = NULL;
+
+            // If we don't force hostname verification, perform it only
+            // if expectedHostname is set (to be backward compatible with
+            // releases prior to 2.0.0)
+            if (nc->opts->sslCtx->expectedHostname != NULL)
+                nc->tlsName = nc->opts->sslCtx->expectedHostname;
+#if defined(NATS_FORCE_HOST_VERIFICATION)
+            else if (nc->cur->tlsName != NULL)
+                nc->tlsName = nc->cur->tlsName;
+            else
+                nc->tlsName = nc->cur->url->host;
+#endif
+            if (nc->tlsName != NULL)
+            {
+#if defined(NATS_USE_OPENSSL_1_1)
+                SSL_set_hostflags(ssl, X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS);
+                if (!SSL_set1_host(ssl, nc->tlsName))
+#else
+                X509_VERIFY_PARAM *param = SSL_get0_param(ssl);
+                X509_VERIFY_PARAM_set_hostflags(param, X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS);
+                if (!X509_VERIFY_PARAM_set1_host(param, nc->tlsName, 0))
+#endif
+                    s = nats_setError(NATS_SSL_ERROR, "unable to set expected hostname '%s'", nc->tlsName);
+            }
+            if (s == NATS_OK)
+                SSL_set_verify(ssl, SSL_VERIFY_PEER, _collectSSLErr);
+        }
+    }
+    if ((s == NATS_OK) && (SSL_do_handshake(ssl) != 1))
+    {
+        s = nats_setError(NATS_SSL_ERROR,
+                          "SSL handshake error: %s",
+                          (nc->errStr[0] != '\0' ? nc->errStr : NATS_SSL_ERR_REASON_STRING));
+    }
+    // Make sure that if nc-errStr was set in _collectSSLErr but
+    // the overall handshake is ok, then we clear the error
+    if (s == NATS_OK)
+    {
+        nc->errStr[0] = '\0';
+        s = natsSock_SetBlocking(nc->sockCtx.fd, false);
+    }
+
+    natsMutex_Unlock(nc->opts->sslCtx->lock);
+
+    if (s != NATS_OK)
+    {
+        if (ssl != NULL)
+            SSL_free(ssl);
+    }
+    else
+    {
+        nc->sockCtx.ssl = ssl;
+    }
+
+    return NATS_UPDATE_ERR_STACK(s);
+#else
+    return nats_setError(NATS_ILLEGAL_STATE, "%s", NO_SSL_ERR);
+#endif
+}
+
+// This will check to see if the connection should be
+// secure. This can be dictated from either end and should
+// only be called after the INIT protocol has been received.
+static natsStatus
+_checkForSecure(natsConnection *nc)
+{
+    natsStatus  s = NATS_OK;
+
+    // Check for mismatch in setups
+    if (nc->opts->secure && !nc->info.tlsRequired)
+        s = nats_setDefaultError(NATS_SECURE_CONNECTION_WANTED);
+    else if (nc->info.tlsRequired && !nc->opts->secure)
+    {
+        // Switch to Secure since server needs TLS.
+        s = natsOptions_SetSecure(nc->opts, true);
+    }
+
+    if ((s == NATS_OK) && nc->opts->secure)
+        s = _makeTLSConn(nc);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_processExpectedInfo(natsConnection *nc)
+{
+    natsControl     control;
+    natsStatus      s;
+
+    _initControlContent(&control);
+
+    s = _readOp(nc, &control);
+    if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    if ((s == NATS_OK)
+        && ((control.op == NULL)
+            || (strcmp(control.op, _INFO_OP_) != 0)))
+    {
+        s = nats_setError(NATS_PROTOCOL_ERROR,
+                          "Unexpected protocol: got '%s' instead of '%s'",
+                          (control.op == NULL ? "<null>" : control.op),
+                          _INFO_OP_);
+    }
+    if (s == NATS_OK)
+        s = _processInfo(nc, control.args, -1);
+    if (s == NATS_OK)
+        s = _checkForSecure(nc);
+
+    _clearControlContent(&control);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static char*
+_escape(char *origin)
+{
+    char    escChar[] = {'\a', '\b', '\f', '\n', '\r', '\t', '\v', '\\'};
+    char    escRepl[] = {'a', 'b', 'f', 'n', 'r', 't', 'v', '\\'};
+    int     l         = (int) strlen(origin);
+    int     ec        = 0;
+    char    *dest     = NULL;
+    char    *ptr      = NULL;
+    int i;
+    int j;
+
+    for (i=0; i<l; i++)
+    {
+        for (j=0; j<8; j++)
+        {
+            if (origin[i] == escChar[j])
+            {
+                ec++;
+                break;
+            }
+        }
+    }
+    if (ec == 0)
+        return origin;
+
+    dest = NATS_MALLOC(l + ec + 1);
+    if (dest == NULL)
+        return NULL;
+
+    ptr = dest;
+    for (i=0; i<l; i++)
+    {
+        for (j=0; j<8 ;j++)
+        {
+            if (origin[i] == escChar[j])
+            {
+                *ptr++ = '\\';
+                *ptr++ = escRepl[j];
+                 break;
+            }
+        }
+        if(j == 8 )
+            *ptr++ = origin[i];
+    }
+    *ptr = '\0';
+    return dest;
+}
+
+static natsStatus
+_connectProto(natsConnection *nc, char **proto)
+{
+    natsStatus  s     = NATS_OK;
+    natsOptions *opts = nc->opts;
+    const char  *token= NULL;
+    const char  *user = NULL;
+    const char  *pwd  = NULL;
+    const char  *name = NULL;
+    char        *sig  = NULL;
+    char        *ujwt = NULL;
+    char        *nkey = NULL;
+    int         res;
+    unsigned char   *sigRaw    = NULL;
+    int             sigRawLen  = 0;
+
+    // Check if NoEcho is set and we have a server that supports it.
+    if (opts->noEcho && (nc->info.proto < 1))
+        return NATS_NO_SERVER_SUPPORT;
+
+    if (nc->cur->url->username != NULL)
+        user = nc->cur->url->username;
+    if (nc->cur->url->password != NULL)
+        pwd = nc->cur->url->password;
+    if ((user != NULL) && (pwd == NULL))
+    {
+        token = user;
+        user  = NULL;
+    }
+    if ((user == NULL) && (token == NULL))
+    {
+        // Take from options (possibly all NULL)
+        user  = opts->user;
+        pwd   = opts->password;
+        token = opts->token;
+        nkey  = opts->nkey;
+
+        // Options take precedence for an implicit URL. If above is still
+        // empty, we will check if we have saved a user from an explicit
+        // URL in the server pool.
+        if (nats_IsStringEmpty(user)
+            && nats_IsStringEmpty(token)
+            && (nc->srvPool->user != NULL))
+        {
+            user = nc->srvPool->user;
+            pwd  = nc->srvPool->pwd;
+            // Again, if there is no password, assume username is token.
+            if (pwd == NULL)
+            {
+                token = user;
+                user = NULL;
+            }
+        }
+    }
+
+    if (opts->userJWTHandler != NULL)
+    {
+        char *errTxt = NULL;
+        bool userCb  = opts->userJWTHandler != natsConn_userFromFile;
+
+        // If callback is not the internal one, we need to release connection lock.
+        if (userCb)
+            natsConn_Unlock(nc);
+
+        s = opts->userJWTHandler(&ujwt, &errTxt, (void*) opts->userJWTClosure);
+
+        if (userCb)
+        {
+            natsConn_Lock(nc);
+            if (natsConn_isClosed(nc) && (s == NATS_OK))
+                s = NATS_CONNECTION_CLOSED;
+        }
+        if ((s != NATS_OK) && (errTxt != NULL))
+        {
+            s = nats_setError(s, "%s", errTxt);
+            NATS_FREE(errTxt);
+        }
+        if ((s == NATS_OK) && !nats_IsStringEmpty(nkey))
+            s = nats_setError(NATS_ILLEGAL_STATE, "%s", "user JWT callback and NKey cannot be both specified");
+
+        if ((s == NATS_OK) && (ujwt != NULL))
+        {
+            char *tmp = _escape(ujwt);
+            if (tmp == NULL)
+            {
+                s = nats_setDefaultError(NATS_NO_MEMORY);
+            }
+            else if (tmp != ujwt)
+            {
+                NATS_FREE(ujwt);
+                ujwt = tmp;
+            }
+        }
+    }
+
+    if ((s == NATS_OK) && (!nats_IsStringEmpty(ujwt) || !nats_IsStringEmpty(nkey)))
+    {
+        char *errTxt = NULL;
+        bool userCb  = opts->sigHandler != natsConn_signatureHandler;
+
+        if (userCb)
+            natsConn_Unlock(nc);
+
+        s = opts->sigHandler(&errTxt, &sigRaw, &sigRawLen, nc->info.nonce, opts->sigClosure);
+
+        if (userCb)
+        {
+            natsConn_Lock(nc);
+            if (natsConn_isClosed(nc) && (s == NATS_OK))
+                s = NATS_CONNECTION_CLOSED;
+        }
+        if ((s != NATS_OK) && (errTxt != NULL))
+        {
+            s = nats_setError(s, "%s", errTxt);
+            NATS_FREE(errTxt);
+        }
+        if (s == NATS_OK)
+            s = nats_Base64RawURL_EncodeString((const unsigned char*) sigRaw, sigRawLen, &sig);
+    }
+
+    if ((s == NATS_OK) && (opts->tokenCb != NULL))
+    {
+        if (token != NULL)
+            s = nats_setError(NATS_ILLEGAL_STATE, "%s", "Token and token handler options cannot be both set");
+
+        if (s == NATS_OK)
+            token = opts->tokenCb(opts->tokenCbClosure);
+    }
+
+    if ((s == NATS_OK) && (opts->name != NULL))
+        name = opts->name;
+
+    if (s == NATS_OK)
+    {
+        // If our server does not support headers then we can't do them or no responders.
+        const char *hdrs = nats_GetBoolStr(nc->info.headers);
+        const char *noResponders = nats_GetBoolStr(nc->info.headers && !nc->opts->disableNoResponders);
+
+        res = nats_asprintf(proto,
+                            "CONNECT {\"verbose\":%s,\"pedantic\":%s,%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\"tls_required\":%s," \
+                            "\"name\":\"%s\",\"lang\":\"%s\",\"version\":\"%s\",\"protocol\":%d,\"echo\":%s," \
+                            "\"headers\":%s,\"no_responders\":%s}%s",
+                            nats_GetBoolStr(opts->verbose),
+                            nats_GetBoolStr(opts->pedantic),
+                            (nkey != NULL ? "\"nkey\":\"" : ""),
+                            (nkey != NULL ? nkey : ""),
+                            (nkey != NULL ? "\"," : ""),
+                            (ujwt != NULL ? "\"jwt\":\"" : ""),
+                            (ujwt != NULL ? ujwt : ""),
+                            (ujwt != NULL ? "\"," : ""),
+                            (sig != NULL ? "\"sig\":\"" : ""),
+                            (sig != NULL ? sig : ""),
+                            (sig != NULL ? "\"," : ""),
+                            (user != NULL ? "\"user\":\"" : ""),
+                            (user != NULL ? user : ""),
+                            (user != NULL ? "\"," : ""),
+                            (pwd != NULL ? "\"pass\":\"" : ""),
+                            (pwd != NULL ? pwd : ""),
+                            (pwd != NULL ? "\"," : ""),
+                            (token != NULL ? "\"auth_token\":\"" :""),
+                            (token != NULL ? token : ""),
+                            (token != NULL ? "\"," : ""),
+                            nats_GetBoolStr(opts->secure),
+                            (name != NULL ? name : ""),
+                            CString, NATS_VERSION_STRING,
+                            CLIENT_PROTO_INFO,
+                            nats_GetBoolStr(!opts->noEcho),
+                            hdrs,
+                            noResponders,
+                            _CRLF_);
+        if (res < 0)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+    }
+
+    NATS_FREE(ujwt);
+    NATS_FREE(sigRaw);
+    NATS_FREE(sig);
+
+    return s;
+}
+
+natsStatus
+natsConn_sendUnsubProto(natsConnection *nc, int64_t subId, int max)
+{
+    natsStatus  s       = NATS_OK;
+    char        *proto  = NULL;
+    int         res     = 0;
+
+    if (max > 0)
+        res = nats_asprintf(&proto, _UNSUB_PROTO_, subId, max);
+    else
+        res = nats_asprintf(&proto, _UNSUB_NO_MAX_PROTO_, subId);
+
+    if (res < 0)
+        s = nats_setDefaultError(NATS_NO_MEMORY);
+    else
+    {
+        s = natsConn_bufferWriteString(nc, proto);
+        NATS_FREE(proto);
+    }
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsConn_sendSubProto(natsConnection *nc, const char *subject, const char *queue, int64_t sid)
+{
+    natsStatus  s       = NATS_OK;
+    char        *proto  = NULL;
+    int         res     = 0;
+
+    res = nats_asprintf(&proto, _SUB_PROTO_, subject, (queue == NULL ? "" : queue), sid);
+    if (res < 0)
+        s = nats_setDefaultError(NATS_NO_MEMORY);
+    else
+    {
+        s = natsConn_bufferWriteString(nc, proto);
+        NATS_FREE(proto);
+        proto = NULL;
+    }
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_resendSubscriptions(natsConnection *nc)
+{
+    natsStatus          s    = NATS_OK;
+    natsSubscription    *sub = NULL;
+    natsHashIter        iter;
+    int                 adjustedMax;
+    natsSubscription    **subs = NULL;
+    int                 i = 0;
+    int                 count = 0;
+
+    // Since we are going to send protocols to the server, we don't want to
+    // be holding the subsMu lock (which is used in processMsg). So copy
+    // the subscriptions in a temporary array.
+    natsMutex_Lock(nc->subsMu);
+    if (natsHash_Count(nc->subs) > 0)
+    {
+        subs = NATS_CALLOC(natsHash_Count(nc->subs), sizeof(natsSubscription*));
+        if (subs == NULL)
+            s = NATS_NO_MEMORY;
+
+        if (s == NATS_OK)
+        {
+            void *p = NULL;
+
+            natsHashIter_Init(&iter, nc->subs);
+            while (natsHashIter_Next(&iter, NULL, &p))
+            {
+                subs[count++] = (natsSubscription*) p;
+            }
+            natsHashIter_Done(&iter);
+        }
+    }
+    natsMutex_Unlock(nc->subsMu);
+
+    SET_WRITE_DEADLINE(nc);
+
+    for (i=0; (s == NATS_OK) && (i<count); i++)
+    {
+        sub = subs[i];
+
+        adjustedMax = 0;
+        natsSub_Lock(sub);
+        // If JS ordered consumer, trigger a reset. Don't check the error
+        // condition here. If there is a failure, it will be retried
+        // at the next HB interval.
+        if ((sub->jsi != NULL) && (sub->jsi->ordered))
+        {
+            jsSub_resetOrderedConsumer(sub, sub->jsi->sseq+1);
+            natsSub_Unlock(sub);
+            continue;
+        }
+        if (natsSub_drainStarted(sub))
+        {
+            natsSub_Unlock(sub);
+            continue;
+        }
+        if (sub->max > 0)
+        {
+            if (sub->delivered < sub->max)
+                adjustedMax = (int)(sub->max - sub->delivered);
+
+            // The adjusted max could be 0 here if the number of delivered
+            // messages have reached the max, if so, unsubscribe.
+            if (adjustedMax == 0)
+            {
+                natsSub_Unlock(sub);
+                s = natsConn_sendUnsubProto(nc, sub->sid, 0);
+                continue;
+            }
+        }
+
+        s = natsConn_sendSubProto(nc, sub->subject, sub->queue, sub->sid);
+        if ((s == NATS_OK) && (adjustedMax > 0))
+            s = natsConn_sendUnsubProto(nc, sub->sid, adjustedMax);
+
+        // Hold the lock up to that point so we are sure not to resend
+        // any SUB/UNSUB for a subscription that is in draining mode.
+        natsSub_Unlock(sub);
+    }
+
+    NATS_FREE(subs);
+
+    return s;
+}
+
+static natsStatus
+_flushReconnectPendingItems(natsConnection *nc)
+{
+    natsStatus s = NATS_OK;
+
+    if (nc->pending == NULL)
+        return NATS_OK;
+
+    if (natsBuf_Len(nc->pending) > 0)
+    {
+        // Flush pending buffer
+        s = natsConn_bufferWrite(nc, natsBuf_Data(nc->pending),
+                                 natsBuf_Len(nc->pending));
+
+        // Regardless of outcome, we must clear the pending buffer
+        // here to avoid duplicates (if the flush were to fail
+        // with some messages/partial messages being sent).
+        natsBuf_Reset(nc->pending);
+    }
+
+    return s;
+}
+
+static void
+_removePongFromList(natsConnection *nc, natsPong *pong)
+{
+    if (pong->prev != NULL)
+        pong->prev->next = pong->next;
+
+    if (pong->next != NULL)
+        pong->next->prev = pong->prev;
+
+    if (nc->pongs.head == pong)
+        nc->pongs.head = pong->next;
+
+    if (nc->pongs.tail == pong)
+        nc->pongs.tail = pong->prev;
+
+    pong->prev = pong->next = NULL;
+}
+
+// When the connection is closed, or is disconnected and we are about
+// to reconnect, we need to unblock all pending natsConnection_Flush[Timeout]()
+// calls: there is no chance that a PING sent to a server is going to be
+// echoed by the new server.
+static void
+_clearPendingFlushRequests(natsConnection *nc)
+{
+    natsPong *pong = NULL;
+
+    while ((pong = nc->pongs.head) != NULL)
+    {
+        // Pop from the queue
+        _removePongFromList(nc, pong);
+
+        // natsConnection_Flush[Timeout]() is waiting on a condition
+        // variable and exit when this value is != 0. "Flush" will
+        // return an error to the caller if the connection status
+        // is not CONNECTED at that time.
+        pong->id = -1;
+
+        // There may be more than one user-thread making
+        // natsConnection_Flush() calls.
+        natsCondition_Broadcast(nc->pongs.cond);
+    }
+
+    nc->pongs.incoming      = 0;
+    nc->pongs.outgoingPings = 0;
+}
+
+// Dispose of the respInfo object.
+// The boolean `needsLock` indicates if connection lock is required or not.
+void
+natsConn_disposeRespInfo(natsConnection *nc, respInfo *resp, bool needsLock)
+{
+    if (resp == NULL)
+        return;
+
+    // Destroy the message if present in the respInfo object. If it has
+    // been returned to the RequestX() calls, resp->msg will be NULL here.
+    if (resp->msg != NULL)
+    {
+        natsMsg_Destroy(resp->msg);
+        resp->msg = NULL;
+    }
+    if (!resp->pooled)
+    {
+        natsCondition_Destroy(resp->cond);
+        natsMutex_Destroy(resp->mu);
+        NATS_FREE(resp);
+    }
+    else
+    {
+        if (needsLock)
+            natsConn_Lock(nc);
+
+        resp->closed = false;
+        resp->closedSts = NATS_OK;
+        resp->removed = false;
+        nc->respPool[nc->respPoolIdx++] = resp;
+
+        if (needsLock)
+            natsConn_Unlock(nc);
+    }
+}
+
+// Destroy the pool of respInfo objects.
+void
+natsConn_destroyRespPool(natsConnection *nc)
+{
+    int      i;
+    respInfo *info;
+
+    for (i=0; i<nc->respPoolSize; i++)
+    {
+        info = nc->respPool[i];
+        info->pooled = false;
+        natsConn_disposeRespInfo(nc, info, false);
+    }
+    NATS_FREE(nc->respPool);
+}
+
+// Creates a new respInfo object, binds it to the request's specific
+// subject (that is set in respInbox). The respInfo object is returned.
+// Connection's lock is held on entry.
+natsStatus
+natsConn_addRespInfo(respInfo **newResp, natsConnection *nc, char *respInbox, int respInboxSize)
+{
+    respInfo    *resp  = NULL;
+    natsStatus  s      = NATS_OK;
+
+    if (nc->respPoolIdx > 0)
+    {
+        resp = nc->respPool[--nc->respPoolIdx];
+    }
+    else
+    {
+        resp = (respInfo *) NATS_CALLOC(1, sizeof(respInfo));
+        if (resp == NULL)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+        if (s == NATS_OK)
+            s = natsMutex_Create(&(resp->mu));
+        if (s == NATS_OK)
+            s = natsCondition_Create(&(resp->cond));
+        if ((s == NATS_OK) && (nc->respPoolSize < RESP_INFO_POOL_MAX_SIZE))
+        {
+            resp->pooled = true;
+            nc->respPoolSize++;
+        }
+    }
+
+    if (s == NATS_OK)
+    {
+        nc->respId[nc->respIdPos] = '0' + nc->respIdVal;
+        nc->respId[nc->respIdPos + 1] = '\0';
+
+        // Build the response inbox
+        memcpy(respInbox, nc->respSub, nc->reqIdOffset);
+        respInbox[nc->reqIdOffset-1] = '.';
+        memcpy(respInbox+nc->reqIdOffset, nc->respId, nc->respIdPos + 2); // copy the '\0' of respId
+
+        nc->respIdVal++;
+        if (nc->respIdVal == 10)
+        {
+            nc->respIdVal = 0;
+            if (nc->respIdPos > 0)
+            {
+                bool shift = true;
+                int  i, j;
+
+                for (i=nc->respIdPos-1; i>=0; i--)
+                {
+                    if (nc->respId[i] != '9')
+                    {
+                        nc->respId[i]++;
+
+                        for (j=i+1; j<=nc->respIdPos-1; j++)
+                            nc->respId[j] = '0';
+
+                        shift = false;
+                        break;
+                    }
+                }
+                if (shift)
+                {
+                    nc->respId[0] = '1';
+
+                    for (i=1; i<=nc->respIdPos; i++)
+                        nc->respId[i] = '0';
+
+                    nc->respIdPos++;
+                }
+            }
+            else
+            {
+                nc->respId[0] = '1';
+                nc->respIdPos++;
+            }
+            if (nc->respIdPos == NATS_MAX_REQ_ID_LEN)
+                nc->respIdPos = 0;
+        }
+
+        s = natsStrHash_Set(nc->respMap, respInbox+nc->reqIdOffset, true,
+                            (void*) resp, NULL);
+    }
+
+    if (s == NATS_OK)
+        *newResp = resp;
+    else
+        natsConn_disposeRespInfo(nc, resp, false);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsConn_initInbox(natsConnection *nc, char *buf, int bufSize, char **newInbox, bool *allocated)
+{
+    int         needed  = nc->inboxPfxLen+NUID_BUFFER_LEN+1;
+    char        *inbox  = buf;
+    bool        created = false;
+    natsStatus  s;
+
+    if (needed > bufSize)
+    {
+        inbox = NATS_MALLOC(needed);
+        if (inbox == NULL)
+            return nats_setDefaultError(NATS_NO_MEMORY);
+        created = true;
+    }
+    memcpy(inbox, nc->inboxPfx, nc->inboxPfxLen);
+    // This will add the terminal '\0';
+    s = natsNUID_Next(inbox+nc->inboxPfxLen, NUID_BUFFER_LEN+1);
+    if (s == NATS_OK)
+    {
+        *newInbox = inbox;
+        if (allocated != NULL)
+            *allocated = created;
+    }
+    else if (created)
+        NATS_FREE(inbox);
+
+    return s;
+}
+
+natsStatus
+natsConn_newInbox(natsConnection *nc, natsInbox **newInbox)
+{
+    natsStatus  s;
+    int         inboxLen = nc->inboxPfxLen+NUID_BUFFER_LEN+1;
+    char        *inbox   = NATS_MALLOC(inboxLen);
+
+    if (inbox == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    s = natsConn_initInbox(nc, inbox, inboxLen, (char**) newInbox, NULL);
+    if (s != NATS_OK)
+        NATS_FREE(inbox);
+    return s;
+}
+
+// Initialize some of the connection's fields used for request/reply mapping.
+// Connection's lock is held on entry.
+natsStatus
+natsConn_initResp(natsConnection *nc, natsMsgHandler cb)
+{
+    natsStatus s = NATS_OK;
+
+    nc->respPool = NATS_CALLOC(RESP_INFO_POOL_MAX_SIZE, sizeof(respInfo*));
+    if (nc->respPool == NULL)
+        s = nats_setDefaultError(NATS_NO_MEMORY);
+    if (s == NATS_OK)
+        s = natsStrHash_Create(&nc->respMap, 4);
+    if (s == NATS_OK)
+        s = natsConn_newInbox(nc, (natsInbox**) &nc->respSub);
+    if (s == NATS_OK)
+    {
+        char *inbox = NULL;
+
+        if (nats_asprintf(&inbox, "%s.*", nc->respSub) < 0)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+        else
+            s = natsConn_subscribeNoPoolNoLock(&(nc->respMux), nc, inbox, cb, (void*) nc);
+
+        NATS_FREE(inbox);
+    }
+    if (s != NATS_OK)
+    {
+        natsInbox_Destroy(nc->respSub);
+        nc->respSub = NULL;
+        natsStrHash_Destroy(nc->respMap);
+        nc->respMap = NULL;
+        NATS_FREE(nc->respPool);
+        nc->respPool = NULL;
+    }
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+// This will clear any pending Request calls.
+// Lock is assumed to be held by the caller.
+static void
+_clearPendingRequestCalls(natsConnection *nc, natsStatus reason)
+{
+    natsStrHashIter iter;
+    void            *p = NULL;
+
+    if (nc->respMap == NULL)
+        return;
+
+    natsStrHashIter_Init(&iter, nc->respMap);
+    while (natsStrHashIter_Next(&iter, NULL, &p))
+    {
+        respInfo *val = (respInfo*) p;
+        natsMutex_Lock(val->mu);
+        val->closed = true;
+        val->closedSts = reason;
+        val->removed = true;
+        natsCondition_Signal(val->cond);
+        natsMutex_Unlock(val->mu);
+        natsStrHashIter_RemoveCurrent(&iter);
+    }
+    natsStrHashIter_Done(&iter);
+}
+
+static void
+_clearSSL(natsConnection *nc)
+{
+    if (nc->sockCtx.ssl == NULL)
+        return;
+
+    SSL_free(nc->sockCtx.ssl);
+    nc->sockCtx.ssl = NULL;
+}
+
+// Try to reconnect using the option parameters.
+// This function assumes we are allowed to reconnect.
+static void
+_doReconnect(void *arg)
+{
+    natsStatus                      s           = NATS_OK;
+    natsConnection                  *nc         = (natsConnection*) arg;
+    natsSrvPool                     *pool       = NULL;
+    int64_t                         sleepTime   = 0;
+    struct threadsToJoin            ttj;
+    natsThread                      *rt         = NULL;
+    int                             wlf         = 0;
+    bool                            doSleep     = false;
+    int64_t                         jitter      = 0;
+    int                             i           = 0;
+    natsCustomReconnectDelayHandler crd         = NULL;
+    void                            *crdClosure = NULL;
+
+    natsConn_Lock(nc);
+
+    _initThreadsToJoin(&ttj, nc, false);
+
+    natsConn_Unlock(nc);
+
+    _joinThreads(&ttj);
+
+    natsConn_Lock(nc);
+
+    // Clear any error.
+    nc->err         = NATS_OK;
+    nc->errStr[0]   = '\0';
+
+    pool = nc->srvPool;
+
+    // Perform appropriate callback if needed for a disconnect.
+    // (do not do this if we are here on initial connect failure)
+    if (!nc->initc && (nc->opts->disconnectedCb != NULL))
+        natsAsyncCb_PostConnHandler(nc, ASYNC_DISCONNECTED);
+
+    crd = nc->opts->customReconnectDelayCB;
+    if (crd == NULL)
+    {
+        jitter = nc->opts->reconnectJitter;
+        // TODO: since we sleep only after the whole list has been tried, we can't
+        // rely on individual *natsSrv to know if it is a TLS or non-TLS url.
+        // We have to pick which type of jitter to use, for now, we use these hints:
+        jitter = nc->opts->reconnectJitter;
+        if (nc->opts->secure || (nc->opts->sslCtx != NULL))
+            jitter = nc->opts->reconnectJitterTLS;
+    }
+    else
+        crdClosure = nc->opts->customReconnectDelayCBClosure;
+
+    // Note that the pool's size may decrement after the call to
+    // natsSrvPool_GetNextServer.
+    for (i=0; (s == NATS_OK) && (natsSrvPool_GetSize(pool) > 0); )
+    {
+        nc->cur = natsSrvPool_GetNextServer(pool, nc->opts, nc->cur);
+        if (nc->cur == NULL)
+        {
+            nc->err = NATS_NO_SERVER;
+            break;
+        }
+
+        doSleep = (i+1 >= natsSrvPool_GetSize(pool));
+
+        if (doSleep)
+        {
+            i = 0;
+            if (crd != NULL)
+            {
+                wlf++;
+                natsConn_Unlock(nc);
+                sleepTime = crd(nc, wlf, crdClosure);
+                natsConn_Lock(nc);
+                if (natsConn_isClosed(nc))
+                    break;
+            }
+            else
+            {
+                sleepTime = nc->opts->reconnectWait;
+                if (jitter > 0)
+                    sleepTime += rand() % jitter;
+            }
+            natsCondition_TimedWait(nc->reconnectCond, nc->mu, sleepTime);
+        }
+        else
+        {
+            i++;
+            natsConn_Unlock(nc);
+            natsThread_Yield();
+            natsConn_Lock(nc);
+        }
+
+        // Check if we have been closed first.
+        if (natsConn_isClosed(nc))
+            break;
+
+        // Mark that we tried a reconnect
+        nc->cur->reconnects += 1;
+
+        // Try to create a new connection
+        s = _createConn(nc);
+        if (s != NATS_OK)
+        {
+            // Reset error here. We will return NATS_NO_SERVERS at the end of
+            // this loop if appropriate.
+            nc->err = NATS_OK;
+
+            // Reset status
+            s = NATS_OK;
+
+            // Not yet connected, retry...
+            // Continue to hold the lock
+            continue;
+        }
+
+        // We are reconnected
+        nc->stats.reconnects += 1;
+
+        // Process Connect logic
+        s = _processConnInit(nc);
+        // Check if connection has been closed (it could happen due to
+        // user callback that may be invoked as part of the connect)
+        // or if the reconnect process should be aborted.
+        if (natsConn_isClosed(nc) || nc->ar)
+        {
+            if (s == NATS_OK)
+                s = nats_setError(NATS_CONNECTION_CLOSED, "%s", "connection has been closed/destroyed while reconnecting");
+            break;
+        }
+
+        // We have a valid FD. We are now going to send data directly
+        // to the newly connected server, so we need to disable the
+        // use of 'pending' for the moment.
+        nc->usePending = false;
+
+        // Send existing subscription state
+        if (s == NATS_OK)
+            s = _resendSubscriptions(nc);
+
+        // Now send off and clear pending buffer
+        if (s == NATS_OK)
+            s = _flushReconnectPendingItems(nc);
+
+        if (s != NATS_OK)
+        {
+            // In case we were at the last iteration, this is the error
+            // we will report.
+            nc->err = s;
+
+            // Reset status
+            s = NATS_OK;
+
+            // Close the socket since we were connected, but a problem occurred.
+            // (not doing this would cause an FD leak)
+            natsSock_Close(nc->sockCtx.fd);
+            nc->sockCtx.fd = NATS_SOCK_INVALID;
+
+            // We need to re-activate the use of pending since we
+            // may go back to sleep and release the lock
+            nc->usePending = true;
+            natsBuf_Reset(nc->bw);
+
+            // We need to cleanup some things if the connection was SSL.
+            _clearSSL(nc);
+
+            nc->status = NATS_CONN_STATUS_RECONNECTING;
+            continue;
+        }
+
+        // This is where we are truly connected.
+        nc->status = NATS_CONN_STATUS_CONNECTED;
+
+        // No more failure allowed past this point.
+
+        // Clear connection's last error
+        nc->err       = NATS_OK;
+        nc->errStr[0] = '\0';
+
+        // Clear the possible current lastErr
+        nc->cur->lastAuthErrCode = 0;
+
+        // Clear out server stats for the server we connected to..
+        nc->cur->didConnect = true;
+        nc->cur->reconnects = 0;
+
+        // At this point we know that we don't need the pending buffer
+        // anymore. Destroy now.
+        natsBuf_Destroy(nc->pending);
+        nc->pending     = NULL;
+        nc->usePending  = false;
+
+        // Normally only set in _connect() but we need in case we allow
+        // reconnect logic on initial connect failure.
+        if (nc->initc)
+        {
+            // This was the initial connect. Set this to false.
+            nc->initc = false;
+            // Invoke the callback.
+            if (nc->opts->connectedCb != NULL)
+                natsAsyncCb_PostConnHandler(nc, ASYNC_CONNECTED);
+        }
+        else
+        {
+            // Call reconnectedCB if appropriate. Since we are in a separate
+            // thread, we could invoke the callback directly, however, we
+            // still post it so all callbacks from a connection are serialized.
+            if (nc->opts->reconnectedCb != NULL)
+                natsAsyncCb_PostConnHandler(nc, ASYNC_RECONNECTED);
+        }
+
+        nc->inReconnect--;
+        if (nc->reconnectThread != NULL)
+        {
+            rt = nc->reconnectThread;
+            nc->reconnectThread = NULL;
+        }
+
+        // Release lock here, we will return below.
+        natsConn_Unlock(nc);
+
+        // Make sure we flush everything
+        (void) natsConnection_Flush(nc);
+
+        // Release to compensate for the retain in processOpError.
+        natsConn_release(nc);
+
+        if (rt != NULL)
+        {
+            natsThread_Detach(rt);
+            natsThread_Destroy(rt);
+        }
+
+        return;
+    }
+
+    // Call into close.. We have no servers left..
+    if (nc->err == NATS_OK)
+        nc->err = NATS_NO_SERVER;
+
+    nc->inReconnect--;
+    nc->rle = true;
+    natsConn_Unlock(nc);
+
+    _close(nc, NATS_CONN_STATUS_CLOSED, false, true);
+
+    // Release to compensate for the retain in processOpError.
+    natsConn_release(nc);
+}
+
+// If the connection has the option `sendAsap`, flushes the buffer
+// directly, otherwise, notifies the flusher thread that there is
+// pending data to send to the server.
+natsStatus
+natsConn_flushOrKickFlusher(natsConnection *nc)
+{
+    natsStatus s = NATS_OK;
+
+    if (nc->opts->sendAsap)
+    {
+        s = natsConn_bufferFlush(nc);
+    }
+    else if (!(nc->flusherSignaled) && (nc->bw != NULL))
+    {
+        nc->flusherSignaled = true;
+        natsCondition_Signal(nc->flusherCond);
+    }
+    return s;
+}
+
+// reads a protocol one byte at a time.
+static natsStatus
+_readProto(natsConnection *nc, natsBuffer **proto)
+{
+    natsStatus s                       = NATS_OK;
+    char               protoEnd        = '\n';
+    natsBuffer *buf            = NULL;
+    char               oneChar[1]  = { '\0' };
+
+    s = natsBuf_Create(&buf, 10);
+    if (s != NATS_OK)
+        return s;
+
+    for (;;)
+    {
+        s = natsSock_Read(&(nc->sockCtx), oneChar, 1, NULL);
+        if (s == NATS_CONNECTION_CLOSED)
+            break;
+        s = natsBuf_AppendByte(buf, oneChar[0]);
+        if (s != NATS_OK)
+        {
+            natsBuf_Destroy(buf);
+            return s;
+        }
+        if (oneChar[0] == protoEnd)
+            break;
+    }
+    s = natsBuf_AppendByte(buf, '\0');
+    if (s != NATS_OK)
+    {
+        natsBuf_Destroy(buf);
+        return s;
+    }
+    *proto = buf;
+    return NATS_OK;
+}
+
+static natsStatus
+_sendConnect(natsConnection *nc)
+{
+    natsStatus  s       = NATS_OK;
+    char        *cProto = NULL;
+    natsBuffer *proto  = NULL;
+    bool        rup     = (nc->pending != NULL);
+
+    // Create the CONNECT protocol
+    s = _connectProto(nc, &cProto);
+
+    // Because we now possibly release the connection lock in _connectProto()
+    // (if there is user callbacks for jwt/signing keys), we can't have the
+    // set/reset of usePending be in doReconnect(). There are then windows in
+    // which a user Publish() could sneak in a try to send to socket. So limit
+    // the disable/re-enable of that boolean to around this buffer write/flush
+    // calls.
+    if (rup)
+        nc->usePending = false;
+
+    // Add it to the buffer
+    if (s == NATS_OK)
+        s = natsConn_bufferWriteString(nc, cProto);
+
+    // Add the PING protocol to the buffer
+    if (s == NATS_OK)
+        s = natsConn_bufferWrite(nc, _PING_OP_, _PING_OP_LEN_);
+    if (s == NATS_OK)
+        s = natsConn_bufferWrite(nc, _CRLF_, _CRLF_LEN_);
+
+    // Flush the buffer
+    if (s == NATS_OK)
+        s = natsConn_bufferFlush(nc);
+
+    // Reset here..
+    if (rup)
+        nc->usePending = true;
+
+    // Now read the response from the server.
+    if (s == NATS_OK)
+        s = _readProto(nc, &proto);
+
+    // If Verbose is set, we expect +OK first.
+    if ((s == NATS_OK) && nc->opts->verbose)
+    {
+        // Check protocol is as expected
+        if (strncmp(natsBuf_Data(proto), _OK_OP_, _OK_OP_LEN_) != 0)
+        {
+            s = nats_setError(NATS_PROTOCOL_ERROR,
+                              "Expected '%s', got '%s'",
+                              _OK_OP_, natsBuf_Data(proto));
+        }
+        natsBuf_Destroy(proto);
+        proto = NULL;
+
+        // Read the rest now...
+        if (s == NATS_OK)
+            s = _readProto(nc, &proto);
+    }
+
+    // We except the PONG protocol
+    if ((s == NATS_OK) && (strncmp(natsBuf_Data(proto), _PONG_OP_, _PONG_OP_LEN_) != 0))
+    {
+        // But it could be something else, like -ERR
+
+        if (strncmp(natsBuf_Data(proto), _ERR_OP_, _ERR_OP_LEN_) == 0)
+        {
+            char    buffer[256];
+            int     authErrCode = 0;
+
+            buffer[0] = '\0';
+            snprintf_truncate(buffer, sizeof(buffer), "%s", natsBuf_Data(proto));
+
+            // Remove -ERR, trim spaces and quotes.
+            nats_NormalizeErr(buffer);
+
+            // Look for auth errors.
+            if ((authErrCode = _checkAuthError(buffer)) != 0)
+            {
+                // This sets nc->err to NATS_CONNECTION_AUTH_FAILED
+                // copy content of buffer into nc->errStr.
+                _processAuthError(nc, authErrCode, buffer);
+                s = nc->err;
+            }
+            else
+                s = NATS_ERR;
+
+            // Update stack
+            s = nats_setError(s, "%s", buffer);
+        }
+        else
+        {
+            s = nats_setError(NATS_PROTOCOL_ERROR,
+                              "Expected '%s', got '%s'",
+                              _PONG_OP_, natsBuf_Data(proto));
+        }
+    }
+    // Destroy proto (ok if proto is NULL).
+    natsBuf_Destroy(proto);
+
+    if (s == NATS_OK)
+        nc->status = NATS_CONN_STATUS_CONNECTED;
+
+    NATS_FREE(cProto);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_processConnInit(natsConnection *nc)
+{
+    natsStatus s = NATS_OK;
+
+    nc->status = NATS_CONN_STATUS_CONNECTING;
+
+    // Process the INFO protocol that we should be receiving
+    s = _processExpectedInfo(nc);
+
+    // Send the CONNECT and PING protocol, and wait for the PONG.
+    if (s == NATS_OK)
+        s = _sendConnect(nc);
+
+    // Clear our deadline, regardless of error
+    natsSock_ClearDeadline(&nc->sockCtx);
+
+    // If there is no write deadline option, switch to blocking socket here...
+   if ((s == NATS_OK) && (nc->opts->writeDeadline <= 0))
+       s = natsSock_SetBlocking(nc->sockCtx.fd, true);
+
+    // Start the readLoop and flusher threads
+    if (s == NATS_OK)
+        s = _spinUpSocketWatchers(nc);
+
+    if ((s == NATS_OK) && (nc->opts->evLoop != NULL))
+    {
+        s = natsSock_SetBlocking(nc->sockCtx.fd, false);
+
+        // If we are reconnecting, buffer will have already been allocated
+        if ((s == NATS_OK) && (nc->el.buffer == NULL))
+        {
+            nc->el.buffer = (char*) malloc(nc->opts->ioBufSize);
+            if (nc->el.buffer == NULL)
+                s = nats_setDefaultError(NATS_NO_MEMORY);
+        }
+        if (s == NATS_OK)
+        {
+            // Set this first in case the event loop triggers the first READ
+            // event just after this call returns.
+            nc->sockCtx.useEventLoop = true;
+
+            s = nc->opts->evCbs.attach(&(nc->el.data),
+                                       nc->opts->evLoop,
+                                       nc,
+                                       (int) nc->sockCtx.fd);
+            if (s == NATS_OK)
+            {
+                nc->el.attached = true;
+            }
+            else
+            {
+                nc->sockCtx.useEventLoop = false;
+
+                nats_setError(s,
+                              "Error attaching to the event loop: %d - %s",
+                              s, natsStatus_GetText(s));
+            }
+        }
+    }
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+// Main connect function. Will connect to the server
+static natsStatus
+_connect(natsConnection *nc)
+{
+    natsStatus  s     = NATS_OK;
+    natsStatus  retSts= NATS_OK;
+    natsSrvPool *pool = NULL;
+    int         i = 0;
+    int         l = 0;
+    int         max = 0;
+    int64_t     wtime = 0;
+    bool        retry = false;
+
+    natsConn_Lock(nc);
+    nc->initc = true;
+
+    pool = nc->srvPool;
+
+    if ((nc->opts->retryOnFailedConnect) && (nc->opts->connectedCb == NULL))
+    {
+        retry = true;
+        max   = nc->opts->maxReconnect;
+        wtime = nc->opts->reconnectWait;
+    }
+
+    for (;;)
+    {
+        // The pool may change inside the loop iteration due to INFO protocol.
+        for (i = 0; i < natsSrvPool_GetSize(pool); i++)
+        {
+            nc->cur = natsSrvPool_GetSrv(pool,i);
+
+            s = _createConn(nc);
+            if (s == NATS_OK)
+            {
+                s = _processConnInit(nc);
+
+                if (s == NATS_OK)
+                {
+                    nc->cur->lastAuthErrCode = 0;
+                    natsSrvPool_SetSrvDidConnect(pool, i, true);
+                    natsSrvPool_SetSrvReconnects(pool, i, 0);
+                    retSts = NATS_OK;
+                    retry = false;
+                    break;
+                }
+                else
+                {
+                    retSts = s;
+
+                    natsConn_Unlock(nc);
+
+                    _close(nc, NATS_CONN_STATUS_DISCONNECTED, false, false);
+
+                    natsConn_Lock(nc);
+
+                    nc->cur = NULL;
+                }
+            }
+            else
+            {
+                if (natsConn_isClosed(nc))
+                {
+                    s = NATS_CONNECTION_CLOSED;
+                    break;
+                }
+
+                if (s == NATS_IO_ERROR)
+                    retSts = NATS_OK;
+            }
+        }
+        if (!retry)
+            break;
+
+        l++;
+        if ((max > 0) && (l > max))
+            break;
+
+        if (wtime > 0)
+            nats_Sleep(wtime);
+    }
+
+    // If not connected and retry asynchronously on failed connect
+    if ((nc->status != NATS_CONN_STATUS_CONNECTED)
+            && nc->opts->retryOnFailedConnect
+            && (nc->opts->connectedCb != NULL))
+    {
+        natsConn_Unlock(nc);
+
+        if (_processOpError(nc, retSts, true))
+        {
+            nats_clearLastError();
+            return NATS_NOT_YET_CONNECTED;
+        }
+
+        natsConn_Lock(nc);
+    }
+
+    if ((retSts == NATS_OK) && (nc->status != NATS_CONN_STATUS_CONNECTED))
+        s = nats_setDefaultError(NATS_NO_SERVER);
+
+    nc->initc = false;
+    natsConn_Unlock(nc);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_evStopPolling(natsConnection *nc)
+{
+    natsStatus s;
+
+    nc->sockCtx.useEventLoop = false;
+    nc->el.writeAdded = false;
+    s = nc->opts->evCbs.read(nc->el.data, NATS_EVENT_ACTION_REMOVE);
+    if (s == NATS_OK)
+        s = nc->opts->evCbs.write(nc->el.data, NATS_EVENT_ACTION_REMOVE);
+
+    return s;
+}
+
+// _processOpError handles errors from reading or parsing the protocol.
+// The lock should not be held entering this function.
+static bool
+_processOpError(natsConnection *nc, natsStatus s, bool initialConnect)
+{
+    natsConn_Lock(nc);
+
+    if (!initialConnect)
+    {
+        if (_isConnecting(nc) || natsConn_isClosed(nc) || (nc->inReconnect > 0))
+        {
+            natsConn_Unlock(nc);
+
+            return false;
+        }
+    }
+
+    // Do reconnect only if allowed and we were actually connected
+    // or if we are retrying on initial failed connect.
+    if (initialConnect || (nc->opts->allowReconnect && (nc->status == NATS_CONN_STATUS_CONNECTED)))
+    {
+        natsStatus ls = NATS_OK;
+
+        // Set our new status
+        nc->status = NATS_CONN_STATUS_RECONNECTING;
+
+        if (nc->ptmr != NULL)
+            natsTimer_Stop(nc->ptmr);
+
+        if (nc->sockCtx.fdActive)
+        {
+            SET_WRITE_DEADLINE(nc);
+            natsConn_bufferFlush(nc);
+
+            natsSock_Shutdown(nc->sockCtx.fd);
+            nc->sockCtx.fdActive = false;
+        }
+
+        // If we use an external event loop, we need to stop polling
+        // on the socket since we are going to reconnect.
+        if (nc->el.attached)
+        {
+            ls = _evStopPolling(nc);
+            natsSock_Close(nc->sockCtx.fd);
+            nc->sockCtx.fd = NATS_SOCK_INVALID;
+
+            // We need to cleanup some things if the connection was SSL.
+            _clearSSL(nc);
+        }
+
+        // Fail pending flush requests.
+        if (ls == NATS_OK)
+            _clearPendingFlushRequests(nc);
+        // If option set, also fail pending requests.
+        if ((ls == NATS_OK) && nc->opts->failRequestsOnDisconnect)
+            _clearPendingRequestCalls(nc, NATS_CONNECTION_DISCONNECTED);
+
+        // Create the pending buffer to hold all write requests while we try
+        // to reconnect.
+        if (ls == NATS_OK)
+            ls = natsBuf_Create(&(nc->pending), nc->opts->reconnectBufSize);
+        if (ls == NATS_OK)
+        {
+            nc->usePending = true;
+
+            // Start the reconnect thread
+            ls = natsThread_Create(&(nc->reconnectThread),
+                                  _doReconnect, (void*) nc);
+        }
+        if (ls == NATS_OK)
+        {
+            // We created the reconnect thread successfully, so retain
+            // the connection.
+            _retain(nc);
+            nc->inReconnect++;
+            natsConn_Unlock(nc);
+
+            return true;
+        }
+    }
+
+    // reconnect not allowed or we failed to setup the reconnect code.
+
+    nc->status = NATS_CONN_STATUS_DISCONNECTED;
+    nc->err = s;
+
+    natsConn_Unlock(nc);
+
+    _close(nc, NATS_CONN_STATUS_CLOSED, false, true);
+
+    return false;
+}
+
+static void
+_readLoop(void  *arg)
+{
+    natsStatus  s = NATS_OK;
+    char        *buffer;
+    int         n;
+    int         bufSize;
+
+    natsConnection *nc = (natsConnection*) arg;
+
+    natsConn_Lock(nc);
+
+    bufSize = nc->opts->ioBufSize;
+    buffer = NATS_MALLOC(bufSize);
+    if (buffer == NULL)
+        s = nats_setDefaultError(NATS_NO_MEMORY);
+
+    if (nc->sockCtx.ssl != NULL)
+        nats_sslRegisterThreadForCleanup();
+
+    natsDeadline_Clear(&(nc->sockCtx.readDeadline));
+
+    if (nc->ps == NULL)
+        s = natsParser_Create(&(nc->ps));
+
+    while ((s == NATS_OK)
+           && !natsConn_isClosed(nc)
+           && !natsConn_isReconnecting(nc))
+    {
+        natsConn_Unlock(nc);
+
+        n = 0;
+
+        s = natsSock_Read(&(nc->sockCtx), buffer, bufSize, &n);
+        if ((s == NATS_IO_ERROR) && (NATS_SOCK_GET_ERROR == NATS_SOCK_WOULD_BLOCK))
+            s = NATS_OK;
+        if ((s == NATS_OK) && (n > 0))
+            s = natsParser_Parse(nc, buffer, n);
+
+        if (s != NATS_OK)
+            _processOpError(nc, s, false);
+
+        natsConn_Lock(nc);
+    }
+
+    NATS_FREE(buffer);
+
+    natsSock_Close(nc->sockCtx.fd);
+    nc->sockCtx.fd       = NATS_SOCK_INVALID;
+    nc->sockCtx.fdActive = false;
+
+    // We need to cleanup some things if the connection was SSL.
+    _clearSSL(nc);
+
+    natsParser_Destroy(nc->ps);
+    nc->ps = NULL;
+
+    // This unlocks and releases the connection to compensate for the retain
+    // when this thread was created.
+    natsConn_unlockAndRelease(nc);
+}
+
+static void
+_flusher(void *arg)
+{
+    natsConnection  *nc  = (natsConnection*) arg;
+    natsStatus      s;
+
+    while (true)
+    {
+        natsConn_Lock(nc);
+
+        while (!(nc->flusherSignaled) && !(nc->flusherStop))
+            natsCondition_Wait(nc->flusherCond, nc->mu);
+
+        if (nc->flusherStop)
+        {
+            natsConn_Unlock(nc);
+            break;
+        }
+
+        //TODO: If we process the request right away, performance
+        //      will suffer when sending quickly very small messages.
+        //      The buffer is going to be always flushed, which
+        //      defeats the purpose of a write buffer.
+        //      We need to revisit this.
+
+        // Give a chance to accumulate more requests...
+        natsCondition_TimedWait(nc->flusherCond, nc->mu, 1);
+
+        nc->flusherSignaled = false;
+
+        if (!_isConnected(nc) || natsConn_isClosed(nc) || natsConn_isReconnecting(nc))
+        {
+            natsConn_Unlock(nc);
+            break;
+        }
+
+        if (nc->sockCtx.fdActive && (natsBuf_Len(nc->bw) > 0))
+        {
+            SET_WRITE_DEADLINE(nc);
+            s = natsConn_bufferFlush(nc);
+            if ((s != NATS_OK) && (nc->err == NATS_OK))
+                nc->err = s;
+        }
+
+        natsConn_Unlock(nc);
+    }
+
+    // Release the connection to compensate for the retain when this thread
+    // was created.
+    natsConn_release(nc);
+}
+
+static void
+_sendPing(natsConnection *nc, natsPong *pong)
+{
+    natsStatus  s     = NATS_OK;
+
+    SET_WRITE_DEADLINE(nc);
+    s = natsConn_bufferWrite(nc, _PING_PROTO_, _PING_PROTO_LEN_);
+    if (s == NATS_OK)
+    {
+        // Flush the buffer in place.
+        s = natsConn_bufferFlush(nc);
+    }
+    if (s == NATS_OK)
+    {
+        // Now that we know the PING was sent properly, update
+        // the number of PING sent.
+        nc->pongs.outgoingPings++;
+
+        if (pong != NULL)
+        {
+            pong->id = nc->pongs.outgoingPings;
+
+            // Add this pong to the list.
+            pong->next = NULL;
+            pong->prev = nc->pongs.tail;
+
+            if (nc->pongs.tail != NULL)
+                nc->pongs.tail->next = pong;
+
+            nc->pongs.tail = pong;
+
+            if (nc->pongs.head == NULL)
+                nc->pongs.head = pong;
+        }
+    }
+}
+
+static void
+_processPingTimer(natsTimer *timer, void *arg)
+{
+    natsConnection  *nc = (natsConnection*) arg;
+
+    natsConn_Lock(nc);
+
+    if (nc->status != NATS_CONN_STATUS_CONNECTED)
+    {
+        natsConn_Unlock(nc);
+        return;
+    }
+
+    // If we have more PINGs out than PONGs in, consider
+    // the connection stale.
+    if (++(nc->pout) > nc->opts->maxPingsOut)
+    {
+        natsConn_Unlock(nc);
+        _processOpError(nc, NATS_STALE_CONNECTION, false);
+        return;
+    }
+
+    _sendPing(nc, NULL);
+
+    natsConn_Unlock(nc);
+}
+
+static void
+_pingStopppedCb(natsTimer *timer, void *closure)
+{
+    natsConnection *nc = (natsConnection*) closure;
+
+    natsConn_release(nc);
+}
+
+static natsStatus
+_spinUpSocketWatchers(natsConnection *nc)
+{
+    natsStatus  s = NATS_OK;
+
+    nc->pout        = 0;
+    nc->flusherStop = false;
+
+    if (nc->opts->evLoop == NULL)
+    {
+        // Let's not rely on the created threads acquiring lock that would make it
+        // safe to retain only on success.
+        _retain(nc);
+
+        s = natsThread_Create(&(nc->readLoopThread), _readLoop, (void*) nc);
+        if (s != NATS_OK)
+            _release(nc);
+    }
+
+    // Don't start flusher thread if connection was created with SendAsap option.
+    if ((s == NATS_OK) && !(nc->opts->sendAsap))
+    {
+        _retain(nc);
+
+        s = natsThread_Create(&(nc->flusherThread), _flusher, (void*) nc);
+        if (s != NATS_OK)
+            _release(nc);
+    }
+
+    if ((s == NATS_OK) && (nc->opts->pingInterval > 0))
+    {
+        _retain(nc);
+
+        if (nc->ptmr == NULL)
+        {
+            s = natsTimer_Create(&(nc->ptmr),
+                                 _processPingTimer,
+                                 _pingStopppedCb,
+                                 nc->opts->pingInterval,
+                                 (void*) nc);
+            if (s != NATS_OK)
+                _release(nc);
+        }
+        else
+        {
+            natsTimer_Reset(nc->ptmr, nc->opts->pingInterval);
+        }
+    }
+
+    return s;
+}
+
+// Remove all subscriptions. This will kick out the delivery threads,
+// and unblock NextMsg() calls.
+static void
+_removeAllSubscriptions(natsConnection *nc)
+{
+    natsHashIter     iter;
+    void             *p = NULL;
+
+    natsMutex_Lock(nc->subsMu);
+    natsHashIter_Init(&iter, nc->subs);
+    while (natsHashIter_Next(&iter, NULL, &p))
+    {
+        natsSubscription *sub = (natsSubscription*) p;
+
+        (void) natsHashIter_RemoveCurrent(&iter);
+
+        natsSub_close(sub, true);
+
+        natsSub_release(sub);
+    }
+    natsHashIter_Done(&iter);
+    natsMutex_Unlock(nc->subsMu);
+}
+
+// Low level close call that will do correct cleanup and set
+// desired status. Also controls whether user defined callbacks
+// will be triggered. The lock should not be held entering this
+// function. This function will handle the locking manually.
+static void
+_close(natsConnection *nc, natsConnStatus status, bool fromPublicClose, bool doCBs)
+{
+    struct threadsToJoin    ttj;
+    bool                    sockWasActive = false;
+    bool                    detach = false;
+    natsSubscription        *sub = NULL;
+
+    natsConn_lockAndRetain(nc);
+
+    // If invoked from the public Close() call, attempt to flush
+    // to ensure that server has received all pending data.
+    // Note that _flushTimeout will release the lock and wait
+    // for PONG so this is why we do this early in that function.
+    if (fromPublicClose
+            && (nc->status == NATS_CONN_STATUS_CONNECTED)
+            && nc->sockCtx.fdActive
+            && (natsBuf_Len(nc->bw) > 0))
+    {
+        _flushTimeout(nc, 500);
+    }
+
+    if (natsConn_isClosed(nc))
+    {
+        nc->status = status;
+
+        natsConn_unlockAndRelease(nc);
+        return;
+    }
+
+    nc->status = NATS_CONN_STATUS_CLOSED;
+
+    _initThreadsToJoin(&ttj, nc, true);
+
+    // Kick out all calls to natsConnection_Flush[Timeout]().
+    _clearPendingFlushRequests(nc);
+
+    // Kick out any queued and blocking requests.
+    _clearPendingRequestCalls(nc, NATS_CONNECTION_CLOSED);
+
+    if (nc->ptmr != NULL)
+        natsTimer_Stop(nc->ptmr);
+
+    // Unblock reconnect thread block'ed in sleep of reconnectWait interval
+    natsCondition_Broadcast(nc->reconnectCond);
+
+    // Remove all subscriptions. This will kick out the delivery threads,
+    // and unblock NextMsg() calls.
+    _removeAllSubscriptions(nc);
+
+    // Go ahead and make sure we have flushed the outbound buffer.
+    if (nc->sockCtx.fdActive)
+    {
+        // If there is no readLoop (or using external event loop), then it is
+        // our responsibility to close the socket. Otherwise, _readLoop is the
+        // one doing it.
+        if (ttj.readLoop == NULL)
+        {
+            // If event loop attached, stop polling...
+            if (nc->el.attached)
+                _evStopPolling(nc);
+
+            natsSock_Close(nc->sockCtx.fd);
+            nc->sockCtx.fd = NATS_SOCK_INVALID;
+
+            // We need to cleanup some things if the connection was SSL.
+            _clearSSL(nc);
+        }
+        else
+        {
+            // Shutdown the socket to stop any read/write operations.
+            // The socket will be closed by the _readLoop thread.
+            natsSock_Shutdown(nc->sockCtx.fd);
+        }
+        nc->sockCtx.fdActive = false;
+        sockWasActive = true;
+    }
+
+    // Perform appropriate callback if needed for a disconnect.
+    // Do not invoke if we were disconnected and failed to reconnect (since
+    // it has already been invoked in doReconnect).
+    if (doCBs && !nc->rle && (nc->opts->disconnectedCb != NULL) && sockWasActive)
+        natsAsyncCb_PostConnHandler(nc, ASYNC_DISCONNECTED);
+
+    sub = nc->respMux;
+    nc->respMux = NULL;
+
+    natsConn_Unlock(nc);
+
+    if (sub != NULL)
+        natsSub_release(sub);
+
+    _joinThreads(&ttj);
+
+    natsConn_Lock(nc);
+
+    // Perform appropriate callback if needed for a connection closed.
+    if (doCBs && (nc->opts->closedCb != NULL))
+        natsAsyncCb_PostConnHandler(nc, ASYNC_CLOSED);
+
+    nc->status = status;
+
+    if (nc->el.attached)
+    {
+        nc->el.attached = false;
+        detach = true;
+        _retain(nc);
+    }
+
+    natsConn_unlockAndRelease(nc);
+
+    if (detach)
+    {
+        nc->opts->evCbs.detach(nc->el.data);
+        natsConn_release(nc);
+    }
+}
+
+static natsStatus
+_createMsg(natsMsg **newMsg, natsConnection *nc, char *buf, int bufLen, int hdrLen)
+{
+    natsStatus  s        = NATS_OK;
+    int         subjLen  = 0;
+    char        *reply   = NULL;
+    int         replyLen = 0;
+
+    subjLen = natsBuf_Len(nc->ps->ma.subject);
+
+    if (nc->ps->ma.reply != NULL)
+    {
+        reply    = natsBuf_Data(nc->ps->ma.reply);
+        replyLen = natsBuf_Len(nc->ps->ma.reply);
+    }
+
+    s = natsMsg_create(newMsg,
+                       (const char*) natsBuf_Data(nc->ps->ma.subject), subjLen,
+                       (const char*) reply, replyLen,
+                       (const char*) buf, bufLen, hdrLen);
+    return s;
+}
+
+natsStatus
+natsConn_processMsg(natsConnection *nc, char *buf, int bufLen)
+{
+    natsStatus       s    = NATS_OK;
+    natsSubscription *sub = NULL;
+    natsMsg          *msg = NULL;
+    natsMsgDlvWorker *ldw = NULL;
+    bool             sc   = false;
+    bool             sm   = false;
+    nats_MsgList     *list = NULL;
+    natsMutex        *mu   = NULL;
+    natsCondition    *cond = NULL;
+    // For JetStream cases
+    jsSub            *jsi    = NULL;
+    bool             ctrlMsg = false;
+    const char       *fcReply= NULL;
+    int              jct     = 0;
+    natsMsgFilter    mf      = NULL;
+    void             *mfc    = NULL;
+    bool             unlock  = false;
+
+    natsMutex_Lock(nc->subsMu);
+
+    nc->stats.inMsgs  += 1;
+    nc->stats.inBytes += (uint64_t) bufLen;
+
+    sub = natsHash_Get(nc->subs, nc->ps->ma.sid);
+    if (sub != NULL)
+    {
+        mf  = nc->filter;
+        mfc = nc->filterClosure;
+    }
+    natsMutex_Unlock(nc->subsMu);
+
+    if (sub == NULL)
+        return NATS_OK;
+
+    // Do this outside of sub's lock, even if we end-up having to destroy
+    // it because we have reached the maxPendingMsgs count. This reduces
+    // lock contention.
+    s = _createMsg(&msg, nc, buf, bufLen, nc->ps->ma.hdr);
+    if (s != NATS_OK)
+        return s;
+    // bufLen is the total length of headers + data. Since headers become
+    // more and more prevalent, it makes sense to count them both toward
+    // the subscription's pending limit. So use bufLen for accounting.
+
+    if (mf != NULL)
+    {
+        (*mf)(nc, &msg, mfc);
+        if (msg == NULL)
+            return NATS_OK;
+    }
+
+    // Pick mutex, condition variable and list based on if the sub is
+    // part of a global delivery thread pool or not.
+    // Note about `list`: this is used only to link messages, but
+    // sub->msgList needs to be used to update/check number of pending
+    // messages, since in case of delivery thread pool, `list` will have
+    // messages from many different subscriptions.
+    if ((ldw = sub->libDlvWorker) != NULL)
+    {
+        mu   = ldw->lock;
+        cond = ldw->cond;
+        list = &(ldw->msgList);
+        if (sub->jsi != NULL)
+        {
+            natsSub_Lock(sub);
+            unlock = true;
+        }
+    }
+    else
+    {
+        mu   = sub->mu;
+        cond = sub->cond;
+        list = &(sub->msgList);
+    }
+
+    natsMutex_Lock(mu);
+    if (sub->closed || sub->drainSkip)
+    {
+        natsMutex_Unlock(mu);
+        if (unlock)
+            natsSub_Unlock(sub);
+        natsMsg_Destroy(msg);
+        return NATS_OK;
+    }
+
+    jsi = sub->jsi;
+    // For JS subscriptions (but not pull ones), handle hearbeat and flow control here.
+    if (jsi && !jsi->pull)
+    {
+        ctrlMsg = natsMsg_isJSCtrl(msg, &jct);
+        if (ctrlMsg && jct == jsCtrlHeartbeat)
+        {
+            // Check if the hearbeat has a "Consumer Stalled" header, if
+            // so, the value is the FC reply to send a nil message to.
+            // We will send it at the end of this function.
+            natsMsgHeader_Get(msg, jsConsumerStalledHdr, &fcReply);
+        }
+        else if (!ctrlMsg && jsi->ordered)
+        {
+            bool replaced = false;
+
+            s = jsSub_checkOrderedMsg(sub, msg, &replaced);
+            if ((s != NATS_OK) || replaced)
+            {
+                natsMutex_Unlock(mu);
+                if (unlock)
+                    natsSub_Unlock(sub);
+                natsMsg_Destroy(msg);
+                return s;
+            }
+        }
+    }
+
+    if (!ctrlMsg)
+    {
+        sub->msgList.msgs++;
+        sub->msgList.bytes += bufLen;
+
+        if (((sub->msgsLimit > 0) && (sub->msgList.msgs > sub->msgsLimit))
+            || ((sub->bytesLimit > 0) && (sub->msgList.bytes > sub->bytesLimit)))
+        {
+            natsMsg_Destroy(msg);
+
+            sub->dropped++;
+
+            sc = !sub->slowConsumer;
+            sub->slowConsumer = true;
+
+            // Undo stats from above.
+            sub->msgList.msgs--;
+            sub->msgList.bytes -= bufLen;
+        }
+        else
+        {
+            bool signal= false;
+
+            if ((jsi != NULL) && jsi->ackNone)
+                natsMsg_setAcked(msg);
+
+            if (sub->msgList.msgs > sub->msgsMax)
+                sub->msgsMax = sub->msgList.msgs;
+
+            if (sub->msgList.bytes > sub->bytesMax)
+                sub->bytesMax = sub->msgList.bytes;
+
+            sub->slowConsumer = false;
+
+            msg->sub = sub;
+
+            if (list->head == NULL)
+            {
+                list->head = msg;
+                signal = true;
+            }
+            else
+                list->tail->next = msg;
+
+            list->tail = msg;
+
+            if (signal)
+                natsCondition_Signal(cond);
+
+            // Store the ACK metadata from the message to
+            // compare later on with the received heartbeat.
+            if (jsi != NULL)
+                s = jsSub_trackSequences(jsi, msg->reply);
+        }
+    }
+    else if ((jct == jsCtrlHeartbeat) && (msg->reply == NULL))
+    {
+        // Handle control heartbeat messages.
+        s = jsSub_processSequenceMismatch(sub, msg, &sm);
+    }
+    else if ((jct == jsCtrlFlowControl) && (msg->reply != NULL))
+    {
+        // We will schedule the send of the FC reply once we have delivered the
+               // DATA message that was received before this flow control message, which
+               // has sequence `jsi.fciseq`. However, it is possible that this message
+               // has already been delivered, in that case, we need to send the FC reply now.
+        if (sub->delivered >= jsi->fciseq)
+            fcReply = msg->reply;
+        else
+        {
+            // Schedule a reply after the previous message is delivered.
+            s = jsSub_scheduleFlowControlResponse(jsi, msg->reply);
+        }
+    }
+
+    natsMutex_Unlock(mu);
+    if (unlock)
+        natsSub_Unlock(sub);
+
+    if ((s == NATS_OK) && fcReply)
+        s = natsConnection_Publish(nc, fcReply, NULL, 0);
+
+    if (ctrlMsg)
+        natsMsg_Destroy(msg);
+
+    if (sc || sm)
+    {
+        natsConn_Lock(nc);
+
+        nc->err = (sc ? NATS_SLOW_CONSUMER : NATS_MISMATCH);
+
+        if (nc->opts->asyncErrCb != NULL)
+            natsAsyncCb_PostErrHandler(nc, sub, nc->err, NULL);
+
+        natsConn_Unlock(nc);
+    }
+
+    return s;
+}
+
+void
+natsConn_processOK(natsConnection *nc)
+{
+    // Do nothing for now.
+}
+
+// _processPermissionViolation is called when the server signals a subject
+// permissions violation on either publish or subscribe.
+static void
+_processPermissionViolation(natsConnection *nc, char *error)
+{
+    natsConn_Lock(nc);
+    nc->err = NATS_NOT_PERMITTED;
+    snprintf(nc->errStr, sizeof(nc->errStr), "%s", error);
+    if (nc->opts->asyncErrCb != NULL)
+        natsAsyncCb_PostErrHandler(nc, NULL, nc->err, NATS_STRDUP(error));
+    natsConn_Unlock(nc);
+}
+
+// _processAuthError does common processing of auth errors.
+// We want to do retries unless we get the same error again.
+// This allows us for instance to swap credentials and have
+// the app reconnect, but if nothing is changing we should bail.
+static bool
+_processAuthError(natsConnection *nc, int errCode, char *error)
+{
+    nc->err = NATS_CONNECTION_AUTH_FAILED;
+    snprintf(nc->errStr, sizeof(nc->errStr), "%s", error);
+
+    if (!nc->initc && nc->opts->asyncErrCb != NULL)
+        natsAsyncCb_PostErrHandler(nc, NULL, nc->err, NATS_STRDUP(error));
+
+    if (nc->cur->lastAuthErrCode == errCode)
+        nc->ar = true;
+    else
+        nc->cur->lastAuthErrCode = errCode;
+
+    return nc->ar;
+}
+
+// Checks if the error is an authentication error and if so returns
+// the error code for the string, 0 otherwise.
+static int
+_checkAuthError(char *error)
+{
+    if (nats_strcasestr(error, AUTHORIZATION_ERR) != NULL)
+        return ERR_CODE_AUTH_VIOLATION;
+    else if (nats_strcasestr(error, AUTHENTICATION_EXPIRED_ERR) != NULL)
+        return ERR_CODE_AUTH_EXPIRED;
+    return 0;
+}
+
+void
+natsConn_processErr(natsConnection *nc, char *buf, int bufLen)
+{
+    char error[256];
+    bool close       = false;
+    int  authErrCode = 0;
+
+    // Copy the error in this local buffer.
+    snprintf(error, sizeof(error), "%.*s", bufLen, buf);
+
+    // Trim spaces and remove quotes.
+    nats_NormalizeErr(error);
+
+    if (strcasecmp(error, STALE_CONNECTION) == 0)
+    {
+        _processOpError(nc, NATS_STALE_CONNECTION, false);
+    }
+    else if (nats_strcasestr(error, PERMISSIONS_ERR) != NULL)
+    {
+        _processPermissionViolation(nc, error);
+    }
+    else if ((authErrCode = _checkAuthError(error)) != 0)
+    {
+        natsConn_Lock(nc);
+        close = _processAuthError(nc, authErrCode, error);
+        natsConn_Unlock(nc);
+    }
+    else
+    {
+        close = true;
+        natsConn_Lock(nc);
+        nc->err = NATS_ERR;
+        snprintf(nc->errStr, sizeof(nc->errStr), "%s", error);
+        natsConn_Unlock(nc);
+    }
+    if (close)
+        _close(nc, NATS_CONN_STATUS_CLOSED, false, true);
+}
+
+void
+natsConn_processPing(natsConnection *nc)
+{
+    natsConn_Lock(nc);
+
+    SET_WRITE_DEADLINE(nc);
+    if (natsConn_bufferWrite(nc, _PONG_PROTO_, _PONG_PROTO_LEN_) == NATS_OK)
+        natsConn_flushOrKickFlusher(nc);
+
+    natsConn_Unlock(nc);
+}
+
+void
+natsConn_processPong(natsConnection *nc)
+{
+    natsPong *pong = NULL;
+
+    natsConn_Lock(nc);
+
+    nc->pongs.incoming++;
+
+    // Check if the first pong's id in the list matches the incoming Id.
+    if (((pong = nc->pongs.head) != NULL)
+        && (pong->id == nc->pongs.incoming))
+    {
+        // Remove the pong from the list
+        _removePongFromList(nc, pong);
+
+        // Release the Flush[Timeout] call
+        pong->id = 0;
+
+        // There may be more than one thread waiting on this
+        // condition variable, so we use broadcast instead of
+        // signal.
+        natsCondition_Broadcast(nc->pongs.cond);
+    }
+
+    nc->pout = 0;
+
+    natsConn_Unlock(nc);
+}
+
+natsStatus
+natsConn_addSubcription(natsConnection *nc, natsSubscription *sub)
+{
+    natsStatus          s       = NATS_OK;
+    void                *oldSub = NULL;
+
+    s = natsHash_Set(nc->subs, sub->sid, (void*) sub, &oldSub);
+    if (s == NATS_OK)
+    {
+        assert(oldSub == NULL);
+        natsSub_retain(sub);
+    }
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+void
+natsConn_removeSubscription(natsConnection *nc, natsSubscription *removedSub)
+{
+    natsSubscription *sub = NULL;
+
+    natsMutex_Lock(nc->subsMu);
+
+    sub = natsHash_Remove(nc->subs, removedSub->sid);
+
+    // Note that the sub may have already been removed, so 'sub == NULL'
+    // is not an error.
+    if (sub != NULL)
+        natsSub_close(sub, false);
+
+    natsMutex_Unlock(nc->subsMu);
+
+    // If we really removed the subscription, then release it.
+    if (sub != NULL)
+        natsSub_release(sub);
+}
+
+static bool
+_isQueueNameValid(const char *name)
+{
+    int i;
+    int len;
+
+    if (nats_IsStringEmpty(name))
+        return false;
+
+    len = (int) strlen(name);
+    for (i=0; i<len ; i++)
+    {
+        if (isspace(name[i]))
+            return false;
+    }
+    return true;
+}
+
+// subscribe is the internal subscribe function that indicates interest in a subject.
+natsStatus
+natsConn_subscribeImpl(natsSubscription **newSub,
+                       natsConnection *nc, bool lock, const char *subj, const char *queue,
+                       int64_t timeout, natsMsgHandler cb, void *cbClosure,
+                       bool preventUseOfLibDlvPool, jsSub *jsi)
+{
+    natsStatus          s    = NATS_OK;
+    natsSubscription    *sub = NULL;
+
+    if (nc == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    if (!nats_IsSubjectValid(subj, true))
+        return nats_setDefaultError(NATS_INVALID_SUBJECT);
+
+    if ((queue != NULL) && !_isQueueNameValid(queue))
+        return nats_setDefaultError(NATS_INVALID_QUEUE_NAME);
+
+    if (lock)
+        natsConn_Lock(nc);
+
+    if (natsConn_isClosed(nc))
+    {
+        if (lock)
+            natsConn_Unlock(nc);
+
+        return nats_setDefaultError(NATS_CONNECTION_CLOSED);
+    }
+
+    if (natsConn_isDraining(nc))
+    {
+        if (lock)
+            natsConn_Unlock(nc);
+
+        return nats_setDefaultError(NATS_DRAINING);
+    }
+
+    s = natsSub_create(&sub, nc, subj, queue, timeout, cb, cbClosure, preventUseOfLibDlvPool, jsi);
+    if (s == NATS_OK)
+    {
+        natsMutex_Lock(nc->subsMu);
+        sub->sid = ++(nc->ssid);
+        s = natsConn_addSubcription(nc, sub);
+        natsMutex_Unlock(nc->subsMu);
+    }
+
+    if (s == NATS_OK)
+    {
+        // We will send these for all subs when we reconnect
+        // so that we can suppress here.
+        if (!natsConn_isReconnecting(nc))
+        {
+            SET_WRITE_DEADLINE(nc);
+            s = natsConn_sendSubProto(nc, subj, queue, sub->sid);
+            if (s == NATS_OK)
+                s = natsConn_flushOrKickFlusher(nc);
+
+            // We should not return a failure if we get an issue
+            // with the buffer write (except if it is no memory).
+            // For IO errors (if we just got disconnected), the
+            // reconnect logic will resend the sub protocol.
+            if (s != NATS_NO_MEMORY)
+                s = NATS_OK;
+        }
+    }
+
+    if (s == NATS_OK)
+    {
+        *newSub = sub;
+    }
+    else if (sub != NULL)
+    {
+        // A delivery thread may have been started, but the subscription not
+        // added to the connection's subscription map. So this is necessary
+        // for the delivery thread to unroll.
+        natsSub_close(sub, false);
+
+        natsConn_removeSubscription(nc, sub);
+
+        natsSub_release(sub);
+    }
+
+    if (lock)
+        natsConn_Unlock(nc);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+// Will queue an UNSUB protocol, making sure it is not flushed in place.
+// The connection lock is held on entry.
+natsStatus
+natsConn_enqueueUnsubProto(natsConnection *nc, int64_t sid)
+{
+    natsStatus  s       = NATS_OK;
+    char        *proto  = NULL;
+    int         res     = 0;
+
+    res = nats_asprintf(&proto, _UNSUB_NO_MAX_PROTO_, sid);
+    if (res < 0)
+        s = nats_setDefaultError(NATS_NO_MEMORY);
+    else
+    {
+        nc->dontSendInPlace = true;
+        natsConn_bufferWrite(nc, (const char*) proto, (int) strlen(proto));
+        nc->dontSendInPlace = false;
+        NATS_FREE(proto);
+    }
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+// Performs the low level unsubscribe to the server.
+natsStatus
+natsConn_unsubscribe(natsConnection *nc, natsSubscription *sub, int max, bool drainMode, int64_t timeout)
+{
+    natsStatus      s = NATS_OK;
+
+    natsConn_Lock(nc);
+
+    if (natsConn_isClosed(nc))
+    {
+        natsConn_Unlock(nc);
+        return nats_setDefaultError(NATS_CONNECTION_CLOSED);
+    }
+
+    natsMutex_Lock(nc->subsMu);
+    sub = natsHash_Get(nc->subs, sub->sid);
+    natsMutex_Unlock(nc->subsMu);
+    if ((sub == NULL) || !natsSubscription_IsValid(sub))
+    {
+        // Already unsubscribed
+        natsConn_Unlock(nc);
+        return nats_setDefaultError(NATS_INVALID_SUBSCRIPTION);
+    }
+
+    if (max > 0)
+    {
+        // If we try to set a max but number of delivered messages
+        // is already higher than that, then we will do an actual
+        // remove.
+        if (!natsSub_setMax(sub, max))
+            max = 0;
+    }
+    if ((max == 0) && !drainMode)
+        natsConn_removeSubscription(nc, sub);
+
+    if (!drainMode && !natsConn_isReconnecting(nc))
+    {
+        SET_WRITE_DEADLINE(nc);
+        // We will send these for all subs when we reconnect
+        // so that we can suppress here.
+        s = natsConn_sendUnsubProto(nc, sub->sid, max);
+        if (s == NATS_OK)
+            s = natsConn_flushOrKickFlusher(nc);
+
+        // We should not return a failure if we get an issue
+        // with the buffer write (except if it is no memory).
+        // For IO errors (if we just got disconnected), the
+        // reconnect logic will resend the unsub protocol.
+        if ((s != NATS_OK) && (s != NATS_NO_MEMORY))
+        {
+            nats_clearLastError();
+            s = NATS_OK;
+        }
+    }
+    else if (drainMode)
+    {
+        if (natsConn_isDraining(nc))
+             s = nats_setError(NATS_DRAINING, "%s", "Illegal to drain a subscription while its connection is draining");
+        else
+            s = natsSub_startDrain(sub, timeout);
+    }
+
+    natsConn_Unlock(nc);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_setupServerPool(natsConnection *nc)
+{
+    natsStatus  s;
+
+    s = natsSrvPool_Create(&(nc->srvPool), nc->opts);
+    if (s == NATS_OK)
+        nc->cur = natsSrvPool_GetSrv(nc->srvPool, 0);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsConn_create(natsConnection **newConn, natsOptions *options)
+{
+    natsStatus      s   = NATS_OK;
+    natsConnection  *nc = NULL;
+
+    s = nats_Open(-1);
+    if (s == NATS_OK)
+    {
+        nc = NATS_CALLOC(1, sizeof(natsConnection));
+        if (nc == NULL)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+    }
+    if (s != NATS_OK)
+    {
+        // options have been cloned or created for the connection,
+        // which was supposed to take ownership, so destroy it now.
+        natsOptions_Destroy(options);
+        return NATS_UPDATE_ERR_STACK(s);
+    }
+
+    natsLib_Retain();
+
+    nc->refs        = 1;
+    nc->sockCtx.fd  = NATS_SOCK_INVALID;
+    nc->opts        = options;
+
+    nc->errStr[0] = '\0';
+
+    s = natsMutex_Create(&(nc->mu));
+    if (s == NATS_OK)
+        s = natsMutex_Create(&(nc->subsMu));
+    if (s == NATS_OK)
+        s = _setupServerPool(nc);
+    if (s == NATS_OK)
+        s = natsHash_Create(&(nc->subs), 8);
+    if (s == NATS_OK)
+        s = natsSock_Init(&nc->sockCtx);
+    if (s == NATS_OK)
+    {
+        s = natsBuf_Create(&(nc->scratch), DEFAULT_SCRATCH_SIZE);
+        if (s == NATS_OK)
+            s = natsBuf_Append(nc->scratch, _HPUB_P_, _HPUB_P_LEN_);
+    }
+    if (s == NATS_OK)
+        s = natsCondition_Create(&(nc->flusherCond));
+    if (s == NATS_OK)
+        s = natsCondition_Create(&(nc->pongs.cond));
+    if (s == NATS_OK)
+        s = natsCondition_Create(&(nc->reconnectCond));
+
+    if (s == NATS_OK)
+    {
+        if (nc->opts->inboxPfx != NULL)
+            nc->inboxPfx = (const char*) nc->opts->inboxPfx;
+        else
+            nc->inboxPfx = NATS_DEFAULT_INBOX_PRE;
+
+        nc->inboxPfxLen = (int) strlen(nc->inboxPfx);
+        nc->reqIdOffset = nc->inboxPfxLen+NUID_BUFFER_LEN+1;
+    }
+
+    if (s == NATS_OK)
+        *newConn = nc;
+    else
+        natsConn_release(nc);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsConnection_Connect(natsConnection **newConn, natsOptions *options)
+{
+    natsStatus      s       = NATS_OK;
+    natsConnection  *nc     = NULL;
+    natsOptions     *opts   = NULL;
+
+    if (options == NULL)
+    {
+        s = natsConnection_ConnectTo(newConn, NATS_DEFAULT_URL);
+        return NATS_UPDATE_ERR_STACK(s);
+    }
+
+    opts = natsOptions_clone(options);
+    if (opts == NULL)
+        s = NATS_NO_MEMORY;
+
+    if (s == NATS_OK)
+        s = natsConn_create(&nc, opts);
+    if (s == NATS_OK)
+        s = _connect(nc);
+
+    if ((s == NATS_OK) || (s == NATS_NOT_YET_CONNECTED))
+        *newConn = nc;
+    else
+        natsConn_release(nc);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_processUrlString(natsOptions *opts, const char *urls)
+{
+    int         count        = 0;
+    natsStatus  s            = NATS_OK;
+    char        **serverUrls = NULL;
+    char        *urlsCopy    = NULL;
+    char        *commaPos    = NULL;
+    char        *ptr         = NULL;
+
+    if (urls != NULL)
+    {
+        ptr = (char*) urls;
+        while ((ptr = strchr(ptr, ',')) != NULL)
+        {
+            ptr++;
+            count++;
+        }
+    }
+    if (count == 0)
+        return natsOptions_SetURL(opts, urls);
+
+    serverUrls = (char**) NATS_CALLOC(count + 1, sizeof(char*));
+    if (serverUrls == NULL)
+        s = NATS_NO_MEMORY;
+    if (s == NATS_OK)
+    {
+        urlsCopy = NATS_STRDUP(urls);
+        if (urlsCopy == NULL)
+        {
+            NATS_FREE(serverUrls);
+            return NATS_NO_MEMORY;
+        }
+    }
+
+    count = 0;
+    ptr = urlsCopy;
+
+    do
+    {
+        serverUrls[count++] = ptr;
+
+        commaPos = strchr(ptr, ',');
+        if (commaPos != NULL)
+        {
+            ptr = (char*)(commaPos + 1);
+            *(commaPos) = '\0';
+        }
+
+    } while (commaPos != NULL);
+
+    if (s == NATS_OK)
+        s = natsOptions_SetServers(opts, (const char**) serverUrls, count);
+
+    NATS_FREE(urlsCopy);
+    NATS_FREE(serverUrls);
+
+    return s;
+}
+
+natsStatus
+natsConnection_ConnectTo(natsConnection **newConn, const char *url)
+{
+    natsStatus      s       = NATS_OK;
+    natsConnection  *nc     = NULL;
+    natsOptions     *opts   = NULL;
+
+    s = natsOptions_Create(&opts);
+    if (s == NATS_OK)
+    {
+        s = _processUrlString(opts, url);
+        // We still own the options at this point (until the call to natsConn_create())
+        // so if there was an error, we need to destroy the options now.
+        if (s != NATS_OK)
+            natsOptions_Destroy(opts);
+    }
+    if (s == NATS_OK)
+        s = natsConn_create(&nc, opts);
+    if (s == NATS_OK)
+        s = _connect(nc);
+
+    if (s == NATS_OK)
+        *newConn = nc;
+    else
+        natsConn_release(nc);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+// Test if connection  has been closed.
+bool
+natsConnection_IsClosed(natsConnection *nc)
+{
+    bool closed;
+
+    if (nc == NULL)
+        return true;
+
+    natsConn_Lock(nc);
+
+    closed = natsConn_isClosed(nc);
+
+    natsConn_Unlock(nc);
+
+    return closed;
+}
+
+// Test if connection is reconnecting.
+bool
+natsConnection_IsReconnecting(natsConnection *nc)
+{
+    bool reconnecting;
+
+    if (nc == NULL)
+        return false;
+
+    natsConn_Lock(nc);
+
+    reconnecting = natsConn_isReconnecting(nc);
+
+    natsConn_Unlock(nc);
+
+    return reconnecting;
+}
+
+bool
+natsConnection_IsDraining(natsConnection *nc)
+{
+    bool draining;
+
+    if (nc == NULL)
+        return false;
+
+    natsConn_Lock(nc);
+
+    draining = natsConn_isDraining(nc);
+
+    natsConn_Unlock(nc);
+
+    return draining;
+}
+
+// Returns the current state of the connection.
+natsConnStatus
+natsConnection_Status(natsConnection *nc)
+{
+    natsConnStatus cs;
+
+    if (nc == NULL)
+        return NATS_CONN_STATUS_CLOSED;
+
+    natsConn_Lock(nc);
+
+    cs = nc->status;
+
+    natsConn_Unlock(nc);
+
+    return cs;
+}
+
+static void
+_destroyPong(natsConnection *nc, natsPong *pong)
+{
+    // If this pong is the cached one, do not free
+    if (pong == &(nc->pongs.cached))
+        memset(pong, 0, sizeof(natsPong));
+    else
+        NATS_FREE(pong);
+}
+
+// Low-level flush. On entry, connection has been verified to no be closed
+// and lock is held.
+static natsStatus
+_flushTimeout(natsConnection *nc, int64_t timeout)
+{
+    natsStatus  s       = NATS_OK;
+    int64_t     target  = 0;
+    natsPong    *pong   = NULL;
+
+    // Use the cached PONG instead of creating one if the list
+    // is empty
+    if (nc->pongs.head == NULL)
+        pong = &(nc->pongs.cached);
+    else
+        pong = (natsPong*) NATS_CALLOC(1, sizeof(natsPong));
+
+    if (pong == NULL)
+        s = nats_setDefaultError(NATS_NO_MEMORY);
+
+    if (s == NATS_OK)
+    {
+        // Send the ping (and add the pong to the list)
+        _sendPing(nc, pong);
+
+        target = nats_setTargetTime(timeout);
+
+        // When the corresponding PONG is received, the PONG processing code
+        // will set pong->id to 0 and do a broadcast. This will allow this
+        // code to break out of the 'while' loop.
+        while ((s != NATS_TIMEOUT)
+               && !natsConn_isClosed(nc)
+               && (pong->id > 0))
+        {
+            s = natsCondition_AbsoluteTimedWait(nc->pongs.cond, nc->mu, target);
+        }
+
+        if ((s == NATS_OK) && (nc->status == NATS_CONN_STATUS_CLOSED))
+        {
+            // The connection has been closed while we were waiting
+            s = nats_setDefaultError(NATS_CONNECTION_CLOSED);
+        }
+        else if ((s == NATS_OK) && (pong->id == -1))
+        {
+            // The connection was disconnected and the library is in the
+            // process of trying to reconnect
+            s = nats_setDefaultError(NATS_CONNECTION_DISCONNECTED);
+        }
+
+        if (s != NATS_OK)
+        {
+            // If we are here, it is possible that we timed-out, or some other
+            // error occurred. Make sure the request is no longer in the list.
+            _removePongFromList(nc, pong);
+
+            // Set the error. If we don't do that, and flush is called in a loop,
+            // the stack would be growing with Flush/FlushTimeout.
+            s = nats_setDefaultError(s);
+        }
+
+        // We are done with the pong
+        _destroyPong(nc, pong);
+    }
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsConnection_FlushTimeout(natsConnection *nc, int64_t timeout)
+{
+    natsStatus  s       = NATS_OK;
+
+    if (nc == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    if (timeout <= 0)
+        return nats_setDefaultError(NATS_INVALID_TIMEOUT);
+
+    natsConn_lockAndRetain(nc);
+
+    if (natsConn_isClosed(nc))
+        s = nats_setDefaultError(NATS_CONNECTION_CLOSED);
+
+    if (s == NATS_OK)
+        s = _flushTimeout(nc, timeout);
+
+    natsConn_unlockAndRelease(nc);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsConnection_Flush(natsConnection *nc)
+{
+    natsStatus s = natsConnection_FlushTimeout(nc, DEFAULT_FLUSH_TIMEOUT);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static void
+_pushDrainErr(natsConnection *nc, natsStatus s, const char *errTxt)
+{
+    natsConn_Lock(nc);
+    if (nc->opts->asyncErrCb != NULL)
+    {
+        char tmp[256];
+        snprintf(tmp, sizeof(tmp), "Drain error: %s: %u (%s)", errTxt, s, natsStatus_GetText(s));
+        natsAsyncCb_PostErrHandler(nc, NULL, s, NATS_STRDUP(tmp));
+    }
+    natsConn_Unlock(nc);
+}
+
+// Callback invoked for each of the registered subscription.
+typedef natsStatus (*subIterFunc)(natsStatus callerSts, natsConnection *nc, natsSubscription *sub);
+
+// Iterates through all registered subscriptions and execute the callback `f`.
+// If the callback returns an error, the iteration continues and the first
+// non NATS_OK error is returned.
+//
+// Connection lock is held on entry.
+static natsStatus
+_iterateSubsAndInvokeFunc(natsStatus callerSts, natsConnection *nc, subIterFunc f)
+{
+    natsStatus       s    = NATS_OK;
+    natsStatus       ls   = NATS_OK;
+    natsSubscription *sub = NULL;
+    void             *p   = NULL;
+    natsHashIter     iter;
+
+    natsMutex_Lock(nc->subsMu);
+    if (natsHash_Count(nc->subs) == 0)
+    {
+        natsMutex_Unlock(nc->subsMu);
+        return NATS_OK;
+    }
+    natsHashIter_Init(&iter, nc->subs);
+    while (natsHashIter_Next(&iter, NULL, &p))
+    {
+        sub = (natsSubscription*) p;
+        ls = (f)(callerSts, nc, sub);
+        s = (s == NATS_OK ? ls : s);
+    }
+    natsHashIter_Done(&iter);
+    natsMutex_Unlock(nc->subsMu);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_enqueUnsubProto(natsStatus callerSts, natsConnection *nc, natsSubscription *sub)
+{
+    natsStatus s;
+
+    natsSub_Lock(sub);
+    s = natsConn_enqueueUnsubProto(nc, sub->sid);
+    natsSub_Unlock(sub);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_initSubDrain(natsStatus callerSts, natsConnection *nc, natsSubscription *sub)
+{
+    natsSub_initDrain(sub);
+    return NATS_OK;
+}
+
+static natsStatus
+_startSubDrain(natsStatus callerSts, natsConnection *nc, natsSubscription *sub)
+{
+    if (callerSts != NATS_OK)
+        natsSub_setDrainSkip(sub, callerSts);
+
+    natsSub_drain(sub);
+    return NATS_OK;
+}
+
+static natsStatus
+_setSubDrainStatus(natsStatus callerSts, natsConnection *nc, natsSubscription *sub)
+{
+    if (callerSts != NATS_OK)
+        natsSub_updateDrainStatus(sub, callerSts);
+    return NATS_OK;
+}
+
+static void
+_flushAndDrain(void *closure)
+{
+    natsConnection  *nc      = (natsConnection*) closure;
+    natsThread      *t       = NULL;
+    int64_t         timeout  = 0;
+    int64_t         deadline = 0;
+    bool            doSubs   = false;
+    bool            subsDone = false;
+    bool            timedOut = false;
+    bool            closed   = false;
+    natsStatus      s        = NATS_OK;
+    int64_t         start;
+
+    natsConn_Lock(nc);
+    t       = nc->drainThread;
+    timeout = nc->drainTimeout;
+    closed  = natsConn_isClosed(nc);
+    natsMutex_Lock(nc->subsMu);
+    doSubs = (natsHash_Count(nc->subs) > 0 ? true : false);
+    natsMutex_Unlock(nc->subsMu);
+    natsConn_Unlock(nc);
+
+    if (timeout < 0)
+        timeout = 0;
+    else
+        deadline = nats_setTargetTime(timeout);
+
+    start = nats_Now();
+    if (!closed && doSubs)
+    {
+        if (timeout == 0)
+            s = natsConnection_Flush(nc);
+        else
+            s = natsConnection_FlushTimeout(nc, timeout);
+
+        if (s != NATS_OK)
+            _pushDrainErr(nc, s, "unable to flush all subscriptions UNSUB protocols");
+
+        // Start the draining of all registered subscriptions.
+        // Update the drain status with possibly failed flush.
+        natsConn_Lock(nc);
+        _iterateSubsAndInvokeFunc(s, nc, _startSubDrain);
+        natsConn_Unlock(nc);
+
+        // Reset status now.
+        s = NATS_OK;
+
+        // Now wait for the number of subscriptions to go down to 0, or deadline is reached.
+        while ((timeout == 0) || (deadline - nats_Now() > 0))
+        {
+            natsConn_Lock(nc);
+            if (!(closed = natsConn_isClosed(nc)))
+            {
+                natsMutex_Lock(nc->subsMu);
+                subsDone = (natsHash_Count(nc->subs) == 0 ? true : false);
+                natsMutex_Unlock(nc->subsMu);
+            }
+            natsConn_Unlock(nc);
+            if (closed || subsDone)
+                break;
+            nats_Sleep(100);
+        }
+        // If the connection has been closed, then the subscriptions will have
+        // be removed from the map. So only try to update the subs' drain status
+        // if we are here due to a NATS_TIMEOUT, not a NATS_CONNECTION_CLOSED.
+        if (!closed && !subsDone)
+        {
+            _iterateSubsAndInvokeFunc(NATS_TIMEOUT, nc, _setSubDrainStatus);
+            _pushDrainErr(nc, NATS_TIMEOUT, "timeout waiting for subscriptions to drain");
+            timedOut = true;
+        }
+    }
+
+    // Now switch to draining PUBS, unless already closed.
+    natsConn_Lock(nc);
+    if (!(closed = natsConn_isClosed(nc)))
+        nc->status = NATS_CONN_STATUS_DRAINING_PUBS;
+    natsConn_Unlock(nc);
+
+    // Attempt to flush, unless we have already timed out, or connection is closed.
+    if (!closed && !timedOut)
+    {
+        // Reset status
+        s = NATS_OK;
+
+        // We drain the publish calls
+        if (timeout == 0)
+            s = natsConnection_Flush(nc);
+        else
+        {
+            // If there is a timeout, see how long do we have left.
+            int64_t elapsed = nats_Now() - start;
+
+            if (elapsed < timeout)
+                s = natsConnection_FlushTimeout(nc, timeout-elapsed);
+        }
+        if (s != NATS_OK)
+            _pushDrainErr(nc, s, "unable to flush publish calls");
+    }
+
+    // Finally, close the connection.
+    if (!closed)
+        natsConnection_Close(nc);
+
+    natsThread_Detach(t);
+    natsThread_Destroy(t);
+    natsConn_release(nc);
+}
+
+static natsStatus
+_drain(natsConnection *nc, int64_t timeout)
+{
+    natsStatus s = NATS_OK;
+
+    if (nc == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    natsConn_Lock(nc);
+    if (natsConn_isClosed(nc))
+        s = nats_setDefaultError(NATS_CONNECTION_CLOSED);
+    else if (nc->stanOwned)
+        s = nats_setError(NATS_ILLEGAL_STATE, "%s", "Illegal to call Drain for connection owned by a streaming connection");
+    else if (_isConnecting(nc) || natsConn_isReconnecting(nc))
+        s = nats_setError(NATS_ILLEGAL_STATE, "%s", "Illegal to call Drain while the connection is reconnecting");
+    else if (!natsConn_isDraining(nc))
+    {
+        // Enqueue UNSUB protocol for all current subscriptions.
+        s = _iterateSubsAndInvokeFunc(NATS_OK, nc, _enqueUnsubProto);
+        if (s == NATS_OK)
+        {
+            nc->drainTimeout = timeout;
+            s = natsThread_Create(&nc->drainThread, _flushAndDrain, (void*) nc);
+            if (s == NATS_OK)
+            {
+                // Prevent new subscriptions to be added.
+                nc->status = NATS_CONN_STATUS_DRAINING_SUBS;
+
+                // Switch drain state to "started" for all subs. This does not fail.
+                _iterateSubsAndInvokeFunc(NATS_OK, nc, _initSubDrain);
+
+                _retain(nc);
+            }
+        }
+    }
+    natsConn_Unlock(nc);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsConnection_Drain(natsConnection *nc)
+{
+    natsStatus s = _drain(nc, DEFAULT_DRAIN_TIMEOUT);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsConnection_DrainTimeout(natsConnection *nc, int64_t timeout)
+{
+    natsStatus s = _drain(nc, timeout);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+int
+natsConnection_Buffered(natsConnection *nc)
+{
+    int buffered = -1;
+
+    if (nc == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    natsConn_Lock(nc);
+
+    if ((nc->status != NATS_CONN_STATUS_CLOSED) && (nc->bw != NULL))
+        buffered = natsBuf_Len(nc->bw);
+
+    natsConn_Unlock(nc);
+
+    return buffered;
+}
+
+int64_t
+natsConnection_GetMaxPayload(natsConnection *nc)
+{
+    int64_t mp = 0;
+
+    if (nc == NULL)
+        return 0;
+
+    natsConn_Lock(nc);
+
+    mp = nc->info.maxPayload;
+
+    natsConn_Unlock(nc);
+
+    return mp;
+}
+
+natsStatus
+natsConnection_GetStats(natsConnection *nc, natsStatistics *stats)
+{
+    natsStatus  s = NATS_OK;
+
+    if ((nc == NULL) || (stats == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    // Stats are updated either under connection's mu or subsMu mutexes.
+    // Lock both to safely get them.
+    natsConn_Lock(nc);
+    natsMutex_Lock(nc->subsMu);
+
+    memcpy(stats, &(nc->stats), sizeof(natsStatistics));
+
+    natsMutex_Unlock(nc->subsMu);
+    natsConn_Unlock(nc);
+
+    return s;
+}
+
+natsStatus
+natsConnection_GetConnectedUrl(natsConnection *nc, char *buffer, size_t bufferSize)
+{
+    natsStatus  s = NATS_OK;
+
+    if ((nc == NULL) || (buffer == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    natsConn_Lock(nc);
+
+    buffer[0] = '\0';
+
+    if ((nc->status == NATS_CONN_STATUS_CONNECTED) && (nc->cur->url->fullUrl != NULL))
+    {
+        if (strlen(nc->cur->url->fullUrl) >= bufferSize)
+            s = nats_setDefaultError(NATS_INSUFFICIENT_BUFFER);
+
+        if (s == NATS_OK)
+            snprintf(buffer, bufferSize, "%s", nc->cur->url->fullUrl);
+    }
+
+    natsConn_Unlock(nc);
+
+    return s;
+}
+
+natsStatus
+natsConnection_GetConnectedServerId(natsConnection *nc, char *buffer, size_t bufferSize)
+{
+    natsStatus  s = NATS_OK;
+
+    if ((nc == NULL) || (buffer == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    natsConn_Lock(nc);
+
+    buffer[0] = '\0';
+
+    if ((nc->status == NATS_CONN_STATUS_CONNECTED) && (nc->info.id != NULL))
+    {
+        if (strlen(nc->info.id) >= bufferSize)
+            s = nats_setDefaultError(NATS_INSUFFICIENT_BUFFER);
+
+        if (s == NATS_OK)
+            snprintf(buffer, bufferSize, "%s", nc->info.id);
+    }
+
+    natsConn_Unlock(nc);
+
+    return s;
+}
+
+natsStatus
+natsConnection_GetServers(natsConnection *nc, char ***servers, int *count)
+{
+    natsStatus  s       = NATS_OK;
+
+    if ((nc == NULL) || (servers == NULL) || (count == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    natsConn_Lock(nc);
+
+    s = natsSrvPool_GetServers(nc->srvPool, false, servers, count);
+
+    natsConn_Unlock(nc);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsConnection_GetDiscoveredServers(natsConnection *nc, char ***servers, int *count)
+{
+    natsStatus  s       = NATS_OK;
+
+    if ((nc == NULL) || (servers == NULL) || (count == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    natsConn_Lock(nc);
+
+    s = natsSrvPool_GetServers(nc->srvPool, true, servers, count);
+
+    natsConn_Unlock(nc);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsConnection_GetLastError(natsConnection *nc, const char **lastError)
+{
+    natsStatus  s;
+
+    if (nc == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    natsConn_Lock(nc);
+
+    s = nc->err;
+    if (s == NATS_OK)
+        nc->errStr[0] = '\0';
+    else if (nc->errStr[0] == '\0')
+        snprintf(nc->errStr, sizeof(nc->errStr), "%s", natsStatus_GetText(s));
+
+    *lastError = nc->errStr;
+
+    natsConn_Unlock(nc);
+
+    return s;
+}
+
+void
+natsConn_close(natsConnection *nc)
+{
+    if (nc == NULL)
+        return;
+
+    nats_doNotUpdateErrStack(true);
+
+    _close(nc, NATS_CONN_STATUS_CLOSED, true, true);
+
+    nats_doNotUpdateErrStack(false);
+}
+
+void
+natsConnection_Close(natsConnection *nc)
+{
+    bool stanOwned;
+
+    if (nc == NULL)
+        return;
+
+    natsConn_Lock(nc);
+    stanOwned = nc->stanOwned;
+    natsConn_Unlock(nc);
+
+    if (!stanOwned)
+        natsConn_close(nc);
+}
+
+void
+natsConn_destroy(natsConnection *nc, bool fromPublicDestroy)
+{
+    if (nc == NULL)
+        return;
+
+    nats_doNotUpdateErrStack(true);
+
+    _close(nc, NATS_CONN_STATUS_CLOSED, fromPublicDestroy, true);
+
+    nats_doNotUpdateErrStack(false);
+
+    natsConn_release(nc);
+}
+
+void
+natsConnection_Destroy(natsConnection *nc)
+{
+    bool stanOwned;
+
+    if (nc == NULL)
+        return;
+
+    natsConn_Lock(nc);
+    stanOwned = nc->stanOwned;
+    natsConn_Unlock(nc);
+
+    if (!stanOwned)
+        natsConn_destroy(nc, true);
+}
+
+void
+natsConnection_ProcessReadEvent(natsConnection *nc)
+{
+    natsStatus      s = NATS_OK;
+    int             n = 0;
+    char            *buffer;
+    int             size;
+
+    natsConn_Lock(nc);
+
+    if (!(nc->el.attached) || (nc->sockCtx.fd == NATS_SOCK_INVALID))
+    {
+        natsConn_Unlock(nc);
+        return;
+    }
+
+    if (nc->ps == NULL)
+    {
+        s = natsParser_Create(&(nc->ps));
+        if (s != NATS_OK)
+        {
+            (void) NATS_UPDATE_ERR_STACK(s);
+            natsConn_Unlock(nc);
+            return;
+        }
+    }
+
+    _retain(nc);
+
+    buffer = nc->el.buffer;
+    size   = nc->opts->ioBufSize;
+
+    natsConn_Unlock(nc);
+
+    // Do not try to read again here on success. If more than one connection
+    // is attached to the same loop, and there is a constant stream of data
+    // coming for the first connection, this would starve the second connection.
+    // So return and we will be called back later by the event loop.
+    s = natsSock_Read(&(nc->sockCtx), buffer, size, &n);
+    if (s == NATS_OK)
+        s = natsParser_Parse(nc, buffer, n);
+
+    if (s != NATS_OK)
+        _processOpError(nc, s, false);
+
+    natsConn_release(nc);
+}
+
+void
+natsConnection_ProcessWriteEvent(natsConnection *nc)
+{
+    natsStatus  s = NATS_OK;
+    int         n = 0;
+    char        *buf;
+    int         len;
+
+    natsConn_Lock(nc);
+
+    if (!(nc->el.attached) || (nc->sockCtx.fd == NATS_SOCK_INVALID))
+    {
+        natsConn_Unlock(nc);
+        return;
+    }
+
+    buf = natsBuf_Data(nc->bw);
+    len = natsBuf_Len(nc->bw);
+
+    s = natsSock_Write(&(nc->sockCtx), buf, len, &n);
+    if (s == NATS_OK)
+    {
+        if (n == len)
+        {
+            // We sent all the data, reset buffer and remove WRITE event.
+            natsBuf_Reset(nc->bw);
+
+            s = nc->opts->evCbs.write(nc->el.data, NATS_EVENT_ACTION_REMOVE);
+            if (s == NATS_OK)
+                nc->el.writeAdded = false;
+            else
+                nats_setError(s, "Error processing write request: %d - %s",
+                              s, natsStatus_GetText(s));
+        }
+        else
+        {
+            // We sent some part of the buffer. Move the remaining at the beginning.
+            natsBuf_Consume(nc->bw, n);
+        }
+    }
+
+    natsConn_Unlock(nc);
+
+    if (s != NATS_OK)
+        _processOpError(nc, s, false);
+
+    (void) NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsConnection_GetClientID(natsConnection *nc, uint64_t *cid)
+{
+    natsStatus s = NATS_OK;
+
+    if ((nc == NULL) || (cid == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    natsConn_Lock(nc);
+    if (natsConn_isClosed(nc))
+    {
+        s = NATS_CONNECTION_CLOSED;
+    }
+    else
+    {
+        *cid = nc->info.CID;
+        if (*cid == 0)
+            s = NATS_NO_SERVER_SUPPORT;
+    }
+    natsConn_Unlock(nc);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_getJwtOrSeed(char **val, const char *fn, bool seed, int item)
+{
+    natsStatus  s       = NATS_OK;
+    natsBuffer  *buf    = NULL;
+
+    s = nats_ReadFile(&buf, 1024, fn);
+    if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    s = nats_GetJWTOrSeed(val, (const char*) natsBuf_Data(buf), item);
+    if (s == NATS_NOT_FOUND)
+    {
+        s = NATS_OK;
+        if (!seed)
+        {
+            *val = NATS_STRDUP(natsBuf_Data(buf));
+            if (*val == NULL)
+                s = nats_setDefaultError(NATS_NO_MEMORY);
+        }
+        else
+        {
+            // Look for "SU..."
+            char *nt  = NULL;
+            char *pch = nats_strtok(natsBuf_Data(buf), "\n", &nt);
+
+            while (pch != NULL)
+            {
+                char *ptr = pch;
+
+                while (((*ptr == ' ') || (*ptr == '\t')) && (*ptr != '\0'))
+                    ptr++;
+
+                if ((*ptr != '\0') && (*ptr == 'S') && (*(ptr+1) == 'U'))
+                {
+                    *val = NATS_STRDUP(ptr);
+                    if (*val == NULL)
+                        s = nats_setDefaultError(NATS_NO_MEMORY);
+                    break;
+                }
+
+                pch = nats_strtok(NULL, "\n", &nt);
+            }
+            if ((s == NATS_OK) && (*val == NULL))
+                s = nats_setError(NATS_ERR, "no nkey user seed found in '%s'", fn);
+        }
+    }
+    if (buf != NULL)
+    {
+        memset(natsBuf_Data(buf), 0, natsBuf_Capacity(buf));
+        natsBuf_Destroy(buf);
+        buf = NULL;
+    }
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsConn_userFromFile(char **userJWT, char **customErrTxt, void *closure)
+{
+    natsStatus  s   = NATS_OK;
+    userCreds   *uc = (userCreds*) closure;
+
+    s = _getJwtOrSeed(userJWT, uc->userOrChainedFile, false, 0);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_sign(userCreds *uc, const unsigned char *input, int inputLen, unsigned char *sig)
+{
+    natsStatus      s            = NATS_OK;
+    char            *encodedSeed = NULL;
+
+    if (uc->seedFile != NULL)
+        s = _getJwtOrSeed(&encodedSeed, uc->seedFile, true, 0);
+    else
+        s = _getJwtOrSeed(&encodedSeed, uc->userOrChainedFile, true, 1);
+
+    if (s == NATS_OK)
+        s = natsKeys_Sign((const char*) encodedSeed, input, inputLen, sig);
+
+    if (encodedSeed != NULL)
+    {
+        natsCrypto_Clear((void*) encodedSeed, (int) strlen(encodedSeed));
+        NATS_FREE(encodedSeed);
+    }
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsConn_signatureHandler(char **customErrTxt, unsigned char **psig, int *sigLen, const char *nonce, void *closure)
+{
+    natsStatus      s    = NATS_OK;
+    userCreds       *uc  = (userCreds*) closure;
+    char            *sig = NULL;
+
+    *psig = NULL;
+    if (sigLen != NULL)
+        *sigLen = 0;
+
+    sig = NATS_MALLOC(NATS_CRYPTO_SIGN_BYTES);
+    if (sig == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    s = _sign(uc, (const unsigned char*) nonce, 0, (unsigned char*) sig);
+    if (s == NATS_OK)
+    {
+        *psig = (unsigned char*) sig;
+        if (sigLen != NULL)
+            *sigLen = NATS_CRYPTO_SIGN_BYTES;
+    }
+    else
+    {
+        NATS_FREE(sig);
+    }
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsConnection_Sign(natsConnection *nc, const unsigned char *payload, int payloadLen, unsigned char sig[64])
+{
+    natsStatus  s   = NATS_OK;
+    userCreds   *uc = NULL;
+
+    if ((nc == NULL) || (payloadLen < 0) || (sig == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    natsConn_Lock(nc);
+    // We can't sign if that is not set...
+    uc = nc->opts->userCreds;
+    if (uc == NULL)
+        s = nats_setError(NATS_ERR, "%s", "unable to sign since no user credentials have been set");
+    else
+        s = _sign(uc, payload, payloadLen, sig);
+    natsConn_Unlock(nc);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsConnection_GetClientIP(natsConnection *nc, char **ip)
+{
+    natsStatus s = NATS_OK;
+
+    if ((nc == NULL) || (ip == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    *ip = NULL;
+
+    natsConn_Lock(nc);
+    if (natsConn_isClosed(nc))
+        s = nats_setDefaultError(NATS_CONNECTION_CLOSED);
+    else if (nc->info.clientIP == NULL)
+        s = nats_setDefaultError(NATS_NO_SERVER_SUPPORT);
+    else if ((*ip = NATS_STRDUP(nc->info.clientIP)) == NULL)
+        s = nats_setDefaultError(NATS_NO_MEMORY);
+    natsConn_Unlock(nc);
+
+    return s;
+}
+
+natsStatus
+natsConnection_GetRTT(natsConnection *nc, int64_t *rtt)
+{
+    natsStatus  s = NATS_OK;
+    int64_t     start;
+
+    if ((nc == NULL) || (rtt == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    *rtt = 0;
+
+    natsConn_Lock(nc);
+    if (natsConn_isClosed(nc))
+        s = nats_setDefaultError(NATS_CONNECTION_CLOSED);
+    else if (natsConn_isReconnecting(nc))
+        s = nats_setDefaultError(NATS_CONNECTION_DISCONNECTED);
+    else
+    {
+        start = nats_NowInNanoSeconds();
+        s = _flushTimeout(nc, DEFAULT_FLUSH_TIMEOUT);
+        if (s == NATS_OK)
+            *rtt = nats_NowInNanoSeconds()-start;
+    }
+    natsConn_Unlock(nc);
+
+    return s;
+}
+
+natsStatus
+natsConnection_HasHeaderSupport(natsConnection *nc)
+{
+    bool headers = false;
+
+    if (nc == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    natsConn_Lock(nc);
+    headers = nc->info.headers;
+    natsConn_Unlock(nc);
+
+    if (headers)
+        return NATS_OK;
+
+    return NATS_NO_SERVER_SUPPORT;
+}
+
+natsStatus
+natsConnection_GetLocalIPAndPort(natsConnection *nc, char **ip, int *port)
+{
+    natsStatus s = NATS_OK;
+
+    if ((nc == NULL) || (ip == NULL) || (port == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    *ip = NULL;
+    *port = 0;
+
+    natsConn_Lock(nc);
+    if (natsConn_isClosed(nc))
+        s = nats_setDefaultError(NATS_CONNECTION_CLOSED);
+    else if (!nc->sockCtx.fdActive)
+        s = nats_setDefaultError(NATS_CONNECTION_DISCONNECTED);
+    else
+        s = natsSock_GetLocalIPAndPort(&(nc->sockCtx), ip, port);
+    natsConn_Unlock(nc);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+void
+natsConn_setFilterWithClosure(natsConnection *nc, natsMsgFilter f, void* closure)
+{
+    natsMutex_Lock(nc->subsMu);
+    nc->filter        = f;
+    nc->filterClosure = closure;
+    natsMutex_Unlock(nc->subsMu);
+}
diff --git a/src/conn.h b/src/conn.h
new file mode 100644 (file)
index 0000000..b7eed8b
--- /dev/null
@@ -0,0 +1,160 @@
+// Copyright 2015-2021 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef CONN_H_
+#define CONN_H_
+
+#include "natsp.h"
+
+#define RESP_INFO_POOL_MAX_SIZE (10)
+
+#ifdef DEV_MODE
+// For type safety
+
+void natsConn_Lock(natsConnection *nc);
+void natsConn_Unlock(natsConnection *nc);
+
+#else
+// We know what we are doing :-)
+
+#define natsConn_Lock(c)    (natsMutex_Lock((c)->mu))
+#define natsConn_Unlock(c)  (natsMutex_Unlock((c)->mu))
+
+#endif // DEV_MODE
+
+#define SET_WRITE_DEADLINE(nc) if ((nc)->opts->writeDeadline > 0) natsDeadline_Init(&(nc)->sockCtx.writeDeadline, (nc)->opts->writeDeadline)
+
+natsStatus
+natsConn_create(natsConnection **newConn, natsOptions *options);
+
+void
+natsConn_retain(natsConnection *nc);
+
+void
+natsConn_release(natsConnection *nc);
+
+natsStatus
+natsConn_bufferWrite(natsConnection *nc, const char *buffer, int len);
+
+natsStatus
+natsConn_bufferFlush(natsConnection *nc);
+
+bool
+natsConn_isClosed(natsConnection *nc);
+
+bool
+natsConn_isReconnecting(natsConnection *nc);
+
+natsStatus
+natsConn_flushOrKickFlusher(natsConnection *nc);
+
+natsStatus
+natsConn_processMsg(natsConnection *nc, char *buf, int bufLen);
+
+void
+natsConn_processOK(natsConnection *nc);
+
+void
+natsConn_processErr(natsConnection *nc, char *buf, int bufLen);
+
+void
+natsConn_processPing(natsConnection *nc);
+
+void
+natsConn_processPong(natsConnection *nc);
+
+#define natsConn_subscribeNoPool(sub, nc, subj, cb, closure)                            natsConn_subscribeImpl((sub), (nc), true, (subj), NULL, 0, (cb), (closure), true, NULL)
+#define natsConn_subscribeNoPoolNoLock(sub, nc, subj, cb, closure)                      natsConn_subscribeImpl((sub), (nc), false, (subj), NULL, 0, (cb), (closure), true, NULL)
+#define natsConn_subscribeSyncNoPool(sub, nc, subj)                                     natsConn_subscribeNoPool((sub), (nc), (subj), NULL, NULL)
+#define natsConn_subscribeWithTimeout(sub, nc, subj, timeout, cb, closure)              natsConn_subscribeImpl((sub), (nc), true, (subj), NULL, (timeout), (cb), (closure), false, NULL)
+#define natsConn_subscribe(sub, nc, subj, cb, closure)                                  natsConn_subscribeWithTimeout((sub), (nc), (subj), 0, (cb), (closure))
+#define natsConn_subscribeSync(sub, nc, subj)                                           natsConn_subscribe((sub), (nc), (subj), NULL, NULL)
+#define natsConn_queueSubscribeWithTimeout(sub, nc, subj, queue, timeout, cb, closure)  natsConn_subscribeImpl((sub), (nc), true, (subj), (queue), (timeout), (cb), (closure), false, NULL)
+#define natsConn_queueSubscribe(sub, nc, subj, queue, cb, closure)                      natsConn_queueSubscribeWithTimeout((sub), (nc), (subj), (queue), 0, (cb), (closure))
+#define natsConn_queueSubscribeSync(sub, nc, subj, queue)                               natsConn_queueSubscribe((sub), (nc), (subj), (queue), NULL, NULL)
+
+natsStatus
+natsConn_subscribeImpl(natsSubscription **newSub,
+                       natsConnection *nc, bool lock, const char *subj, const char *queue,
+                       int64_t timeout, natsMsgHandler cb, void *cbClosure,
+                       bool preventUseOfLibDlvPool, jsSub *jsi);
+
+natsStatus
+natsConn_unsubscribe(natsConnection *nc, natsSubscription *sub, int max, bool drainMode, int64_t timeout);
+
+natsStatus
+natsConn_enqueueUnsubProto(natsConnection *nc, int64_t sid);
+
+natsStatus
+natsConn_drainSub(natsConnection *nc, natsSubscription *sub, bool checkConnDrainStatus);
+
+bool
+natsConn_isDraining(natsConnection *nc);
+
+bool
+natsConn_isDrainingPubs(natsConnection *nc);
+
+void
+natsConn_removeSubscription(natsConnection *nc, natsSubscription *sub);
+
+void
+natsConn_processAsyncINFO(natsConnection *nc, char *buf, int len);
+
+natsStatus
+natsConn_addRespInfo(respInfo **newResp, natsConnection *nc, char *respInbox, int respInboxSize);
+
+void
+natsConn_disposeRespInfo(natsConnection *nc, respInfo *resp, bool needsLock);
+
+natsStatus
+natsConn_initResp(natsConnection *nc, natsMsgHandler cb);
+
+void
+natsConn_destroyRespPool(natsConnection *nc);
+
+natsStatus
+natsConn_publish(natsConnection *nc, natsMsg *msg, const char *reply, bool directFlush);
+
+natsStatus
+natsConn_userFromFile(char **userJWT, char **customErrTxt, void *closure);
+
+natsStatus
+natsConn_signatureHandler(char **customErrTxt, unsigned char **sig, int *sigLen, const char *nonce, void *closure);
+
+natsStatus
+natsConn_sendSubProto(natsConnection *nc, const char *subject, const char *queue, int64_t sid);
+
+natsStatus
+natsConn_sendUnsubProto(natsConnection *nc, int64_t subId, int max);
+
+#define natsConn_setFilter(c, f) natsConn_setFilterWithClosure((c), (f), NULL)
+
+void
+natsConn_setFilterWithClosure(natsConnection *nc, natsMsgFilter f, void* closure);
+
+natsStatus
+natsConn_initInbox(natsConnection *nc, char *buf, int bufSize, char **newInbox, bool *allocated);
+
+natsStatus
+natsConn_newInbox(natsConnection *nc, natsInbox **newInbox);
+
+bool
+natsConn_srvVersionAtLeast(natsConnection *nc, int major, int minor, int update);
+
+void
+natsConn_close(natsConnection *nc);
+
+void
+natsConn_destroy(natsConnection *nc, bool fromPublicDestroy);
+
+#endif /* CONN_H_ */
diff --git a/src/crypto.c b/src/crypto.c
new file mode 100644 (file)
index 0000000..ee8aa38
--- /dev/null
@@ -0,0 +1,520 @@
+// Copyright 2019 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "crypto.h"
+
+#ifdef NATS_USE_LIBSODIUM
+#include <sodium.h>
+
+natsStatus
+natsCrypto_Init()
+{
+    return ((sodium_init() == -1) ? NATS_ERR : NATS_OK);
+}
+
+natsStatus
+natsCrypto_Sign(const unsigned char *seed,
+                const unsigned char *input, int inputLen,
+                unsigned char signature[NATS_CRYPTO_SIGN_BYTES])
+{
+    unsigned char pk[crypto_sign_PUBLICKEYBYTES];
+    unsigned char sk[crypto_sign_SECRETKEYBYTES];
+
+    crypto_sign_seed_keypair(pk, sk, seed);
+    crypto_sign_detached(signature, NULL, input, inputLen, sk);
+    sodium_memzero(sk, crypto_sign_SECRETKEYBYTES);
+    return NATS_OK;
+}
+
+void
+natsCrypto_Clear(void *mem, int memLen)
+{
+    sodium_memzero(mem, (size_t) memLen);
+}
+
+#else
+
+#include <string.h>
+
+#include "mem.h"
+#include "err.h"
+
+// Taken from https://tweetnacl.cr.yp.to/index.html
+// and simplified since we only need crypto_sign().
+// Also fixed some warnings due to different integer sizes.
+
+#define FOR(i,n) for (i=0;i<n;++i)
+
+typedef unsigned char       u8;
+typedef unsigned long       u32;
+typedef unsigned long long  u64;
+typedef long long           i64;
+typedef i64                 gf[16];
+
+static const gf gf0;
+static const gf gf1 = {1};
+static const gf D2  = {0xf159, 0x26b2, 0x9b94, 0xebd6, 0xb156, 0x8283, 0x149a, 0x00e0, 0xd130, 0xeef3, 0x80f2, 0x198e, 0xfce7, 0x56df, 0xd9dc, 0x2406};
+static const gf X   = {0xd51a, 0x8f25, 0x2d60, 0xc956, 0xa7b2, 0x9525, 0xc760, 0x692c, 0xdc5c, 0xfdd6, 0xe231, 0xc0a4, 0x53fe, 0xcd6e, 0x36d3, 0x2169};
+static const gf Y   = {0x6658, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666};
+
+static u64
+dl64(const u8 *x)
+{
+  u64 i,u=0;
+  FOR(i,8) u=(u<<8)|x[i];
+  return u;
+}
+
+static void
+ts64(u8 *x,u64 u)
+{
+  int i;
+  for (i = 7;i >= 0;--i)
+  {
+      x[i] = (u8)u;
+      u >>= 8;
+  }
+}
+
+static void
+set25519(gf r, const gf a)
+{
+  int i;
+  FOR(i,16) r[i]=a[i];
+}
+
+static void
+car25519(gf o)
+{
+  int i;
+  i64 c;
+  FOR(i,16) {
+    o[i]+=(1LL<<16);
+    c=o[i]>>16;
+    o[(i+1)*(i<15)]+=c-1+37*(c-1)*(i==15);
+    o[i]-=c<<16;
+  }
+}
+
+static void
+sel25519(gf p,gf q,int b)
+{
+  i64 t,i,c=~(b-1);
+  FOR(i,16) {
+    t= c&(p[i]^q[i]);
+    p[i]^=t;
+    q[i]^=t;
+  }
+}
+
+static void
+pack25519(u8 *o,const gf n)
+{
+  int i,j,b;
+  gf m,t;
+  FOR(i,16) t[i]=n[i];
+  car25519(t);
+  car25519(t);
+  car25519(t);
+  FOR(j,2) {
+    m[0]=t[0]-0xffed;
+    for(i=1;i<15;i++) {
+      m[i]=t[i]-0xffff-((m[i-1]>>16)&1);
+      m[i-1]&=0xffff;
+    }
+    m[15]=t[15]-0x7fff-((m[14]>>16)&1);
+    b=(m[15]>>16)&1;
+    m[14]&=0xffff;
+    sel25519(t,m,1-b);
+  }
+  FOR(i,16) {
+    o[2*i]=t[i]&0xff;
+    o[2*i+1]=(u8)(t[i]>>8);
+  }
+}
+
+static u8
+par25519(const gf a)
+{
+  u8 d[32];
+  pack25519(d,a);
+  return d[0]&1;
+}
+
+static void
+A(gf o,const gf a,const gf b)
+{
+  int i;
+  FOR(i,16) o[i]=a[i]+b[i];
+}
+
+static void
+Z(gf o,const gf a,const gf b)
+{
+  int i;
+  FOR(i,16) o[i]=a[i]-b[i];
+}
+
+static void
+M(gf o,const gf a,const gf b)
+{
+  i64 i,j,t[31];
+  FOR(i,31) t[i]=0;
+  FOR(i,16) FOR(j,16) t[i+j]+=a[i]*b[j];
+  FOR(i,15) t[i]+=38*t[i+16];
+  FOR(i,16) o[i]=t[i];
+  car25519(o);
+  car25519(o);
+}
+
+static void
+S(gf o,const gf a)
+{
+  M(o,a,a);
+}
+
+static void
+inv25519(gf o,const gf i)
+{
+  gf c;
+  int a;
+  FOR(a,16) c[a]=i[a];
+  for(a=253;a>=0;a--) {
+    S(c,c);
+    if(a!=2&&a!=4) M(c,c,i);
+  }
+  FOR(a,16) o[a]=c[a];
+}
+
+static u64 R(u64 x,int c) { return (x >> c) | (x << (64 - c)); }
+static u64 Ch(u64 x,u64 y,u64 z) { return (x & y) ^ (~x & z); }
+static u64 Maj(u64 x,u64 y,u64 z) { return (x & y) ^ (x & z) ^ (y & z); }
+static u64 Sigma0(u64 x) { return R(x,28) ^ R(x,34) ^ R(x,39); }
+static u64 Sigma1(u64 x) { return R(x,14) ^ R(x,18) ^ R(x,41); }
+static u64 sigma0(u64 x) { return R(x, 1) ^ R(x, 8) ^ (x >> 7); }
+static u64 sigma1(u64 x) { return R(x,19) ^ R(x,61) ^ (x >> 6); }
+
+static const u64 K[80] =
+{
+  0x428a2f98d728ae22ULL, 0x7137449123ef65cdULL, 0xb5c0fbcfec4d3b2fULL, 0xe9b5dba58189dbbcULL,
+  0x3956c25bf348b538ULL, 0x59f111f1b605d019ULL, 0x923f82a4af194f9bULL, 0xab1c5ed5da6d8118ULL,
+  0xd807aa98a3030242ULL, 0x12835b0145706fbeULL, 0x243185be4ee4b28cULL, 0x550c7dc3d5ffb4e2ULL,
+  0x72be5d74f27b896fULL, 0x80deb1fe3b1696b1ULL, 0x9bdc06a725c71235ULL, 0xc19bf174cf692694ULL,
+  0xe49b69c19ef14ad2ULL, 0xefbe4786384f25e3ULL, 0x0fc19dc68b8cd5b5ULL, 0x240ca1cc77ac9c65ULL,
+  0x2de92c6f592b0275ULL, 0x4a7484aa6ea6e483ULL, 0x5cb0a9dcbd41fbd4ULL, 0x76f988da831153b5ULL,
+  0x983e5152ee66dfabULL, 0xa831c66d2db43210ULL, 0xb00327c898fb213fULL, 0xbf597fc7beef0ee4ULL,
+  0xc6e00bf33da88fc2ULL, 0xd5a79147930aa725ULL, 0x06ca6351e003826fULL, 0x142929670a0e6e70ULL,
+  0x27b70a8546d22ffcULL, 0x2e1b21385c26c926ULL, 0x4d2c6dfc5ac42aedULL, 0x53380d139d95b3dfULL,
+  0x650a73548baf63deULL, 0x766a0abb3c77b2a8ULL, 0x81c2c92e47edaee6ULL, 0x92722c851482353bULL,
+  0xa2bfe8a14cf10364ULL, 0xa81a664bbc423001ULL, 0xc24b8b70d0f89791ULL, 0xc76c51a30654be30ULL,
+  0xd192e819d6ef5218ULL, 0xd69906245565a910ULL, 0xf40e35855771202aULL, 0x106aa07032bbd1b8ULL,
+  0x19a4c116b8d2d0c8ULL, 0x1e376c085141ab53ULL, 0x2748774cdf8eeb99ULL, 0x34b0bcb5e19b48a8ULL,
+  0x391c0cb3c5c95a63ULL, 0x4ed8aa4ae3418acbULL, 0x5b9cca4f7763e373ULL, 0x682e6ff3d6b2b8a3ULL,
+  0x748f82ee5defb2fcULL, 0x78a5636f43172f60ULL, 0x84c87814a1f0ab72ULL, 0x8cc702081a6439ecULL,
+  0x90befffa23631e28ULL, 0xa4506cebde82bde9ULL, 0xbef9a3f7b2c67915ULL, 0xc67178f2e372532bULL,
+  0xca273eceea26619cULL, 0xd186b8c721c0c207ULL, 0xeada7dd6cde0eb1eULL, 0xf57d4f7fee6ed178ULL,
+  0x06f067aa72176fbaULL, 0x0a637dc5a2c898a6ULL, 0x113f9804bef90daeULL, 0x1b710b35131c471bULL,
+  0x28db77f523047d84ULL, 0x32caab7b40c72493ULL, 0x3c9ebe0a15c9bebcULL, 0x431d67c49c100d4cULL,
+  0x4cc5d4becb3e42b6ULL, 0x597f299cfc657e2aULL, 0x5fcb6fab3ad6faecULL, 0x6c44198c4a475817ULL
+};
+
+static void
+crypto_hashblocks(u8 *x,const u8 *m,u64 n)
+{
+  u64 z[8],b[8],a[8],w[16],t;
+  int i,j;
+
+  FOR(i,8) z[i] = a[i] = dl64(x + 8 * i);
+
+  while (n >= 128) {
+    FOR(i,16) w[i] = dl64(m + 8 * i);
+
+    FOR(i,80) {
+      FOR(j,8) b[j] = a[j];
+      t = a[7] + Sigma1(a[4]) + Ch(a[4],a[5],a[6]) + K[i] + w[i%16];
+      b[7] = t + Sigma0(a[0]) + Maj(a[0],a[1],a[2]);
+      b[3] += t;
+      FOR(j,8) a[(j+1)%8] = b[j];
+      if (i%16 == 15)
+       FOR(j,16)
+         w[j] += w[(j+9)%16] + sigma0(w[(j+1)%16]) + sigma1(w[(j+14)%16]);
+    }
+
+    FOR(i,8) { a[i] += z[i]; z[i] = a[i]; }
+
+    m += 128;
+    n -= 128;
+  }
+
+  FOR(i,8) ts64(x+8*i,z[i]);
+}
+
+static const u8 iv[64] = {
+  0x6a,0x09,0xe6,0x67,0xf3,0xbc,0xc9,0x08,
+  0xbb,0x67,0xae,0x85,0x84,0xca,0xa7,0x3b,
+  0x3c,0x6e,0xf3,0x72,0xfe,0x94,0xf8,0x2b,
+  0xa5,0x4f,0xf5,0x3a,0x5f,0x1d,0x36,0xf1,
+  0x51,0x0e,0x52,0x7f,0xad,0xe6,0x82,0xd1,
+  0x9b,0x05,0x68,0x8c,0x2b,0x3e,0x6c,0x1f,
+  0x1f,0x83,0xd9,0xab,0xfb,0x41,0xbd,0x6b,
+  0x5b,0xe0,0xcd,0x19,0x13,0x7e,0x21,0x79
+} ;
+
+static int
+crypto_hash(u8 *out,const u8 *m,u64 n)
+{
+  u8 h[64],x[256];
+  u64 i,b = n;
+
+  FOR(i,64) h[i] = iv[i];
+
+  crypto_hashblocks(h,m,n);
+  m += n;
+  n &= 127;
+  m -= n;
+
+  FOR(i,256) x[i] = 0;
+  FOR(i,n) x[i] = m[i];
+  x[n] = 128;
+
+  n = 256-128*(n<112);
+  x[n-9] = b >> 61;
+  ts64(x+n-8,b<<3);
+  crypto_hashblocks(h,x,n);
+
+  FOR(i,64) out[i] = h[i];
+
+  return 0;
+}
+
+static void
+add(gf p[4],gf q[4])
+{
+  gf a,b,c,d,t,e,f,g,h;
+
+  Z(a, p[1], p[0]);
+  Z(t, q[1], q[0]);
+  M(a, a, t);
+  A(b, p[0], p[1]);
+  A(t, q[0], q[1]);
+  M(b, b, t);
+  M(c, p[3], q[3]);
+  M(c, c, D2);
+  M(d, p[2], q[2]);
+  A(d, d, d);
+  Z(e, b, a);
+  Z(f, d, c);
+  A(g, d, c);
+  A(h, b, a);
+
+  M(p[0], e, f);
+  M(p[1], h, g);
+  M(p[2], g, f);
+  M(p[3], e, h);
+}
+
+static void
+cswap(gf p[4],gf q[4],u8 b)
+{
+  int i;
+  FOR(i,4)
+    sel25519(p[i],q[i],b);
+}
+
+static void
+pack(u8 *r,gf p[4])
+{
+  gf tx, ty, zi;
+  inv25519(zi, p[2]);
+  M(tx, p[0], zi);
+  M(ty, p[1], zi);
+  pack25519(r, ty);
+  r[31] ^= par25519(tx) << 7;
+}
+
+static void
+scalarmult(gf p[4],gf q[4],const u8 *s)
+{
+  int i;
+  set25519(p[0],gf0);
+  set25519(p[1],gf1);
+  set25519(p[2],gf1);
+  set25519(p[3],gf0);
+  for (i = 255;i >= 0;--i) {
+    u8 b = (s[i/8]>>(i&7))&1;
+    cswap(p,q,b);
+    add(q,p);
+    add(p,p);
+    cswap(p,q,b);
+  }
+}
+
+static void
+scalarbase(gf p[4],const u8 *s)
+{
+  gf q[4];
+  set25519(q[0],X);
+  set25519(q[1],Y);
+  set25519(q[2],gf1);
+  M(q[3],X,Y);
+  scalarmult(p,q,s);
+}
+
+static const u64 L[32] = {0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x10};
+
+static void
+modL(u8 *r,i64 x[64])
+{
+  i64 carry,i,j;
+  for (i = 63;i >= 32;--i) {
+    carry = 0;
+    for (j = i - 32;j < i - 12;++j) {
+      x[j] += carry - 16 * x[i] * L[j - (i - 32)];
+      carry = (x[j] + 128) >> 8;
+      x[j] -= carry << 8;
+    }
+    x[j] += carry;
+    x[i] = 0;
+  }
+  carry = 0;
+  FOR(j,32) {
+    x[j] += carry - (x[31] >> 4) * L[j];
+    carry = x[j] >> 8;
+    x[j] &= 255;
+  }
+  FOR(j,32) x[j] -= carry * L[j];
+  FOR(i,32) {
+    x[i+1] += x[i] >> 8;
+    r[i] = x[i] & 255;
+  }
+}
+
+static void
+reduce(u8 *r)
+{
+  i64 x[64],i;
+  FOR(i,64) x[i] = (u64) r[i];
+  FOR(i,64) r[i] = 0;
+  modL(r,x);
+}
+
+static void
+newKeyFromSeed(const unsigned char *seed, unsigned char *sk)
+{
+    u8  d[64];
+    gf  p[4];
+    u64 i;
+    u8  pk[32];
+
+    crypto_hash(d, seed, 32);
+    d[0] &= 248;
+    d[31] &= 127;
+    d[31] |= 64;
+
+    scalarbase(p,d);
+    pack(pk,p);
+
+    FOR(i,32) sk[i] = seed[i];
+    FOR(i,32) sk[32 + i] = pk[i];
+}
+
+static void
+cryptoSign(unsigned char *sm,
+           const unsigned char *m, int mlen,
+           const unsigned char *sk)
+{
+  u8    d[64],h[64],r[64];
+  i64   j,x[64];
+  u64   i;
+  gf    p[4];
+  u64   n = (u64) mlen;
+
+  crypto_hash(d, sk, 32);
+  d[0] &= 248;
+  d[31] &= 127;
+  d[31] |= 64;
+
+  FOR(i,n) sm[64 + i] = m[i];
+  FOR(i,32) sm[32 + i] = d[32 + i];
+
+  crypto_hash(r, sm+32, n+32);
+  reduce(r);
+  scalarbase(p,r);
+  pack(sm,p);
+
+  FOR(i,32) sm[i+32] = sk[i+32];
+  crypto_hash(h,sm,n + 64);
+  reduce(h);
+
+  FOR(i,64) x[i] = 0;
+  FOR(i,32) x[i] = (u64) r[i];
+  FOR(i,32) FOR(j,32) x[i+j] += h[i] * (u64) d[j];
+  modL(sm + 32,x);
+}
+
+// secure_memzero() tries to effectively set to zero a given number
+// of bytes, even if optimizations are applied to the code.
+// Code derived from sodium_memzero()
+static void
+secure_memzero(void * const pnt, const size_t len)
+{
+#ifdef _WIN32
+    SecureZeroMemory(pnt, len);
+#elif defined(HAVE_EXPLICIT_BZERO)
+    explicit_bzero(pnt, len);
+#elif defined(HAVE_EXPLICIT_MEMSET)
+    explicit_memset(pnt, 0, len);
+#else
+    volatile unsigned char *volatile p =
+        (volatile unsigned char *volatile) pnt;
+    size_t i;
+    for (i = 0; i < len; i++) {
+        p[i] = 0;
+    }
+#endif
+}
+
+natsStatus
+natsCrypto_Init()
+{
+  return NATS_OK;
+}
+
+natsStatus
+natsCrypto_Sign(const unsigned char *seed,
+                const unsigned char *input, int inputLen,
+                unsigned char signature[NATS_CRYPTO_SIGN_BYTES])
+{
+    char          *sm = NULL;
+    unsigned char sk[NATS_CRYPTO_SECRET_BYTES];
+
+    sm = NATS_MALLOC(inputLen + NATS_CRYPTO_SIGN_BYTES);
+    if (sm == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    newKeyFromSeed(seed, sk);
+    cryptoSign((unsigned char*) sm, input, inputLen, sk);
+    memcpy(signature, sm, NATS_CRYPTO_SIGN_BYTES);
+    secure_memzero((void*) sm, NATS_CRYPTO_SIGN_BYTES);
+    secure_memzero((void*) sk, sizeof(sk));
+    NATS_FREE(sm);
+    return NATS_OK;
+}
+
+void
+natsCrypto_Clear(void *mem, int memLen)
+{
+    secure_memzero(mem, (size_t) memLen);
+}
+
+#endif
diff --git a/src/crypto.h b/src/crypto.h
new file mode 100644 (file)
index 0000000..921c154
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright 2019 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef CRYPTO_H_
+#define CRYPTO_H_
+
+#include "status.h"
+
+#define NATS_CRYPTO_SECRET_BYTES    64
+#define NATS_CRYPTO_SIGN_BYTES      64
+
+natsStatus
+natsCrypto_Init(void);
+
+natsStatus
+natsCrypto_Sign(const unsigned char *seed,
+                const unsigned char *input, int inputLen,
+                unsigned char signature[NATS_CRYPTO_SIGN_BYTES]);
+
+void
+natsCrypto_Clear(void *mem, int memLen);
+
+#endif /* CRYPTO_H_ */
diff --git a/src/deprnats.h b/src/deprnats.h
new file mode 100644 (file)
index 0000000..8bdc620
--- /dev/null
@@ -0,0 +1,25 @@
+// Copyright 2017-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef SRC_DEPRNATS_H_
+#define SRC_DEPRNATS_H_
+
+#ifndef _WIN32
+#warning "`#include <nats.h>` is deprecated. Please use `#include <nats/nats.h>`"
+#else
+#pragma message ("`#include <nats.h>` is deprecated. Please use `#include <nats/nats.h>`")
+#endif
+
+#include <nats/nats.h>
+
+#endif /* SRC_DEPRNATS_H_ */
diff --git a/src/err.h b/src/err.h
new file mode 100644 (file)
index 0000000..9a7a953
--- /dev/null
+++ b/src/err.h
@@ -0,0 +1,50 @@
+// Copyright 2015-2019 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+
+#ifndef ERR_H_
+#define ERR_H_
+
+#include "status.h"
+#include "nats.h"
+#include "natsp.h"
+
+#define NATS_SSL_ERR_REASON_STRING ERR_reason_error_string(ERR_get_error())
+
+#define nats_setDefaultError(e) nats_setError((e), "%s", natsStatus_GetText(e))
+
+#define nats_setError(e, f, ...) nats_setErrorReal(__FILE__, __NATS_FUNCTION__, __LINE__, (e), (f), __VA_ARGS__)
+
+natsStatus
+nats_setErrorReal(const char *fileName, const char *funcName, int line, natsStatus errSts, const char *errTxtFmt, ...);
+
+#define NATS_UPDATE_ERR_STACK(s) (s == NATS_OK ? s : nats_updateErrStack(s, __NATS_FUNCTION__))
+
+natsStatus
+nats_updateErrStack(natsStatus err, const char *func);
+
+void
+nats_clearLastError(void);
+
+void
+nats_doNotUpdateErrStack(bool skipStackUpdate);
+
+#define NATS_UPDATE_ERR_TXT(f, ...) nats_updateErrTxt(__FILE__, __NATS_FUNCTION__, __LINE__, (f), __VA_ARGS__)
+
+void
+nats_updateErrTxt(const char *fileName, const char *funcName, int line, const char *errTxtFmt, ...);
+
+void
+nats_setErrStatusAndTxt(natsStatus err, const char *errTxt);
+
+#endif /* ERR_H_ */
diff --git a/src/gc.h b/src/gc.h
new file mode 100644 (file)
index 0000000..22d0728
--- /dev/null
+++ b/src/gc.h
@@ -0,0 +1,38 @@
+// Copyright 2015-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+
+#ifndef GC_H_
+#define GC_H_
+
+// This callback implements the specific code to free the given object.
+// This is invoked by the garbage collector.
+typedef void (*nats_FreeObjectCb)(void *object);
+
+// This structure should be included as the first field of any object
+// that needs to be garbage collected.
+typedef struct __natsGCItem
+{
+    struct __natsGCItem     *next;
+    nats_FreeObjectCb       freeCb;
+
+} natsGCItem;
+
+// Gives the object to the garbage collector.
+// Returns 'true' if the GC takes ownership, 'false' otherwise (in this case,
+// the caller is responsible for freeing the object).
+bool
+natsGC_collect(natsGCItem *item);
+
+
+#endif /* GC_H_ */
diff --git a/src/hash.c b/src/hash.c
new file mode 100644 (file)
index 0000000..a7b2ccb
--- /dev/null
@@ -0,0 +1,841 @@
+// Copyright 2015-2021 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "natsp.h"
+
+#include <string.h>
+
+#include "status.h"
+#include "mem.h"
+#include "hash.h"
+
+#define _freeEntry(e)   { NATS_FREE(e); (e) = NULL; }
+
+#define _OFF32  (2166136261)
+#define _YP32   (709607)
+
+#define _BSZ (8)
+#define _WSZ (4)
+
+static int _DWSZ   = _WSZ << 1; // 8
+static int _DDWSZ  = _WSZ << 2; // 16
+
+static int _MAX_BKT_SIZE = (1 << 30) - 1;
+
+natsStatus
+natsHash_Create(natsHash **newHash, int initialSize)
+{
+    natsHash    *hash = NULL;
+
+    if (initialSize <= 0)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    if ((initialSize & (initialSize - 1)) != 0)
+    {
+        // Size of buckets must be power of 2
+        initialSize--;
+        initialSize |= initialSize >> 1;
+        initialSize |= initialSize >> 2;
+        initialSize |= initialSize >> 4;
+        initialSize |= initialSize >> 8;
+        initialSize |= initialSize >> 16;
+        initialSize++;
+    }
+
+    hash = (natsHash*) NATS_CALLOC(1, sizeof(natsHash));
+    if (hash == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    hash->mask      = (initialSize - 1);
+    hash->numBkts   = initialSize;
+    hash->canResize = true;
+    hash->bkts      = (natsHashEntry**) NATS_CALLOC(initialSize, sizeof(natsHashEntry*));
+    if (hash->bkts == NULL)
+    {
+        NATS_FREE(hash);
+        return nats_setDefaultError(NATS_NO_MEMORY);
+    }
+
+    *newHash = hash;
+
+    return NATS_OK;
+}
+
+static natsStatus
+_resize(natsHash *hash, int newSize)
+{
+    natsHashEntry   **bkts    = NULL;
+    int             newMask   = newSize - 1;
+    natsHashEntry   *ne;
+    natsHashEntry   *e;
+    int             k;
+    int             newIndex;
+
+    bkts = (natsHashEntry**) NATS_CALLOC(newSize, sizeof(natsHashEntry*));
+    if (bkts == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    for (k = 0; k < hash->numBkts; k++)
+    {
+        e = hash->bkts[k];
+        while (e != NULL)
+        {
+            ne = e;
+            e  = e->next;
+
+            newIndex = ne->key & newMask;
+            ne->next = bkts[newIndex];
+            bkts[newIndex] = ne;
+        }
+    }
+
+    NATS_FREE(hash->bkts);
+    hash->bkts = bkts;
+    hash->mask = newMask;
+    hash->numBkts = newSize;
+
+    return NATS_OK;
+}
+
+static natsStatus
+_grow(natsHash *hash)
+{
+    // Can't grow beyond max signed int for now
+    if (hash->numBkts >= _MAX_BKT_SIZE)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    return _resize(hash, 2 * (hash->numBkts));
+}
+
+static void
+_shrink(natsHash *hash)
+{
+    if (hash->numBkts <= _BSZ)
+        return;
+
+    // Ignore memory issue when resizing, since if we fail to allocate
+    // the original hash is still intact.
+    (void) _resize(hash, hash->numBkts / 2);
+}
+
+static natsHashEntry*
+_createEntry(int64_t key, void *data)
+{
+    natsHashEntry *e = (natsHashEntry*) NATS_MALLOC(sizeof(natsHashEntry));
+
+    if (e == NULL)
+        return NULL;
+
+    e->key  = key;
+    e->data = data;
+    e->next = NULL;
+
+    return e;
+}
+
+natsStatus
+natsHash_Set(natsHash *hash, int64_t key, void *data, void **oldData)
+{
+    natsStatus      s         = NATS_OK;
+    int             index     = (int) (key & hash->mask);
+    natsHashEntry   *newEntry = NULL;
+    natsHashEntry   *e;
+
+    if (oldData != NULL)
+        *oldData = NULL;
+
+    e = (natsHashEntry*) hash->bkts[index];
+    while (e != NULL)
+    {
+        if (e->key == key)
+        {
+            // Success, replace data field
+            if (oldData != NULL)
+                *oldData = e->data;
+            e->data  = data;
+            return NATS_OK;
+        }
+
+        e = e->next;
+    }
+
+    // We have a new entry here
+    newEntry = _createEntry(key, data);
+    if (newEntry == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    newEntry->next = hash->bkts[index];
+    hash->bkts[index] = newEntry;
+    hash->used++;
+
+    // Check for resizing
+    if (hash->canResize && (hash->used > hash->numBkts))
+        s = _grow(hash);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+void*
+natsHash_Get(natsHash *hash, int64_t key)
+{
+    natsHashEntry *e;
+
+    e = hash->bkts[key & hash->mask];
+    while (e != NULL)
+    {
+        if (e->key == key)
+            return e->data;
+
+        e = e->next;
+    }
+
+    return NULL;
+}
+
+static void
+_maybeShrink(natsHash *hash)
+{
+    if (hash->canResize
+        && (hash->numBkts > _BSZ)
+        && (hash->used < hash->numBkts / 4))
+    {
+        _shrink(hash);
+    }
+}
+
+void*
+natsHash_Remove(natsHash *hash, int64_t key)
+{
+    natsHashEntry *entryRemoved = NULL;
+    void          *dataRemoved  = NULL;
+    natsHashEntry **e;
+
+    e = (natsHashEntry**) &(hash->bkts[key & hash->mask]);
+    while (*e != NULL)
+    {
+        if ((*e)->key == key)
+        {
+            // Success
+            entryRemoved = *e;
+            dataRemoved  = entryRemoved->data;
+
+            *e = entryRemoved->next;
+            _freeEntry(entryRemoved);
+
+            hash->used--;
+
+            // Check for resizing
+            _maybeShrink(hash);
+
+            break;
+        }
+
+        e = (natsHashEntry**) &((*e)->next);
+    }
+
+    return dataRemoved;
+}
+
+natsStatus
+natsHash_RemoveSingle(natsHash *hash, int64_t *key, void **data)
+{
+    natsHashEntry   *e = NULL;
+    int             i;
+
+    if (hash->used != 1)
+        return nats_setDefaultError(NATS_ERR);
+
+    for (i=0; i<hash->numBkts; i++)
+    {
+        e = hash->bkts[i];
+        if (e != NULL)
+        {
+            if (key != NULL)
+                *key = e->key;
+            if (data != NULL)
+                *data = e->data;
+            _freeEntry(e);
+
+            hash->used--;
+            hash->bkts[i] = NULL;
+
+            // Check for resizing
+            _maybeShrink(hash);
+
+            break;
+        }
+    }
+    return NATS_OK;
+}
+
+void
+natsHash_Destroy(natsHash *hash)
+{
+    natsHashEntry   *e, *ne;
+    int             i;
+
+    if (hash == NULL)
+        return;
+
+    for (i = 0; i < hash->numBkts; i++)
+    {
+        e = hash->bkts[i];
+        while (e != NULL)
+        {
+            ne = e->next;
+
+            _freeEntry(e);
+
+            e = ne;
+        }
+    }
+
+    NATS_FREE(hash->bkts);
+    NATS_FREE(hash);
+}
+
+void
+natsHashIter_Init(natsHashIter *iter, natsHash *hash)
+{
+    memset(iter, 0, sizeof(natsHashIter));
+
+    hash->canResize = false;
+    iter->hash      = hash;
+    iter->current   = hash->bkts[0];
+    iter->next      = iter->current;
+}
+
+bool
+natsHashIter_Next(natsHashIter *iter, int64_t *key, void **value)
+{
+    if ((iter->started) && (iter->next == NULL))
+        return false;
+
+    if (!(iter->started) && (iter->current == NULL))
+    {
+        while ((iter->next == NULL)
+               && (iter->currBkt < (iter->hash->numBkts - 1)))
+        {
+            iter->next = iter->hash->bkts[++(iter->currBkt)];
+        }
+
+        if (iter->next == NULL)
+        {
+            iter->started = true;
+            return false;
+        }
+    }
+
+    iter->started = true;
+
+    iter->current = iter->next;
+    if (iter->current != NULL)
+    {
+        if (key != NULL)
+            *key = iter->current->key;
+        if (value != NULL)
+            *value = iter->current->data;
+
+        iter->next = iter->current->next;
+    }
+
+    while ((iter->next == NULL)
+           && (iter->currBkt < (iter->hash->numBkts - 1)))
+    {
+        iter->next = iter->hash->bkts[++(iter->currBkt)];
+    }
+
+    return true;
+}
+
+natsStatus
+natsHashIter_RemoveCurrent(natsHashIter *iter)
+{
+    int64_t key;
+
+    if (iter->current == NULL)
+        return nats_setDefaultError(NATS_NOT_FOUND);
+
+    key = iter->current->key;
+    iter->current = iter->next;
+
+    (void) natsHash_Remove(iter->hash, key);
+
+    return NATS_OK;
+}
+
+void
+natsHashIter_Done(natsHashIter *iter)
+{
+    iter->hash->canResize = true;
+}
+
+
+// Jesteress derivative of FNV1A from [http://www.sanmayce.com/Fastest_Hash/]
+uint32_t
+natsStrHash_Hash(const char *data, int dataLen)
+{
+    int      i      = 0;
+    int      dlen   = dataLen;
+    uint32_t h32    = (uint32_t)_OFF32;
+    uint64_t k1, k2;
+    uint32_t k3;
+
+    for (; dlen >= _DDWSZ; dlen -= _DDWSZ)
+    {
+        memcpy(&k1, &(data[i]), sizeof(k1));
+        memcpy(&k2, &(data[i + 4]), sizeof(k2));
+        h32 = (uint32_t) ((((uint64_t) h32) ^ ((k1<<5 | k1>>27) ^ k2)) * _YP32);
+        i += _DDWSZ;
+    }
+
+    // Cases: 0,1,2,3,4,5,6,7
+    if ((dlen & _DWSZ) != 0)
+    {
+        memcpy(&k1, &(data[i]), sizeof(k1));
+        h32 = (uint32_t) ((((uint64_t) h32) ^ k1) * _YP32);
+        i += _DWSZ;
+    }
+    if ((dlen & _WSZ) != 0)
+    {
+        memcpy(&k3, &(data[i]), sizeof(k3));
+        h32 = (uint32_t) ((((uint64_t) h32) ^ (uint64_t) k3) * _YP32);
+        i += _WSZ;
+    }
+    if ((dlen & 1) != 0)
+    {
+        h32 = (h32 ^ (uint32_t)(data[i])) * _YP32;
+    }
+
+    return h32 ^ (h32 >> 16);
+}
+
+natsStatus
+natsStrHash_Create(natsStrHash **newHash, int initialSize)
+{
+    natsStrHash *hash = NULL;
+
+    if (initialSize <= 0)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    if ((initialSize & (initialSize - 1)) != 0)
+    {
+        // Size of buckets must be power of 2
+        initialSize--;
+        initialSize |= initialSize >> 1;
+        initialSize |= initialSize >> 2;
+        initialSize |= initialSize >> 4;
+        initialSize |= initialSize >> 8;
+        initialSize |= initialSize >> 16;
+        initialSize++;
+    }
+
+    hash = (natsStrHash*) NATS_CALLOC(1, sizeof(natsStrHash));
+    if (hash == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    hash->mask      = (initialSize - 1);
+    hash->numBkts   = initialSize;
+    hash->canResize = true;
+    hash->bkts      = (natsStrHashEntry**) NATS_CALLOC(initialSize, sizeof(natsStrHashEntry*));
+    if (hash->bkts == NULL)
+    {
+        NATS_FREE(hash);
+        return nats_setDefaultError(NATS_NO_MEMORY);
+    }
+
+    *newHash = hash;
+
+    return NATS_OK;
+}
+
+static natsStatus
+_resizeStr(natsStrHash *hash, int newSize)
+{
+    natsStrHashEntry    **bkts    = NULL;
+    int                 newMask   = newSize - 1;
+    natsStrHashEntry    *ne;
+    natsStrHashEntry    *e;
+    int                 k;
+    int                 newIndex;
+
+    bkts = (natsStrHashEntry**) NATS_CALLOC(newSize, sizeof(natsStrHashEntry*));
+    if (bkts == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    for (k = 0; k < hash->numBkts; k++)
+    {
+        e = hash->bkts[k];
+        while (e != NULL)
+        {
+            ne = e;
+            e  = e->next;
+
+            newIndex = ne->hk & newMask;
+            ne->next = bkts[newIndex];
+            bkts[newIndex] = ne;
+        }
+    }
+
+    NATS_FREE(hash->bkts);
+    hash->bkts = bkts;
+    hash->mask = newMask;
+    hash->numBkts = newSize;
+
+    return NATS_OK;
+}
+
+static natsStatus
+_growStr(natsStrHash *hash)
+{
+    // Can't grow beyond max signed int for now
+    if (hash->numBkts >= _MAX_BKT_SIZE)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    return _resizeStr(hash, 2 * (hash->numBkts));
+}
+
+static void
+_shrinkStr(natsStrHash *hash)
+{
+    if (hash->numBkts <= _BSZ)
+        return;
+
+    // Ignore memory issue when resizing, since if we fail to allocate
+    // the original hash is still intact.
+    (void) _resizeStr(hash, hash->numBkts / 2);
+}
+
+
+static natsStrHashEntry*
+_createStrEntry(uint32_t hk, char *key, bool copyKey, bool freeKey, void *data)
+{
+    natsStrHashEntry *e = (natsStrHashEntry*) NATS_MALLOC(sizeof(natsStrHashEntry));
+
+    if (e == NULL)
+        return NULL;
+
+    e->hk       = hk;
+    e->key      = (copyKey ? NATS_STRDUP(key) : key);
+    e->freeKey  = freeKey;
+    e->data     = data;
+    e->next     = NULL;
+
+    if (e->key == NULL)
+    {
+        NATS_FREE(e);
+        return NULL;
+    }
+
+    return e;
+}
+
+// Note that it would be invalid to call with copyKey:true and freeKey:false,
+// since this would lead to a memory leak.
+natsStatus
+natsStrHash_SetEx(natsStrHash *hash, char *key, bool copyKey, bool freeKey,
+                  void *data, void **oldData)
+{
+    natsStatus          s         = NATS_OK;
+    uint32_t            hk        = 0;
+    int                 index     = 0;
+    natsStrHashEntry    *newEntry = NULL;
+    natsStrHashEntry    *e;
+    char                *oldKey;
+
+    if (oldData != NULL)
+        *oldData = NULL;
+
+    hk    = natsStrHash_Hash(key, (int) strlen(key));
+    index = hk & hash->mask;
+
+    e = (natsStrHashEntry*) hash->bkts[index];
+    while (e != NULL)
+    {
+        if ((e->hk == hk)
+            && (strcmp(e->key, key) == 0))
+        {
+            // Success, replace data field
+            if (oldData != NULL)
+                *oldData = e->data;
+            e->data  = data;
+
+            // Need to care for situations where previous call
+            // for same key hash was with different pointers and or
+            // "config" values (copyKey/freeKey).
+
+            // But if nothing has changed (same pointers and config) we
+            // can bail early.
+            if ((key == e->key) && (freeKey == e->freeKey))
+                return NATS_OK;
+
+            oldKey = e->key;
+            // First try to dup the key if required.
+            if (copyKey)
+            {
+                char *newKey = NATS_STRDUP(key);
+                if (newKey == NULL)
+                    return nats_setDefaultError(NATS_NO_MEMORY);
+
+                e->key = newKey;
+            }
+            // If old config say that we had ownership, then free the
+            // old key now.
+            if (e->freeKey)
+                NATS_FREE(oldKey);
+
+            // Keep track of ownership of this key (copied or not).
+            e->freeKey = freeKey;
+            return NATS_OK;
+        }
+
+        e = e->next;
+    }
+
+    // We have a new entry here
+    newEntry = _createStrEntry(hk, key, copyKey, freeKey, data);
+    if (newEntry == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    newEntry->next = hash->bkts[index];
+    hash->bkts[index] = newEntry;
+    hash->used++;
+
+    // Check for resizing
+    if (hash->canResize && (hash->used > hash->numBkts))
+        s = _growStr(hash);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+void*
+natsStrHash_GetEx(natsStrHash *hash, char *key, int keyLen)
+{
+    natsStrHashEntry    *e;
+    uint32_t            hk = natsStrHash_Hash(key, keyLen);
+
+    e = hash->bkts[hk & hash->mask];
+    while (e != NULL)
+    {
+        if ((e->hk == hk)
+            && (strncmp(e->key, key, keyLen) == 0))
+        {
+            return e->data;
+        }
+
+        e = e->next;
+    }
+
+    return NULL;
+}
+
+static void
+_freeStrEntry(natsStrHashEntry *e)
+{
+    if (e->freeKey)
+        NATS_FREE(e->key);
+
+    NATS_FREE(e);
+}
+
+static void
+_maybeShrinkStr(natsStrHash *hash)
+{
+    if (hash->canResize
+        && (hash->numBkts > _BSZ)
+        && (hash->used < hash->numBkts / 4))
+    {
+        _shrinkStr(hash);
+    }
+}
+
+void*
+natsStrHash_Remove(natsStrHash *hash, char *key)
+{
+    natsStrHashEntry    *entryRemoved = NULL;
+    void                *dataRemoved  = NULL;
+    natsStrHashEntry    **e;
+    uint32_t            hk;
+
+    hk = natsStrHash_Hash(key, (int) strlen(key));
+
+    e = (natsStrHashEntry**) &(hash->bkts[hk & hash->mask]);
+    while (*e != NULL)
+    {
+        if (((*e)->hk == hk)
+            && (strcmp((*e)->key, key) == 0))
+        {
+            // Success
+            entryRemoved = *e;
+            dataRemoved  = entryRemoved->data;
+
+            *e = entryRemoved->next;
+            _freeStrEntry(entryRemoved);
+
+            hash->used--;
+
+            // Check for resizing
+            _maybeShrinkStr(hash);
+
+            break;
+        }
+
+        e = (natsStrHashEntry**) &((*e)->next);
+    }
+
+    return dataRemoved;
+}
+
+natsStatus
+natsStrHash_RemoveSingle(natsStrHash *hash, char **key, void **data)
+{
+    natsStrHashEntry    *e = NULL;
+    int                 i;
+
+    if (hash->used != 1)
+        return nats_setDefaultError(NATS_ERR);
+
+    for (i=0; i<hash->numBkts; i++)
+    {
+        e = hash->bkts[i];
+        if (e != NULL)
+        {
+            if (key != NULL)
+            {
+                char *retKey = e->key;
+
+                if (e->freeKey)
+                {
+                    retKey = NATS_STRDUP(e->key);
+                    if (retKey == NULL)
+                        return nats_setDefaultError(NATS_NO_MEMORY);
+                }
+                *key = retKey;
+            }
+            if (data != NULL)
+                *data = e->data;
+            _freeStrEntry(e);
+
+            hash->used--;
+            hash->bkts[i] = NULL;
+
+            // Check for resizing
+            _maybeShrinkStr(hash);
+
+            break;
+        }
+    }
+    return NATS_OK;
+}
+
+void
+natsStrHash_Destroy(natsStrHash *hash)
+{
+    natsStrHashEntry    *e, *ne;
+    int                 i;
+
+    if (hash == NULL)
+        return;
+
+    for (i = 0; i < hash->numBkts; i++)
+    {
+        e = hash->bkts[i];
+        while (e != NULL)
+        {
+            ne = e->next;
+
+            _freeStrEntry(e);
+
+            e = ne;
+        }
+    }
+
+    NATS_FREE(hash->bkts);
+    NATS_FREE(hash);
+}
+
+void
+natsStrHashIter_Init(natsStrHashIter *iter, natsStrHash *hash)
+{
+    memset(iter, 0, sizeof(natsStrHashIter));
+
+    hash->canResize = false;
+    iter->hash      = hash;
+    iter->current   = hash->bkts[0];
+    iter->next      = iter->current;
+}
+
+bool
+natsStrHashIter_Next(natsStrHashIter *iter, char **key, void **value)
+{
+    if ((iter->started) && (iter->next == NULL))
+        return false;
+
+    if (!(iter->started) && (iter->current == NULL))
+    {
+        while ((iter->next == NULL)
+               && (iter->currBkt < (iter->hash->numBkts - 1)))
+        {
+            iter->next = iter->hash->bkts[++(iter->currBkt)];
+        }
+
+        if (iter->next == NULL)
+        {
+            iter->started = true;
+            return false;
+        }
+    }
+
+    iter->started = true;
+
+    iter->current = iter->next;
+    if (iter->current != NULL)
+    {
+        if (key != NULL)
+            *key = iter->current->key;
+        if (value != NULL)
+            *value = iter->current->data;
+
+        iter->next = iter->current->next;
+    }
+
+    while ((iter->next == NULL)
+           && (iter->currBkt < (iter->hash->numBkts - 1)))
+    {
+        iter->next = iter->hash->bkts[++(iter->currBkt)];
+    }
+
+    return true;
+}
+
+natsStatus
+natsStrHashIter_RemoveCurrent(natsStrHashIter *iter)
+{
+    char *key;
+
+    if (iter->current == NULL)
+        return nats_setDefaultError(NATS_NOT_FOUND);
+
+    key = iter->current->key;
+    iter->current = iter->next;
+
+    (void) natsStrHash_Remove(iter->hash, key);
+
+    return NATS_OK;
+}
+
+void
+natsStrHashIter_Done(natsStrHashIter *iter)
+{
+    natsHashIter_Done((natsHashIter*) iter);
+}
diff --git a/src/hash.h b/src/hash.h
new file mode 100644 (file)
index 0000000..d1b513f
--- /dev/null
@@ -0,0 +1,162 @@
+// Copyright 2015-2021 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+
+#ifndef HASH_H_
+#define HASH_H_
+
+struct __natsHashEntry;
+
+typedef struct __natsHashEntry
+{
+    int64_t                 key;
+    void                    *data;
+    struct __natsHashEntry  *next;
+
+} natsHashEntry;
+
+typedef struct __natsHash
+{
+    natsHashEntry   **bkts;
+    int             numBkts;
+    int             mask;
+    int             used;
+    bool            canResize;
+
+} natsHash;
+
+typedef struct __natsHashIter
+{
+    natsHash        *hash;
+    natsHashEntry   *current;
+    natsHashEntry   *next;
+    int             currBkt;
+    bool            started;
+
+} natsHashIter;
+
+typedef struct __natsStrHashEntry
+{
+    uint32_t                    hk;
+    char                        *key;
+    bool                        freeKey;
+    void                        *data;
+    struct __natsStrHashEntry   *next;
+
+} natsStrHashEntry;
+
+typedef struct __natsStrHash
+{
+    natsStrHashEntry    **bkts;
+    int                 numBkts;
+    int                 mask;
+    int                 used;
+    bool                canResize;
+
+} natsStrHash;
+
+typedef struct __natsStrHashIter
+{
+    natsStrHash         *hash;
+    natsStrHashEntry    *current;
+    natsStrHashEntry    *next;
+    int                 currBkt;
+    bool                started;
+
+} natsStrHashIter;
+
+#define natsHash_Count(h)       ((h)->used)
+#define natsStrHash_Count(h)    ((h)->used)
+
+//
+// Hash with in64_t as the key
+//
+natsStatus
+natsHash_Create(natsHash **newHash, int initialSize);
+
+natsStatus
+natsHash_Set(natsHash *hash, int64_t key, void *data, void **oldData);
+
+void*
+natsHash_Get(natsHash *hash, int64_t key);
+
+void*
+natsHash_Remove(natsHash *hash, int64_t key);
+
+natsStatus
+natsHash_RemoveSingle(natsHash *hash, int64_t *key, void **data);
+
+void
+natsHash_Destroy(natsHash *hash);
+
+//
+// Iterator for Hash int64_t
+//
+void
+natsHashIter_Init(natsHashIter *iter, natsHash *hash);
+
+bool
+natsHashIter_Next(natsHashIter *iter, int64_t *key, void **value);
+
+natsStatus
+natsHashIter_RemoveCurrent(natsHashIter *iter);
+
+void
+natsHashIter_Done(natsHashIter *iter);
+
+//
+// Hash with char* as the key
+//
+natsStatus
+natsStrHash_Create(natsStrHash **newHash, int initialSize);
+
+uint32_t
+natsStrHash_Hash(const char *data, int dataLen);
+
+#define natsStrHash_Set(h, k, c, d, o) natsStrHash_SetEx((h), (k), (c), ((c) ? true : false), (d), (o))
+
+natsStatus
+natsStrHash_SetEx(natsStrHash *hash, char *key, bool copyKey, bool freeKey,
+                  void *data, void **oldData);
+
+#define natsStrHash_Get(h, k) natsStrHash_GetEx((h), (k), (int) strlen(k))
+
+void*
+natsStrHash_GetEx(natsStrHash *hash, char *key, int keyLen);
+
+void*
+natsStrHash_Remove(natsStrHash *hash, char *key);
+
+natsStatus
+natsStrHash_RemoveSingle(natsStrHash *hash, char **key, void **data);
+
+void
+natsStrHash_Destroy(natsStrHash *hash);
+
+//
+// Iterator for Hash char*
+//
+void
+natsStrHashIter_Init(natsStrHashIter *iter, natsStrHash *hash);
+
+bool
+natsStrHashIter_Next(natsStrHashIter *iter, char **key, void **value);
+
+natsStatus
+natsStrHashIter_RemoveCurrent(natsStrHashIter *iter);
+
+void
+natsStrHashIter_Done(natsStrHashIter *iter);
+
+
+#endif /* HASH_H_ */
diff --git a/src/include/n-unix.h b/src/include/n-unix.h
new file mode 100644 (file)
index 0000000..3b775cd
--- /dev/null
@@ -0,0 +1,67 @@
+// Copyright 2015-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef N_UNIX_H_
+#define N_UNIX_H_
+
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
+#if defined(__arm__) || defined(__aarch64__)
+#include <sys/socket.h>
+#endif
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#include <sys/time.h>
+#include <fcntl.h>
+#include <netinet/tcp.h>
+#include <netdb.h>
+#include <pthread.h>
+#include <unistd.h>
+#include <signal.h>
+#include <sys/wait.h>
+#include <errno.h>
+#include <string.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <poll.h>
+
+typedef pthread_t       natsThread;
+typedef pthread_key_t   natsThreadLocal;
+typedef pthread_mutex_t natsMutex;
+typedef pthread_cond_t  natsCondition;
+typedef pthread_once_t  natsInitOnceType;
+typedef socklen_t       natsSockLen;
+typedef size_t          natsRecvLen;
+
+#define NATS_ONCE_STATIC_INIT   PTHREAD_ONCE_INIT
+
+#define NATS_SOCK_INVALID               (-1)
+#define NATS_SOCK_SHUTDOWN(s)           (shutdown((s), SHUT_RDWR))
+#define NATS_SOCK_CLOSE(s)              (close((s)))
+#define NATS_SOCK_CONNECT_IN_PROGRESS   (EINPROGRESS)
+#define NATS_SOCK_WOULD_BLOCK           (EWOULDBLOCK)
+#define NATS_SOCK_ERROR                 (-1)
+#define NATS_SOCK_GET_ERROR             (errno)
+
+#define __NATS_FUNCTION__ __func__
+
+#define nats_asprintf       asprintf
+#define nats_strcasestr     strcasestr
+#define nats_vsnprintf      vsnprintf
+#define nats_strtok         strtok_r
+
+#endif /* N_UNIX_H_ */
diff --git a/src/include/n-win.h b/src/include/n-win.h
new file mode 100644 (file)
index 0000000..328756e
--- /dev/null
@@ -0,0 +1,79 @@
+// Copyright 2015-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef N_WIN_H_
+#define N_WIN_H_
+
+#include <winsock2.h>
+#include <ws2tcpip.h>
+
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+
+#define _CRT_SECURE_NO_WARNINGS
+
+#pragma comment(lib, "Ws2_32.lib")
+#pragma warning(disable : 4996)
+
+typedef struct __natsThread
+{
+    HANDLE  t;
+    DWORD   id;
+
+} natsThread;
+
+typedef DWORD               natsThreadLocal;
+
+typedef CRITICAL_SECTION    natsMutex;
+typedef CONDITION_VARIABLE  natsCondition;
+typedef INIT_ONCE           natsInitOnceType;
+typedef int                 natsSockLen;
+typedef int                 natsRecvLen;
+
+#define NATS_ONCE_TYPE          INIT_ONCE
+#define NATS_ONCE_STATIC_INIT   INIT_ONCE_STATIC_INIT
+
+#define NATS_SOCK_INVALID               (INVALID_SOCKET)
+#define NATS_SOCK_CLOSE(s)              closesocket((s))
+#define NATS_SOCK_SHUTDOWN(s)           {shutdown((s), SD_BOTH); closesocket((s));}
+#define NATS_SOCK_CONNECT_IN_PROGRESS   (WSAEWOULDBLOCK)
+#define NATS_SOCK_WOULD_BLOCK           (WSAEWOULDBLOCK)
+#define NATS_SOCK_ERROR                 (SOCKET_ERROR)
+#define NATS_SOCK_GET_ERROR             WSAGetLastError()
+
+#define __NATS_FUNCTION__ __FUNCTION__
+
+// Windows doesn't have those..
+// snprintf support is introduced starting MSVC 14.0 (_MSC_VER 1900: Visual Studio 2015)
+#if _MSC_VER < 1900
+#define snprintf    nats_snprintf
+#endif
+#define strcasecmp  _stricmp
+
+#define nats_vsnprintf(b, sb, f, a) vsnprintf_s((b), (sb), (_TRUNCATE), (f), (a))
+
+int
+nats_asprintf(char **newStr, const char *fmt, ...);
+
+char*
+nats_strcasestr(const char *haystack, const char *needle);
+
+#if _MSC_VER < 1900
+int
+nats_snprintf(char *buffer, size_t countszt, char *format, ...);
+#endif
+
+#define nats_strtok         strtok_s
+
+#endif /* N_WIN_H_ */
diff --git a/src/js.c b/src/js.c
new file mode 100644 (file)
index 0000000..aa70768
--- /dev/null
+++ b/src/js.c
@@ -0,0 +1,3208 @@
+// Copyright 2021-2022 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include <ctype.h>
+
+#include "js.h"
+#include "mem.h"
+#include "conn.h"
+#include "util.h"
+#include "opts.h"
+#include "sub.h"
+
+#ifdef DEV_MODE
+// For type safety
+
+void js_lock(jsCtx *js)   { natsMutex_Lock(js->mu);   }
+void js_unlock(jsCtx *js) { natsMutex_Unlock(js->mu); }
+
+static void _retain(jsCtx *js)  { js->refs++; }
+static void _release(jsCtx *js) { js->refs--; }
+
+#else
+
+#define _retain(js)         ((js)->refs++)
+#define _release(js)        ((js)->refs--)
+
+#endif // DEV_MODE
+
+
+const char*      jsDefaultAPIPrefix      = "$JS.API";
+const int64_t    jsDefaultRequestWait    = 5000;
+const int64_t    jsDefaultStallWait      = 200;
+const char       *jsDigits               = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
+const int        jsBase                  = 62;
+const int64_t    jsOrderedHBInterval     = NATS_SECONDS_TO_NANOS(5);
+
+#define jsReplyTokenSize    (8)
+#define jsDefaultMaxMsgs    (512 * 1024)
+
+#define jsLastConsumerSeqHdr    "Nats-Last-Consumer"
+
+// Forward declarations
+static void _hbTimerFired(natsTimer *timer, void* closure);
+static void _hbTimerStopped(natsTimer *timer, void* closure);
+
+typedef struct __jsOrderedConsInfo
+{
+    int64_t             osid;
+    int64_t             nsid;
+    uint64_t            sseq;
+    natsConnection      *nc;
+    natsSubscription    *sub;
+    char                *ndlv;
+    natsThread          *thread;
+    int                 max;
+    bool                done;
+
+} jsOrderedConsInfo;
+
+static void
+_destroyOptions(jsOptions *o)
+{
+    NATS_FREE((char*) o->Prefix);
+    NATS_FREE((char*) o->Stream.Purge.Subject);
+}
+
+static void
+_freeContext(jsCtx *js)
+{
+    natsConnection *nc = NULL;
+
+    natsStrHash_Destroy(js->pm);
+    natsSubscription_Destroy(js->rsub);
+    _destroyOptions(&(js->opts));
+    NATS_FREE(js->rpre);
+    natsCondition_Destroy(js->cond);
+    natsMutex_Destroy(js->mu);
+    natsTimer_Destroy(js->pmtmr);
+    nc = js->nc;
+    NATS_FREE(js);
+
+    natsConn_release(nc);
+}
+
+void
+js_retain(jsCtx *js)
+{
+    js_lock(js);
+    js->refs++;
+    js_unlock(js);
+}
+
+void
+js_release(jsCtx *js)
+{
+    bool doFree;
+
+    if (js == NULL)
+        return;
+
+    js_lock(js);
+    doFree = (--(js->refs) == 0);
+    js_unlock(js);
+
+    if (doFree)
+        _freeContext(js);
+}
+
+static void
+js_unlockAndRelease(jsCtx *js)
+{
+    bool doFree;
+
+    doFree = (--(js->refs) == 0);
+    js_unlock(js);
+
+    if (doFree)
+        _freeContext(js);
+}
+
+static void
+_destroyPMInfo(pmInfo *pmi)
+{
+    if (pmi == NULL)
+        return;
+
+    NATS_FREE(pmi->subject);
+    NATS_FREE(pmi);
+}
+
+void
+jsCtx_Destroy(jsCtx *js)
+{
+    pmInfo *pm;
+
+    if (js == NULL)
+        return;
+
+    js_lock(js);
+    if (js->closed)
+    {
+        js_unlock(js);
+        return;
+    }
+    js->closed = true;
+    if (js->rsub != NULL)
+    {
+        natsSubscription_Destroy(js->rsub);
+        js->rsub = NULL;
+    }
+    if ((js->pm != NULL) && natsStrHash_Count(js->pm) > 0)
+    {
+        natsStrHashIter iter;
+        void            *v = NULL;
+
+        natsStrHashIter_Init(&iter, js->pm);
+        while (natsStrHashIter_Next(&iter, NULL, &v))
+        {
+            natsMsg *msg = (natsMsg*) v;
+            natsStrHashIter_RemoveCurrent(&iter);
+            natsMsg_Destroy(msg);
+        }
+    }
+    while ((pm = js->pmHead) != NULL)
+    {
+        js->pmHead = pm->next;
+        _destroyPMInfo(pm);
+    }
+    if (js->pmtmr != NULL)
+        natsTimer_Stop(js->pmtmr);
+    js_unlockAndRelease(js);
+}
+
+natsStatus
+jsOptions_Init(jsOptions *opts)
+{
+    if (opts == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    memset(opts, 0, sizeof(jsOptions));
+    return NATS_OK;
+}
+
+// Parse the JSON represented by the NATS message's payload and returns the JSON object.
+// Unmarshal the API response.
+natsStatus
+js_unmarshalResponse(jsApiResponse *ar, nats_JSON **new_json, natsMsg *resp)
+{
+    nats_JSON   *json = NULL;
+    nats_JSON   *err  = NULL;
+    natsStatus  s;
+
+    memset(ar, 0, sizeof(jsApiResponse));
+
+    s = nats_JSONParse(&json, natsMsg_GetData(resp), natsMsg_GetDataLength(resp));
+    if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    // Check if there is an "error" field.
+    s = nats_JSONGetObject(json, "error", &err);
+    if ((s == NATS_OK) && (err != NULL))
+    {
+        s = nats_JSONGetInt(err, "code", &(ar->Error.Code));
+        IFOK(s, nats_JSONGetUInt16(err, "err_code", &(ar->Error.ErrCode)));
+        IFOK(s, nats_JSONGetStr(err, "description", &(ar->Error.Description)));
+    }
+
+    if (s == NATS_OK)
+        *new_json = json;
+    else
+        nats_JSONDestroy(json);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+void
+js_freeApiRespContent(jsApiResponse *ar)
+{
+    if (ar == NULL)
+        return;
+
+    NATS_FREE(ar->Type);
+    NATS_FREE(ar->Error.Description);
+}
+
+static natsStatus
+_copyPurgeOptions(jsCtx *js, struct jsOptionsStreamPurge *o)
+{
+    natsStatus                      s   = NATS_OK;
+    struct jsOptionsStreamPurge *po = &(js->opts.Stream.Purge);
+
+    po->Sequence = o->Sequence;
+    po->Keep     = o->Keep;
+
+    if (!nats_IsStringEmpty(o->Subject))
+    {
+        po->Subject = NATS_STRDUP(o->Subject);
+        if (po->Subject == NULL)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+    }
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_copyStreamInfoOptions(jsCtx *js, struct jsOptionsStreamInfo *o)
+{
+    js->opts.Stream.Info.DeletedDetails = o->DeletedDetails;
+    return NATS_OK;
+}
+
+natsStatus
+natsConnection_JetStream(jsCtx **new_js, natsConnection *nc, jsOptions *opts)
+{
+    jsCtx       *js = NULL;
+    natsStatus  s;
+
+    if ((new_js == NULL) || (nc == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    if (opts != NULL)
+    {
+        if (opts->Wait < 0)
+            return nats_setError(NATS_INVALID_ARG, "option 'Wait' (%" PRId64 ") cannot be negative", opts->Wait);
+        if (opts->PublishAsync.StallWait < 0)
+            return nats_setError(NATS_INVALID_ARG, "option 'PublishAsyncStallWait' (%" PRId64 ") cannot be negative", opts->PublishAsync.StallWait);
+    }
+
+    js = (jsCtx*) NATS_CALLOC(1, sizeof(jsCtx));
+    if (js == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    js->refs = 1;
+    // Retain the NATS connection and keep track of it so that if we
+    // detroy the context, in case of failure to fully initialize,
+    // we properly release the NATS connection.
+    natsConn_retain(nc);
+    js->nc = nc;
+    // This will be immutable and is computed based on the possible custom
+    // inbox prefix length (or the default "_INBOX.")
+    js->rpreLen = nc->inboxPfxLen+jsReplyTokenSize+1;
+
+    s = natsMutex_Create(&(js->mu));
+    if (s == NATS_OK)
+    {
+        // If Domain is set, use domain to create prefix.
+        if ((opts != NULL) && !nats_IsStringEmpty(opts->Domain))
+        {
+            if (nats_asprintf((char**) &(js->opts.Prefix), "$JS.%.*s.API",
+                js_lenWithoutTrailingDot(opts->Domain), opts->Domain) < 0)
+            {
+                s = nats_setDefaultError(NATS_NO_MEMORY);
+            }
+        }
+        else if ((opts == NULL) || nats_IsStringEmpty(opts->Prefix))
+        {
+            js->opts.Prefix = NATS_STRDUP(jsDefaultAPIPrefix);
+            if (js->opts.Prefix == NULL)
+                s = nats_setDefaultError(NATS_NO_MEMORY);
+        }
+        else if (nats_asprintf((char**) &(js->opts.Prefix), "%.*s",
+                js_lenWithoutTrailingDot(opts->Prefix), opts->Prefix) < 0)
+        {
+                s = nats_setDefaultError(NATS_NO_MEMORY);
+        }
+    }
+    if ((s == NATS_OK) && (opts != NULL))
+    {
+        struct jsOptionsPublishAsync *pa = &(js->opts.PublishAsync);
+
+        pa->MaxPending          = opts->PublishAsync.MaxPending;
+        // This takes precedence to error handler
+        if (opts->PublishAsync.AckHandler != NULL)
+        {
+            pa->AckHandler          = opts->PublishAsync.AckHandler;
+            pa->AckHandlerClosure   = opts->PublishAsync.AckHandlerClosure;
+        }
+        else
+        {
+            pa->ErrHandler          = opts->PublishAsync.ErrHandler;
+            pa->ErrHandlerClosure   = opts->PublishAsync.ErrHandlerClosure;
+        }
+        pa->StallWait           = opts->PublishAsync.StallWait;
+        js->opts.Wait           = opts->Wait;
+    }
+    if (js->opts.Wait == 0)
+        js->opts.Wait = jsDefaultRequestWait;
+    if (js->opts.PublishAsync.StallWait == 0)
+        js->opts.PublishAsync.StallWait = jsDefaultStallWait;
+    if ((s == NATS_OK) && (opts != NULL))
+    {
+        s = _copyPurgeOptions(js, &(opts->Stream.Purge));
+        IFOK(s, _copyStreamInfoOptions(js, &(opts->Stream.Info)));
+    }
+
+    if (s == NATS_OK)
+        *new_js = js;
+    else
+        jsCtx_Destroy(js);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+int
+js_lenWithoutTrailingDot(const char *str)
+{
+    int l = (int) strlen(str);
+
+    if (str[l-1] == '.')
+        l--;
+    return l;
+}
+
+natsStatus
+js_setOpts(natsConnection **nc, bool *freePfx, jsCtx *js, jsOptions *opts, jsOptions *resOpts)
+{
+    natsStatus s = NATS_OK;
+
+    *freePfx = false;
+    jsOptions_Init(resOpts);
+
+    if ((opts != NULL) && !nats_IsStringEmpty(opts->Domain))
+    {
+        char *pfx = NULL;
+        if (nats_asprintf(&pfx, "$JS.%.*s.API",
+                js_lenWithoutTrailingDot(opts->Domain), opts->Domain) < 0)
+        {
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+        }
+        else
+        {
+            resOpts->Prefix = pfx;
+            *freePfx        = true;
+        }
+    }
+    if (s == NATS_OK)
+    {
+        struct jsOptionsStreamPurge *po = &(js->opts.Stream.Purge);
+
+        js_lock(js);
+        // If not set above...
+        if (resOpts->Prefix == NULL)
+            resOpts->Prefix = (opts == NULL || nats_IsStringEmpty(opts->Prefix)) ? js->opts.Prefix : opts->Prefix;
+
+        // Take provided one or default to context's.
+        resOpts->Wait = (opts == NULL || opts->Wait <= 0) ? js->opts.Wait : opts->Wait;
+
+        // Purge options
+        if (opts != NULL)
+        {
+            struct jsOptionsStreamPurge *opo = &(opts->Stream.Purge);
+
+            // If any field is set, use `opts`, otherwise, we will use the
+            // context's purge options.
+            if ((opo->Subject != NULL) || (opo->Sequence > 0) || (opo->Keep > 0))
+                po = opo;
+        }
+        memcpy(&(resOpts->Stream.Purge), po, sizeof(*po));
+
+        // Stream info options
+        resOpts->Stream.Info.DeletedDetails = (opts == NULL ? js->opts.Stream.Info.DeletedDetails : opts->Stream.Info.DeletedDetails);
+        resOpts->Stream.Info.SubjectsFilter = (opts == NULL ? js->opts.Stream.Info.SubjectsFilter : opts->Stream.Info.SubjectsFilter);
+
+        *nc = js->nc;
+        js_unlock(js);
+    }
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+jsPubOptions_Init(jsPubOptions *opts)
+{
+    if (opts == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    memset(opts, 0, sizeof(jsPubOptions));
+    return NATS_OK;
+}
+
+natsStatus
+js_Publish(jsPubAck **new_puback, jsCtx *js, const char *subj, const void *data, int dataLen,
+           jsPubOptions *opts, jsErrCode *errCode)
+{
+    natsStatus s;
+    natsMsg    msg;
+
+    natsMsg_init(&msg, subj, (const char*) data, dataLen);
+    s = js_PublishMsg(new_puback, js, &msg, opts, errCode);
+    natsMsg_freeHeaders(&msg);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_setHeadersFromOptions(natsMsg *msg, jsPubOptions *opts)
+{
+    natsStatus  s        = NATS_OK;
+    char        temp[64] = {'\0'};
+
+    if (!nats_IsStringEmpty(opts->MsgId))
+        s = natsMsgHeader_Set(msg, jsMsgIdHdr, opts->MsgId);
+
+    if ((s == NATS_OK) && !nats_IsStringEmpty(opts->ExpectLastMsgId))
+        s = natsMsgHeader_Set(msg, jsExpectedLastMsgIdHdr, opts->ExpectLastMsgId);
+
+    if ((s == NATS_OK) && !nats_IsStringEmpty(opts->ExpectStream))
+        s = natsMsgHeader_Set(msg, jsExpectedStreamHdr, opts->ExpectStream);
+
+    if ((s == NATS_OK) && (opts->ExpectLastSeq > 0))
+    {
+        snprintf(temp, sizeof(temp), "%" PRIu64, opts->ExpectLastSeq);
+        s = natsMsgHeader_Set(msg, jsExpectedLastSeqHdr, temp);
+    }
+    if (s == NATS_OK)
+    {
+        if (opts->ExpectNoMessage)
+        {
+            s = natsMsgHeader_Set(msg, jsExpectedLastSubjSeqHdr, "0");
+        }
+        else if (opts->ExpectLastSubjectSeq > 0)
+        {
+            snprintf(temp, sizeof(temp), "%" PRIu64, opts->ExpectLastSubjectSeq);
+            s = natsMsgHeader_Set(msg, jsExpectedLastSubjSeqHdr, temp);
+        }
+    }
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_checkMaxWaitOpt(int64_t *new_ttl, jsPubOptions *opts)
+{
+    int64_t ttl;
+
+    if ((ttl = opts->MaxWait) < 0)
+        return nats_setError(NATS_INVALID_ARG, "option 'MaxWait' (%" PRId64 ") cannot be negative", ttl);
+
+    *new_ttl = ttl;
+    return NATS_OK;
+}
+
+natsStatus
+js_PublishMsg(jsPubAck **new_puback,jsCtx *js, natsMsg *msg,
+              jsPubOptions *opts, jsErrCode *errCode)
+{
+    natsStatus          s       = NATS_OK;
+    int64_t             ttl     = 0;
+    nats_JSON           *json   = NULL;
+    natsMsg             *resp   = NULL;
+    jsApiResponse   ar;
+
+    if (errCode != NULL)
+        *errCode = 0;
+
+    if ((js == NULL) || (msg == NULL) || nats_IsStringEmpty(msg->subject))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    if (opts != NULL)
+    {
+        s = _checkMaxWaitOpt(&ttl, opts);
+        IFOK(s, _setHeadersFromOptions(msg, opts));
+        if (s != NATS_OK)
+            return NATS_UPDATE_ERR_STACK(s);
+    }
+
+    // As it would be for a NATS connection, if the context has been destroyed,
+    // the memory is invalid and accessing any field of the context could cause
+    // a SEGFAULT. But assuming the context is still valid, we can access its
+    // options and the NATS connection without locking since they are immutable
+    // and the NATS connection has been retained when getting the JS context.
+
+    // If not set through options, default to the context's Wait value.
+    if (ttl == 0)
+        ttl = js->opts.Wait;
+
+    IFOK_JSR(s, natsConnection_RequestMsg(&resp, js->nc, msg, ttl));
+    if (s == NATS_OK)
+        s = js_unmarshalResponse(&ar, &json, resp);
+    if (s == NATS_OK)
+    {
+        if (js_apiResponseIsErr(&ar))
+        {
+             if (errCode != NULL)
+                *errCode = (int) ar.Error.ErrCode;
+            s = nats_setError(NATS_ERR, "%s", ar.Error.Description);
+        }
+        else if (new_puback != NULL)
+        {
+            // The user wants the jsPubAck object back, so we need to unmarshal it.
+            jsPubAck *pa = NULL;
+
+            pa = (jsPubAck*) NATS_CALLOC(1, sizeof(jsPubAck));
+            if (pa == NULL)
+                s = nats_setDefaultError(NATS_NO_MEMORY);
+            else
+            {
+                s = nats_JSONGetStr(json, "stream", &(pa->Stream));
+                IFOK(s, nats_JSONGetULong(json, "seq", &(pa->Sequence)));
+                IFOK(s, nats_JSONGetBool(json, "duplicate", &(pa->Duplicate)));
+                IFOK(s, nats_JSONGetStr(json, "domain", &(pa->Domain)));
+
+                if (s == NATS_OK)
+                    *new_puback = pa;
+                else
+                    jsPubAck_Destroy(pa);
+            }
+        }
+        js_freeApiRespContent(&ar);
+        nats_JSONDestroy(json);
+    }
+    natsMsg_Destroy(resp);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+void
+jsPubAck_Destroy(jsPubAck *pa)
+{
+    if (pa == NULL)
+        return;
+
+    NATS_FREE(pa->Stream);
+    NATS_FREE(pa->Domain);
+    NATS_FREE(pa);
+}
+
+static void
+_freePubAck(jsPubAck *pa)
+{
+    if (pa == NULL)
+        return;
+
+    NATS_FREE(pa->Stream);
+    NATS_FREE(pa->Domain);
+}
+
+static natsStatus
+_parsePubAck(natsMsg *msg, jsPubAck *pa, jsPubAckErr *pae, char *errTxt, size_t errTxtSize)
+{
+    natsStatus  s       = NATS_OK;
+    jsErrCode   jerr    = 0;
+
+    if (natsMsg_isTimeout(msg))
+    {
+        s = NATS_TIMEOUT;
+    }
+    else if (natsMsg_IsNoResponders(msg))
+    {
+        s = NATS_NO_RESPONDERS;
+    }
+    else
+    {
+        nats_JSON           *json = NULL;
+        jsApiResponse       ar;
+
+        // Now unmarshal the API response and check if there was an error.
+        s = js_unmarshalResponse(&ar, &json, msg);
+        if (s == NATS_OK)
+        {
+            if (js_apiResponseIsErr(&ar))
+            {
+                s = NATS_ERR;
+                jerr = (jsErrCode) ar.Error.ErrCode;
+                snprintf(errTxt, errTxtSize, "%s", ar.Error.Description);
+            }
+            // If it is not an error and caller wants to decode the jsPubAck...
+            else if (pa != NULL)
+            {
+                memset(pa, 0, sizeof(jsPubAck));
+                s = nats_JSONGetStr(json, "stream", &(pa->Stream));
+                IFOK(s, nats_JSONGetULong(json, "seq", &(pa->Sequence)));
+                IFOK(s, nats_JSONGetBool(json, "duplicate", &(pa->Duplicate)));
+                IFOK(s, nats_JSONGetStr(json, "domain", &(pa->Domain)));
+            }
+
+            js_freeApiRespContent(&ar);
+            nats_JSONDestroy(json);
+        }
+    }
+    // This will handle the no responder or timeout cases, or if we had errors
+    // trying to unmarshal the response.
+    if (s != NATS_OK)
+    {
+        // Set the error text only if not already done.
+        if (errTxt[0] == '\0')
+            snprintf(errTxt, errTxtSize, "%s", natsStatus_GetText(s));
+
+        memset(pae, 0, sizeof(jsPubAckErr));
+        pae->Err = s;
+        pae->ErrCode = jerr;
+        pae->ErrText = errTxt;
+    }
+    return s;
+}
+
+static void
+_handleAsyncReply(natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure)
+{
+    const char      *subject    = natsMsg_GetSubject(msg);
+    char            *id         = NULL;
+    jsCtx           *js         = (jsCtx*) closure;
+    natsMsg         *pmsg       = NULL;
+    char            errTxt[256] = {'\0'};
+    jsPubAckErr     pae;
+    jsPubAck        pa;
+    struct jsOptionsPublishAsync *opa = NULL;
+
+    if ((subject == NULL) || (int) strlen(subject) <= js->rpreLen)
+    {
+        natsMsg_Destroy(msg);
+        return;
+    }
+
+    id = (char*) (subject+js->rpreLen);
+
+    js_lock(js);
+
+    pmsg = natsStrHash_Remove(js->pm, id);
+    if (pmsg == NULL)
+    {
+        js_unlock(js);
+        natsMsg_Destroy(msg);
+        return;
+    }
+
+    opa = &(js->opts.PublishAsync);
+    if (opa->AckHandler)
+    {
+        jsPubAckErr *ppae   = NULL;
+        jsPubAck    *ppa    = NULL;
+
+        // If _parsePubAck returns an error, we will set the pointer ppae to
+        // our stack variable 'pae', otherwise, set the pointer ppa to the
+        // stack variable 'pa', which is the jsPubAck (positive ack).
+        if (_parsePubAck(msg, &pa, &pae, errTxt, sizeof(errTxt)) != NATS_OK)
+            ppae = &pae;
+        else
+            ppa = &pa;
+
+        // Invoke the handler with pointer to either jsPubAck or jsPubAckErr.
+        js_unlock(js);
+
+        (opa->AckHandler)(js, pmsg, ppa, ppae, opa->AckHandlerClosure);
+
+        js_lock(js);
+
+        _freePubAck(ppa);
+        // Set pmsg to NULL because user was responsible for destroying the message.
+        pmsg = NULL;
+    }
+    else if ((opa->ErrHandler != NULL) && (_parsePubAck(msg, NULL, &pae, errTxt, sizeof(errTxt)) != NATS_OK))
+    {
+        // We will invoke CB only if there is any kind of error.
+        // Associate the message with the pubAckErr object.
+        pae.Msg = pmsg;
+        js_unlock(js);
+
+        (opa->ErrHandler)(js, &pae, opa->ErrHandlerClosure);
+
+        js_lock(js);
+
+        // If the user resent the message, pae->Msg will have been cleared.
+        // In this case, do not destroy the message. Do not blindly destroy
+        // an address that could have been set, so destroy only if pmsg
+        // is same value than pae->Msg.
+        if (pae.Msg != pmsg)
+            pmsg = NULL;
+    }
+
+    // Now that the callback has returned, decrement the number of pending messages.
+    js->pmcount--;
+
+    // If there are callers waiting for async pub completion, or stalled async
+    // publish calls and we are now below max pending, broadcast to unblock them.
+    if (((js->pacw > 0) && (js->pmcount == 0))
+        || ((js->stalled > 0) && (js->pmcount <= opa->MaxPending)))
+    {
+        natsCondition_Broadcast(js->cond);
+    }
+    js_unlock(js);
+
+    natsMsg_Destroy(pmsg);
+    natsMsg_Destroy(msg);
+}
+
+static void
+_subComplete(void *closure)
+{
+    js_release((jsCtx*) closure);
+}
+
+static natsStatus
+_newAsyncReply(char *reply, jsCtx *js)
+{
+    natsStatus  s           = NATS_OK;
+
+    // Create the internal objects if it is the first time that we are doing
+    // an async publish.
+    if (js->rsub == NULL)
+    {
+        s = natsCondition_Create(&(js->cond));
+        IFOK(s, natsStrHash_Create(&(js->pm), 64));
+        if (s == NATS_OK)
+        {
+            js->rpre = NATS_MALLOC(js->rpreLen+1);
+            if (js->rpre == NULL)
+                s = nats_setDefaultError(NATS_NO_MEMORY);
+            else
+            {
+                char nuid[NUID_BUFFER_LEN+1];
+
+                s = natsNUID_Next(nuid, sizeof(nuid));
+                if (s == NATS_OK)
+                {
+                    memcpy(js->rpre, js->nc->inboxPfx, js->nc->inboxPfxLen);
+                    memcpy(js->rpre+js->nc->inboxPfxLen, nuid+((int)strlen(nuid)-jsReplyTokenSize), jsReplyTokenSize);
+                    js->rpre[js->rpreLen-1] = '.';
+                    js->rpre[js->rpreLen]   = '\0';
+                }
+            }
+        }
+        if (s == NATS_OK)
+        {
+            char *subj = NULL;
+
+            if (nats_asprintf(&subj, "%s*", js->rpre) < 0)
+                s = nats_setDefaultError(NATS_NO_MEMORY);
+            else
+                s = natsConn_subscribeNoPool(&(js->rsub), js->nc, subj, _handleAsyncReply, (void*) js);
+            if (s == NATS_OK)
+            {
+                _retain(js);
+                natsSubscription_SetPendingLimits(js->rsub, -1, -1);
+                natsSubscription_SetOnCompleteCB(js->rsub, _subComplete, (void*) js);
+            }
+            NATS_FREE(subj);
+        }
+        if (s != NATS_OK)
+        {
+            // Undo the things we created so we retry again next time.
+            // It is either that or we have to always check individual
+            // objects to know if we have to create them.
+            NATS_FREE(js->rpre);
+            js->rpre = NULL;
+            natsStrHash_Destroy(js->pm);
+            js->pm = NULL;
+            natsCondition_Destroy(js->cond);
+            js->cond = NULL;
+        }
+    }
+    if (s == NATS_OK)
+    {
+        int64_t l;
+        int     i;
+
+        memcpy(reply, js->rpre, js->rpreLen);
+        l = nats_Rand64();
+        for (i=0; i < jsReplyTokenSize; i++)
+        {
+            reply[js->rpreLen+i] = jsDigits[l%jsBase];
+            l /= jsBase;
+        }
+        reply[js->rpreLen+jsReplyTokenSize] = '\0';
+    }
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static void
+_timeoutPubAsync(natsTimer *t, void *closure)
+{
+    jsCtx   *js = (jsCtx*) closure;
+    pmInfo  *pm = NULL;
+    int64_t now = nats_Now();
+    int64_t next= 0;
+
+    js_lock(js);
+    if (js->closed)
+    {
+        js_unlock(js);
+        return;
+    }
+
+    while (((pm = js->pmHead) != NULL) && (pm->deadline <= now))
+    {
+        natsMsg *m = NULL;
+
+        if (natsMsg_Create(&m, pm->subject, NULL, NULL, 0) != NATS_OK)
+            break;
+
+        m->sub = js->rsub;
+        natsMsg_setTimeout(m);
+
+        natsSub_Lock(js->rsub);
+        if (js->rsub->msgList.tail != NULL)
+        {
+            js->rsub->msgList.tail->next = m;
+        }
+        else
+        {
+            js->rsub->msgList.head = m;
+            natsCondition_Signal(js->rsub->cond);
+        }
+        js->rsub->msgList.tail = m;
+        js->rsub->msgList.msgs++;
+        js->rsub->msgList.bytes += natsMsg_dataAndHdrLen(m);
+        natsSub_Unlock(js->rsub);
+
+        js->pmHead = pm->next;
+        _destroyPMInfo(pm);
+    }
+
+    if (js->pmHead == NULL)
+    {
+        if (js->pmTail != NULL)
+            js->pmTail = NULL;
+
+        next = 60*60*1000;
+    }
+    else
+    {
+        next = js->pmHead->deadline - now;
+        if (next <= 0)
+            next = 1;
+    }
+    natsTimer_Reset(js->pmtmr, next);
+
+    js_unlock(js);
+}
+
+static void
+_timeoutPubAsyncComplete(natsTimer *t, void *closure)
+{
+    jsCtx *js = (jsCtx*) closure;
+    js_release(js);
+}
+
+static natsStatus
+_trackPublishAsyncTimeout(jsCtx *js, char *subject, int64_t mw)
+{
+    natsStatus  s       = NATS_OK;
+    pmInfo      *pm     = NULL;
+    pmInfo      *pmi    = NATS_CALLOC(1, sizeof(pmInfo));
+
+    if (pmi == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    pmi->subject = NATS_STRDUP(subject);
+    if (pmi->subject == NULL)
+    {
+        NATS_FREE(pmi);
+        return nats_setDefaultError(NATS_NO_MEMORY);
+    }
+    pmi->deadline = nats_Now() + mw;
+
+    // Check if we can add at the end of the list
+    if (((pm = js->pmTail) != NULL) && (pmi->deadline >= pm->deadline))
+    {
+        js->pmTail->next = pmi;
+        js->pmTail = pmi;
+    }
+    // Or before the first
+    else if (((pm = js->pmHead) != NULL) && (pmi->deadline < pm->deadline))
+    {
+        pmi->next = js->pmHead;
+        js->pmHead = pmi;
+        natsTimer_Reset(js->pmtmr, mw);
+    }
+    // If the list was empty
+    else if (js->pmHead == NULL)
+    {
+        js->pmHead = pmi;
+        js->pmTail = pmi;
+        if (js->pmtmr == NULL)
+        {
+            s = natsTimer_Create(&js->pmtmr, _timeoutPubAsync, _timeoutPubAsyncComplete, mw, (void*) js);
+            if (s == NATS_OK)
+                js_retain(js);
+        }
+        else
+            natsTimer_Reset(js->pmtmr, mw);
+    }
+    else
+    {
+        // Guaranteed to be somewhere in the list (not first, not last, and at
+        // least 2 elements).
+        pm = js->pmHead;
+        while ((pm != NULL) && (pm->next != NULL) && (pmi->deadline > pm->next->deadline))
+            pm = pm->next;
+
+        pmi->next = pm->next;
+        pm->next = pmi;
+    }
+    if (s != NATS_OK)
+        _destroyPMInfo(pmi);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_registerPubMsg(natsConnection **nc, char *reply, jsCtx *js, natsMsg *msg, int64_t mw)
+{
+    natsStatus  s       = NATS_OK;
+    char        *id     = NULL;
+    bool        release = false;
+    int64_t     maxp    = 0;
+
+    js_lock(js);
+
+    maxp = js->opts.PublishAsync.MaxPending;
+
+    js->pmcount++;
+    s = _newAsyncReply(reply, js);
+    if (s == NATS_OK)
+        id = reply+js->rpreLen;
+    if ((s == NATS_OK)
+            && (maxp > 0)
+            && (js->pmcount > maxp))
+    {
+        int64_t target = nats_setTargetTime(js->opts.PublishAsync.StallWait);
+
+        _retain(js);
+
+        js->stalled++;
+        while ((s != NATS_TIMEOUT) && (js->pmcount > maxp))
+            s = natsCondition_AbsoluteTimedWait(js->cond, js->mu, target);
+        js->stalled--;
+
+        if (s == NATS_TIMEOUT)
+            s = nats_setError(s, "%s", "stalled with too many outstanding async published messages");
+
+        release = true;
+    }
+    if ((s == NATS_OK) && (mw > 0))
+        s = _trackPublishAsyncTimeout(js, reply, mw);
+    if (s == NATS_OK)
+        s = natsStrHash_Set(js->pm, id, true, msg, NULL);
+    if (s == NATS_OK)
+        *nc = js->nc;
+    else
+        js->pmcount--;
+    if (release)
+        js_unlockAndRelease(js);
+    else
+        js_unlock(js);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+js_PublishAsync(jsCtx *js, const char *subj, const void *data, int dataLen,
+                jsPubOptions *opts)
+{
+    natsStatus s;
+    natsMsg    *msg = NULL;
+
+    s = natsMsg_Create(&msg, subj, NULL, (const char*) data, dataLen);
+    IFOK(s, js_PublishMsgAsync(js, &msg, opts));
+
+    // The `msg` pointer will have been set to NULL if the library took ownership.
+    natsMsg_Destroy(msg);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+js_PublishMsgAsync(jsCtx *js, natsMsg **msg, jsPubOptions *opts)
+{
+    natsStatus      s   = NATS_OK;
+    natsConnection  *nc = NULL;
+    char            replyBuf[32 + jsReplyTokenSize + 1];
+    char            *reply = replyBuf;
+    int64_t         mw = 0;
+
+    if ((js == NULL) || (msg == NULL) || (*msg == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    if (js->rpreLen > 32)
+    {
+        reply = NATS_MALLOC(js->rpreLen + jsReplyTokenSize + 1);
+        if (reply == NULL)
+            return nats_setDefaultError(NATS_NO_MEMORY);
+    }
+
+    if (opts != NULL)
+    {
+        mw = opts->MaxWait;
+        s = _setHeadersFromOptions(*msg, opts);
+    }
+
+    // On success, the context will be retained.
+    IFOK(s, _registerPubMsg(&nc, reply, js, *msg, mw));
+    if (s == NATS_OK)
+    {
+        s = natsConn_publish(nc, *msg, (const char*) reply, false);
+        if (s != NATS_OK)
+        {
+            char *id = reply+js->rpreLen;
+
+            // The message may or may not have been sent, we don't know for sure.
+            // We are going to attempt to remove from the map. If we can, then
+            // we return the failure and the user owns the message. If we can't
+            // it means that its ack has already been processed, so we consider
+            // this call a success. If there was a pub ack failure, it is handled
+            // with the error callback, but regardless, the library owns the message.
+            js_lock(js);
+            // If msg no longer in map, Remove() will return NULL.
+            if (natsStrHash_Remove(js->pm, id) == NULL)
+                s = NATS_OK;
+            else
+                js->pmcount--;
+            js_unlock(js);
+        }
+    }
+
+    // On success, clear the pointer to the message to indicate that the library
+    // now owns it. If user calls natsMsg_Destroy(), it will have no effect since
+    // they would call with natsMsg_Destroy(NULL), which is a no-op.
+    if (s == NATS_OK)
+        *msg = NULL;
+
+    if (reply != replyBuf)
+        NATS_FREE(reply);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+js_PublishAsyncComplete(jsCtx *js, jsPubOptions *opts)
+{
+    natsStatus  s       = NATS_OK;
+    int64_t     ttl     = 0;
+    int64_t     target  = 0;
+
+    if (js == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    if (opts != NULL)
+    {
+        s = _checkMaxWaitOpt(&ttl, opts);
+        if (s != NATS_OK)
+            return NATS_UPDATE_ERR_STACK(s);
+    }
+
+    js_lock(js);
+    if ((js->pm == NULL) || (js->pmcount == 0))
+    {
+        js_unlock(js);
+        return NATS_OK;
+    }
+    if (ttl > 0)
+        target = nats_setTargetTime(ttl);
+
+    _retain(js);
+    js->pacw++;
+    while ((s != NATS_TIMEOUT) && (js->pmcount > 0))
+    {
+        if (target > 0)
+            s = natsCondition_AbsoluteTimedWait(js->cond, js->mu, target);
+        else
+            natsCondition_Wait(js->cond, js->mu);
+    }
+    js->pacw--;
+
+    // Make sure that if we return timeout, there is really
+    // still unack'ed publish messages.
+    if ((s == NATS_TIMEOUT) && (js->pmcount == 0))
+        s = NATS_OK;
+
+    js_unlockAndRelease(js);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+js_PublishAsyncGetPendingList(natsMsgList *pending, jsCtx *js)
+{
+    natsStatus          s        = NATS_OK;
+    int                 count    = 0;
+
+    if ((pending == NULL) || (js == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    js_lock(js);
+    if ((count = natsStrHash_Count(js->pm)) == 0)
+    {
+        js_unlock(js);
+        return NATS_NOT_FOUND;
+    }
+    pending->Msgs  = (natsMsg**) NATS_CALLOC(count, sizeof(natsMsg*));
+    if (pending->Msgs == NULL)
+        s = nats_setDefaultError(NATS_NO_MEMORY);
+    else
+    {
+        natsStrHashIter iter;
+        void            *val = NULL;
+        int             i    = 0;
+
+        natsStrHashIter_Init(&iter, js->pm);
+        while (natsStrHashIter_Next(&iter, NULL, &val))
+        {
+            pending->Msgs[i++] = (natsMsg*) val;
+            natsStrHashIter_RemoveCurrent(&iter);
+            if (js->pmcount > 0)
+                js->pmcount--;
+        }
+        pending->Count = count;
+    }
+    js_unlock(js);
+
+    if (s != NATS_OK)
+        natsMsgList_Destroy(pending);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+jsSubOptions_Init(jsSubOptions *opts)
+{
+    if (opts == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    memset(opts, 0, sizeof(jsSubOptions));
+    opts->Config.AckPolicy      = -1;
+    opts->Config.DeliverPolicy  = -1;
+    opts->Config.ReplayPolicy   = -1;
+    return NATS_OK;
+}
+
+static natsStatus
+_lookupStreamBySubject(const char **stream, natsConnection *nc, const char *subject, jsOptions *jo, jsErrCode *errCode)
+{
+    natsStatus          s       = NATS_OK;
+    natsBuffer          *buf    = NULL;
+    char                *apiSubj= NULL;
+    natsMsg             *resp   = NULL;
+
+    *stream = NULL;
+
+    // Request will be: {"subject":"<subject>"}
+    s = natsBuf_Create(&buf, 14 + (int) strlen(subject));
+    IFOK(s, natsBuf_Append(buf, "{\"subject\":\"", -1));
+    IFOK(s, natsBuf_Append(buf, subject, -1));
+    IFOK(s, natsBuf_Append(buf, "\"}", -1));
+    if (s == NATS_OK)
+    {
+        if (nats_asprintf(&apiSubj, jsApiStreams, js_lenWithoutTrailingDot(jo->Prefix), jo->Prefix) < 0)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+    }
+    // Send the request
+    IFOK_JSR(s, natsConnection_Request(&resp, nc, apiSubj, natsBuf_Data(buf), natsBuf_Len(buf), jo->Wait));
+    // If no error, decode response
+    if ((s == NATS_OK) && (resp != NULL) && (natsMsg_GetDataLength(resp) > 0))
+    {
+        nats_JSON   *json     = NULL;
+        char        **streams = NULL;
+        int         count     = 0;
+        int         i;
+
+        s = nats_JSONParse(&json, natsMsg_GetData(resp), natsMsg_GetDataLength(resp));
+        IFOK(s, nats_JSONGetArrayStr(json, "streams", &streams, &count));
+
+        if ((s == NATS_OK) && (count > 0))
+            *stream = streams[0];
+        else
+            s = nats_setError(NATS_ERR, "%s", jsErrNoStreamMatchesSubject);
+
+        // Do not free the first one since we want to return it.
+        for (i=1; i<count; i++)
+            NATS_FREE(streams[i]);
+        NATS_FREE(streams);
+        nats_JSONDestroy(json);
+    }
+
+    NATS_FREE(apiSubj);
+    natsBuf_Destroy(buf);
+    natsMsg_Destroy(resp);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+void
+jsSub_free(jsSub *jsi)
+{
+    jsCtx *js = NULL;
+
+    if (jsi == NULL)
+        return;
+
+    js = jsi->js;
+    natsTimer_Destroy(jsi->hbTimer);
+    if (jsi->mhMsg != NULL)
+    {
+        natsMsg_clearNoDestroy(jsi->mhMsg);
+        natsMsg_Destroy(jsi->mhMsg);
+    }
+    NATS_FREE(jsi->stream);
+    NATS_FREE(jsi->consumer);
+    NATS_FREE(jsi->nxtMsgSubj);
+    NATS_FREE(jsi->cmeta);
+    NATS_FREE(jsi->fcReply);
+    js_destroyConsumerConfig(jsi->ocCfg);
+    NATS_FREE(jsi);
+
+    js_release(js);
+}
+
+static void
+_autoAckCB(natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure)
+{
+    jsSub   *jsi = (jsSub*) closure;
+
+    natsMsg_setNoDestroy(msg);
+
+    // Invoke user callback
+    (jsi->usrCb)(nc, sub, msg, jsi->usrCbClosure);
+
+    natsMsg_Ack(msg, NULL);
+    natsMsg_clearNoDestroy(msg);
+    natsMsg_Destroy(msg);
+}
+
+natsStatus
+jsSub_deleteConsumer(natsSubscription *sub)
+{
+    jsCtx       *js       = NULL;
+    const char  *stream   = NULL;
+    const char  *consumer = NULL;
+    natsStatus  s;
+
+    natsSub_Lock(sub);
+    if ((sub->jsi != NULL) && (sub->jsi->dc))
+    {
+        js       = sub->jsi->js;
+        stream   = sub->jsi->stream;
+        consumer = sub->jsi->consumer;
+        // For drain, we could be trying to delete from
+        // the thread that checks for drain, or from the
+        // user checking from drain completion. So we
+        // switch off if we are going to delete now.
+        sub->jsi->dc = false;
+    }
+    natsSub_Unlock(sub);
+
+    if ((js == NULL) || (stream == NULL) || (consumer == NULL))
+        return NATS_OK;
+
+    s = js_DeleteConsumer(js, stream, consumer, NULL, NULL);
+    if (s == NATS_NOT_FOUND)
+        s = nats_setError(s, "failed to delete consumer '%s': not found", consumer);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+// Runs under the subscription lock, but lock will be released,
+// the connection lock will be possibly acquired/released, then
+// the subscription lock reacquired.
+void
+jsSub_deleteConsumerAfterDrain(natsSubscription *sub)
+{
+    natsConnection  *nc       = NULL;
+    const char      *consumer = NULL;
+    natsStatus      s;
+
+    if ((sub->jsi == NULL) || !sub->jsi->dc)
+        return;
+
+    nc       = sub->conn;
+    consumer = sub->jsi->consumer;
+
+    // Need to release sub lock since deletion of consumer
+    // will require the connection lock, etc..
+    natsSub_Unlock(sub);
+
+    s = jsSub_deleteConsumer(sub);
+    if (s != NATS_OK)
+    {
+        natsConn_Lock(nc);
+        if (nc->opts->asyncErrCb != NULL)
+        {
+            char tmp[256];
+            snprintf(tmp, sizeof(tmp), "failed to delete consumer '%s': %u (%s)",
+                    consumer, s, natsStatus_GetText(s));
+            natsAsyncCb_PostErrHandler(nc, sub, s, NATS_STRDUP(tmp));
+        }
+        natsConn_Unlock(nc);
+    }
+
+    // Reacquire the lock before returning.
+    natsSub_Lock(sub);
+}
+
+static natsStatus
+_copyString(char **new_str, const char *str, int l)
+{
+    *new_str = NATS_MALLOC(l+1);
+    if (*new_str == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    memcpy(*new_str, str, l);
+    *(*new_str+l) = '\0';
+    return NATS_OK;
+}
+
+natsStatus
+js_getMetaData(const char *reply,
+    char **domain,
+    char **stream,
+    char **consumer,
+    uint64_t *numDelivered,
+    uint64_t *sseq,
+    uint64_t *dseq,
+    int64_t *tm,
+    uint64_t *numPending,
+    int asked)
+{
+    natsStatus  s    = NATS_OK;
+    const char  *p   = reply;
+    const char  *np  = NULL;
+    const char  *str = NULL;
+    int         done = 0;
+    int64_t     val  = 0;
+    int         nt   = 0;
+    int         i, l;
+    struct token {
+        const char* start;
+        int         len;
+    };
+    struct token tokens[9];
+
+    memset(tokens, 0, sizeof(tokens));
+
+    // v1 version of subject is total of 9 tokens:
+    //
+    // $JS.ACK.<stream name>.<consumer name>.<num delivered>.<stream sequence>.<consumer sequence>.<timestamp>.<num pending>
+    //
+    // Since we are here with the 2 first token stripped, the number of tokens is 7.
+    //
+    // v2 version of subject total tokens is 12:
+    //
+    // $JS.ACK.<domain>.<account hash>.<stream name>.<consumer name>.<num delivered>.<stream sequence>.<consumer sequence>.<timestamp>.<num pending>.<a token with a random value>
+    //
+    // Again, since "$JS.ACK." has already been stripped, this is 10 tokens.
+    // However, the library does not care about anything after the num pending,
+    // so it would be 9 tokens.
+
+    // Find tokens but stop when we have at most 9 tokens.
+    while ((nt < 9) && ((np = strchr(p, '.')) != NULL))
+    {
+        tokens[nt].start = p;
+        tokens[nt].len   = (int) (np - p);
+        nt++;
+        p = (const char*) (np+1);
+    }
+    if (np == NULL)
+    {
+        tokens[nt].start = p;
+        tokens[nt].len   = (int) (strlen(p));
+        nt++;
+    }
+
+    // It is invalid if less than 7 or if it has more than 7, it has to have
+    // at least 9 to be valid.
+    if ((nt < 7) || ((nt > 7) && (nt < 9)))
+        return NATS_ERR;
+
+    // If it is 7 tokens (the v1), then insert 2 empty tokens at the beginning.
+    if (nt == 7)
+    {
+        memmove(&(tokens[2]), &(tokens[0]), nt*sizeof(struct token));
+        tokens[0].start = NULL;
+        tokens[0].len = 0;
+        tokens[1].start = NULL;
+        tokens[1].len = 0;
+        // We work with knowledge that we have now 9 tokens.
+        nt = 9;
+    }
+
+    for (i=0; i<nt; i++)
+    {
+        str = tokens[i].start;
+        l   = tokens[i].len;
+        // For numeric tokens, anything after the consumer name token,
+        // which is index 3 (starting at 0).
+        if (i > 3)
+        {
+            val = nats_ParseInt64(str, l);
+            // Since we don't expect any negative value,
+            // if we get -1, which indicates a parsing error,
+            // return this fact.
+            if (val == -1)
+                return NATS_ERR;
+        }
+        switch (i)
+        {
+            case 0:
+                if (domain != NULL)
+                {
+                    // A domain "_" will be sent by new server to indicate
+                    // that there is no domain, but to make the number of tokens
+                    // constant.
+                    if ((str == NULL) || ((l == 1) && (str[0] == '_')))
+                        *domain = NULL;
+                    else if ((s = _copyString(domain, str, l)) != NATS_OK)
+                        return NATS_UPDATE_ERR_STACK(s);
+                    done++;
+                }
+                break;
+            case 1:
+                // acc hash, ignore.
+                break;
+            case 2:
+                if (stream != NULL)
+                {
+                    if ((s = _copyString(stream, str, l)) != NATS_OK)
+                        return NATS_UPDATE_ERR_STACK(s);
+                    done++;
+                }
+                break;
+            case 3:
+                if (consumer != NULL)
+                {
+                    if ((s = _copyString(consumer, str, l)) != NATS_OK)
+                        return NATS_UPDATE_ERR_STACK(s);
+                    done++;
+                }
+                break;
+            case 4:
+                if (numDelivered != NULL)
+                {
+                    *numDelivered = (uint64_t) val;
+                    done++;
+                }
+                break;
+            case 5:
+                if (sseq != NULL)
+                {
+                    *sseq = (uint64_t) val;
+                    done++;
+                }
+                break;
+            case 6:
+                if (dseq != NULL)
+                {
+                    *dseq = (uint64_t) val;
+                    done++;
+                }
+                break;
+            case 7:
+                if (tm != NULL)
+                {
+                    *tm = val;
+                    done++;
+                }
+                break;
+            case 8:
+                if (numPending != NULL)
+                {
+                    *numPending = (uint64_t) val;
+                    done++;
+                }
+                break;
+        }
+        if (done == asked)
+            return NATS_OK;
+    }
+    return NATS_OK;
+}
+
+natsStatus
+jsSub_trackSequences(jsSub *jsi, const char *reply)
+{
+    natsStatus  s = NATS_OK;
+
+    // Data is equivalent to HB, so consider active.
+    jsi->active = true;
+
+    if ((reply == NULL) || (strstr(reply, jsAckPrefix) != reply))
+        return NATS_OK;
+
+    // Keep track of inbound message "sequence" for flow control purposes.
+    jsi->fciseq++;
+
+    NATS_FREE(jsi->cmeta);
+    DUP_STRING(s, jsi->cmeta, reply+jsAckPrefixLen);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+jsSub_processSequenceMismatch(natsSubscription *sub, natsMsg *msg, bool *sm)
+{
+    jsSub       *jsi   = sub->jsi;
+    const char  *str   = NULL;
+    int64_t     val    = 0;
+    struct mismatch *m = &jsi->mismatch;
+    natsStatus  s;
+
+    *sm = false;
+
+    // This is an HB, so update that we are active.
+    jsi->active = true;
+
+    if (jsi->cmeta == NULL)
+        return NATS_OK;
+
+    s = js_getMetaData(jsi->cmeta, NULL, NULL, NULL, NULL, &m->sseq, &m->dseq, NULL, NULL, 2);
+    if (s != NATS_OK)
+    {
+        if (s == NATS_ERR)
+            return nats_setError(NATS_ERR, "invalid JS ACK: '%s'", jsi->cmeta);
+        return NATS_UPDATE_ERR_STACK(s);
+    }
+
+    s = natsMsgHeader_Get(msg, jsLastConsumerSeqHdr, &str);
+    if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    if (str != NULL)
+    {
+        // Now that we have the field, we parse it. This function returns
+        // -1 if there is a parsing error.
+        val = nats_ParseInt64(str, (int) strlen(str));
+        if (val == -1)
+            return nats_setError(NATS_ERR, "invalid last consumer sequence: '%s'", str);
+
+        m->ldseq = (uint64_t) val;
+    }
+    if (m->ldseq == m->dseq)
+    {
+        // Sync subs use this flag to get the NextMsg() to error out and
+        // return NATS_MISMATCH to indicate that a mismatch was discovered,
+        // but immediately switch it off so that remaining NextMsg() work ok.
+        // Here we have resolved the mismatch, so we clear this flag (we
+        // could check for sync vs async, but no need to bother).
+        jsi->sm = false;
+        // Clear the suppression flag.
+        jsi->ssmn = false;
+    }
+    else
+    {
+        if (jsi->ordered)
+        {
+            s = jsSub_resetOrderedConsumer(sub, jsi->sseq+1);
+        }
+        else if (!jsi->ssmn)
+        {
+            // Record the sequence mismatch.
+            jsi->sm = true;
+            // Prevent following mismatch report until mismatch is resolved.
+            jsi->ssmn = true;
+            // Only for async subscriptions, indicate that the connection should
+            // push a NATS_MISMATCH to the async callback.
+            if (sub->msgCb != NULL)
+                *sm = true;
+        }
+    }
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsSubscription_GetConsumerInfo(jsConsumerInfo **ci, natsSubscription *sub,
+                                 jsOptions *opts, jsErrCode *errCode)
+{
+    char        *consumer = NULL;
+    const char  *stream   = NULL;
+    jsCtx       *js       = NULL;
+    natsStatus  s         = NATS_OK;
+
+    if ((ci == NULL) || (sub == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    natsSub_Lock(sub);
+    if ((sub->jsi == NULL) || (sub->jsi->consumer == NULL))
+    {
+        natsSub_Unlock(sub);
+        return nats_setDefaultError(NATS_INVALID_SUBSCRIPTION);
+    }
+    js = sub->jsi->js;
+    stream = (const char*) sub->jsi->stream;
+    DUP_STRING(s, consumer, sub->jsi->consumer);
+    if (s == NATS_OK)
+        sub->refs++;
+    natsSub_Unlock(sub);
+
+    if (s == NATS_OK)
+    {
+        s = js_GetConsumerInfo(ci, js, stream, consumer, opts, errCode);
+        NATS_FREE(consumer);
+        natsSub_release(sub);
+    }
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsSubscription_GetSequenceMismatch(jsConsumerSequenceMismatch *csm, natsSubscription *sub)
+{
+    jsSub *jsi;
+    struct mismatch *m = NULL;
+
+    if ((csm == NULL) || (sub == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    natsSubAndLdw_Lock(sub);
+    if (sub->jsi == NULL)
+    {
+        natsSubAndLdw_Unlock(sub);
+        return nats_setError(NATS_INVALID_SUBSCRIPTION, "%s", jsErrNotAJetStreamSubscription);
+    }
+    jsi = sub->jsi;
+    m = &jsi->mismatch;
+    if (m->dseq == m->ldseq)
+    {
+        natsSubAndLdw_Unlock(sub);
+        return NATS_NOT_FOUND;
+    }
+    memset(csm, 0, sizeof(jsConsumerSequenceMismatch));
+    csm->Stream = m->sseq;
+    csm->ConsumerClient = m->dseq;
+    csm->ConsumerServer = m->ldseq;
+    natsSubAndLdw_Unlock(sub);
+    return NATS_OK;
+}
+
+char*
+jsSub_checkForFlowControlResponse(natsSubscription *sub)
+{
+    jsSub *jsi     = sub->jsi;
+    char  *fcReply = NULL;
+
+    jsi->active = true;
+    if (sub->delivered >= jsi->fcDelivered)
+    {
+        fcReply = jsi->fcReply;
+        jsi->fcReply = NULL;
+        jsi->fcDelivered = 0;
+    }
+
+    return fcReply;
+}
+
+natsStatus
+jsSub_scheduleFlowControlResponse(jsSub *jsi, const char *reply)
+{
+    NATS_FREE(jsi->fcReply);
+    jsi->fcReply = NATS_STRDUP(reply);
+    if (jsi->fcReply == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    jsi->fcDelivered = jsi->fciseq;
+
+    return NATS_OK;
+}
+
+static natsStatus
+_checkMsg(natsMsg *msg, bool checkSts, bool *usrMsg, natsMsg *mhMsg)
+{
+    natsStatus  s    = NATS_OK;
+    const char  *val = NULL;
+    const char  *desc= NULL;
+
+    // Check for missed heartbeat special message
+    if (msg == mhMsg)
+    {
+        *usrMsg = false;
+        return NATS_MISSED_HEARTBEAT;
+    }
+
+    *usrMsg = true;
+
+    if ((msg->dataLen > 0) || (msg->hdrLen <= 0))
+        return NATS_OK;
+
+    s = natsMsgHeader_Get(msg, STATUS_HDR, &val);
+    // If no status header, this is still considered a user message, so OK.
+    if (s == NATS_NOT_FOUND)
+        return NATS_OK;
+    // If serious error, return it.
+    else if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    // At this point, this is known to be a status message, not a user message.
+    *usrMsg = false;
+
+    // If we don't care about status, we are done.
+    if (!checkSts)
+        return NATS_OK;
+
+    // 100 Idle hearbeat, return OK
+    if (strncmp(val, CTRL_STATUS, HDR_STATUS_LEN) == 0)
+        return NATS_OK;
+
+    // 404 indicating that there are no messages.
+    if (strncmp(val, NOT_FOUND_STATUS, HDR_STATUS_LEN) == 0)
+        return NATS_NOT_FOUND;
+
+    // 408 indicating request timeout
+    if (strncmp(val, REQ_TIMEOUT, HDR_STATUS_LEN) == 0)
+        return NATS_TIMEOUT;
+
+    // The possible 503 is handled directly in natsSub_nextMsg(), so we
+    // would never get it here in this function.
+
+    natsMsgHeader_Get(msg, DESCRIPTION_HDR, &desc);
+    return nats_setError(NATS_ERR, "%s", (desc == NULL ? "error checking pull subscribe message" : desc));
+}
+
+static natsStatus
+_sendPullRequest(natsConnection *nc, const char *subj, const char *rply,
+                 natsBuffer *buf, jsFetchRequest *req)
+{
+    natsStatus  s;
+    int64_t     expires;
+
+    // Make our request expiration a bit shorter than user provided expiration.
+    expires = (req->Expires >= (int64_t) 20E6 ? req->Expires - (int64_t) 10E6 : req->Expires);
+
+    natsBuf_Reset(buf);
+    s = natsBuf_AppendByte(buf, '{');
+    // Currently, Batch is required, so will always be > 0
+    IFOK(s, nats_marshalLong(buf, false, "batch", (int64_t) req->Batch));
+    if ((s == NATS_OK) && (req->MaxBytes > 0))
+        s = nats_marshalLong(buf, true, "max_bytes", req->MaxBytes);
+    if ((s == NATS_OK) && (expires > 0))
+        s = nats_marshalLong(buf, true, "expires", expires);
+    if ((s == NATS_OK) && (req->Heartbeat > 0))
+        s = nats_marshalLong(buf, true, "idle_heartbeat", req->Heartbeat);
+    if ((s == NATS_OK) && req->NoWait)
+        s = natsBuf_Append(buf, ",\"no_wait\":true", -1);
+    IFOK(s, natsBuf_AppendByte(buf, '}'));
+
+    // Sent the request to get more messages.
+    IFOK(s, natsConnection_PublishRequest(nc, subj, rply,
+        natsBuf_Data(buf), natsBuf_Len(buf)));
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+_fetch(natsMsgList *list, natsSubscription *sub, jsFetchRequest *req, bool simpleFetch)
+{
+    natsStatus      s       = NATS_OK;
+    natsMsg         **msgs  = NULL;
+    int             count   = 0;
+    natsConnection  *nc     = NULL;
+    const char      *subj   = NULL;
+    const char      *rply   = NULL;
+    int             pmc     = 0;
+    char            buffer[64];
+    natsBuffer      buf;
+    int64_t         start    = 0;
+    int64_t         deadline = 0;
+    int64_t         timeout  = 0;
+    int             size     = 0;
+    bool            sendReq  = true;
+    jsSub           *jsi     = NULL;
+    natsMsg         *mhMsg   = NULL;
+    bool            noWait;
+
+    if (list == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    memset(list, 0, sizeof(natsMsgList));
+
+    if ((sub == NULL) || (req == NULL) || (req->Batch <= 0) || (req->MaxBytes < 0))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    if (!req->NoWait && req->Expires <= 0)
+        return nats_setDefaultError(NATS_INVALID_TIMEOUT);
+
+    natsSub_Lock(sub);
+    jsi = sub->jsi;
+    if ((jsi == NULL) || !jsi->pull)
+    {
+        natsSub_Unlock(sub);
+        return nats_setError(NATS_INVALID_SUBSCRIPTION, "%s", jsErrNotAPullSubscription);
+    }
+    if (jsi->inFetch)
+    {
+        natsSub_Unlock(sub);
+        return nats_setError(NATS_ERR, "%s", jsErrConcurrentFetchNotAllowed);
+    }
+    msgs = (natsMsg**) NATS_CALLOC(req->Batch, sizeof(natsMsg*));
+    if (msgs == NULL)
+    {
+        natsSub_Unlock(sub);
+        return nats_setDefaultError(NATS_NO_MEMORY);
+    }
+    natsBuf_InitWithBackend(&buf, buffer, 0, sizeof(buffer));
+    nc   = sub->conn;
+    rply = (const char*) sub->subject;
+    subj = jsi->nxtMsgSubj;
+    pmc  = (sub->msgList.msgs > 0);
+    jsi->inFetch = true;
+    if (req->Heartbeat)
+    {
+        int64_t hbi = req->Heartbeat / 1000000;
+        sub->refs++;
+        if (jsi->hbTimer == NULL)
+        {
+            s = natsMsg_create(&jsi->mhMsg, NULL, 0, NULL, 0, NULL, 0, -1);
+            if (s == NATS_OK)
+            {
+                natsMsg_setNoDestroy(jsi->mhMsg);
+                s = natsTimer_Create(&jsi->hbTimer, _hbTimerFired, _hbTimerStopped, hbi*2, (void*) sub);
+            }
+            if (s != NATS_OK)
+                sub->refs--;
+        }
+        else
+            natsTimer_Reset(jsi->hbTimer, hbi);
+
+        mhMsg = jsi->mhMsg;
+    }
+    natsSub_Unlock(sub);
+
+    if (req->Expires > 0)
+    {
+        start = nats_Now();
+        timeout = req->Expires / (int64_t) 1E6;
+        deadline = start + timeout;
+    }
+
+    // First, if there are already pending messages in the internal sub,
+    // then get as much messages as we can (but not more than the batch).
+    while (pmc && (s == NATS_OK) && (count < req->Batch) && ((req->MaxBytes == 0) || (size < req->MaxBytes)))
+    {
+        natsMsg *msg  = NULL;
+        bool    usrMsg= false;
+
+        // This call will pull messages from the internal sync subscription
+        // but will not wait (and return NATS_TIMEOUT without updating
+        // the error stack) if there are no messages.
+        s = natsSub_nextMsg(&msg, sub, 0, true);
+        if (s == NATS_TIMEOUT)
+        {
+            s = NATS_OK;
+            break;
+        }
+        if (s == NATS_OK)
+        {
+            // Here we care only about user messages.
+            s = _checkMsg(msg, false, &usrMsg, mhMsg);
+            if ((s == NATS_OK) && usrMsg)
+            {
+                msgs[count++] = msg;
+                size += msg->wsz;
+            }
+            else
+                natsMsg_Destroy(msg);
+        }
+    }
+    if (s == NATS_OK)
+    {
+        // If we come from natsSubscription_Fetch() (simpleFetch is true), then
+        // we decide on the NoWait value.
+        if (simpleFetch)
+            noWait = (req->Batch - count > 1 ? true : false);
+        else
+            noWait = req->NoWait;
+    }
+
+    // If we have OK and not all messages, we will send a fetch
+    // request to the server.
+    while ((s == NATS_OK) && (count != req->Batch) && ((req->MaxBytes == 0) || (size < req->MaxBytes)))
+    {
+        natsMsg *msg    = NULL;
+        bool    usrMsg  = false;
+
+        if (req->Expires > 0)
+        {
+            timeout = deadline - nats_Now();
+            if (timeout <= 0)
+                s = NATS_TIMEOUT;
+        }
+
+        if ((s == NATS_OK) && sendReq)
+        {
+            sendReq = false;
+            req->Batch = req->Batch - (int64_t) count;
+            req->Expires = NATS_MILLIS_TO_NANOS(timeout);
+            req->NoWait = noWait;
+            s = _sendPullRequest(nc, subj, rply, &buf, req);
+        }
+        IFOK(s, natsSub_nextMsg(&msg, sub, timeout, true));
+        if (s == NATS_OK)
+        {
+            s = _checkMsg(msg, true, &usrMsg, mhMsg);
+            if ((s == NATS_OK) && usrMsg)
+            {
+                msgs[count++] = msg;
+                size += msg->wsz;
+            }
+            else
+            {
+                natsMsg_Destroy(msg);
+                // If we come from "simpleFetch" and we have a 404 for
+                // the noWait request and have not collected any message,
+                // then resend the request and ask to wait this time.
+                if (simpleFetch && noWait && (s == NATS_NOT_FOUND) && (count == 0))
+                {
+                    s        = NATS_OK;
+                    noWait   = false;
+                    sendReq  = true;
+                }
+            }
+        }
+    }
+
+    natsBuf_Cleanup(&buf);
+
+    // If count > 0 it means that we have gathered some user messages,
+    // so we need to return them to the user with a NATS_OK status.
+    if (count > 0)
+    {
+        // If there was an error, we need to clear the error stack,
+        // since we return NATS_OK.
+        if (s != NATS_OK)
+        {
+            nats_clearLastError();
+            s = NATS_OK;
+        }
+
+        // Update the list with what we have collected.
+        list->Msgs = msgs;
+        list->Count = count;
+    }
+
+    if (s != NATS_OK)
+        NATS_FREE(msgs);
+
+    natsSub_Lock(sub);
+    jsi->inFetch = false;
+    if (req->Heartbeat && (jsi->hbTimer != NULL))
+        natsTimer_Stop(jsi->hbTimer);
+    natsSub_Unlock(sub);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+jsFetchRequest_Init(jsFetchRequest *request)
+{
+    if (request == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    memset(request, 0, sizeof(jsFetchRequest));
+    return NATS_OK;
+}
+
+natsStatus
+natsSubscription_Fetch(natsMsgList *list, natsSubscription *sub, int batch, int64_t timeout,
+                       jsErrCode *errCode)
+{
+    natsStatus      s;
+    jsFetchRequest  req;
+
+    if (errCode != NULL)
+        *errCode = 0;
+
+    jsFetchRequest_Init(&req);
+    req.Batch = batch;
+    req.Expires = NATS_MILLIS_TO_NANOS(timeout);
+    s = _fetch(list, sub, &req, true);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsSubscription_FetchRequest(natsMsgList *list, natsSubscription *sub, jsFetchRequest *req)
+{
+    natsStatus      s;
+
+    s = _fetch(list, sub, req, false);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static void
+_hbTimerFired(natsTimer *timer, void* closure)
+{
+    natsSubscription    *sub = (natsSubscription*) closure;
+    jsSub               *jsi = sub->jsi;
+    bool                alert= false;
+    natsConnection      *nc  = NULL;
+    bool                oc   = false;
+    natsStatus          s    = NATS_OK;
+
+    natsSub_Lock(sub);
+    alert = !jsi->active;
+    oc = jsi->ordered;
+    jsi->active = false;
+    if (alert && jsi->pull)
+    {
+        // If there are messages pending then we can't really consider
+        // that we missed hearbeats. Wait for those to be processed and
+        // we will check missed HBs again.
+        if (sub->msgList.msgs == 0)
+        {
+            sub->msgList.msgs++;
+            sub->msgList.head = jsi->mhMsg;
+            sub->msgList.tail = jsi->mhMsg;
+            sub->msgList.bytes = natsMsg_dataAndHdrLen(jsi->mhMsg);
+            natsCondition_Signal(sub->cond);
+            natsTimer_Stop(timer);
+        }
+        natsSub_Unlock(sub);
+        return;
+    }
+    nc = sub->conn;
+    natsSub_Unlock(sub);
+
+    if (!alert)
+        return;
+
+    // For ordered consumers, we will need to reset
+    if (oc)
+    {
+        natsSub_Lock(sub);
+        if (!sub->closed)
+        {
+            // If we fail in that call, we will report to async err callback
+            // (if one is specified).
+            s = jsSub_resetOrderedConsumer(sub, sub->jsi->sseq+1);
+        }
+        natsSub_Unlock(sub);
+    }
+
+    natsConn_Lock(nc);
+    if (nc->opts->asyncErrCb != NULL)
+    {
+        // Even if we have called resetOrderedConsumer, we will post something
+        // to the async error callback, either "missed heartbeats", or the error
+        // that occurred trying to do the reset.
+        if (s == NATS_OK)
+            s = NATS_MISSED_HEARTBEAT;
+        natsAsyncCb_PostErrHandler(nc, sub, s, NULL);
+    }
+    natsConn_Unlock(nc);
+}
+
+// This is invoked when the subscription is destroyed, since in NATS C
+// client, timers will automatically fire again, so this callback is
+// invoked when the timer has been stopped (and we are ready to destroy it).
+static void
+_hbTimerStopped(natsTimer *timer, void* closure)
+{
+    natsSubscription *sub = (natsSubscription*) closure;
+
+    natsSub_release(sub);
+}
+
+static bool
+_stringPropertyDiffer(const char *user, const char *server)
+{
+    if (nats_IsStringEmpty(user))
+        return false;
+
+    if (nats_IsStringEmpty(server))
+        return true;
+
+    return (strcmp(user, server) != 0 ? true : false);
+}
+
+#define CFG_CHECK_ERR_START "configuration requests %s to be "
+#define CFG_CHECK_ERR_END   ", but consumer's value is "
+
+static natsStatus
+_checkConfig(jsConsumerConfig *s, jsConsumerConfig *u)
+{
+    if (_stringPropertyDiffer(u->Durable, s->Durable))
+        return nats_setError(NATS_ERR, CFG_CHECK_ERR_START "'%s'" CFG_CHECK_ERR_END "'%s'", "durable", u->Durable, s->Durable);
+
+    if (_stringPropertyDiffer(u->Description, s->Description))
+        return nats_setError(NATS_ERR, CFG_CHECK_ERR_START "'%s'" CFG_CHECK_ERR_END "'%s'", "description", u->Description, s->Description);
+
+    if ((int) u->DeliverPolicy >= 0 && u->DeliverPolicy != s->DeliverPolicy)
+        return nats_setError(NATS_ERR, CFG_CHECK_ERR_START "%d" CFG_CHECK_ERR_END "%d", "deliver policy", u->DeliverPolicy, s->DeliverPolicy);
+
+    if (u->OptStartSeq > 0 && u->OptStartSeq != s->OptStartSeq)
+        return nats_setError(NATS_ERR, CFG_CHECK_ERR_START "%" PRIu64 CFG_CHECK_ERR_END "%" PRIu64, "optional start sequence", u->OptStartSeq, s->OptStartSeq);
+
+    if (u->OptStartTime > 0 && u->OptStartTime != s->OptStartTime)
+        return nats_setError(NATS_ERR, CFG_CHECK_ERR_START "%" PRId64 CFG_CHECK_ERR_END "%" PRId64, "optional start time", u->OptStartTime, s->OptStartTime);
+
+    if ((int) u->AckPolicy >= 0 && u->AckPolicy != s->AckPolicy)
+        return nats_setError(NATS_ERR, CFG_CHECK_ERR_START "%d" CFG_CHECK_ERR_END "%d", "ack policy", u->AckPolicy, s->AckPolicy);
+
+    if (u->AckWait > 0 && u->AckWait != s->AckWait)
+        return nats_setError(NATS_ERR, CFG_CHECK_ERR_START "%" PRId64 CFG_CHECK_ERR_END "%" PRId64, "ack wait", u->AckWait, s->AckWait);
+
+    if (u->MaxDeliver > 0 && u->MaxDeliver != s->MaxDeliver)
+        return nats_setError(NATS_ERR, CFG_CHECK_ERR_START "%" PRId64 CFG_CHECK_ERR_END "%" PRId64, "max deliver", u->MaxDeliver, s->MaxDeliver);
+
+    if (u->BackOffLen > 0 && u->BackOffLen != s->BackOffLen)
+        return nats_setError(NATS_ERR, CFG_CHECK_ERR_START "%d" CFG_CHECK_ERR_END "%d", "backoff list length", u->BackOffLen, s->BackOffLen);
+
+    if ((int) u->ReplayPolicy >= 0 && u->ReplayPolicy != s->ReplayPolicy)
+        return nats_setError(NATS_ERR, CFG_CHECK_ERR_START "%d" CFG_CHECK_ERR_END "%d", "replay policy", u->ReplayPolicy, s->ReplayPolicy);
+
+    if (u->RateLimit > 0 && u->RateLimit != s->RateLimit)
+        return nats_setError(NATS_ERR, CFG_CHECK_ERR_START "%" PRIu64 CFG_CHECK_ERR_END "%" PRIu64, "rate limit", u->RateLimit, s->RateLimit);
+
+    if (_stringPropertyDiffer(u->SampleFrequency, s->SampleFrequency))
+        return nats_setError(NATS_ERR, CFG_CHECK_ERR_START "'%s'" CFG_CHECK_ERR_END "'%s'", "sample frequency", u->SampleFrequency, s->SampleFrequency);
+
+    if (u->MaxWaiting > 0 && u->MaxWaiting != s->MaxWaiting)
+        return nats_setError(NATS_ERR, CFG_CHECK_ERR_START "%" PRId64 CFG_CHECK_ERR_END "%" PRId64, "max waiting", u->MaxWaiting, s->MaxWaiting);
+
+    if (u->MaxAckPending > 0 && u->MaxAckPending != s->MaxAckPending)
+        return nats_setError(NATS_ERR, CFG_CHECK_ERR_START "%" PRId64 CFG_CHECK_ERR_END "%" PRId64, "max ack pending", u->MaxAckPending, s->MaxAckPending);
+
+    // For flow control, we want to fail if the user explicit wanted it, but
+    // it is not set in the existing consumer. If it is not asked by the user,
+    // the library still handles it and so no reason to fail.
+    if (u->FlowControl && !s->FlowControl)
+        return nats_setError(NATS_ERR, CFG_CHECK_ERR_START "'%s'" CFG_CHECK_ERR_END "'%s'", "flow control", "true", "false");
+
+    if (u->Heartbeat > 0 && u->Heartbeat != s->Heartbeat)
+        return nats_setError(NATS_ERR, CFG_CHECK_ERR_START "%" PRId64 CFG_CHECK_ERR_END "%" PRId64, "heartbeat", u->Heartbeat, s->Heartbeat);
+
+    if (u->HeadersOnly != s->HeadersOnly)
+        return nats_setError(NATS_ERR, CFG_CHECK_ERR_START "%d" CFG_CHECK_ERR_END "%d", "headers only", u->HeadersOnly, s->HeadersOnly);
+
+    if (u->MaxRequestBatch > 0 && u->MaxRequestBatch != s->MaxRequestBatch)
+        return nats_setError(NATS_ERR, CFG_CHECK_ERR_START "%" PRId64 CFG_CHECK_ERR_END "%" PRId64, "max request batch", u->Heartbeat, s->Heartbeat);
+
+    if (u->MaxRequestExpires > 0 && u->MaxRequestExpires != s->MaxRequestExpires)
+        return nats_setError(NATS_ERR, CFG_CHECK_ERR_START "%" PRId64 CFG_CHECK_ERR_END "%" PRId64, "max request expires", u->MaxRequestExpires, s->MaxRequestExpires);
+
+    if (u->InactiveThreshold > 0 && u->InactiveThreshold != s->InactiveThreshold)
+        return nats_setError(NATS_ERR, CFG_CHECK_ERR_START "%" PRId64 CFG_CHECK_ERR_END "%" PRId64, "inactive threshold", u->InactiveThreshold, s->InactiveThreshold);
+
+    if (u->Replicas > 0 && u->Replicas != s->Replicas)
+        return nats_setError(NATS_ERR, CFG_CHECK_ERR_START "%" PRId64 CFG_CHECK_ERR_END "%" PRId64, "replicas", u->Replicas, s->Replicas);
+
+    if (u->MemoryStorage != s->MemoryStorage)
+        return nats_setError(NATS_ERR, CFG_CHECK_ERR_START "%d" CFG_CHECK_ERR_END "%d", "memory storage", u->MemoryStorage, s->MemoryStorage);
+
+    return NATS_OK;
+}
+
+static natsStatus
+_processConsInfo(const char **dlvSubject, jsConsumerInfo *info, jsConsumerConfig *userCfg,
+                 bool isPullMode, const char *subj, const char *queue)
+{
+    bool                dlvSubjEmpty = false;
+    jsConsumerConfig    *ccfg        = info->Config;
+    const char          *dg          = NULL;
+    natsStatus          s            = NATS_OK;
+
+    *dlvSubject = NULL;
+
+    // Make sure this new subject matches or is a subset.
+    if (!nats_IsStringEmpty(subj)
+        && !nats_IsStringEmpty(ccfg->FilterSubject)
+        && (strcmp(subj, ccfg->FilterSubject) != 0))
+    {
+        return nats_setError(NATS_ERR, "subject '%s' does not match consumer filter subject '%s'",
+                             subj, ccfg->FilterSubject);
+    }
+
+    // Check that if user wants to create a queue sub,
+    // the consumer has no HB nor FC.
+    queue = (nats_IsStringEmpty(queue) ? NULL : queue);
+
+    if (queue != NULL)
+    {
+        if (ccfg->Heartbeat > 0)
+            return nats_setError(NATS_ERR, "%s", jsErrNoHeartbeatForQueueSub);
+
+        if (ccfg->FlowControl)
+            return nats_setError(NATS_ERR, "%s", jsErrNoFlowControlForQueueSub);
+    }
+
+    dlvSubjEmpty = nats_IsStringEmpty(ccfg->DeliverSubject);
+
+    // Prevent binding a subscription against incompatible consumer types.
+    if (isPullMode && !dlvSubjEmpty)
+    {
+        return nats_setError(NATS_ERR, "%s", jsErrPullSubscribeToPushConsumer);
+    }
+    else if (!isPullMode && dlvSubjEmpty)
+    {
+        return nats_setError(NATS_ERR, "%s", jsErrPullSubscribeRequired);
+    }
+
+    // If pull mode, nothing else to check here.
+    if (isPullMode)
+    {
+        s = _checkConfig(ccfg, userCfg);
+        return NATS_UPDATE_ERR_STACK(s);
+    }
+
+    // At this point, we know the user wants push mode, and the JS consumer is
+    // really push mode.
+    dg = ccfg->DeliverGroup;
+
+    if (nats_IsStringEmpty(dg))
+    {
+        // Prevent an user from attempting to create a queue subscription on
+        // a JS consumer that was not created with a deliver group.
+        if (queue != NULL)
+        {
+            return nats_setError(NATS_ERR, "%s",
+                                 "cannot create a queue subscription for a consumer without a deliver group");
+        }
+        else if (info->PushBound)
+        {
+            // Need to reject a non queue subscription to a non queue consumer
+            // if the consumer is already bound.
+            return nats_setError(NATS_ERR, "%s", "consumer is already bound to a subscription");
+        }
+    }
+    else
+    {
+        // If the JS consumer has a deliver group, we need to fail a non queue
+        // subscription attempt:
+        if (queue == NULL)
+        {
+            return nats_setError(NATS_ERR,
+                                "cannot create a subscription for a consumer with a deliver group %s",
+                                dg);
+        }
+        else if (strcmp(queue, dg) != 0)
+        {
+            // Here the user's queue group name does not match the one associated
+            // with the JS consumer.
+            return nats_setError(NATS_ERR,
+                                 "cannot create a queue subscription '%s' for a consumer with a deliver group '%s'",
+                                 queue, dg);
+        }
+    }
+    s = _checkConfig(ccfg, userCfg);
+    if (s == NATS_OK)
+        *dlvSubject = ccfg->DeliverSubject;
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+js_checkConsName(const char *cons, bool isDurable)
+{
+    int i;
+
+    if (nats_IsStringEmpty(cons))
+        return nats_setError(NATS_INVALID_ARG, "%s", jsErrConsumerNameRequired);
+
+    for (i=0; i<(int)strlen(cons); i++)
+    {
+        char c = cons[i];
+        if ((c == '.') || (c == ' ') || (c == '*') || (c == '>'))
+        {
+            return nats_setError(NATS_INVALID_ARG, "%s '%s' (cannot contain '%c')",
+                (isDurable ? jsErrInvalidDurableName : jsErrInvalidConsumerName), cons, c);
+        }
+    }
+    return NATS_OK;
+}
+
+static natsStatus
+_subscribe(natsSubscription **new_sub, jsCtx *js, const char *subject, const char *pullDurable,
+           natsMsgHandler usrCB, void *usrCBClosure, bool isPullMode,
+           jsOptions *jsOpts, jsSubOptions *opts, jsErrCode *errCode)
+{
+    natsStatus          s           = NATS_OK;
+    const char          *stream     = NULL;
+    const char          *consumer   = NULL;
+    const char          *durable    = NULL;
+    const char          *deliver    = NULL;
+    jsErrCode           jerr        = 0;
+    jsConsumerInfo      *info       = NULL;
+    bool                lookupErr   = false;
+    bool                consBound   = false;
+    bool                isQueue     = false;
+    natsConnection      *nc         = NULL;
+    bool                freePfx     = false;
+    bool                freeStream  = false;
+    jsSub               *jsi        = NULL;
+    int64_t             hbi         = 0;
+    bool                create      = false;
+    natsSubscription    *sub        = NULL;
+    natsMsgHandler      cb          = NULL;
+    void                *cbClosure  = NULL;
+    natsInbox           *inbox      = NULL;
+    int64_t             maxap       = 0;
+    jsOptions           jo;
+    jsSubOptions        o;
+    jsConsumerConfig    cfgStack;
+    jsConsumerConfig    *cfg = NULL;
+    jsConsumerConfig    *ocCfg = NULL;
+
+    if ((new_sub == NULL) || (js == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    s = js_setOpts(&nc, &freePfx, js, jsOpts, &jo);
+    if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    // If `opts` is not specified, point to a stack initialized one so
+    // we don't have to keep checking if `opts` is NULL or not.
+    if (opts == NULL)
+    {
+        jsSubOptions_Init(&o);
+        opts = &o;
+    }
+    if (opts->Config.InactiveThreshold < 0)
+        return nats_setError(NATS_INVALID_ARG,
+                             "invalid InactiveThreshold value (%d), needs to be greater or equal to 0",
+                             (int) opts->Config.InactiveThreshold);
+
+    // If user configures optional start sequence or time, the deliver policy
+    // need to be updated accordingly. Server will return error if user tries to have both set.
+    if (opts->Config.OptStartSeq > 0)
+        opts->Config.DeliverPolicy = js_DeliverByStartSequence;
+    if (opts->Config.OptStartTime > 0)
+        opts->Config.DeliverPolicy = js_DeliverByStartTime;
+
+    isQueue  = !nats_IsStringEmpty(opts->Queue);
+    stream   = opts->Stream;
+    durable  = (pullDurable != NULL ? pullDurable : opts->Config.Durable);
+    consumer = opts->Consumer;
+    consBound= (!nats_IsStringEmpty(stream) && !nats_IsStringEmpty(consumer));
+
+    if (nats_IsStringEmpty(subject) && !consBound)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    // Do some quick checks here for ordered consumers.
+    if (opts->Ordered)
+    {
+        // Check for pull mode.
+        if (isPullMode)
+            return nats_setError(NATS_INVALID_ARG, "%s", jsErrOrderedConsNoPullMode);
+        // Make sure we are not durable.
+        if (!nats_IsStringEmpty(durable))
+            return nats_setError(NATS_INVALID_ARG, "%s", jsErrOrderedConsNoDurable);
+        // Check ack policy.
+        if ((int) opts->Config.AckPolicy != -1)
+            return nats_setError(NATS_INVALID_ARG, "%s", jsErrOrderedConsNoAckPolicy);
+        // Check max deliver. If set, it has to be 1.
+        if ((opts->Config.MaxDeliver > 0) && (opts->Config.MaxDeliver != 1))
+            return nats_setError(NATS_INVALID_ARG, "%s", jsErrOrderedConsNoMaxDeliver);
+        // No deliver subject, we pick our own.
+        if (!nats_IsStringEmpty(opts->Config.DeliverSubject))
+            return nats_setError(NATS_INVALID_ARG, "%s", jsErrOrderedConsNoDeliverSubject);
+        // Queue groups not allowed.
+        if (isQueue)
+            return nats_setError(NATS_INVALID_ARG, "%s", jsErrOrderedConsNoQueue);
+        // Check for bound consumers.
+        if (!nats_IsStringEmpty(consumer))
+            return nats_setError(NATS_INVALID_ARG, "%s", jsErrOrderedConsNoBind);
+    }
+    else if (isQueue)
+    {
+        // Reject a user configuration that would want to define hearbeats with
+        // a queue subscription.
+        if (opts->Config.Heartbeat > 0)
+            return nats_setError(NATS_INVALID_ARG, "%s", jsErrNoHeartbeatForQueueSub);
+        // Same for flow control
+        if (opts->Config.FlowControl)
+            return nats_setError(NATS_INVALID_ARG, "%s", jsErrNoFlowControlForQueueSub);
+        // If no durable name was provided, use the queue name as the durable.
+        if (nats_IsStringEmpty(durable))
+            durable = opts->Queue;
+    }
+
+    // If a durable name is specified, check that it is valid
+    if (!nats_IsStringEmpty(durable))
+    {
+        if ((s = js_checkConsName(durable, true)) != NATS_OK)
+            return NATS_UPDATE_ERR_STACK(s);
+    }
+
+    // In case a consumer has not been set explicitly, then the durable name
+    // will be used as the consumer name (after that, `consumer` will still be
+    // possibly NULL).
+    if (nats_IsStringEmpty(consumer))
+        consumer = durable;
+
+    // Find the stream mapped to the subject if not bound to a stream already,
+    // that is, if user did not provide a `Stream` name through options).
+    if (nats_IsStringEmpty(stream))
+    {
+        s = _lookupStreamBySubject(&stream, nc, subject, &jo, errCode);
+        if (s != NATS_OK)
+            goto END;
+
+        freeStream = true;
+    }
+
+    // If a consumer name is specified, try to lookup the consumer and
+    // if it exists, will attach to it.
+    if (!nats_IsStringEmpty(consumer))
+    {
+        s = js_GetConsumerInfo(&info, js, stream, consumer, &jo, &jerr);
+        lookupErr = (s == NATS_TIMEOUT) || (jerr == JSNotEnabledErr);
+    }
+
+PROCESS_INFO:
+    if (info != NULL)
+    {
+        if (info->Config == NULL)
+        {
+            s = nats_setError(NATS_ERR, "%s", "no configuration in consumer info");
+            goto END;
+        }
+        s = _processConsInfo(&deliver, info, &(opts->Config), isPullMode, subject, opts->Queue);
+        if (s != NATS_OK)
+            goto END;
+
+        // Capture the HB interval (convert in millsecond since Go duration is in nanos)
+        hbi = info->Config->Heartbeat / 1000000;
+        maxap = info->Config->MaxAckPending;
+    }
+    else if (((s != NATS_OK) && (s != NATS_NOT_FOUND)) || ((s == NATS_NOT_FOUND) && consBound))
+    {
+        // If the consumer is being bound and got an error on pull subscribe then allow the error.
+        if (!(isPullMode && lookupErr && consBound))
+            goto END;
+
+        s = NATS_OK;
+    }
+    else
+    {
+        s = NATS_OK;
+        // Make a shallow copy of the provided consumer config
+        // since we may have to change some fields before calling
+        // AddConsumer.
+        cfg = &cfgStack;
+        memcpy(cfg, &(opts->Config), sizeof(jsConsumerConfig));
+
+        if (!isPullMode)
+        {
+            // Attempt to create consumer if not found nor binding.
+            natsConn_newInbox(nc, &inbox);
+            deliver = (const char*) inbox;
+            cfg->DeliverSubject = deliver;
+        }
+
+        // Do filtering always, server will clear as needed.
+        cfg->FilterSubject = subject;
+
+        if (opts->Ordered)
+        {
+            const char *tmp = NULL;
+
+            cfg->FlowControl = true;
+            cfg->AckPolicy   = js_AckNone;
+            cfg->MaxDeliver  = 1;
+            cfg->AckWait     = NATS_SECONDS_TO_NANOS(24*60*60); // Just set to something known, not utilized.
+            if (opts->Config.Heartbeat <= 0)
+                cfg->Heartbeat = jsOrderedHBInterval;
+            cfg->MemoryStorage = true;
+            cfg->Replicas      = 1;
+
+            // Let's clone without the delivery subject because it will need
+            // to be set to something new when recreating it anyway.
+            tmp = cfg->DeliverSubject;
+            cfg->DeliverSubject = NULL;
+            s = js_cloneConsumerConfig(cfg, &ocCfg);
+            cfg->DeliverSubject = tmp;
+        }
+        else
+        {
+            // Set config durable with "durable" variable, which will
+            // possibly be NULL.
+            cfg->Durable = durable;
+
+            // Set DeliverGroup to queue name, possibly NULL
+            cfg->DeliverGroup = opts->Queue;
+        }
+
+        // Capture the HB interval (convert in millsecond since Go duration is in nanos)
+        hbi = cfg->Heartbeat / 1000000;
+
+        create = true;
+    }
+    if (s == NATS_OK)
+    {
+        jsi = (jsSub*) NATS_CALLOC(1, sizeof(jsSub));
+        if (jsi == NULL)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+        else
+        {
+            if (isPullMode && !nats_IsStringEmpty(consumer))
+            {
+                if (nats_asprintf(&(jsi->nxtMsgSubj), jsApiRequestNextT, jo.Prefix, stream, consumer) < 0)
+                    s = nats_setDefaultError(NATS_NO_MEMORY);
+            }
+            IF_OK_DUP_STRING(s, jsi->stream, stream);
+            if (s == NATS_OK)
+            {
+                jsi->js     = js;
+                jsi->hbi    = hbi;
+                jsi->pull   = isPullMode;
+                jsi->ordered= opts->Ordered;
+                jsi->ocCfg  = ocCfg;
+                jsi->dseq   = 1;
+                jsi->ackNone= (opts->Config.AckPolicy == js_AckNone || opts->Ordered);
+                js_retain(js);
+
+                if ((usrCB != NULL) && !opts->ManualAck && !jsi->ackNone)
+                {
+                    // Keep track of user provided CB and closure
+                    jsi->usrCb          = usrCB;
+                    jsi->usrCbClosure   = usrCBClosure;
+                    // Use our own when creating the NATS subscription.
+                    cb          = _autoAckCB;
+                    cbClosure   = (void*) jsi;
+                }
+                else if (usrCB != NULL)
+                {
+                    cb        = usrCB;
+                    cbClosure = usrCBClosure;
+                }
+            }
+        }
+    }
+    if (s == NATS_OK)
+    {
+        if (isPullMode)
+        {
+            s = natsConn_newInbox(nc, &inbox);
+            deliver = (const char*) inbox;
+        }
+        // Create the NATS subscription on given deliver subject. Note that
+        // cb/cbClosure will be NULL for sync or pull subscriptions.
+        IFOK(s, natsConn_subscribeImpl(&sub, nc, true, deliver,
+                                       opts->Queue, 0, cb, cbClosure, false, jsi));
+        if ((s == NATS_OK) && (hbi > 0) && !isPullMode)
+        {
+            // We will create a timer if we use create an ordered consumer, or
+            // if the async error callback is registered.
+            bool ct = opts->Ordered;
+
+            // Check to see if it is even worth creating a timer to check
+            // on missed heartbeats, since the way to notify the user will be
+            // through async callback.
+            natsConn_Lock(nc);
+            ct = ct || (nc->opts->asyncErrCb != NULL ? true : false);
+            natsConn_Unlock(nc);
+
+            if (ct)
+            {
+                natsSub_Lock(sub);
+                sub->refs++;
+                s = natsTimer_Create(&jsi->hbTimer, _hbTimerFired, _hbTimerStopped, hbi*2, (void*) sub);
+                if (s != NATS_OK)
+                    sub->refs--;
+                natsSub_Unlock(sub);
+            }
+        }
+    }
+    if ((s == NATS_OK) && create)
+    {
+        // Multiple subscribers could compete in creating the first consumer
+        // that will be shared using the same durable name. If this happens, then
+        // do a lookup of the consumer info subscribe using the latest info.
+        s = js_AddConsumer(&info, js, stream, cfg, &jo, &jerr);
+        if (s != NATS_OK)
+        {
+            if ((jerr != JSConsumerExistingActiveErr) && (jerr != JSConsumerNameExistErr))
+                goto END;
+
+            jsConsumerInfo_Destroy(info);
+            info = NULL;
+
+            s = js_GetConsumerInfo(&info, js, stream, consumer, &jo, &jerr);
+            if (s != NATS_OK)
+                goto END;
+
+            // We will re-create the sub/jsi, so destroy here and go back to point where
+            // we process the consumer info response.
+            natsSubscription_Destroy(sub);
+            sub = NULL;
+            jsi = NULL;
+            create = false;
+
+            goto PROCESS_INFO;
+        }
+        else
+        {
+            maxap = info->Config->MaxAckPending;
+            natsSub_Lock(sub);
+            jsi->dc = true;
+            jsi->pending = info->NumPending + info->Delivered.Consumer;
+            // There may be a race in the case of an ordered consumer where by this
+            // time, the consumer has been recreated (jsResetOrderedConsumer). So
+            // set only if jsi->consumer is NULL!
+            if (jsi->consumer == NULL)
+            {
+                DUP_STRING(s, jsi->consumer, info->Name);
+                if (s == NATS_OK)
+                {
+                    NATS_FREE(jsi->nxtMsgSubj);
+                    jsi->nxtMsgSubj = NULL;
+                    if (nats_asprintf(&(jsi->nxtMsgSubj), jsApiRequestNextT, jo.Prefix, stream, jsi->consumer) < 0)
+                        s = nats_setDefaultError(NATS_NO_MEMORY);
+                }
+            }
+            natsSub_Unlock(sub);
+        }
+    }
+
+END:
+    if (s == NATS_OK)
+    {
+        int64_t ml = 0;
+        int64_t bl = 0;
+
+        natsSub_Lock(sub);
+        ml = (int64_t) sub->msgsLimit;
+        bl = (int64_t) sub->bytesLimit;
+        natsSub_Unlock(sub);
+        if (maxap > ml)
+        {
+            ml = maxap;
+            if (maxap*1024*1024 > bl)
+                bl = maxap*1024*1024;
+
+            natsSubscription_SetPendingLimits(sub, (int) ml, (int) bl);
+        }
+        *new_sub = sub;
+    }
+    else
+    {
+        if (sub == NULL)
+            jsSub_free(jsi);
+        else
+            natsSubscription_Destroy(sub);
+
+        if (errCode != NULL)
+            *errCode = jerr;
+    }
+
+    // Common cleanup regardless of success or not.
+    jsConsumerInfo_Destroy(info);
+    if (freePfx)
+        NATS_FREE((char*) jo.Prefix);
+    if (freeStream)
+        NATS_FREE((char*) stream);
+    natsInbox_Destroy(inbox);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+js_Subscribe(natsSubscription **sub, jsCtx *js, const char *subject,
+             natsMsgHandler cb, void *cbClosure,
+             jsOptions *jsOpts, jsSubOptions *opts, jsErrCode *errCode)
+{
+    natsStatus s;
+
+    if (errCode != NULL)
+        *errCode = 0;
+
+    if (cb == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    s = _subscribe(sub, js, subject, NULL, cb, cbClosure, false, jsOpts, opts, errCode);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+js_SubscribeSync(natsSubscription **sub, jsCtx *js, const char *subject,
+                 jsOptions *jsOpts, jsSubOptions *opts, jsErrCode *errCode)
+{
+    natsStatus s;
+
+    if (errCode != NULL)
+        *errCode = 0;
+
+    s = _subscribe(sub, js, subject, NULL, NULL, NULL, false, jsOpts, opts, errCode);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+js_PullSubscribe(natsSubscription **sub, jsCtx *js, const char *subject, const char *durable,
+                 jsOptions *jsOpts, jsSubOptions *opts, jsErrCode *errCode)
+{
+    natsStatus s;
+
+    if (errCode != NULL)
+        *errCode = 0;
+
+    s = _subscribe(sub, js, subject, durable, NULL, NULL, true, jsOpts, opts, errCode);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+typedef struct __ackOpts
+{
+    const char  *ackType;
+    bool        inProgress;
+    bool        sync;
+    int64_t     nakDelay;
+
+} _ackOpts;
+
+static natsStatus
+_ackMsg(natsMsg *msg, jsOptions *opts, _ackOpts *o, jsErrCode *errCode)
+{
+    natsSubscription    *sub = NULL;
+    natsConnection      *nc  = NULL;
+    jsCtx               *js  = NULL;
+    jsSub               *jsi = NULL;
+    natsStatus          s    = NATS_OK;
+    const char          *body= o->ackType;
+    bool                sync = o->sync;
+    int64_t             wait = 0;
+    char                tmp[64];
+
+    if (msg == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    if (natsMsg_isAcked(msg))
+        return NATS_OK;
+
+    if (msg->sub == NULL)
+        return nats_setError(NATS_ILLEGAL_STATE, "%s", jsErrMsgNotBound);
+
+    if (nats_IsStringEmpty(msg->reply))
+        return nats_setError(NATS_ILLEGAL_STATE, "%s", jsErrMsgNotJS);
+
+    // All these are immutable and don't need locking.
+    sub = msg->sub;
+    jsi = sub->jsi;
+    js = jsi->js;
+    nc = sub->conn;
+
+    // If option with Wait is specified, transform all Acks as sync operation.
+    if ((opts != NULL) && (opts->Wait > 0))
+    {
+        wait = opts->Wait;
+        sync = true;
+    }
+    if (o->nakDelay > 0)
+    {
+        int64_t v = NATS_MILLIS_TO_NANOS(o->nakDelay);
+        snprintf(tmp, sizeof(tmp), "%s {\"delay\":%" PRId64 "}", o->ackType, v);
+        body = (const char*) tmp;
+    }
+    if (sync)
+    {
+        natsMsg *rply   = NULL;
+
+        if (wait == 0)
+        {
+            // When getting a context, if user did not specify a wait,
+            // we default to jsDefaultRequestWait, so this won't be 0.
+            js_lock(js);
+            wait = js->opts.Wait;
+            js_unlock(js);
+        }
+        IFOK_JSR(s, natsConnection_RequestString(&rply, nc, msg->reply, body, wait));
+        natsMsg_Destroy(rply);
+    }
+    else
+    {
+        s = natsConnection_PublishString(nc, msg->reply, body);
+    }
+    // Indicate that we have ack'ed the message
+    if ((s == NATS_OK) && !o->inProgress)
+        natsMsg_setAcked(msg);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsMsg_Ack(natsMsg *msg, jsOptions *opts)
+{
+    natsStatus  s;
+    _ackOpts    o = {jsAckAck, false, false, 0};
+
+    s = _ackMsg(msg, opts, &o, NULL);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsMsg_AckSync(natsMsg *msg, jsOptions *opts, jsErrCode *errCode)
+{
+    natsStatus  s;
+    _ackOpts    o = {jsAckAck, false, true, 0};
+
+    s = _ackMsg(msg, opts, &o, errCode);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsMsg_Nak(natsMsg *msg, jsOptions *opts)
+{
+    natsStatus  s;
+    _ackOpts    o = {jsAckNak, false, false, 0};
+
+    s = _ackMsg(msg, opts, &o, NULL);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsMsg_NakWithDelay(natsMsg *msg, int64_t delay, jsOptions *opts)
+{
+    natsStatus  s;
+    _ackOpts    o = {jsAckNak, false, false, delay};
+
+    s = _ackMsg(msg, opts, &o, NULL);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsMsg_InProgress(natsMsg *msg, jsOptions *opts)
+{
+    natsStatus  s;
+    _ackOpts    o = {jsAckInProgress, true, false, 0};
+
+    s = _ackMsg(msg, opts, &o, NULL);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsMsg_Term(natsMsg *msg, jsOptions *opts)
+{
+    natsStatus  s;
+    _ackOpts    o = {jsAckTerm, false, false, 0};
+
+    s = _ackMsg(msg, opts, &o, NULL);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsMsg_GetMetaData(jsMsgMetaData **new_meta, natsMsg *msg)
+{
+    jsMsgMetaData   *meta = NULL;
+    natsStatus      s;
+
+    if ((new_meta == NULL) || (msg == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+     if (msg->sub == NULL)
+        return nats_setError(NATS_ILLEGAL_STATE, "%s", jsErrMsgNotBound);
+
+    if (nats_IsStringEmpty(msg->reply))
+        return nats_setError(NATS_ILLEGAL_STATE, "%s", jsErrMsgNotJS);
+
+    if (strstr(msg->reply, jsAckPrefix) != msg->reply)
+        return nats_setError(NATS_ERR, "invalid meta data '%s'", msg->reply);
+
+    meta = (jsMsgMetaData*) NATS_CALLOC(1, sizeof(jsMsgMetaData));
+    if (meta == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    s = js_getMetaData(msg->reply+jsAckPrefixLen,
+                        &(meta->Domain),
+                        &(meta->Stream),
+                        &(meta->Consumer),
+                        &(meta->NumDelivered),
+                        &(meta->Sequence.Stream),
+                        &(meta->Sequence.Consumer),
+                        &(meta->Timestamp),
+                        &(meta->NumPending),
+                        8);
+    if (s == NATS_ERR)
+        s = nats_setError(NATS_ERR, "invalid meta data '%s'", msg->reply);
+
+    if (s == NATS_OK)
+        *new_meta = meta;
+    else
+        jsMsgMetaData_Destroy(meta);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+void
+jsMsgMetaData_Destroy(jsMsgMetaData *meta)
+{
+    if (meta == NULL)
+        return;
+
+    NATS_FREE(meta->Stream);
+    NATS_FREE(meta->Consumer);
+    NATS_FREE(meta->Domain);
+    NATS_FREE(meta);
+}
+
+bool
+natsMsg_isJSCtrl(natsMsg *msg, int *ctrlType)
+{
+    char *p = NULL;
+
+    *ctrlType = 0;
+
+    if ((msg->dataLen > 0) || (msg->hdrLen <= 0))
+        return false;
+
+    if (strstr(msg->hdr, HDR_LINE_PRE) != msg->hdr)
+        return false;
+
+    p = msg->hdr + HDR_LINE_PRE_LEN;
+    if (*p != ' ')
+        return false;
+
+    while ((*p != '\0') && isspace(*p))
+        p++;
+
+    if ((*p == '\r') || (*p == '\n') || (*p == '\0'))
+        return false;
+
+    if (strstr(p, CTRL_STATUS) != p)
+        return false;
+
+    p += HDR_STATUS_LEN;
+
+    if (!isspace(*p))
+        return false;
+
+    while (isspace(*p))
+        p++;
+
+    if (strstr(p, "Idle") == p)
+        *ctrlType = jsCtrlHeartbeat;
+    else if (strstr(p, "Flow") == p)
+        *ctrlType = jsCtrlFlowControl;
+
+    return true;
+}
+
+// Update and replace sid.
+// Lock should be held on entry but will be unlocked to prevent lock inversion.
+int64_t
+applyNewSID(natsSubscription *sub)
+{
+    int64_t         osid = 0;
+    int64_t         nsid = 0;
+    natsConnection  *nc  = sub->conn;
+
+    natsSub_Unlock(sub);
+
+    natsMutex_Lock(nc->subsMu);
+    osid = sub->sid;
+    natsHash_Remove(nc->subs, osid);
+    // Place new one.
+    nc->ssid++;
+    nsid = nc->ssid;
+    natsHash_Set(nc->subs, nsid, sub, NULL);
+    natsMutex_Unlock(nc->subsMu);
+
+    natsSub_Lock(sub);
+    sub->sid = nsid;
+    return osid;
+}
+
+static void
+_recreateOrderedCons(void *closure)
+{
+    jsOrderedConsInfo   *oci = (jsOrderedConsInfo*) closure;
+    natsConnection      *nc  = oci->nc;
+    natsSubscription    *sub = oci->sub;
+    natsThread          *t   = NULL;
+    jsSub               *jsi = NULL;
+    jsConsumerInfo      *ci  = NULL;
+    jsConsumerConfig    *cc  = NULL;
+    natsStatus          s;
+
+    // Note: if anything fail here, the reset/recreate of the ordered consumer
+    // will happen again based on the missed HB timer.
+
+    // Unsubscribe and subscribe with new inbox and sid.
+    // Remap a new low level sub into this sub since its client accessible.
+    // This is done here in this thread to prevent lock inversion.
+
+    natsConn_Lock(nc);
+    SET_WRITE_DEADLINE(nc);
+    s = natsConn_sendUnsubProto(nc, oci->osid, 0);
+    if (!oci->done)
+    {
+        IFOK(s, natsConn_sendSubProto(nc, oci->ndlv, NULL, oci->nsid));
+        if ((s == NATS_OK) && (oci->max > 0))
+            s = natsConn_sendUnsubProto(nc, oci->nsid, oci->max);
+    }
+    IFOK(s, natsConn_flushOrKickFlusher(nc));
+    natsConn_Unlock(nc);
+
+    if (!oci->done && (s == NATS_OK))
+    {
+        natsSub_Lock(sub);
+        t = oci->thread;
+        jsi = sub->jsi;
+        s = js_cloneConsumerConfig(jsi->ocCfg, &cc);
+        natsSub_Unlock(sub);
+
+        if (s == NATS_OK)
+        {
+            // Create consumer request for starting policy.
+            cc->DeliverSubject = oci->ndlv;
+            cc->DeliverPolicy  = js_DeliverByStartSequence;
+            cc->OptStartSeq    = oci->sseq;
+
+            s = js_AddConsumer(&ci, jsi->js, jsi->stream, cc, NULL, NULL);
+            if (s == NATS_OK)
+            {
+                natsSub_Lock(sub);
+                // Set the consumer name only if the consumer's info delivery subject
+                // matches the subscription's current subject.
+                if (strcmp(ci->Config->DeliverSubject, sub->subject) == 0)
+                {
+                    NATS_FREE(jsi->consumer);
+                    jsi->consumer = NULL;
+                    DUP_STRING(s, jsi->consumer, ci->Name);
+                }
+                natsSub_Unlock(sub);
+
+                jsConsumerInfo_Destroy(ci);
+            }
+
+            // Clear cc->DeliverSubject now before destroying it (since
+            // cc->DeliverSubject points to oci->ndlv (not a copy)
+            cc->DeliverSubject = NULL;
+            js_destroyConsumerConfig(cc);
+        }
+    }
+    if (s != NATS_OK)
+    {
+        natsConn_Lock(nc);
+        if (nc->opts->asyncErrCb != NULL)
+        {
+            char tmp[256];
+            const char *lastErr = nats_GetLastError(NULL);
+
+            snprintf(tmp, sizeof(tmp),
+                        "error recreating ordered consumer, will try again: status=%u error=%s",
+                        s, (nats_IsStringEmpty(lastErr) ? natsStatus_GetText(s) : lastErr));
+            natsAsyncCb_PostErrHandler(nc, sub, s, NATS_STRDUP(tmp));
+        }
+        natsConn_Unlock(nc);
+    }
+
+    NATS_FREE(oci->ndlv);
+    NATS_FREE(oci);
+    natsThread_Detach(t);
+    natsThread_Destroy(t);
+    natsSub_release(sub);
+}
+
+// We are here if we have detected a gap with an ordered consumer.
+// We will create a new consumer and rewire the low level subscription.
+// Lock should be held.
+natsStatus
+jsSub_resetOrderedConsumer(natsSubscription *sub, uint64_t sseq)
+{
+    natsStatus          s           = NATS_OK;
+    natsConnection      *nc         = sub->conn;
+    int64_t             osid        = 0;
+    natsInbox           *newDeliver = NULL;
+    jsOrderedConsInfo   *oci        = NULL;
+    int                 max         = 0;
+    bool                done        = false;
+    jsSub               *jsi        = sub->jsi;
+
+    if ((jsi == NULL) || (nc == NULL) || sub->closed)
+        return NATS_OK;
+
+    // Note: if anything fail here, the reset/recreate of the ordered consumer
+    // will happen again based on the missed HB timer.
+
+    // If there was an AUTO_UNSUB, we need to adjust the new value and send
+    // an UNSUB for the new sid with new value.
+    if (sub->max > 0)
+    {
+        // If we are at or anove sub->max, then we are done with this sub
+        // and will send an UNSUB in the _recreateOrderedCons thread function.
+        if (sub->jsi->fciseq < sub->max)
+            max = (int)(sub->max - jsi->fciseq);
+        else
+            done = true;
+    }
+
+    // Grab new inbox.
+    s = natsConn_newInbox(nc, &newDeliver);
+    if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    // Quick unsubscribe. Since we know this is a simple push subscriber we do in place.
+    osid = applyNewSID(sub);
+
+    NATS_FREE(sub->subject);
+    sub->subject = (char*) newDeliver;
+
+    // We are still in the low level readloop for the connection so we need
+    // to spin a thread to try to create the new consumer.
+    // Create object that will hold some state to pass to the thread.
+    oci = NATS_CALLOC(1, sizeof(jsOrderedConsInfo));
+    if (oci == NULL)
+        s = nats_setDefaultError(NATS_NO_MEMORY);
+    else
+        DUP_STRING(s, oci->ndlv, (char*) newDeliver);
+
+    if (s == NATS_OK)
+    {
+        // Reset some items in jsi.
+        jsi->dseq = 1;
+        NATS_FREE(jsi->fcReply);
+        jsi->fcReply = NULL;
+        jsi->fcDelivered = 0;
+        NATS_FREE(jsi->cmeta);
+        jsi->cmeta = NULL;
+
+        oci->osid = osid;
+        oci->nsid = sub->sid;
+        oci->sseq = sseq;
+        oci->nc   = nc;
+        oci->sub  = sub;
+        oci->max  = max;
+        oci->done = done;
+        natsSub_retain(sub);
+
+        s = natsThread_Create(&oci->thread, _recreateOrderedCons, (void*) oci);
+        if (s != NATS_OK)
+        {
+            NATS_FREE(oci);
+            natsSub_release(sub);
+        }
+    }
+    if ((s != NATS_OK) && (oci != NULL))
+    {
+        NATS_FREE(oci->ndlv);
+        NATS_FREE(oci);
+    }
+    return s;
+}
+
+// Check to make sure messages are arriving in order.
+// Returns true if the sub had to be replaced. Will cause upper layers to return.
+// The caller has verified that sub.jsi != nil and that this is not a control message.
+// Lock should be held.
+natsStatus
+jsSub_checkOrderedMsg(natsSubscription *sub, natsMsg *msg, bool *reset)
+{
+    natsStatus  s    = NATS_OK;
+    jsSub       *jsi = NULL;
+    uint64_t    sseq = 0;
+    uint64_t    dseq = 0;
+
+    *reset = false;
+
+    // Ignore msgs with no reply like HBs and flowcontrol, they are handled elsewhere.
+    if (natsMsg_GetReply(msg) == NULL)
+        return NATS_OK;
+
+    // Normal message here.
+    s = js_getMetaData(natsMsg_GetReply(msg), NULL, NULL, NULL, NULL, &sseq, &dseq, NULL, NULL, 2);
+    if (s == NATS_OK)
+    {
+        jsi = sub->jsi;
+        if (dseq != jsi->dseq)
+        {
+            *reset = true;
+            s = jsSub_resetOrderedConsumer(sub, jsi->sseq+1);
+        }
+        else
+        {
+            // Update our tracking here.
+            jsi->dseq = dseq+1;
+            jsi->sseq = sseq;
+        }
+    }
+    return NATS_UPDATE_ERR_STACK(s);
+}
diff --git a/src/js.h b/src/js.h
new file mode 100644 (file)
index 0000000..8f0f260
--- /dev/null
+++ b/src/js.h
@@ -0,0 +1,267 @@
+// Copyright 2021 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "natsp.h"
+#include "util.h"
+
+#ifdef DEV_MODE
+// For type safety
+
+void js_lock(jsCtx *js);
+void js_unlock(jsCtx *js);
+
+#else
+// We know what we are doing :-)
+
+#define js_lock(js)     (natsMutex_Lock((js)->mu))
+#define js_unlock(c)    (natsMutex_Unlock((js)->mu))
+
+#endif // DEV_MODE
+
+
+extern const char*      jsDefaultAPIPrefix;
+extern const int64_t    jsDefaultRequestWait;
+
+#define jsMsgIdHdr                  "Nats-Msg-Id"
+#define jsExpectedStreamHdr         "Nats-Expected-Stream"
+#define jsExpectedLastSeqHdr        "Nats-Expected-Last-Sequence"
+#define jsExpectedLastSubjSeqHdr    "Nats-Expected-Last-Subject-Sequence"
+#define jsExpectedLastMsgIdHdr      "Nats-Expected-Last-Msg-Id"
+#define jsConsumerStalledHdr        "Nats-Consumer-Stalled"
+
+#define jsErrStreamNameRequired             "stream name is required"
+#define jsErrConsumerNameRequired           "consumer name is required"
+#define jsErrNoStreamMatchesSubject         "no stream matches subject"
+#define jsErrPullSubscribeToPushConsumer    "cannot pull subscribe to push based consumer"
+#define jsErrPullSubscribeRequired          "must use pull subscribe to bind to pull based consumer"
+#define jsErrMsgNotBound                    "message not bound to a subscription"
+#define jsErrMsgNotJS                       "not a JetStream message"
+#define jsErrDurRequired                    "durable name is required"
+#define jsErrNotAPullSubscription           "not a JetStream pull subscription"
+#define jsErrNotAJetStreamSubscription      "not a JetStream subscription"
+#define jsErrNotApplicableToPullSub         "not applicable to JetStream pull subscriptions"
+#define jsErrNoHeartbeatForQueueSub         "a queue subscription cannot be created for a consumer with heartbeat"
+#define jsErrNoFlowControlForQueueSub       "a queue subscription cannot be created for a consumer with flow control"
+#define jsErrConsumerSeqMismatch            "consumer sequence mismatch"
+#define jsErrOrderedConsNoDurable           "durable can not be set for an ordered consumer"
+#define jsErrOrderedConsNoAckPolicy         "ack policy can not be set for an ordered consume"
+#define jsErrOrderedConsNoMaxDeliver        "max deliver can not be set for an ordered consumer"
+#define jsErrOrderedConsNoDeliverSubject    "deliver subject can not be set for an ordered consumer"
+#define jsErrOrderedConsNoQueue             "queue can not be set for an ordered consumer"
+#define jsErrOrderedConsNoBind              "can not bind existing consumer for an ordered consumer"
+#define jsErrOrderedConsNoPullMode          "can not use pull mode for an ordered consumer"
+#define jsErrStreamConfigRequired           "stream configuration required"
+#define jsErrInvalidStreamName              "invalid stream name"
+#define jsErrConsumerConfigRequired         "consumer configuration required"
+#define jsErrInvalidDurableName             "invalid durable name"
+#define jsErrInvalidConsumerName            "invalid consumer name"
+#define jsErrConcurrentFetchNotAllowed      "concurrent fetch request not allowed"
+
+#define jsCtrlHeartbeat     (1)
+#define jsCtrlFlowControl   (2)
+
+#define jsRetPolicyLimitsStr    "limits"
+#define jsRetPolicyInterestStr  "interest"
+#define jsRetPolicyWorkQueueStr "workqueue"
+
+#define jsDiscardPolicyOldStr   "old"
+#define jsDiscardPolicyNewStr   "new"
+
+#define jsStorageTypeFileStr    "file"
+#define jsStorageTypeMemStr     "memory"
+
+#define jsDeliverAllStr             "all"
+#define jsDeliverLastStr            "last"
+#define jsDeliverNewStr             "new"
+#define jsDeliverBySeqStr           "by_start_sequence"
+#define jsDeliverByTimeStr          "by_start_time"
+#define jsDeliverLastPerSubjectStr  "last_per_subject"
+
+#define jsAckNoneStr    "none"
+#define jsAckAllStr     "all"
+#define jsAckExplictStr "explicit"
+
+#define jsReplayOriginalStr "original"
+#define jsReplayInstantStr  "instant"
+
+#define jsAckPrefix         "$JS.ACK."
+#define jsAckPrefixLen      (8)
+
+// Content of ACK messages sent to server
+#define jsAckAck            "+ACK"
+#define jsAckNak            "-NAK"
+#define jsAckInProgress     "+WPI"
+#define jsAckTerm           "+TERM"
+
+// jsApiAccountInfo is for obtaining general information about JetStream.
+#define jsApiAccountInfo "%.*s.INFO"
+
+// jsApiStreamCreateT is the endpoint to create new streams.
+#define jsApiStreamCreateT "%.*s.STREAM.CREATE.%s"
+
+// jsApiStreamUpdateT is the endpoint to update existing streams.
+#define jsApiStreamUpdateT "%.*s.STREAM.UPDATE.%s"
+
+// jsApiStreamPurgeT is the endpoint to purge streams.
+#define jsApiStreamPurgeT "%.*s.STREAM.PURGE.%s"
+
+// jsApiStreamDeleteT is the endpoint to delete streams.
+#define jsApiStreamDeleteT "%.*s.STREAM.DELETE.%s"
+
+// jsApiStreamInfoT is the endpoint to get information on a stream.
+#define jsApiStreamInfoT "%.*s.STREAM.INFO.%s"
+
+// jsApiConsumerCreateT is used to create consumers.
+#define jsApiConsumerCreateT "%.*s.CONSUMER.CREATE.%s"
+
+// jsApiDurableCreateT is used to create durable consumers.
+#define jsApiDurableCreateT "%.*s.CONSUMER.DURABLE.CREATE.%s.%s"
+
+// jsApiConsumerCreateExT is used to create a named consumer.
+#define jsApiConsumerCreateExT "%.*s.CONSUMER.CREATE.%s.%s"
+
+// jsApiConsumerCreateExWithFilterT is used to create a named consumer with a filter subject.
+#define jsApiConsumerCreateExWithFilterT "%.*s.CONSUMER.CREATE.%s.%s.%s"
+
+// jsApiConsumerInfoT is used to get information about consumers.
+#define jsApiConsumerInfoT "%.*s.CONSUMER.INFO.%s.%s"
+
+// jsApiDeleteConsumerT is used to delete consumers.
+#define jsApiConsumerDeleteT "%.*s.CONSUMER.DELETE.%s.%s"
+
+// jsApiStreams can lookup a stream by subject.
+#define jsApiStreams "%.*s.STREAM.NAMES"
+
+// jsApiRequestNextT is the prefix for the request next message(s) for a consumer in worker/pull mode.
+#define jsApiRequestNextT "%s.CONSUMER.MSG.NEXT.%s.%s"
+
+// jsApiMsgDeleteT is the endpoint to remove a message.
+#define jsApiMsgDeleteT "%.*s.STREAM.MSG.DELETE.%s"
+
+// jsApiMsgGetT is the endpoint to get a message, either by sequence or last per subject.
+#define jsApiMsgGetT "%.*s.STREAM.MSG.GET.%s"
+
+// jsApiMsgGetT is the endpoint to get a message, either by sequence or last per subject.
+#define jsApiDirectMsgGetT "%.*s.DIRECT.GET.%s"
+
+// jsApiDirectMsgGetLastBySubjectT is the endpoint to perform a direct get of a message by subject.
+#define jsApiDirectMsgGetLastBySubjectT "%.*s.DIRECT.GET.%s.%s"
+
+// jsApiStreamListT is the endpoint to get the list of stream infos.
+#define jsApiStreamListT "%.*s.STREAM.LIST"
+
+// jsApiStreamNamesT is the endpoint to get the list of stream names.
+#define jsApiStreamNamesT "%.*s.STREAM.NAMES"
+
+// jsApiConsumerListT is the endpoint to get the list of consumers for a stream.
+#define jsApiConsumerListT "%.*s.CONSUMER.LIST.%s"
+
+// jsApiConsumerNamesT is the endpoint to get the list of consumer names for a stream.
+#define jsApiConsumerNamesT "%.*s.CONSUMER.NAMES.%s"
+
+// Creates a subject based on the option's prefix, the subject format and its values.
+#define js_apiSubj(s, o, f, ...) (nats_asprintf((s), (f), (o)->Prefix, __VA_ARGS__) < 0 ? NATS_NO_MEMORY : NATS_OK)
+
+// Execute the JS API request if status is OK on entry. If the result is NATS_NO_RESPONDERS,
+// and `errCode` is not NULL, set it to JSNotEnabledErr.
+#define IFOK_JSR(s, c)  if (s == NATS_OK) { s = (c); if ((s == NATS_NO_RESPONDERS) && (errCode != NULL)) { *errCode = JSNotEnabledErr; } }
+
+// Returns true if the API response has a Code or ErrCode that is not 0.
+#define js_apiResponseIsErr(ar)        (((ar)->Error.Code != 0) || ((ar)->Error.ErrCode != 0))
+
+// jsApiError is included in all API responses if there was an error.
+typedef struct __jsApiError
+{
+    int         Code;
+    uint16_t    ErrCode;
+    char        *Description;
+
+} jsApiError;
+
+// apiResponse is a standard response from the JetStream JSON API
+typedef struct __jsApiResponse
+{
+    char        *Type;
+    jsApiError         Error;
+
+} jsApiResponse;
+
+// Sets the options in `resOpts` based on the given `opts` and defaults to the context
+// own options when some options are not specified.
+// Returns also the NATS connection to be used to send the request.
+// This function will get/release the context's lock.
+natsStatus
+js_setOpts(natsConnection **nc, bool *freePfx, jsCtx *js, jsOptions *opts, jsOptions *resOpts);
+
+int
+js_lenWithoutTrailingDot(const char *str);
+
+natsStatus
+js_unmarshalResponse(jsApiResponse *ar, nats_JSON **new_json, natsMsg *resp);
+
+void
+js_freeApiRespContent(jsApiResponse *ar);
+
+natsStatus
+js_unmarshalAccountInfo(nats_JSON *json, jsAccountInfo **new_ai);
+
+natsStatus
+js_marshalStreamConfig(natsBuffer **new_buf, jsStreamConfig *cfg);
+
+natsStatus
+js_unmarshalStreamConfig(nats_JSON *json, const char *fieldName, jsStreamConfig **new_cfg);
+
+void
+js_destroyStreamConfig(jsStreamConfig *cfg);
+
+natsStatus
+js_unmarshalStreamState(nats_JSON *pjson, const char *fieldName, jsStreamState *state);
+
+natsStatus
+js_unmarshalStreamInfo(nats_JSON *json, jsStreamInfo **new_si);
+
+natsStatus
+js_unmarshalConsumerInfo(nats_JSON *json, jsConsumerInfo **new_ci);
+
+void
+js_cleanStreamState(jsStreamState *state);
+
+natsStatus
+js_checkConsName(const char *cons, bool isDurable);
+
+natsStatus
+js_getMetaData(const char *reply,
+    char **domain,
+    char **stream,
+    char **consumer,
+    uint64_t *numDelivered,
+    uint64_t *sseq,
+    uint64_t *dseq,
+    int64_t *tm,
+    uint64_t *numPending,
+    int asked);
+
+void
+js_retain(jsCtx *js);
+
+void
+js_release(jsCtx *js);
+
+natsStatus
+js_directGetMsgToJSMsg(const char *stream, natsMsg *msg);
+
+natsStatus
+js_cloneConsumerConfig(jsConsumerConfig *org, jsConsumerConfig **clone);
+
+void
+js_destroyConsumerConfig(jsConsumerConfig *cc);
diff --git a/src/jsm.c b/src/jsm.c
new file mode 100644 (file)
index 0000000..1fd25db
--- /dev/null
+++ b/src/jsm.c
@@ -0,0 +1,3503 @@
+// Copyright 2021-2022 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "natsp.h"
+#include "mem.h"
+#include "util.h"
+#include "js.h"
+
+typedef enum
+{
+    jsStreamActionCreate = 1,
+    jsStreamActionUpdate,
+    jsStreamActionGet,
+
+} jsStreamAction;
+
+typedef struct apiPaged
+{
+    int64_t total;
+    int64_t offset;
+    int64_t limit;
+
+} apiPaged;
+
+static natsStatus
+_marshalTimeUTC(natsBuffer *buf, const char *fieldName, int64_t timeUTC)
+{
+    natsStatus  s  = NATS_OK;
+    char        dbuf[36] = {'\0'};
+
+    s = nats_EncodeTimeUTC(dbuf, sizeof(dbuf), timeUTC);
+    if (s != NATS_OK)
+        return nats_setError(NATS_ERR, "unable to encode data for field '%s' value %" PRId64, fieldName, timeUTC);
+
+    s = natsBuf_Append(buf, ",\"", -1);
+    IFOK(s, natsBuf_Append(buf, fieldName, -1));
+    IFOK(s, natsBuf_Append(buf, "\":\"", -1));
+    IFOK(s, natsBuf_Append(buf, dbuf, -1));
+    IFOK(s, natsBuf_AppendByte(buf, '"'));
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+//
+// Stream related functions
+//
+
+static natsStatus
+_checkStreamName(const char *stream)
+{
+    if (nats_IsStringEmpty(stream))
+        return nats_setError(NATS_INVALID_ARG, "%s", jsErrStreamNameRequired);
+
+    if (strchr(stream, '.') != NULL)
+        return nats_setError(NATS_INVALID_ARG, "%s '%s' (cannot contain '.')", jsErrInvalidStreamName, stream);
+
+    return NATS_OK;
+}
+
+static void
+_destroyPlacement(jsPlacement *placement)
+{
+    int i;
+
+    if (placement == NULL)
+        return;
+
+    NATS_FREE((char*)placement->Cluster);
+    for (i=0; i<placement->TagsLen; i++)
+        NATS_FREE((char*) placement->Tags[i]);
+    NATS_FREE((char**) placement->Tags);
+    NATS_FREE(placement);
+}
+
+static void
+_destroyExternalStream(jsExternalStream *external)
+{
+    if (external == NULL)
+        return;
+
+    NATS_FREE((char*) external->APIPrefix);
+    NATS_FREE((char*) external->DeliverPrefix);
+    NATS_FREE(external);
+}
+
+static void
+_destroyStreamSource(jsStreamSource *source)
+{
+    if (source == NULL)
+        return;
+
+    NATS_FREE((char*) source->Name);
+    NATS_FREE((char*) source->FilterSubject);
+    _destroyExternalStream(source->External);
+    NATS_FREE(source);
+}
+
+static void
+_destroyRePublish(jsRePublish *rp)
+{
+    if (rp == NULL)
+        return;
+
+    NATS_FREE((char*) rp->Source);
+    NATS_FREE((char*) rp->Destination);
+    NATS_FREE(rp);
+}
+
+void
+js_destroyStreamConfig(jsStreamConfig *cfg)
+{
+    int i;
+
+    if (cfg == NULL)
+        return;
+
+    NATS_FREE((char*) cfg->Name);
+    NATS_FREE((char*) cfg->Description);
+    for (i=0; i<cfg->SubjectsLen; i++)
+        NATS_FREE((char*) cfg->Subjects[i]);
+    NATS_FREE((char**) cfg->Subjects);
+    NATS_FREE((char*) cfg->Template);
+    _destroyPlacement(cfg->Placement);
+    _destroyStreamSource(cfg->Mirror);
+    for (i=0; i<cfg->SourcesLen; i++)
+        _destroyStreamSource(cfg->Sources[i]);
+    NATS_FREE(cfg->Sources);
+    _destroyRePublish(cfg->RePublish);
+    NATS_FREE(cfg);
+}
+
+static void
+_destroyPeerInfo(jsPeerInfo *peer)
+{
+    if (peer == NULL)
+        return;
+
+    NATS_FREE(peer->Name);
+    NATS_FREE(peer);
+}
+
+static void
+_destroyClusterInfo(jsClusterInfo *cluster)
+{
+    int i;
+
+    if (cluster == NULL)
+        return;
+
+    NATS_FREE(cluster->Name);
+    NATS_FREE(cluster->Leader);
+    for (i=0; i<cluster->ReplicasLen; i++)
+        _destroyPeerInfo(cluster->Replicas[i]);
+    NATS_FREE(cluster->Replicas);
+    NATS_FREE(cluster);
+}
+
+static void
+_destroyStreamSourceInfo(jsStreamSourceInfo *info)
+{
+    if (info == NULL)
+        return;
+
+    NATS_FREE(info->Name);
+    _destroyExternalStream(info->External);
+    NATS_FREE(info);
+}
+
+static void
+_destroyLostStreamData(jsLostStreamData *lost)
+{
+    if (lost == NULL)
+        return;
+
+    NATS_FREE(lost->Msgs);
+    NATS_FREE(lost);
+}
+
+static void
+_destroyStreamStateSubjects(jsStreamStateSubjects *subjects)
+{
+    int i;
+
+    if (subjects == NULL)
+        return;
+
+    for (i=0; i<subjects->Count; i++)
+        NATS_FREE((char*) subjects->List[i].Subject);
+    NATS_FREE(subjects->List);
+    NATS_FREE(subjects);
+}
+
+void
+js_cleanStreamState(jsStreamState *state)
+{
+    if (state == NULL)
+        return;
+
+    NATS_FREE(state->Deleted);
+    _destroyLostStreamData(state->Lost);
+    _destroyStreamStateSubjects(state->Subjects);
+}
+
+void
+jsStreamInfo_Destroy(jsStreamInfo *si)
+{
+    int i;
+
+    if (si == NULL)
+        return;
+
+    js_destroyStreamConfig(si->Config);
+    _destroyClusterInfo(si->Cluster);
+    js_cleanStreamState(&(si->State));
+    _destroyStreamSourceInfo(si->Mirror);
+    for (i=0; i<si->SourcesLen; i++)
+        _destroyStreamSourceInfo(si->Sources[i]);
+    NATS_FREE(si->Sources);
+    NATS_FREE(si);
+}
+
+static natsStatus
+_unmarshalExternalStream(nats_JSON *json, const char *fieldName, jsExternalStream **new_external)
+{
+    jsExternalStream        *external = NULL;
+    nats_JSON               *obj      = NULL;
+    natsStatus              s;
+
+    s = nats_JSONGetObject(json, fieldName, &obj);
+    if (obj == NULL)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    external = (jsExternalStream*) NATS_CALLOC(1, sizeof(jsExternalStream));
+    if (external == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    s = nats_JSONGetStr(obj, "api", (char**) &(external->APIPrefix));
+    IFOK(s, nats_JSONGetStr(obj, "deliver", (char**) &(external->DeliverPrefix)));
+
+    if (s == NATS_OK)
+        *new_external = external;
+    else
+        _destroyExternalStream(external);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_marshalExternalStream(jsExternalStream *external, const char *fieldName, natsBuffer *buf)
+{
+    natsStatus s = NATS_OK;
+
+    IFOK(s, natsBuf_Append(buf, ",\"", -1));
+    IFOK(s, natsBuf_Append(buf, fieldName, -1));
+    IFOK(s, natsBuf_Append(buf, "\":{\"api\":\"", -1));
+    IFOK(s, natsBuf_Append(buf, external->APIPrefix, -1));
+    IFOK(s, natsBuf_Append(buf, "\",\"deliver\":\"", -1));
+    IFOK(s, natsBuf_Append(buf, external->DeliverPrefix, -1));
+    IFOK(s, natsBuf_Append(buf, "\"}", -1));
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_unmarshalStreamSource(nats_JSON *json, const char *fieldName, jsStreamSource **new_source)
+{
+    jsStreamSource      *source = NULL;
+    nats_JSON           *obj    = NULL;
+    natsStatus          s;
+
+    if (fieldName != NULL)
+    {
+        s = nats_JSONGetObject(json, fieldName, &obj);
+        if (obj == NULL)
+            return NATS_UPDATE_ERR_STACK(s);
+    }
+    else
+    {
+        obj = json;
+    }
+
+    source = (jsStreamSource*) NATS_CALLOC(1, sizeof(jsStreamSource));
+    if (source == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    s = nats_JSONGetStr(obj, "name", (char**) &(source->Name));
+    IFOK(s, nats_JSONGetULong(obj, "opt_start_seq", &(source->OptStartSeq)));
+    IFOK(s, nats_JSONGetTime(obj, "opt_start_time", &(source->OptStartTime)));
+    IFOK(s, nats_JSONGetStr(obj, "filter_subject", (char**) &(source->FilterSubject)));
+    IFOK(s, _unmarshalExternalStream(obj, "external", &(source->External)));
+
+    if (s == NATS_OK)
+        *new_source = source;
+    else
+        _destroyStreamSource(source);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_marshalStreamSource(jsStreamSource *source, const char *fieldName, natsBuffer *buf)
+{
+    natsStatus  s = NATS_OK;
+
+    if (fieldName != NULL)
+    {
+        IFOK(s, natsBuf_Append(buf, ",\"", -1));
+        IFOK(s, natsBuf_Append(buf, fieldName, -1));
+        IFOK(s, natsBuf_Append(buf, "\":", -1));
+    }
+    IFOK(s, natsBuf_Append(buf, "{\"name\":\"", -1));
+    IFOK(s, natsBuf_Append(buf, source->Name, -1));
+    IFOK(s, natsBuf_AppendByte(buf, '"'));
+    if ((s == NATS_OK) && (source->OptStartSeq > 0))
+        s = nats_marshalLong(buf, true, "opt_start_seq", source->OptStartSeq);
+    if ((s == NATS_OK) && (source->OptStartTime > 0))
+        IFOK(s, _marshalTimeUTC(buf, "opt_start_time", source->OptStartTime));
+    if (source->FilterSubject != NULL)
+    {
+        IFOK(s, natsBuf_Append(buf, ",\"filter_subject\":\"", -1));
+        IFOK(s, natsBuf_Append(buf, source->FilterSubject, -1));
+        IFOK(s, natsBuf_AppendByte(buf, '"'));
+    }
+    if (source->External != NULL)
+        IFOK(s, _marshalExternalStream(source->External, "external", buf));
+
+    IFOK(s, natsBuf_AppendByte(buf, '}'));
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_unmarshalPlacement(nats_JSON *json, const char *fieldName, jsPlacement **new_placement)
+{
+    jsPlacement         *placement = NULL;
+    nats_JSON           *jpl       = NULL;
+    natsStatus          s;
+
+    s = nats_JSONGetObject(json, fieldName, &jpl);
+    if (jpl == NULL)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    placement = (jsPlacement*) NATS_CALLOC(1, sizeof(jsPlacement));
+    if (placement == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    s = nats_JSONGetStr(jpl, "cluster", (char**) &(placement->Cluster));
+    IFOK(s, nats_JSONGetArrayStr(jpl, "tags", (char***) &(placement->Tags), &(placement->TagsLen)));
+
+    if (s == NATS_OK)
+        *new_placement = placement;
+    else
+        _destroyPlacement(placement);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_marshalPlacement(jsPlacement *placement, natsBuffer *buf)
+{
+    natsStatus  s;
+
+    s = natsBuf_Append(buf, ",\"placement\":{\"cluster\":\"", -1);
+    IFOK(s, natsBuf_Append(buf, placement->Cluster, -1));
+    IFOK(s, natsBuf_AppendByte(buf, '"'));
+    if (placement->TagsLen > 0)
+    {
+        int i;
+
+        IFOK(s, natsBuf_Append(buf, ",\"tags\":[\"", -1));
+        for (i=0; (s == NATS_OK) && (i<placement->TagsLen); i++)
+        {
+            IFOK(s, natsBuf_Append(buf, placement->Tags[i], -1));
+            IFOK(s, natsBuf_AppendByte(buf, '"'));
+            if (i < placement->TagsLen-1)
+                IFOK(s, natsBuf_Append(buf, ",\"", -1));
+        }
+        IFOK(s, natsBuf_AppendByte(buf, ']'));
+    }
+    IFOK(s, natsBuf_AppendByte(buf, '}'));
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_unmarshalRetentionPolicy(nats_JSON *json, const char *fieldName, jsRetentionPolicy *policy)
+{
+    natsStatus  s    = NATS_OK;
+    char        *str = NULL;
+
+    s = nats_JSONGetStr(json, fieldName, &str);
+    if (str == NULL)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    if (strcmp(str, jsRetPolicyLimitsStr) == 0)
+        *policy = js_LimitsPolicy;
+    else if (strcmp(str, jsRetPolicyInterestStr) == 0)
+        *policy = js_InterestPolicy;
+    else if (strcmp(str, jsRetPolicyWorkQueueStr) == 0)
+        *policy = js_WorkQueuePolicy;
+    else
+        s = nats_setError(NATS_ERR, "unable to unmarshal retention policy '%s'", str);
+
+    NATS_FREE(str);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_marshalRetentionPolicy(jsRetentionPolicy policy, natsBuffer *buf)
+{
+    natsStatus  s;
+    const char  *rp = NULL;
+
+    s = natsBuf_Append(buf, ",\"retention\":\"", -1);
+    switch (policy)
+    {
+        case js_LimitsPolicy:       rp = jsRetPolicyLimitsStr;     break;
+        case js_InterestPolicy:     rp = jsRetPolicyInterestStr;   break;
+        case js_WorkQueuePolicy:    rp = jsRetPolicyWorkQueueStr;  break;
+        default:
+            return nats_setError(NATS_INVALID_ARG, "invalid retention policy %d", (int) policy);
+    }
+    IFOK(s, natsBuf_Append(buf, rp, -1));
+    IFOK(s, natsBuf_AppendByte(buf, '"'));
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_unmarshalDiscardPolicy(nats_JSON *json, const char *fieldName, jsDiscardPolicy *policy)
+{
+    natsStatus  s    = NATS_OK;
+    char        *str = NULL;
+
+    s = nats_JSONGetStr(json, fieldName, &str);
+    if (str == NULL)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    if (strcmp(str, jsDiscardPolicyOldStr) == 0)
+        *policy = js_DiscardOld;
+    else if (strcmp(str, jsDiscardPolicyNewStr) == 0)
+        *policy = js_DiscardNew;
+    else
+        s = nats_setError(NATS_ERR, "unable to unmarshal discard policy '%s'", str);
+
+    NATS_FREE(str);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_marshalDiscardPolicy(jsDiscardPolicy policy, natsBuffer *buf)
+{
+    natsStatus  s;
+    const char  *dp = NULL;
+
+    s = natsBuf_Append(buf, ",\"discard\":\"", -1);
+    switch (policy)
+    {
+        case js_DiscardOld: dp = jsDiscardPolicyOldStr;   break;
+        case js_DiscardNew: dp = jsDiscardPolicyNewStr;   break;
+        default:
+            return nats_setError(NATS_INVALID_ARG, "invalid discard policy %d", (int) policy);
+    }
+    IFOK(s, natsBuf_Append(buf, dp, -1));
+    IFOK(s, natsBuf_AppendByte(buf, '"'));
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_unmarshalStorageType(nats_JSON *json, const char *fieldName, jsStorageType *storage)
+{
+    natsStatus  s    = NATS_OK;
+    char        *str = NULL;
+
+    s = nats_JSONGetStr(json, "storage", &str);
+    if (str == NULL)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    if (strcmp(str, jsStorageTypeFileStr) == 0)
+        *storage = js_FileStorage;
+    else if (strcmp(str, jsStorageTypeMemStr) == 0)
+        *storage = js_MemoryStorage;
+    else
+        s = nats_setError(NATS_ERR, "unable to unmarshal storage type '%s'", str);
+
+    NATS_FREE(str);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_marshalStorageType(jsStorageType storage, natsBuffer *buf)
+{
+    natsStatus  s;
+    const char  *st = NULL;
+
+    s = natsBuf_Append(buf, ",\"storage\":\"", -1);
+    switch (storage)
+    {
+        case js_FileStorage:    st = jsStorageTypeFileStr; break;
+        case js_MemoryStorage:  st = jsStorageTypeMemStr;  break;
+        default:
+            return nats_setError(NATS_INVALID_ARG, "invalid storage type %d", (int) storage);
+    }
+    IFOK(s, natsBuf_Append(buf, st, -1));
+    IFOK(s, natsBuf_AppendByte(buf, '"'));
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_unmarshalRePublish(nats_JSON *json, const char *fieldName, jsRePublish **new_republish)
+{
+    jsRePublish         *rp     = NULL;
+    nats_JSON           *jsm    = NULL;
+    natsStatus          s;
+
+    s = nats_JSONGetObject(json, fieldName, &jsm);
+    if (jsm == NULL)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    rp = (jsRePublish*) NATS_CALLOC(1, sizeof(jsRePublish));
+    if (rp == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    s = nats_JSONGetStr(jsm, "src", (char**) &(rp->Source));
+    IFOK(s, nats_JSONGetStr(jsm, "dest", (char**) &(rp->Destination)));
+    IFOK(s, nats_JSONGetBool(jsm, "headers_only", &(rp->HeadersOnly)));
+
+    if (s == NATS_OK)
+        *new_republish = rp;
+    else
+        _destroyRePublish(rp);
+
+    return NATS_UPDATE_ERR_STACK(s);
+
+}
+
+natsStatus
+js_unmarshalStreamConfig(nats_JSON *json, const char *fieldName, jsStreamConfig **new_cfg)
+{
+    nats_JSON           *jcfg       = NULL;
+    jsStreamConfig      *cfg        = NULL;
+    nats_JSON           **sources   = NULL;
+    int                 sourcesLen  = 0;
+    natsStatus          s;
+
+    if (fieldName != NULL)
+    {
+        s = nats_JSONGetObject(json, fieldName, &jcfg);
+        if (jcfg == NULL)
+            return NATS_UPDATE_ERR_STACK(s);
+    }
+    else
+    {
+        jcfg = json;
+    }
+
+    cfg = (jsStreamConfig*) NATS_CALLOC(1, sizeof(jsStreamConfig));
+    if (cfg == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    s = nats_JSONGetStr(jcfg, "name", (char**) &(cfg->Name));
+    IFOK(s, nats_JSONGetStr(jcfg, "description", (char**) &(cfg->Description)));
+    IFOK(s, nats_JSONGetArrayStr(jcfg, "subjects", (char***) &(cfg->Subjects), &(cfg->SubjectsLen)));
+    IFOK(s, _unmarshalRetentionPolicy(jcfg, "retention", &(cfg->Retention)));
+    IFOK(s, nats_JSONGetLong(jcfg, "max_consumers", &(cfg->MaxConsumers)));
+    IFOK(s, nats_JSONGetLong(jcfg, "max_msgs", &(cfg->MaxMsgs)));
+    IFOK(s, nats_JSONGetLong(jcfg, "max_bytes", &(cfg->MaxBytes)));
+    IFOK(s, nats_JSONGetLong(jcfg, "max_age", &(cfg->MaxAge)));
+    IFOK(s, nats_JSONGetLong(jcfg, "max_msgs_per_subject", &(cfg->MaxMsgsPerSubject)));
+    IFOK(s, nats_JSONGetInt32(jcfg, "max_msg_size", &(cfg->MaxMsgSize)));
+    IFOK(s, _unmarshalDiscardPolicy(jcfg, "discard", &(cfg->Discard)));
+    IFOK(s, _unmarshalStorageType(jcfg, "storage", &(cfg->Storage)));
+    IFOK(s, nats_JSONGetLong(jcfg, "num_replicas", &(cfg->Replicas)));
+    IFOK(s, nats_JSONGetBool(jcfg, "no_ack", &(cfg->NoAck)));
+    IFOK(s, nats_JSONGetStr(jcfg, "template_owner", (char**) &(cfg->Template)));
+    IFOK(s, nats_JSONGetLong(jcfg, "duplicate_window", &(cfg->Duplicates)));
+    IFOK(s, _unmarshalPlacement(jcfg, "placement", &(cfg->Placement)));
+    IFOK(s, _unmarshalStreamSource(jcfg, "mirror", &(cfg->Mirror)));
+    // Get the sources and unmarshal if present
+    IFOK(s, nats_JSONGetArrayObject(jcfg, "sources", &sources, &sourcesLen));
+    if ((s == NATS_OK) && (sources != NULL))
+    {
+        int i;
+
+        cfg->Sources = (jsStreamSource**) NATS_CALLOC(sourcesLen, sizeof(jsStreamSource*));
+        if (cfg->Sources == NULL)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+
+        for (i=0; (s == NATS_OK) && (i<sourcesLen); i++)
+        {
+            s = _unmarshalStreamSource(sources[i], NULL, &(cfg->Sources[i]));
+            if (s == NATS_OK)
+                cfg->SourcesLen++;
+        }
+        // Free the array of JSON objects that was allocated by nats_JSONGetArrayObject.
+        NATS_FREE(sources);
+    }
+    IFOK(s, nats_JSONGetBool(jcfg, "sealed", &(cfg->Sealed)));
+    IFOK(s, nats_JSONGetBool(jcfg, "deny_delete", &(cfg->DenyDelete)));
+    IFOK(s, nats_JSONGetBool(jcfg, "deny_purge", &(cfg->DenyPurge)));
+    IFOK(s, nats_JSONGetBool(jcfg, "allow_rollup_hdrs", &(cfg->AllowRollup)));
+    IFOK(s, _unmarshalRePublish(jcfg, "republish", &(cfg->RePublish)));
+    IFOK(s, nats_JSONGetBool(jcfg, "allow_direct", &(cfg->AllowDirect)));
+    IFOK(s, nats_JSONGetBool(jcfg, "mirror_direct", &(cfg->MirrorDirect)));
+    IFOK(s, nats_JSONGetBool(jcfg, "discard_new_per_subject", &(cfg->DiscardNewPerSubject)));
+
+    if (s == NATS_OK)
+        *new_cfg = cfg;
+    else
+        js_destroyStreamConfig(cfg);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+js_marshalStreamConfig(natsBuffer **new_buf, jsStreamConfig *cfg)
+{
+    natsBuffer *buf = NULL;
+    natsStatus s;
+
+    s = natsBuf_Create(&buf, 256);
+    if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    s = natsBuf_Append(buf, "{\"name\":\"", -1);
+    IFOK(s, natsBuf_Append(buf, cfg->Name, -1));
+    IFOK(s, natsBuf_AppendByte(buf, '"'));
+    if ((s == NATS_OK) && !nats_IsStringEmpty(cfg->Description))
+    {
+        IFOK(s, natsBuf_Append(buf, ",\"description\":\"", -1));
+        IFOK(s, natsBuf_Append(buf, cfg->Description, -1));
+        IFOK(s, natsBuf_AppendByte(buf, '"'));
+    }
+    if ((s == NATS_OK) && (cfg->SubjectsLen > 0))
+    {
+        int i;
+
+        IFOK(s, natsBuf_Append(buf, ",\"subjects\":[\"", -1));
+        for (i=0; (s == NATS_OK) && (i<cfg->SubjectsLen); i++)
+        {
+            IFOK(s, natsBuf_Append(buf, cfg->Subjects[i], -1));
+            IFOK(s, natsBuf_AppendByte(buf, '"'));
+            if (i < cfg->SubjectsLen - 1)
+                IFOK(s, natsBuf_Append(buf, ",\"", -1));
+        }
+        IFOK(s, natsBuf_AppendByte(buf, ']'));
+    }
+    IFOK(s, _marshalRetentionPolicy(cfg->Retention, buf));
+
+    IFOK(s, nats_marshalLong(buf, true, "max_consumers", cfg->MaxConsumers));
+    IFOK(s, nats_marshalLong(buf, true, "max_msgs", cfg->MaxMsgs));
+    IFOK(s, nats_marshalLong(buf, true, "max_bytes", cfg->MaxBytes));
+    IFOK(s, nats_marshalLong(buf, true, "max_age", cfg->MaxAge));
+    IFOK(s, nats_marshalLong(buf, true, "max_msg_size", (int64_t) cfg->MaxMsgSize));
+    IFOK(s, nats_marshalLong(buf, true, "max_msgs_per_subject", cfg->MaxMsgsPerSubject));
+
+    IFOK(s, _marshalDiscardPolicy(cfg->Discard, buf));
+
+    IFOK(s, _marshalStorageType(cfg->Storage, buf));
+
+    IFOK(s, nats_marshalLong(buf, true, "num_replicas", cfg->Replicas));
+
+    if ((s == NATS_OK) && cfg->NoAck)
+        IFOK(s, natsBuf_Append(buf, ",\"no_ack\":true", -1));
+
+    if ((s == NATS_OK) && (cfg->Template != NULL))
+    {
+        IFOK(s, natsBuf_Append(buf, ",\"template_owner\":\"", -1));
+        IFOK(s, natsBuf_Append(buf, cfg->Template, -1));
+        IFOK(s, natsBuf_AppendByte(buf, '"'));
+    }
+
+    if ((s == NATS_OK) && (cfg->Duplicates != 0))
+        IFOK(s, nats_marshalLong(buf, true, "duplicate_window", cfg->Duplicates));
+
+    if ((s == NATS_OK) && (cfg->Placement != NULL))
+        IFOK(s, _marshalPlacement(cfg->Placement, buf));
+
+    if ((s == NATS_OK) && (cfg->Mirror != NULL))
+        IFOK(s, _marshalStreamSource(cfg->Mirror, "mirror", buf));
+
+    if ((s == NATS_OK) && (cfg->SourcesLen > 0))
+    {
+        int i;
+
+        IFOK(s, natsBuf_Append(buf, ",\"sources\":[", -1));
+        for (i=0; (s == NATS_OK) && (i < cfg->SourcesLen); i++)
+        {
+            IFOK(s, _marshalStreamSource(cfg->Sources[i], NULL, buf));
+            if ((s == NATS_OK) && (i < cfg->SourcesLen-1))
+                IFOK(s, natsBuf_AppendByte(buf, ','));
+        }
+        IFOK(s, natsBuf_AppendByte(buf, ']'));
+    }
+
+    if ((s == NATS_OK) && cfg->Sealed)
+        IFOK(s, natsBuf_Append(buf, ",\"sealed\":true", -1));
+    if ((s == NATS_OK) && cfg->DenyDelete)
+        IFOK(s, natsBuf_Append(buf, ",\"deny_delete\":true", -1));
+    if ((s == NATS_OK) && cfg->DenyPurge)
+        IFOK(s, natsBuf_Append(buf, ",\"deny_purge\":true", -1));
+    if ((s == NATS_OK) && cfg->AllowRollup)
+        IFOK(s, natsBuf_Append(buf, ",\"allow_rollup_hdrs\":true", -1));
+    if ((s == NATS_OK) && (cfg->RePublish != NULL) && !nats_IsStringEmpty(cfg->RePublish->Destination))
+    {
+        // "dest" is not omitempty, in that the field will always be present.
+        IFOK(s, natsBuf_Append(buf, ",\"republish\":{\"dest\":\"", -1));
+        IFOK(s, natsBuf_Append(buf, cfg->RePublish->Destination, -1));
+        IFOK(s, natsBuf_AppendByte(buf, '"'));
+        // Now the source...
+        if (!nats_IsStringEmpty(cfg->RePublish->Source))
+        {
+            IFOK(s, natsBuf_Append(buf, ",\"src\":\"", -1))
+            IFOK(s, natsBuf_Append(buf, cfg->RePublish->Source, -1));
+            IFOK(s, natsBuf_AppendByte(buf, '"'));
+        }
+        if (cfg->RePublish->HeadersOnly)
+            IFOK(s, natsBuf_Append(buf, ",\"headers_only\":true", -1));
+        IFOK(s, natsBuf_AppendByte(buf, '}'));
+    }
+    if ((s == NATS_OK) && cfg->AllowDirect)
+        IFOK(s, natsBuf_Append(buf, ",\"allow_direct\":true", -1));
+    if ((s == NATS_OK) && cfg->MirrorDirect)
+        IFOK(s, natsBuf_Append(buf, ",\"mirror_direct\":true", -1));
+    if ((s == NATS_OK) && cfg->DiscardNewPerSubject)
+        IFOK(s, natsBuf_Append(buf, ",\"discard_new_per_subject\":true", -1));
+
+    IFOK(s, natsBuf_AppendByte(buf, '}'));
+
+    if (s == NATS_OK)
+        *new_buf = buf;
+    else
+        natsBuf_Destroy(buf);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_unmarshalLostStreamData(nats_JSON *pjson, const char *fieldName, jsLostStreamData **new_lost)
+{
+    natsStatus              s       = NATS_OK;
+    jsLostStreamData        *lost   = NULL;
+    nats_JSON               *json   = NULL;
+
+    s = nats_JSONGetObject(pjson, fieldName, &json);
+    if (json == NULL)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    lost = (jsLostStreamData*) NATS_CALLOC(1, sizeof(jsLostStreamData));
+    if (lost == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    IFOK(s, nats_JSONGetArrayULong(json, "msgs", &(lost->Msgs), &(lost->MsgsLen)));
+    IFOK(s, nats_JSONGetULong(json, "bytes", &(lost->Bytes)));
+
+    if (s == NATS_OK)
+        *new_lost = lost;
+    else
+        _destroyLostStreamData(lost);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_fillSubjectsList(void *userInfo, const char *subject, nats_JSONField *f)
+{
+    jsStreamStateSubjects   *subjs  = (jsStreamStateSubjects*) userInfo;
+    natsStatus              s       = NATS_OK;
+    int                     i       = subjs->Count;
+
+    DUP_STRING(s, subjs->List[i].Subject, subject);
+    if (s == NATS_OK)
+    {
+        subjs->List[i].Msgs = f->value.vuint;
+        subjs->Count = i+1;
+    }
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_unmarshalStreamStateSubjects(nats_JSON *pjson, const char *fieldName, jsStreamStateSubjects **subjects)
+{
+    nats_JSON               *json = NULL;
+    natsStatus              s     = NATS_OK;
+    jsStreamStateSubjects   *subjs= NULL;
+    int                     n;
+
+    s = nats_JSONGetObject(pjson, fieldName, &json);
+    if (json == NULL)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    if ((n = natsStrHash_Count(json->fields)) > 0)
+    {
+        subjs = NATS_CALLOC(1, sizeof(jsStreamStateSubjects));
+        if (subjs == NULL)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+
+        if (s == NATS_OK)
+        {
+            subjs->List = NATS_CALLOC(n, sizeof(jsStreamStateSubject));
+            if (subjs->List == NULL)
+                s = nats_setDefaultError(NATS_NO_MEMORY);
+        }
+        IFOK(s, nats_JSONRange(json, TYPE_NUM, TYPE_UINT, _fillSubjectsList, (void*) subjs));
+
+        if (s == NATS_OK)
+            *subjects = subjs;
+        else
+            _destroyStreamStateSubjects(subjs);
+    }
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+js_unmarshalStreamState(nats_JSON *pjson, const char *fieldName, jsStreamState *state)
+{
+    nats_JSON   *json = NULL;
+    natsStatus  s;
+
+    s = nats_JSONGetObject(pjson, fieldName, &json);
+    if (json == NULL)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    s = nats_JSONGetULong(json, "messages", &(state->Msgs));
+    IFOK(s, nats_JSONGetULong(json, "bytes", &(state->Bytes)));
+    IFOK(s, nats_JSONGetULong(json, "first_seq", &(state->FirstSeq)));
+    IFOK(s, nats_JSONGetTime(json, "first_ts", &(state->FirstTime)));
+    IFOK(s, nats_JSONGetULong(json, "last_seq", &(state->LastSeq)));
+    IFOK(s, nats_JSONGetTime(json, "last_ts", &(state->LastTime)));
+    IFOK(s, nats_JSONGetULong(json, "num_deleted", &(state->NumDeleted)));
+    IFOK(s, nats_JSONGetArrayULong(json, "deleted", &(state->Deleted), &(state->DeletedLen)));
+    IFOK(s, _unmarshalLostStreamData(json, "lost", &(state->Lost)));
+    IFOK(s, nats_JSONGetLong(json, "consumer_count", &(state->Consumers)));
+    IFOK(s, nats_JSONGetLong(json, "num_subjects", &(state->NumSubjects)));
+    IFOK(s, _unmarshalStreamStateSubjects(json, "subjects", &(state->Subjects)));
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_unmarshalPeerInfo(nats_JSON *json, jsPeerInfo **new_pi)
+{
+    jsPeerInfo      *pi = NULL;
+    natsStatus      s;
+
+    pi = (jsPeerInfo*) NATS_CALLOC(1, sizeof(jsPeerInfo));
+    if (pi == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    s = nats_JSONGetStr(json, "name", &(pi->Name));
+    IFOK(s, nats_JSONGetBool(json, "current", &(pi->Current)));
+    IFOK(s, nats_JSONGetBool(json, "offline", &(pi->Offline)));
+    IFOK(s, nats_JSONGetLong(json, "active", &(pi->Active)));
+    IFOK(s, nats_JSONGetULong(json, "lag", &(pi->Lag)));
+
+    if (s == NATS_OK)
+        *new_pi = pi;
+    else
+        _destroyPeerInfo(pi);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_unmarshalClusterInfo(nats_JSON *pjson, const char *fieldName, jsClusterInfo **new_ci)
+{
+    jsClusterInfo       *ci         = NULL;
+    nats_JSON           *json       = NULL;
+    nats_JSON           **replicas  = NULL;
+    int                 replicasLen = 0;
+    natsStatus          s;
+
+    s = nats_JSONGetObject(pjson, fieldName, &json);
+    if (json == NULL)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    ci = (jsClusterInfo*) NATS_CALLOC(1, sizeof(jsClusterInfo));
+    if (ci == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    s = nats_JSONGetStr(json, "name", &(ci->Name));
+    IFOK(s, nats_JSONGetStr(json, "leader", &(ci->Leader)));
+    IFOK(s, nats_JSONGetArrayObject(json, "replicas", &replicas, &replicasLen));
+    if ((s == NATS_OK) && (replicas != NULL))
+    {
+        int i;
+
+        ci->Replicas = (jsPeerInfo**) NATS_CALLOC(replicasLen, sizeof(jsPeerInfo*));
+        if (ci->Replicas == NULL)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+
+        for (i=0; (s == NATS_OK) && (i<replicasLen); i++)
+        {
+            s = _unmarshalPeerInfo(replicas[i], &(ci->Replicas[i]));
+            if (s == NATS_OK)
+                ci->ReplicasLen++;
+        }
+        // Free the array of JSON objects that was allocated by nats_JSONGetArrayObject.
+        NATS_FREE(replicas);
+    }
+    if (s == NATS_OK)
+        *new_ci = ci;
+    else
+        _destroyClusterInfo(ci);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_unmarshalStreamSourceInfo(nats_JSON *pjson, const char *fieldName, jsStreamSourceInfo **new_src)
+{
+    nats_JSON               *json = NULL;
+    jsStreamSourceInfo      *ssi  = NULL;
+    natsStatus              s;
+
+    if (fieldName != NULL)
+    {
+        s = nats_JSONGetObject(pjson, fieldName, &json);
+        if (json == NULL)
+            return NATS_UPDATE_ERR_STACK(s);
+    }
+    else
+    {
+        json = pjson;
+    }
+
+    ssi = (jsStreamSourceInfo*) NATS_CALLOC(1, sizeof(jsStreamSourceInfo));
+    if (ssi == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    s = nats_JSONGetStr(json, "name", &(ssi->Name));
+    IFOK(s, _unmarshalExternalStream(json, "external", &(ssi->External)));
+    IFOK(s, nats_JSONGetULong(json, "lag", &(ssi->Lag)));
+    IFOK(s, nats_JSONGetLong(json, "active", &(ssi->Active)));
+
+    if (s == NATS_OK)
+        *new_src = ssi;
+    else
+        _destroyStreamSourceInfo(ssi);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_unmarshalStreamInfoPaged(nats_JSON *json, jsStreamInfo **new_si, apiPaged *page)
+{
+    jsStreamInfo        *si         = NULL;
+    nats_JSON           **sources   = NULL;
+    int                 sourcesLen  = 0;
+    natsStatus          s;
+
+    si = (jsStreamInfo*) NATS_CALLOC(1, sizeof(jsStreamInfo));
+    if (si == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    // Get the config object
+    s = js_unmarshalStreamConfig(json, "config", &(si->Config));
+    IFOK(s, nats_JSONGetTime(json, "created", &(si->Created)));
+    IFOK(s, js_unmarshalStreamState(json, "state", &(si->State)));
+    IFOK(s, _unmarshalClusterInfo(json, "cluster", &(si->Cluster)));
+    IFOK(s, _unmarshalStreamSourceInfo(json, "mirror", &(si->Mirror)));
+    IFOK(s, nats_JSONGetArrayObject(json, "sources", &sources, &sourcesLen));
+    if ((s == NATS_OK) && (sources != NULL))
+    {
+        int i;
+
+        si->Sources = (jsStreamSourceInfo**) NATS_CALLOC(sourcesLen, sizeof(jsStreamSourceInfo*));
+        if (si->Sources == NULL)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+
+        for (i=0; (s == NATS_OK) && (i<sourcesLen); i++)
+        {
+            s = _unmarshalStreamSourceInfo(sources[i], NULL, &(si->Sources[i]));
+            if (s == NATS_OK)
+                si->SourcesLen++;
+        }
+        // Free the array of JSON objects that was allocated by nats_JSONGetArrayObject.
+        NATS_FREE(sources);
+    }
+    if ((s == NATS_OK) && (page != NULL))
+    {
+        IFOK(s, nats_JSONGetLong(json, "total", &page->total));
+        IFOK(s, nats_JSONGetLong(json, "offset", &page->offset));
+        IFOK(s, nats_JSONGetLong(json, "limit", &page->limit));
+    }
+
+    if (s == NATS_OK)
+        *new_si = si;
+    else
+        jsStreamInfo_Destroy(si);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+js_unmarshalStreamInfo(nats_JSON *json, jsStreamInfo **new_si)
+{
+    natsStatus s = _unmarshalStreamInfoPaged(json, new_si, NULL);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_unmarshalStreamCreateResp(jsStreamInfo **new_si, apiPaged *page, natsMsg *resp, jsErrCode *errCode)
+{
+    nats_JSON           *json = NULL;
+    jsApiResponse       ar;
+    natsStatus          s;
+
+    s = js_unmarshalResponse(&ar, &json, resp);
+    if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    if (js_apiResponseIsErr(&ar))
+    {
+        if (errCode != NULL)
+            *errCode = (int) ar.Error.ErrCode;
+
+        // If the error code is JSStreamNotFoundErr then pick NATS_NOT_FOUND.
+        if (ar.Error.ErrCode == JSStreamNotFoundErr)
+            s = NATS_NOT_FOUND;
+        else
+            s = nats_setError(NATS_ERR, "%s", ar.Error.Description);
+    }
+    else if (new_si != NULL)
+    {
+        // At this point we need to unmarshal the stream info itself.
+        s = _unmarshalStreamInfoPaged(json, new_si, page);
+    }
+
+    js_freeApiRespContent(&ar);
+    nats_JSONDestroy(json);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+jsStreamConfig_Init(jsStreamConfig *cfg)
+{
+    if (cfg == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    memset(cfg, 0, sizeof(jsStreamConfig));
+    cfg->Retention      = js_LimitsPolicy;
+    cfg->MaxConsumers   = -1;
+    cfg->MaxMsgs        = -1;
+    cfg->MaxBytes       = -1;
+    cfg->MaxMsgSize     = -1;
+    cfg->Storage        = js_FileStorage;
+    cfg->Discard        = js_DiscardOld;
+    cfg->Replicas       = 1;
+    return NATS_OK;
+}
+
+static natsStatus
+_addOrUpdate(jsStreamInfo **new_si, jsStreamAction action, jsCtx *js, jsStreamConfig *cfg, jsOptions *opts, jsErrCode *errCode)
+{
+    natsStatus          s       = NATS_OK;
+    natsBuffer          *buf    = NULL;
+    char                *subj   = NULL;
+    natsMsg             *resp   = NULL;
+    natsConnection      *nc     = NULL;
+    const char          *apiT   = NULL;
+    bool                freePfx = false;
+    jsOptions           o;
+
+    if (errCode != NULL)
+        *errCode = 0;
+
+    if (js == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    if (cfg == NULL)
+        return nats_setError(NATS_INVALID_ARG, "%s", jsErrStreamConfigRequired);
+
+    s = _checkStreamName(cfg->Name);
+    if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    switch (action)
+    {
+        case jsStreamActionCreate: apiT = jsApiStreamCreateT; break;
+        case jsStreamActionUpdate: apiT = jsApiStreamUpdateT; break;
+        default: abort();
+    }
+    s = js_setOpts(&nc, &freePfx, js, opts, &o);
+    if (s == NATS_OK)
+    {
+        if (nats_asprintf(&subj, apiT, js_lenWithoutTrailingDot(o.Prefix), o.Prefix, cfg->Name) < 0)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+
+        if (freePfx)
+            NATS_FREE((char*) o.Prefix);
+    }
+
+    // Marshal the stream create/update request
+    IFOK(s, js_marshalStreamConfig(&buf, cfg));
+
+    // Send the request
+    IFOK_JSR(s, natsConnection_Request(&resp, nc, subj, natsBuf_Data(buf), natsBuf_Len(buf), o.Wait));
+
+    // If we got a response, check for error or return the stream info result.
+    IFOK(s, _unmarshalStreamCreateResp(new_si, NULL, resp, errCode));
+
+    natsBuf_Destroy(buf);
+    natsMsg_Destroy(resp);
+    NATS_FREE(subj);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+js_AddStream(jsStreamInfo **new_si, jsCtx *js, jsStreamConfig *cfg, jsOptions *opts, jsErrCode *errCode)
+{
+    natsStatus s = _addOrUpdate(new_si, jsStreamActionCreate, js, cfg, opts, errCode);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+js_UpdateStream(jsStreamInfo **new_si, jsCtx *js, jsStreamConfig *cfg, jsOptions *opts, jsErrCode *errCode)
+{
+    natsStatus s = _addOrUpdate(new_si, jsStreamActionUpdate, js, cfg, opts, errCode);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_marshalStreamInfoReq(natsBuffer **new_buf, struct jsOptionsStreamInfo *o, int64_t offset)
+{
+    natsBuffer  *buf = *new_buf;
+    natsStatus  s    = NATS_OK;
+
+    if (!o->DeletedDetails && nats_IsStringEmpty(o->SubjectsFilter))
+        return NATS_OK;
+
+    if (buf == NULL)
+        s = natsBuf_Create(&buf, 30);
+
+    IFOK(s, natsBuf_AppendByte(buf, '{'));
+    if ((s == NATS_OK) && o->DeletedDetails)
+        s = natsBuf_Append(buf, "\"deleted_details\":true", -1);
+    if ((s == NATS_OK) && !nats_IsStringEmpty(o->SubjectsFilter))
+    {
+        if (o->DeletedDetails)
+            s = natsBuf_AppendByte(buf, ',');
+        IFOK(s, natsBuf_Append(buf, "\"subjects_filter\":\"", -1));
+        IFOK(s, natsBuf_Append(buf, o->SubjectsFilter, -1));
+        IFOK(s, natsBuf_AppendByte(buf, '\"'));
+        if ((s == NATS_OK) && (offset > 0))
+            IFOK(s, nats_marshalLong(buf, true, "offset", offset));
+    }
+    IFOK(s, natsBuf_AppendByte(buf, '}'));
+
+    if (*new_buf == NULL)
+        *new_buf = buf;
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+js_GetStreamInfo(jsStreamInfo **new_si, jsCtx *js, const char *stream, jsOptions *opts, jsErrCode *errCode)
+{
+    natsStatus          s;
+    natsBuffer          *buf    = NULL;
+    char                *subj   = NULL;
+    char                *req    = NULL;
+    int                 reqLen  = 0;
+    natsMsg             *resp   = NULL;
+    natsConnection      *nc     = NULL;
+    bool                freePfx = false;
+    jsOptions           o;
+    // For subjects pagination
+    int64_t                 offset  = 0;
+    bool                    doPage  = false;
+    bool                    done    = false;
+    jsStreamInfo            *si     = NULL;
+    jsStreamStateSubjects   *subjects = NULL;
+    apiPaged                page;
+
+    if (errCode != NULL)
+        *errCode = 0;
+
+    if ((js == NULL) || (new_si == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    s = _checkStreamName(stream);
+    if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    s = js_setOpts(&nc, &freePfx, js, opts, &o);
+    if (s == NATS_OK)
+    {
+        if (nats_asprintf(&subj, jsApiStreamInfoT, js_lenWithoutTrailingDot(o.Prefix), o.Prefix, stream) < 0)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+
+        if (freePfx)
+            NATS_FREE((char*) o.Prefix);
+    }
+
+    if (!nats_IsStringEmpty(o.Stream.Info.SubjectsFilter))
+    {
+        doPage = true;
+        memset(&page, 0, sizeof(apiPaged));
+    }
+
+    do
+    {
+        // This will return a buffer if the request was marshal'ed
+        // (due to presence of options)
+        IFOK(s, _marshalStreamInfoReq(&buf, &(o.Stream.Info), offset));
+        if ((s == NATS_OK) && (buf != NULL) && (natsBuf_Len(buf) > 0))
+        {
+            req = natsBuf_Data(buf);
+            reqLen = natsBuf_Len(buf);
+        }
+
+        // Send the request
+        IFOK_JSR(s, natsConnection_Request(&resp, nc, subj, req, reqLen, o.Wait));
+
+        // If we got a response, check for error or return the stream info result.
+        IFOK(s, _unmarshalStreamCreateResp(&si, &page, resp, errCode));
+
+        // If there was paging, we need to collect subjects until we get them all.
+        if ((s == NATS_OK) && doPage)
+        {
+            if (si->State.Subjects != NULL)
+            {
+                int sc = si->State.Subjects->Count;
+                offset += (int64_t) sc;
+                if (subjects == NULL)
+                    subjects = si->State.Subjects;
+                else
+                {
+                    jsStreamStateSubject    *list   = subjects->List;
+                    int                     prev    = subjects->Count;
+
+                    list = (jsStreamStateSubject*) NATS_REALLOC(list, (prev + sc) * sizeof(jsStreamStateSubject));
+                    if (list == NULL)
+                        s = nats_setDefaultError(NATS_NO_MEMORY);
+                    else
+                    {
+                        int i;
+                        for (i=0; i<sc; i++)
+                        {
+                            list[prev+i].Subject = si->State.Subjects->List[i].Subject;
+                            list[prev+i].Msgs = si->State.Subjects->List[i].Msgs;
+                        }
+                        NATS_FREE(si->State.Subjects->List);
+                        NATS_FREE(si->State.Subjects);
+                        subjects->List = list;
+                        subjects->Count += sc;
+                    }
+                }
+                if (s == NATS_OK)
+                    si->State.Subjects = NULL;
+            }
+            done = offset >= page.total;
+            if (!done)
+            {
+                jsStreamInfo_Destroy(si);
+                si = NULL;
+                // Reset the request buffer, we may be able to reuse.
+                natsBuf_Reset(buf);
+            }
+        }
+        natsMsg_Destroy(resp);
+        resp = NULL;
+    }
+    while ((s == NATS_OK) && doPage && !done);
+
+    natsBuf_Destroy(buf);
+    NATS_FREE(subj);
+
+    if (s == NATS_OK)
+    {
+        if (doPage && (subjects != NULL))
+            si->State.Subjects = subjects;
+
+        *new_si = si;
+    }
+    else
+    {
+        if (subjects != NULL)
+            _destroyStreamStateSubjects(subjects);
+
+        if (s == NATS_NOT_FOUND)
+        {
+            nats_clearLastError();
+            return s;
+        }
+    }
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_unmarshalSuccessResp(bool *success, natsMsg *resp, jsErrCode *errCode)
+{
+    nats_JSON           *json = NULL;
+    jsApiResponse       ar;
+    natsStatus          s;
+
+    *success = false;
+
+    s = js_unmarshalResponse(&ar, &json, resp);
+    if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    if (js_apiResponseIsErr(&ar))
+    {
+        if (errCode != NULL)
+            *errCode = (int) ar.Error.ErrCode;
+
+        // For stream or consumer not found, return NATS_NOT_FOUND instead of NATS_ERR.
+        if ((ar.Error.ErrCode == JSStreamNotFoundErr)
+            || (ar.Error.ErrCode == JSConsumerNotFoundErr))
+        {
+            s = NATS_NOT_FOUND;
+        }
+        else
+            s = nats_setError(NATS_ERR, "%s", ar.Error.Description);
+    }
+    else
+    {
+        s = nats_JSONGetBool(json, "success", success);
+    }
+
+    js_freeApiRespContent(&ar);
+    nats_JSONDestroy(json);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_marshalPurgeRequest(natsBuffer **new_buf, struct jsOptionsStreamPurge *opts)
+{
+    natsStatus          s       = NATS_OK;
+    natsBuffer          *buf    = NULL;
+    bool                comma   = false;
+
+    if (nats_IsStringEmpty(opts->Subject) && (opts->Sequence == 0) && (opts->Keep == 0))
+        return NATS_OK;
+
+    if ((opts->Sequence > 0) && (opts->Keep > 0))
+        return nats_setError(NATS_INVALID_ARG,
+                             "Sequence (%" PRIu64 ") and Keep (%" PRIu64 " are mutually exclusive",
+                             opts->Sequence, opts->Keep);
+
+    s = natsBuf_Create(&buf, 128);
+    IFOK(s, natsBuf_AppendByte(buf, '{'));
+    if ((s == NATS_OK) && !nats_IsStringEmpty(opts->Subject))
+    {
+        s = natsBuf_Append(buf, "\"filter\":\"", -1);
+        IFOK(s, natsBuf_Append(buf, opts->Subject, -1));
+        IFOK(s, natsBuf_AppendByte(buf, '"'));
+        comma = true;
+    }
+    if ((s == NATS_OK) && (opts->Sequence > 0))
+        s = nats_marshalULong(buf, comma, "seq", opts->Sequence);
+
+    if ((s == NATS_OK) && (opts->Keep > 0))
+        s = nats_marshalULong(buf, comma, "keep", opts->Keep);
+
+    IFOK(s, natsBuf_AppendByte(buf, '}'));
+
+    if (s == NATS_OK)
+        *new_buf = buf;
+    else
+        natsBuf_Destroy(buf);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_purgeOrDelete(bool purge, jsCtx *js, const char *stream, jsOptions *opts, jsErrCode *errCode)
+{
+    natsStatus          s       = NATS_OK;
+    char                *subj   = NULL;
+    natsMsg             *resp   = NULL;
+    natsConnection      *nc     = NULL;
+    const char          *apiT   = (purge ? jsApiStreamPurgeT : jsApiStreamDeleteT);
+    bool                freePfx = false;
+    natsBuffer          *buf    = NULL;
+    const void          *data   = NULL;
+    int                 dlen    = 0;
+    bool                success = false;
+    jsOptions           o;
+
+    if (errCode != NULL)
+        *errCode = 0;
+
+    if (js == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    s = _checkStreamName(stream);
+    if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    s = js_setOpts(&nc, &freePfx, js, opts, &o);
+    if (s == NATS_OK)
+    {
+        if (nats_asprintf(&subj, apiT, js_lenWithoutTrailingDot(o.Prefix), o.Prefix, stream) < 0)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+
+        if (freePfx)
+            NATS_FREE((char*) o.Prefix);
+    }
+    if ((s == NATS_OK) && purge)
+    {
+        s = _marshalPurgeRequest(&buf, &(o.Stream.Purge));
+        if ((s == NATS_OK) && (buf != NULL))
+        {
+            data = (const void*) natsBuf_Data(buf);
+            dlen = natsBuf_Len(buf);
+        }
+    }
+
+    // Send the request
+    IFOK_JSR(s, natsConnection_Request(&resp, js->nc, subj, data, dlen, o.Wait));
+
+    IFOK(s, _unmarshalSuccessResp(&success, resp, errCode));
+    if ((s == NATS_OK) && !success)
+        s = nats_setError(NATS_ERR, "failed to %s stream '%s'", (purge ? "purge" : "delete"), stream);
+
+    natsBuf_Destroy(buf);
+    natsMsg_Destroy(resp);
+    NATS_FREE(subj);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+js_PurgeStream(jsCtx *js, const char *stream, jsOptions *opts, jsErrCode *errCode)
+{
+    natsStatus s = _purgeOrDelete(true, js, stream, opts, errCode);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+js_DeleteStream(jsCtx *js, const char *stream, jsOptions *opts, jsErrCode *errCode)
+{
+    natsStatus s = _purgeOrDelete(false, js, stream, opts, errCode);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_decodeBytesLen(nats_JSON *json, const char *field, const char **str, int *strLen, int *decodedLen)
+{
+    natsStatus  s    = NATS_OK;
+
+    s = nats_JSONGetStrPtr(json, field, str);
+    if ((s == NATS_OK) && (*str != NULL))
+        s = nats_Base64_DecodeLen(*str, strLen, decodedLen);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_unmarshalStoredMsg(nats_JSON *json, natsMsg **new_msg)
+{
+    natsStatus  s;
+    natsMsg     *msg    = NULL;
+    const char  *subject= NULL;
+    const char  *hdrs   = NULL;
+    const char  *data   = NULL;
+    int         hdrsl   = 0;
+    int         dhdrsl  = 0;
+    int         datal   = 0;
+    int         ddatal  = 0;
+
+    s = nats_JSONGetStrPtr(json, "subject", &subject);
+    IFOK(s, _decodeBytesLen(json, "hdrs", &hdrs, &hdrsl, &dhdrsl));
+    IFOK(s, _decodeBytesLen(json, "data", &data, &datal, &ddatal));
+    if ((s == NATS_OK) && (subject != NULL))
+    {
+        s = natsMsg_create(&msg, subject, (int) strlen(subject),
+                           NULL, 0, NULL, dhdrsl+ddatal, dhdrsl);
+        if (s == NATS_OK)
+        {
+            if ((hdrs != NULL) && (dhdrsl > 0))
+                nats_Base64_DecodeInPlace(hdrs, hdrsl, (unsigned char*) msg->hdr);
+            if ((data != NULL) && (ddatal > 0))
+                nats_Base64_DecodeInPlace(data, datal, (unsigned char*) msg->data);
+        }
+        IFOK(s, nats_JSONGetULong(json, "seq", &(msg->seq)));
+        IFOK(s, nats_JSONGetTime(json, "time", &(msg->time)));
+    }
+    if (s == NATS_OK)
+        *new_msg = msg;
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_unmarshalGetMsgResp(natsMsg **msg, natsMsg *resp, jsErrCode *errCode)
+{
+    nats_JSON           *json = NULL;
+    jsApiResponse       ar;
+    natsStatus          s;
+
+    s = js_unmarshalResponse(&ar, &json, resp);
+    if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    if (js_apiResponseIsErr(&ar))
+    {
+        if (errCode != NULL)
+            *errCode = (int) ar.Error.ErrCode;
+
+        // If the error code is JSNoMessageFoundErr then pick NATS_NOT_FOUND.
+        if (ar.Error.ErrCode == JSNoMessageFoundErr)
+            s = NATS_NOT_FOUND;
+        else
+            s = nats_setError(NATS_ERR, "%s", ar.Error.Description);
+    }
+    else
+    {
+        nats_JSON *mjson = NULL;
+
+        s = nats_JSONGetObject(json, "message", &mjson);
+        if ((s == NATS_OK) && (mjson == NULL))
+            s = nats_setError(NATS_NOT_FOUND, "%s", "message content not found");
+        else
+            s = _unmarshalStoredMsg(mjson, msg);
+    }
+
+    js_freeApiRespContent(&ar);
+    nats_JSONDestroy(json);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_getMsg(natsMsg **msg, jsCtx *js, const char *stream, uint64_t seq, const char *subject, jsOptions *opts, jsErrCode *errCode)
+{
+    natsStatus          s = NATS_OK;
+    char                *subj   = NULL;
+    natsMsg             *resp   = NULL;
+    natsConnection      *nc     = NULL;
+    bool                freePfx = false;
+    jsOptions           o;
+    char                buffer[64];
+    natsBuffer          buf;
+
+    if ((msg == NULL) || (js == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    if (nats_IsStringEmpty(stream))
+        return nats_setError(NATS_INVALID_ARG, "%s", jsErrStreamNameRequired);
+
+    s = js_setOpts(&nc, &freePfx, js, opts, &o);
+    if (s == NATS_OK)
+    {
+        if (nats_asprintf(&subj, jsApiMsgGetT, js_lenWithoutTrailingDot(o.Prefix), o.Prefix, stream) < 0)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+
+        if (freePfx)
+            NATS_FREE((char*) o.Prefix);
+    }
+    IFOK(s, natsBuf_InitWithBackend(&buf, buffer, 0, sizeof(buffer)));
+    IFOK(s, natsBuf_AppendByte(&buf, '{'));
+    if ((s == NATS_OK) && (seq > 0))
+    {
+       s = nats_marshalULong(&buf, false, "seq", seq);
+    }
+    else
+    {
+        IFOK(s, natsBuf_Append(&buf, "\"last_by_subj\":\"", -1));
+        IFOK(s, natsBuf_Append(&buf, subject, -1));
+        IFOK(s, natsBuf_AppendByte(&buf, '"'));
+    }
+    IFOK(s, natsBuf_AppendByte(&buf, '}'));
+
+    // Send the request
+    IFOK_JSR(s, natsConnection_Request(&resp, js->nc, subj, natsBuf_Data(&buf), natsBuf_Len(&buf), o.Wait));
+    // Unmarshal response
+    IFOK(s, _unmarshalGetMsgResp(msg, resp, errCode));
+
+    natsBuf_Cleanup(&buf);
+    natsMsg_Destroy(resp);
+    NATS_FREE(subj);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+js_GetMsg(natsMsg **msg, jsCtx *js, const char *stream, uint64_t seq, jsOptions *opts, jsErrCode *errCode)
+{
+    natsStatus s;
+
+    if (errCode != NULL)
+        *errCode = 0;
+
+    if (seq < 1)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    s = _getMsg(msg, js, stream, seq, NULL, opts, errCode);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+js_GetLastMsg(natsMsg **msg, jsCtx *js, const char *stream, const char *subject, jsOptions *opts, jsErrCode *errCode)
+{
+    natsStatus s;
+
+    if (errCode != NULL)
+        *errCode = 0;
+
+    if (nats_IsStringEmpty(subject))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    s = _getMsg(msg, js, stream, 0, subject, opts, errCode);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+jsDirectGetMsgOptions_Init(jsDirectGetMsgOptions *opts)
+{
+    if (opts == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    memset(opts, 0, sizeof(jsDirectGetMsgOptions));
+    return NATS_OK;
+}
+
+natsStatus
+js_directGetMsgToJSMsg(const char *stream, natsMsg *msg)
+{
+    natsStatus          s;
+    const char          *val = NULL;
+    int64_t             seq  = 0;
+    int64_t             tm   = 0;
+
+    if ((msg->hdrLen == 0) && (msg->headers == NULL))
+        return nats_setError(NATS_ERR, "%s", "direct get message response should have headers");
+
+    // If the server returns an error (not found/bad request), we would receive
+    // an empty body message with the Status header. Check for that.
+    if ((natsMsg_GetDataLength(msg) == 0)
+        && (natsMsgHeader_Get(msg, STATUS_HDR, &val) == NATS_OK))
+    {
+        if (strcmp(val, NOT_FOUND_STATUS) == 0)
+            return nats_setDefaultError(NATS_NOT_FOUND);
+        else
+        {
+            natsMsgHeader_Get(msg, DESCRIPTION_HDR, &val);
+            return nats_setError(NATS_ERR, "error getting message: %s", val);
+        }
+    }
+
+    s = natsMsgHeader_Get(msg, JSStream, &val);
+    if ((s != NATS_OK) || nats_IsStringEmpty(val))
+        return nats_setError(NATS_ERR, "missing stream name '%s'", val);
+
+    val = NULL;
+    s = natsMsgHeader_Get(msg, JSSequence, &val);
+    if ((s != NATS_OK) || ((seq = nats_ParseInt64(val, (int) strlen(val))) == -1))
+        return nats_setError(NATS_ERR, "missing or invalid sequence '%s'", val);
+
+    val = NULL;
+    s = natsMsgHeader_Get(msg, JSTimeStamp, &val);
+    if ((s == NATS_OK) && !nats_IsStringEmpty(val))
+        s = nats_parseTime((char*) val, &tm);
+    if ((s != NATS_OK) || (tm == 0))
+        return nats_setError(NATS_ERR, "missing or invalid timestamp '%s'", val);
+
+    val = NULL;
+    s = natsMsgHeader_Get(msg, JSSubject, &val);
+    if ((s != NATS_OK) || nats_IsStringEmpty(val))
+        return nats_setError(NATS_ERR, "missing or invalid subject '%s'", val);
+
+    // Will point the message subject to the JSSubject header value.
+    // This will remain in the message memory allocated block, even
+    // if later the user changes the JSSubject header.
+    msg->subject = val;
+    msg->seq = seq;
+    msg->time = tm;
+    return NATS_OK;
+}
+
+natsStatus
+js_DirectGetMsg(natsMsg **msg, jsCtx *js, const char *stream, jsOptions *opts, jsDirectGetMsgOptions *dgOpts)
+{
+    natsStatus          s = NATS_OK;
+    char                *subj   = NULL;
+    natsMsg             *resp   = NULL;
+    natsConnection      *nc     = NULL;
+    bool                freePfx = false;
+    bool                comma   = false;
+    bool                doLBS   = false;
+    jsOptions           o;
+    char                buffer[64];
+    natsBuffer          buf;
+
+    if ((msg == NULL) || (js == NULL) || (dgOpts == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    if (nats_IsStringEmpty(stream))
+        return nats_setError(NATS_INVALID_ARG, "%s", jsErrStreamNameRequired);
+
+    doLBS = !nats_IsStringEmpty(dgOpts->LastBySubject);
+
+    s = js_setOpts(&nc, &freePfx, js, opts, &o);
+    if (s == NATS_OK)
+    {
+        if (doLBS)
+        {
+            if (nats_asprintf(&subj, jsApiDirectMsgGetLastBySubjectT, js_lenWithoutTrailingDot(o.Prefix), o.Prefix, stream, dgOpts->LastBySubject) < 0)
+                s = nats_setDefaultError(NATS_NO_MEMORY);
+        }
+        else
+        {
+            if (nats_asprintf(&subj, jsApiDirectMsgGetT, js_lenWithoutTrailingDot(o.Prefix), o.Prefix, stream) < 0)
+                s = nats_setDefaultError(NATS_NO_MEMORY);
+        }
+        if (freePfx)
+            NATS_FREE((char*) o.Prefix);
+    }
+    if ((s == NATS_OK) && doLBS)
+    {
+        IFOK(s, natsConnection_Request(&resp, js->nc, subj, NULL, 0, o.Wait));
+    }
+    else if (s == NATS_OK)
+    {
+        IFOK(s, natsBuf_InitWithBackend(&buf, buffer, 0, sizeof(buffer)));
+        IFOK(s, natsBuf_AppendByte(&buf, '{'));
+        if ((s == NATS_OK) && (dgOpts->Sequence > 0))
+        {
+            comma = true;
+            s = nats_marshalULong(&buf, false, "seq", dgOpts->Sequence);
+        }
+        if ((s == NATS_OK) && !nats_IsStringEmpty(dgOpts->NextBySubject))
+        {
+            if (comma)
+                s = natsBuf_AppendByte(&buf, ',');
+
+            comma = true;
+            IFOK(s, natsBuf_Append(&buf, "\"next_by_subj\":\"", -1));
+            IFOK(s, natsBuf_Append(&buf, dgOpts->NextBySubject, -1));
+            IFOK(s, natsBuf_AppendByte(&buf, '"'));
+        }
+        IFOK(s, natsBuf_AppendByte(&buf, '}'));
+        // Send the request
+        IFOK(s, natsConnection_Request(&resp, js->nc, subj, natsBuf_Data(&buf), natsBuf_Len(&buf), o.Wait));
+
+        natsBuf_Cleanup(&buf);
+    }
+    // Convert the response to a JS message returned to the user.
+    IFOK(s, js_directGetMsgToJSMsg(stream, resp));
+
+    NATS_FREE(subj);
+
+    if (s == NATS_OK)
+        *msg = resp;
+    else
+        natsMsg_Destroy(resp);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_deleteMsg(jsCtx *js, bool noErase, const char *stream, uint64_t seq, jsOptions *opts, jsErrCode *errCode)
+{
+    natsStatus          s       = NATS_OK;
+    char                *subj   = NULL;
+    natsMsg             *resp   = NULL;
+    natsConnection      *nc     = NULL;
+    bool                freePfx = false;
+    bool                success = false;
+    jsOptions           o;
+    char                buffer[64];
+    natsBuffer          buf;
+
+    if (errCode != NULL)
+        *errCode = 0;
+
+    if (js == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    if (nats_IsStringEmpty(stream))
+        return nats_setError(NATS_INVALID_ARG, "%s", jsErrStreamNameRequired);
+
+    s = js_setOpts(&nc, &freePfx, js, opts, &o);
+    if (s == NATS_OK)
+    {
+        if (nats_asprintf(&subj, jsApiMsgDeleteT, js_lenWithoutTrailingDot(o.Prefix), o.Prefix, stream) < 0)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+
+        if (freePfx)
+            NATS_FREE((char*) o.Prefix);
+    }
+    IFOK(s, natsBuf_InitWithBackend(&buf, buffer, 0, sizeof(buffer)));
+    IFOK(s, natsBuf_AppendByte(&buf, '{'));
+    IFOK(s, nats_marshalULong(&buf, false, "seq", seq));
+    if ((s == NATS_OK) && noErase)
+        s = natsBuf_Append(&buf, ",\"no_erase\":true", -1);
+    IFOK(s, natsBuf_AppendByte(&buf, '}'));
+
+    // Send the request
+    IFOK_JSR(s, natsConnection_Request(&resp, js->nc, subj, natsBuf_Data(&buf), natsBuf_Len(&buf), o.Wait));
+
+    IFOK(s, _unmarshalSuccessResp(&success, resp, errCode));
+    if ((s == NATS_OK) && !success)
+        s = nats_setError(NATS_ERR, "failed to delete message %" PRIu64, seq);
+
+    natsBuf_Cleanup(&buf);
+    natsMsg_Destroy(resp);
+    NATS_FREE(subj);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+js_DeleteMsg(jsCtx *js, const char *stream, uint64_t seq, jsOptions *opts, jsErrCode *errCode)
+{
+    natsStatus s;
+
+    s = _deleteMsg(js, true, stream, seq, opts, errCode);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+js_EraseMsg(jsCtx *js, const char *stream, uint64_t seq, jsOptions *opts, jsErrCode *errCode)
+{
+    natsStatus s;
+
+    s = _deleteMsg(js, false, stream, seq, opts, errCode);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_unmarshalStreamInfoListResp(natsStrHash *m, apiPaged *page, natsMsg *resp, jsErrCode *errCode)
+{
+    nats_JSON           *json = NULL;
+    jsApiResponse       ar;
+    natsStatus          s;
+
+    s = js_unmarshalResponse(&ar, &json, resp);
+    if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    if (js_apiResponseIsErr(&ar))
+    {
+        if (errCode != NULL)
+            *errCode = (int) ar.Error.ErrCode;
+
+        // If the error code is JSStreamNotFoundErr then pick NATS_NOT_FOUND.
+        if (ar.Error.ErrCode == JSStreamNotFoundErr)
+            s = NATS_NOT_FOUND;
+        else
+            s = nats_setError(NATS_ERR, "%s", ar.Error.Description);
+    }
+    else
+    {
+        nats_JSON   **streams  = NULL;
+        int         streamsLen = 0;
+
+        IFOK(s, nats_JSONGetLong(json, "total", &page->total));
+        IFOK(s, nats_JSONGetLong(json, "offset", &page->offset));
+        IFOK(s, nats_JSONGetLong(json, "limit", &page->limit));
+        IFOK(s, nats_JSONGetArrayObject(json, "streams", &streams, &streamsLen));
+        if ((s == NATS_OK) && (streams != NULL))
+        {
+            int i;
+
+            for (i=0; (s == NATS_OK) && (i<streamsLen); i++)
+            {
+                jsStreamInfo *si    = NULL;
+                jsStreamInfo *osi   = NULL;
+
+                s = js_unmarshalStreamInfo(streams[i], &si);
+                if ((s == NATS_OK) && ((si->Config == NULL) || nats_IsStringEmpty(si->Config->Name)))
+                    s = nats_setError(NATS_ERR, "%s", "stream name missing from configuration");
+                IFOK(s, natsStrHash_SetEx(m, (char*) si->Config->Name, true, true, si, (void**) &osi));
+                if (osi != NULL)
+                    jsStreamInfo_Destroy(osi);
+            }
+            // Free the array of JSON objects that was allocated by nats_JSONGetArrayObject.
+            NATS_FREE(streams);
+        }
+    }
+    js_freeApiRespContent(&ar);
+    nats_JSONDestroy(json);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+js_Streams(jsStreamInfoList **new_list, jsCtx *js, jsOptions *opts, jsErrCode *errCode)
+{
+    natsStatus          s       = NATS_OK;
+    natsBuffer          *buf    = NULL;
+    char                *subj   = NULL;
+    natsMsg             *resp   = NULL;
+    natsConnection      *nc     = NULL;
+    bool                freePfx = false;
+    bool                done    = false;
+    int64_t             offset  = 0;
+    int64_t             start   = 0;
+    int64_t             timeout = 0;
+    natsStrHash         *streams= NULL;
+    jsStreamInfoList    *list   = NULL;
+    jsOptions           o;
+    apiPaged            page;
+
+    if (errCode != NULL)
+        *errCode = 0;
+
+    if ((new_list == NULL) || (js == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    s = js_setOpts(&nc, &freePfx, js, opts, &o);
+    if (s == NATS_OK)
+    {
+        if (nats_asprintf(&subj, jsApiStreamListT, js_lenWithoutTrailingDot(o.Prefix), o.Prefix) < 0)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+
+        if (freePfx)
+            NATS_FREE((char*) o.Prefix);
+    }
+    IFOK(s, natsBuf_Create(&buf, 64));
+    IFOK(s, natsStrHash_Create(&streams, 16));
+
+    if (s == NATS_OK)
+    {
+        memset(&page, 0, sizeof(apiPaged));
+        start = nats_Now();
+    }
+
+    do
+    {
+        IFOK(s, natsBuf_AppendByte(buf, '{'));
+        IFOK(s, nats_marshalLong(buf, false, "offset", offset));
+        if (!nats_IsStringEmpty(o.Stream.Info.SubjectsFilter))
+        {
+            IFOK(s, natsBuf_Append(buf, ",\"subject\":\"", -1));
+            IFOK(s, natsBuf_Append(buf, o.Stream.Info.SubjectsFilter, -1));
+            IFOK(s, natsBuf_AppendByte(buf, '\"'));
+        }
+        IFOK(s, natsBuf_AppendByte(buf, '}'));
+
+        timeout = o.Wait - (nats_Now() - start);
+        if (timeout <= 0)
+            s = NATS_TIMEOUT;
+
+        // Send the request
+        IFOK_JSR(s, natsConnection_Request(&resp, nc, subj, natsBuf_Data(buf), natsBuf_Len(buf), timeout));
+
+        IFOK(s, _unmarshalStreamInfoListResp(streams, &page, resp, errCode));
+        if (s == NATS_OK)
+        {
+            offset += page.limit;
+            done = offset >= page.total;
+            if (!done)
+            {
+                // Reset the request buffer, we may be able to reuse.
+                natsBuf_Reset(buf);
+            }
+        }
+        natsMsg_Destroy(resp);
+        resp = NULL;
+    }
+    while ((s == NATS_OK) && !done);
+
+    natsBuf_Destroy(buf);
+    NATS_FREE(subj);
+
+    if (s == NATS_OK)
+    {
+        if (natsStrHash_Count(streams) == 0)
+        {
+            natsStrHash_Destroy(streams);
+            return NATS_NOT_FOUND;
+        }
+        list = (jsStreamInfoList*) NATS_CALLOC(1, sizeof(jsStreamInfoList));
+        if (list == NULL)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+        else
+        {
+            list->List = (jsStreamInfo**) NATS_CALLOC(natsStrHash_Count(streams), sizeof(jsStreamInfo*));
+            if (list->List == NULL)
+            {
+                NATS_FREE(list);
+                list = NULL;
+                s = nats_setDefaultError(NATS_NO_MEMORY);
+            }
+            else
+            {
+                natsStrHashIter iter;
+                void            *val = NULL;
+
+                natsStrHashIter_Init(&iter, streams);
+                while (natsStrHashIter_Next(&iter, NULL, (void**) &val))
+                {
+                    jsStreamInfo *si = (jsStreamInfo*) val;
+
+                    list->List[list->Count++] = si;
+                    natsStrHashIter_RemoveCurrent(&iter);
+                }
+                natsStrHashIter_Done(&iter);
+
+                *new_list = list;
+            }
+        }
+    }
+    if (s != NATS_OK)
+    {
+        natsStrHashIter iter;
+        void            *val = NULL;
+
+        natsStrHashIter_Init(&iter, streams);
+        while (natsStrHashIter_Next(&iter, NULL, (void**) &val))
+        {
+            jsStreamInfo *si = (jsStreamInfo*) val;
+
+            natsStrHashIter_RemoveCurrent(&iter);
+            jsStreamInfo_Destroy(si);
+        }
+        natsStrHashIter_Done(&iter);
+    }
+    natsStrHash_Destroy(streams);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+void
+jsStreamInfoList_Destroy(jsStreamInfoList *list)
+{
+    int i;
+
+    if (list == NULL)
+        return;
+
+    for (i=0; i<list->Count; i++)
+        jsStreamInfo_Destroy(list->List[i]);
+
+    NATS_FREE(list->List);
+    NATS_FREE(list);
+}
+
+static natsStatus
+_unmarshalNamesListResp(const char *fieldName, natsStrHash *m, apiPaged *page, natsMsg *resp, jsErrCode *errCode)
+{
+    nats_JSON           *json = NULL;
+    jsApiResponse       ar;
+    natsStatus          s;
+
+    s = js_unmarshalResponse(&ar, &json, resp);
+    if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    if (js_apiResponseIsErr(&ar))
+    {
+        if (errCode != NULL)
+            *errCode = (int) ar.Error.ErrCode;
+
+        // If the error code is JSStreamNotFoundErr then pick NATS_NOT_FOUND.
+        if (ar.Error.ErrCode == JSStreamNotFoundErr)
+            s = NATS_NOT_FOUND;
+        else
+            s = nats_setError(NATS_ERR, "%s", ar.Error.Description);
+    }
+    else
+    {
+        char    **names  = NULL;
+        int     namesLen = 0;
+
+        IFOK(s, nats_JSONGetLong(json, "total", &page->total));
+        IFOK(s, nats_JSONGetLong(json, "offset", &page->offset));
+        IFOK(s, nats_JSONGetLong(json, "limit", &page->limit));
+        IFOK(s, nats_JSONGetArrayStr(json, fieldName, &names, &namesLen));
+        if ((s == NATS_OK) && (names != NULL))
+        {
+            int i;
+
+            for (i=0; (s == NATS_OK) && (i<namesLen); i++)
+                s = natsStrHash_Set(m, names[i], true, NULL, NULL);
+
+            // Free the array of JSON objects that was allocated by nats_JSONGetArrayStr.
+            for (i=0; i<namesLen; i++)
+                NATS_FREE(names[i]);
+            NATS_FREE(names);
+        }
+    }
+    js_freeApiRespContent(&ar);
+    nats_JSONDestroy(json);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+js_StreamNames(jsStreamNamesList **new_list, jsCtx *js, jsOptions *opts, jsErrCode *errCode)
+{
+    natsStatus          s       = NATS_OK;
+    natsBuffer          *buf    = NULL;
+    char                *subj   = NULL;
+    natsMsg             *resp   = NULL;
+    natsConnection      *nc     = NULL;
+    bool                freePfx = false;
+    bool                done    = false;
+    int64_t             offset  = 0;
+    int64_t             start   = 0;
+    int64_t             timeout = 0;
+    natsStrHash         *names  = NULL;
+    jsStreamNamesList   *list   = NULL;
+    jsOptions           o;
+    apiPaged            page;
+
+    if (errCode != NULL)
+        *errCode = 0;
+
+    if ((new_list == NULL) || (js == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    s = js_setOpts(&nc, &freePfx, js, opts, &o);
+    if (s == NATS_OK)
+    {
+        if (nats_asprintf(&subj, jsApiStreamNamesT, js_lenWithoutTrailingDot(o.Prefix), o.Prefix) < 0)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+
+        if (freePfx)
+            NATS_FREE((char*) o.Prefix);
+    }
+    IFOK(s, natsBuf_Create(&buf, 64));
+    IFOK(s, natsStrHash_Create(&names, 16));
+
+    if (s == NATS_OK)
+    {
+        memset(&page, 0, sizeof(apiPaged));
+        start = nats_Now();
+    }
+
+    do
+    {
+        IFOK(s, natsBuf_AppendByte(buf, '{'));
+        IFOK(s, nats_marshalLong(buf, false, "offset", offset));
+        if (!nats_IsStringEmpty(o.Stream.Info.SubjectsFilter))
+        {
+            IFOK(s, natsBuf_Append(buf, ",\"subject\":\"", -1));
+            IFOK(s, natsBuf_Append(buf, o.Stream.Info.SubjectsFilter, -1));
+            IFOK(s, natsBuf_AppendByte(buf, '\"'));
+        }
+        IFOK(s, natsBuf_AppendByte(buf, '}'));
+
+        timeout = o.Wait - (nats_Now() - start);
+        if (timeout <= 0)
+            s = NATS_TIMEOUT;
+
+        // Send the request
+        IFOK_JSR(s, natsConnection_Request(&resp, nc, subj, natsBuf_Data(buf), natsBuf_Len(buf), timeout));
+
+        IFOK(s, _unmarshalNamesListResp("streams", names, &page, resp, errCode));
+        if (s == NATS_OK)
+        {
+            offset += page.limit;
+            done = offset >= page.total;
+            if (!done)
+            {
+                // Reset the request buffer, we may be able to reuse.
+                natsBuf_Reset(buf);
+            }
+        }
+        natsMsg_Destroy(resp);
+        resp = NULL;
+    }
+    while ((s == NATS_OK) && !done);
+
+    natsBuf_Destroy(buf);
+    NATS_FREE(subj);
+
+    if (s == NATS_OK)
+    {
+        if (natsStrHash_Count(names) == 0)
+        {
+            natsStrHash_Destroy(names);
+            return NATS_NOT_FOUND;
+        }
+        list = (jsStreamNamesList*) NATS_CALLOC(1, sizeof(jsStreamNamesList));
+        if (list == NULL)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+        else
+        {
+            list->List = (char**) NATS_CALLOC(natsStrHash_Count(names), sizeof(char*));
+            if (list->List == NULL)
+                s = nats_setDefaultError(NATS_NO_MEMORY);
+            else
+            {
+                natsStrHashIter iter;
+                char            *sname = NULL;
+
+                natsStrHashIter_Init(&iter, names);
+                while ((s == NATS_OK) && natsStrHashIter_Next(&iter, &sname, NULL))
+                {
+                    char *copyName = NULL;
+
+                    DUP_STRING(s, copyName, sname);
+                    if (s == NATS_OK)
+                    {
+                        list->List[list->Count++] = copyName;
+                        natsStrHashIter_RemoveCurrent(&iter);
+                    }
+                }
+                natsStrHashIter_Done(&iter);
+            }
+            if (s == NATS_OK)
+                *new_list = list;
+            else
+                jsStreamNamesList_Destroy(list);
+        }
+    }
+    natsStrHash_Destroy(names);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+void
+jsStreamNamesList_Destroy(jsStreamNamesList *list)
+{
+    int i;
+
+    if (list == NULL)
+        return;
+
+    for (i=0; i<list->Count; i++)
+        NATS_FREE(list->List[i]);
+
+    NATS_FREE(list->List);
+    NATS_FREE(list);
+}
+
+//
+// Account related functions
+//
+
+static natsStatus
+_unmarshalAccLimits(nats_JSON *json, jsAccountLimits *limits)
+{
+    natsStatus  s;
+    nats_JSON   *obj = NULL;
+
+    s = nats_JSONGetObject(json, "limits", &obj);
+    if (obj == NULL)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    IFOK(s, nats_JSONGetLong(obj, "max_memory", &(limits->MaxMemory)));
+    IFOK(s, nats_JSONGetLong(obj, "max_storage", &(limits->MaxStore)));
+    IFOK(s, nats_JSONGetLong(obj, "max_streams", &(limits->MaxStreams)));
+    IFOK(s, nats_JSONGetLong(obj, "max_consumers", &(limits->MaxConsumers)));
+    IFOK(s, nats_JSONGetLong(obj, "max_ack_pending", &(limits->MaxAckPending)));
+    IFOK(s, nats_JSONGetLong(obj, "memory_max_stream_bytes", &(limits->MemoryMaxStreamBytes)));
+    IFOK(s, nats_JSONGetLong(obj, "storage_max_stream_bytes", &(limits->StoreMaxStreamBytes)));
+    IFOK(s, nats_JSONGetBool(obj, "max_bytes_required", &(limits->MaxBytesRequired)));
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_fillTier(void *userInfo, const char *subject, nats_JSONField *f)
+{
+    jsAccountInfo   *ai     = (jsAccountInfo*) userInfo;
+    natsStatus      s       = NATS_OK;
+    jsTier          *t      = NULL;
+    nats_JSON       *json   = f->value.vobj;
+
+    t = (jsTier*) NATS_CALLOC(1, sizeof(jsTier));
+    if (t == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    ai->Tiers[ai->TiersLen++] = t;
+
+    DUP_STRING(s, t->Name, subject);
+    IFOK(s, nats_JSONGetULong(json, "memory", &(t->Memory)));
+    IFOK(s, nats_JSONGetULong(json, "storage", &(t->Store)));
+    IFOK(s, nats_JSONGetLong(json, "streams", &(t->Streams)));
+    IFOK(s, nats_JSONGetLong(json, "consumers", &(t->Consumers)));
+    IFOK(s, _unmarshalAccLimits(json, &(t->Limits)));
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_unmarshalAccTiers(nats_JSON *json, jsAccountInfo *ai)
+{
+    nats_JSON               *obj    = NULL;
+    natsStatus              s       = NATS_OK;
+    int                     n;
+
+    s = nats_JSONGetObject(json, "tier", &obj);
+    if (obj == NULL)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    n = natsStrHash_Count(obj->fields);
+    if (n == 0)
+        return NATS_OK;
+
+    ai->Tiers = (jsTier**) NATS_CALLOC(n, sizeof(jsTier*));
+    if (ai->Tiers == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    s = nats_JSONRange(obj, TYPE_OBJECT, 0, _fillTier, (void*) ai);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+js_unmarshalAccountInfo(nats_JSON *json, jsAccountInfo **new_ai)
+{
+    natsStatus          s;
+    nats_JSON           *obj = NULL;
+    jsAccountInfo       *ai  = NULL;
+
+    ai = (jsAccountInfo*) NATS_CALLOC(1, sizeof(jsAccountInfo));
+    if (ai == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    s = nats_JSONGetULong(json, "memory", &(ai->Memory));
+    IFOK(s, nats_JSONGetULong(json, "storage", &(ai->Store)));
+    IFOK(s, nats_JSONGetLong(json, "streams", &(ai->Streams)));
+    IFOK(s, nats_JSONGetLong(json, "consumers", &(ai->Consumers)));
+    IFOK(s, nats_JSONGetStr(json, "domain", &(ai->Domain)));
+    IFOK(s, nats_JSONGetObject(json, "api", &obj));
+    if ((s == NATS_OK) && (obj != NULL))
+    {
+        IFOK(s, nats_JSONGetULong(obj, "total", &(ai->API.Total)));
+        IFOK(s, nats_JSONGetULong(obj, "errors", &(ai->API.Errors)));
+        obj = NULL;
+    }
+    IFOK(s, _unmarshalAccLimits(json, &(ai->Limits)));
+    IFOK(s, _unmarshalAccTiers(json, ai));
+
+    if (s == NATS_OK)
+        *new_ai = ai;
+    else
+        jsAccountInfo_Destroy(ai);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_unmarshalAccountInfoResp(jsAccountInfo **new_ai, natsMsg *resp, jsErrCode *errCode)
+{
+    nats_JSON           *json = NULL;
+    jsApiResponse       ar;
+    natsStatus          s;
+
+    s = js_unmarshalResponse(&ar, &json, resp);
+    if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    if (js_apiResponseIsErr(&ar))
+    {
+        if (errCode != NULL)
+            *errCode = (int) ar.Error.ErrCode;
+        s = nats_setError(NATS_ERR, "%s", ar.Error.Description);
+    }
+    else
+        s = js_unmarshalAccountInfo(json, new_ai);
+
+    js_freeApiRespContent(&ar);
+    nats_JSONDestroy(json);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+js_GetAccountInfo(jsAccountInfo **new_ai, jsCtx *js, jsOptions *opts, jsErrCode *errCode)
+{
+    natsMsg             *resp   = NULL;
+    char                *subj   = NULL;
+    natsConnection      *nc     = NULL;
+    natsStatus          s       = NATS_OK;
+    bool                freePfx = false;
+    jsOptions           o;
+
+    if (errCode != NULL)
+        *errCode = 0;
+
+    if (new_ai == NULL || js == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    s = js_setOpts(&nc, &freePfx, js, opts, &o);
+    if (s == NATS_OK)
+    {
+        if (nats_asprintf(&subj, jsApiAccountInfo, js_lenWithoutTrailingDot(o.Prefix), o.Prefix) < 0)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+
+        if (freePfx)
+            NATS_FREE((char*) o.Prefix);
+    }
+    // Send the request
+    IFOK_JSR(s, natsConnection_Request(&resp, nc, subj, NULL, 0, o.Wait));
+
+    // If we get a response, unmarshal the response
+    IFOK(s, _unmarshalAccountInfoResp(new_ai, resp, errCode));
+
+    // Common cleanup that is done regardless of success or failure.
+    NATS_FREE(subj);
+    natsMsg_Destroy(resp);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+void
+jsAccountInfo_Destroy(jsAccountInfo *ai)
+{
+    if (ai == NULL)
+        return;
+
+    if (ai->Tiers != NULL)
+    {
+        int i;
+        for (i=0; i<ai->TiersLen; i++)
+        {
+            jsTier *t = ai->Tiers[i];
+
+            NATS_FREE((char*) t->Name);
+            NATS_FREE(t);
+        }
+        NATS_FREE(ai->Tiers);
+    }
+    NATS_FREE(ai->Domain);
+    NATS_FREE(ai);
+}
+
+natsStatus
+jsPlacement_Init(jsPlacement *placement)
+{
+    if (placement == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    memset(placement, 0, sizeof(jsPlacement));
+    return NATS_OK;
+}
+
+natsStatus
+jsStreamSource_Init(jsStreamSource *source)
+{
+    if (source == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    memset(source, 0, sizeof(jsStreamSource));
+    return NATS_OK;
+
+}
+
+natsStatus
+jsExternalStream_Init(jsExternalStream *external)
+{
+    if (external == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    memset(external, 0, sizeof(jsExternalStream));
+    return NATS_OK;
+}
+
+natsStatus
+jsRePublish_Init(jsRePublish *rp)
+{
+    if (rp == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    memset(rp, 0, sizeof(jsRePublish));
+    return NATS_OK;
+}
+
+//
+// Consumer related functions
+//
+
+static natsStatus
+_marshalDeliverPolicy(natsBuffer *buf, jsDeliverPolicy p)
+{
+    natsStatus  s;
+    const char  *dp = NULL;
+
+    s = natsBuf_Append(buf, "\"deliver_policy\":\"", -1);
+    switch (p)
+    {
+        case js_DeliverAll:             dp = jsDeliverAllStr;           break;
+        case js_DeliverLast:            dp = jsDeliverLastStr;          break;
+        case js_DeliverNew:             dp = jsDeliverNewStr;           break;
+        case js_DeliverByStartSequence: dp = jsDeliverBySeqStr;         break;
+        case js_DeliverByStartTime:     dp = jsDeliverByTimeStr;        break;
+        case js_DeliverLastPerSubject:  dp = jsDeliverLastPerSubjectStr;break;
+        default:
+            return nats_setError(NATS_INVALID_ARG, "invalid deliver policy %d", (int) p);
+    }
+    IFOK(s, natsBuf_Append(buf, dp, -1));
+    IFOK(s, natsBuf_AppendByte(buf, '"'));
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_marshalAckPolicy(natsBuffer *buf, jsAckPolicy p)
+{
+    natsStatus  s;
+    const char  *ap;
+
+    s = natsBuf_Append(buf, ",\"ack_policy\":\"", -1);
+    switch (p)
+    {
+        case js_AckNone: ap = jsAckNoneStr; break;
+        case js_AckAll: ap = jsAckAllStr; break;
+        case js_AckExplicit: ap = jsAckExplictStr; break;
+        default:
+            return nats_setError(NATS_INVALID_ARG, "invalid ack policy %d", (int)p);
+    }
+    IFOK(s, natsBuf_Append(buf, ap, -1));
+    IFOK(s, natsBuf_AppendByte(buf, '"'));
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_marshalReplayPolicy(natsBuffer *buf, jsReplayPolicy p)
+{
+    natsStatus  s;
+    const char  *rp = NULL;
+
+    s = natsBuf_Append(buf, ",\"replay_policy\":\"", -1);
+    switch (p)
+    {
+        case js_ReplayOriginal: rp = jsReplayOriginalStr;  break;
+        case js_ReplayInstant:  rp = jsReplayInstantStr;   break;
+        default:
+            return nats_setError(NATS_INVALID_ARG, "invalid replay policy %d", (int)p);
+    }
+    IFOK(s, natsBuf_Append(buf, rp, -1));
+    IFOK(s, natsBuf_AppendByte(buf, '"'));
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_marshalConsumerCreateReq(natsBuffer **new_buf, const char *stream, jsConsumerConfig *cfg)
+{
+    natsStatus      s    = NATS_OK;
+    natsBuffer      *buf = NULL;
+
+    // If not set, set some defaults
+    if ((int) cfg->DeliverPolicy < 0)
+        cfg->DeliverPolicy = js_DeliverAll;
+    if ((int) cfg->AckPolicy < 0)
+        cfg->AckPolicy = js_AckExplicit;
+    if ((int) cfg->ReplayPolicy < 0)
+        cfg->ReplayPolicy = js_ReplayInstant;
+
+    s = natsBuf_Create(&buf, 256);
+    IFOK(s, natsBuf_Append(buf, "{\"stream_name\":\"", -1));
+    IFOK(s, natsBuf_Append(buf, stream, -1));
+    IFOK(s, natsBuf_Append(buf, "\",\"config\":{", -1));
+    // Marshal something that is always present first, so that the optionals
+    // will always start with a "," and we know that there will be a field before that.
+    IFOK(s, _marshalDeliverPolicy(buf, cfg->DeliverPolicy));
+    if ((s == NATS_OK) && !nats_IsStringEmpty(cfg->Name))
+    {
+        s = natsBuf_Append(buf, ",\"name\":\"", -1);
+        IFOK(s, natsBuf_Append(buf, cfg->Name, -1));
+        IFOK(s, natsBuf_AppendByte(buf, '"'));
+    }
+    if ((s == NATS_OK) && (!nats_IsStringEmpty(cfg->Description)))
+    {
+        s = natsBuf_Append(buf, ",\"description\":\"", -1);
+        IFOK(s, natsBuf_Append(buf, cfg->Description, -1));
+        IFOK(s, natsBuf_AppendByte(buf, '"'));
+    }
+    if ((s == NATS_OK) && (!nats_IsStringEmpty(cfg->Durable)))
+    {
+        s = natsBuf_Append(buf, ",\"durable_name\":\"", -1);
+        IFOK(s, natsBuf_Append(buf, cfg->Durable, -1));
+        IFOK(s, natsBuf_AppendByte(buf, '"'));
+    }
+    if ((s == NATS_OK) && (!nats_IsStringEmpty(cfg->DeliverSubject)))
+    {
+        s = natsBuf_Append(buf, ",\"deliver_subject\":\"", -1);
+        IFOK(s, natsBuf_Append(buf, cfg->DeliverSubject, -1));
+        IFOK(s, natsBuf_AppendByte(buf, '"'));
+    }
+    if ((s == NATS_OK) && (!nats_IsStringEmpty(cfg->DeliverGroup)))
+    {
+        s = natsBuf_Append(buf, ",\"deliver_group\":\"", -1);
+        IFOK(s, natsBuf_Append(buf, cfg->DeliverGroup, -1));
+        IFOK(s, natsBuf_AppendByte(buf, '"'));
+    }
+    if ((s == NATS_OK) && (cfg->OptStartSeq > 0))
+        s = nats_marshalLong(buf, true, "opt_start_seq", cfg->OptStartSeq);
+    if ((s == NATS_OK) && (cfg->OptStartTime > 0))
+        s = _marshalTimeUTC(buf, "opt_start_time", cfg->OptStartTime);
+    IFOK(s, _marshalAckPolicy(buf, cfg->AckPolicy));
+    if ((s == NATS_OK) && (cfg->AckWait > 0))
+        s = nats_marshalLong(buf, true, "ack_wait", cfg->AckWait);
+    if ((s == NATS_OK) && (cfg->MaxDeliver > 0))
+        s = nats_marshalLong(buf, true, "max_deliver", cfg->MaxDeliver);
+    if ((s == NATS_OK) && !nats_IsStringEmpty(cfg->FilterSubject))
+    {
+        s = natsBuf_Append(buf, ",\"filter_subject\":\"", -1);
+        IFOK(s, natsBuf_Append(buf, cfg->FilterSubject, -1));
+        IFOK(s, natsBuf_AppendByte(buf, '"'));
+    }
+    IFOK(s, _marshalReplayPolicy(buf, cfg->ReplayPolicy))
+    if ((s == NATS_OK) && (cfg->RateLimit > 0))
+        s = nats_marshalULong(buf, true, "rate_limit_bps", cfg->RateLimit);
+    if ((s == NATS_OK) && !nats_IsStringEmpty(cfg->SampleFrequency))
+    {
+        s = natsBuf_Append(buf, ",\"sample_freq\":\"", -1);
+        IFOK(s, natsBuf_Append(buf, cfg->SampleFrequency, -1));
+        IFOK(s, natsBuf_AppendByte(buf, '"'));
+    }
+    if ((s == NATS_OK) && (cfg->MaxWaiting > 0))
+        s = nats_marshalLong(buf, true, "max_waiting", cfg->MaxWaiting);
+    if ((s == NATS_OK) && (cfg->MaxAckPending > 0))
+        s = nats_marshalLong(buf, true, "max_ack_pending", cfg->MaxAckPending);
+    if ((s == NATS_OK) && cfg->FlowControl)
+        s = natsBuf_Append(buf, ",\"flow_control\":true", -1);
+    if ((s == NATS_OK) && (cfg->Heartbeat > 0))
+        s = nats_marshalLong(buf, true, "idle_heartbeat", cfg->Heartbeat);
+    if ((s == NATS_OK) && cfg->HeadersOnly)
+        s = natsBuf_Append(buf, ",\"headers_only\":true", -1);
+    if ((s == NATS_OK) && (cfg->MaxRequestBatch > 0))
+        s = nats_marshalLong(buf, true, "max_batch", cfg->MaxRequestBatch);
+    if ((s == NATS_OK) && (cfg->MaxRequestExpires > 0))
+        s = nats_marshalLong(buf, true, "max_expires", cfg->MaxRequestExpires);
+    if ((s == NATS_OK) && (cfg->MaxRequestMaxBytes > 0))
+        s = nats_marshalLong(buf, true, "max_bytes", cfg->MaxRequestMaxBytes);
+    if ((s == NATS_OK) && (cfg->InactiveThreshold > 0))
+        s = nats_marshalLong(buf, true, "inactive_threshold", cfg->InactiveThreshold);
+    if ((s == NATS_OK) && (cfg->BackOff != NULL) && (cfg->BackOffLen > 0))
+    {
+        char    tmp[32];
+        int     i;
+
+        s = natsBuf_Append(buf, ",\"backoff\":[", -1);
+        for (i=0; (s == NATS_OK) && (i<cfg->BackOffLen); i++)
+        {
+            snprintf(tmp, sizeof(tmp), "%" PRId64, cfg->BackOff[i]);
+            if (i > 0)
+                s = natsBuf_AppendByte(buf, ',');
+            IFOK(s, natsBuf_Append(buf, tmp, -1));
+        }
+        IFOK(s, natsBuf_AppendByte(buf, ']'));
+    }
+    if ((s == NATS_OK) && (cfg->Replicas > 0))
+        s = nats_marshalLong(buf, true, "num_replicas", cfg->Replicas);
+    if ((s == NATS_OK) && cfg->MemoryStorage)
+        s = natsBuf_Append(buf, ",\"mem_storage\":true", -1);
+    IFOK(s, natsBuf_Append(buf, "}}", -1));
+
+    if (s == NATS_OK)
+        *new_buf = buf;
+    else
+        natsBuf_Destroy(buf);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+void
+js_destroyConsumerConfig(jsConsumerConfig *cc)
+{
+    if (cc == NULL)
+        return;
+
+    NATS_FREE((char*) cc->Name);
+    NATS_FREE((char*) cc->Durable);
+    NATS_FREE((char*) cc->Description);
+    NATS_FREE((char*) cc->DeliverSubject);
+    NATS_FREE((char*) cc->DeliverGroup);
+    NATS_FREE((char*) cc->FilterSubject);
+    NATS_FREE((char*) cc->SampleFrequency);
+    NATS_FREE(cc->BackOff);
+    NATS_FREE(cc);
+}
+
+static natsStatus
+_unmarshalDeliverPolicy(nats_JSON *json, const char *fieldName, jsDeliverPolicy *dp)
+{
+    natsStatus  s    = NATS_OK;
+    char        *str = NULL;
+
+    s = nats_JSONGetStr(json, fieldName, &str);
+    if (str == NULL)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    if (strcmp(str, jsDeliverAllStr) == 0)
+        *dp = js_DeliverAll;
+    else if (strcmp(str, jsDeliverLastStr) == 0)
+        *dp = js_DeliverLast;
+    else if (strcmp(str, jsDeliverNewStr) == 0)
+        *dp = js_DeliverNew;
+    else if (strcmp(str, jsDeliverBySeqStr) == 0)
+        *dp = js_DeliverByStartSequence;
+    else if (strcmp(str, jsDeliverByTimeStr) == 0)
+        *dp = js_DeliverByStartTime;
+    else if (strcmp(str, jsDeliverLastPerSubjectStr) == 0)
+        *dp = js_DeliverLastPerSubject;
+    else
+        s = nats_setError(NATS_ERR, "unable to unmarshal delivery policy '%s'", str);
+
+    NATS_FREE(str);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_unmarshalAckPolicy(nats_JSON *json, const char *fieldName, jsAckPolicy *ap)
+{
+    natsStatus  s    = NATS_OK;
+    char        *str = NULL;
+
+    s = nats_JSONGetStr(json, fieldName, &str);
+    if (str == NULL)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    if (strcmp(str, jsAckNoneStr) == 0)
+        *ap = js_AckNone;
+    else if (strcmp(str, jsAckAllStr) == 0)
+        *ap = js_AckAll;
+    else if (strcmp(str, jsAckExplictStr) == 0)
+        *ap = js_AckExplicit;
+    else
+        s = nats_setError(NATS_ERR, "unable to unmarshal ack policy '%s'", str);
+
+    NATS_FREE(str);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_unmarshalReplayPolicy(nats_JSON *json, const char *fieldName, jsReplayPolicy *rp)
+{
+    natsStatus  s    = NATS_OK;
+    char        *str = NULL;
+
+    s = nats_JSONGetStr(json, fieldName, &str);
+    if (str == NULL)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    if (strcmp(str, jsReplayOriginalStr) == 0)
+        *rp = js_ReplayOriginal;
+    else if (strcmp(str, jsReplayInstantStr) == 0)
+        *rp = js_ReplayInstant;
+    else
+        s = nats_setError(NATS_ERR, "unable to unmarshal replay policy '%s'", str);
+
+    NATS_FREE(str);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_unmarshalConsumerConfig(nats_JSON *json, const char *fieldName, jsConsumerConfig **new_cc)
+{
+    natsStatus              s       = NATS_OK;
+    jsConsumerConfig        *cc     = NULL;
+    nats_JSON               *cjson  = NULL;
+
+    cc = (jsConsumerConfig*) NATS_CALLOC(1, sizeof(jsConsumerConfig));
+    if (cc == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    s = nats_JSONGetObject(json, fieldName, &cjson);
+    if ((s == NATS_OK) && (cjson != NULL))
+    {
+        s = nats_JSONGetStr(cjson, "durable_name", (char**) &(cc->Durable));
+        IFOK(s, nats_JSONGetStr(cjson, "name", (char**) &(cc->Name)));
+        IFOK(s, nats_JSONGetStr(cjson, "description", (char**) &(cc->Description)));
+        IFOK(s, nats_JSONGetStr(cjson, "deliver_subject", (char**) &(cc->DeliverSubject)));
+        IFOK(s, nats_JSONGetStr(cjson, "deliver_group", (char**) &(cc->DeliverGroup)));
+        IFOK(s, _unmarshalDeliverPolicy(cjson, "deliver_policy", &(cc->DeliverPolicy)));
+        IFOK(s, nats_JSONGetULong(cjson, "opt_start_seq", &(cc->OptStartSeq)));
+        IFOK(s, nats_JSONGetTime(cjson, "opt_start_time", &(cc->OptStartTime)));
+        IFOK(s, _unmarshalAckPolicy(cjson, "ack_policy", &(cc->AckPolicy)));
+        IFOK(s, nats_JSONGetLong(cjson, "ack_wait", &(cc->AckWait)));
+        IFOK(s, nats_JSONGetLong(cjson, "max_deliver", &(cc->MaxDeliver)));
+        IFOK(s, nats_JSONGetStr(cjson, "filter_subject", (char**) &(cc->FilterSubject)));
+        IFOK(s, _unmarshalReplayPolicy(cjson, "replay_policy", &(cc->ReplayPolicy)));
+        IFOK(s, nats_JSONGetULong(cjson, "rate_limit_bps", &(cc->RateLimit)));
+        IFOK(s, nats_JSONGetStr(cjson, "sample_freq", (char**) &(cc->SampleFrequency)));
+        IFOK(s, nats_JSONGetLong(cjson, "max_waiting", &(cc->MaxWaiting)));
+        IFOK(s, nats_JSONGetLong(cjson, "max_ack_pending", &(cc->MaxAckPending)));
+        IFOK(s, nats_JSONGetBool(cjson, "flow_control", &(cc->FlowControl)));
+        IFOK(s, nats_JSONGetLong(cjson, "idle_heartbeat", &(cc->Heartbeat)));
+        IFOK(s, nats_JSONGetBool(cjson, "headers_only", &(cc->HeadersOnly)));
+        IFOK(s, nats_JSONGetLong(cjson, "max_batch", &(cc->MaxRequestBatch)));
+        IFOK(s, nats_JSONGetLong(cjson, "max_expires", &(cc->MaxRequestExpires)));
+        IFOK(s, nats_JSONGetLong(cjson, "max_bytes", &(cc->MaxRequestMaxBytes)));
+        IFOK(s, nats_JSONGetLong(cjson, "inactive_threshold", &(cc->InactiveThreshold)));
+        IFOK(s, nats_JSONGetArrayLong(cjson, "backoff", &(cc->BackOff), &(cc->BackOffLen)));
+        IFOK(s, nats_JSONGetLong(cjson, "num_replicas", &(cc->Replicas)));
+        IFOK(s, nats_JSONGetBool(cjson, "mem_storage", &(cc->MemoryStorage)));
+    }
+
+    if (s == NATS_OK)
+        *new_cc = cc;
+    else
+        js_destroyConsumerConfig(cc);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_unmarshalSeqInfo(nats_JSON *json, const char *fieldName, jsSequenceInfo *si)
+{
+    natsStatus  s    = NATS_OK;
+    nats_JSON   *sij = NULL;
+
+    s = nats_JSONGetObject(json, fieldName, &sij);
+    if ((s == NATS_OK) && (sij != NULL))
+    {
+        IFOK(s, nats_JSONGetULong(sij, "consumer_seq", &(si->Consumer)));
+        IFOK(s, nats_JSONGetULong(sij, "stream_seq", &(si->Stream)));
+        IFOK(s, nats_JSONGetTime(sij, "last_active", &(si->Last)));
+    }
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+js_unmarshalConsumerInfo(nats_JSON *json, jsConsumerInfo **new_ci)
+{
+    natsStatus          s   = NATS_OK;
+    jsConsumerInfo      *ci = NULL;
+
+    ci = (jsConsumerInfo*) NATS_CALLOC(1, sizeof(jsConsumerInfo));
+    if (ci == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    s = nats_JSONGetStr(json, "stream_name", &(ci->Stream));
+    IFOK(s, nats_JSONGetStr(json, "name", &(ci->Name)));
+    IFOK(s, nats_JSONGetTime(json, "created", &(ci->Created)));
+    IFOK(s, _unmarshalConsumerConfig(json, "config", &(ci->Config)));
+    IFOK(s, _unmarshalSeqInfo(json, "delivered", &(ci->Delivered)));
+    IFOK(s, _unmarshalSeqInfo(json, "ack_floor", &(ci->AckFloor)));
+    IFOK(s, nats_JSONGetLong(json, "num_ack_pending", &(ci->NumAckPending)));
+    IFOK(s, nats_JSONGetLong(json, "num_redelivered", &(ci->NumRedelivered)));
+    IFOK(s, nats_JSONGetLong(json, "num_waiting", &(ci->NumWaiting)));
+    IFOK(s, nats_JSONGetULong(json, "num_pending", &(ci->NumPending)));
+    IFOK(s, _unmarshalClusterInfo(json, "cluster", &(ci->Cluster)));
+    IFOK(s, nats_JSONGetBool(json, "push_bound", &(ci->PushBound)));
+
+    if (s == NATS_OK)
+        *new_ci = ci;
+    else
+        jsConsumerInfo_Destroy(ci);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_unmarshalConsumerCreateOrGetResp(jsConsumerInfo **new_ci, natsMsg *resp, jsErrCode *errCode)
+{
+    nats_JSON           *json = NULL;
+    jsApiResponse       ar;
+    natsStatus          s;
+
+    s = js_unmarshalResponse(&ar, &json, resp);
+    if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    if (js_apiResponseIsErr(&ar))
+    {
+        if (errCode != NULL)
+            *errCode = (int) ar.Error.ErrCode;
+
+        if (ar.Error.ErrCode == JSConsumerNotFoundErr)
+            s = NATS_NOT_FOUND;
+        else
+            s = nats_setError(NATS_ERR, "%s", ar.Error.Description);
+    }
+    else if (new_ci != NULL)
+    {
+        // At this point we need to unmarshal the consumer info itself.
+        s = js_unmarshalConsumerInfo(json, new_ci);
+    }
+
+    js_freeApiRespContent(&ar);
+    nats_JSONDestroy(json);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+js_AddConsumer(jsConsumerInfo **new_ci, jsCtx *js,
+               const char *stream, jsConsumerConfig *cfg,
+               jsOptions *opts, jsErrCode *errCode)
+{
+    natsStatus          s       = NATS_OK;
+    natsBuffer          *buf    = NULL;
+    natsConnection      *nc     = NULL;
+    char                *subj   = NULL;
+    bool                freePfx = false;
+    natsMsg             *resp   = NULL;
+    jsOptions           o;
+
+    if (errCode != NULL)
+        *errCode = 0;
+
+    if (js == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    if (cfg == NULL)
+        return nats_setError(NATS_INVALID_ARG, "%s", jsErrConsumerConfigRequired);
+
+    s = _checkStreamName(stream);
+    if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    if (!nats_IsStringEmpty(cfg->Name))
+    {
+        if ((s = js_checkConsName(cfg->Name, false)) != NATS_OK)
+            return NATS_UPDATE_ERR_STACK(s);
+    }
+    if (!nats_IsStringEmpty(cfg->Durable))
+    {
+        if ((s = js_checkConsName(cfg->Durable, true)) != NATS_OK)
+            return NATS_UPDATE_ERR_STACK(s);
+    }
+
+    s = js_setOpts(&nc, &freePfx, js, opts, &o);
+    if (s == NATS_OK)
+    {
+        int res;
+
+        // If there is a Name in the config, this takes precedence.
+        if (!nats_IsStringEmpty(cfg->Name))
+        {
+            // No subject filter, use <stream>.<consumer name>
+            // otherwise, the filter subject goes at the end.
+            if (nats_IsStringEmpty(cfg->FilterSubject))
+                res = nats_asprintf(&subj, jsApiConsumerCreateExT,
+                                    js_lenWithoutTrailingDot(o.Prefix), o.Prefix,
+                                    stream, cfg->Name);
+            else
+                res = nats_asprintf(&subj, jsApiConsumerCreateExWithFilterT,
+                                    js_lenWithoutTrailingDot(o.Prefix), o.Prefix,
+                                    stream, cfg->Name, cfg->FilterSubject);
+        }
+        else if (nats_IsStringEmpty(cfg->Durable))
+            res = nats_asprintf(&subj, jsApiConsumerCreateT,
+                                js_lenWithoutTrailingDot(o.Prefix), o.Prefix,
+                                stream);
+        else
+            res = nats_asprintf(&subj, jsApiDurableCreateT,
+                                js_lenWithoutTrailingDot(o.Prefix), o.Prefix,
+                                stream, cfg->Durable);
+        if (res < 0)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+
+        if (freePfx)
+            NATS_FREE((char*) o.Prefix);
+    }
+    IFOK(s, _marshalConsumerCreateReq(&buf, stream, cfg));
+
+    // Send the request
+    IFOK_JSR(s, natsConnection_Request(&resp, nc, subj, natsBuf_Data(buf), natsBuf_Len(buf), o.Wait));
+
+    // If we got a response, check for error or return the consumer info result.
+    IFOK(s, _unmarshalConsumerCreateOrGetResp(new_ci, resp, errCode));
+
+    NATS_FREE(subj);
+    natsMsg_Destroy(resp);
+    natsBuf_Destroy(buf);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+js_UpdateConsumer(jsConsumerInfo **ci, jsCtx *js,
+                  const char *stream, jsConsumerConfig *cfg,
+                  jsOptions *opts, jsErrCode *errCode)
+{
+    natsStatus s;
+
+    if ((cfg != NULL) && nats_IsStringEmpty(cfg->Durable))
+        return nats_setError(NATS_INVALID_ARG, "%s", jsErrDurRequired);
+
+    s = js_AddConsumer(ci, js, stream, cfg, opts, errCode);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+js_GetConsumerInfo(jsConsumerInfo **new_ci, jsCtx *js,
+                   const char *stream, const char *consumer,
+                   jsOptions *opts, jsErrCode *errCode)
+{
+    natsStatus          s       = NATS_OK;
+    char                *subj   = NULL;
+    bool                freePfx = false;
+    natsConnection      *nc     = NULL;
+    natsMsg             *resp   = NULL;
+    jsOptions           o;
+
+    if (errCode != NULL)
+        *errCode = 0;
+
+    if ((js == NULL) || (new_ci == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    s = _checkStreamName(stream);
+    IFOK(s, js_checkConsName(consumer, false))
+    if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    s = js_setOpts(&nc, &freePfx, js, opts, &o);
+    if (s == NATS_OK)
+    {
+        if (nats_asprintf(&subj, jsApiConsumerInfoT,
+                          js_lenWithoutTrailingDot(o.Prefix), o.Prefix,
+                          stream, consumer) < 0 )
+        {
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+        }
+        if (freePfx)
+            NATS_FREE((char*) o.Prefix);
+    }
+
+    // Send the request
+    IFOK_JSR(s, natsConnection_Request(&resp, nc, subj, NULL, 0, o.Wait));
+
+    // If we got a response, check for error or return the consumer info result.
+    IFOK(s, _unmarshalConsumerCreateOrGetResp(new_ci, resp, errCode));
+
+    NATS_FREE(subj);
+    natsMsg_Destroy(resp);
+
+    if (s == NATS_NOT_FOUND)
+    {
+        nats_clearLastError();
+        return s;
+    }
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+js_DeleteConsumer(jsCtx *js, const char *stream, const char *consumer,
+                  jsOptions *opts, jsErrCode *errCode)
+{
+    natsStatus          s = NATS_OK;
+    char                *subj   = NULL;
+    bool                freePfx = false;
+    natsConnection      *nc     = NULL;
+    natsMsg             *resp   = NULL;
+    bool                success = false;
+    jsOptions           o;
+
+    if (errCode != NULL)
+        *errCode = 0;
+
+    if (js == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    s = _checkStreamName(stream);
+    IFOK(s, js_checkConsName(consumer, false))
+    if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    s = js_setOpts(&nc, &freePfx, js, opts, &o);
+    if (s == NATS_OK)
+    {
+        if (nats_asprintf(&subj, jsApiConsumerDeleteT,
+                          js_lenWithoutTrailingDot(o.Prefix), o.Prefix,
+                          stream, consumer) < 0 )
+        {
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+        }
+        if (freePfx)
+            NATS_FREE((char*) o.Prefix);
+    }
+
+    // Send the request
+    IFOK_JSR(s, natsConnection_Request(&resp, nc, subj, NULL, 0, o.Wait));
+
+    // If we got a response, check for error and success result.
+    IFOK(s, _unmarshalSuccessResp(&success, resp, errCode));
+    if ((s == NATS_OK) && !success)
+        s = nats_setError(s, "failed to delete consumer '%s'", consumer);
+
+    NATS_FREE(subj);
+    natsMsg_Destroy(resp);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+jsConsumerConfig_Init(jsConsumerConfig *cc)
+{
+    if (cc == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    memset(cc, 0, sizeof(jsConsumerConfig));
+    cc->AckPolicy       = -1;
+    cc->DeliverPolicy   = -1;
+    cc->ReplayPolicy    = -1;
+    return NATS_OK;
+}
+
+void
+jsConsumerInfo_Destroy(jsConsumerInfo *ci)
+{
+    if (ci == NULL)
+        return;
+
+    NATS_FREE(ci->Stream);
+    NATS_FREE(ci->Name);
+    js_destroyConsumerConfig(ci->Config);
+    _destroyClusterInfo(ci->Cluster);
+    NATS_FREE(ci);
+}
+
+static natsStatus
+_unmarshalConsumerInfoListResp(natsStrHash *m, apiPaged *page, natsMsg *resp, jsErrCode *errCode)
+{
+    nats_JSON           *json = NULL;
+    jsApiResponse       ar;
+    natsStatus          s;
+
+    s = js_unmarshalResponse(&ar, &json, resp);
+    if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    if (js_apiResponseIsErr(&ar))
+    {
+        if (errCode != NULL)
+            *errCode = (int) ar.Error.ErrCode;
+
+        // If the error code is JSStreamNotFoundErr then pick NATS_NOT_FOUND.
+        if (ar.Error.ErrCode == JSStreamNotFoundErr)
+            s = NATS_NOT_FOUND;
+        else
+            s = nats_setError(NATS_ERR, "%s", ar.Error.Description);
+    }
+    else
+    {
+        nats_JSON   **consumers  = NULL;
+        int         consumersLen = 0;
+
+        IFOK(s, nats_JSONGetLong(json, "total", &page->total));
+        IFOK(s, nats_JSONGetLong(json, "offset", &page->offset));
+        IFOK(s, nats_JSONGetLong(json, "limit", &page->limit));
+        IFOK(s, nats_JSONGetArrayObject(json, "consumers", &consumers, &consumersLen));
+        if ((s == NATS_OK) && (consumers != NULL))
+        {
+            int i;
+
+            for (i=0; (s == NATS_OK) && (i<consumersLen); i++)
+            {
+                jsConsumerInfo *ci    = NULL;
+                jsConsumerInfo *oci   = NULL;
+
+                s = js_unmarshalConsumerInfo(consumers[i], &ci);
+                if ((s == NATS_OK) && ((ci->Config == NULL) || nats_IsStringEmpty(ci->Name)))
+                    s = nats_setError(NATS_ERR, "%s", "consumer name missing");
+                IFOK(s, natsStrHash_SetEx(m, (char*) ci->Name, true, true, ci, (void**) &oci));
+                if (oci != NULL)
+                    jsConsumerInfo_Destroy(oci);
+            }
+            // Free the array of JSON objects that was allocated by nats_JSONGetArrayObject.
+            NATS_FREE(consumers);
+        }
+    }
+    js_freeApiRespContent(&ar);
+    nats_JSONDestroy(json);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+js_Consumers(jsConsumerInfoList **new_list, jsCtx *js, const char *stream, jsOptions *opts, jsErrCode *errCode)
+{
+    natsStatus          s       = NATS_OK;
+    natsBuffer          *buf    = NULL;
+    char                *subj   = NULL;
+    natsMsg             *resp   = NULL;
+    natsConnection      *nc     = NULL;
+    bool                freePfx = false;
+    bool                done    = false;
+    int64_t             offset  = 0;
+    int64_t             start   = 0;
+    int64_t             timeout = 0;
+    natsStrHash         *cons   = NULL;
+    jsConsumerInfoList  *list   = NULL;
+    jsOptions           o;
+    apiPaged            page;
+
+    if (errCode != NULL)
+        *errCode = 0;
+
+    if ((new_list == NULL) || (js == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    s = _checkStreamName(stream);
+    if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    s = js_setOpts(&nc, &freePfx, js, opts, &o);
+    if (s == NATS_OK)
+    {
+        if (nats_asprintf(&subj, jsApiConsumerListT, js_lenWithoutTrailingDot(o.Prefix), o.Prefix, stream) < 0)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+
+        if (freePfx)
+            NATS_FREE((char*) o.Prefix);
+    }
+    IFOK(s, natsBuf_Create(&buf, 16));
+    IFOK(s, natsStrHash_Create(&cons, 16));
+
+    if (s == NATS_OK)
+    {
+        memset(&page, 0, sizeof(apiPaged));
+        start = nats_Now();
+    }
+
+    do
+    {
+        IFOK(s, natsBuf_AppendByte(buf, '{'));
+        IFOK(s, nats_marshalLong(buf, false, "offset", offset));
+        IFOK(s, natsBuf_AppendByte(buf, '}'));
+
+        timeout = o.Wait - (nats_Now() - start);
+        if (timeout <= 0)
+            s = NATS_TIMEOUT;
+
+        // Send the request
+        IFOK_JSR(s, natsConnection_Request(&resp, nc, subj, natsBuf_Data(buf), natsBuf_Len(buf), timeout));
+
+        IFOK(s, _unmarshalConsumerInfoListResp(cons, &page, resp, errCode));
+        if (s == NATS_OK)
+        {
+            offset += page.limit;
+            done = offset >= page.total;
+            if (!done)
+            {
+                // Reset the request buffer, we may be able to reuse.
+                natsBuf_Reset(buf);
+            }
+        }
+        natsMsg_Destroy(resp);
+        resp = NULL;
+    }
+    while ((s == NATS_OK) && !done);
+
+    natsBuf_Destroy(buf);
+    NATS_FREE(subj);
+
+    if (s == NATS_OK)
+    {
+        if (natsStrHash_Count(cons) == 0)
+        {
+            natsStrHash_Destroy(cons);
+            return NATS_NOT_FOUND;
+        }
+        list = (jsConsumerInfoList*) NATS_CALLOC(1, sizeof(jsConsumerInfoList));
+        if (list == NULL)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+        else
+        {
+            list->List = (jsConsumerInfo**) NATS_CALLOC(natsStrHash_Count(cons), sizeof(jsConsumerInfo*));
+            if (list->List == NULL)
+            {
+                NATS_FREE(list);
+                list = NULL;
+                s = nats_setDefaultError(NATS_NO_MEMORY);
+            }
+            else
+            {
+                natsStrHashIter iter;
+                void            *val = NULL;
+
+                natsStrHashIter_Init(&iter, cons);
+                while (natsStrHashIter_Next(&iter, NULL, (void**) &val))
+                {
+                    jsConsumerInfo *ci = (jsConsumerInfo*) val;
+
+                    list->List[list->Count++] = ci;
+                    natsStrHashIter_RemoveCurrent(&iter);
+                }
+                natsStrHashIter_Done(&iter);
+
+                *new_list = list;
+            }
+        }
+    }
+    if (s != NATS_OK)
+    {
+        natsStrHashIter iter;
+        void            *val = NULL;
+
+        natsStrHashIter_Init(&iter, cons);
+        while (natsStrHashIter_Next(&iter, NULL, (void**) &val))
+        {
+            jsStreamInfo *si = (jsStreamInfo*) val;
+
+            natsStrHashIter_RemoveCurrent(&iter);
+            jsStreamInfo_Destroy(si);
+        }
+        natsStrHashIter_Done(&iter);
+    }
+    natsStrHash_Destroy(cons);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+void
+jsConsumerInfoList_Destroy(jsConsumerInfoList *list)
+{
+    int i;
+
+    if (list == NULL)
+        return;
+
+    for (i=0; i<list->Count; i++)
+        jsConsumerInfo_Destroy(list->List[i]);
+
+    NATS_FREE(list->List);
+    NATS_FREE(list);
+}
+
+natsStatus
+js_ConsumerNames(jsConsumerNamesList **new_list, jsCtx *js, const char *stream, jsOptions *opts, jsErrCode *errCode)
+{
+    natsStatus          s       = NATS_OK;
+    natsBuffer          *buf    = NULL;
+    char                *subj   = NULL;
+    natsMsg             *resp   = NULL;
+    natsConnection      *nc     = NULL;
+    bool                freePfx = false;
+    bool                done    = false;
+    int64_t             offset  = 0;
+    int64_t             start   = 0;
+    int64_t             timeout = 0;
+    natsStrHash         *names  = NULL;
+    jsConsumerNamesList *list   = NULL;
+    jsOptions           o;
+    apiPaged            page;
+
+    if (errCode != NULL)
+        *errCode = 0;
+
+    if ((new_list == NULL) || (js == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    s = _checkStreamName(stream);
+    if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    s = js_setOpts(&nc, &freePfx, js, opts, &o);
+    if (s == NATS_OK)
+    {
+        if (nats_asprintf(&subj, jsApiConsumerNamesT, js_lenWithoutTrailingDot(o.Prefix), o.Prefix, stream) < 0)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+
+        if (freePfx)
+            NATS_FREE((char*) o.Prefix);
+    }
+    IFOK(s, natsBuf_Create(&buf, 16));
+    IFOK(s, natsStrHash_Create(&names, 16));
+
+    if (s == NATS_OK)
+    {
+        memset(&page, 0, sizeof(apiPaged));
+        start = nats_Now();
+    }
+
+    do
+    {
+        IFOK(s, natsBuf_AppendByte(buf, '{'));
+        IFOK(s, nats_marshalLong(buf, false, "offset", offset));
+        IFOK(s, natsBuf_AppendByte(buf, '}'));
+
+        timeout = o.Wait - (nats_Now() - start);
+        if (timeout <= 0)
+            s = NATS_TIMEOUT;
+
+        // Send the request
+        IFOK_JSR(s, natsConnection_Request(&resp, nc, subj, natsBuf_Data(buf), natsBuf_Len(buf), timeout));
+
+        IFOK(s, _unmarshalNamesListResp("consumers", names, &page, resp, errCode));
+        if (s == NATS_OK)
+        {
+            offset += page.limit;
+            done = offset >= page.total;
+            if (!done)
+            {
+                // Reset the request buffer, we may be able to reuse.
+                natsBuf_Reset(buf);
+            }
+        }
+        natsMsg_Destroy(resp);
+        resp = NULL;
+    }
+    while ((s == NATS_OK) && !done);
+
+    natsBuf_Destroy(buf);
+    NATS_FREE(subj);
+
+    if (s == NATS_OK)
+    {
+        if (natsStrHash_Count(names) == 0)
+        {
+            natsStrHash_Destroy(names);
+            return NATS_NOT_FOUND;
+        }
+        list = (jsConsumerNamesList*) NATS_CALLOC(1, sizeof(jsConsumerNamesList));
+        if (list == NULL)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+        else
+        {
+            list->List = (char**) NATS_CALLOC(natsStrHash_Count(names), sizeof(char*));
+            if (list->List == NULL)
+                s = nats_setDefaultError(NATS_NO_MEMORY);
+            else
+            {
+                natsStrHashIter iter;
+                char            *sname = NULL;
+
+                natsStrHashIter_Init(&iter, names);
+                while ((s == NATS_OK) && natsStrHashIter_Next(&iter, &sname, NULL))
+                {
+                    char *copyName = NULL;
+
+                    DUP_STRING(s, copyName, sname);
+                    if (s == NATS_OK)
+                    {
+                        list->List[list->Count++] = copyName;
+                        natsStrHashIter_RemoveCurrent(&iter);
+                    }
+                }
+                natsStrHashIter_Done(&iter);
+            }
+            if (s == NATS_OK)
+                *new_list = list;
+            else
+                jsConsumerNamesList_Destroy(list);
+        }
+    }
+    natsStrHash_Destroy(names);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+void
+jsConsumerNamesList_Destroy(jsConsumerNamesList *list)
+{
+    int i;
+
+    if (list == NULL)
+        return;
+
+    for (i=0; i<list->Count; i++)
+        NATS_FREE(list->List[i]);
+
+    NATS_FREE(list->List);
+    NATS_FREE(list);
+}
+
+natsStatus
+js_cloneConsumerConfig(jsConsumerConfig *org, jsConsumerConfig **clone)
+{
+    natsStatus          s   = NATS_OK;
+    jsConsumerConfig    *c  = NULL;
+
+    *clone = NULL;
+    if (org == NULL)
+        return NATS_OK;
+
+    c = (jsConsumerConfig*) NATS_CALLOC(1, sizeof(jsConsumerConfig));
+    if (c == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    memcpy(c, org, sizeof(jsConsumerConfig));
+
+    // Need to first set all pointers to NULL in case we fail to dup and then
+    // do the cleanup.
+    c->Name = NULL;
+    c->Durable = NULL;
+    c->Description = NULL;
+    c->BackOff = NULL;
+    c->FilterSubject = NULL;
+    c->SampleFrequency = NULL;
+    c->DeliverSubject = NULL;
+    c->DeliverGroup = NULL;
+    // Now dup all strings, etc...
+    IF_OK_DUP_STRING(s, c->Name, org->Name);
+    IF_OK_DUP_STRING(s, c->Durable, org->Durable);
+    IF_OK_DUP_STRING(s, c->Description, org->Description);
+    IF_OK_DUP_STRING(s, c->FilterSubject, org->FilterSubject);
+    IF_OK_DUP_STRING(s, c->SampleFrequency, org->SampleFrequency);
+    IF_OK_DUP_STRING(s, c->DeliverSubject, org->DeliverSubject);
+    IF_OK_DUP_STRING(s, c->DeliverGroup, org->DeliverGroup);
+    if ((s == NATS_OK) && (org->BackOff != NULL) && (org->BackOffLen > 0))
+    {
+        c->BackOff = (int64_t*) NATS_CALLOC(org->BackOffLen, sizeof(int64_t));
+        if (c->BackOff == NULL)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+        else
+            memcpy(c->BackOff, org->BackOff, org->BackOffLen*sizeof(int64_t));
+    }
+    if (s == NATS_OK)
+        *clone = c;
+    else
+        js_destroyConsumerConfig(c);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
diff --git a/src/kv.c b/src/kv.c
new file mode 100644 (file)
index 0000000..38539f2
--- /dev/null
+++ b/src/kv.c
@@ -0,0 +1,1399 @@
+// Copyright 2021-2022 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include <ctype.h>
+
+#include "natsp.h"
+#include "kv.h"
+#include "mem.h"
+#include "util.h"
+#include "js.h"
+#include "conn.h"
+#include "sub.h"
+
+static const char *kvBucketNameTmpl  = "KV_%s";
+static const char *kvSubjectsTmpl    = "$KV.%s.>";
+static const char *kvSubjectsPreTmpl = "$KV.%s.";
+
+#define KV_WATCH_FOR_EVER (int64_t)(0x7FFFFFFFFFFFFFFF)
+
+#define DEFINE_BUF_FOR_SUBJECT \
+char        buffer[128];    \
+natsBuffer  buf;
+
+#define USE_JS_PREFIX   true
+#define KEY_NAME_ONLY   false
+
+#define BUILD_SUBJECT(p) \
+s = natsBuf_InitWithBackend(&buf, buffer, 0, sizeof(buffer)); \
+if ((p) && kv->useJSPrefix) \
+{ \
+    IFOK(s, natsBuf_Append(&buf, kv->js->opts.Prefix, -1)); \
+    IFOK(s, natsBuf_AppendByte(&buf, '.')); \
+} \
+IFOK(s, natsBuf_Append(&buf, kv->pre, -1)); \
+IFOK(s, natsBuf_Append(&buf, key, -1)); \
+IFOK(s, natsBuf_AppendByte(&buf, 0));
+
+#define KV_DEFINE_LIST \
+kvEntry         *e = NULL;                  \
+kvEntry         *h = NULL;                  \
+kvEntry         *t = NULL;                  \
+int             n  = 0;                     \
+int64_t         timeout = KV_WATCH_FOR_EVER;\
+int64_t         start;                      \
+int             i;
+
+#define KV_GATHER_LIST \
+start = nats_Now();                                 \
+while (s == NATS_OK)                                \
+{                                                   \
+    s = kvWatcher_Next(&e, w, timeout);             \
+    if (s == NATS_OK)                               \
+    {                                               \
+        if (e == NULL)                              \
+            break;                                  \
+        if (t != NULL)                              \
+            t->next = e;                            \
+        else                                        \
+            h = e;                                  \
+        t = e;                                      \
+        n++;                                        \
+        timeout -= (nats_Now() - start);            \
+        if (timeout <= 0)                           \
+            s = nats_setDefaultError(NATS_TIMEOUT); \
+    }                                               \
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// kvStore management APIs
+//////////////////////////////////////////////////////////////////////////////
+
+natsStatus
+kvConfig_Init(kvConfig *cfg)
+{
+    if (cfg == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    memset(cfg, 0, sizeof(kvConfig));
+    return NATS_OK;
+}
+
+static bool
+validBucketName(const char *bucket)
+{
+    int     i;
+    char    c;
+
+    if (nats_IsStringEmpty(bucket))
+        return false;
+
+    for (i=0; i<(int)strlen(bucket); i++)
+    {
+        c = bucket[i];
+        if ((isalnum(c) == 0) && (c != '_') && (c != '-'))
+            return false;
+    }
+    return true;
+}
+
+static void
+_freeKV(kvStore *kv)
+{
+    jsCtx *js = NULL;
+
+    if (kv == NULL)
+        return;
+
+    js = kv->js;
+    NATS_FREE(kv->bucket);
+    NATS_FREE(kv->stream);
+    NATS_FREE(kv->pre);
+    natsMutex_Destroy(kv->mu);
+    NATS_FREE(kv);
+    js_release(js);
+}
+
+static void
+_retainKV(kvStore *kv)
+{
+    natsMutex_Lock(kv->mu);
+    kv->refs++;
+    natsMutex_Unlock(kv->mu);
+}
+
+static void
+_releaseKV(kvStore *kv)
+{
+    bool doFree;
+
+    if (kv == NULL)
+        return;
+
+    natsMutex_Lock(kv->mu);
+    doFree = (--(kv->refs) == 0);
+    natsMutex_Unlock(kv->mu);
+
+    if (doFree)
+        _freeKV(kv);
+}
+
+void
+kvStore_Destroy(kvStore *kv)
+{
+    _releaseKV(kv);
+}
+
+static natsStatus
+_createKV(kvStore **new_kv, jsCtx *js, const char *bucket)
+{
+    natsStatus  s   = NATS_OK;
+    kvStore     *kv = NULL;
+
+    if (!validBucketName(bucket))
+        return nats_setError(NATS_INVALID_ARG, "%s", kvErrInvalidBucketName);
+
+    kv = (kvStore*) NATS_CALLOC(1, sizeof(kvStore));
+    if (kv == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    kv->refs = 1;
+    s = natsMutex_Create(&(kv->mu));
+    IF_OK_DUP_STRING(s, kv->bucket, bucket);
+    if ((s == NATS_OK) && (nats_asprintf(&(kv->stream), kvBucketNameTmpl, bucket) < 0))
+        s = nats_setDefaultError(NATS_NO_MEMORY);
+    if ((s == NATS_OK) && (nats_asprintf(&(kv->pre), kvSubjectsPreTmpl, bucket) < 0))
+        s = nats_setDefaultError(NATS_NO_MEMORY);
+
+    if (s == NATS_OK)
+    {
+        kv->useJSPrefix = (strcmp(js->opts.Prefix, jsDefaultAPIPrefix) != 0 ? true : false);
+        kv->js = js;
+        js_retain(js);
+        *new_kv = kv;
+    }
+    else
+        _freeKV(kv);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static bool
+_sameStrings(const char *s1, const char *s2)
+{
+    bool s1Empty = nats_IsStringEmpty(s1);
+    bool s2Empty = nats_IsStringEmpty(s2);
+
+    // Same if both empty.
+    if (s1Empty && s2Empty)
+        return true;
+
+    // Not same if one is empty while other is not.
+    if ((s1Empty && !s2Empty) || (!s1Empty && s2Empty))
+        return false;
+
+    // Return result of comparison of s1 and s2
+    return (strcmp(s1, s2) == 0 ? true : false);
+}
+
+static bool
+_sameStreamCfg(jsStreamConfig *oc, jsStreamConfig *nc)
+{
+    // Check some of the stream's configuration properties only,
+    // the ones that we set when creating a KV stream.
+    if (!_sameStrings(oc->Description, nc->Description))
+        return false;
+    if (oc->SubjectsLen != nc->SubjectsLen)
+        return false;
+    if (!_sameStrings(oc->Subjects[0], nc->Subjects[0]))
+        return false;
+    if (oc->MaxMsgsPerSubject != nc->MaxMsgsPerSubject)
+        return false;
+    if (oc->MaxBytes != nc->MaxBytes)
+        return false;
+    if (oc->MaxAge != nc->MaxAge)
+        return false;
+    if (oc->MaxMsgSize != nc->MaxMsgSize)
+        return false;
+    if (oc->Storage != nc->Storage)
+        return false;
+    if (oc->Replicas != nc->Replicas)
+        return false;
+    if (oc->AllowRollup != nc->AllowRollup)
+        return false;
+    if (oc->DenyDelete != nc->DenyDelete)
+        return false;
+    return true;
+}
+
+natsStatus
+js_CreateKeyValue(kvStore **new_kv, jsCtx *js, kvConfig *cfg)
+{
+    natsStatus      s;
+    int64_t         history = 1;
+    int64_t         replicas= 1;
+    kvStore         *kv     = NULL;
+    char            *subject= NULL;
+    jsStreamInfo    *si     = NULL;
+    jsStreamConfig  sc;
+
+    if ((new_kv == NULL) || (js == NULL) || (cfg == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    s = _createKV(&kv, js, cfg->Bucket);
+    if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    if (cfg->History > 0)
+    {
+        if (cfg->History > kvMaxHistory)
+            s = nats_setError(NATS_INVALID_ARG, "%s %d", kvErrHistoryTooLarge, kvMaxHistory);
+        else
+            history = (int64_t) cfg->History;
+    }
+    if (s == NATS_OK)
+    {
+        if (cfg->Replicas > 0)
+            replicas = cfg->Replicas;
+
+        if (nats_asprintf(&subject, kvSubjectsTmpl, kv->bucket) < 0)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+    }
+    if (s == NATS_OK)
+    {
+        int64_t     maxBytes    = (cfg->MaxBytes == 0 ? -1 : cfg->MaxBytes);
+        int32_t     maxMsgSize  = (cfg->MaxValueSize == 0 ? -1 : cfg->MaxValueSize);
+        jsErrCode   jerr        = 0;
+
+        jsStreamConfig_Init(&sc);
+        sc.Name = kv->stream;
+        sc.Description = cfg->Description;
+        sc.Subjects = (const char*[1]){subject};
+        sc.SubjectsLen = 1;
+        sc.MaxMsgsPerSubject = history;
+        sc.MaxBytes = maxBytes;
+        sc.MaxAge = cfg->TTL;
+        sc.MaxMsgSize = maxMsgSize;
+        sc.Storage = cfg->StorageType;
+        sc.Replicas = replicas;
+        sc.AllowRollup = true;
+        sc.DenyDelete = true;
+        sc.AllowDirect = true;
+        sc.RePublish = cfg->RePublish;
+
+        // If connecting to a v2.7.2+, create with discard new policy
+        if (natsConn_srvVersionAtLeast(kv->js->nc, 2, 7, 2))
+            sc.Discard = js_DiscardNew;
+
+        s = js_AddStream(&si, js, &sc, NULL, &jerr);
+        if ((s != NATS_OK) && (jerr == JSStreamNameExistErr))
+        {
+            jsStreamInfo_Destroy(si);
+            si = NULL;
+
+            nats_clearLastError();
+            s = js_GetStreamInfo(&si, js, sc.Name, NULL, NULL);
+            if (s == NATS_OK)
+            {
+                si->Config->Discard = sc.Discard;
+                if (_sameStreamCfg(si->Config, &sc))
+                {
+                    jsStreamInfo_Destroy(si);
+                    si = NULL;
+                    s = js_UpdateStream(&si, js, &sc, NULL, NULL);
+                }
+                else
+                    s = nats_setError(NATS_ERR, "%s",
+                        "Existing configuration is different");
+            }
+        }
+        if (s == NATS_OK)
+        {
+            // If the stream allow direct get message calls, then we will do so.
+            kv->useDirect = si->Config->AllowDirect;
+        }
+        jsStreamInfo_Destroy(si);
+    }
+    if (s == NATS_OK)
+        *new_kv = kv;
+    else
+        _freeKV(kv);
+
+    NATS_FREE(subject);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+js_KeyValue(kvStore **new_kv, jsCtx *js, const char *bucket)
+{
+    natsStatus      s;
+    kvStore         *kv     = NULL;
+    jsStreamInfo    *si     = NULL;
+
+    if ((new_kv == NULL) || (js == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    s = _createKV(&kv, js, bucket);
+    if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    s = js_GetStreamInfo(&si, js, kv->stream, NULL, NULL);
+    if (s == NATS_OK)
+    {
+        // If the stream allow direct get message calls, then we will do so.
+        kv->useDirect = si->Config->AllowDirect;
+
+        // Do some quick sanity checks that this is a correctly formed stream for KV.
+        // Max msgs per subject should be > 0.
+        if (si->Config->MaxMsgsPerSubject < 1)
+            s = nats_setError(NATS_INVALID_ARG, "%s", kvErrBadBucket);
+
+        jsStreamInfo_Destroy(si);
+    }
+
+    if (s == NATS_OK)
+        *new_kv = kv;
+    else
+    {
+        _freeKV(kv);
+        if (s == NATS_NOT_FOUND)
+            return s;
+    }
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+js_DeleteKeyValue(jsCtx *js, const char *bucket)
+{
+    natsStatus  s;
+    char        *stream = NULL;
+
+    if (js == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    if (!validBucketName(bucket))
+        return nats_setError(NATS_INVALID_ARG, "%s", kvErrBadBucket);
+
+    if (nats_asprintf(&stream, kvBucketNameTmpl, bucket) < 0)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    s = js_DeleteStream(js, (const char*) stream, NULL, NULL);
+
+    NATS_FREE(stream);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// kvStore APIs
+//////////////////////////////////////////////////////////////////////////////
+
+static bool
+validKey(const char *key)
+{
+    int     i;
+    char    c;
+    int     last;
+
+    if (nats_IsStringEmpty(key))
+        return false;
+
+    last = (int) strlen(key);
+    for (i=0; i<last; i++)
+    {
+        c = key[i];
+        if ((c == '.') && ((i == 0) || (i == last-1) || (key[i-1] == '.')))
+        {
+            return false;
+        }
+        else if ((isalnum(c) == 0) && (c != '.') && (c != '_') && (c != '-')
+                    && (c != '/') && (c != '\\') && (c != '='))
+        {
+            return false;
+        }
+    }
+    return true;
+}
+
+static natsStatus
+_createEntry(kvEntry **new_entry, kvStore *kv, natsMsg **msg)
+{
+    kvEntry *e = NULL;
+
+    e = (kvEntry*) NATS_CALLOC(1, sizeof(kvEntry));
+    if (e == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    _retainKV(kv);
+    e->kv  = kv;
+    e->msg = *msg;
+    e->key = e->msg->subject+(int)strlen(kv->pre);
+    e->op  = kvOp_Put;
+
+    // Indicate that we took ownership of the message
+    *msg = NULL;
+    *new_entry = e;
+
+    return NATS_OK;
+}
+
+static kvOperation
+_getKVOp(natsMsg *msg)
+{
+    const char  *val = NULL;
+    kvOperation op   = kvOp_Put;
+
+    if (natsMsgHeader_Get(msg, kvOpHeader, &val) == NATS_OK)
+    {
+        if (strcmp(val, kvOpDeleteStr) == 0)
+            op = kvOp_Delete;
+        else if (strcmp(val, kvOpPurgeStr) == 0)
+            op = kvOp_Purge;
+    }
+    return op;
+}
+
+static natsStatus
+_getEntry(kvEntry **new_entry, bool *deleted, kvStore *kv, const char *key, uint64_t revision)
+{
+    natsStatus  s       = NATS_OK;
+    natsMsg     *msg    = NULL;
+    kvEntry     *e      = NULL;
+    DEFINE_BUF_FOR_SUBJECT;
+    jsDirectGetMsgOptions dgo;
+
+    *new_entry = NULL;
+    *deleted   = false;
+
+    if (!validKey(key))
+        return nats_setError(NATS_INVALID_ARG, "%s", kvErrInvalidKey);
+
+    BUILD_SUBJECT(KEY_NAME_ONLY);
+
+    if (kv->useDirect)
+    {
+        jsDirectGetMsgOptions_Init(&dgo);
+        if (revision == 0)
+            dgo.LastBySubject = natsBuf_Data(&buf);
+        else
+            dgo.Sequence = revision;
+
+        IFOK(s, js_DirectGetMsg(&msg, kv->js, kv->stream, NULL, &dgo));
+    }
+    else if (revision == 0)
+    {
+        IFOK(s, js_GetLastMsg(&msg, kv->js, kv->stream, natsBuf_Data(&buf), NULL, NULL));
+    }
+    else
+    {
+        IFOK(s, js_GetMsg(&msg, kv->js, kv->stream, revision, NULL, NULL));
+    }
+    // If a sequence was provided, just make sure that the retrieved
+    // message subject matches the request.
+    if (revision != 0)
+        IFOK(s, (strcmp(natsMsg_GetSubject(msg), natsBuf_Data(&buf)) == 0 ? NATS_OK : NATS_NOT_FOUND));
+    IFOK(s, _createEntry(&e, kv, &msg));
+    if (s == NATS_OK)
+        e->op = _getKVOp(e->msg);
+
+    natsBuf_Cleanup(&buf);
+    natsMsg_Destroy(msg);
+
+    if (s == NATS_OK)
+    {
+        if ((e->op == kvOp_Delete) || (e->op == kvOp_Purge))
+            *deleted = true;
+        *new_entry = e;
+    }
+    else
+    {
+        kvEntry_Destroy(e);
+
+        if (s == NATS_NOT_FOUND)
+        {
+            nats_clearLastError();
+            return s;
+        }
+    }
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+_get(kvEntry **new_entry, kvStore *kv, const char *key, uint64_t revision)
+{
+    natsStatus  s;
+    bool        deleted = false;
+
+    if ((new_entry == NULL) || (kv == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    s = _getEntry(new_entry, &deleted, kv, key, revision);
+    if (s == NATS_OK)
+    {
+        if (deleted)
+        {
+            kvEntry_Destroy(*new_entry);
+            *new_entry = NULL;
+            return NATS_NOT_FOUND;
+        }
+    }
+    else if (s == NATS_NOT_FOUND)
+        return s;
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+kvStore_Get(kvEntry **new_entry, kvStore *kv, const char *key)
+{
+    natsStatus s = _get(new_entry, kv, key, 0);
+    // We don't want stack trace for this error
+    if (s == NATS_NOT_FOUND)
+        return s;
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+kvStore_GetRevision(kvEntry **new_entry, kvStore *kv, const char *key, uint64_t revision)
+{
+    natsStatus s;
+
+    if (revision <= 0)
+        return nats_setError(NATS_INVALID_ARG, "%s", kvErrInvalidRevision);
+
+    s = _get(new_entry, kv, key, revision);
+    // We don't want stack trace for this error
+    if (s == NATS_NOT_FOUND)
+        return s;
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_putEntry(uint64_t *rev, kvStore *kv, jsPubOptions *po, const char *key, const void *data, int len)
+{
+    natsStatus  s       = NATS_OK;
+    jsPubAck    *pa     = NULL;
+    jsPubAck    **ppa   = NULL;
+    DEFINE_BUF_FOR_SUBJECT;
+
+    if (rev != NULL)
+    {
+        *rev = 0;
+        ppa = &pa;
+    }
+
+    if (kv == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    if (!validKey(key))
+        return nats_setError(NATS_INVALID_ARG, "%s", kvErrInvalidKey);
+
+    BUILD_SUBJECT(USE_JS_PREFIX);
+    IFOK(s, js_Publish(ppa, kv->js, natsBuf_Data(&buf), data, len, po, NULL));
+
+    if ((s == NATS_OK) && (rev != NULL))
+        *rev = pa->Sequence;
+
+    natsBuf_Cleanup(&buf);
+    jsPubAck_Destroy(pa);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+kvStore_Put(uint64_t *rev, kvStore *kv, const char *key, const void *data, int len)
+{
+    natsStatus s;
+
+    s = _putEntry(rev, kv, NULL, key, data, len);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+kvStore_PutString(uint64_t *rev, kvStore *kv, const char *key, const char *data)
+{
+    natsStatus  s;
+    int         l = (data == NULL ? 0 : (int) strlen(data));
+
+    s = kvStore_Put(rev, kv, key, (const void*) data, l);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+kvStore_Create(uint64_t *rev, kvStore *kv, const char *key, const void *data, int len)
+{
+    natsStatus s;
+    natsStatus ls;
+    kvEntry    *e = NULL;
+    bool       deleted = false;
+
+    if (kv == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    s = kvStore_Update(rev, kv, key, data, len, 0);
+    if (s == NATS_OK)
+        return s;
+
+    // Since we have tombstones for DEL ops for watchers, this could be from that
+    // so we need to double check.
+    ls = _getEntry(&e, &deleted, kv, key, 0);
+    if (ls == NATS_OK)
+    {
+        if (deleted)
+            s = kvStore_Update(rev, kv, key, data, len, kvEntry_Revision(e));
+
+        kvEntry_Destroy(e);
+    }
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+kvStore_CreateString(uint64_t *rev, kvStore *kv, const char *key, const char *data)
+{
+    natsStatus s = kvStore_Create(rev, kv, key, (const void*) data, (int) strlen(data));
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+kvStore_Update(uint64_t *rev, kvStore *kv, const char *key, const void *data, int len, uint64_t last)
+{
+    natsStatus      s;
+    jsPubOptions    po;
+
+    jsPubOptions_Init(&po);
+    if (last == 0)
+        po.ExpectNoMessage = true;
+    else
+        po.ExpectLastSubjectSeq = last;
+    s = _putEntry(rev, kv, &po, key, data, len);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+kvStore_UpdateString(uint64_t *rev, kvStore *kv, const char *key, const char *data, uint64_t last)
+{
+    natsStatus s = kvStore_Update(rev, kv, key, (const void*) data, (int) strlen(data), last);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_delete(kvStore *kv, const char *key, bool purge, kvPurgeOptions *opts)
+{
+    natsStatus      s;
+    natsMsg         *msg = NULL;
+    jsPubOptions    o;
+    jsPubOptions    *po = NULL;
+    DEFINE_BUF_FOR_SUBJECT;
+
+    if (kv == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    if (!validKey(key))
+        return nats_setError(NATS_INVALID_ARG, "%s", kvErrInvalidKey);
+
+    BUILD_SUBJECT(USE_JS_PREFIX);
+    IFOK(s, natsMsg_Create(&msg, natsBuf_Data(&buf), NULL, NULL, 0));
+    if (s == NATS_OK)
+    {
+        if (purge)
+        {
+            s = natsMsgHeader_Set(msg, kvOpHeader, kvOpPurgeStr);
+            IFOK(s, natsMsgHeader_Set(msg, JSMsgRollup, JSMsgRollupSubject));
+        }
+        else
+        {
+            s = natsMsgHeader_Set(msg, kvOpHeader, kvOpDeleteStr);
+        }
+    }
+    if (purge && (opts != NULL) && (opts->Timeout > 0))
+    {
+        jsPubOptions_Init(&o);
+        o.MaxWait = opts->Timeout;
+        po = &o;
+    }
+    IFOK(s, js_PublishMsg(NULL, kv->js, msg, po, NULL));
+
+    natsBuf_Cleanup(&buf);
+    natsMsg_Destroy(msg);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+kvStore_Delete(kvStore *kv, const char *key)
+{
+    natsStatus s = _delete(kv, key, false, NULL);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+kvStore_Purge(kvStore *kv, const char *key, kvPurgeOptions *opts)
+{
+    natsStatus s = _delete(kv, key, true, opts);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+kvPurgeOptions_Init(kvPurgeOptions *opts)
+{
+    if (opts == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    memset(opts, 0, sizeof(kvPurgeOptions));
+    return NATS_OK;
+}
+
+natsStatus
+kvStore_PurgeDeletes(kvStore *kv, kvPurgeOptions *opts)
+{
+    natsStatus      s;
+    kvWatcher       *w = NULL;
+    kvEntry         *e = NULL;
+    kvEntry         *h = NULL;
+    kvEntry         *t = NULL;
+    natsBuffer      buf;
+    char            buffer[128];
+    kvWatchOptions  wo;
+    kvWatchOptions  *wpo = NULL;
+
+    if ((opts != NULL) && (opts->Timeout > 0))
+    {
+        kvWatchOptions_Init(&wo);
+        wo.Timeout = opts->Timeout;
+        wpo = &wo;
+    }
+    s = kvStore_WatchAll(&w, kv, wpo);
+    if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    while (s == NATS_OK)
+    {
+        s = kvWatcher_Next(&e, w, KV_WATCH_FOR_EVER);
+        if (s == NATS_OK)
+        {
+            if (e == NULL)
+                break;
+            if ((e->op == kvOp_Delete) || (e->op == kvOp_Purge))
+            {
+                if (t != NULL)
+                    t->next = e;
+                else
+                    h = e;
+                t = e;
+            }
+        }
+    }
+    if ((s == NATS_OK) && (h != NULL))
+    {
+        jsOptions   po;
+        int64_t     olderThan = (opts != NULL ? opts->DeleteMarkersOlderThan : 0);
+        int64_t     limit = 0;
+
+        // Negative value is used to instruct to always remove markers, regardless
+        // of age. If set to 0 (or not set), use our default value.
+        if (olderThan == 0)
+            olderThan = NATS_SECONDS_TO_NANOS(30*60); // 30 minutes
+        else if (olderThan > 0)
+            limit = nats_NowInNanoSeconds() - olderThan;
+
+        jsOptions_Init(&po);
+
+        natsBuf_InitWithBackend(&buf, buffer, 0, sizeof(buffer));
+
+        // Go over the list, even when s != NATS_OK so we destroy
+        // each entry and don't have a memory leak.
+        for (; h != NULL; )
+        {
+            natsBuf_Reset(&buf);
+            IFOK(s, natsBuf_Append(&buf, kv->pre, -1));
+            IFOK(s, natsBuf_Append(&buf, h->key, -1));
+            IFOK(s, natsBuf_AppendByte(&buf, '\0'));
+            if (s == NATS_OK)
+            {
+                po.Stream.Purge.Subject = (const char*) natsBuf_Data(&buf);
+                po.Stream.Purge.Keep = 0;
+                if ((olderThan > 0) && (kvEntry_Created(h) >= limit))
+                {
+                    // Keep this marker since it is more recent than the threshold.
+                    po.Stream.Purge.Keep = 1;
+                }
+                s = js_PurgeStream(kv->js, kv->stream, &po, NULL);
+            }
+            e = h;
+            h = h->next;
+            kvEntry_Destroy(e);
+        }
+    }
+    kvWatcher_Destroy(w);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static void
+_freeWatcher(kvWatcher *w)
+{
+    kvStore *kv = NULL;
+
+    natsSubscription_Destroy(w->sub);
+    natsMutex_Destroy(w->mu);
+    kv = w->kv;
+    NATS_FREE(w);
+    _releaseKV(kv);
+}
+
+static void
+_releaseWatcher(kvWatcher *w)
+{
+    bool doFree;
+
+    if (w == NULL)
+        return;
+
+    natsMutex_Lock(w->mu);
+    doFree = (--(w->refs) == 0);
+    natsMutex_Unlock(w->mu);
+
+    if (doFree)
+        _freeWatcher(w);
+}
+
+natsStatus
+kvWatchOptions_Init(kvWatchOptions *opts)
+{
+    if (opts == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    memset(opts, 0, sizeof(kvWatchOptions));
+    return NATS_OK;
+}
+
+natsStatus
+kvWatcher_Next(kvEntry **new_entry, kvWatcher *w, int64_t timeout)
+{
+    natsStatus  s    = NATS_OK;
+    kvEntry     *e   = NULL;
+    int64_t     start;
+
+    if ((new_entry == NULL) || (w == NULL) || (timeout <= 0))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    *new_entry = NULL;
+
+    natsMutex_Lock(w->mu);
+    start = nats_Now();
+GET_NEXT:
+    if (w->stopped)
+    {
+        s = nats_setDefaultError(NATS_ILLEGAL_STATE);
+    }
+    else if (w->retMarker)
+    {
+        // Will return a NULL entry (*new_entry is initialized to NULL).
+        // Mark that we should no longer check/return the "init done" marker.
+        w->retMarker = false;
+    }
+    else
+    {
+        natsMsg     *msg = NULL;
+        uint64_t    delta= 0;
+        bool        next = false;
+
+        w->refs++;
+        natsMutex_Unlock(w->mu);
+
+        s = natsSubscription_NextMsg(&msg, w->sub, timeout);
+
+        natsMutex_Lock(w->mu);
+        if (w->stopped)
+        {
+            natsMutex_Unlock(w->mu);
+            _releaseWatcher(w);
+            return NATS_ILLEGAL_STATE;
+        }
+        w->refs--;
+
+        if ((s == NATS_OK) && (strlen(msg->subject) <= strlen(w->kv->pre)))
+            s = nats_setError(NATS_ERR, "invalid update's subject '%s'", msg->subject);
+
+        if ((s == NATS_OK) && ((nats_IsStringEmpty(msg->reply) ||
+                                ((int) strlen(msg->reply) <= jsAckPrefixLen))))
+        {
+            s = nats_setError(NATS_ERR, "unable to get metadata from '%s'", msg->reply);
+        }
+        IFOK(s, js_getMetaData(msg->reply+jsAckPrefixLen,
+                               NULL, NULL, NULL, NULL, &(msg->seq),
+                               NULL, &(msg->time), &delta, 3));
+        if (s == NATS_OK)
+        {
+            kvOperation op = _getKVOp(msg);
+
+            if (!w->ignoreDel || (op != kvOp_Delete && op != kvOp_Purge))
+            {
+                s = _createEntry(&e, w->kv, &msg);
+                if (s == NATS_OK)
+                {
+                    e->op    = op;
+                    e->delta = delta;
+                }
+            }
+            else
+            {
+                timeout -= (nats_Now() - start);
+                if (timeout > 0)
+                    next = true;
+                else
+                    s = nats_setDefaultError(NATS_TIMEOUT);
+            }
+            // Here, regardless of status, need to update this
+            if (!w->initDone)
+            {
+                w->received++;
+                // We set this on the first trip through..
+                if (w->initPending == 0)
+                    w->initPending = delta;
+                if ((w->received > w->initPending) || (delta == 0))
+                {
+                    w->initDone  = true;
+                    w->retMarker = true;
+                }
+            }
+        }
+        // The `msg` variable may be NULL if an entry was created
+        // and took ownership. It is ok since then destroy will be a no-op.
+        natsMsg_Destroy(msg);
+
+        if (next)
+            goto GET_NEXT;
+    }
+    natsMutex_Unlock(w->mu);
+
+    if (s == NATS_OK)
+        *new_entry = e;
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+void
+kvWatcher_Destroy(kvWatcher *w)
+{
+    kvWatcher_Stop(w);
+    _releaseWatcher(w);
+}
+
+natsStatus
+kvStore_Watch(kvWatcher **new_watcher, kvStore *kv, const char *key, kvWatchOptions *opts)
+{
+    natsStatus      s;
+    kvWatcher       *w = NULL;
+    jsSubOptions    so;
+    DEFINE_BUF_FOR_SUBJECT;
+
+    if ((new_watcher == NULL) || (kv == NULL) || nats_IsStringEmpty(key))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    *new_watcher = NULL;
+
+    w = (kvWatcher*) NATS_CALLOC(1, sizeof(kvWatcher));
+    if (w == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    _retainKV(kv);
+    w->kv = kv;
+    w->refs = 1;
+
+    BUILD_SUBJECT(KEY_NAME_ONLY);
+    IFOK(s, natsMutex_Create(&(w->mu)));
+    if (s == NATS_OK)
+    {
+        // Use ordered consumer to deliver results
+
+        jsSubOptions_Init(&so);
+        so.Ordered = true;
+        if ((opts == NULL) || !opts->IncludeHistory)
+            so.Config.DeliverPolicy = js_DeliverLastPerSubject;
+        if (opts != NULL)
+        {
+            if (opts->MetaOnly)
+                so.Config.HeadersOnly = true;
+            if (opts->IgnoreDeletes)
+                w->ignoreDel = true;
+        }
+        s = js_SubscribeSync(&(w->sub), kv->js, natsBuf_Data(&buf), NULL, &so, NULL);
+        IFOK(s, natsSubscription_SetPendingLimits(w->sub, -1, -1));
+        if (s == NATS_OK)
+        {
+            natsSubscription *sub = w->sub;
+
+            natsSub_Lock(sub);
+            if ((sub->jsi != NULL) && (sub->jsi->pending == 0))
+            {
+                w->initDone = true;
+                w->retMarker = true;
+            }
+            natsSub_Unlock(sub);
+        }
+    }
+
+    natsBuf_Cleanup(&buf);
+
+    if (s == NATS_OK)
+        *new_watcher = w;
+    else
+        _freeWatcher(w);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+kvStore_WatchAll(kvWatcher **new_watcher, kvStore *kv, kvWatchOptions *opts)
+{
+    natsStatus s = kvStore_Watch(new_watcher, kv, ">", opts);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+kvStore_Keys(kvKeysList *list, kvStore *kv, kvWatchOptions *opts)
+{
+    natsStatus      s;
+    kvWatchOptions  o;
+    kvWatcher       *w = NULL;
+    int             count = 0;
+    KV_DEFINE_LIST;
+
+    if (list == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    list->Keys = NULL;
+    list->Count = 0;
+
+    kvWatchOptions_Init(&o);
+    if (opts != NULL)
+        memcpy(&o, opts, sizeof(kvWatchOptions));
+
+    o.IgnoreDeletes = true;
+    o.MetaOnly = true;
+    if (o.Timeout > 0)
+        timeout = o.Timeout;
+
+    s = kvStore_WatchAll(&w, kv, &o);
+    if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    KV_GATHER_LIST;
+
+    // Don't need the watcher anymore.
+    kvWatcher_Destroy(w);
+    // On success, create the array of keys.
+    if ((s == NATS_OK) && (n > 0))
+    {
+        list->Keys = (char**) NATS_CALLOC(n, sizeof(char*));
+        if (list->Keys == NULL)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+    }
+    // Transfer keys to the array (on success), and destroy
+    // the entries if there was an error.
+    for (i=0; h != NULL; i++)
+    {
+        e = h;
+        h = h->next;
+        if (s == NATS_OK)
+        {
+            DUP_STRING(s, list->Keys[i], e->key);
+            if (s == NATS_OK)
+                count++;
+        }
+        kvEntry_Destroy(e);
+    }
+    // Set the list's Count to `count`, not `n` since `count`
+    // will reflect the actual number of keys that have been
+    // properly strdup'ed.
+    list->Count = count;
+
+    // If there was a failure (especially when strdup'ing) keys,
+    // this will do the proper cleanup and re-initialize the list.
+    if (s != NATS_OK)
+        kvKeysList_Destroy(list);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+void
+kvKeysList_Destroy(kvKeysList *list)
+{
+    int i;
+
+    if ((list == NULL) || (list->Keys == NULL))
+        return;
+
+    for (i=0; i<list->Count; i++)
+        NATS_FREE(list->Keys[i]);
+    NATS_FREE(list->Keys);
+    list->Keys = NULL;
+    list->Count = 0;
+}
+
+natsStatus
+kvStore_History(kvEntryList *list, kvStore *kv, const char *key, kvWatchOptions *opts)
+{
+    natsStatus      s;
+    kvWatchOptions  o;
+    kvEntry         *e = NULL;
+    kvEntry         *h = NULL;
+    kvEntry         *t = NULL;
+    int             n  = 0;
+    kvWatcher       *w = NULL;
+    int64_t         timeout = KV_WATCH_FOR_EVER;
+    int64_t         start;
+    int             i;
+
+    if (list == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    list->Entries = NULL;
+    list->Count = 0;
+
+    kvWatchOptions_Init(&o);
+    if (opts != NULL)
+        memcpy(&o, opts, sizeof(kvWatchOptions));
+
+    o.IncludeHistory = true;
+    if (o.Timeout > 0)
+        timeout = o.Timeout;
+
+    s = kvStore_Watch(&w, kv, key, &o);
+    if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    KV_GATHER_LIST;
+
+    // Don't need the watcher anymore.
+    kvWatcher_Destroy(w);
+    // On success, create the array of entries.
+    if ((s == NATS_OK) && (n > 0))
+    {
+        list->Entries = (kvEntry**) calloc(n, sizeof(kvEntry*));
+        if (list->Entries == NULL)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+        else
+            list->Count = n;
+    }
+    // Transfer entries to the array (on success), or destroy
+    // the entries if there was an error.
+    for (i=0; h != NULL; i++)
+    {
+        e = h;
+        h = h->next;
+        if (s == NATS_OK)
+            list->Entries[i] = e;
+        else
+            kvEntry_Destroy(e);
+    }
+    // Go client returns "not found" if the subject exists, but
+    // there is nothing to return, so basically after a purge deletes,
+    // a key has no data and no marker, and we return "not found".
+    if ((s == NATS_OK) && (list->Count == 0))
+        return NATS_NOT_FOUND;
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+void
+kvEntryList_Destroy(kvEntryList *list)
+{
+    int i;
+
+    if ((list == NULL) || (list->Entries == NULL))
+        return;
+
+    for (i=0; i<list->Count; i++)
+        kvEntry_Destroy(list->Entries[i]);
+    NATS_FREE(list->Entries);
+    list->Entries = NULL;
+    list->Count = 0;
+}
+
+natsStatus
+kvWatcher_Stop(kvWatcher *w)
+{
+    natsStatus s = NATS_OK;
+
+    if (w == NULL)
+        return NATS_INVALID_ARG;
+
+    natsMutex_Lock(w->mu);
+    if (!w->stopped)
+    {
+        w->stopped = true;
+        s = natsSubscription_Unsubscribe(w->sub);
+    }
+    natsMutex_Unlock(w->mu);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+const char*
+kvStore_Bucket(kvStore *kv)
+{
+    return (kv == NULL ? NULL : kv->bucket);
+}
+
+natsStatus
+kvStore_Status(kvStatus **new_status, kvStore *kv)
+{
+    natsStatus      s;
+    kvStatus        *sts = NULL;
+    jsStreamInfo    *si  = NULL;
+
+    if ((new_status == NULL) || (kv == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    s = js_GetStreamInfo(&si, kv->js, kv->stream, NULL, NULL);
+    if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    sts = (kvStatus*) NATS_CALLOC(1, sizeof(kvStatus));
+    if (sts == NULL)
+        s = nats_setDefaultError(NATS_NO_MEMORY);
+
+    if (s == NATS_OK)
+    {
+        _retainKV(kv);
+        sts->kv = kv;
+        sts->si = si;
+        *new_status = sts;
+    }
+    else
+        jsStreamInfo_Destroy(si);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+//////////////////////////////////
+// kvStatus APIs
+//////////////////////////////////
+
+const char*
+kvStatus_Bucket(kvStatus *sts)
+{
+    return (sts == NULL ? NULL : sts->kv->bucket);
+}
+
+uint64_t
+kvStatus_Values(kvStatus *sts)
+{
+    return (sts == NULL ? 0 : sts->si->State.Msgs);
+}
+
+int64_t
+kvStatus_History(kvStatus *sts)
+{
+    return (sts == NULL || sts->si->Config == NULL ? 0 : sts->si->Config->MaxMsgsPerSubject);
+}
+
+int64_t
+kvStatus_TTL(kvStatus *sts)
+{
+    return (sts == NULL || sts->si->Config == NULL ? 0 : sts->si->Config->MaxAge);
+}
+
+int64_t
+kvStatus_Replicas(kvStatus *sts)
+{
+    return (sts == NULL || sts->si->Config == NULL ? 0 : sts->si->Config->Replicas);
+}
+
+void
+kvStatus_Destroy(kvStatus *sts)
+{
+    kvStore *kv = NULL;
+
+    if (sts == NULL)
+        return;
+
+    kv = sts->kv;
+    jsStreamInfo_Destroy(sts->si);
+    NATS_FREE(sts);
+    _releaseKV(kv);
+}
+
+//////////////////////////////////
+// kvEntry APIs
+//////////////////////////////////
+
+const char*
+kvEntry_Bucket(kvEntry *e)
+{
+    return (e == NULL ? NULL : kvStore_Bucket(e->kv));
+}
+
+const char*
+kvEntry_Key(kvEntry *e)
+{
+    return (e == NULL ? NULL : e->key);
+}
+
+const void*
+kvEntry_Value(kvEntry *e)
+{
+    return (e == NULL ? NULL : (const void*) natsMsg_GetData(e->msg));
+}
+
+int
+kvEntry_ValueLen(kvEntry *e)
+{
+    return (e == NULL ? -1 : natsMsg_GetDataLength(e->msg));
+}
+
+const char*
+kvEntry_ValueString(kvEntry *e)
+{
+    return (e == NULL ? NULL : natsMsg_GetData(e->msg));
+}
+
+uint64_t
+kvEntry_Revision(kvEntry *e)
+{
+    return (e == NULL ? 0 : natsMsg_GetSequence(e->msg));
+}
+
+int64_t
+kvEntry_Created(kvEntry *e)
+{
+    return (e == NULL ? 0 : natsMsg_GetTime(e->msg));
+}
+
+uint64_t
+kvEntry_Delta(kvEntry *e)
+{
+    return (e == NULL ? 0 : e->delta);
+}
+
+kvOperation
+kvEntry_Operation(kvEntry *e)
+{
+    return (e == NULL ? 0 : e->op);
+}
+
+void
+kvEntry_Destroy(kvEntry *e)
+{
+    kvStore *kv = NULL;
+
+    if (e == NULL)
+        return;
+
+    kv = e->kv;
+    natsMsg_Destroy(e->msg);
+    NATS_FREE(e);
+    _releaseKV(kv);
+}
diff --git a/src/kv.h b/src/kv.h
new file mode 100644 (file)
index 0000000..3b01335
--- /dev/null
+++ b/src/kv.h
@@ -0,0 +1,25 @@
+// Copyright 2021-2022 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#define kvMaxHistory                (64)
+
+#define kvOpHeader                  "KV-Operation"
+#define kvOpDeleteStr               "DEL"
+#define kvOpPurgeStr                "PURGE"
+
+#define kvErrInvalidBucketName      "invalid bucket name"
+#define kvErrHistoryTooLarge        "history limited to a max of "
+#define kvErrBadBucket              "bucket not valid key-value store"
+#define kvErrBucketNotFound         "bucket not found"
+#define kvErrInvalidKey             "invalid key"
+#define kvErrInvalidRevision        "invalid revision"
diff --git a/src/libnats.pc.in b/src/libnats.pc.in
new file mode 100644 (file)
index 0000000..e26b232
--- /dev/null
@@ -0,0 +1,12 @@
+prefix="@CMAKE_INSTALL_PREFIX@"
+exec_prefix="${prefix}"
+libdir="${prefix}/@CMAKE_INSTALL_LIBDIR@"
+includedir="${prefix}/include"
+
+Name: NATS & NATS Streaming - C Client library
+Description: A C client library for the NATS messaging system.
+URL: https://github.com/nats-io/nats.c
+Version: @NATS_VERSION_MAJOR@.@NATS_VERSION_MINOR@.@NATS_VERSION_PATCH@
+Cflags: -I"${includedir}"
+Libs: -L"${libdir}" -lnats
+Libs.private: -L"${libdir}" -lnats @PKGCONF_LIBS_PRIV@
diff --git a/src/mem.h b/src/mem.h
new file mode 100644 (file)
index 0000000..a73f430
--- /dev/null
+++ b/src/mem.h
@@ -0,0 +1,56 @@
+// Copyright 2015-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef MEM_H_
+#define MEM_H_
+
+#include <stdlib.h>
+
+#define NATS_MALLOC(s)      malloc((s))
+#define NATS_CALLOC(c,s)    calloc((c), (s))
+#define NATS_REALLOC(p, s)  realloc((p), (s))
+
+#ifdef _WIN32
+#define NATS_STRDUP(s)      _strdup((s))
+#else
+#define NATS_STRDUP(s)      strdup((s))
+#endif
+#define NATS_FREE(p)        free((p))
+
+// GNU C Library version 2.25 or later.
+#if defined(__GLIBC__) && \
+    (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 25))
+#define HAVE_EXPLICIT_BZERO 1
+#endif
+
+// Newlib
+#if defined(__NEWLIB__)
+#define HAVE_EXPLICIT_BZERO 1
+#endif
+
+// FreeBSD version 11.0 or later.
+#if defined(__FreeBSD__) && __FreeBSD_version >= 1100037
+#define HAVE_EXPLICIT_BZERO 1
+#endif
+
+// OpenBSD version 5.5 or later.
+#if defined(__OpenBSD__) && OpenBSD >= 201405
+#define HAVE_EXPLICIT_BZERO 1
+#endif
+
+// NetBSD version 7.2 or later.
+#if defined(__NetBSD__) && __NetBSD_Version__ >= 702000000
+#define HAVE_EXPLICIT_MEMSET 1
+#endif
+
+#endif /* MEM_H_ */
diff --git a/src/msg.c b/src/msg.c
new file mode 100644 (file)
index 0000000..1eaba6f
--- /dev/null
+++ b/src/msg.c
@@ -0,0 +1,905 @@
+// Copyright 2015-2021 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "natsp.h"
+
+// Do this after including natsp.h in order to have some of the
+// GNU specific flag set first.
+#include <string.h>
+#include <ctype.h>
+
+#include "mem.h"
+#include "msg.h"
+
+int
+natsMsgHeader_encodedLen(natsMsg *msg)
+{
+    natsStrHashIter iter;
+    char            *key = NULL;
+    void            *p   = NULL;
+    int             hl   = 0;
+
+    // Special case: if needsLift is true, it means that this is a message
+    // that was received but never lifted (so for sure no header was added,
+    // modified or removed. So return the current len of the encoded headers.
+    if (natsMsg_needsLift(msg))
+        return msg->hdrLen;
+
+    // Here it could be that a message was created, some headers added but
+    // then all were removed before the send. Returning 0 here means that
+    // the publish will send PUB instead of HPUB. We could choose to return
+    // hdrLinePreLen + _CRLF_LEN_ + _CRLF_LEN_ instead, which means that
+    // we would encode "NATS/1.0\r\n\r\n" only.
+    if (msg->headers == NULL)
+        return 0;
+
+    hl = HDR_LINE_LEN;
+    natsStrHashIter_Init(&iter, msg->headers);
+    while (natsStrHashIter_Next(&iter, &key, &p))
+    {
+        natsHeaderValue *v = (natsHeaderValue*) p;
+        natsHeaderValue *c;
+
+        for (c = v; c != NULL; c = c->next)
+        {
+            hl += (int) strlen(key) + 2; // 2 for ": "
+            hl += (int) strlen(c->value) + _CRLF_LEN_;
+        }
+    }
+    natsStrHashIter_Done(&iter);
+    hl += _CRLF_LEN_;
+
+    return hl;
+}
+
+natsStatus
+natsMsgHeader_encode(natsBuffer *buf, natsMsg *msg)
+{
+    natsStrHashIter iter;
+    natsStatus      s    = NATS_OK;
+    char            *key = NULL;
+    void            *p   = NULL;
+
+    // See explanation in natsMsgHeader_encodedLen()
+    if (natsMsg_needsLift(msg))
+    {
+        s = natsBuf_Append(buf, (const char*) msg->hdr, msg->hdrLen);
+        return NATS_UPDATE_ERR_STACK(s);
+    }
+
+    // Based on decision in natsMsgHeader_encodedLen(),
+    // getting here with NULL headers is likely a bug.
+    if (msg->headers == NULL)
+        return nats_setError(NATS_ERR, "%s", "trying to encode headers while there is none");
+
+    s = natsBuf_Append(buf, HDR_LINE, HDR_LINE_LEN);
+    if (s == NATS_OK)
+    {
+        natsStrHashIter_Init(&iter, msg->headers);
+        while ((s == NATS_OK) && natsStrHashIter_Next(&iter, &key, &p))
+        {
+            natsHeaderValue *v = (natsHeaderValue*) p;
+            natsHeaderValue *c;
+
+            for (c = v; (s == NATS_OK) && (c != NULL); c = c->next)
+            {
+                s = natsBuf_Append(buf, (const char*) key, (int) strlen(key));
+                if (s == NATS_OK)
+                    s = natsBuf_Append(buf, ": ", 2);
+                if (s == NATS_OK)
+                {
+                    int vl  = (int) strlen(c->value);
+                    int pos = natsBuf_Len(buf);
+
+                    s = natsBuf_Append(buf, (const char*) c->value, vl);
+                    if (s == NATS_OK)
+                    {
+                        char *ch = natsBuf_Data(buf)+pos;
+                        int  i;
+
+                        for (i=0; i<vl; i++)
+                        {
+                            if ((*ch == '\r') || (*ch == '\n'))
+                                *ch = ' ';
+                            ch++;
+                        }
+                    }
+                }
+                if (s == NATS_OK)
+                    s = natsBuf_Append(buf, _CRLF_, _CRLF_LEN_);
+            }
+        }
+        natsStrHashIter_Done(&iter);
+    }
+    if (s == NATS_OK)
+        s = natsBuf_Append(buf, _CRLF_, _CRLF_LEN_);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+void
+natsHeaderValue_free(natsHeaderValue *v, bool all)
+{
+    if (v == NULL)
+        return;
+
+    if (v->needFree && (v->value != NULL))
+        NATS_FREE(v->value);
+
+    if (all && v->next != NULL)
+        natsHeaderValue_free(v->next, all);
+
+    NATS_FREE(v);
+}
+
+natsStatus
+natsHeaderValue_create(natsHeaderValue **retV, const char *value, bool makeCopy)
+{
+    natsStatus      s   = NATS_OK;
+    char            *cv = (char*) value;
+    natsHeaderValue *v  = NULL;
+
+    *retV = NULL;
+
+    v = NATS_MALLOC(sizeof(natsHeaderValue));
+    if (v == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    if (makeCopy && value != NULL)
+    {
+        DUP_STRING(s, cv, value);
+        if (s != NATS_OK)
+        {
+            NATS_FREE(v);
+            return NATS_UPDATE_ERR_STACK(s);
+        }
+    }
+    v->value    = cv;
+    v->needFree = makeCopy;
+    v->next     = NULL;
+    *retV       = v;
+
+    return NATS_OK;
+}
+
+static natsStatus
+_checkMsgAndKey(natsMsg *msg, const char *key)
+{
+    if (msg == NULL)
+        return nats_setError(NATS_INVALID_ARG, "%s", "message cannot be NULL");
+
+    if ((key == NULL) || (key[0] == '\0'))
+        return nats_setError(NATS_INVALID_ARG, "%s", "key cannot be NULL nor empty");
+
+    return NATS_OK;
+}
+
+static char*
+_moveToLF(char *end, char *ptr)
+{
+    while (ptr != end)
+    {
+        if ((*ptr == '\r') && (*(ptr+1) == '\n'))
+            return ++ptr;
+        else
+            ptr++;
+    }
+    return ptr;
+}
+
+static natsStatus
+_processKeyValue(int line, natsMsg *msg, char *endPtr, char **pPtr, char **lastKey)
+{
+    natsStatus      s    = NATS_OK;
+    char            *ptr = *pPtr;
+    char            *col = NULL;
+    char            *key = NULL;
+    char            *val = NULL;
+    natsHeaderValue *v   = NULL;
+    bool            ml   = false;
+    char            *start;
+    char            *endval;
+
+    start = ptr;
+    if (*ptr == '\r')
+    {
+        if ((++ptr == endPtr) || ((*ptr == '\n') && (++ptr == endPtr)))
+        {
+            *pPtr = ptr;
+            return NATS_OK;
+        }
+        return nats_setError(NATS_PROTOCOL_ERROR, "invalid start of a key: %s", start);
+    }
+    if (isspace(*ptr))
+    {
+        if (line == 0)
+            return nats_setError(NATS_PROTOCOL_ERROR, "key cannot start with a space: %s", ptr);
+
+        key = *lastKey;
+        ml = true;
+    }
+    else
+    {
+        col = strchr((const char*) ptr, (int) ':');
+        if (col == NULL)
+            return nats_setError(NATS_PROTOCOL_ERROR, "column delimiter not found: %s", ptr);
+
+        // Replace column char with \0 to terminate the key string.
+        key = ptr;
+        ptr = col+1;
+        (*col) = '\0';
+    }
+
+    while ((ptr != endPtr) && (isspace(*ptr)))
+        ptr++;
+
+    if (ptr == endPtr)
+        return nats_setError(NATS_PROTOCOL_ERROR, "no value found for key %s", key);
+
+    val = ptr;
+    // Now find the \r\n for this value
+    ptr = _moveToLF(endPtr, ptr);
+    if (ptr == endPtr)
+        return nats_setError(NATS_PROTOCOL_ERROR, "no CRLF found for value of key %s", key);
+
+    // Trim right spaces and set to \0 to terminate the value string.
+    endval = ptr;
+    // Backtrack to \r and any space characters. Make sure we don't go
+    // past the beginning of the value pointer.
+    endval--;
+    if (*endval == '\r')
+        endval--;
+    while ((endval != val) && (isspace(*endval)))
+        endval--;
+    endval++;
+    *(endval) = '\0';
+
+    if (ml)
+    {
+        char *newValue = NULL;
+
+        natsHeaderValue *cur = natsStrHash_Get(msg->headers, key);
+        if (cur == NULL)
+            return nats_setError(NATS_PROTOCOL_ERROR, "unable to process folding lines for key %s", key);
+
+        for (; cur->next != NULL; )
+            cur = cur->next;
+
+        if (nats_asprintf(&newValue, "%s %s", cur->value, val) == -1)
+            return nats_setDefaultError(NATS_NO_MEMORY);
+
+        if (cur->needFree)
+            NATS_FREE(cur->value);
+
+        cur->value    = newValue;
+        cur->needFree = true;
+    }
+    else
+    {
+        s = natsHeaderValue_create(&v, (const char*) val, false);
+        if (s == NATS_OK)
+        {
+            natsHeaderValue *cur = natsStrHash_Get(msg->headers, key);
+            if (cur != NULL)
+            {
+                for (; cur->next != NULL; )
+                    cur = cur->next;
+
+                cur->next = v;
+            }
+            else
+                s = natsStrHash_Set(msg->headers, (char*) key, false, (void*) v, NULL);
+        }
+    }
+
+    if (s == NATS_OK)
+    {
+        ptr++;
+        *pPtr = ptr;
+        *lastKey = key;
+    }
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_liftHeaders(natsMsg *msg, bool setOrAdd)
+{
+    natsStatus s       = NATS_OK;
+    char       *ptr    = NULL;
+    char       *sts    = NULL;
+    char       *endPtr = NULL;
+    char       *lk     = NULL;
+    int        i;
+
+    // If there is no header map and needsLift is false, and this is not
+    // an action to set or add a header, then simply return.
+    if (!setOrAdd && (msg->headers == NULL) && !natsMsg_needsLift(msg))
+        return NATS_OK;
+
+    // For set or add operations, possibly create the headers map.
+    if (msg->headers == NULL)
+    {
+        s = natsStrHash_Create(&(msg->headers), 4);
+        if (s != NATS_OK)
+            return NATS_UPDATE_ERR_STACK(s);
+    }
+
+    // In all cases, if there is no need to lift, we are done.
+    if (!natsMsg_needsLift(msg))
+        return NATS_OK;
+
+    // If hdrLen is less than what we need for NATS/1.0\r\n, then
+    // clearly this is a bad header.
+    if ((msg->hdrLen < HDR_LINE_LEN) || (strstr(msg->hdr, HDR_LINE_PRE) != msg->hdr))
+        return nats_setError(NATS_PROTOCOL_ERROR, "header prefix missing: %s", msg->hdr);
+
+    endPtr = (char*) (msg->hdr + msg->hdrLen);
+
+    sts = (char*) (msg->hdr + HDR_LINE_PRE_LEN);
+    while ((sts != endPtr) && (*sts == ' '))
+        sts++;
+
+    ptr = sts;
+    ptr = _moveToLF(endPtr, ptr);
+    if (ptr != endPtr)
+    {
+        char *stsEnd = ptr;
+
+        ptr++;
+        while ((stsEnd != sts) && (*stsEnd != '\r'))
+            stsEnd--;
+
+        // Terminate the status.
+        *stsEnd = '\0';
+    }
+
+    if (ptr == endPtr)
+        return nats_setError(NATS_PROTOCOL_ERROR, "early termination of headers: %s", msg->hdr);
+
+    for (i=0; ((s == NATS_OK) && (ptr != endPtr)); i++)
+        s = _processKeyValue(i, msg, endPtr, &ptr, &lk);
+
+    if (s == NATS_OK)
+    {
+        // At this point we have had no protocol error lifting the header
+        // so we clear this flag so that we don't attempt to lift again.
+        natsMsg_clearNeedsLift(msg);
+
+        // Furthermore, we need the flag to be cleared should we need to
+        // add the no responders header (otherwise we would recursively
+        // try to lift headers).
+        // If adding the field fails, it is likely due to memory issue,
+        // so it is fine to keep "needsLift" as false.
+
+        // Check if we have an inlined status.
+        if ((sts != NULL) && (*sts != '\0'))
+        {
+            // There could be a description...
+            if (strlen(sts) > HDR_STATUS_LEN)
+            {
+                char *desc = (char*) (sts + HDR_STATUS_LEN);
+                char descb = 0;
+
+                // Save byte that starts the description
+                descb = *desc;
+                // Replace with '\0' to end the status.
+                *desc = '\0';
+
+                // Set status value (this will make a copy)
+                s = natsMsgHeader_Set(msg, STATUS_HDR, (const char*) sts);
+                if (s == NATS_OK)
+                {
+                    char *desce = NULL;
+
+                    // Restore character of starting description
+                    *desc = descb;
+                    // Trim left spaces
+                    while ((*desc != '\0') && isspace((int) *desc))
+                        desc++;
+
+                    // If we are not at the end of description
+                    if (*desc != '\0')
+                    {
+                        // Go to end of description and walk back to trim right.
+                        desce = (char*) (desc + (int) strlen(desc) - 1);
+                        while ((desce != desc) && isspace((int) *desce))
+                        {
+                            *desce = '\0';
+                            desce--;
+                        }
+                    }
+                    // If there is a description, set the value (this will make a copy)
+                    if (*desc != '\0')
+                        s = natsMsgHeader_Set(msg, DESCRIPTION_HDR, (const char*) desc);
+                }
+            }
+            else
+                s = natsMsgHeader_Set(msg, STATUS_HDR, (const char*) sts);
+        }
+    }
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsMsgHeader_Set(natsMsg *msg, const char *key, const char *value)
+{
+    natsStatus  s = NATS_OK;
+
+    if ((s = _checkMsgAndKey(msg, key)) != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    if ((s = _liftHeaders(msg, true)) != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    if (s == NATS_OK)
+    {
+        natsHeaderValue *v = NULL;
+
+        s = natsHeaderValue_create(&v, value, true);
+        if (s == NATS_OK)
+        {
+            void *p = NULL;
+
+            s = natsStrHash_Set(msg->headers, (char*) key, true, (void*) v, &p);
+            if (s != NATS_OK)
+                natsHeaderValue_free(v, false);
+            else if (p != NULL)
+            {
+                natsHeaderValue *old = (natsHeaderValue*) p;
+                natsHeaderValue_free(old, true);
+            }
+        }
+    }
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsMsgHeader_Add(natsMsg *msg, const char *key, const char *value)
+{
+    natsStatus  s = NATS_OK;
+
+    if ((s = _checkMsgAndKey(msg, key)) != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    if ((s = _liftHeaders(msg, true)) != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    if (s == NATS_OK)
+    {
+        natsHeaderValue *v = NULL;
+
+        s = natsHeaderValue_create(&v, value, true);
+        if (s == NATS_OK)
+        {
+            natsHeaderValue *cur = natsStrHash_Get(msg->headers, (char*) key);
+            if (cur != NULL)
+            {
+                for (; cur->next != NULL; )
+                    cur = cur->next;
+
+                cur->next = v;
+            }
+            else
+                s = natsStrHash_Set(msg->headers, (char*) key, true, (void*) v, NULL);
+        }
+    }
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsMsgHeader_Get(natsMsg *msg, const char *key, const char **value)
+{
+    natsStatus      s   = NATS_OK;
+    natsHeaderValue *v  = NULL;
+
+    if ((s = _checkMsgAndKey(msg, key)) != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    if (value == NULL)
+        return nats_setError(NATS_INVALID_ARG, "%s", "value cannot be NULL");
+
+    *value = NULL;
+
+    if ((s = _liftHeaders(msg, false)) != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    if ((msg->headers == NULL) || natsStrHash_Count(msg->headers) == 0)
+        return NATS_NOT_FOUND; // normal error, so don't update error stack
+
+    v = natsStrHash_Get(msg->headers, (char*) key);
+    if (v == NULL)
+        return NATS_NOT_FOUND; // normal error, so don't update error stack
+
+    *value = (const char*) v->value;
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsMsgHeader_Values(natsMsg *msg, const char *key, const char* **values, int *count)
+{
+    natsStatus      s       = NATS_OK;
+    int             c       = 0;
+    natsHeaderValue *cur    = NULL;
+    const char*     *strs   = NULL;
+    natsHeaderValue *v      = NULL;
+
+    if ((s = _checkMsgAndKey(msg, key)) != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    if ((values == NULL) || (count == NULL))
+        return nats_setError(NATS_INVALID_ARG, "%s", "value or count cannot be NULL");
+
+    *values = NULL;
+    *count  = 0;
+
+    if ((s = _liftHeaders(msg, false)) != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    if ((msg->headers == NULL) || natsStrHash_Count(msg->headers) == 0)
+        return NATS_NOT_FOUND; // normal error, so don't update error stack
+
+    v = natsStrHash_Get(msg->headers, (char*) key);
+    if (v == NULL)
+        return NATS_NOT_FOUND; // normal error, so don't update error stack
+
+    for (cur=v; cur != NULL; cur = cur->next)
+        c++;
+
+    strs = NATS_CALLOC(c, sizeof(char*));
+    if (strs == NULL)
+        s = nats_setDefaultError(NATS_NO_MEMORY);
+    else
+    {
+        int i = 0;
+
+        for (cur=v; cur != NULL; cur = cur->next)
+            strs[i++] = (const char*) cur->value;
+
+        *values = strs;
+        *count  = c;
+    }
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsMsgHeader_Keys(natsMsg *msg, const char* **keys, int *count)
+{
+    natsStatus  s     = NATS_OK;
+    const char* *strs = NULL;
+    int         c     = 0;
+
+    if (msg == NULL)
+        return nats_setError(NATS_INVALID_ARG, "%s", "message cannot be NULL");
+
+    if ((keys == NULL) || (count == NULL))
+        return nats_setError(NATS_INVALID_ARG, "%s", "keys or count cannot be NULL");
+
+    *keys  = NULL;
+    *count = 0;
+
+    if ((s = _liftHeaders(msg, false)) != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    if ((msg->headers == NULL) || (c = natsStrHash_Count(msg->headers)) == 0)
+        return NATS_NOT_FOUND; // normal error, so don't update error stack
+
+    strs = NATS_CALLOC(c, sizeof(char*));
+    if (strs == NULL)
+        s = nats_setDefaultError(NATS_NO_MEMORY);
+    else
+    {
+        natsStrHashIter iter;
+        char            *hk = NULL;
+        int             i;
+
+        natsStrHashIter_Init(&iter, msg->headers);
+        for (i=0; natsStrHashIter_Next(&iter, &hk, NULL); i++)
+        {
+            strs[i] = (const char*) hk;
+        }
+        natsStrHashIter_Done(&iter);
+
+        *keys  = strs;
+        *count = c;
+    }
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsMsgHeader_Delete(natsMsg *msg, const char *key)
+{
+    natsStatus      s  = NATS_OK;
+    natsHeaderValue *v = NULL;
+
+    if ((s = _checkMsgAndKey(msg, key)) != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    if ((s = _liftHeaders(msg, false)) != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    if ((msg->headers == NULL) || natsStrHash_Count(msg->headers) == 0)
+        return NATS_NOT_FOUND; // normal error, so don't update error stack
+
+    v = natsStrHash_Remove(msg->headers, (char*) key);
+    if (v == NULL)
+        return NATS_NOT_FOUND; // normal error, so don't update error stack
+
+    natsHeaderValue_free(v, true);
+
+    return s;
+}
+
+void
+natsMsg_freeHeaders(natsMsg *msg)
+{
+    natsStrHashIter iter;
+    void            *p = NULL;
+
+    if (msg->headers == NULL)
+        return;
+
+    natsStrHashIter_Init(&iter, msg->headers);
+    for (;natsStrHashIter_Next(&iter, NULL, &p);)
+    {
+        natsHeaderValue *v = (natsHeaderValue *)p;
+        natsHeaderValue_free(v, true);
+    }
+    natsStrHash_Destroy(msg->headers);
+}
+
+void
+natsMsg_free(void *object)
+{
+    natsMsg *msg;
+
+    if (object == NULL)
+        return;
+
+    msg = (natsMsg*) object;
+    natsMsg_freeHeaders(msg);
+
+    NATS_FREE(msg);
+}
+
+void
+natsMsg_Destroy(natsMsg *msg)
+{
+    if (msg == NULL)
+        return;
+
+    if (natsMsg_isNoDestroy(msg))
+        return;
+
+    if (natsGC_collect((natsGCItem *) msg))
+        return;
+
+    natsMsg_free((void*) msg);
+}
+
+const char*
+natsMsg_GetSubject(const natsMsg *msg)
+{
+    if (msg == NULL)
+        return NULL;
+
+    return (const char*) msg->subject;
+}
+
+const char*
+natsMsg_GetReply(const natsMsg *msg)
+{
+    if (msg == NULL)
+        return NULL;
+
+    return (const char*) msg->reply;
+}
+
+const char*
+natsMsg_GetData(const natsMsg *msg)
+{
+    if (msg == NULL)
+        return NULL;
+
+    return (const char*) msg->data;
+}
+
+int
+natsMsg_GetDataLength(const natsMsg *msg)
+{
+    if (msg == NULL)
+        return 0;
+
+    return msg->dataLen;
+}
+
+uint64_t
+natsMsg_GetSequence(natsMsg *msg)
+{
+    if (msg == NULL)
+        return 0;
+
+    return msg->seq;
+}
+
+int64_t
+natsMsg_GetTime(natsMsg *msg)
+{
+    if (msg == NULL)
+        return 0;
+
+    return msg->time;
+}
+
+natsStatus
+natsMsg_create(natsMsg **newMsg,
+               const char *subject, int subjLen,
+               const char *reply, int replyLen,
+               const char *buf, int bufLen, int hdrLen)
+{
+    natsMsg     *msg      = NULL;
+    char        *ptr      = NULL;
+    int         bufSize   = 0;
+    int         dataLen   = bufLen;
+    bool        hasHdrs   = (hdrLen > 0 ? true : false);
+
+    bufSize  = subjLen;
+    bufSize += 1;
+    if (replyLen > 0)
+    {
+        bufSize += replyLen;
+        bufSize += 1;
+    }
+    bufSize += bufLen;
+    bufSize += 1;
+    if (hasHdrs)
+        bufSize++;
+
+    msg = NATS_MALLOC(sizeof(natsMsg) + bufSize);
+    if (msg == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    // To be safe, we could 'memset' the message up to sizeof(natsMsg),
+    // but since we are explicitly initializing most of the fields, we save
+    // on that call, but we need to make sure what we initialize all fields!!!
+
+    // That being said, we memset the 'gc' structure to protect us in case
+    // some fields are later added to this 'external' structure and we forget
+    // about updating this initialization code.
+    memset(&(msg->gc), 0, sizeof(natsGCItem));
+
+    msg->hdr        = NULL;
+    msg->hdrLen     = 0;
+    msg->flags      = 0;
+    msg->headers    = NULL;
+    msg->sub        = NULL;
+    msg->next       = NULL;
+    msg->seq        = 0;
+    msg->time       = 0;
+
+    ptr = (char*) (((char*) &(msg->next)) + sizeof(msg->next));
+
+    msg->subject = (const char*) ptr;
+    memcpy(ptr, subject, subjLen);
+    ptr += subjLen;
+    *(ptr++) = '\0';
+
+    if (replyLen > 0)
+    {
+        msg->reply = (const char*) ptr;
+        memcpy(ptr, reply, replyLen);
+        ptr += replyLen;
+        *(ptr++) = '\0';
+    }
+    else
+    {
+        msg->reply = NULL;
+    }
+
+    if (hasHdrs)
+    {
+        msg->hdr = ptr;
+        if (buf != NULL)
+        {
+            memcpy(ptr, buf, hdrLen);
+            buf += hdrLen;
+        }
+        ptr += hdrLen;
+        *(ptr++) = '\0';
+
+        msg->hdrLen  = hdrLen;
+        natsMsg_setNeedsLift(msg);
+        dataLen -= hdrLen;
+    }
+    msg->data    = (const char*) ptr;
+    msg->dataLen = dataLen;
+    if (buf != NULL)
+        memcpy(ptr, buf, dataLen);
+    ptr += dataLen;
+    *(ptr) = '\0';
+    // This is essentially to match server's view of a message size
+    // when sending messages to pull consumers and keeping track
+    // of size in regards to a max_bytes setting.
+    msg->wsz = subjLen + replyLen + bufLen;
+
+    // Setting the callback will trigger garbage collection when
+    // natsMsg_Destroy() is invoked.
+    msg->gc.freeCb = natsMsg_free;
+
+    *newMsg = msg;
+
+    return NATS_OK;
+}
+
+// Used internally to initialize a message structure, generally defined on the stack,
+// that will then be passed as a reference to publish functions.
+void
+natsMsg_init(natsMsg *msg, const char *subj, const char *data, int dataLen)
+{
+    memset(msg, 0, sizeof(natsMsg));
+    msg->subject = subj;
+    msg->data = data;
+    msg->dataLen = dataLen;
+}
+
+natsStatus
+natsMsg_Create(natsMsg **newMsg, const char *subj, const char *reply,
+               const char *data, int dataLen)
+{
+    natsStatus  s = NATS_OK;
+
+    if ((subj == NULL)
+        || (subj[0] == '\0')
+        || ((reply != NULL) && (reply[0] == '\0')))
+    {
+        return nats_setDefaultError(NATS_INVALID_ARG);
+    }
+
+    s = natsMsg_create(newMsg,
+                       subj, (int) strlen(subj),
+                       reply, (reply == NULL ? 0 : (int) strlen(reply)),
+                       data, dataLen, -1);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+bool
+natsMsg_IsNoResponders(natsMsg *m)
+{
+    const char *val = NULL;
+
+    // To be a "no responders" message, it has to be of 0 length,
+    // and have a "Status" header with "503" as a value.
+    return ((m != NULL)
+                && (natsMsg_GetDataLength(m) == 0)
+                && (natsMsgHeader_Get(m, STATUS_HDR, &val) == NATS_OK)
+                && (val != NULL)
+                && (strncmp(val, NO_RESP_STATUS, HDR_STATUS_LEN) == 0));
+}
+
+void
+natsMsgList_Destroy(natsMsgList *list)
+{
+    int i;
+
+    if ((list == NULL) || (list->Msgs == NULL))
+        return;
+
+    for (i=0; i < list->Count; i++)
+        natsMsg_Destroy(list->Msgs[i]);
+    NATS_FREE(list->Msgs);
+    list->Msgs = NULL;
+    list->Count = 0;
+}
diff --git a/src/msg.h b/src/msg.h
new file mode 100644 (file)
index 0000000..e01da05
--- /dev/null
+++ b/src/msg.h
@@ -0,0 +1,115 @@
+// Copyright 2015-2022 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef MSG_H_
+#define MSG_H_
+
+#include "status.h"
+#include "gc.h"
+
+#define HDR_LINE_PRE        "NATS/1.0"
+#define HDR_LINE_PRE_LEN    (8)
+#define HDR_LINE            HDR_LINE_PRE _CRLF_
+#define HDR_LINE_LEN        (10)
+#define STATUS_HDR          "Status"
+#define DESCRIPTION_HDR     "Description"
+#define NO_RESP_STATUS      "503"
+#define NOT_FOUND_STATUS    "404"
+#define REQ_TIMEOUT         "408"
+#define CTRL_STATUS         "100"
+#define HDR_STATUS_LEN      (3)
+
+#define natsMsg_setNeedsLift(m)     ((m)->flags  |=  (1 << 0))
+#define natsMsg_needsLift(m)        (((m)->flags &   (1 << 0)) != 0)
+#define natsMsg_clearNeedsLift(m)   ((m)->flags  &= ~(1 << 0))
+
+#define natsMsg_setAcked(m)         ((m)->flags  |=  (1 << 1))
+#define natsMsg_isAcked(m)          (((m)->flags &   (1 << 1)) != 0)
+#define natsMsg_clearAcked(m)       ((m)->flags  &= ~(1 << 1))
+
+#define natsMsg_setNoDestroy(m)     ((m)->flags  |=  (1 << 2))
+#define natsMsg_isNoDestroy(m)      (((m)->flags &   (1 << 2)) != 0)
+#define natsMsg_clearNoDestroy(m)   ((m)->flags  &= ~(1 << 2))
+
+#define natsMsg_setTimeout(m)       ((m)->flags  |=  (1 << 3))
+#define natsMsg_isTimeout(m)        (((m)->flags &   (1 << 3)) != 0)
+#define natsMsg_clearTimeout(m)     ((m)->flags  &= ~(1 << 3))
+
+#define natsMsg_dataAndHdrLen(m)    ((m)->dataLen + (m)->hdrLen)
+
+struct __natsMsg
+{
+    natsGCItem          gc;
+
+    // The message is allocated as a single memory block that contains
+    // this structure and enough space for the headers/payload.
+    // Headers, if any, start after the 'next' pointer, followed by
+    // the message payload.
+    const char          *subject;
+    const char          *reply;
+    char                *hdr;
+    natsStrHash         *headers;
+    const char          *data;
+    int                 dataLen;
+    int                 hdrLen;
+    int                 wsz;
+    int                 flags;
+    uint64_t            seq;
+    int64_t             time;
+
+    // subscription (needed when delivery done by connection,
+    // or for JetStream).
+    struct __natsSubscription *sub;
+
+    // Must be last field!
+    struct __natsMsg    *next;
+
+    // Nothing after this: the message headers/payload goes there.
+
+};
+
+struct __natsHeaderValue;
+
+typedef struct __natsHeaderValue
+{
+    char                        *value;
+    bool                        needFree;
+    struct __natsHeaderValue    *next;
+
+} natsHeaderValue;
+
+int
+natsMsgHeader_encodedLen(natsMsg *msg);
+
+natsStatus
+natsMsgHeader_encode(natsBuffer *buf, natsMsg *msg);
+
+void
+natsMsg_init(natsMsg *msg,
+             const char *subject,
+             const char *data, int dataLen);
+
+natsStatus
+natsMsg_create(natsMsg **newMsg,
+               const char *subject, int subjLen,
+               const char *reply, int replyLen,
+               const char *buf, int bufLen, int hdrLen);
+
+void
+natsMsg_freeHeaders(natsMsg *msg);
+
+// This needs to follow the nats_FreeObjectCb prototype (see gc.h)
+void
+natsMsg_free(void *object);
+
+#endif /* MSG_H_ */
diff --git a/src/nats.c b/src/nats.c
new file mode 100644 (file)
index 0000000..fcaaf0e
--- /dev/null
@@ -0,0 +1,1994 @@
+// Copyright 2015-2021 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "natsp.h"
+#if defined(NATS_HAS_STREAMING)
+#include "stan/stanp.h"
+#endif
+
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#include <inttypes.h>
+#include <assert.h>
+#include <stdarg.h>
+
+#include "mem.h"
+#include "timer.h"
+#include "util.h"
+#include "asynccb.h"
+#include "conn.h"
+#include "sub.h"
+#include "nkeys.h"
+#include "crypto.h"
+
+#define WAIT_LIB_INITIALIZED \
+        natsMutex_Lock(gLib.lock); \
+        while (!(gLib.initialized) && !(gLib.initAborted)) \
+            natsCondition_Wait(gLib.cond, gLib.lock); \
+        natsMutex_Unlock(gLib.lock)
+
+typedef struct natsTLError
+{
+    natsStatus  sts;
+    char        text[256];
+    const char  *func[MAX_FRAMES];
+    int         framesCount;
+    int         skipUpdate;
+
+} natsTLError;
+
+typedef struct __natsLibTimers
+{
+    natsMutex       *lock;
+    natsCondition   *cond;
+    natsThread      *thread;
+    natsTimer       *timers;
+    int             count;
+    bool            changed;
+    bool            shutdown;
+
+} natsLibTimers;
+
+typedef struct __natsLibAsyncCbs
+{
+    natsMutex       *lock;
+    natsCondition   *cond;
+    natsThread      *thread;
+    natsAsyncCbInfo *head;
+    natsAsyncCbInfo *tail;
+    bool            shutdown;
+
+} natsLibAsyncCbs;
+
+typedef struct __natsGCList
+{
+    natsMutex       *lock;
+    natsCondition   *cond;
+    natsThread      *thread;
+    natsGCItem      *head;
+    bool            shutdown;
+    bool            inWait;
+
+} natsGCList;
+
+typedef struct __natsLibDlvWorkers
+{
+    natsMutex           *lock;
+    int                 idx;
+    int                 size;
+    int                 maxSize;
+    natsMsgDlvWorker    **workers;
+
+} natsLibDlvWorkers;
+
+typedef struct __natsLib
+{
+    // Leave these fields before 'refs'
+    natsMutex       *lock;
+    volatile bool   wasOpenedOnce;
+    bool            sslInitialized;
+    natsThreadLocal errTLKey;
+    natsThreadLocal sslTLKey;
+    natsThreadLocal natsThreadKey;
+    bool            initialized;
+    bool            closed;
+    natsCondition   *closeCompleteCond;
+    bool            *closeCompleteBool;
+    bool            closeCompleteSignal;
+    bool            finalCleanup;
+    // Do not move 'refs' without checking _freeLib()
+    int             refs;
+
+    bool            initializing;
+    bool            initAborted;
+    bool            libHandlingMsgDeliveryByDefault;
+    int64_t         libDefaultWriteDeadline;
+
+    natsLibTimers       timers;
+    natsLibAsyncCbs     asyncCbs;
+    natsLibDlvWorkers   dlvWorkers;
+
+    natsCondition   *cond;
+
+    natsGCList      gc;
+
+} natsLib;
+
+int64_t gLockSpinCount = 2000;
+
+static natsInitOnceType gInitOnce = NATS_ONCE_STATIC_INIT;
+static natsLib          gLib;
+
+static void
+_destroyErrTL(void *localStorage)
+{
+    natsTLError *err = (natsTLError*) localStorage;
+
+    NATS_FREE(err);
+}
+
+static void
+_cleanupThreadSSL(void *localStorage)
+{
+#if defined(NATS_HAS_TLS) && !defined(NATS_USE_OPENSSL_1_1)
+    ERR_remove_thread_state(0);
+#endif
+}
+
+static void
+_finalCleanup(void)
+{
+    if (gLib.sslInitialized)
+    {
+#if defined(NATS_HAS_TLS)
+        ERR_free_strings();
+        EVP_cleanup();
+        CRYPTO_cleanup_all_ex_data();
+#if !defined(NATS_USE_OPENSSL_1_1)
+        ERR_remove_thread_state(0);
+#endif
+        sk_SSL_COMP_free(SSL_COMP_get_compression_methods());
+#endif
+        natsThreadLocal_DestroyKey(gLib.sslTLKey);
+    }
+
+    natsThreadLocal_DestroyKey(gLib.errTLKey);
+    natsThreadLocal_DestroyKey(gLib.natsThreadKey);
+    natsMutex_Destroy(gLib.lock);
+    gLib.lock = NULL;
+}
+
+void
+nats_setNATSThreadKey(void)
+{
+    natsThreadLocal_Set(gLib.natsThreadKey, (const void*)1);
+}
+
+void
+nats_ReleaseThreadMemory(void)
+{
+    void *tl = NULL;
+
+    if (!(gLib.wasOpenedOnce))
+        return;
+
+    tl = natsThreadLocal_Get(gLib.errTLKey);
+    if (tl != NULL)
+    {
+        _destroyErrTL(tl);
+        natsThreadLocal_SetEx(gLib.errTLKey, NULL, false);
+    }
+
+    tl = NULL;
+
+    natsMutex_Lock(gLib.lock);
+    if (gLib.sslInitialized)
+    {
+        tl = natsThreadLocal_Get(gLib.sslTLKey);
+        if (tl != NULL)
+        {
+            _cleanupThreadSSL(tl);
+            natsThreadLocal_SetEx(gLib.sslTLKey, NULL, false);
+        }
+    }
+    natsMutex_Unlock(gLib.lock);
+}
+
+#if defined(_WIN32) && _WIN32
+#ifndef NATS_STATIC
+BOOL WINAPI DllMain(HINSTANCE hinstDLL, // DLL module handle
+     DWORD fdwReason,                   // reason called
+     LPVOID lpvReserved)                // reserved
+{
+    switch (fdwReason)
+    {
+        // For applications linking dynamically NATS library,
+        // release thread-local memory for user-created threads.
+        // For portable applications, the user should manually call
+        // nats_ReleaseThreadMemory() before the thread returns so
+        // that no memory is leaked regardless if they link statically
+        // or dynamically. It is safe to call nats_ReleaseThreadMemory()
+        // twice for the same threads.
+        case DLL_THREAD_DETACH:
+        {
+            nats_ReleaseThreadMemory();
+            break;
+        }
+        default:
+            break;
+    }
+
+    return TRUE;
+    UNREFERENCED_PARAMETER(hinstDLL);
+    UNREFERENCED_PARAMETER(lpvReserved);
+}
+#endif
+#endif
+
+static void
+natsLib_Destructor(void)
+{
+    int refs = 0;
+
+    if (!(gLib.wasOpenedOnce))
+        return;
+
+    // Destroy thread locals for the current thread.
+    nats_ReleaseThreadMemory();
+
+    // Do the final cleanup if possible
+    natsMutex_Lock(gLib.lock);
+    refs = gLib.refs;
+    if (refs > 0)
+    {
+        // If some thread is still around when the process exits and has a
+        // reference to the library, then don't do the final cleanup now.
+        // If the process has not fully exited when the lib's last reference
+        // is decremented, the final cleanup will be executed from that thread.
+        gLib.finalCleanup = true;
+    }
+    natsMutex_Unlock(gLib.lock);
+
+    if (refs != 0)
+        return;
+
+    _finalCleanup();
+}
+
+static void
+_freeTimers(void)
+{
+    natsLibTimers *timers = &(gLib.timers);
+
+    natsThread_Destroy(timers->thread);
+    natsCondition_Destroy(timers->cond);
+    natsMutex_Destroy(timers->lock);
+}
+
+static void
+_freeAsyncCbs(void)
+{
+    natsLibAsyncCbs *cbs = &(gLib.asyncCbs);
+
+    natsThread_Destroy(cbs->thread);
+    natsCondition_Destroy(cbs->cond);
+    natsMutex_Destroy(cbs->lock);
+}
+
+static void
+_freeGC(void)
+{
+    natsGCList *gc = &(gLib.gc);
+
+    natsThread_Destroy(gc->thread);
+    natsCondition_Destroy(gc->cond);
+    natsMutex_Destroy(gc->lock);
+}
+
+static void
+_freeDlvWorker(natsMsgDlvWorker *worker)
+{
+    natsThread_Destroy(worker->thread);
+    natsCondition_Destroy(worker->cond);
+    natsMutex_Destroy(worker->lock);
+    NATS_FREE(worker);
+}
+
+static void
+_freeDlvWorkers(void)
+{
+    int i;
+    natsLibDlvWorkers *workers = &(gLib.dlvWorkers);
+
+    for (i=0; i<workers->size; i++)
+        _freeDlvWorker(workers->workers[i]);
+
+    NATS_FREE(workers->workers);
+    natsMutex_Destroy(workers->lock);
+    workers->idx     = 0;
+    workers->size    = 0;
+    workers->workers = NULL;
+}
+
+static void
+_freeLib(void)
+{
+    const unsigned int offset = (unsigned int) offsetof(natsLib, refs);
+    bool               callFinalCleanup = false;
+
+    _freeTimers();
+    _freeAsyncCbs();
+    _freeGC();
+    _freeDlvWorkers();
+    natsNUID_free();
+
+    natsCondition_Destroy(gLib.cond);
+
+    memset((void*) (offset + (char*)&gLib), 0, sizeof(natsLib) - offset);
+
+    natsMutex_Lock(gLib.lock);
+    callFinalCleanup = gLib.finalCleanup;
+    if (gLib.closeCompleteCond != NULL)
+    {
+        if (gLib.closeCompleteSignal)
+        {
+            *gLib.closeCompleteBool = true;
+            natsCondition_Signal(gLib.closeCompleteCond);
+        }
+        gLib.closeCompleteCond   = NULL;
+        gLib.closeCompleteBool   = NULL;
+        gLib.closeCompleteSignal = false;
+    }
+    gLib.closed      = false;
+    gLib.initialized = false;
+    gLib.finalCleanup= false;
+    natsMutex_Unlock(gLib.lock);
+
+    if (callFinalCleanup)
+        _finalCleanup();
+}
+
+void
+natsLib_Retain(void)
+{
+    natsMutex_Lock(gLib.lock);
+
+    gLib.refs++;
+
+    natsMutex_Unlock(gLib.lock);
+}
+
+void
+natsLib_Release(void)
+{
+    int refs = 0;
+
+    natsMutex_Lock(gLib.lock);
+
+    refs = --(gLib.refs);
+
+    natsMutex_Unlock(gLib.lock);
+
+    if (refs == 0)
+        _freeLib();
+}
+
+static void
+_doInitOnce(void)
+{
+    natsStatus s;
+
+    memset(&gLib, 0, sizeof(natsLib));
+
+    s = natsMutex_Create(&(gLib.lock));
+    if (s == NATS_OK)
+        s = natsThreadLocal_CreateKey(&(gLib.errTLKey), _destroyErrTL);
+    if (s == NATS_OK)
+        s = natsThreadLocal_CreateKey(&(gLib.natsThreadKey), NULL);
+    if (s != NATS_OK)
+    {
+        fprintf(stderr, "FATAL ERROR: Unable to initialize library!\n");
+        fflush(stderr);
+        abort();
+    }
+
+    natsSys_Init();
+
+    // Setup a hook for when the process exits.
+    atexit(natsLib_Destructor);
+}
+
+static void
+_insertTimer(natsTimer *t)
+{
+    natsTimer *cur  = gLib.timers.timers;
+    natsTimer *prev = NULL;
+
+    while ((cur != NULL) && (cur->absoluteTime <= t->absoluteTime))
+    {
+        prev = cur;
+        cur  = cur->next;
+    }
+
+    if (cur != NULL)
+    {
+        t->prev = prev;
+        t->next = cur;
+        cur->prev = t;
+
+        if (prev != NULL)
+            prev->next = t;
+    }
+    else if (prev != NULL)
+    {
+        prev->next = t;
+        t->prev = prev;
+        t->next = NULL;
+    }
+
+    if (prev == NULL)
+        gLib.timers.timers = t;
+}
+
+// Locks must be held before entering this function
+static void
+_removeTimer(natsLibTimers *timers, natsTimer *t)
+{
+    // Switch flag
+    t->stopped = true;
+
+    // It the timer was in the callback, it has already been removed from the
+    // list, so skip that.
+    if (!(t->inCallback))
+    {
+        if (t->prev != NULL)
+            t->prev->next = t->next;
+        if (t->next != NULL)
+            t->next->prev = t->prev;
+
+        if (t == gLib.timers.timers)
+            gLib.timers.timers = t->next;
+
+        t->prev = NULL;
+        t->next = NULL;
+    }
+
+    // Decrease the global count of timers
+    timers->count--;
+}
+
+int64_t
+nats_setTargetTime(int64_t timeout)
+{
+    int64_t target = nats_Now() + timeout;
+    if (target < 0)
+        target = 0x7FFFFFFFFFFFFFFF;
+    return target;
+}
+
+void
+nats_resetTimer(natsTimer *t, int64_t newInterval)
+{
+    natsLibTimers *timers = &(gLib.timers);
+
+    natsMutex_Lock(timers->lock);
+    natsMutex_Lock(t->mu);
+
+    // If timer is active, we need first to remove it. This call does the
+    // right thing if the timer is in the callback.
+    if (!(t->stopped))
+        _removeTimer(timers, t);
+
+    // Bump the timer's global count (it as decreased in the _removeTimers call
+    timers->count++;
+
+    // Switch stopped flag
+    t->stopped = false;
+
+    // Set the new interval (may be same than it was before, but that's ok)
+    t->interval = newInterval;
+
+    // If the timer is in the callback, the insertion and setting of the
+    // absolute time will be done by the timer thread when returning from
+    // the timer's callback.
+    if (!(t->inCallback))
+    {
+        t->absoluteTime = nats_setTargetTime(t->interval);
+        _insertTimer(t);
+    }
+
+    natsMutex_Unlock(t->mu);
+
+    if (!(timers->changed))
+        natsCondition_Signal(timers->cond);
+
+    timers->changed = true;
+
+    natsMutex_Unlock(timers->lock);
+}
+
+void
+nats_stopTimer(natsTimer *t)
+{
+    natsLibTimers   *timers = &(gLib.timers);
+    bool            doCb    = false;
+
+    natsMutex_Lock(timers->lock);
+    natsMutex_Lock(t->mu);
+
+    // If the timer was already stopped, nothing to do.
+    if (t->stopped)
+    {
+        natsMutex_Unlock(t->mu);
+        natsMutex_Unlock(timers->lock);
+
+        return;
+    }
+
+    _removeTimer(timers, t);
+
+    doCb = (!(t->inCallback) && (t->stopCb != NULL));
+
+    natsMutex_Unlock(t->mu);
+
+    if (!(timers->changed))
+        natsCondition_Signal(timers->cond);
+
+    timers->changed = true;
+
+    natsMutex_Unlock(timers->lock);
+
+    if (doCb)
+        (*(t->stopCb))(t, t->closure);
+}
+
+int
+nats_getTimersCount(void)
+{
+    int         count = 0;
+
+    natsMutex_Lock(gLib.timers.lock);
+
+    count = gLib.timers.count;
+
+    natsMutex_Unlock(gLib.timers.lock);
+
+    return count;
+}
+
+int
+nats_getTimersCountInList(void)
+{
+    int         count = 0;
+    natsTimer   *t;
+
+    natsMutex_Lock(gLib.timers.lock);
+
+    t = gLib.timers.timers;
+    while (t != NULL)
+    {
+        count++;
+        t = t->next;
+    }
+
+    natsMutex_Unlock(gLib.timers.lock);
+
+    return count;
+}
+
+
+static void
+_timerThread(void *arg)
+{
+    natsLibTimers   *timers = &(gLib.timers);
+    natsTimer       *t      = NULL;
+    natsStatus      s       = NATS_OK;
+    bool            doStopCb;
+    int64_t         target;
+
+    WAIT_LIB_INITIALIZED;
+
+    natsMutex_Lock(timers->lock);
+
+    while (!(timers->shutdown))
+    {
+        // Take the first timer that needs to fire.
+        t = timers->timers;
+
+        if (t == NULL)
+        {
+            // No timer, fire in an hour...
+            target = nats_setTargetTime(3600 * 1000);
+        }
+        else
+        {
+            target = t->absoluteTime;
+        }
+
+        timers->changed = false;
+
+        s = NATS_OK;
+
+        while (!(timers->shutdown)
+               && (s != NATS_TIMEOUT)
+               && !(timers->changed))
+        {
+            s = natsCondition_AbsoluteTimedWait(timers->cond, timers->lock,
+                                                target);
+        }
+
+        if (timers->shutdown)
+            break;
+
+        if ((t == NULL) || timers->changed)
+            continue;
+
+        natsMutex_Lock(t->mu);
+
+        // Remove timer from the list:
+        timers->timers = t->next;
+        if (t->next != NULL)
+            t->next->prev = NULL;
+
+        t->prev = NULL;
+        t->next = NULL;
+
+        t->inCallback = true;
+
+        // Retain the timer, since we are going to release the locks for the
+        // callback. The user may "destroy" the timer from there, so we need
+        // to be protected with reference counting.
+        t->refs++;
+
+        natsMutex_Unlock(t->mu);
+        natsMutex_Unlock(timers->lock);
+
+        (*(t->cb))(t, t->closure);
+
+        natsMutex_Lock(timers->lock);
+        natsMutex_Lock(t->mu);
+
+        t->inCallback = false;
+
+        // Timer may have been stopped from within the callback, or during
+        // the window the locks were released.
+        doStopCb = (t->stopped && (t->stopCb != NULL));
+
+        // If not stopped, we need to put it back in our list
+        if (!doStopCb)
+        {
+            // Reset our view of what is the time this timer should fire
+            // because:
+            // 1- the callback may have taken longer than it should
+            // 2- the user may have called Reset() with a new interval
+            t->absoluteTime = nats_setTargetTime(t->interval);
+            _insertTimer(t);
+        }
+
+        natsMutex_Unlock(t->mu);
+        natsMutex_Unlock(timers->lock);
+
+        if (doStopCb)
+            (*(t->stopCb))(t, t->closure);
+
+        // Compensate for the retain that we made before invoking the timer's
+        // callback
+        natsTimer_Release(t);
+
+        natsMutex_Lock(timers->lock);
+    }
+
+    // Process the timers that were left in the list (not stopped) when the
+    // library is shutdown.
+    while ((t = timers->timers) != NULL)
+    {
+        natsMutex_Lock(t->mu);
+
+        // Check if we should invoke the callback. Note that although we are
+        // releasing the locks below, a timer present in the list here is
+        // guaranteed not to have been stopped (because it would not be in
+        // the list otherwise, since there is no chance that it is in the
+        // timer's callback). So just check if there is a stopCb to invoke.
+        doStopCb = (t->stopCb != NULL);
+
+        // Remove the timer from the list.
+        _removeTimer(timers, t);
+
+        natsMutex_Unlock(t->mu);
+        natsMutex_Unlock(timers->lock);
+
+        // Invoke the callback now.
+        if (doStopCb)
+            (*(t->stopCb))(t, t->closure);
+
+        // No release of the timer here. The user is still responsible to call
+        // natsTimer_Destroy().
+
+        natsMutex_Lock(timers->lock);
+    }
+
+    natsMutex_Unlock(timers->lock);
+
+    natsLib_Release();
+}
+
+static void
+_asyncCbsThread(void *arg)
+{
+    natsLibAsyncCbs *asyncCbs = &(gLib.asyncCbs);
+    natsAsyncCbInfo *cb       = NULL;
+    natsConnection  *nc       = NULL;
+#if defined(NATS_HAS_STREAMING)
+    stanConnection  *sc       = NULL;
+#endif
+
+    WAIT_LIB_INITIALIZED;
+
+    natsMutex_Lock(asyncCbs->lock);
+
+    // We want all callbacks to be invoked even on shutdown
+    while (true)
+    {
+        while (((cb = asyncCbs->head) == NULL) && !asyncCbs->shutdown)
+            natsCondition_Wait(asyncCbs->cond, asyncCbs->lock);
+
+        if ((cb == NULL) && asyncCbs->shutdown)
+            break;
+
+        asyncCbs->head = cb->next;
+
+        if (asyncCbs->tail == cb)
+            asyncCbs->tail = NULL;
+
+        cb->next = NULL;
+
+        natsMutex_Unlock(asyncCbs->lock);
+
+        nc = cb->nc;
+#if defined(NATS_HAS_STREAMING)
+        sc = cb->sc;
+#endif
+
+        switch (cb->type)
+        {
+            case ASYNC_CLOSED:
+               (*(nc->opts->closedCb))(nc, nc->opts->closedCbClosure);
+               break;
+            case ASYNC_DISCONNECTED:
+                (*(nc->opts->disconnectedCb))(nc, nc->opts->disconnectedCbClosure);
+                break;
+            case ASYNC_RECONNECTED:
+                (*(nc->opts->reconnectedCb))(nc, nc->opts->reconnectedCbClosure);
+                break;
+            case ASYNC_CONNECTED:
+                (*(nc->opts->connectedCb))(nc, nc->opts->connectedCbClosure);
+                break;
+            case ASYNC_DISCOVERED_SERVERS:
+                (*(nc->opts->discoveredServersCb))(nc, nc->opts->discoveredServersClosure);
+                break;
+            case ASYNC_LAME_DUCK_MODE:
+                (*(nc->opts->lameDuckCb))(nc, nc->opts->lameDuckClosure);
+                break;
+            case ASYNC_ERROR:
+            {
+                if (cb->errTxt != NULL)
+                    nats_setErrStatusAndTxt(cb->err, cb->errTxt);
+                (*(nc->opts->asyncErrCb))(nc, cb->sub, cb->err, nc->opts->asyncErrCbClosure);
+                break;
+            }
+#if defined(NATS_HAS_STREAMING)
+            case ASYNC_STAN_CONN_LOST:
+                (*(sc->opts->connectionLostCB))(sc, sc->connLostErrTxt, sc->opts->connectionLostCBClosure);
+                break;
+#endif
+            default:
+                break;
+        }
+
+        natsAsyncCb_Destroy(cb);
+        nats_clearLastError();
+
+        natsMutex_Lock(asyncCbs->lock);
+    }
+
+    natsMutex_Unlock(asyncCbs->lock);
+
+    natsLib_Release();
+}
+
+natsStatus
+nats_postAsyncCbInfo(natsAsyncCbInfo *info)
+{
+    natsMutex_Lock(gLib.asyncCbs.lock);
+
+    if (gLib.asyncCbs.shutdown)
+    {
+        natsMutex_Unlock(gLib.asyncCbs.lock);
+        return NATS_NOT_INITIALIZED;
+    }
+
+    info->next = NULL;
+
+    if (gLib.asyncCbs.head == NULL)
+        gLib.asyncCbs.head = info;
+
+    if (gLib.asyncCbs.tail != NULL)
+        gLib.asyncCbs.tail->next = info;
+
+    gLib.asyncCbs.tail = info;
+
+    natsCondition_Signal(gLib.asyncCbs.cond);
+
+    natsMutex_Unlock(gLib.asyncCbs.lock);
+
+    return NATS_OK;
+}
+
+static void
+_garbageCollector(void *closure)
+{
+    natsGCList *gc = &(gLib.gc);
+    natsGCItem *item;
+    natsGCItem *list;
+
+    WAIT_LIB_INITIALIZED;
+
+    natsMutex_Lock(gc->lock);
+
+    // Process all elements in the list, even on shutdown
+    while (true)
+    {
+        // Go into wait until we are notified to shutdown
+        // or there is something to garbage collect
+        gc->inWait = true;
+
+        while (!(gc->shutdown) && (gc->head == NULL))
+        {
+            natsCondition_Wait(gc->cond, gc->lock);
+        }
+
+        // Out of the wait. Setting this boolean avoids unnecessary
+        // signaling when an item is added to the collector.
+        gc->inWait = false;
+
+        // Do not break out on shutdown here, we want to clear the list,
+        // even on exit so that valgrind and the like are happy.
+
+        // Under the lock, we will switch to a local list and reset the
+        // GC's list (so that others can add to the list without contention
+        // (at least from the GC itself).
+        do
+        {
+            list = gc->head;
+            gc->head = NULL;
+
+            natsMutex_Unlock(gc->lock);
+
+            // Now that we are outside of the lock, we can empty the list.
+            while ((item = list) != NULL)
+            {
+                // Pops item from the beginning of the list.
+                list = item->next;
+                item->next = NULL;
+
+                // Invoke the freeCb associated with this object
+                (*(item->freeCb))((void*) item);
+            }
+
+            natsMutex_Lock(gc->lock);
+        }
+        while (gc->head != NULL);
+
+        // If we were ask to shutdown and since the list is now empty, exit
+        if (gc->shutdown)
+            break;
+    }
+
+    natsMutex_Unlock(gc->lock);
+
+    natsLib_Release();
+}
+
+bool
+natsGC_collect(natsGCItem *item)
+{
+    natsGCList  *gc;
+    bool        signal;
+
+    // If the object was not setup for garbage collection, return false
+    // so the caller frees the object.
+    if (item->freeCb == NULL)
+        return false;
+
+    gc = &(gLib.gc);
+
+    natsMutex_Lock(gc->lock);
+
+    // We will signal only if the GC is in the condition wait.
+    signal = gc->inWait;
+
+    // Add to the front of the list.
+    item->next = gc->head;
+
+    // Update head.
+    gc->head = item;
+
+    if (signal)
+        natsCondition_Signal(gc->cond);
+
+    natsMutex_Unlock(gc->lock);
+
+    return true;
+}
+
+static void
+_libTearDown(void)
+{
+    int i;
+
+    for (i=0; i<gLib.dlvWorkers.size; i++)
+    {
+        natsMsgDlvWorker *worker = gLib.dlvWorkers.workers[i];
+        if (worker->thread != NULL)
+            natsThread_Join(worker->thread);
+    }
+
+    if (gLib.timers.thread != NULL)
+        natsThread_Join(gLib.timers.thread);
+
+    if (gLib.asyncCbs.thread != NULL)
+        natsThread_Join(gLib.asyncCbs.thread);
+
+    if (gLib.gc.thread != NULL)
+        natsThread_Join(gLib.gc.thread);
+
+    natsLib_Release();
+}
+
+natsStatus
+nats_Open(int64_t lockSpinCount)
+{
+    natsStatus s = NATS_OK;
+
+    if (!nats_InitOnce(&gInitOnce, _doInitOnce))
+        return NATS_FAILED_TO_INITIALIZE;
+
+    natsMutex_Lock(gLib.lock);
+
+    if (gLib.closed || gLib.initialized || gLib.initializing)
+    {
+        if (gLib.closed)
+            s = NATS_FAILED_TO_INITIALIZE;
+        else if (gLib.initializing)
+            s = NATS_ILLEGAL_STATE;
+
+        natsMutex_Unlock(gLib.lock);
+        return s;
+    }
+
+    gLib.initializing = true;
+    gLib.initAborted = false;
+
+#if !defined(_WIN32)
+    signal(SIGPIPE, SIG_IGN);
+#endif
+
+    srand((unsigned int) nats_NowInNanoSeconds());
+
+    gLib.refs = 1;
+
+    // If the caller specifies negative value, then we use the default
+    if (lockSpinCount >= 0)
+        gLockSpinCount = lockSpinCount;
+
+    nats_Base32_Init();
+
+    s = natsCondition_Create(&(gLib.cond));
+
+    if (s == NATS_OK)
+        s = natsCrypto_Init();
+
+    if (s == NATS_OK)
+        s = natsMutex_Create(&(gLib.timers.lock));
+    if (s == NATS_OK)
+        s = natsCondition_Create(&(gLib.timers.cond));
+    if (s == NATS_OK)
+    {
+        s = natsThread_Create(&(gLib.timers.thread), _timerThread, NULL);
+        if (s == NATS_OK)
+            gLib.refs++;
+    }
+
+    if (s == NATS_OK)
+        s = natsMutex_Create(&(gLib.asyncCbs.lock));
+    if (s == NATS_OK)
+        s = natsCondition_Create(&(gLib.asyncCbs.cond));
+    if (s == NATS_OK)
+    {
+        s = natsThread_Create(&(gLib.asyncCbs.thread), _asyncCbsThread, NULL);
+        if (s == NATS_OK)
+            gLib.refs++;
+    }
+    if (s == NATS_OK)
+        s = natsMutex_Create(&(gLib.gc.lock));
+    if (s == NATS_OK)
+        s = natsCondition_Create(&(gLib.gc.cond));
+    if (s == NATS_OK)
+    {
+        s = natsThread_Create(&(gLib.gc.thread), _garbageCollector, NULL);
+        if (s == NATS_OK)
+            gLib.refs++;
+    }
+    if (s == NATS_OK)
+        s = natsNUID_init();
+
+    if (s == NATS_OK)
+        s = natsMutex_Create(&(gLib.dlvWorkers.lock));
+    if (s == NATS_OK)
+    {
+        char *defaultWriteDeadlineStr = getenv("NATS_DEFAULT_LIB_WRITE_DEADLINE");
+
+        if (defaultWriteDeadlineStr != NULL)
+            gLib.libDefaultWriteDeadline = (int64_t) atol(defaultWriteDeadlineStr);
+
+        gLib.libHandlingMsgDeliveryByDefault = (getenv("NATS_DEFAULT_TO_LIB_MSG_DELIVERY") != NULL ? true : false);
+        gLib.dlvWorkers.maxSize = 1;
+        gLib.dlvWorkers.workers = NATS_CALLOC(gLib.dlvWorkers.maxSize, sizeof(natsMsgDlvWorker*));
+        if (gLib.dlvWorkers.workers == NULL)
+            s = NATS_NO_MEMORY;
+    }
+
+    if (s == NATS_OK)
+        gLib.initialized = true;
+
+    // In case of success or error, broadcast so that lib's threads
+    // can proceed.
+    if (gLib.cond != NULL)
+    {
+        if (s != NATS_OK)
+        {
+            gLib.initAborted = true;
+            gLib.timers.shutdown = true;
+            gLib.asyncCbs.shutdown = true;
+            gLib.gc.shutdown = true;
+        }
+        natsCondition_Broadcast(gLib.cond);
+    }
+
+    gLib.initializing  = false;
+    gLib.wasOpenedOnce = true;
+
+    natsMutex_Unlock(gLib.lock);
+
+    if (s != NATS_OK)
+        _libTearDown();
+
+    return s;
+}
+
+natsStatus
+natsInbox_Create(natsInbox **newInbox)
+{
+    natsStatus  s;
+    char        *inbox = NULL;
+    const int   size   = NATS_DEFAULT_INBOX_PRE_LEN + NUID_BUFFER_LEN + 1;
+
+    s = nats_Open(-1);
+    if (s != NATS_OK)
+        return s;
+
+    inbox = NATS_MALLOC(size);
+    if (inbox == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    memcpy(inbox, NATS_DEFAULT_INBOX_PRE, NATS_DEFAULT_INBOX_PRE_LEN);
+    s = natsNUID_Next(inbox + NATS_DEFAULT_INBOX_PRE_LEN, NUID_BUFFER_LEN + 1);
+    if (s == NATS_OK)
+    {
+        inbox[size-1] = '\0';
+        *newInbox = (natsInbox*) inbox;
+    }
+    else
+        NATS_FREE(inbox);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+void
+natsInbox_Destroy(natsInbox *inbox)
+{
+    if (inbox == NULL)
+        return;
+
+    NATS_FREE(inbox);
+}
+
+
+static natsStatus
+_close(bool wait, int64_t timeout)
+{
+    natsStatus      s        = NATS_OK;
+    natsCondition   *cond    = NULL;
+    bool            complete = false;
+    int             i;
+
+    // This is to protect against a call to nats_Close() while there
+    // was no prior call to nats_Open(), either directly or indirectly.
+    if (!nats_InitOnce(&gInitOnce, _doInitOnce))
+        return NATS_ERR;
+
+    natsMutex_Lock(gLib.lock);
+
+    if (gLib.closed || !gLib.initialized)
+    {
+        bool closed = gLib.closed;
+
+        natsMutex_Unlock(gLib.lock);
+
+        if (closed)
+            return NATS_ILLEGAL_STATE;
+        return NATS_NOT_INITIALIZED;
+    }
+    if (wait)
+    {
+        if (natsThreadLocal_Get(gLib.natsThreadKey) != NULL)
+            s = NATS_ILLEGAL_STATE;
+        if (s == NATS_OK)
+            s = natsCondition_Create(&cond);
+        if (s != NATS_OK)
+        {
+            natsMutex_Unlock(gLib.lock);
+            return s;
+        }
+        gLib.closeCompleteCond   = cond;
+        gLib.closeCompleteBool   = &complete;
+        gLib.closeCompleteSignal = true;
+    }
+
+    gLib.closed = true;
+
+    natsMutex_Lock(gLib.timers.lock);
+    gLib.timers.shutdown = true;
+    natsCondition_Signal(gLib.timers.cond);
+    natsMutex_Unlock(gLib.timers.lock);
+
+    natsMutex_Lock(gLib.asyncCbs.lock);
+    gLib.asyncCbs.shutdown = true;
+    natsCondition_Signal(gLib.asyncCbs.cond);
+    natsMutex_Unlock(gLib.asyncCbs.lock);
+
+    natsMutex_Lock(gLib.gc.lock);
+    gLib.gc.shutdown = true;
+    natsCondition_Signal(gLib.gc.cond);
+    natsMutex_Unlock(gLib.gc.lock);
+
+    natsMutex_Lock(gLib.dlvWorkers.lock);
+    for (i=0; i<gLib.dlvWorkers.size; i++)
+    {
+        natsMsgDlvWorker *worker = gLib.dlvWorkers.workers[i];
+        natsMutex_Lock(worker->lock);
+        worker->shutdown = true;
+        natsCondition_Signal(worker->cond);
+        natsMutex_Unlock(worker->lock);
+    }
+    natsMutex_Unlock(gLib.dlvWorkers.lock);
+
+    natsMutex_Unlock(gLib.lock);
+
+    nats_ReleaseThreadMemory();
+    _libTearDown();
+
+    if (wait)
+    {
+        natsMutex_Lock(gLib.lock);
+        while ((s != NATS_TIMEOUT) && !complete)
+        {
+            if (timeout <= 0)
+                natsCondition_Wait(cond, gLib.lock);
+            else
+                s = natsCondition_TimedWait(cond, gLib.lock, timeout);
+        }
+        if (s != NATS_OK)
+            gLib.closeCompleteSignal = false;
+        natsMutex_Unlock(gLib.lock);
+
+        natsCondition_Destroy(cond);
+    }
+
+    return s;
+}
+
+void
+nats_Close(void)
+{
+    _close(false, true);
+}
+
+natsStatus
+nats_CloseAndWait(int64_t timeout)
+{
+    return _close(true, timeout);
+}
+
+const char*
+nats_GetVersion(void)
+{
+    return LIB_NATS_VERSION_STRING;
+}
+
+uint32_t
+nats_GetVersionNumber(void)
+{
+    return LIB_NATS_VERSION_NUMBER;
+}
+
+static void
+_versionGetString(char *buffer, size_t bufLen, uint32_t verNumber)
+{
+    snprintf(buffer, bufLen, "%u.%u.%u",
+             ((verNumber >> 16) & 0xF),
+             ((verNumber >> 8) & 0xF),
+             (verNumber & 0xF));
+}
+
+bool
+nats_CheckCompatibilityImpl(uint32_t headerReqVerNumber, uint32_t headerVerNumber,
+                            const char *headerVerString)
+{
+    if ((headerVerNumber < LIB_NATS_VERSION_REQUIRED_NUMBER)
+        || (headerReqVerNumber > LIB_NATS_VERSION_NUMBER))
+    {
+        char reqVerString[10];
+        char libReqVerString[10];
+
+        _versionGetString(reqVerString, sizeof(reqVerString), headerReqVerNumber);
+        _versionGetString(libReqVerString, sizeof(libReqVerString), NATS_VERSION_REQUIRED_NUMBER);
+
+        printf("Incompatible versions:\n" \
+               "Header : %s (requires %s)\n" \
+               "Library: %s (requires %s)\n",
+               headerVerString, reqVerString,
+               NATS_VERSION_STRING, libReqVerString);
+        exit(1);
+    }
+
+    return true;
+}
+
+static natsTLError*
+_getTLError(void)
+{
+    natsTLError *errTL   = NULL;
+    bool        needFree = false;
+
+    // The library should already be initialized, but let's protect against
+    // situations where foo() invokes bar(), which invokes baz(), which
+    // invokes nats_Open(). If that last call fails, when we un-wind down
+    // to foo(), it may be difficult to know that nats_Open() failed and
+    // that we should not try to invoke natsLib_setError. So we check again
+    // here that the library has been initialized properly, and if not, we
+    // simply don't set the error.
+    if (nats_Open(-1) != NATS_OK)
+        return NULL;
+
+    errTL = natsThreadLocal_Get(gLib.errTLKey);
+    if (errTL == NULL)
+    {
+        errTL = (natsTLError*) NATS_CALLOC(1, sizeof(natsTLError));
+        if (errTL != NULL)
+            errTL->framesCount = -1;
+        needFree = (errTL != NULL);
+
+    }
+
+    if ((errTL != NULL)
+        && (natsThreadLocal_SetEx(gLib.errTLKey,
+                                  (const void*) errTL, false) != NATS_OK))
+    {
+        if (needFree)
+            NATS_FREE(errTL);
+
+        errTL = NULL;
+    }
+
+    return errTL;
+}
+
+static char*
+_getErrorShortFileName(const char* fileName)
+{
+    char *file = strstr(fileName, "src");
+
+    if (file != NULL)
+        file = (file + 4);
+    else
+        file = (char*) fileName;
+
+    return file;
+}
+
+static void
+_updateStack(natsTLError *errTL, const char *funcName, natsStatus errSts,
+             bool calledFromSetError)
+{
+    int idx;
+
+    idx = errTL->framesCount;
+    if ((idx >= 0)
+        && (idx < MAX_FRAMES)
+        && (strcmp(errTL->func[idx], funcName) == 0))
+    {
+        return;
+    }
+
+    // In case no error was already set...
+    if ((errTL->framesCount == -1) && !calledFromSetError)
+        errTL->sts = errSts;
+
+    idx = ++(errTL->framesCount);
+
+    if (idx >= MAX_FRAMES)
+        return;
+
+    errTL->func[idx] = funcName;
+}
+
+#if !defined(_WIN32)
+__attribute__ ((format (printf, 5, 6)))
+#endif
+natsStatus
+nats_setErrorReal(const char *fileName, const char *funcName, int line, natsStatus errSts, const char *errTxtFmt, ...)
+{
+    natsTLError *errTL  = _getTLError();
+    char        tmp[256];
+    va_list     ap;
+    int         n;
+
+    if ((errTL == NULL) || errTL->skipUpdate)
+        return errSts;
+
+    errTL->sts = errSts;
+    errTL->framesCount = -1;
+
+    tmp[0] = '\0';
+
+    va_start(ap, errTxtFmt);
+    nats_vsnprintf(tmp, sizeof(tmp), errTxtFmt, ap);
+    va_end(ap);
+
+    if (strlen(tmp) > 0)
+    {
+        n = snprintf(errTL->text, sizeof(errTL->text), "(%s:%d): %s",
+                     _getErrorShortFileName(fileName), line, tmp);
+        if ((n < 0) || (n >= (int) sizeof(errTL->text)))
+        {
+            int pos = ((int) strlen(errTL->text)) - 1;
+            int i;
+
+            for (i=0; i<3; i++)
+                errTL->text[pos--] = '.';
+        }
+    }
+
+    _updateStack(errTL, funcName, errSts, true);
+
+    return errSts;
+}
+
+#if !defined(_WIN32)
+__attribute__ ((format (printf, 4, 5)))
+#endif
+void
+nats_updateErrTxt(const char *fileName, const char *funcName, int line, const char *errTxtFmt, ...)
+{
+    natsTLError *errTL  = _getTLError();
+    char        tmp[256];
+    va_list     ap;
+    int         n;
+
+    if ((errTL == NULL) || errTL->skipUpdate)
+        return;
+
+    tmp[0] = '\0';
+
+    va_start(ap, errTxtFmt);
+    nats_vsnprintf(tmp, sizeof(tmp), errTxtFmt, ap);
+    va_end(ap);
+
+    if (strlen(tmp) > 0)
+    {
+        n = snprintf(errTL->text, sizeof(errTL->text), "(%s:%d): %s",
+                     _getErrorShortFileName(fileName), line, tmp);
+        if ((n < 0) || (n >= (int) sizeof(errTL->text)))
+        {
+            int pos = ((int) strlen(errTL->text)) - 1;
+            int i;
+
+            for (i=0; i<3; i++)
+                errTL->text[pos--] = '.';
+        }
+    }
+}
+
+void
+nats_setErrStatusAndTxt(natsStatus err, const char *errTxt)
+{
+    natsTLError *errTL  = _getTLError();
+
+    if ((errTL == NULL) || errTL->skipUpdate)
+        return;
+
+    errTL->sts         = err;
+    snprintf(errTL->text, sizeof(errTL->text), "%s", errTxt);
+    errTL->framesCount = -1;
+}
+
+natsStatus
+nats_updateErrStack(natsStatus err, const char *func)
+{
+    natsTLError *errTL = _getTLError();
+
+    if ((errTL == NULL) || errTL->skipUpdate)
+        return err;
+
+    _updateStack(errTL, func, err, false);
+
+    return err;
+}
+
+void
+nats_clearLastError(void)
+{
+    natsTLError *errTL  = _getTLError();
+
+    if ((errTL == NULL) || errTL->skipUpdate)
+        return;
+
+    errTL->sts         = NATS_OK;
+    errTL->text[0]     = '\0';
+    errTL->framesCount = -1;
+}
+
+void
+nats_doNotUpdateErrStack(bool skipStackUpdate)
+{
+    natsTLError *errTL  = _getTLError();
+
+    if (errTL == NULL)
+        return;
+
+    if (skipStackUpdate)
+    {
+        errTL->skipUpdate++;
+    }
+    else
+    {
+        errTL->skipUpdate--;
+        assert(errTL->skipUpdate >= 0);
+    }
+}
+
+const char*
+nats_GetLastError(natsStatus *status)
+{
+    natsStatus  s;
+    natsTLError *errTL  = NULL;
+
+    if (status != NULL)
+        *status = NATS_OK;
+
+    // Ensure the library is loaded
+    s = nats_Open(-1);
+    if (s != NATS_OK)
+        return NULL;
+
+    errTL = natsThreadLocal_Get(gLib.errTLKey);
+    if ((errTL == NULL) || (errTL->sts == NATS_OK))
+        return NULL;
+
+    if (status != NULL)
+        *status = errTL->sts;
+
+    return errTL->text;
+}
+
+natsStatus
+nats_GetLastErrorStack(char *buffer, size_t bufLen)
+{
+    natsTLError *errTL  = NULL;
+    int         offset  = 0;
+    int         i, max, n, len;
+
+    if ((buffer == NULL) || (bufLen == 0))
+        return NATS_INVALID_ARG;
+
+    buffer[0] = '\0';
+    len = (int) bufLen;
+
+    // Ensure the library is loaded
+    if (nats_Open(-1) != NATS_OK)
+        return NATS_FAILED_TO_INITIALIZE;
+
+    errTL = natsThreadLocal_Get(gLib.errTLKey);
+    if ((errTL == NULL) || (errTL->sts == NATS_OK) || (errTL->framesCount == -1))
+        return NATS_OK;
+
+    max = errTL->framesCount;
+    if (max >= MAX_FRAMES)
+        max = MAX_FRAMES - 1;
+
+    for (i=0; (i<=max) && (len > 0); i++)
+    {
+        n = snprintf(buffer + offset, len, "%s%s",
+                     errTL->func[i],
+                     (i < max ? "\n" : ""));
+        // On Windows, n will be < 0 if len is not big enough.
+        if (n < 0)
+        {
+            len = 0;
+        }
+        else
+        {
+            offset += n;
+            len    -= n;
+        }
+    }
+
+    if ((max != errTL->framesCount) && (len > 0))
+    {
+        n = snprintf(buffer + offset, len, "\n%d more...",
+                     errTL->framesCount - max);
+        // On Windows, n will be < 0 if len is not big enough.
+        if (n < 0)
+            len = 0;
+        else
+            len -= n;
+    }
+
+    if (len <= 0)
+        return NATS_INSUFFICIENT_BUFFER;
+
+    return NATS_OK;
+}
+
+void
+nats_PrintLastErrorStack(FILE *file)
+{
+    natsTLError *errTL  = NULL;
+    int i, max;
+
+    // Ensure the library is loaded
+    if (nats_Open(-1) != NATS_OK)
+        return;
+
+    errTL = natsThreadLocal_Get(gLib.errTLKey);
+    if ((errTL == NULL) || (errTL->sts == NATS_OK) || (errTL->framesCount == -1))
+        return;
+
+    fprintf(file, "Error: %u - %s",
+            errTL->sts, natsStatus_GetText(errTL->sts));
+    if (errTL->text[0] != '\0')
+        fprintf(file, " - %s", errTL->text);
+    fprintf(file, "\n");
+    fprintf(file, "Stack: (library version: %s)\n", nats_GetVersion());
+
+    max = errTL->framesCount;
+    if (max >= MAX_FRAMES)
+        max = MAX_FRAMES - 1;
+
+    for (i=0; i<=max; i++)
+        fprintf(file, "  %02d - %s\n", (i+1), errTL->func[i]);
+
+    if (max != errTL->framesCount)
+        fprintf(file, " %d more...\n", errTL->framesCount - max);
+
+    fflush(file);
+}
+
+void
+nats_sslRegisterThreadForCleanup(void)
+{
+#if defined(NATS_HAS_TLS)
+    // Set anything. The goal is that at thread exit, the thread local key
+    // will have something non NULL associated, which will trigger the
+    // destructor that we have registered.
+    (void) natsThreadLocal_Set(gLib.sslTLKey, (void*) 1);
+#endif
+}
+
+natsStatus
+nats_sslInit(void)
+{
+    natsStatus s = NATS_OK;
+
+    // Ensure the library is loaded
+    s = nats_Open(-1);
+    if (s != NATS_OK)
+        return s;
+
+    natsMutex_Lock(gLib.lock);
+
+    if (!(gLib.sslInitialized))
+    {
+        // Regardless of success, mark as initialized so that we
+        // can do cleanup on exit.
+        gLib.sslInitialized = true;
+
+#if defined(NATS_HAS_TLS)
+        // Initialize SSL.
+        SSL_library_init();
+        SSL_load_error_strings();
+
+#endif
+        s = natsThreadLocal_CreateKey(&(gLib.sslTLKey), _cleanupThreadSSL);
+    }
+
+    natsMutex_Unlock(gLib.lock);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static void
+_deliverMsgs(void *arg)
+{
+    natsMsgDlvWorker    *dlv = (natsMsgDlvWorker*) arg;
+    natsConnection      *nc;
+    natsSubscription    *sub;
+    natsMsgHandler      mcb;
+    void                *mcbClosure;
+    uint64_t            delivered;
+    uint64_t            max;
+    natsMsg             *msg;
+    bool                timerNeedReset = false;
+    jsSub               *jsi;
+    char                *fcReply;
+
+    natsMutex_Lock(dlv->lock);
+
+    while (true)
+    {
+        while (((msg = dlv->msgList.head) == NULL) && !dlv->shutdown)
+            natsCondition_Wait(dlv->cond, dlv->lock);
+
+        // Break out only when list is empty
+        if ((msg == NULL) && dlv->shutdown)
+        {
+            break;
+        }
+
+        // Remove message from list now...
+        dlv->msgList.head = msg->next;
+        if (dlv->msgList.tail == msg)
+            dlv->msgList.tail = NULL;
+        msg->next = NULL;
+
+        // Get subscription reference from message
+        sub = msg->sub;
+
+        // Capture these under lock
+        nc = sub->conn;
+        mcb = sub->msgCb;
+        mcbClosure = sub->msgCbClosure;
+        max = sub->max;
+
+        // Is this a control message?
+        if (msg->subject[0] == '\0')
+        {
+            bool closed   = sub->closed;
+            bool timedOut = sub->timedOut;
+            bool draining = sub->libDlvDraining;
+
+            // Switch off this flag.
+            if (draining)
+                sub->libDlvDraining = false;
+
+            // We need to release this lock...
+            natsMutex_Unlock(dlv->lock);
+
+            // Release the message
+            natsMsg_Destroy(msg);
+
+            if (draining)
+            {
+                // Subscription is draining, we are past the last message,
+                // remove the subscription. This will schedule another
+                // control message for the close.
+                natsSub_setDrainCompleteState(sub);
+                natsConn_removeSubscription(nc, sub);
+            }
+            else if (closed)
+            {
+                natsOnCompleteCB cb         = NULL;
+                void             *closure   = NULL;
+
+                // Call this in case the subscription was draining.
+                natsSub_setDrainCompleteState(sub);
+
+                // Check for completion callback
+                natsSub_Lock(sub);
+                cb      = sub->onCompleteCB;
+                closure = sub->onCompleteCBClosure;
+                natsSub_Unlock(sub);
+
+                if (cb != NULL)
+                    (*cb)(closure);
+
+                // Subscription closed, just release
+                natsSub_release(sub);
+            }
+            else if (timedOut)
+            {
+                // Invoke the callback with a NULL message.
+                (*mcb)(nc, sub, NULL, mcbClosure);
+            }
+
+            // Grab the lock, we go back to beginning of loop.
+            natsMutex_Lock(dlv->lock);
+
+            if (!draining && !closed && timedOut)
+            {
+                // Reset the timedOut boolean to allow for the
+                // subscription to timeout again, and reset the
+                // timer to fire again starting from now.
+                sub->timedOut = false;
+                natsTimer_Reset(sub->timeoutTimer, sub->timeout);
+            }
+
+            // Go back to top of loop.
+            continue;
+        }
+
+        // Update before checking closed state.
+        sub->msgList.msgs--;
+        sub->msgList.bytes -= natsMsg_dataAndHdrLen(msg);
+
+        // Need to check for closed subscription again here.
+        // The subscription could have been unsubscribed from a callback
+        // but there were already pending messages. The control message
+        // is queued up. Until it is processed, we need to simply
+        // discard the message and continue.
+        if (sub->closed)
+        {
+            natsMsg_Destroy(msg);
+            continue;
+        }
+
+        delivered = ++(sub->delivered);
+
+        jsi = sub->jsi;
+        fcReply = (jsi == NULL ? NULL : jsSub_checkForFlowControlResponse(sub));
+
+        // Is this a subscription that can timeout?
+        if (!sub->draining && (sub->timeout != 0))
+        {
+            // Prevent the timer to post a timeout control message
+            sub->timeoutSuspended = true;
+
+            // If we are dealing with the last pending message for this sub,
+            // we will reset the timer after the user callback returns.
+            if (sub->msgList.msgs == 0)
+                timerNeedReset = true;
+        }
+
+        natsMutex_Unlock(dlv->lock);
+
+        if ((max == 0) || (delivered <= max))
+        {
+           (*mcb)(nc, sub, msg, mcbClosure);
+        }
+        else
+        {
+            // We need to destroy the message since the user can't do it
+            natsMsg_Destroy(msg);
+        }
+
+        if (fcReply != NULL)
+        {
+            natsConnection_Publish(nc, fcReply, NULL, 0);
+            NATS_FREE(fcReply);
+        }
+
+        // Don't do 'else' because we need to remove when we have hit
+        // the max (after the callback returns).
+        if ((max > 0) && (delivered >= max))
+        {
+            // Call this blindly, it will be a no-op if the subscription was not draining.
+            natsSub_setDrainCompleteState(sub);
+            // If we have hit the max for delivered msgs, remove sub.
+            natsConn_removeSubscription(nc, sub);
+        }
+
+        natsMutex_Lock(dlv->lock);
+
+        // Check if timer need to be reset for subscriptions that can timeout.
+        if (!sub->closed && (sub->timeout != 0) && timerNeedReset)
+        {
+            timerNeedReset = false;
+
+            // Do this only on timer reset instead of after each return
+            // from callback. The reason is that if there are still pending
+            // messages for this subscription (this is the case otherwise
+            // timerNeedReset would be false), we should prevent
+            // the subscription to timeout anyway.
+            sub->timeoutSuspended = false;
+
+            // Reset the timer to fire in `timeout` from now.
+            natsTimer_Reset(sub->timeoutTimer, sub->timeout);
+        }
+    }
+
+    natsMutex_Unlock(dlv->lock);
+
+    natsLib_Release();
+}
+
+natsStatus
+nats_SetMessageDeliveryPoolSize(int max)
+{
+    natsStatus          s = NATS_OK;
+    natsLibDlvWorkers   *workers;
+
+    // Ensure the library is loaded
+    s = nats_Open(-1);
+    if (s != NATS_OK)
+        return s;
+
+    workers = &gLib.dlvWorkers;
+
+    natsMutex_Lock(workers->lock);
+
+    if (max <= 0)
+    {
+        natsMutex_Unlock(workers->lock);
+        return nats_setError(NATS_ERR, "%s", "Pool size cannot be negative or zero");
+    }
+
+    // Do not error on max < workers->maxSize in case we allow shrinking
+    // the pool in the future.
+    if (max > workers->maxSize)
+    {
+        natsMsgDlvWorker **newArray = NATS_CALLOC(max, sizeof(natsMsgDlvWorker*));
+        if (newArray == NULL)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+        if (s == NATS_OK)
+        {
+            int i;
+            for (i=0; i<workers->size; i++)
+                newArray[i] = workers->workers[i];
+
+            NATS_FREE(workers->workers);
+            workers->workers = newArray;
+            workers->maxSize = max;
+        }
+    }
+
+    natsMutex_Unlock(workers->lock);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+// Post a control message to the worker's queue.
+natsStatus
+natsLib_msgDeliveryPostControlMsg(natsSubscription *sub)
+{
+    natsStatus          s;
+    natsMsg             *controlMsg = NULL;
+    natsMsgDlvWorker    *worker = (sub->libDlvWorker);
+
+    // Create a "end" message and post it to the delivery worker
+    s = natsMsg_create(&controlMsg, NULL, 0, NULL, 0, NULL, 0, -1);
+    if (s == NATS_OK)
+    {
+        nats_MsgList    *l;
+        bool            signal = false;
+
+        natsMutex_Lock(worker->lock);
+
+        controlMsg->sub = sub;
+
+        l = &(worker->msgList);
+        if (l->head == NULL)
+        {
+            l->head = controlMsg;
+            signal  = true;
+        }
+        else
+            l->tail->next = controlMsg;
+        l->tail = controlMsg;
+
+        if (signal)
+            natsCondition_Signal(worker->cond);
+
+        natsMutex_Unlock(worker->lock);
+    }
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsLib_msgDeliveryAssignWorker(natsSubscription *sub)
+{
+    natsStatus          s = NATS_OK;
+    natsLibDlvWorkers   *workers = &(gLib.dlvWorkers);
+    natsMsgDlvWorker    *worker = NULL;
+
+    natsMutex_Lock(workers->lock);
+
+    if (workers->maxSize == 0)
+    {
+        natsMutex_Unlock(workers->lock);
+        return nats_setError(NATS_FAILED_TO_INITIALIZE, "%s", "Message delivery thread pool size is 0!");
+    }
+
+    worker = workers->workers[workers->idx];
+    if (worker == NULL)
+    {
+        worker = NATS_CALLOC(1, sizeof(natsMsgDlvWorker));
+        if (worker == NULL)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+        if (s == NATS_OK)
+            s = natsMutex_Create(&worker->lock);
+        if (s == NATS_OK)
+            s = natsCondition_Create(&worker->cond);
+        if (s == NATS_OK)
+        {
+            natsLib_Retain();
+            s = natsThread_Create(&worker->thread, _deliverMsgs, (void*) worker);
+            if (s != NATS_OK)
+                natsLib_Release();
+        }
+        if (s == NATS_OK)
+        {
+            workers->workers[workers->idx] = worker;
+            workers->size++;
+        }
+        else
+        {
+            _freeDlvWorker(worker);
+        }
+    }
+    if (s == NATS_OK)
+    {
+        sub->libDlvWorker = worker;
+        if (++(workers->idx) == workers->maxSize)
+            workers->idx = 0;
+    }
+
+    natsMutex_Unlock(workers->lock);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+bool
+natsLib_isLibHandlingMsgDeliveryByDefault()
+{
+    return gLib.libHandlingMsgDeliveryByDefault;
+}
+
+int64_t
+natsLib_defaultWriteDeadline()
+{
+    return gLib.libDefaultWriteDeadline;
+}
+
+void
+natsLib_getMsgDeliveryPoolInfo(int *maxSize, int *size, int *idx, natsMsgDlvWorker ***workersArray)
+{
+    natsLibDlvWorkers *workers = &gLib.dlvWorkers;
+
+    natsMutex_Lock(workers->lock);
+    *maxSize = workers->maxSize;
+    *size = workers->size;
+    *idx = workers->idx;
+    *workersArray = workers->workers;
+    natsMutex_Unlock(workers->lock);
+}
diff --git a/src/nats.h b/src/nats.h
new file mode 100644 (file)
index 0000000..2e046ac
--- /dev/null
@@ -0,0 +1,7086 @@
+// Copyright 2015-2022 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef NATS_H_
+#define NATS_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdlib.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include <inttypes.h>
+#include <stdio.h>
+
+#include "status.h"
+#include "version.h"
+
+/** \def NATS_EXTERN
+ *  \brief Needed for shared library.
+ *
+ *  Based on the platform this is compiled on, it will resolve to
+ *  the appropriate instruction so that objects are properly exported
+ *  when building the shared library.
+ */
+#if defined(_WIN32)
+  #include <winsock2.h>
+  #if defined(nats_EXPORTS)
+    #define NATS_EXTERN __declspec(dllexport)
+  #elif defined(nats_IMPORTS)
+    #define NATS_EXTERN __declspec(dllimport)
+  #else
+    #define NATS_EXTERN
+  #endif
+
+  typedef SOCKET      natsSock;
+#else
+  #define NATS_EXTERN
+  typedef int         natsSock;
+#endif
+
+/*! \mainpage %NATS C client.
+ *
+ * \section intro_sec Introduction
+ *
+ * The %NATS C Client is part of %NATS, an open-source cloud-native
+ * messaging system, and is supported by [Synadia Communications Inc.](http://www.synadia.com).
+ * This client, written in C, follows the go client closely, but
+ * diverges in some places.
+ *
+ * \section install_sec Installation
+ *
+ * Instructions to build and install the %NATS C Client can be
+ * found at the [NATS C Client GitHub page](https://github.com/nats-io/nats.c)
+ *
+ * \section faq_sec Frequently Asked Questions
+ *
+ * Some of the frequently asked questions can be found [here](https://github.com/nats-io/nats.c#faq)
+ *
+ * \section other_doc_section Other Documentation
+ *
+ * This documentation focuses on the %NATS C Client API; for additional
+ * information, refer to the following:
+ *
+ * - [General Documentation for nats.io](http://nats.io/documentation)
+ * - [NATS C Client found on GitHub](https://github.com/nats-io/nats.c)
+ * - [The NATS Server (nats-server) found on GitHub](https://github.com/nats-io/nats-server)
+ */
+
+/** \brief The default `NATS Server` URL.
+ *
+ *  This is the default URL a `NATS Server`, running with default listen
+ *  port, can be reached at.
+ */
+#define NATS_DEFAULT_URL "nats://localhost:4222"
+
+/** \brief Message header for JetStream messages representing the message payload size
+ *
+ * When creating a JetStream consumer, if the `HeadersOnly` boolean is specified,
+ * the subscription will receive messages with headers only (no message payload),
+ * and a header of this name containing the size of the message payload that was
+ * omitted.
+ *
+ * @see jsConsumerConfig
+ */
+ #define JSMsgSize    "Nats-Msg-Size"
+
+/** \brief Message header for JetStream message for rollup
+ *
+ * If message is sent to a stream's subject with this header set, and the stream
+ * is configured with `AllowRollup` option, then the server will insert this
+ * message and delete all previous messages in the stream.
+ *
+ * If the header is set to #JSMsgRollupSubject, then only messages on the
+ * specific subject this message is sent to are deleted.
+ *
+ * If the header is set to #JSMsgRollupAll, then all messages on all subjects
+ * are deleted.
+ */
+ #define JSMsgRollup            "Nats-Rollup"
+
+/** \brief Message header value causing rollup per subject
+ *
+ * This is a possible value for the #JSMsgRollup header indicating that only
+ * messages for the subject the rollup message is sent will be removed.
+ *
+ * @see JSMsgRollup
+ */
+ #define JSMsgRollupSubject     "sub"
+
+ /** \brief Message header value causing rollup for all subjects
+ *
+ * This is a possible value for the #JSMsgRollup header indicating that all
+ * messages for all subjects will be removed.
+ *
+ * @see JSMsgRollup
+ */
+ #define JSMsgRollupAll         "all"
+
+ // Headers for republished messages and direct get.
+ #define JSStream       "Nats-Stream"
+ #define JSSequence     "Nats-Sequence"
+ #define JSLastSequence "Nats-Last-Sequence"
+ #define JSTimeStamp    "Nats-Time-Stamp"
+ #define JSSubject      "Nats-Subject"
+
+//
+// Types.
+//
+/** \defgroup typesGroup Types
+ *
+ *  NATS Types.
+ *  @{
+ */
+
+/** \brief A connection to a `NATS Server`.
+ *
+ * A #natsConnection represents a bare connection to a `NATS Server`. It will
+ * send and receive byte array payloads.
+ */
+typedef struct __natsConnection     natsConnection;
+
+/** \brief Statistics of a #natsConnection
+ *
+ * Tracks various statistics received and sent on a connection,
+ * including counts for messages and bytes.
+ */
+typedef struct __natsStatistics     natsStatistics;
+
+/** \brief Interest on a given subject.
+ *
+ * A #natsSubscription represents interest in a given subject.
+ */
+typedef struct __natsSubscription   natsSubscription;
+
+/** \brief A structure holding a subject, optional reply and payload.
+ *
+ * #natsMsg is a structure used by Subscribers and
+ * #natsConnection_PublishMsg().
+ */
+typedef struct __natsMsg            natsMsg;
+
+/** \brief Way to configure a #natsConnection.
+ *
+ * Options can be used to create a customized #natsConnection.
+ */
+typedef struct __natsOptions        natsOptions;
+
+/** \brief Unique subject often used for point-to-point communication.
+ *
+ * This can be used as the reply for a request. Inboxes are meant to be
+ * unique so that replies can be sent to a specific subscriber. That
+ * being said, inboxes can be shared across multiple subscribers if
+ * desired.
+ */
+typedef char                        natsInbox;
+
+/** \brief A list of NATS messages.
+ *
+ * Used by some APIs which return a list of #natsMsg objects.
+ *
+ * Those APIs will not create the object, but instead initialize
+ * the object to which a pointer to that object will be passed to it.
+ * Typically, the user will define the object on the stack and
+ * pass a pointer to this object to APIs that require a pointer
+ * to a #natsMsgList object.
+ *
+ * Similarly, calling #natsMsgList_Destroy will call #natsMsg_Destroy
+ * on any message still in the list, free the array containing pointers
+ * to the messages, but not free the #natsMsgList object itself.
+ *
+ * \note If the user wants to keep some of the messages from the
+ * list, the pointers of those messages in the `Msgs` array should
+ * be set to `NULL`. The value `Count` MUST not be changed. The
+ * function #natsMsgList_Destroy will iterate through all
+ * pointers in the list and only destroy the ones that have not
+ * been set to `NULL`.
+ *
+ * @see natsMsgList_Destroy
+ */
+typedef struct natsMsgList
+{
+        natsMsg         **Msgs;
+        int             Count;
+
+} natsMsgList;
+
+/**
+ * The JetStream context. Use for JetStream assets management and communication.
+ *
+ * \warning A context MUST not be destroyed concurrently with #jsCtx API calls
+ * (for instance #js_Publish or #js_PublishAsync, etc...). However, it
+ * is safe to destroy the context while a #jsPubAckErrHandler callback is
+ * running or while inside #js_PublishAsyncComplete.
+ */
+typedef struct __jsCtx                  jsCtx;
+
+/**
+ * JetStream publish options.
+ *
+ * These are options that you can provide to JetStream publish APIs.
+ *
+ * The common usage will be to initialize a structure on the stack by
+ * calling #jsPubOptions_Init. Note that strings are owned by
+ * the application and need to be valid for the duration of the API
+ * call this object is passed to.
+ *
+ * \note It is the user responsibility to free the strings if they
+ * have been allocated.
+ *
+ * @see jsPubOptions_Init
+ */
+typedef struct jsPubOptions
+{
+        int64_t         MaxWait;                ///< Amount of time (in milliseconds) to wait for a publish response, default will the context's Wait value.
+        const char      *MsgId;                 ///< Message ID used for de-duplication.
+        const char      *ExpectStream;          ///< Expected stream to respond from the publish call.
+        const char      *ExpectLastMsgId;       ///< Expected last message ID in the stream.
+        uint64_t        ExpectLastSeq;          ///< Expected last message sequence in the stream.
+        uint64_t        ExpectLastSubjectSeq;   ///< Expected last message sequence for the subject in the stream.
+        bool            ExpectNoMessage;        ///< Expected no message (that is, sequence == 0) for the subject in the stream.
+
+} jsPubOptions;
+
+/**
+ * Determines how messages in a set are retained.
+ */
+typedef enum
+{
+        js_LimitsPolicy = 0,    ///< Specifies that messages are retained until any given limit is reached, which could be one of MaxMsgs, MaxBytes, or MaxAge. This is the default.
+        js_InterestPolicy,      ///< Specifies that when all known observables have acknowledged a message it can be removed.
+        js_WorkQueuePolicy,     ///< Specifies that when the first worker or subscriber acknowledges the message it can be removed.
+
+} jsRetentionPolicy;
+
+/**
+ * Determines how to proceed when limits of messages or bytes are reached.
+ */
+typedef enum
+{
+        js_DiscardOld = 0,  ///< Will remove older messages to return to the limits. This is the default.
+        js_DiscardNew,      ///< Will fail to store new messages.
+
+} jsDiscardPolicy;
+
+/**
+ * Determines how messages are stored for retention.
+ */
+typedef enum
+{
+        js_FileStorage = 0, ///< Specifies on disk storage. It's the default.
+        js_MemoryStorage,   ///< Specifies in memory only.
+
+} jsStorageType;
+
+/**
+ * Determines how the consumer should select the first message to deliver.
+ */
+typedef enum
+{
+        js_DeliverAll = 0,          ///< Starts from the very beginning of a stream. This is the default.
+        js_DeliverLast,             ///< Starts with the last sequence received.
+        js_DeliverNew,              ///< Starts with messages sent after the consumer is created.
+        js_DeliverByStartSequence,  ///< Starts from a given sequence.
+        js_DeliverByStartTime,      ///< Starts from a given UTC time (number of nanoseconds since epoch)
+        js_DeliverLastPerSubject,   ///< Starts with the last message for all subjects received.
+
+} jsDeliverPolicy;
+
+/**
+ * Determines how the consumer should acknowledge delivered messages.
+ */
+typedef enum
+{
+        js_AckExplicit = 0,     ///< Requires ack or nack for all messages.
+        js_AckNone,             ///< Requires no acks for delivered messages.
+        js_AckAll,              ///< When acking a sequence number, this implicitly acks all sequences below this one as well.
+
+
+} jsAckPolicy;
+
+/**
+ * Determines how the consumer should replay messages it already has queued in the stream.
+ */
+typedef enum
+{
+        js_ReplayInstant = 0,   ///< Replays messages as fast as possible.
+        js_ReplayOriginal,      ///< Maintains the same timing as the messages were received.
+
+} jsReplayPolicy;
+
+
+/**
+ * Used to guide placement of streams in clustered JetStream.
+ *
+ * Initialize the object with #jsPlacement_Init.
+ *
+ * \note The strings are applications owned and will not be freed by the library.
+ *
+ * See #jsStreamConfig for information on how to configure a stream.
+ *
+ * @see jsPlacement_Init
+ */
+typedef struct jsPlacement
+{
+        const char      *Cluster;
+        const char      **Tags;
+        int             TagsLen;
+
+} jsPlacement;
+
+/**
+ * Allows you to qualify access to a stream source in another account.
+ *
+ * Initialize the object with #jsExternalStream_Init.
+ *
+ * \note The strings are applications owned and will not be freed by the library.
+ *
+ * See #jsStreamConfig for information on how to configure a stream.
+ */
+typedef struct jsExternalStream
+{
+        const char      *APIPrefix;
+        const char      *DeliverPrefix;
+
+} jsExternalStream;
+
+/**
+ * Dictates how streams can source from other streams.
+ *
+ * Initialize the object with #jsStreamSource_Init.
+ *
+ * \note The strings are applications owned and will not be freed by the library.
+ *
+ * \note The `OptStartTime` needs to be expressed as the number of nanoseconds
+ * passed since 00:00:00 UTC Thursday, 1 January 1970.
+ *
+ * See #jsStreamConfig for information on how to configure a stream.
+ */
+typedef struct jsStreamSource
+{
+        const char              *Name;
+        uint64_t                OptStartSeq;
+        int64_t                 OptStartTime;   ///< UTC time expressed as number of nanoseconds since epoch.
+        const char              *FilterSubject;
+        jsExternalStream        *External;
+
+} jsStreamSource;
+
+/**
+ * Allows a source subject to be mapped to a destination subject for republishing.
+ */
+typedef struct jsRePublish
+{
+        const char              *Source;
+        const char              *Destination;
+        bool                    HeadersOnly;
+
+} jsRePublish;
+
+/**
+ * Configuration of a JetStream stream.
+ *
+ * There are sensible defaults for most. If no subjects are
+ * given the name will be used as the only subject.
+ *
+ * In order to add/update a stream, a configuration needs to be set.
+ * The typical usage would be to initialize all required objects on the stack
+ * and configure them, then pass the pointer to the configuration to
+ * #js_AddStream or #js_UpdateStream.
+ *
+ * \note The strings are applications owned and will not be freed by the library.
+ *
+ * @see jsStreamConfig_Init
+ *
+ * \code{.unparsed}
+ * jsStreamConfig   sc;
+ * jsPlacement      p;
+ * jsStreamSource   m;
+ * jsExternalStream esm;
+ * jsStreamSource   s1;
+ * jsStreamSource   s2;
+ * jsExternalStream esmS2;
+ * const char       *subjects[]     = {"foo", "bar"};
+ * const char       *tags[]         = {"tag1", "tag2"};
+ * jsStreamSource   *sources[]      = {&s1, &s2};
+ * jsRePublish      rp;
+ *
+ * jsStreamConfig_Init(&sc);
+ *
+ * jsPlacement_Init(&p);
+ * p.Cluster = "MyCluster";
+ * p.Tags = tags;
+ * p.TagsLen = 2;
+ *
+ * jsStreamSource_Init(&m);
+ * m.Name = "AStream";
+ * m.OptStartSeq = 100;
+ * m.FilterSubject = "foo";
+ * jsExternalStream_Init(&esm);
+ * esm.APIPrefix = "mirror.prefix.";
+ * esm.DeliverPrefix = "deliver.prefix.";
+ * m.External = &esm;
+ *
+ * jsStreamSource_Init(&s1);
+ * s1.Name = "StreamOne";
+ * s1.OptStartSeq = 10;
+ * s1.FilterSubject = "stream.one";
+ *
+ * jsStreamSource_Init(&s2);
+ * s2.Name = "StreamTwo";
+ * s2.FilterSubject = "stream.two";
+ * jsExternalStream_Init(&esmS2);
+ * esmS2.APIPrefix = "mirror.prefix.";
+ * esmS2.DeliverPrefix = "deliver.prefix.";
+ * s2.External = &esmS2;
+ *
+ * sc.Name = "MyStream";
+ * sc.Subjects = subjects;
+ * sc.SubjectsLen = 2;
+ * sc.Retention = js_InterestPolicy;
+ * sc.Replicas = 3;
+ * sc.Placement = &p;
+ * sc.Mirror = &m;
+ * sc.Sources = sources;
+ * sc.SourcesLen = 2;
+ *
+ * // For RePublish subject:
+ * jsRePublish_Init(&rp);
+ * rp.Source = ">";
+ * rp.Destination = "RP.>";
+ * sc.RePublish = &rp;
+ *
+ * s = js_AddStream(&si, js, &sc, NULL, &jerr);
+ * \endcode
+ */
+typedef struct jsStreamConfig {
+        const char              *Name;
+        const char              *Description;
+        const char              **Subjects;
+        int                     SubjectsLen;
+        jsRetentionPolicy       Retention;
+        int64_t                 MaxConsumers;
+        int64_t                 MaxMsgs;
+        int64_t                 MaxBytes;
+        int64_t                 MaxAge;
+        int64_t                 MaxMsgsPerSubject;
+        int32_t                 MaxMsgSize;
+        jsDiscardPolicy         Discard;
+        jsStorageType           Storage;
+        int64_t                 Replicas;
+        bool                    NoAck;
+        const char              *Template;
+        int64_t                 Duplicates;
+        jsPlacement             *Placement;
+        jsStreamSource          *Mirror;
+        jsStreamSource          **Sources;
+        int                     SourcesLen;
+        bool                    Sealed;         ///< Seal a stream so no messages can get our or in.
+        bool                    DenyDelete;     ///< Restrict the ability to delete messages.
+        bool                    DenyPurge;      ///< Restrict the ability to purge messages.
+        /**
+         * Allows messages to be placed into the system and purge
+         * all older messages using a special message header.
+         */
+        bool                    AllowRollup;
+
+        // Allow republish of the message after being sequenced and stored.
+        jsRePublish             *RePublish;
+
+        // Allow higher performance, direct access to get individual messages. E.g. KeyValue
+        bool                    AllowDirect;
+        // Allow higher performance and unified direct access for mirrors as well.
+        bool                    MirrorDirect;
+
+        // Allow KV like semantics to also discard new on a per subject basis
+        bool                    DiscardNewPerSubject;
+
+} jsStreamConfig;
+
+/**
+ * Information about messages that have been lost
+ */
+typedef struct jsLostStreamData
+{
+        uint64_t                *Msgs;
+        int                     MsgsLen;
+        uint64_t                Bytes;
+
+} jsLostStreamData;
+
+/**
+ * This indicate that the given `Subject` in a stream contains `Msgs` messages.
+ *
+ * @see jsStreamStateSubjects
+ */
+typedef struct jsStreamStateSubject
+{
+        const char              *Subject;
+        uint64_t                Msgs;
+
+} jsStreamStateSubject;
+
+/**
+ * List of subjects optionally returned in the stream information request.
+ *
+ * This structure indicates the number of elements in the list, that is,
+ * the list contains `Count` #jsStreamStateSubject elements.
+ *
+ * To get this list in #jsStreamState, you have to ask for it through #jsOptions.
+ *
+ * \code{.unparsed}
+ * jsStreamInfo *si = NULL;
+ * jsOptions    o;
+ *
+ * jsOptions_Init(&o);
+ * o.Stream.Info.SubjectsFilter = "foo.>";
+ * s = js_GetStreamInfo(&si, js, "MY_STREAM", &o, &jerr);
+ *
+ * // handle errors and assume si->State.Subjects is not NULL
+ *
+ * for (i=0; i<si->State.Subjects->Count; i++)
+ * {
+ *      jsStreamStateSubject *subj = &(si->State.Subjects->List[i]);
+ *      printf("Subject=%s Messages count=%d\n", subj->Subject, (int) subj->Msgs);
+ * }
+ * \endcode
+ *
+ * @see jsStreamStateSubject
+ * @see js_GetStreamInfo
+ * @see jsOptions.Stream.Info.SubjectsFilter
+ */
+typedef struct jsStreamStateSubjects
+{
+        jsStreamStateSubject    *List;
+        int                     Count;
+
+} jsStreamStateSubjects;
+
+/**
+ * Information about the given stream
+ *
+ * \note `FirstTime` and `LastTime` are message timestamps expressed as the number
+ * of nanoseconds passed since 00:00:00 UTC Thursday, 1 January 1970.
+ */
+typedef struct jsStreamState
+{
+        uint64_t                Msgs;
+        uint64_t                Bytes;
+        uint64_t                FirstSeq;
+        int64_t                 FirstTime;      ///< UTC time expressed as number of nanoseconds since epoch.
+        uint64_t                LastSeq;
+        int64_t                 LastTime;       ///< UTC time expressed as number of nanoseconds since epoch.
+        int64_t                 NumSubjects;
+        jsStreamStateSubjects   *Subjects;
+        uint64_t                NumDeleted;
+        uint64_t                *Deleted;
+        int                     DeletedLen;
+        jsLostStreamData        *Lost;
+        int64_t                 Consumers;
+
+} jsStreamState;
+
+/**
+ * Information about all the peers in the cluster that
+ * are supporting the stream or consumer.
+ */
+typedef struct jsPeerInfo
+{
+        char        *Name;
+        bool        Current;
+        bool        Offline;
+        int64_t     Active;
+        uint64_t    Lag;
+
+} jsPeerInfo;
+
+/**
+ * Information about the underlying set of servers
+ * that make up the stream or consumer.
+ */
+typedef struct jsClusterInfo
+{
+        char            *Name;
+        char            *Leader;
+        jsPeerInfo      **Replicas;
+        int             ReplicasLen;
+
+} jsClusterInfo;
+
+/**
+ * Information about an upstream stream source.
+ */
+typedef struct jsStreamSourceInfo
+{
+        char                    *Name;
+        jsExternalStream        *External;
+        uint64_t                Lag;
+        int64_t                 Active;
+
+} jsStreamSourceInfo;
+
+/**
+ * Configuration and current state for this stream.
+ *
+ * \note `Created` is the timestamp when the stream was created, expressed as
+ * the number of nanoseconds passed since 00:00:00 UTC Thursday, 1 January 1970.
+ */
+typedef struct jsStreamInfo
+{
+        jsStreamConfig          *Config;
+        int64_t                 Created;        ///< UTC time expressed as number of nanoseconds since epoch.
+        jsStreamState           State;
+        jsClusterInfo           *Cluster;
+        jsStreamSourceInfo      *Mirror;
+        jsStreamSourceInfo      **Sources;
+        int                     SourcesLen;
+
+} jsStreamInfo;
+
+/**
+ * List of stream information objects returned by #js_Streams
+ *
+ * \note Once done, the list should be destroyed calling #jsStreamInfoList_Destroy
+ *
+ * @see jsStreamInfoList_Destroy
+ */
+typedef struct jsStreamInfoList
+{
+        jsStreamInfo    **List;
+        int             Count;
+
+} jsStreamInfoList;
+
+/**
+ * List of stream names returned by #js_StreamNames
+ *
+ * \note Once done, the list should be destroyed calling #jsStreamNamesList_Destroy
+ *
+ * @see jsStreamNamesList_Destroy
+ */
+typedef struct jsStreamNamesList
+{
+        char    **List;
+        int     Count;
+
+} jsStreamNamesList;
+
+/**
+ * Configuration of a JetStream consumer.
+ *
+ * In order to add a consumer, a configuration needs to be set.
+ * The typical usage would be to initialize all required objects on the stack
+ * and configure them, then pass the pointer to the configuration to
+ * #js_AddConsumer.
+ *
+ * \note `OptStartTime` needs to be expressed as the number of nanoseconds
+ * passed since 00:00:00 UTC Thursday, 1 January 1970.
+ *
+ * \note The strings are applications owned and will not be freed by the library.
+ *
+ * \note `SampleFrequency` is a sampling value, represented as a string such as "50"
+ * for 50%, that causes the server to produce advisories for consumer ack metrics.
+ *
+ * \note `Durable` cannot contain the character ".".
+ *
+ * \note `HeadersOnly` means that the subscription will not receive any message payload,
+ * instead, it will receive only messages headers (if present) with the addition of
+ * the header #JSMsgSize ("Nats-Msg-Size"), whose value is the payload size.
+ *
+ * @see jsConsumerConfig_Init
+ *
+ * \code{.unparsed}
+ * jsConsumerInfo   *ci = NULL;
+ * jsConsumerConfig cc;
+ *
+ * jsConsumerConfig_Init(&cc);
+ * cc.Durable = "MY_DURABLE";
+ * cc.DeliverSubject = "foo";
+ * cc.DeliverPolicy = js_DeliverNew;
+ *
+ * s = js_AddConsumer(&ci, js, &cc, NULL, &jerr);
+ * \endcode
+ */
+typedef struct jsConsumerConfig
+{
+        const char              *Name;
+        const char              *Durable;
+        const char              *Description;
+        jsDeliverPolicy         DeliverPolicy;
+        uint64_t                OptStartSeq;
+        int64_t                 OptStartTime;           ///< UTC time expressed as number of nanoseconds since epoch.
+        jsAckPolicy             AckPolicy;
+        int64_t                 AckWait;
+        int64_t                 MaxDeliver;
+        int64_t                 *BackOff;               ///< Redelivery durations expressed in nanoseconds
+        int                     BackOffLen;
+        const char              *FilterSubject;
+        jsReplayPolicy          ReplayPolicy;
+        uint64_t                RateLimit;
+        const char              *SampleFrequency;
+        int64_t                 MaxWaiting;
+        int64_t                 MaxAckPending;
+        bool                    FlowControl;
+        int64_t                 Heartbeat;              ///< Heartbeat interval expressed in number of nanoseconds.
+        bool                    HeadersOnly;
+
+        // Pull based options.
+        int64_t                 MaxRequestBatch;        ///< Maximum Pull Consumer request batch size.
+        int64_t                 MaxRequestExpires;      ///< Maximum Pull Consumer request expiration, expressed in number of nanoseconds.
+        int64_t                 MaxRequestMaxBytes;     ///< Maximum Pull Consumer request maximum bytes.
+
+        // Push based options.
+        const char              *DeliverSubject;
+        const char              *DeliverGroup;
+
+        // Ephemeral inactivity threshold.
+        int64_t                 InactiveThreshold;      ///< How long the server keeps an ephemeral after detecting loss of interest, expressed in number of nanoseconds.
+
+        // Generally inherited by parent stream and other markers, now can be configured directly.
+        int64_t                 Replicas;
+        // Force memory storage.
+        bool                    MemoryStorage;
+
+} jsConsumerConfig;
+
+/**
+ * This represents a consumer sequence mismatch between the server and client
+ * views.
+ *
+ * This can help applications find out if messages have been missed. Without
+ * this and during a disconnect, it would be possible that a subscription
+ * is not aware that it missed messages from the server. When acknowledgment
+ * mode is other than #js_AckNone, messages would ultimately be redelivered,
+ * but for #js_AckNone, they would not. But even with an acknowledgment mode
+ * this may help finding sooner that something went wrong and let the application
+ * decide if it wants to recreate the subscription starting at a given
+ * sequence.
+ *
+ * The gap of missing messages could be calculated as `ConsumerServer-ConsumerClient`.
+ *
+ * @see natsSubscription_GetSequenceMismatch
+ */
+typedef struct jsConsumerSequenceMismatch
+{
+        uint64_t        Stream;         ///< This is the stream sequence that the application should resume from.
+        uint64_t        ConsumerClient; ///< This is the consumer sequence that was last received by the library.
+        uint64_t        ConsumerServer; ///< This is the consumer sequence last sent by the server.
+
+} jsConsumerSequenceMismatch;
+
+/**
+ * JetStream subscribe options.
+ *
+ * These are options that you can provide to JetStream subscribe APIs.
+ *
+ * The common usage will be to initialize a structure on the stack by
+ * calling #jsSubOptions_Init. Note that strings are owned by
+ * the application and need to be valid for the duration of the API
+ * call this object is passed to.
+ *
+ * \note It is the user responsibility to free the strings if they
+ * have been allocated.
+ *
+ * @see jsSubOptions_Init
+ */
+typedef struct jsSubOptions
+{
+        /**
+         * If specified, the library will only bind to this stream,
+         * otherwise, the library communicates with the server to
+         * get the stream name that has the matching subject given
+         * to the #js_Subscribe family calls.
+         */
+        const char              *Stream;        ///< If specified, the consumer will be bound to this stream name.
+        /**
+         * If specified, the #js_Subscribe family calls will only
+         * attempt to create a subscription for this matching consumer.
+         *
+         * That is, the consumer should exist prior to the call,
+         * either created by the application calling #js_AddConsumer
+         * or it should have been created with some other tools
+         * such as the NATS cli.
+         */
+        const char              *Consumer;      ///< If specified, the subscription will be bound to an existing consumer from the `Stream` without attempting to create.
+        /**
+         * If specified, the low level NATS subscription will be a
+         * queue subscription, which means that the load on the
+         * delivery subject will be balanced across multiple members
+         * of the same queue group.
+         *
+         * This makes sense only if the delivery subject in the
+         * `Config` field of #jsSubOptions is the same for the
+         * members of the same group.
+         *
+         * When no `Durable` name is specified in the `Config` block, then the
+         * queue name will be used as the consumer's durable name. In this case,
+         * the queue name cannot contain the character ".".
+         */
+        const char              *Queue;         ///< Queue name for queue subscriptions.
+        /**
+         * This has meaning only for asynchronous subscriptions,
+         * and only if the consumer's acknowledgment mode is
+         * other than #js_AckNone.
+         *
+         * For asynchronous subscriptions, the default behavior
+         * is for the library to acknowledge the message once
+         * the user callback returns.
+         *
+         * This option allows you to take control of when the
+         * message should be acknowledged.
+         */
+        bool                    ManualAck;      ///< If true, the user will have to acknowledge the messages.
+        /**
+         * This allows the user to fully configure the JetStream
+         * consumer.
+         */
+        jsConsumerConfig        Config;         ///< Consumer configuration.
+        /**
+         * This will create a fifo ephemeral consumer for in order delivery of
+         * messages. There are no redeliveries and no acks.
+         * Flow control and heartbeats are required and set by default, but
+         * the heartbeats value can be overridden in the consumer configuration.
+         */
+        bool                    Ordered;        ///< If true, this will be an ordered consumer.
+
+} jsSubOptions;
+
+/**
+ * Includes the consumer and stream sequence info from a JetStream consumer.
+ */
+typedef struct jsSequencePair
+{
+        uint64_t        Consumer;
+        uint64_t        Stream;
+
+} jsSequencePair;
+
+/**
+ * Has both the consumer and the stream sequence and last activity.
+ */
+typedef struct jsSequenceInfo
+{
+        uint64_t        Consumer;
+        uint64_t        Stream;
+        int64_t         Last;           ///< UTC time expressed as number of nanoseconds since epoch.
+
+} jsSequenceInfo;
+
+/**
+ * Configuration and current state for this consumer.
+ *
+ * \note `Created` is the timestamp when the consumer was created, expressed as the number
+ * of nanoseconds passed since 00:00:00 UTC Thursday, 1 January 1970.
+ */
+typedef struct jsConsumerInfo
+{
+        char                    *Stream;
+        char                    *Name;
+        int64_t                 Created;                ///< UTC time expressed as number of nanoseconds since epoch.
+        jsConsumerConfig        *Config;
+        jsSequenceInfo          Delivered;
+        jsSequenceInfo          AckFloor;
+        int64_t                 NumAckPending;
+        int64_t                 NumRedelivered;
+        int64_t                 NumWaiting;
+        uint64_t                NumPending;
+        jsClusterInfo           *Cluster;
+        bool                    PushBound;
+
+} jsConsumerInfo;
+
+/**
+ * List of consumers information objects returned by #js_Consumers
+ *
+ * \note Once done, the list should be destroyed calling #jsConsumerInfoList_Destroy
+ *
+ * @see jsStreamInfoList_Destroy
+ */
+typedef struct jsConsumerInfoList
+{
+        jsConsumerInfo  **List;
+        int             Count;
+
+} jsConsumerInfoList;
+
+/**
+ * List of consumer names returned by #js_ConsumerNames
+ *
+ * \note Once done, the list should be destroyed calling #jsConsumerNamesList_Destroy
+ *
+ * @see jsConsumerNamesList_Destroy
+ */
+typedef struct jsConsumerNamesList
+{
+        char    **List;
+        int     Count;
+
+} jsConsumerNamesList;
+
+/**
+ * Reports on API calls to JetStream for this account.
+ */
+typedef struct jsAPIStats
+{
+        uint64_t Total;
+        uint64_t Errors;
+
+} jsAPIStats;
+
+/**
+ * Includes the JetStream limits of the current account.
+ */
+typedef struct  jsAccountLimits
+{
+        int64_t MaxMemory;
+        int64_t MaxStore;
+        int64_t MaxStreams;
+        int64_t MaxConsumers;
+        int64_t MaxAckPending;
+        int64_t MemoryMaxStreamBytes;
+        int64_t StoreMaxStreamBytes;
+        bool    MaxBytesRequired;
+
+} jsAccountLimits;
+
+typedef struct jsTier
+{
+        const char              *Name;
+        uint64_t                Memory;
+        uint64_t                Store;
+        int64_t                 Streams;
+        int64_t                 Consumers;
+        jsAccountLimits         Limits;
+
+} jsTier;
+
+/**
+ * Information about the JetStream usage from the current account.
+ */
+typedef struct jsAccountInfo
+{
+        uint64_t                Memory;
+        uint64_t                Store;
+        int64_t                 Streams;
+        int64_t                 Consumers;
+        char                    *Domain;
+        jsAPIStats              API;
+        jsAccountLimits         Limits;
+        jsTier                  **Tiers;
+        int                     TiersLen;
+
+} jsAccountInfo;
+
+/**
+ * This represents the JetStream metadata associated with received messages.
+ *
+ * @see natsMsg_GetMetaData
+ * @see jsMsgMetaData_Destroy
+ *
+ */
+typedef struct jsMsgMetaData
+{
+        jsSequencePair  Sequence;
+        uint64_t        NumDelivered;
+        uint64_t        NumPending;
+        int64_t         Timestamp;
+        char            *Stream;
+        char            *Consumer;
+        char            *Domain;
+
+} jsMsgMetaData;
+
+/**
+ * Ack received after successfully publishing a message.
+ */
+typedef struct jsPubAck
+{
+        char            *Stream;
+        uint64_t        Sequence;
+        char            *Domain;
+        bool            Duplicate;
+
+} jsPubAck;
+
+/**
+ * Publish acknowledgment failure that will be passed to the optional
+ * #jsPubAckErrHandler callback.
+ */
+typedef struct jsPubAckErr
+{
+        natsMsg         *Msg;
+        natsStatus      Err;
+        jsErrCode       ErrCode;
+        const char      *ErrText;
+
+} jsPubAckErr;
+
+#ifndef BUILD_IN_DOXYGEN
+// Forward declarations
+typedef void (*jsPubAckErrHandler)(jsCtx *js, jsPubAckErr *pae, void *closure);
+typedef void (*jsPubAckHandler)(jsCtx *js, natsMsg *msg, jsPubAck *pa, jsPubAckErr *pae, void *closure);
+#endif
+
+/**
+ * Options for the js_DirectGetMsg() call, which retrieves a message
+ * from any server (not only the leader) as long as the stream has
+ * been created with a AllowDirect option.
+ *
+ * Note that some options are mutually exclusive but are not checked
+ * byt the library. The server will reject invalid requests and
+ * the library will return the error returned from the server.
+ */
+typedef struct jsDirectGetMsgOptions
+{
+        uint64_t        Sequence;               ///< Get the message at this sequence
+        const char      *NextBySubject;         ///< Get the next message (based on sequence) for that subject
+        const char      *LastBySubject;         ///< Get the last message on that subject
+
+} jsDirectGetMsgOptions;
+
+/**
+ * Options for the natsSubscription_FetchRequest() call, which is
+ * similar to natsSubscription_Fetch() but gives more control in
+ * the configuration of the fetch.
+ */
+typedef struct jsFetchRequest
+{
+        int64_t         Expires;        ///< Expiration of the request, expressed in nanoseconds
+        int             Batch;          ///< Maximum number of messages to be received (see MaxBytes)
+        int64_t         MaxBytes;       ///< Maximum bytes for the request (request complete based on whichever Batch or MaxBytes comes first)
+        bool            NoWait;         ///< Will not wait if the request cannot be completed
+        int64_t         Heartbeat;      ///< Have server sends heartbeats to help detect communication failures
+
+} jsFetchRequest;
+
+/**
+ * JetStream context options.
+ *
+ * Initialize the object with #jsOptions_Init.
+ */
+typedef struct jsOptions
+{
+        const char              *Prefix;                        ///< JetStream prefix, default is "$JS.API"
+        const char              *Domain;                        ///< Domain changes the domain part of JetSteam API prefix.
+        int64_t                 Wait;                           ///< Amount of time (in milliseconds) to wait for various JetStream API requests, default is 5000 ms (5 seconds).
+
+        /**
+         * Publish Async options
+         */
+        struct jsOptionsPublishAsync
+        {
+                int64_t                 MaxPending;             ///< Maximum outstanding asynchronous publishes that can be inflight at one time.
+
+                // If jsPubAckHandler is specified, the callback will be invoked
+                // for every asynchronous published message, either as a positive
+                // result, or with the error encountered when publishing that
+                // message. If this callback is specified, ErrHandler (see below)
+                // will be ignored.
+                jsPubAckHandler         AckHandler;             ///< Callback invoked for each asynchronous published message.
+                void                    *AckHandlerClosure;     ///< Closure (or user data) passed to #jsPubAckHandler callback.
+
+                // This callback is invoked for messages published asynchronously
+                // when an error is returned by the server or if the library has
+                // timed-out waiting for an acknowledgment back from the server
+                // (if publish uses the jsPubOptions.MaxWait).
+                jsPubAckErrHandler      ErrHandler;             ///< Callback invoked when error encountered publishing a given message.
+                void                    *ErrHandlerClosure;     ///< Closure (or user data) passed to #jsPubAckErrHandler callback.
+
+                int64_t                 StallWait;              ///< Amount of time (in milliseconds) to wait in a PublishAsync call when there is MaxPending inflight messages, default is 200 ms.
+
+        } PublishAsync;
+
+        /**
+         * Advanced stream options
+         *
+         * * `Purge` for advanced purge options.
+         * * `Info` for advanced information retrieval options.
+         */
+        struct jsOptionsStream
+        {
+                /**
+                 * Advanced stream purge options
+                 *
+                 * * `Subject` will filter the purge request to only messages that match the subject, which can have wildcards.<br>
+                 * * `Sequence` will purge up to but not including this sequence and can be combined with subject filtering.<br>
+                 * * `Keep` will specify how many messages to keep and can be combined with subject filtering.<br>
+                 *
+                 * \note `Sequence` and `Keep` are mutually exclusive, so both can not be set at the same time.
+                 */
+                struct jsOptionsStreamPurge
+                {
+                        const char      *Subject;       ///< This is the subject to match against messages for the purge command.
+                        uint64_t        Sequence;       ///< Purge up to but not including sequence.
+                        uint64_t        Keep;           ///< Number of messages to keep.
+
+                } Purge;                                ///< Optional stream purge options.
+
+                /**
+                 * Advance stream information retrieval options
+                 */
+                struct jsOptionsStreamInfo
+                {
+                        bool            DeletedDetails;         ///< Get the list of deleted message sequences.
+                        const char      *SubjectsFilter;        ///< Get the list of subjects in this stream.
+
+                } Info;                                 ///< Optional stream information retrieval options.
+
+        } Stream;                                       ///< Optional stream options.
+
+} jsOptions;
+
+/**
+ * The KeyValue store object.
+ */
+typedef struct __kvStore                kvStore;
+
+/**
+ * The KeyValue entry object.
+ */
+typedef struct __kvEntry                kvEntry;
+
+/**
+ * The KeyValue status object.
+ */
+typedef struct __kvStatus               kvStatus;
+
+/**
+ * The KeyValue watcher object.
+ */
+typedef struct __kvWatcher              kvWatcher;
+
+/**
+ * Determines the type of operation of a #kvEntry
+ */
+typedef enum
+{
+        kvOp_Unknown = 0,
+        kvOp_Put,
+        kvOp_Delete,
+        kvOp_Purge,
+
+} kvOperation;
+
+/**
+ * KeyValue configuration object.
+ *
+ * Initialize the object with #kvConfig_Init.
+ */
+typedef struct kvConfig
+{
+        const char      *Bucket;
+        const char      *Description;
+        int32_t         MaxValueSize;
+        uint8_t         History;
+        int64_t         TTL;
+        int64_t         MaxBytes;
+        jsStorageType   StorageType;
+        int             Replicas;
+        jsRePublish     *RePublish;
+
+} kvConfig;
+
+/**
+ * KeyValue watcher options object.
+ *
+ * Initialize the object with #kvWatchOptions_Init
+ */
+typedef struct kvWatchOptions
+{
+        bool            IgnoreDeletes;
+        bool            IncludeHistory;
+        bool            MetaOnly;
+        int64_t         Timeout;        ///< How long to wait (in milliseconds) for some operations to complete.
+
+} kvWatchOptions;
+
+/**
+ * KeyValue purge options object.
+ *
+ * Initialize the object with #kvPurgeOptions_Init
+ */
+typedef struct kvPurgeOptions
+{
+        // How long to wait (in milliseconds) for some operations to complete.
+        int64_t         Timeout;
+
+        // When calling kvStore_PurgeDeletes(), all keys that have a delete or
+        // purge marker as the last entry are gathered and then those keys
+        // are purged of their content, including the marker.
+        // Starting with NATS C client v3.3.0, if this option is not specified,
+        // only the markers older than 30 minutes will be deleted. Use this
+        // option to set the limit or a negative value to force removal of
+        // markers regardless of their age.
+        // The value is expressed as a time in nanoseconds.
+        int64_t         DeleteMarkersOlderThan;
+
+} kvPurgeOptions;
+
+/** \brief A list of KeyValue store entries.
+ *
+ * Used by some APIs which return a list of #kvEntry objects.
+ *
+ * Those APIs will not create the object, but instead initialize
+ * the object.
+ *
+ * Typically, the user will define the object on the stack and
+ * pass a pointer to this object to APIs that require a pointer
+ * to a #kvEntryList object.
+ *
+ * Similarly, calling #kvEntryList_Destroy will call #kvEntry_Destroy
+ * on entries in the list, free the array containing pointers
+ * to the entries, but not free the #kvEntryList object itself.
+ *
+ * @see kvEntryList_Destroy
+ */
+typedef struct kvEntryList
+{
+        kvEntry         **Entries;
+        int             Count;
+
+} kvEntryList;
+
+/** \brief A list of KeyValue store keys.
+ *
+ * Used by some APIs which return a list of key names.
+ *
+ * Those APIs will not create the object, but instead initialize
+ * the object.
+ *
+ * Typically, the user will define the object on the stack and
+ * pass a pointer to this object to APIs that require a pointer
+ * to a #kvKeysList object.
+ *
+ * Similarly, calling #kvKeysList_Destroy will free key strings
+ * in the list, free the array containing pointers to the keys,
+ * but not free the #kvKeysList object itself.
+ *
+ * @see kvKeysList_Cleanup
+ */
+typedef struct kvKeysList
+{
+        char            **Keys;
+        int             Count;
+
+} kvKeysList;
+
+#if defined(NATS_HAS_STREAMING)
+/** \brief A connection to a `NATS Streaming Server`.
+ *
+ * A #stanConnection represents a connection to a `NATS Streaming Server`.
+ */
+typedef struct __stanConnection     stanConnection;
+
+/** \brief Interest on a given channel.
+ *
+ * A #stanSubscription represents interest in a given channel.
+ */
+typedef struct __stanSubscription   stanSubscription;
+
+/** \brief The Streaming message.
+ *
+ * #stanMsg is the object passed to the subscriptions' message callbacks.
+ */
+typedef struct __stanMsg            stanMsg;
+
+/** \brief Way to configure a #stanConnection.
+ *
+ * Options can be used to create a customized #stanConnection.
+ */
+typedef struct __stanConnOptions    stanConnOptions;
+
+/** \brief Way to configure a #stanSubscription.
+ *
+ * Options can be used to create a customized #stanSubscription.
+ */
+typedef struct __stanSubOptions     stanSubOptions;
+#endif
+
+/** @} */ // end of typesGroup
+
+//
+// Callbacks.
+//
+
+/** \defgroup callbacksGroup Callbacks
+ *
+ *  NATS Callbacks.
+ *  @{
+ */
+
+/** \brief Callback used to deliver messages to the application.
+ *
+ * This is the callback that one provides when creating an asynchronous
+ * subscription. The library will invoke this callback for each message
+ * arriving through the subscription's connection.
+ *
+ * \warning If this callback is setup for a subject that is used as the reply
+ * subject to #natsConnection_PublishRequest calls (and its variants), it
+ * is possible to get an empty message with a header "Status" with value
+ * "503" that is sent by the server when there were no responders on the
+ * request's subject. Use #natsMsg_IsNoResponders to know if that is the case.
+ *
+ * @see natsConnection_Subscribe()
+ * @see natsConnection_QueueSubscribe()
+ * @see natsMsg_IsNoResponders()
+ */
+typedef void (*natsMsgHandler)(
+        natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure);
+
+/** \brief Callback used to notify the user of asynchronous connection events.
+ *
+ * This callback is used for asynchronous events such as disconnected
+ * and closed connections.
+ *
+ * @see natsOptions_SetClosedCB()
+ * @see natsOptions_SetDisconnectedCB()
+ * @see natsOptions_SetReconnectedCB()
+ *
+ * \warning Such callback is invoked from a dedicated thread and the state
+ *          of the connection that triggered the event may have changed since
+ *          that event was generated.
+ */
+typedef void (*natsConnectionHandler)(
+        natsConnection  *nc, void *closure);
+
+/** \brief Callback used to notify the user of errors encountered while processing
+ *         inbound messages.
+ *
+ * This callback is used to process asynchronous errors encountered while processing
+ * inbound messages, such as #NATS_SLOW_CONSUMER.
+ */
+typedef void (*natsErrHandler)(
+        natsConnection *nc, natsSubscription *subscription, natsStatus err,
+        void *closure);
+
+/** \brief Attach this connection to the external event loop.
+ *
+ * After a connection has (re)connected, this callback is invoked. It should
+ * perform the necessary work to start polling the given socket for READ events.
+ *
+ * @param userData location where the adapter implementation will store the
+ * object it created and that will later be passed to all other callbacks. If
+ * `*userData` is not `NULL`, this means that this is a reconnect event.
+ * @param loop the event loop (as a generic void*) this connection is being
+ * attached to.
+ * @param nc the connection being attached to the event loop.
+ * @param socket the socket to poll for read/write events.
+ */
+typedef natsStatus (*natsEvLoop_Attach)(
+        void            **userData,
+        void            *loop,
+        natsConnection  *nc,
+        natsSock        socket);
+
+/** \brief Read event needs to be added or removed.
+ *
+ * The `NATS` library will invoke this callback to indicate if the event
+ * loop should start (`add is `true`) or stop (`add` is `false`) polling
+ * for read events on the socket.
+ *
+ * @param userData the pointer to an user object created in #natsEvLoop_Attach.
+ * @param add `true` if the event library should start polling, `false` otherwise.
+ */
+typedef natsStatus (*natsEvLoop_ReadAddRemove)(
+        void            *userData,
+        bool            add);
+
+/** \brief Write event needs to be added or removed.
+ *
+ * The `NATS` library will invoke this callback to indicate if the event
+ * loop should start (`add is `true`) or stop (`add` is `false`) polling
+ * for write events on the socket.
+ *
+ * @param userData the pointer to an user object created in #natsEvLoop_Attach.
+ * @param add `true` if the event library should start polling, `false` otherwise.
+ */
+typedef natsStatus (*natsEvLoop_WriteAddRemove)(
+        void            *userData,
+        bool            add);
+
+/** \brief Detach from the event loop.
+ *
+ * The `NATS` library will invoke this callback to indicate that the connection
+ * no longer needs to be attached to the event loop. User can cleanup some state.
+ *
+ * @param userData the pointer to an user object created in #natsEvLoop_Attach.
+ */
+typedef natsStatus (*natsEvLoop_Detach)(
+        void            *userData);
+
+/** \brief Callback used to fetch and return account signed user JWT.
+ *
+ * This handler is invoked when connecting and reconnecting. It should
+ * return the user JWT that will be sent to the server.
+ *
+ * The user JWT is returned as a string that is allocated by the user and is
+ * freed by the library after the handler is invoked.
+ *
+ * If the user is unable to return the JWT, a status other than `NATS_OK` should
+ * be returned (we recommend `NATS_ERR`). A custom error message can be returned
+ * through `customErrTxt`. The user must allocate the memory for this error
+ * message and the library will free it after the invocation of the handler.
+ *
+ * \warning There may be repeated invocations of this handler for a given connection
+ * so it is crucial to always return a copy of the user JWT maintained by the
+ * application, since again, the library will free the memory pointed by `userJWT`
+ * after each invocation of this handler.
+ *
+ * @see natsOptions_SetUserCredentialsCallbacks()
+ * @see natsOptions_SetUserCredentialsFromFiles()
+ */
+typedef natsStatus (*natsUserJWTHandler)(
+        char            **userJWT,
+        char            **customErrTxt,
+        void            *closure);
+
+
+/** \brief Callback used to sign a nonce sent by the server.
+ *
+ * This handler is invoked when connecting and reconnecting. It should
+ * sign the given `nonce` and return a raw signature through `signature` and
+ * specify how many characters the signature has using `signatureLength`.
+ *
+ * The memory pointed by `signature` must be allocated by the user and
+ * will be freed by the library after each invocation of this handler.
+ *
+ * If the user is unable to sign, a status other than `NATS_OK` (we recommend
+ * `NATS_ERR`) should be returned. A custom error message can be returned
+ * through `customErrTxt`. The user must allocate the memory for this error
+ * message and the library will free it after the invocation of this handler.
+ *
+ * The library will base64 encode this raw signature and send that to the server.
+ *
+ * \warning There may be repeated invocations of this handler for a given connection
+ * so it is crucial to always return a copy of the signature, since again,
+ * the library will free the memory pointed by `signature` after each invocation
+ * of this handler.
+ *
+ * @see natsOptions_SetUserCredentialsCallbacks()
+ * @see natsOptions_SetUserCredentialsFromFiles()
+ * @see natsOptions_SetNKey()
+ */
+typedef natsStatus (*natsSignatureHandler)(
+        char            **customErrTxt,
+        unsigned char   **signature,
+        int             *signatureLength,
+        const char      *nonce,
+        void            *closure);
+
+/** \brief Callback used to build a token on connections and reconnections.
+ *
+ * This is the function that one provides to build a different token at each reconnect.
+ *
+ * @see natsOptions_SetTokenHandler()
+ *
+ * \warning Such callback is invoked synchronously from the connection thread.
+ */
+typedef const char* (*natsTokenHandler)(void *closure);
+
+
+/** \brief Callback used to notify that an object lifecycle is complete.
+ *
+ * Currently used for asynchronous #natsSubscription objects. When set, this callback will
+ * be invoked after the subscription is closed and the message handler has returned.
+ *
+ * @see natsSubscription_SetOnCompleteCB()
+ */
+typedef void (*natsOnCompleteCB)(void *closure);
+
+/** \brief Callback used to specify how long to wait between reconnects.
+ *
+ * This callback is used to get from the user the desired delay the library
+ * should pause before attempting to reconnect again. Note that this is invoked
+ * after the library tried the whole list of URLs and failed to reconnect.
+ *
+ * \note This callback is invoked from the connection reconnect thread and waits
+ * for user input. It should not block and instead quickly return the desired
+ * reconnect delay.
+ * The state of the connection is disconnected when this callback is invoked.
+ * Not much can be done with the passed connection, but user can call
+ * #natsConnection_Close() if desired. This will abort the reconnect attempts
+ * and close the connection.
+ *
+ * @param nc the pointer to the #natsConnection invoking this handler.
+ * @param attempts the number of times the library tried the whole list of server URLs.
+ * @param closure an optional pointer to a user defined object that was specified when
+ * registering the callback.
+ * @return the number of milliseconds to wait before trying to reconnect.
+ */
+typedef int64_t (*natsCustomReconnectDelayHandler)(natsConnection *nc, int attempts, void *closure);
+
+#ifdef BUILD_IN_DOXYGEN
+/** \brief Callback used to process asynchronous publish errors from JetStream.
+ *
+ * Callback used to process asynchronous publish errors from JetStream #js_PublishAsync
+ * and #js_PublishMsgAsync calls. The provided #jsPubAckErr object gives the user
+ * access to the encountered error along with the original message sent to the server
+ * for possible restransmitting.
+ *
+ * \note If the message is resent, the library will not destroy the original
+ * message and once again take ownership of it. To resend the message, do the
+ * following so that the library knows not to destroy the message (since the
+ * call will clear the `Msg` field from the #jsPubAckErr object).
+ *
+ * \code{.unparsed}
+ * void myPAECallback(jsCtx *js, jsPubAckErr *pae, void* closure)
+ * {
+ *      ...
+ *      // Resend the message
+ *      js_PublishMsgAsync(js, &(pae->Msg), NULL);
+ * }
+ * \endcode
+ *
+ * \warning The #jsPubAckErr object and its content will be invalid as
+ * soon as the callback returns.
+ *
+ * \warning Unlike a NATS message callback, the user does not have to destroy
+ * the original NATS message (present in the #jsPubAckErr object), the
+ * library will do it.
+ *
+ * @param js the pointer to the #jsCtx object.
+ * @param pae the pointer to the #jsPubAckErr object.
+ * @param closure an optional pointer to a user defined object that was specified when
+ * registering the callback.
+ */
+typedef void (*jsPubAckErrHandler)(jsCtx *js, jsPubAckErr *pae, void *closure);
+
+/** \brief Callback used to process asynchronous publish responses from JetStream.
+ *
+ * Callback used to process asynchronous publish responses (positive and negatives)
+ * from JetStream #js_PublishAsync and #js_PublishMsgAsync calls. The provided
+ * #jsPubAck or #jsPubAckErr objects give the user access to the successful
+ * acknowledgment from the server or the encountered error along with the original
+ * message sent to the server for possible restransmitting.
+ *
+ * \warning The user is responsible for destroying the message. If the message
+ * is resent using the #js_PublishMsgAsync call, the library is taking ownership
+ * of the message and calling #natsMsg_Destroy will have no effect because
+ * the pointer will have been set to `NULL`. So it is recommended to always
+ * call #natsMsg_Destroy at the end of the function.
+ *
+ * \code{.unparsed}
+ * void myAckHandler(jsCtx *js, natsMsg *msg, jsPubAck *pa, jsPubAckErr *pae, void *closure)
+ * {
+ *      if (pa != NULL)
+ *      {
+ *              // Success case...
+ *      }
+ *      else if (pae != NULL)
+ *      {
+ *              // Error case...
+ *              // If the application wants to resend the message:
+ *              js_PublishMsgAsync(js, &msg, NULL);
+ *      }
+ *      natsMsg_Destroy(msg);
+ * }
+ * \endcode
+ *
+ * \warning The #jsPubAck and #jsPubAckErr objects and their content will be
+ * invalid as soon as the callback returns.
+ *
+ * @param js the pointer to the #jsCtx object.
+ * @param msg the pointer to the original published #natsMsg.
+ * @param pa the pointer to the #jsPubAck object.
+ * @param pae the pointer to the #jsPubAckErr object.
+ * @param closure an optional pointer to a user defined object that was specified when
+ * registering the callback.
+ */
+typedef void (*jsPubAckHandler)(jsCtx *js, natsMsg *msg, jsPubAck *pa, jsPubAckErr *pae, void *closure);
+#endif
+
+#if defined(NATS_HAS_STREAMING)
+/** \brief Callback used to notify of an asynchronous publish result.
+ *
+ * This is used for asynchronous publishing to provide status of the acknowledgment.
+ * The function will be passed the GUID and any error state. No error means the
+ * message was successfully received by NATS Streaming.
+ *
+ * @see stanConnection_PublishAsync()
+ */
+typedef void (*stanPubAckHandler)(const char *guid, const char *error, void *closure);
+
+/** \brief Callback used to deliver messages to the application.
+ *
+ * This is the callback that one provides when creating an asynchronous
+ * subscription. The library will invoke this callback for each message
+ * arriving through the subscription's connection.
+ *
+ * @see stanConnection_Subscribe()
+ * @see stanConnection_QueueSubscribe()
+ */
+typedef void (*stanMsgHandler)(
+        stanConnection *sc, stanSubscription *sub, const char *channel, stanMsg *msg, void *closure);
+
+/** \brief Callback used to notify the user of the permanent loss of the connection.
+ *
+ * This callback is used to notify the user that the connection to the Streaming
+ * server is permanently lost.
+ *
+ */
+typedef void (*stanConnectionLostHandler)(
+        stanConnection *sc, const char* errorTxt, void *closure);
+#endif
+
+/** @} */ // end of callbacksGroup
+
+//
+// Functions.
+//
+/** \defgroup funcGroup Functions
+ *
+ *  NATS Functions.
+ *  @{
+ */
+
+/** \defgroup libraryGroup Library
+ *
+ *  Library and helper functions.
+ * @{
+ */
+
+/** \brief Initializes the library.
+ *
+ * This initializes the library.
+ *
+ * It is invoked automatically when creating a connection, using a default
+ * spin count. However, you can call this explicitly before creating the very
+ * first connection in order for your chosen spin count to take effect.
+ *
+ * \warning You must not call #nats_Open and #nats_Close concurrently.
+ *
+ * @param lockSpinCount The number of times the library will spin trying to
+ * lock a mutex object.
+ */
+NATS_EXTERN natsStatus
+nats_Open(int64_t lockSpinCount);
+
+
+/** \brief Returns the Library's version.
+ *
+ * Returns the version of the library your application is linked with.
+ */
+NATS_EXTERN const char*
+nats_GetVersion(void);
+
+/** \brief Returns the Library's version as a number.
+ *
+ * The version is returned as an hexadecimal number. For instance, if the
+ * string version is "1.2.3", the value returned will be:
+ *
+ * > 0x010203
+ */
+NATS_EXTERN uint32_t
+nats_GetVersionNumber(void);
+
+#ifdef BUILD_IN_DOXYGEN
+/** \brief Check that the header is compatible with the library.
+ *
+ * The version of the header you used to compile your application may be
+ * incompatible with the library the application is linked with.
+ *
+ * This function will check that the two are compatibles. If they are not,
+ * a message is printed and the application will exit.
+ *
+ * @return `true` if the header and library are compatibles, otherwise the
+ * application exits.
+ *
+ * @see nats_GetVersion
+ * @see nats_GetVersionNumber
+ */
+NATS_EXTERN bool nats_CheckCompatibility(void);
+#else
+
+#define nats_CheckCompatibility() nats_CheckCompatibilityImpl(NATS_VERSION_REQUIRED_NUMBER, \
+                                                              NATS_VERSION_NUMBER, \
+                                                              NATS_VERSION_STRING)
+
+NATS_EXTERN bool
+nats_CheckCompatibilityImpl(uint32_t reqVerNumber, uint32_t verNumber, const char *verString);
+
+#endif
+
+/** \brief Gives the current time in milliseconds.
+ *
+ * Gives the current time in milliseconds.
+ */
+NATS_EXTERN int64_t
+nats_Now(void);
+
+/** \brief Gives the current time in nanoseconds.
+ *
+ * Gives the current time in nanoseconds. When such granularity is not
+ * available, the time returned is still expressed in nanoseconds.
+ */
+NATS_EXTERN int64_t
+nats_NowInNanoSeconds(void);
+
+/** \brief Sleeps for a given number of milliseconds.
+ *
+ * Causes the current thread to be suspended for at least the number of
+ * milliseconds.
+ *
+ * @param sleepTime the number of milliseconds.
+ */
+NATS_EXTERN void
+nats_Sleep(int64_t sleepTime);
+
+/** \brief Returns the calling thread's last known error.
+ *
+ * Returns the calling thread's last known error. This can be useful when
+ * #natsConnection_Connect fails. Since no connection object is returned,
+ * you would not be able to call #natsConnection_GetLastError.
+ *
+ * @param status if not `NULL`, this function will store the last error status
+ * in there.
+ * @return the thread local error string.
+ *
+ * \warning Do not free the string returned by this function.
+ */
+NATS_EXTERN const char*
+nats_GetLastError(natsStatus *status);
+
+/** \brief Returns the calling thread's last known error stack.
+ *
+ * Copies the calling thread's last known error stack into the provided buffer.
+ * If the buffer is not big enough, #NATS_INSUFFICIENT_BUFFER is returned.
+ *
+ * @param buffer the buffer into the stack is copied.
+ * @param bufLen the size of the buffer
+ */
+NATS_EXTERN natsStatus
+nats_GetLastErrorStack(char *buffer, size_t bufLen);
+
+/** \brief Prints the calling thread's last known error stack into the file.
+ *
+ * This call prints the calling thread's last known error stack into the file `file`.
+ * It first prints the error status and the error string, then the stack.
+ *
+ * Here is an example for a call:
+ *
+ * \code{.unparsed}
+ * Error: 29 - SSL Error - (conn.c:565): SSL handshake error: sslv3 alert bad certificate
+ * Stack: (library version: 1.2.3-beta)
+ *   01 - _makeTLSConn
+ *   02 - _checkForSecure
+ *   03 - _processExpectedInfo
+ *   04 - _processConnInit
+ *   05 - _connect
+ *   06 - natsConnection_Connect
+ * \endcode
+ *
+ * @param file the file the stack is printed to.
+ */
+NATS_EXTERN void
+nats_PrintLastErrorStack(FILE *file);
+
+/** \brief Sets the maximum size of the global message delivery thread pool.
+ *
+ * Normally, each asynchronous subscriber that is created has its own
+ * message delivery thread. The advantage is that it reduces lock
+ * contentions, therefore improving performance.<br>
+ * However, if an application creates many subscribers, this is not scaling
+ * well since the process would use too many threads.
+ *
+ * The library has a thread pool that can perform message delivery. If
+ * a connection is created with the proper option set
+ * (#natsOptions_UseGlobalMessageDelivery), then this thread pool
+ * will be responsible for delivering the messages. The thread pool is
+ * lazily initialized, that is, no thread is used as long as no subscriber
+ * (requiring global message delivery) is created.
+ *
+ * Each subscriber will be attached to a given worker on the pool so that
+ * message delivery order is guaranteed.
+ *
+ * This call allows you to set the maximum size of the pool.
+ *
+ * \note At this time, a pool does not shrink, but the caller will not get
+ * an error when calling this function with a size smaller than the current
+ * size.
+ *
+ * @see natsOptions_UseGlobalMessageDelivery()
+ * @see \ref envVariablesGroup
+ *
+ * @param max the maximum size of the pool.
+ */
+NATS_EXTERN natsStatus
+nats_SetMessageDeliveryPoolSize(int max);
+
+/** \brief Release thread-local memory possibly allocated by the library.
+ *
+ * This needs to be called on user-created threads where NATS calls are
+ * performed. This does not need to be called in threads created by
+ * the library. For instance, do not call this function in the
+ * message handler that you specify when creating a subscription.
+ *
+ * Also, you do not need to call this in an user thread (or the main)
+ * if you are calling nats_Close() there.
+ */
+NATS_EXTERN void
+nats_ReleaseThreadMemory(void);
+
+/** \brief Signs a given text using the provided private key.
+ *
+ * The key is the encoded string representation of the private key, or seed.
+ * This is what you get when generating an NKey using NATS tooling.
+ *
+ * The input is a string, generally the nonce sent by the server when
+ * accepting a connection.
+ *
+ * This function signs the input and returns the signature through the
+ * output arguments. This call allocates memory necessary to hold
+ * the signature. If this is used as part of the signature callback
+ * passed to #natsOptions_SetNKey(), then the memory will be automatically
+ * freed by the library after the signature has been inserted in the CONNECT
+ * protocol.
+ * If this function is used outside of this context, it is the user responsibility
+ * to free the allocated memory when no longer needed.
+ *
+ * @see natsOptions_SetNKey()
+ *
+ * @param encodedSeed the string encoded private key, also known as seed.
+ * @param input the input to be signed.
+ * @param signature the memory location of allocated memory containing the signed input.
+ * @param signatureLength the size of the allocated signature.
+ */
+NATS_EXTERN natsStatus
+nats_Sign(const char    *encodedSeed,
+          const char    *input,
+          unsigned char **signature,
+          int           *signatureLength);
+
+/** \brief Tear down the library.
+ *
+ * Releases memory used by the library.
+ *
+ * For this to take effect, all NATS objects that you have created
+ * must first be destroyed.
+ *
+ * This call does not block and it is possible that the library
+ * is not unloaded right away if there are still internal threads referencing
+ * it, so calling #nats_Open() right away may fail. If you want to ensure
+ * that the library is fully unloaded, call #nats_CloseAndWait() instead.
+ *
+ * \note There are still a small number of thread local keys and a mutex
+ * that are not freed until the application exit (in which case a final cleanup
+ * is executed).
+ *
+ * \warning You must not call #nats_Open and #nats_Close concurrently.
+ *
+ * @see nats_CloseAndWait()
+ */
+NATS_EXTERN void
+nats_Close(void);
+
+/** \brief Tear down the library and wait for all resources to be released.
+ *
+ * Similar to #nats_Close() except that this call will make sure that all
+ * references to the library are decremented before returning (up to the
+ * given timeout). Internal threads (such as subscriptions dispatchers,
+ * etc..) hold a reference to the library. Only when all references have
+ * been released that this call will return. It means that you must call
+ * all the "destroy" calls before calling this function, otherwise it will
+ * block forever (or up to given timeout).
+ *
+ * For instance, this code would "deadlock":
+ * \code{.unparsed}
+ * natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+ * nats_CloseWait(0);
+ * natsConnection_Destroy(nc);
+ * \endcode
+ * But this would work as expected:
+ * \code{.unparsed}
+ * natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+ * natsConnection_Destroy(nc);
+ * nats_CloseWait(0);
+ * \endcode
+ * The library and other objects (such as connections, subscriptions, etc)
+ * use internal threads. After the destroy call, it is possible or even likely
+ * that some threads are still running, holding references to the library.
+ * Unlike #nats_Close(), which will simply ensure that the library is ultimately
+ * releasing memory, the #nats_CloseAndWait() API will ensure that all those internal
+ * threads have unrolled and that the memory used by the library is released before
+ * returning.
+ *
+ * \note If a timeout is specified, the call may return #NATS_TIMEOUT but the
+ * library is still being tear down and memory will be released. The error is just
+ * to notify you that the operation did not complete in the allotted time. Calling
+ * #nats_Open() in this case (or any implicit opening of the library) may result
+ * in an error since the library may still be in the process of being closed.
+ *
+ * \warning Due to the blocking nature it is illegal to call this from any
+ * NATS thread (such as message or connection callbacks). If trying to do so,
+ * a #NATS_ILLEGAL_STATE error will be returned.
+ *
+ * @see nats_Close()
+ *
+ * @param timeout the maximum time to wait for the library to be closed. If
+ * negative or 0, waits for as long as needed.
+ */
+NATS_EXTERN natsStatus
+nats_CloseAndWait(int64_t timeout);
+
+/** @} */ // end of libraryGroup
+
+/** \defgroup statusGroup Status
+ *
+ * Functions related to #natsStatus.
+ * @{
+ */
+
+/** \brief Get the text corresponding to a #natsStatus.
+ *
+ * Returns the static string corresponding to the given status.
+ *
+ * \warning The returned string is a static string, do not attempt to free
+ * it.
+ *
+ * @param s status to get the text representation from.
+ */
+NATS_EXTERN const char*
+natsStatus_GetText(natsStatus s);
+
+/** @} */ // end of statusGroup
+
+/** \defgroup statsGroup Statistics
+ *
+ *  Statistics Functions.
+ *  @{
+ */
+
+/** \brief Creates a #natsStatistics object.
+ *
+ * Creates a statistics object that can be passed to #natsConnection_GetStats().
+ *
+ * \note The object needs to be destroyed when no longer needed.
+ *
+ * @see #natsStatistics_Destroy()
+ *
+ * @param newStats the location where to store the pointer to the newly created
+ * #natsStatistics object.
+ */
+NATS_EXTERN natsStatus
+natsStatistics_Create(natsStatistics **newStats);
+
+/** \brief Extracts the various statistics values.
+ *
+ * Gets the counts out of the statistics object.
+ *
+ * \note You can pass `NULL` to any of the count your are not interested in
+ * getting.
+ *
+ * @see natsConnection_GetStats()
+ *
+ * @param stats the pointer to the #natsStatistics object to get the values from.
+ * @param inMsgs total number of inbound messages.
+ * @param inBytes total size (in bytes) of inbound messages.
+ * @param outMsgs total number of outbound messages.
+ * @param outBytes total size (in bytes) of outbound messages.
+ * @param reconnects total number of times the client has reconnected.
+ */
+NATS_EXTERN natsStatus
+natsStatistics_GetCounts(const natsStatistics *stats,
+                         uint64_t *inMsgs, uint64_t *inBytes,
+                         uint64_t *outMsgs, uint64_t *outBytes,
+                         uint64_t *reconnects);
+
+/** \brief Destroys the #natsStatistics object.
+ *
+ * Destroys the statistics object, freeing up memory.
+ *
+ * @param stats the pointer to the #natsStatistics object to destroy.
+ */
+NATS_EXTERN void
+natsStatistics_Destroy(natsStatistics *stats);
+
+/** @} */ // end of statsGroup
+
+/** \defgroup optsGroup Options
+ *
+ *  NATS Options.
+ *  @{
+ */
+
+/** \brief Creates a #natsOptions object.
+ *
+ * Creates a #natsOptions object. This object is used when one wants to set
+ * specific options prior to connecting to the `NATS Server`.
+ *
+ * After making the appropriate natsOptions_Set calls, this object is passed
+ * to the #natsConnection_Connect() call, which will clone this object. After
+ * natsConnection_Connect() returns, modifications to the options object
+ * will not affect the connection.
+ *
+ * \note The object needs to be destroyed when no longer needed.*
+ *
+ * @see natsConnection_Connect()
+ * @see natsOptions_Destroy()
+ *
+ * @param newOpts the location where store the pointer to the newly created
+ * #natsOptions object.
+ */
+NATS_EXTERN natsStatus
+natsOptions_Create(natsOptions **newOpts);
+
+/** \brief Sets the URL to connect to.
+ *
+ * Sets the URL of the `NATS Server` the client should try to connect to.
+ * The URL can contain optional user name and password.
+ *
+ * Some valid URLS:
+ *
+ * - nats://localhost:4222
+ * - nats://user\@localhost:4222
+ * - nats://user:password\@localhost:4222
+ *
+ * @see natsOptions_SetServers
+ * @see natsOptions_SetUserInfo
+ * @see natsOptions_SetToken
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param url the string representing the URL the connection should use
+ * to connect to the server.
+ *
+ */
+/*
+ * The above is for doxygen. The proper syntax for username/password
+ * is without the '\' character:
+ *
+ * nats://localhost:4222
+ * nats://user@localhost:4222
+ * nats://user:password@localhost:4222
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetURL(natsOptions *opts, const char *url);
+
+/** \brief Set the list of servers to try to (re)connect to.
+ *
+ * This specifies a list of servers to try to connect (or reconnect) to.
+ * Note that if you call #natsOptions_SetURL() too, the actual list will contain
+ * the one from #natsOptions_SetURL() and the ones specified in this call.
+ *
+ * @see natsOptions_SetURL
+ * @see natsOptions_SetUserInfo
+ * @see natsOptions_SetToken
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param servers the array of strings representing the server URLs.
+ * @param serversCount the size of the array.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetServers(natsOptions *opts, const char** servers, int serversCount);
+
+/** \brief Sets the user name/password to use when not specified in the URL.
+ *
+ * Credentials are usually provided through the URL in the form:
+ * <c>nats://foo:bar\@localhost:4222</c>.<br>
+ * Until now, you could specify URLs in two ways, with #natsOptions_SetServers
+ * or #natsConnection_ConnectTo. The client library would connect (or reconnect)
+ * only to this given list of URLs, so if any of the server in the list required
+ * authentication, you were responsible for providing the appropriate credentials
+ * in the URLs.<br>
+ * <br>
+ * However, with cluster auto-discovery, the client library asynchronously receives
+ * URLs of servers in the cluster. These URLs do not contain any embedded credentials.
+ * <br>
+ * You need to use this function (or #natsOptions_SetToken) to instruct the client
+ * library to use those credentials when connecting to a server that requires
+ * authentication and for which there is no embedded credentials in the URL.
+ *
+ * @see natsOptions_SetToken
+ * @see natsOptions_SetURL
+ * @see natsOptions_SetServers
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param user the user name to send to the server during connect.
+ * @param password the password to send to the server during connect.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetUserInfo(natsOptions *opts, const char *user, const char *password);
+
+/** \brief Sets the token to use when not specified in the URL.
+ *
+ * Tokens are usually provided through the URL in the form:
+ * <c>nats://mytoken\@localhost:4222</c>.<br>
+ * Until now, you could specify URLs in two ways, with #natsOptions_SetServers
+ * or #natsConnection_ConnectTo. The client library would connect (or reconnect)
+ * only to this given list of URLs, so if any of the server in the list required
+ * authentication, you were responsible for providing the appropriate token
+ * in the URLs.<br>
+ * <br>
+ * However, with cluster auto-discovery, the client library asynchronously receives
+ * URLs of servers in the cluster. These URLs do not contain any embedded tokens.
+ * <br>
+ * You need to use this function (or #natsOptions_SetUserInfo) to instruct the client
+ * library to use this token when connecting to a server that requires
+ * authentication and for which there is no embedded token in the URL.
+ *
+ * @see natsOptions_SetUserInfo
+ * @see natsOptions_SetURL
+ * @see natsOptions_SetServers
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param token the token to send to the server during connect.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetToken(natsOptions *opts, const char *token);
+
+/** \brief Sets the tokenCb to use whenever a token is needed.
+ *
+ * For use cases where setting a static token through the URL<br>
+ * or through #natsOptions_SetToken is not desirable.<br>
+ * <br>
+ * This function can be used to generate a token whenever the client needs one.<br>
+ * Some example of use cases: expiring token, credential rotation, ...
+ *
+ * @see natsOptions_SetToken
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param tokenCb the tokenCb to use to generate a token to the server during connect.
+ * @param closure a pointer to an user defined object (can be `NULL`). See
+ * the #natsMsgHandler prototype.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetTokenHandler(natsOptions *opts, natsTokenHandler tokenCb,
+                            void *closure);
+
+/** \brief Indicate if the servers list should be randomized.
+ *
+ * If 'noRandomize' is true, then the list of server URLs is used in the order
+ * provided by #natsOptions_SetURL() + #natsOptions_SetServers(). Otherwise, the
+ * list is formed in a random order.
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param noRandomize if `true`, the list will be used as-is.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetNoRandomize(natsOptions *opts, bool noRandomize);
+
+/** \brief Sets the (re)connect process timeout.
+ *
+ * This timeout, expressed in milliseconds, is used to interrupt a (re)connect
+ * attempt to a `NATS Server`. This timeout is used both for the low level TCP
+ * connect call, and for timing out the response from the server to the client's
+ * initial `PING` protocol.
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param timeout the time, in milliseconds, allowed for an individual connect
+ * (or reconnect) to complete.
+ *
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetTimeout(natsOptions *opts, int64_t timeout);
+
+/** \brief Sets the name.
+ *
+ * This name is sent as part of the `CONNECT` protocol. There is no default name.
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param name the name to set.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetName(natsOptions *opts, const char *name);
+
+/** \brief Sets the secure mode.
+ *
+ * Indicates to the server if the client wants a secure (SSL/TLS) connection.
+ *
+ * The default is `false`.
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param secure `true` for a secure connection, `false` otherwise.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetSecure(natsOptions *opts, bool secure);
+
+/** \brief Loads the trusted CA certificates from a file.
+ *
+ * Loads the trusted CA certificates from a file.
+ *
+ * Note that the certificates are added to a SSL context for this #natsOptions
+ * object at the time of this call, so possible errors while loading the
+ * certificates will be reported now instead of when a connection is created.
+ * You can get extra information by calling #nats_GetLastError.
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param fileName the file containing the CA certificates.
+ *
+ */
+NATS_EXTERN natsStatus
+natsOptions_LoadCATrustedCertificates(natsOptions *opts, const char *fileName);
+
+/** \brief Sets the trusted CA certificates from memory.
+ *
+ * Similar to #natsOptions_LoadCATrustedCertificates expect that instead
+ * of loading from file, this loads from the given memory location.
+ *
+ * If more than one certificate need to be provided, they need to be
+ * concatenated. For instance:
+ *
+ * \code{.unparsed}
+ * const char *certs =
+ *    "-----BEGIN CERTIFICATE-----\n"
+ *    "MIIGjzCCBHegAwIBAgIJAKT2W9SKY7o4MA0GCSqGSIb3DQEBCwUAMIGLMQswCQYD\n"
+ *    (...)
+ *    "-----END CERTIFICATE-----\n"
+ *    "-----BEGIN CERTIFICATE-----\n"
+ *    "MIIXyz...\n"
+ *    (...)
+ *    "-----END CERTIFICATE-----\n"
+ * \endcode
+ *
+ * @see natsOptions_LoadCATrustedCertificates
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param certificates the string containing the concatenated CA certificates.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetCATrustedCertificates(natsOptions *opts, const char *certificates);
+
+/** \brief Loads the certificate chain from a file, using the given key.
+ *
+ * The certificates must be in PEM format and must be sorted starting with
+ * the subject's certificate, followed by intermediate CA certificates if
+ * applicable, and ending at the highest level (root) CA.
+ *
+ * The private key file format supported is also PEM.
+ *
+ * See #natsOptions_LoadCATrustedCertificates regarding error reports.
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param certsFileName the file containing the client certificates.
+ * @param keyFileName the file containing the client private key.
+ */
+NATS_EXTERN natsStatus
+natsOptions_LoadCertificatesChain(natsOptions *opts,
+                                  const char *certsFileName,
+                                  const char *keyFileName);
+
+/** \brief Sets the client certificate and key.
+ *
+ * Similar to #natsOptions_LoadCertificatesChain expect that instead
+ * of loading from file, this loads from the given memory locations.
+ *
+ * @see natsOptions_LoadCertificatesChain()
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param cert the memory location containing the client certificates.
+ * @param key the memory location containing the client private key.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetCertificatesChain(natsOptions *opts,
+                                 const char *cert,
+                                 const char *key);
+
+/** \brief Sets the list of available ciphers.
+ *
+ * \note This function does not impact TLSv1.3 ciphersuites.
+ *
+ * Sets the list of available ciphers.
+ * Check https://www.openssl.org/docs/man1.1.1/man1/ciphers.html for the
+ * proper syntax. Here is an example:
+ *
+ * > "-ALL:HIGH"
+ *
+ * See #natsOptions_LoadCATrustedCertificates regarding error reports.
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param ciphers the ciphers suite.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetCiphers(natsOptions *opts, const char *ciphers);
+
+/** \brief Sets the list of available ciphers for TLSv1.3.
+ *
+ * Sets the list of available ciphers.
+ * Check https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_set_ciphersuites.html for the
+ * proper syntax. Here is an example:
+ *
+ * > "TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256"
+ *
+ * See #natsOptions_LoadCATrustedCertificates regarding error reports.
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param ciphers the ciphers suite.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetCipherSuites(natsOptions *opts, const char *ciphers);
+
+/** \brief Sets the server certificate's expected hostname.
+ *
+ * If set, the library will check that the hostname in the server
+ * certificate matches the given `hostname`. This will occur when a connection
+ * is created, not at the time of this call.
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param hostname the expected server certificate hostname.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetExpectedHostname(natsOptions *opts, const char *hostname);
+
+/** \brief Switch server certificate verification.
+ *
+ * By default, the server certificate is verified. You can disable the verification
+ * by passing <c>true</c> to this function.
+ *
+ * \warning This is fine for tests but use with caution since this is not secure.
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param skip set it to <c>true</c> to disable - or skip - server certificate verification.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SkipServerVerification(natsOptions *opts, bool skip);
+
+/** \brief Sets the verbose mode.
+ *
+ * Sets the verbose mode. If `true`, sends are echoed by the server with
+ * an `OK` protocol message.
+ *
+ * The default is `false`.
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param verbose `true` for a verbose protocol, `false` otherwise.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetVerbose(natsOptions *opts, bool verbose);
+
+/** \brief Sets the pedantic mode.
+ *
+ * Sets the pedantic mode. If `true` some extra checks will be performed
+ * by the server.
+ *
+ * The default is `false`
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param pedantic `true` for a pedantic protocol, `false` otherwise.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetPedantic(natsOptions *opts, bool pedantic);
+
+/** \brief Sets the ping interval.
+ *
+ * Interval, expressed in milliseconds, in which the client sends `PING`
+ * protocols to the `NATS Server`.
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param interval the interval, in milliseconds, at which the connection
+ * will send `PING` protocols to the server.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetPingInterval(natsOptions *opts, int64_t interval);
+
+/** \brief Sets the limit of outstanding `PING`s without corresponding `PONG`s.
+ *
+ * Specifies the maximum number of `PING`s without corresponding `PONG`s (which
+ * should be received from the server) before closing the connection with
+ * the #NATS_STALE_CONNECTION status. If reconnection is allowed, the client
+ * library will try to reconnect.
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param maxPingsOut the maximum number of `PING`s without `PONG`s
+ * (positive number).
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetMaxPingsOut(natsOptions *opts, int maxPingsOut);
+
+/** \brief Sets the size of the internal read/write buffers.
+ *
+ * Sets the size, in bytes, of the internal read/write buffers used for
+ * reading/writing data from a socket.
+ * If not specified, or the value is 0, the library will use a default value,
+ * currently set to 32KB.
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param ioBufSize the size, in bytes, of the internal buffer for read/write
+ * operations.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetIOBufSize(natsOptions *opts, int ioBufSize);
+
+/** \brief Indicates if the connection will be allowed to reconnect.
+ *
+ * Specifies whether or not the client library should try to reconnect when
+ * losing the connection to the `NATS Server`.
+ *
+ * The default is `true`.
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param allow `true` if the connection is allowed to reconnect, `false`
+ * otherwise.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetAllowReconnect(natsOptions *opts, bool allow);
+
+/** \brief Sets the maximum number of reconnect attempts.
+ *
+ * Specifies the maximum number of reconnect attempts.
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param maxReconnect the maximum number of reconnects (positive number).
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetMaxReconnect(natsOptions *opts, int maxReconnect);
+
+/** \brief Sets the time between reconnect attempts.
+ *
+ * Specifies how long to wait between two reconnect attempts from the same
+ * server. This means that if you have a list with S1,S2 and are currently
+ * connected to S1, and get disconnected, the library will immediately
+ * attempt to connect to S2. If this fails, it will go back to S1, and this
+ * time will wait for `reconnectWait` milliseconds since the last attempt
+ * to connect to S1.
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param reconnectWait the time, in milliseconds, to wait between attempts
+ * to reconnect to the same server.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetReconnectWait(natsOptions *opts, int64_t reconnectWait);
+
+/** \brief Set the upper bound of a random delay added to reconnect wait.
+ *
+ * After a disconnect, the library will try to reconnect to any server URLs
+ * in its list (the URLs are either provided by the user or discovered through
+ * gossip protocol).
+ *
+ * After the library failed to reconnect to every server in the list, it
+ * will wait for `reconnectWait` as specified with #natsOptions_SetReconnectWait().
+ * This option adds some random jitter to the reconnect wait delay.
+ *
+ * This will help minimize the thundering herd phenomenon. For instance, suppose
+ * a server has 1000 connections, all were created at different times, but
+ * have the same reconnect wait option. If this server suddenly stops, then all
+ * connections will detect the failure and initiate a reconnect at the same time.
+ * The issue is even greater when those connections are TLS because of the added
+ * cost of the TLS handshake.
+ *
+ * @see natsOptions_SetReconnectWait()
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param jitter the jitter in milliseconds for non TLS connections.
+ * @param jitterTLS the jitter in milliseconds for TLS connections.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetReconnectJitter(natsOptions *opts, int64_t jitter, int64_t jitterTLS);
+
+/** \brief Sets the handler to invoke when the library needs to wait before the next reconnect attempts.
+ *
+ * This callback is invoked after the library tried every URL in the server list
+ * and failed to reconnect. It passes to the user the current number of attempts.
+ * This function shall return the amount of time the library will sleep before attempting
+ * to reconnect again.
+ *
+ * It is strongly recommended that this value contains some jitter to prevent all
+ * connections to attempt reconnecting at the same time.
+ *
+ * \note When using this approach, the reconnect wait as specified by #natsOptions_SetReconnectWait()
+ * is ignored.
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param cb the custom reconnect delay handler to invoke.
+ * @param closure a pointer to an user defined object (can be `NULL`). See
+ * the #natsCustomReconnectDelayHandler prototype.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetCustomReconnectDelay(natsOptions *opts,
+                                    natsCustomReconnectDelayHandler cb,
+                                    void *closure);
+
+/** \brief Sets the size of the backing buffer used during reconnect.
+ *
+ * Sets the size, in bytes, of the backing buffer holding published data
+ * while the library is reconnecting. Once this buffer has been exhausted,
+ * publish operations will return the #NATS_INSUFFICIENT_BUFFER error.
+ * If not specified, or the value is 0, the library will use a default value,
+ * currently set to 8MB.
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param reconnectBufSize the size, in bytes, of the backing buffer for
+ * write operations during a reconnect.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetReconnectBufSize(natsOptions *opts, int reconnectBufSize);
+
+/** \brief Sets the maximum number of pending messages per subscription.
+ *
+ * Specifies the maximum number of inbound messages that can be buffered in the
+ * library, for each subscription, before inbound messages are dropped and
+ * #NATS_SLOW_CONSUMER status is reported to the #natsErrHandler callback (if
+ * one has been set).
+ *
+ * @see natsOptions_SetErrorHandler()
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param maxPending the number of messages allowed to be buffered by the
+ * library before triggering a slow consumer scenario.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetMaxPendingMsgs(natsOptions *opts, int maxPending);
+
+/** \brief Sets the error handler for asynchronous events.
+ *
+ * Specifies the callback to invoke when an asynchronous error
+ * occurs. This is used by applications having only asynchronous
+ * subscriptions that would not know otherwise that a problem with the
+ * connection occurred.
+ *
+ * @see natsErrHandler
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param errHandler the error handler callback.
+ * @param closure a pointer to an user object that will be passed to
+ * the callback. `closure` can be `NULL`.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetErrorHandler(natsOptions *opts, natsErrHandler errHandler,
+                            void *closure);
+
+/** \brief Sets the callback to be invoked when a connection to a server
+ *         is permanently lost.
+ *
+ * Specifies the callback to invoke when a connection is terminally closed,
+ * that is, after all reconnect attempts have failed (when reconnection is
+ * allowed).
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param closedCb the callback to be invoked when the connection is closed.
+ * @param closure a pointer to an user object that will be passed to
+ * the callback. `closure` can be `NULL`.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetClosedCB(natsOptions *opts, natsConnectionHandler closedCb,
+                        void *closure);
+
+/** \brief Sets the callback to be invoked when the connection to a server is
+ *         lost.
+ *
+ * Specifies the callback to invoke when a connection to the `NATS Server`
+ * is lost.
+ *
+ * \warning Invocation of this callback is asynchronous, which means that
+ * the state of the connection may have changed when this callback is
+ * invoked.
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param disconnectedCb the callback to be invoked when a connection to
+ * a server is lost
+ * @param closure a pointer to an user object that will be passed to
+ * the callback. `closure` can be `NULL`.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetDisconnectedCB(natsOptions *opts,
+                              natsConnectionHandler disconnectedCb,
+                              void *closure);
+
+/** \brief Sets the callback to be invoked when the connection has reconnected.
+ *
+ * Specifies the callback to invoke when the client library has successfully
+ * reconnected to a `NATS Server`.
+ *
+ * \warning Invocation of this callback is asynchronous, which means that
+ * the state of the connection may have changed when this callback is
+ * invoked.
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param reconnectedCb the callback to be invoked when the connection to
+ * a server has been re-established.
+ * @param closure a pointer to an user object that will be passed to
+ * the callback. `closure` can be `NULL`.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetReconnectedCB(natsOptions *opts,
+                             natsConnectionHandler reconnectedCb,
+                             void *closure);
+
+/** \brief Sets the callback to be invoked when new servers are discovered.
+ *
+ * Specifies the callback to invoke when the client library has been notified
+ * of one or more new `NATS Servers`.
+ *
+ * \warning Invocation of this callback is asynchronous, which means that
+ * the state may have changed when this callback is invoked.
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param discoveredServersCb the callback to be invoked when new servers
+ * have been discovered.
+ * @param closure a pointer to an user object that will be passed to
+ * the callback. `closure` can be `NULL`.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetDiscoveredServersCB(natsOptions *opts,
+                                   natsConnectionHandler discoveredServersCb,
+                                   void *closure);
+
+/** \brief Sets if the library should ignore or not discovered servers.
+ *
+ * By default, when a server joins a cluster, a client is notified
+ * of the new URL and added to the list so it can be used in case
+ * of a reconnect.
+ *
+ * The servers can be configured to disable this gossip, however, if
+ * not done at the servers level, this option allows the discovered
+ * servers to be ignored.
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param ignore if discovered server should be ignored or not.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetIgnoreDiscoveredServers(natsOptions *opts, bool ignore);
+
+/** \brief Sets the callback to be invoked when server enters lame duck mode.
+ *
+ * Specifies the callback to invoke when the server notifies
+ * the connection that it entered lame duck mode, that is, going to
+ * gradually disconnect all its connections before shuting down. This is
+ * often used in deployments when upgrading NATS Servers.
+ *
+ * \warning Invocation of this callback is asynchronous, which means that
+ * the state may have changed when this callback is invoked.
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param lameDuckCb the callback to be invoked when server enters
+ * lame duck mode.
+ * @param closure a pointer to an user object that will be passed to
+ * the callback. `closure` can be `NULL`.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetLameDuckModeCB(natsOptions *opts,
+                              natsConnectionHandler lameDuckCb,
+                              void *closure);
+
+/** \brief Sets the external event loop and associated callbacks.
+ *
+ * If you want to use an external event loop, the `NATS` library will not
+ * create a thread to read data from the socket, and will not directly write
+ * data to the socket. Instead, the library will invoke those callbacks
+ * for various events.
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param loop the `void*` pointer to the external event loop.
+ * @param attachCb the callback invoked after the connection is connected,
+ * or reconnected.
+ * @param readCb the callback invoked when the event library should start or
+ * stop polling for read events.
+ * @param writeCb the callback invoked when the event library should start or
+ * stop polling for write events.
+ * @param detachCb the callback invoked when a connection is closed.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetEventLoop(natsOptions *opts,
+                         void *loop,
+                         natsEvLoop_Attach          attachCb,
+                         natsEvLoop_ReadAddRemove   readCb,
+                         natsEvLoop_WriteAddRemove  writeCb,
+                         natsEvLoop_Detach          detachCb);
+
+/** \brief Switch on/off the use of a central message delivery thread pool.
+ *
+ * Normally, each asynchronous subscriber that is created has its own
+ * message delivery thread. The advantage is that it reduces lock
+ * contentions, therefore improving performance.<br>
+ * However, if an application creates many subscribers, this is not scaling
+ * well since the process would use too many threads.
+ *
+ * When a connection is created from a `nats_Options` that has enabled
+ * global message delivery, asynchronous subscribers from this connection
+ * will use a shared thread pool responsible for message delivery.
+ *
+ * \note The message order per subscription is still guaranteed.
+ *
+ * @see nats_SetMessageDeliveryPoolSize()
+ * @see \ref envVariablesGroup
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param global if `true`, uses the global message delivery thread pool,
+ * otherwise, each asynchronous subscriber will create their own message
+ * delivery thread.
+ */
+NATS_EXTERN natsStatus
+natsOptions_UseGlobalMessageDelivery(natsOptions *opts, bool global);
+
+/** \brief Dictates the order in which host name are resolved during connect.
+ *
+ * The library would previously favor IPv6 addresses during the connect process.
+ * <br>
+ * You can now change the order, or even exclude a family of addresses, using
+ * this option. Here is the list of possible values:
+ * <br>
+ * Value | Meaning
+ * ------|--------
+ * 46 | try IPv4 first, if it fails try IPv6
+ * 64 | try IPv6 first, if it fails try IPv4
+ * 4 | use only IPv4
+ * 6 | use only IPv6
+ * 0 | any family, no specific order
+ *
+ * \note If this option is not set, or you specify `0` for the order, the
+ * library will use the first IP (based on the DNS configuration) for which
+ * a successful connection can be made.
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param order a string representing the order for the IP resolution.
+ */
+NATS_EXTERN natsStatus
+natsOptions_IPResolutionOrder(natsOptions *opts, int order);
+
+/** \brief Sets if Publish calls should send data right away.
+ *
+ * For throughput performance, the client library tries by default to buffer
+ * as much data as possible before sending it over TCP.
+ *
+ * Setting this option to `true` will make Publish calls send the
+ * data right away, reducing latency, but also throughput.
+ *
+ * A good use-case would be a connection used to solely send replies.
+ * Imagine, a requestor sending a request, waiting for the reply before
+ * sending the next request.<br>
+ * The replier application will send only one reply at a time (since
+ * it will not receive the next request until the requestor receives
+ * the reply).<br>
+ * In such case, it makes sense for the reply to be sent right away.
+ *
+ * The alternative would be to call #natsConnection_Flush(),
+ * but this call requires a round-trip with the server, which is less
+ * efficient than using this option.
+ *
+ * Note that the Request() call already automatically sends the request
+ * as fast as possible, there is no need to set an option for that.
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param sendAsap a boolean indicating if published data should be
+ * sent right away or be buffered.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetSendAsap(natsOptions *opts, bool sendAsap);
+
+/** \brief Switches the use of old style requests.
+ *
+ * Setting `useOldStyle` to `true` forces the request calls to use the original
+ * behavior, which is to create a new inbox, a new subscription on that inbox
+ * and set auto-unsubscribe to 1.
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param useOldStyle a boolean indicating if old request style should be used.
+ */
+NATS_EXTERN natsStatus
+natsOptions_UseOldRequestStyle(natsOptions *opts, bool useOldStyle);
+
+/** \brief Fails pending requests on disconnect event.
+ *
+ * If this option is enabled, all pending #natsConnection_Request() family
+ * calls will fail with the #NATS_CONNECTION_DISCONNECTED status.
+ *
+ * \note This does not apply to requests from connections that use the
+ * old style requests.
+ *
+ * @see natsOptions_UseOldRequestStyle
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param failRequests a boolean indicating if pending requests should fail
+ * when a disconnect event occurs.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetFailRequestsOnDisconnect(natsOptions *opts, bool failRequests);
+
+/** \brief Sets if connection receives its own messages.
+ *
+ * This configures whether the server will echo back messages
+ * that are sent on this connection if there is also matching subscriptions.
+ *
+ * Set this to `true` to prevent the server from sending back messages
+ * produced by this connection. The default is false, that is, messages
+ * originating from this connection will be sent by the server if the
+ * connection has matching subscriptions.
+ *
+ * \note This is supported on servers >= version 1.2.0. Calling
+ * #natsConnection_Connect() with the option set to `true` to server below
+ * this version will return the `NATS_NO_SERVER_SUPPORT` error.
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param noEcho a boolean indicating if sent messages can be delivered back
+ * to this connection or not.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetNoEcho(natsOptions *opts, bool noEcho);
+
+/** \brief Indicates if initial connect failure should be retried or not.
+ *
+ * By default, #natsConnection_Connect() attempts to connect to a server
+ * specified in provided list of servers. If it cannot connect and the list has been
+ * fully tried, the function returns an error.
+ *
+ * This option is used to changed this default behavior.
+ *
+ * If `retry` is set to `true` and connection cannot be established right away, the
+ * library will attempt to connect based on the reconnect attempts
+ * and delay settings.
+ *
+ * \note The connect retry logic uses reconnect settings even if #natsOptions_SetAllowReconnect()
+ * has been set to false. In other words, a failed connect may be retried even though
+ * a reconnect will not be allowed should the connection to the server be lost
+ * after initial connect.
+ *
+ * The behavior will then depend on the value of the `connectedCb` parameter:
+ *
+ * * If `NULL`, then the call blocks until it can connect
+ * or exhausts the reconnect attempts.
+ *
+ * * If not `NULL`, and no connection can be immediately
+ * established, the #natsConnection_Connect() calls returns #NATS_NOT_YET_CONNECTED
+ * to indicate that no connection is currently established, but will
+ * try asynchronously to connect using the reconnect attempts/delay settings. If
+ * the connection is later established, the specified callback will be
+ * invoked. If no connection can be made and the retry attempts are exhausted,
+ * the callback registered with #natsOptions_SetClosedCB(), if any, will be
+ * invoked.
+ *
+ * \note If #natsConnection_Connect() returns `NATS_OK` (that is, a connection to
+ * a `NATS Server` was established in that call), then the `connectedCb` callback
+ * will not be invoked.
+ *
+ * If `retry` is set to false, #natsConnection_Connect() behaves as originally
+ * designed, that is, returns an error and no connection object if failing to connect
+ * to any server in the list.
+ *
+ * \note The `connectedCb` parameter is ignored and set to `NULL` in the options object
+ * when `retry` is set to `false`.
+ *
+ * @see natsOptions_SetMaxReconnect()
+ * @see natsOptions_SetReconnectWait()
+ * @see natsOptions_SetClosedCB()
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param retry a boolean indicating if a failed connect should be retried.
+ * @param connectedCb if `retry` is true and this is not `NULL`, then the
+ * connect may be asynchronous and this callback will be invoked if the connect
+ * succeeds.
+ * @param closure a pointer to an user object that will be passed to the callback. `closure` can be `NULL`.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetRetryOnFailedConnect(natsOptions *opts, bool retry,
+        natsConnectionHandler connectedCb, void* closure);
+
+/** \brief Sets the callbacks to fetch user JWT and sign server's nonce.
+ *
+ * Any time the library creates a TCP connection to the server, the server
+ * in response sends an `INFO` protocol. That `INFO` protocol, for NATS Server
+ * at v2.0.0+, may include a `nonce` for the client to sign.
+ *
+ * If this option is set, the library will invoke the two handlers to fetch
+ * the user JWT and sign the server's nonce.
+ *
+ * This is an option that will be used only by users that are able to
+ * sign using Ed25519 (public-key signature system). Most users will probably
+ * prefer the user of #natsOptions_SetUserCredentialsFromFiles().
+ *
+ * \note natsOptions_SetUserCredentialsCallbacks() and natsOptions_SetNKey()
+ * are mutually exclusive. Calling this function will remove the NKey and
+ * replace the signature handler, that was set with natsOptions_SetNKey(),
+ * with this one.
+ *
+ * @see natsUserJWTHandler
+ * @see natsSignatureHandler
+ * @see natsOptions_SetUserCredentialsFromFiles()
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param ujwtCB the callback to invoke to fetch the user JWT.
+ * @param ujwtClosure the closure that will be passed to the `ujwtCB` callback.
+ * @param sigCB the callback to invoke to sign the server nonce.
+ * @param sigClosure the closure that will be passed to the `sigCB` callback.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetUserCredentialsCallbacks(natsOptions *opts,
+                                        natsUserJWTHandler      ujwtCB,
+                                        void                    *ujwtClosure,
+                                        natsSignatureHandler    sigCB,
+                                        void                    *sigClosure);
+
+/** \brief Sets the file(s) to use to fetch user JWT and seed required to sign nonce.
+ *
+ * This is a convenient option that specifies the files(s) to use to fetch
+ * the user JWT and the user seed to be used to sign the server's nonce.
+ *
+ * The `userOrChainedFile` contains the user JWT token and possibly the user
+ * NKey seed. Note the format of this file:
+ *
+ * \code{.unparsed}
+ * -----BEGIN NATS USER JWT-----
+ * ...an user JWT token...
+ * ------END NATS USER JWT------
+ *
+ * ************************* IMPORTANT *************************
+ * NKEY Seed printed below can be used to sign and prove identity.
+ * NKEYs are sensitive and should be treated as secrets.
+ *
+ * -----BEGIN USER NKEY SEED-----
+ * SU...
+ * ------END USER NKEY SEED------
+ * \endcode
+ *
+ * The `---BEGIN NATS USER JWT---` header is used to detect where the user
+ * JWT is in this file.
+ *
+ * If the file does not contain the user NKey seed, then the `seedFile` file
+ * name must be specified and must contain the user NKey seed.
+ *
+ * \note natsOptions_SetUserCredentialsFromFiles() and natsOptions_SetNKey()
+ * are mutually exclusive. Calling this function will remove the NKey and
+ * replace the signature handler, that was set with natsOptions_SetNKey(),
+ * with an internal one that will handle the signature.
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param userOrChainedFile the name of the file containing the user JWT and
+ * possibly the user NKey seed.
+ * @param seedFile the name of the file containing the user NKey seed.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetUserCredentialsFromFiles(natsOptions *opts,
+                                        const char *userOrChainedFile,
+                                        const char *seedFile);
+
+/** \brief Sets the NKey public key and signature callback.
+ *
+ * Any time the library creates a TCP connection to the server, the server
+ * in response sends an `INFO` protocol. That `INFO` protocol, for NATS Server
+ * at v2.0.0+, may include a `nonce` for the client to sign.
+ *
+ * If this option is set, the library will add the NKey public key `pubKey`
+ * to the `CONNECT` protocol along with the server's nonce signature resulting
+ * from the invocation of the signature handler `sigCB`.
+ *
+ * \note natsOptions_SetNKey() and natsOptions_SetUserCredentialsCallbacks()
+ * or natsOptions_SetUserCredentialsFromFiles() are mutually exclusive.
+ * Calling this function will remove the user JWT callback and replace the
+ * signature handler, that was set with one of the user credentials options,
+ * with this one.
+ *
+ * @see natsSignatureHandler
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param pubKey the user NKey public key.
+ * @param sigCB the callback to invoke to sign the server nonce.
+ * @param sigClosure the closure that will be passed to the `sigCB` callback.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetNKey(natsOptions             *opts,
+                    const char              *pubKey,
+                    natsSignatureHandler    sigCB,
+                    void                    *sigClosure);
+
+/** \brief Sets the NKey public key and its seed file.
+ *
+ * Any time the library creates a TCP connection to the server, the server
+ * in response sends an `INFO` protocol. That `INFO` protocol, for NATS Server
+ * at v2.0.0+, may include a `nonce` for the client to sign.
+ *
+ * If this option is set, the library will add the NKey public key `pubKey`
+ * to the `CONNECT` protocol along with the server's nonce signature signed
+ * using the private key from the provided seed file. The library takes care
+ * of clearing the memory holding the private key read from the file as soon
+ * as it is no longer needed.
+ *
+ * \note natsOptions_SetNKeyFromSeed() and natsOptions_SetUserCredentialsCallbacks()
+ * or natsOptions_SetUserCredentialsFromFiles() are mutually exclusive.
+ * Calling this function will remove the user JWT callback and replace the
+ * signature handler, that was set with one of the user credentials options,
+ * with this one.
+ *
+ * @see natsSignatureHandler
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param pubKey the user NKey public key.
+ * @param seedFile the name of the file containing the user NKey seed.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetNKeyFromSeed(natsOptions *opts,
+                            const char  *pubKey,
+                            const char  *seedFile);
+
+/** \brief Sets the write deadline.
+ *
+ * If this is set, the socket is set to non-blocking mode and
+ * write will have a deadline set. If the deadline is reached,
+ * the write call will return an error which will translate
+ * to publish calls, or any library call trying to send data
+ * to the server, to possibly fail.
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param deadline the write deadline expressed in milliseconds.
+ * If set to 0, it means that there is no deadline and socket
+ * is in blocking mode.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetWriteDeadline(natsOptions *opts, int64_t deadline);
+
+/** \brief Enable/Disable the "no responders" feature.
+ *
+ * By default, when a connection to a NATS Server v2.2.0+ is made,
+ * the library signals to the server that it supports the "no responders"
+ * feature, which means that if a request is made, and there are
+ * no subscriptions on the request subject (no responders), then
+ * the server sends back an empty message with the header "Status"
+ * and value "503". The request APIs capture this message and
+ * instead return a #NATS_NO_RESPONDERS status, instead of waiting
+ * for the timeout to occur and return #NATS_TIMEOUT.
+ *
+ * In case where users set up their own asynchronous subscription
+ * on the reply subject and publish the request with #natsConnection_PublishRequest
+ * and the like, then the message callback may be invoked with this
+ * "no responders" message, which can be checked with #natsMsg_IsNoResponders.
+ *
+ * However, if users don't want to have to deal with that, it is
+ * possible to instruct the server to disable this feature for
+ * a given connection. If that is the case, requests will behave
+ * as with pre-v2.2.0 servers, in that the request will timeout
+ * when there are no responders.
+ *
+ * \note This function is to disable the feature that is normally
+ * enabled by default. Passing `false` means that it would enable
+ * it again if you had previously disable the option. However, the
+ * feature may still be disabled when connecting to a server that
+ * does not support it.
+ *
+ * @see natsMsg_IsNoResponders()
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param disabled the boolean to indicate if the feature should be
+ * disabled or not.
+ */
+NATS_EXTERN natsStatus
+natsOptions_DisableNoResponders(natsOptions *opts, bool disabled);
+
+/** \brief Sets a custom inbox prefix
+ *
+ * The default inbox prefix is "_INBOX", but you can change it
+ * using this option. This can be useful when setting permissions
+ * and/or with import/exports across different accounts.
+ *
+ * The prefix must be a valid subject and not contain any of the
+ * wildcards tokens `*` nor `>`.
+ *
+ * To clear the custom inbox prefix, call this function with `NULL`
+ * or the empty string.
+ *
+ * @param opts the pointer to the #natsOptions object.
+ * @param inboxPrefix the desired inbox prefix.
+ */
+NATS_EXTERN natsStatus
+natsOptions_SetCustomInboxPrefix(natsOptions *opts, const char *inboxPrefix);
+
+/** \brief Destroys a #natsOptions object.
+ *
+ * Destroys the natsOptions object, freeing used memory. See the note in
+ * the natsOptions_Create() call.
+ *
+ * @param opts the pointer to the #natsOptions object to destroy.
+ */
+NATS_EXTERN void
+natsOptions_Destroy(natsOptions *opts);
+
+/** @} */ // end of optsGroup
+
+#if defined(NATS_HAS_STREAMING)
+/** \defgroup stanConnOptsGroup Streaming Connection Options
+ *
+ *   NATS Streaming Connection Options.
+ *   @{
+ */
+
+/** \brief Creates a #stanConnOptions object.
+ *
+ * Creates a #stanConnOptions object. This object is used when one wants to set
+ * specific options prior to connecting to the `NATS Streaning Server`.
+ *
+ * After making the appropriate `stanConnOptions_SetXXX()` calls, this object is passed
+ * to the #stanConnection_Connect() call, which will clone this object. After
+ * #stanConnection_Connect() returns, modifications to the options object
+ * will not affect the connection.
+ *
+ * The default options set in this call are:
+ * url: `nats://localhost:4222`
+ * connection wait: 2 seconds
+ * publish ack wait: 30 seconds
+ * discovery prefix: `_STAN.discovery`
+ * maximum publish acks inflight and percentage: 16384, 50%
+ * ping interval: 5 seconds
+ * max ping out without response: 3
+ *
+ * \note The object needs to be destroyed when no longer needed.
+ *
+ * @see stanConnection_Connect()
+ * @see stanConnOptions_Destroy()
+ *
+ * @param newOpts the location where store the pointer to the newly created
+ * #stanConnOptions object.
+ */
+NATS_EXTERN natsStatus
+stanConnOptions_Create(stanConnOptions **newOpts);
+
+/** \brief Sets the URL to connect to.
+ *
+ * Sets the URL of the `NATS Streaming Server` the client should try to connect to.
+ * The URL can contain optional user name and password. You can provide a comma
+ * separated list of URLs too.
+ *
+ * Some valid URLS:
+ *
+ * - nats://localhost:4222
+ * - nats://user\@localhost:4222
+ * - nats://user:password\@localhost:4222
+ * - nats://host1:4222,nats://host2:4222,nats://host3:4222
+ *
+ * \note This option takes precedence over #natsOptions_SetURL when NATS options
+ * are passed with #stanConnOptions_SetNATSOptions.
+ *
+ * @param opts the pointer to the #stanConnOptions object.
+ * @param url the string representing the URL the connection should use
+ * to connect to the server.
+ *
+ */
+NATS_EXTERN natsStatus
+stanConnOptions_SetURL(stanConnOptions *opts, const char *url);
+
+/** \brief Sets the NATS Options to use to create the connection.
+ *
+ * The Streaming client connects to the NATS Streaming Server through
+ * a regular NATS Connection (#natsConnection). To configure this connection
+ * create a #natsOptions and configure it as needed, then call this function.
+ *
+ * This function clones the passed options, so after this call, any
+ * changes to the given #natsOptions will not affect the #stanConnOptions.
+ *
+ * \note If both #natsOptions_SetURL and #stanConnOptions_SetURL are used
+ * the URL(s) set in the later take precedence.
+ *
+ * @param opts the pointer to the #stanConnOptions object.
+ * @param nOpts the pointer to the #natsOptions object to use to create
+ * the connection to the server.
+ */
+NATS_EXTERN natsStatus
+stanConnOptions_SetNATSOptions(stanConnOptions *opts, natsOptions *nOpts);
+
+/** \brief Sets the timeout for establishing a connection.
+ *
+ * Value expressed in milliseconds.
+ *
+ * Default is 2000 milliseconds (2 seconds).
+ *
+ * @param opts the pointer to the #stanConnOptions object.
+ * @param wait how long to wait for a response from the streaming server.
+ */
+NATS_EXTERN natsStatus
+stanConnOptions_SetConnectionWait(stanConnOptions *opts, int64_t wait);
+
+/** \brief Sets the timeout for waiting for an ACK for a published message.
+ *
+ * Value expressed in milliseconds.
+ *
+ * Default is 30000 milliseconds (30 seconds).
+ *
+ * @param opts the pointer to the #stanConnOptions object.
+ * @param wait how long to wait for a response from the streaming server.
+ */
+NATS_EXTERN natsStatus
+stanConnOptions_SetPubAckWait(stanConnOptions *opts, int64_t wait);
+
+/** \brief Sets the subject prefix the library sends the connect request to.
+ *
+ * Default is `_STAN.discovery`
+ *
+ * @param opts the pointer to the #stanConnOptions object.
+ * @param prefix the subject prefix the library sends the connect request to.
+ */
+NATS_EXTERN natsStatus
+stanConnOptions_SetDiscoveryPrefix(stanConnOptions *opts, const char *prefix);
+
+
+/** \brief Sets the maximum number of published messages without outstanding ACKs from the server.
+ *
+ * A connection will block #stanConnection_Publish() or #stanConnection_PublishAsync calls
+ * if the number of outstanding published messages has reached this number.
+ *
+ * When the connection receives ACKs, the number of outstanding messages will decrease.
+ * If the number falls between `maxPubAcksInflight * percentage`, then the blocked publish
+ * calls will be released.
+ *
+ * @param opts the pointer to the #stanConnOptions object.
+ * @param maxPubAcksInflight the maximum number of published messages without ACKs from the server.
+ * @param percentage the percentage (expressed as a float between ]0.0 and 1.0]) of the maxPubAcksInflight
+ * number below which a blocked publish call is released.
+ */
+NATS_EXTERN natsStatus
+stanConnOptions_SetMaxPubAcksInflight(stanConnOptions *opts, int maxPubAcksInflight, float percentage);
+
+/** \brief Sets the ping interval and max out values.
+ *
+ * Value expressed in number of seconds.
+ *
+ * Default is 5 seconds and 3 missed PONGs.
+ *
+ * The interval needs to be at least 1 and represents the number of seconds.
+ * The maxOut needs to be at least 2, since the count of sent PINGs increase
+ * whenever a PING is sent and reset to 0 when a response is received.
+ * Setting to 1 would cause the library to close the connection right away.
+ *
+ * @param opts the pointer to the #stanConnOptions object.
+ * @param interval the number of seconds between each PING.
+ * @param maxOut the maximum number of PINGs without receiving a PONG back.
+ */
+NATS_EXTERN natsStatus
+stanConnOptions_SetPings(stanConnOptions *opts, int interval, int maxOut);
+
+/** \brief Sets the connection lost handler.
+ *
+ * This callback will be invoked should the client permanently lose
+ * contact with the server (or another client replaces it while being
+ * disconnected). The callback will not be invoked on normal #stanConnection_Close().
+ *
+ * @param opts the pointer to the #stanConnOptions object.
+ * @param handler the handler to be invoked when the connection to the streaming server is lost.
+ * @param closure the closure the library will pass to the callback.
+ */
+NATS_EXTERN natsStatus
+stanConnOptions_SetConnectionLostHandler(stanConnOptions *opts, stanConnectionLostHandler handler, void *closure);
+
+/** \brief Destroys a #stanConnOptions object.
+ *
+ * Destroys the #stanConnOptions object, freeing used memory. See the note in
+ * the #stanConnOptions_Create() call.
+ *
+ * @param opts the pointer to the #stanConnOptions object to destroy.
+ */
+NATS_EXTERN void
+stanConnOptions_Destroy(stanConnOptions *opts);
+
+/** @} */ // end of stanConnOptsGroup
+
+/** \defgroup stanSubOptsGroup Streaming Subscription Options
+ *
+ *   NATS Streaming Subscription Options.
+ *   @{
+ */
+
+/** \brief Creates a #stanSubOptions object.
+ *
+ * Creates a #stanSubOptions object. This object is used when one wants to set
+ * specific options prior to create a subscription.
+ *
+ * After making the appropriate `stanSubOptions_SetXXX()` calls, this object is passed
+ * to the #stanConnection_Subscribe() or #stanConnection_QueueSubscribe() call, which
+ * will clone this object. It means that modifications to the options object will not
+ * affect the created subscription.
+ *
+ * The default options set in this call are:
+ * ackWait: 30000 milliseconds (30 seconds)
+ * maxIinflight: 1024
+ * start position: new only
+ *
+ * \note The object needs to be destroyed when no longer needed.
+ *
+ * @see stanConnection_Subscribe()
+ * @see stanConnection_QueueSubscribe()
+ * @see stanSubOptions_Destroy()
+ *
+ * @param newOpts the location where store the pointer to the newly created
+ * #stanSubOptions object.
+ */
+NATS_EXTERN natsStatus
+stanSubOptions_Create(stanSubOptions **newOpts);
+
+/** \brief Sets the Durable Name for this subscription.
+ *
+ * If a durable name is set, this subscription will be durable. It means that
+ * if the application stops and re-create the same subscription with the
+ * same connection client ID and durable name (or simply durable name for
+ * queue subscriptions), then the server will resume (re)delivery of messages
+ * from the last known position in the steam for that durable.
+ *
+ * It means that the start position, if provided, is used only when the durable
+ * subscription is first created, then is ignored by the server for the rest
+ * of the durable subscription lifetime.
+ *
+ * \note Durable names should be alphanumeric and not contain the character `:`.
+ *
+ * @param opts the pointer to the #stanSubOptions object.
+ * @param durableName the string representing the name of the durable subscription.
+ *
+ */
+NATS_EXTERN natsStatus
+stanSubOptions_SetDurableName(stanSubOptions *opts, const char *durableName);
+
+/** \brief Sets the timeout for waiting for an ACK from the cluster's point of view for delivered messages.
+ *
+ * Value expressed in milliseconds.
+ *
+ * Default is 30000 milliseconds (30 seconds).
+ *
+ * If the server does not receive an acknowledgment from the subscription for
+ * a delivered message after this amount of time, the server will re-deliver
+ * the unacknowledged message.
+ *
+ * @param opts the pointer to the #stanSubOptions object.
+ * @param wait how long the server will wait for an acknowledgment from the subscription.
+ */
+NATS_EXTERN natsStatus
+stanSubOptions_SetAckWait(stanSubOptions *opts, int64_t wait);
+
+/** \brief Sets the the maximum number of messages the cluster will send without an ACK.
+ *
+ * Default is 1024.
+ *
+ * If a subscription receives messages but does not acknowledge them, the server will
+ * stop sending new messages when it reaches this number. Unacknowledged messages are
+ * re-delivered regardless of that setting.
+ *
+ * @param opts the pointer to the #stanSubOptions object.
+ * @param maxInflight the maximum number of messages the subscription will receive without sending back ACKs.
+ */
+NATS_EXTERN natsStatus
+stanSubOptions_SetMaxInflight(stanSubOptions *opts, int maxInflight);
+
+/** \brief Sets the desired start position based on the given sequence number.
+ *
+ * This allows the subscription to start at a specific sequence number in
+ * the channel's message log.
+ *
+ * If the sequence is smaller than the first available message in the
+ * message log (old messages dropped due to channel limits),
+ * the subscription will be created with the first available sequence.
+ *
+ * Conversely, if the given sequence is higher than the currently
+ * last sequence number, the subscription will receive only new published messages.
+ *
+ * @param opts the pointer to the #stanSubOptions object.
+ * @param seq the starting sequence.
+ */
+NATS_EXTERN natsStatus
+stanSubOptions_StartAtSequence(stanSubOptions *opts, uint64_t seq);
+
+/** \brief Sets the desired start position based on the given time.
+ *
+ * When the subscription is created, the server will send messages starting
+ * with the message which timestamp is at least the given time. The time
+ * is expressed in number of milliseconds since the EPOCH, as given by
+ * nats_Now() for instance.
+ *
+ * If the time is in the past and the most recent message's timestamp is older
+ * than the given time, or if the time is in the future, the subscription
+ * will receive only new messages.
+ *
+ * @param opts the pointer to the #stanSubOptions object.
+ * @param time the start time, expressed in milliseconds since the EPOCH.
+ */
+NATS_EXTERN natsStatus
+stanSubOptions_StartAtTime(stanSubOptions *opts, int64_t time);
+
+/** \brief Sets the desired start position based on the given delta.
+ *
+ * When the subscription is created, the server will send messages starting
+ * with the message which timestamp is at least now minus `delta`. In other words,
+ * this means start receiving messages that were sent n milliseconds ago.
+ *
+ * The delta is expressed in milliseconds.
+ *
+ * @param opts the pointer to the #stanSubOptions object.
+ * @param delta he historical time delta (from now) from which to start receiving messages.
+ */
+NATS_EXTERN natsStatus
+stanSubOptions_StartAtTimeDelta(stanSubOptions *opts, int64_t delta);
+
+/** \brief The subscription should start with the last message in the channel.
+ *
+ * When the subscription is created, the server will start sending messages
+ * starting with the last message currently in the channel message's log.
+ * The subscription will then receive any new published message.
+ *
+ * @param opts the pointer to the #stanSubOptions object.
+ */
+NATS_EXTERN natsStatus
+stanSubOptions_StartWithLastReceived(stanSubOptions *opts);
+
+/** \brief The subscription should start with the first message in the channel.
+ *
+ * When the subscription is created, the server will start sending messages
+ * starting with the first message currently in the channel message's log.
+ *
+ * @param opts the pointer to the #stanSubOptions object.
+ */
+NATS_EXTERN natsStatus
+stanSubOptions_DeliverAllAvailable(stanSubOptions *opts);
+
+/** \brief Sets the subscription's acknowledgment mode.
+ *
+ * By default, a subscription will automatically send a message acknowledgment
+ * after the #stanMsgHandler callback returns.
+ *
+ * In order to control when the acknowledgment is sent, set the acknowledgment
+ * mode to `manual` and call #stanSubscription_AckMsg().
+ *
+ * @see #stanSubscription_AckMsg()
+ *
+ * @param opts the pointer to the #stanSubOptions object.
+ * @param manual a boolean indicating if the subscription should auto-acknowledge
+ * or if the user will.
+ */
+NATS_EXTERN natsStatus
+stanSubOptions_SetManualAckMode(stanSubOptions *opts, bool manual);
+
+/** \brief Destroys a #stanSubOptions object.
+ *
+ * Destroys the #stanSubOptions object, freeing used memory. See the note in
+ * the #stanSubOptions_Create() call.
+ *
+ * @param opts the pointer to the #stanSubOptions object to destroy.
+ */
+NATS_EXTERN void
+stanSubOptions_Destroy(stanSubOptions *opts);
+
+/** @} */ // end of stanSubOptsGroup
+#endif
+
+/** \defgroup inboxGroup Inboxes
+ *
+ *   NATS Inboxes.
+ *   @{
+ */
+
+/** \brief Creates an inbox.
+ *
+ * Returns an inbox string which can be used for directed replies from
+ * subscribers. These are guaranteed to be unique, but can be shared
+ * and subscribed to by others.
+ *
+ * \note The inbox needs to be destroyed when no longer needed.
+ *
+ * @see #natsInbox_Destroy()
+ *
+ * @param newInbox the location where to store a pointer to the newly
+ * created #natsInbox.
+ */
+NATS_EXTERN natsStatus
+natsInbox_Create(natsInbox **newInbox);
+
+/** \brief Destroys the inbox.
+ *
+ * Destroys the inbox.
+ *
+ * @param inbox the pointer to the #natsInbox object to destroy.
+ */
+NATS_EXTERN void
+natsInbox_Destroy(natsInbox *inbox);
+
+/** @} */ // end of inboxGroup
+
+/** \defgroup msgGroup Message
+ *
+ *  NATS Message.
+ *  @{
+ */
+
+/** \brief  Destroys this list of messages.
+ *
+ * This function iterates through the list of all messages and call #natsMsg_Destroy
+ * for each valid (not set to `NULL`) message. It then frees the array that was
+ * allocated to hold pointers to those messages.
+ *
+ * \note The #natsMsgList object itself is not freed since it is expected that
+ * users will pass a pointer to a stack object. Should the user create its own
+ * object, it will be the user responsibility to free this object.
+ *
+ * @param list the #natsMsgList list of #natsMsg objects to destroy.
+ */
+NATS_EXTERN void
+natsMsgList_Destroy(natsMsgList *list);
+
+/** \brief Creates a #natsMsg object.
+ *
+ * Creates a #natsMsg object. This is used by the subscription related calls
+ * and by #natsConnection_PublishMsg().
+ *
+ * \note Messages need to be destroyed with #natsMsg_Destroy() when no
+ * longer needed.
+ *
+ * @see natsMsg_Destroy()
+ *
+ * @param newMsg the location where to store the pointer to the newly created
+ * #natsMsg object.
+ * @param subj the subject this message will be sent to. Cannot be `NULL`.
+ * @param reply the optional reply for this message.
+ * @param data the optional message payload.
+ * @param dataLen the size of the payload.
+ */
+NATS_EXTERN natsStatus
+natsMsg_Create(natsMsg **newMsg, const char *subj, const char *reply,
+               const char *data, int dataLen);
+
+/** \brief Returns the subject set in this message.
+ *
+ * Returns the subject set on that message.
+ *
+ * \warning The string belongs to the message and must not be freed.
+ * Copy it if needed.
+ * @param msg the pointer to the #natsMsg object.
+ */
+NATS_EXTERN const char*
+natsMsg_GetSubject(const natsMsg *msg);
+
+/** \brief Returns the reply set in this message.
+ *
+ * Returns the reply, possibly `NULL`.
+ *
+ * \warning The string belongs to the message and must not be freed.
+ * Copy it if needed.
+ *
+ * @param msg the pointer to the #natsMsg object.
+ */
+NATS_EXTERN const char*
+natsMsg_GetReply(const natsMsg *msg);
+
+/** \brief Returns the message payload.
+ *
+ * Returns the message payload, possibly `NULL`.
+ *
+ * Note that although the data sent and received from the server is not `NULL`
+ * terminated, the NATS C Client does add a `NULL` byte to the received payload.
+ * If you expect the received data to be a "string", then this conveniently
+ * allows you to call #natsMsg_GetData() without having to copy the returned
+ * data to a buffer to add the `NULL` byte at the end.
+ *
+ * \warning The string belongs to the message and must not be freed.
+ * Copy it if needed.
+ *
+ * @param msg the pointer to the #natsMsg object.
+ */
+NATS_EXTERN const char*
+natsMsg_GetData(const natsMsg *msg);
+
+/** \brief Returns the message length.
+ *
+ * Returns the message's payload length, possibly 0.
+ *
+ * @param msg the pointer to the #natsMsg object.
+ */
+NATS_EXTERN int
+natsMsg_GetDataLength(const natsMsg *msg);
+
+/** \brief Set the header entries associated with `key` to the single element `value`.
+ *
+ * It will replace any existing value associated with `key`.
+ *
+ * \warning Prior to v3.0.0, the `key` was stored in its canonical form, this is no
+ * longer the case. Header keys are now case sensitive.
+ *
+ * \warning Headers are not thread-safe, that is, you must not set/add/get values or
+ * delete keys for the same message from different threads. The internal structure
+ * of `natsMsg` may possible be altered during this call.
+ *
+ * @param msg the pointer to the #natsMsg object.
+ * @param key the key under which the `value` will be stored. It can't ne `NULL` or empty.
+ * @param value the string to store under the given `key`. The value can be `NULL` or empty string.
+ */
+NATS_EXTERN natsStatus
+natsMsgHeader_Set(natsMsg *msg, const char *key, const char *value);
+
+/** \brief Add `value` to the header associated with `key`.
+ *
+ * It will append to any existing values associated with `key`.
+ *
+ * \warning Prior to v3.0.0, the `key` was stored in its canonical form, this is no
+ * longer the case. Header keys are now case sensitive.
+ *
+ * \warning Headers are not thread-safe, that is, you must not set/add/get values or
+ * delete keys for the same message from different threads. The internal structure
+ * of `natsMsg` may possible be altered during this call.
+ *
+ * @param msg the pointer to the #natsMsg object.
+ * @param key the key under which the `value` will be stored. It can't ne `NULL` or empty.
+ * @param value the string to add to the values associated with the given `key`. The value can be `NULL` or empty string.
+ */
+NATS_EXTERN natsStatus
+natsMsgHeader_Add(natsMsg *msg, const char *key, const char *value);
+
+/** \brief Get the header entry associated with `key`.
+ *
+ * If more than one entry for the `key` is available, the first is returned.
+ * The returned value is owned by the library and MUST not be freed or altered.
+ *
+ * \warning Prior to v3.0.0, the `key` was stored in its canonical form, this is no
+ * longer the case. Header keys are now case sensitive.
+ *
+ * \warning Headers are not thread-safe, that is, you must not set/add/get values or
+ * delete keys for the same message from different threads. The internal structure
+ * of `natsMsg` may possible be altered during this call.
+ *
+ * @param msg the pointer to the #natsMsg object.
+ * @param key the key for which the value is requested.
+ * @param value the memory location where the library will store the pointer to the first
+ * value (if more than one is found) associated with the `key`.
+ * @return NATS_NOT_FOUND if `key` is not present in the headers.
+ */
+NATS_EXTERN natsStatus
+natsMsgHeader_Get(natsMsg *msg, const char *key, const char **value);
+
+/** \brief Get all header values associated with `key`.
+ *
+ * The returned strings are own by the library and MUST not be freed or altered.
+ * However, the returned array `values` MUST be freed by the user.
+ *
+ * \code{.c}
+ * const char* *values = NULL;
+ * int         count   = 0;
+ *
+ * s = natsMsgHeader_Values(msg, "My-Key", &values, &count);
+ * if (s == NATS_OK)
+ * {
+ *      // do something with the values
+ *
+ *      // then free the array of pointers.
+ *      free((void*) values);
+ * }
+ * \endcode
+ *
+ * \warning Prior to v3.0.0, the `key` was stored in its canonical form, this is no
+ * longer the case. Header keys are now case sensitive.
+ *
+ * \warning Headers are not thread-safe, that is, you must not set/add/get values or
+ * delete keys for the same message from different threads. The internal structure
+ * of `natsMsg` may possible be altered during this call.
+ *
+ * @param msg the pointer to the #natsMsg object.
+ * @param key the key for which the values are requested.
+ * @param values the memory location where the library will store the pointer to the array
+ * of values.
+ * @param count the memory location where the library will store the number of values returned.
+ * @return NATS_NOT_FOUND if `key` is not present in the headers.
+ */
+NATS_EXTERN natsStatus
+natsMsgHeader_Values(natsMsg *msg, const char *key, const char* **values, int *count);
+
+/** \brief Get all header keys.
+ *
+ * The returned strings are own by the library and MUST not be freed or altered.
+ * However, the returned array `keys` MUST be freed by the user.
+ *
+ * \code{.c}
+ * const char* *keys = NULL;
+ * int         count   = 0;
+ *
+ * s = natsMsgHeader_Keys(msg, &keys, &count);
+ * if (s == NATS_OK)
+ * {
+ *      // do something with the keys
+ *
+ *      // then free the array of pointers.
+ *      free((void*) keys);
+ * }
+ * \endcode
+ *
+ * \warning Headers are not thread-safe, that is, you must not set/add/get values or
+ * delete keys for the same message from different threads. The internal structure
+ * of `natsMsg` may possible be altered during this call.
+ *
+ * @param msg the pointer to the #natsMsg object.
+ * @param keys the memory location where the library will store the pointer to the array
+ * of keys.
+ * @param count the memory location where the library will store the number of keys returned.
+ * @return NATS_NOT_FOUND if no key is present.
+ */
+NATS_EXTERN natsStatus
+natsMsgHeader_Keys(natsMsg *msg, const char* **keys, int *count);
+
+/** \brief Delete the value(s) associated with `key`.
+ *
+ * \warning Prior to v3.0.0, the `key` was stored in its canonical form, this is no
+ * longer the case. Header keys are now case sensitive.
+ *
+ * \warning Headers are not thread-safe, that is, you must not set/add/get values or
+ * delete keys for the same message from different threads. The internal structure
+ * of `natsMsg` may possible be altered during this call.
+ *
+ * @param msg the pointer to the #natsMsg object.
+ * @param key the key to delete from the headers map.
+ * @return NATS_NOT_FOUND if `key` is not present in the headers.
+ */
+NATS_EXTERN natsStatus
+natsMsgHeader_Delete(natsMsg *msg, const char *key);
+
+/** \brief Indicates if this message is a "no responders" message from the server.
+ *
+ * Starting with the NATS Server v2.2.0+ and the C client v2.2.0+ releases, which
+ * introduced support for message headers and the "no responders" feature, if a
+ * request is received by the server and there are no subscriptions on the
+ * request's subject, the server sends a message with no payload but with a header
+ * "Status" with value "503".
+ *
+ * The call #natsConnection_Request() and its variants intercept this special
+ * message and instead of returning it to the user, they return #NATS_NO_RESPONDERS.
+ *
+ * If a synchronous subscription is created on a subject used as a reply subject
+ * to a #natsConnection_PublishRequest call (and its variants), #natsSubscription_NextMsg
+ * also detects this message and returns #NATS_NO_RESPONDERS (but it was not from
+ * release v2.2.0 to v2.4.1).
+ *
+ * For asynchronous subscriptions, the user may want to know that the request
+ * failed because there are no responders. For that reason, the message is passed
+ * to the message callback, and this function can be used to detect that this
+ * is a "no responders" message from the server and act accordingly.
+ *
+ * @param msg the pointer to the #natsMsg object.
+ * @return `true` if this message is a "no responders" message from the server,
+ * that is, has no payload and the "Status" header with "503" as the value.
+ */
+NATS_EXTERN bool
+natsMsg_IsNoResponders(natsMsg *msg);
+
+/** \brief Destroys the message object.
+ *
+ * Destroys the message, freeing memory.
+ *
+ * @param msg the pointer to the #natsMsg object to destroy.
+ */
+NATS_EXTERN void
+natsMsg_Destroy(natsMsg *msg);
+
+/** @} */ // end of msgGroup
+
+#if defined(NATS_HAS_STREAMING)
+/** \defgroup stanMsgGroup Streaming Message
+ *
+ *  NATS Streaming Message.
+ *  @{
+ */
+
+/** \brief Returns the message's sequence number.
+ *
+ * Returns the message's sequence number (as assigned by the cluster).
+ *
+ * @param msg the pointer to the #stanMsg object.
+ */
+NATS_EXTERN uint64_t
+stanMsg_GetSequence(const stanMsg *msg);
+
+/** \brief Returns the message's timestamp.
+ *
+ * Returns the message's timestamp (as assigned by the cluster).
+ *
+ * @param msg the pointer to the #stanMsg object.
+ */
+NATS_EXTERN int64_t
+stanMsg_GetTimestamp(const stanMsg *msg);
+
+/** \brief Returns the message's redelivered flag.
+ *
+ * Returns the message's redelivered flag. This can help detect if this
+ * message is a possible duplicate (due to redelivery and at-least-once
+ * semantic).
+ *
+ * @param msg the pointer to the #stanMsg object.
+ */
+NATS_EXTERN bool
+stanMsg_IsRedelivered(const stanMsg *msg);
+
+/** \brief Returns the message payload.
+ *
+ * Returns the message payload, possibly `NULL`.
+ *
+ * Note that although the data sent and received from the server is not `NULL`
+ * terminated, the NATS C Client does add a `NULL` byte to the received payload.
+ * If you expect the received data to be a "string", then this conveniently
+ * allows you to call #stanMsg_GetData() without having to copy the returned
+ * data to a buffer to add the `NULL` byte at the end.
+ *
+ * \warning The string belongs to the message and must not be freed.
+ * Copy it if needed.
+ *
+ * @param msg the pointer to the #stanMsg object.
+ */
+NATS_EXTERN const char*
+stanMsg_GetData(const stanMsg *msg);
+
+/** \brief Returns the message length.
+ *
+ * Returns the message's payload length, possibly 0.
+ *
+ * @param msg the pointer to the #stanMsg object.
+ */
+NATS_EXTERN int
+stanMsg_GetDataLength(const stanMsg *msg);
+
+/** \brief Destroys the message object.
+ *
+ * Destroys the message, freeing memory.
+ *
+ * @param msg the pointer to the #stanMsg object to destroy.
+ */
+NATS_EXTERN void
+stanMsg_Destroy(stanMsg *msg);
+
+/** @} */ // end of stanMsgGroup
+#endif
+
+/** \defgroup connGroup Connection
+ *
+ * NATS Connection
+ * @{
+ */
+
+/** \defgroup connMgtGroup Management
+ *
+ *  Functions related to connection management.
+ *  @{
+ */
+
+/** \brief Connects to a `NATS Server` using the provided options.
+ *
+ * Attempts to connect to a `NATS Server` with multiple options.
+ *
+ * This call is cloning the #natsOptions object. Once this call returns,
+ * changes made to the `options` will not have an effect to this
+ * connection. The `options` can however be changed prior to be
+ * passed to another #natsConnection_Connect() call if desired.
+ *
+ * @see #natsOptions
+ * @see #natsConnection_Destroy()
+ *
+ * @param nc the location where to store the pointer to the newly created
+ * #natsConnection object.
+ * @param options the options to use for this connection. If `NULL`
+ * this call is equivalent to #natsConnection_ConnectTo() with #NATS_DEFAULT_URL.
+ *
+ */
+NATS_EXTERN natsStatus
+natsConnection_Connect(natsConnection **nc, natsOptions *options);
+
+/** \brief Process a read event when using external event loop.
+ *
+ * When using an external event loop, and the callback indicating that
+ * the socket is ready for reading, this call will read data from the
+ * socket and process it.
+ *
+ * @param nc the pointer to the #natsConnection object.
+ *
+ * \warning This API is reserved for external event loop adapters.
+ */
+NATS_EXTERN void
+natsConnection_ProcessReadEvent(natsConnection *nc);
+
+/** \brief Process a write event when using external event loop.
+ *
+ * When using an external event loop, and the callback indicating that
+ * the socket is ready for writing, this call will write data to the
+ * socket.
+ *
+ * @param nc the pointer to the #natsConnection object.
+ *
+ * \warning This API is reserved for external event loop adapters.
+ */
+NATS_EXTERN void
+natsConnection_ProcessWriteEvent(natsConnection *nc);
+
+/** \brief Connects to a `NATS Server` using any of the URL from the given list.
+ *
+ * Attempts to connect to a `NATS Server`.
+ *
+ * This call supports multiple comma separated URLs. If more than one is
+ * specified, it behaves as if you were using a #natsOptions object and
+ * called #natsOptions_SetServers() with the equivalent array of URLs.
+ * The list is randomized before the connect sequence starts.
+ *
+ * @see #natsConnection_Destroy()
+ * @see #natsOptions_SetServers()
+ *
+ * @param nc the location where to store the pointer to the newly created
+ * #natsConnection object.
+ * @param urls the URL to connect to, or the list of URLs to chose from.
+ * If `NULL` this call is equivalent to #natsConnection_ConnectTo()
+ * with #NATS_DEFAULT_URL
+ */
+NATS_EXTERN natsStatus
+natsConnection_ConnectTo(natsConnection **nc, const char *urls);
+
+/** \brief Test if connection has been closed.
+ *
+ * Tests if connection has been closed.
+ *
+ * @param nc the pointer to the #natsConnection object.
+ */
+NATS_EXTERN bool
+natsConnection_IsClosed(natsConnection *nc);
+
+/** \brief Test if connection is reconnecting.
+ *
+ * Tests if connection is reconnecting.
+ *
+ * @param nc the pointer to the #natsConnection object.
+ */
+NATS_EXTERN bool
+natsConnection_IsReconnecting(natsConnection *nc);
+
+/** \brief Test if connection is draining.
+ *
+ * Tests if connection is draining.
+ *
+ * @param nc the pointer to the #natsConnection object.
+ */
+bool
+natsConnection_IsDraining(natsConnection *nc);
+
+/** \brief Returns the current state of the connection.
+ *
+ * Returns the current state of the connection.
+ *
+ * @see #natsConnStatus
+ *
+ * @param nc the pointer to the #natsConnection object.
+ */
+NATS_EXTERN natsConnStatus
+natsConnection_Status(natsConnection *nc);
+
+/** \brief Returns the number of bytes to be sent to the server.
+ *
+ * When calling any of the publish functions, data is not necessarily
+ * immediately sent to the server. Some buffering occurs, allowing
+ * for better performance. This function indicates if there is any
+ * data not yet transmitted to the server.
+ *
+ * @param nc the pointer to the #natsConnection object.
+ * @return the number of bytes to be sent to the server, or -1 if the
+ * connection is closed.
+ */
+NATS_EXTERN int
+natsConnection_Buffered(natsConnection *nc);
+
+/** \brief Flushes the connection.
+ *
+ * Performs a round trip to the server and return when it receives the
+ * internal reply.
+ *
+ * Note that if this call occurs when the connection to the server is
+ * lost, the `PING` will not be echoed even if the library can connect
+ * to a new (or the same) server. Therefore, in such situation, this
+ * call will fail with the status #NATS_CONNECTION_DISCONNECTED.
+ *
+ * If the connection is closed while this call is in progress, then the
+ * status #NATS_CONN_STATUS_CLOSED would be returned instead.
+ *
+ * @param nc the pointer to the #natsConnection object.
+ */
+NATS_EXTERN natsStatus
+natsConnection_Flush(natsConnection *nc);
+
+/** \brief Flushes the connection with a given timeout.
+ *
+ * Performs a round trip to the server and return when it receives the
+ * internal reply, or if the call times-out (timeout is expressed in
+ * milliseconds).
+ *
+ * See possible failure case described in #natsConnection_Flush().
+ *
+ * @param nc the pointer to the #natsConnection object.
+ * @param timeout in milliseconds, is the time allowed for the flush
+ * to complete before #NATS_TIMEOUT error is returned.
+ */
+NATS_EXTERN natsStatus
+natsConnection_FlushTimeout(natsConnection *nc, int64_t timeout);
+
+/** \brief Returns the maximum message payload.
+ *
+ * Returns the maximum message payload accepted by the server. The
+ * information is gathered from the `NATS Server` when the connection is
+ * first established.
+ *
+ * @param nc the pointer to the #natsConnection object.
+ * @return the maximum message payload.
+ */
+NATS_EXTERN int64_t
+natsConnection_GetMaxPayload(natsConnection *nc);
+
+/** \brief Gets the connection statistics.
+ *
+ * Copies in the provided statistics structure, a snapshot of the statistics for
+ * this connection.
+ *
+ * @param nc the pointer to the #natsConnection object.
+ * @param stats the pointer to a #natsStatistics object in which statistics
+ * will be copied.
+ */
+NATS_EXTERN natsStatus
+natsConnection_GetStats(natsConnection *nc, natsStatistics *stats);
+
+/** \brief Gets the URL of the currently connected server.
+ *
+ * Copies in the given buffer, the connected server's Url. If the buffer is
+ * too small, an error is returned.
+ *
+ * @param nc the pointer to the #natsConnection object.
+ * @param buffer the buffer in which the URL is copied.
+ * @param bufferSize the size of the buffer.
+ */
+NATS_EXTERN natsStatus
+natsConnection_GetConnectedUrl(natsConnection *nc, char *buffer, size_t bufferSize);
+
+/** \brief Gets the server Id.
+ *
+ * Copies in the given buffer, the connected server's Id. If the buffer is
+ * too small, an error is returned.
+ *
+ * @param nc the pointer to the #natsConnection object.
+ * @param buffer the buffer in which the server id is copied.
+ * @param bufferSize the size of the buffer.
+ */
+NATS_EXTERN natsStatus
+natsConnection_GetConnectedServerId(natsConnection *nc, char *buffer, size_t bufferSize);
+
+/** \brief Returns the list of server URLs known to this connection.
+ *
+ * Returns the list of known servers, including additional servers
+ * discovered after a connection has been established (with servers
+ * version 0.9.2 and above).
+ *
+ * No credential information is included in any of the server URLs
+ * returned by this call.<br>
+ * If you want to use any of these URLs to connect to a server that
+ * requires authentication, you will need to use #natsOptions_SetUserInfo
+ * or #natsOptions_SetToken.
+ *
+ * \note The user is responsible for freeing the memory of the returned array.
+ *
+ * @param nc the pointer to the #natsConnection object.
+ * @param servers the location where to store the pointer to the array
+ * of server URLs.
+ * @param count the location where to store the number of elements of the
+ * returned array.
+ */
+NATS_EXTERN natsStatus
+natsConnection_GetServers(natsConnection *nc, char ***servers, int *count);
+
+/** \brief Returns the list of discovered server URLs.
+ *
+ * Unlike #natsConnection_GetServers, this function only returns
+ * the list of servers that have been discovered after the a connection
+ * has been established (with servers version 0.9.2 and above).
+ *
+ * No credential information is included in any of the server URLs
+ * returned by this call.<br>
+ * If you want to use any of these URLs to connect to a server that
+ * requires authentication, you will need to use #natsOptions_SetUserInfo
+ * or #natsOptions_SetToken.
+ *
+ * \note The user is responsible for freeing the memory of the returned array.
+ *
+ * @param nc the pointer to the #natsConnection object.
+ * @param servers the location where to store the pointer to the array
+ * of server URLs.
+ * @param count the location where to store the number of elements of the
+ * returned array.
+ */
+NATS_EXTERN natsStatus
+natsConnection_GetDiscoveredServers(natsConnection *nc, char ***servers, int *count);
+
+/** \brief Gets the last connection error.
+ *
+ * Returns the last known error as a 'natsStatus' and the location to the
+ * null-terminated error string.
+ *
+ * \warning The returned string is owned by the connection object and
+ * must not be freed.
+ *
+ * @param nc the pointer to the #natsConnection object.
+ * @param lastError the location where the pointer to the connection's last
+ * error string is copied.
+ */
+NATS_EXTERN natsStatus
+natsConnection_GetLastError(natsConnection *nc, const char **lastError);
+
+/** \brief Gets the current client ID assigned by the server.
+ *
+ * Returns the client ID assigned by the server to which the client is
+ * currently connected to.
+ *
+ * \note The value may change if the client reconnects.
+ *
+ * This function returns #NATS_NO_SERVER_SUPPORT if the server's version
+ * is less than 1.2.0.
+ *
+ * @param nc the pointer to the #natsConnection object.
+ * @param cid the location where to store the client ID.
+ */
+NATS_EXTERN natsStatus
+natsConnection_GetClientID(natsConnection *nc, uint64_t *cid);
+
+/** \brief Drains the connection with default timeout.
+ *
+ * Drain will put a connection into a drain state. All subscriptions will
+ * immediately be put into a drain state. Upon completion, the publishers
+ * will be drained and can not publish any additional messages. Upon draining
+ * of the publishers, the connection will be closed. Use the #natsOptions_SetClosedCB()
+ * option to know when the connection has moved from draining to closed.
+ *
+ * This call uses a default drain timeout of 30 seconds.
+ *
+ * \warning This function does not block waiting for the draining operation
+ * to complete.
+ *
+ * @see natsOptions_SetClosedCB
+ * @see natsConnection_DrainTimeout
+ *
+ * @param nc the pointer to the #natsConnection object.
+ */
+NATS_EXTERN natsStatus
+natsConnection_Drain(natsConnection *nc);
+
+/** \brief Drains the connection with given timeout.
+ *
+ * Identical to #natsConnection_Drain but the timeout can be specified here.
+ *
+ * The value is expressed in milliseconds. Zero or negative value means
+ * that the operation will not timeout.
+ *
+ * \warning This function does not block waiting for the draining operation
+ * to complete.
+ *
+ * @see natsOptions_SetClosedCB
+ * @see natsConnection_Drain
+ *
+ * @param nc the pointer to the #natsConnection object.
+ * @param timeout the allowed time for a drain operation to complete, expressed
+ * in milliseconds.
+ */
+NATS_EXTERN natsStatus
+natsConnection_DrainTimeout(natsConnection *nc, int64_t timeout);
+
+/** \brief Signs any 'message' using the connection's user credentials.
+ *
+ * The connection must have been created with the #natsOptions_SetUserCredentialsFromFiles.
+ *
+ * This call will sign the given message with the private key extracted through
+ * the user credentials file(s).
+ *
+ * @param nc the pointer to the #natsConnection object.
+ * @param message the byte array to sign.
+ * @param messageLen the length of the given byte array.
+ * @param sig an array of 64 bytes in which the signature will be copied.
+ */
+NATS_EXTERN natsStatus
+natsConnection_Sign(natsConnection *nc,
+                    const unsigned char *message, int messageLen,
+                    unsigned char sig[64]);
+
+/** \brief Returns the client's IP address as reported by the server.
+ *
+ * When a connection is created to the server, the server identifies
+ * the connection's remote IP address and return it back to the client.
+ *
+ * \note The user is responsible to free memory allocated to store
+ * the client IP address.
+ *
+ * \note This is supported on servers >= version 2.1.6. Calling
+ * #natsConnection_GetClientIP() with server below this version will
+ * return the #NATS_NO_SERVER_SUPPORT error.
+ *
+ * @see natsConnection_GetLocalIPAndPort to get the local IP and port instead.
+ *
+ * @param nc the pointer to the #natsConnection object.
+ * @param ip the memory location where to store the client's IP string.
+ * The user is responsible from freeing this memory.
+ */
+NATS_EXTERN natsStatus
+natsConnection_GetClientIP(natsConnection *nc, char **ip);
+
+/** \brief Returns the round trip time between this client and the server.
+ *
+ * The value returned is in nanoseconds.
+ *
+ * \note If the library is currently trying to reconnect, this call will
+ * return #NATS_CONNECTION_DISCONNECTED.
+ *
+ * @param nc the pointer to the #natsConnection object.
+ * @param rtt the memory location where to store the rtt.
+ */
+NATS_EXTERN natsStatus
+natsConnection_GetRTT(natsConnection *nc, int64_t *rtt);
+
+/** \brief Returns if the connection to current server supports headers.
+ *
+ * Returns NATS_OK if the server this client is currently connected to
+ * supports headers, NATS_NO_SERVER_SUPPORT otherwise.
+ *
+ * @param nc the pointer to the #natsConnection object.
+ */
+NATS_EXTERN natsStatus
+natsConnection_HasHeaderSupport(natsConnection *nc);
+
+/** \brief Returns the connection local IP and port.
+ *
+ * Unlike #natsConnection_GetClientIP, this function returns the
+ * connection's local IP and port.
+ *
+ * \note The user is responsible for freeing the memory allocated
+ * for the returned IP string.
+ *
+ * @param nc the pointer of the #natsConnection object.
+ * @param ip the memory location where to store the local IP string.
+ * The user is responsible from freeing this memory.
+ * @param port the memory location where to store the local port.
+ *
+ * @return #NATS_OK on success.
+ * @return #NATS_CONNECTION_DISCONNECTED if disconnected.
+ * @return #NATS_CONNECTION_CLOSED is connection is closed.
+ * @return #NATS_SYS_ERROR if a system error getting the IP and port occurred.
+ * @return #NATS_NO_MEMORY if the library was unable to allocate memory for the returned IP string.
+ */
+natsStatus
+natsConnection_GetLocalIPAndPort(natsConnection *nc, char **ip, int *port);
+
+/** \brief Closes the connection.
+ *
+ * Closes the connection to the server. This call will release all blocking
+ * calls, such as #natsConnection_Flush() and #natsSubscription_NextMsg().
+ * The connection object is still usable until the call to
+ * #natsConnection_Destroy().
+ *
+ * @param nc the pointer to the #natsConnection object.
+ */
+NATS_EXTERN void
+natsConnection_Close(natsConnection *nc);
+
+/** \brief Destroys the connection object.
+ *
+ * Destroys the connection object, freeing up memory.
+ * If not already done, this call first closes the connection to the server.
+ *
+ * @param nc the pointer to the #natsConnection object.
+ */
+NATS_EXTERN void
+natsConnection_Destroy(natsConnection *nc);
+
+/** @} */ // end of connMgtGroup
+
+/** \defgroup connPubGroup Publishing
+ *
+ *  Publishing functions
+ *  @{
+ */
+
+/** \brief Publishes data on a subject.
+ *
+ * Publishes the data argument to the given subject. The data argument is left
+ * untouched and needs to be correctly interpreted on the receiver.
+ *
+ * @param nc the pointer to the #natsConnection object.
+ * @param subj the subject the data is sent to.
+ * @param data the data to be sent, can be `NULL`.
+ * @param dataLen the length of the data to be sent.
+ */
+NATS_EXTERN natsStatus
+natsConnection_Publish(natsConnection *nc, const char *subj,
+                       const void *data, int dataLen);
+
+/** \brief Publishes a string on a subject.
+ *
+ * Convenient function to publish a string. This call is equivalent to:
+ *
+ * \code{.c}
+ * const char* myString = "hello";
+ *
+ * natsConnection_Publish(nc, subj, (const void*) myString, (int) strlen(myString));
+ * \endcode
+ *
+ * @param nc the pointer to the #natsConnection object.
+ * @param subj the subject the data is sent to.
+ * @param str the string to be sent.
+ */
+NATS_EXTERN natsStatus
+natsConnection_PublishString(natsConnection *nc, const char *subj,
+                             const char *str);
+
+/** \brief Publishes a message on a subject.
+ *
+ * Publishes the #natsMsg, which includes the subject, an optional reply and
+ * optional data.
+ *
+ * @see #natsMsg_Create()
+ *
+ * @param nc the pointer to the #natsConnection object.
+ * @param msg the pointer to the #natsMsg object to send.
+ */
+NATS_EXTERN natsStatus
+natsConnection_PublishMsg(natsConnection *nc, natsMsg *msg);
+
+/** \brief Publishes data on a subject expecting replies on the given reply.
+ *
+ * Publishes the data argument to the given subject expecting a response on
+ * the reply subject. Use #natsConnection_Request() for automatically waiting
+ * for a response inline.
+ *
+ * @param nc the pointer to the #natsConnection object.
+ * @param subj the subject the request is sent to.
+ * @param reply the reply on which resonses are expected.
+ * @param data the data to be sent, can be `NULL`.
+ * @param dataLen the length of the data to be sent.
+ */
+NATS_EXTERN natsStatus
+natsConnection_PublishRequest(natsConnection *nc, const char *subj,
+                              const char *reply, const void *data, int dataLen);
+
+/** \brief Publishes a string on a subject expecting replies on the given reply.
+ *
+ * Convenient function to publish a request as a string. This call is
+ * equivalent to:
+ *
+ * \code{.c}
+ * const char* myString = "hello";
+ *
+ * natsPublishRequest(nc, subj, reply, (const void*) myString, (int) strlen(myString));
+ * \endcode
+ *
+ * @param nc the pointer to the #natsConnection object.
+ * @param subj the subject the request is sent to.
+ * @param reply the reply on which resonses are expected.
+ * @param str the string to send.
+ */
+NATS_EXTERN natsStatus
+natsConnection_PublishRequestString(natsConnection *nc, const char *subj,
+                                    const char *reply, const char *str);
+
+/** \brief Sends a request and waits for a reply.
+ *
+ * Sends a request payload and delivers the first response message,
+ * or an error, including a timeout if no message was received properly.
+ *
+ * \warning If connected to a NATS Server v2.2.0+ with no responder running
+ * when the request is received, this call will return a #NATS_NO_RESPONDERS error.
+ *
+ * @param replyMsg the location where to store the pointer to the received
+ * #natsMsg reply.
+ * @param nc the pointer to the #natsConnection object.
+ * @param subj the subject the request is sent to.
+ * @param data the data of the request, can be `NULL`.
+ * @param dataLen the length of the data to send.
+ * @param timeout in milliseconds, before this call returns #NATS_TIMEOUT
+ * if no response is received in this alloted time.
+ */
+NATS_EXTERN natsStatus
+natsConnection_Request(natsMsg **replyMsg, natsConnection *nc, const char *subj,
+                       const void *data, int dataLen, int64_t timeout);
+
+/** \brief Sends a request (as a string) and waits for a reply.
+ *
+ * Convenient function to send a request as a string. This call is
+ * equivalent to:
+ *
+ * \code{.c}
+ * const char* myString = "hello";
+ *
+ * natsConnection_Request(replyMsg, nc, subj, (const void*) myString, (int) strlen(myString));
+ * \endcode
+ *
+ * \warning See warning about no responders in #natsConnection_Request().
+ *
+ * @param replyMsg the location where to store the pointer to the received
+ * #natsMsg reply.
+ * @param nc the pointer to the #natsConnection object.
+ * @param subj the subject the request is sent to.
+ * @param str the string to send.
+ * @param timeout in milliseconds, before this call returns #NATS_TIMEOUT
+ * if no response is received in this alloted time.
+ */
+NATS_EXTERN natsStatus
+natsConnection_RequestString(natsMsg **replyMsg, natsConnection *nc,
+                             const char *subj, const char *str,
+                             int64_t timeout);
+
+/** \brief Sends a request based on the given `requestMsg` and waits for a reply.
+ *
+ * Similar to #natsConnection_Request but uses `requestMsg` to extract subject,
+ * and payload to send.
+ *
+ * \warning See warning about no responders in #natsConnection_Request().
+ *
+ * @param replyMsg the location where to store the pointer to the received
+ * #natsMsg reply.
+ * @param nc the pointer to the #natsConnection object.
+ * @param requestMsg the message used for the request.
+ * @param timeout in milliseconds, before this call returns #NATS_TIMEOUT
+ * if no response is received in this alloted time.
+ */
+NATS_EXTERN natsStatus
+natsConnection_RequestMsg(natsMsg **replyMsg, natsConnection *nc,
+                          natsMsg *requestMsg, int64_t timeout);
+
+/** @} */ // end of connPubGroup
+
+/** \defgroup connSubGroup Subscribing
+ *
+ *  Subscribing functions.
+ *  @{
+ */
+
+/** \brief Creates an asynchronous subscription.
+ *
+ * Expresses interest in the given subject. The subject can have wildcards
+ * (see \ref wildcardsGroup). Messages will be delivered to the associated
+ * #natsMsgHandler.
+ *
+ * @param sub the location where to store the pointer to the newly created
+ * #natsSubscription object.
+ * @param nc the pointer to the #natsConnection object.
+ * @param subject the subject this subscription is created for.
+ * @param cb the #natsMsgHandler callback.
+ * @param cbClosure a pointer to an user defined object (can be `NULL`). See
+ * the #natsMsgHandler prototype.
+ */
+NATS_EXTERN natsStatus
+natsConnection_Subscribe(natsSubscription **sub, natsConnection *nc,
+                         const char *subject, natsMsgHandler cb,
+                         void *cbClosure);
+
+/** \brief Creates an asynchronous subscription with a timeout.
+ *
+ * Expresses interest in the given subject. The subject can have wildcards
+ * (see \ref wildcardsGroup). Messages will be delivered to the associated
+ * #natsMsgHandler.
+ *
+ * If no message is received by the given timeout (in milliseconds), the
+ * message handler is invoked with a `NULL` message.<br>
+ * You can then destroy the subscription in the callback, or simply
+ * return, in which case, the message handler will fire again when a
+ * message is received or the subscription times-out again.
+ *
+ * \note Receiving a message reset the timeout. Until all pending messages
+ * are processed, no timeout will occur. The timeout starts when the
+ * message handler for the last pending message returns.
+ *
+ * \warning If you re-use message handler code between subscriptions with
+ * and without timeouts, keep in mind that the message passed in the
+ * message handler may be `NULL`.
+ *
+ * @param sub the location where to store the pointer to the newly created
+ * #natsSubscription object.
+ * @param nc the pointer to the #natsConnection object.
+ * @param subject the subject this subscription is created for.
+ * @param timeout the interval (in milliseconds) after which, if no message
+ * is received, the message handler is invoked with a `NULL` message.
+ * @param cb the #natsMsgHandler callback.
+ * @param cbClosure a pointer to an user defined object (can be `NULL`). See
+ * the #natsMsgHandler prototype.
+ */
+NATS_EXTERN natsStatus
+natsConnection_SubscribeTimeout(natsSubscription **sub, natsConnection *nc,
+                                const char *subject, int64_t timeout,
+                                natsMsgHandler cb, void *cbClosure);
+
+/** \brief Creates a synchronous subcription.
+ *
+ * Similar to #natsConnection_Subscribe, but creates a synchronous subscription
+ * that can be polled via #natsSubscription_NextMsg().
+ *
+ * @param sub the location where to store the pointer to the newly created
+ * #natsSubscription object.
+ * @param nc the pointer to the #natsConnection object.
+ * @param subject the subject this subscription is created for.
+ */
+NATS_EXTERN natsStatus
+natsConnection_SubscribeSync(natsSubscription **sub, natsConnection *nc,
+                             const char *subject);
+
+/** \brief Creates an asynchronous queue subscriber.
+ *
+ * Creates an asynchronous queue subscriber on the given subject.
+ * All subscribers with the same queue name will form the queue group and
+ * only one member of the group will be selected to receive any given
+ * message asynchronously.
+ *
+ * @param sub the location where to store the pointer to the newly created
+ * #natsSubscription object.
+ * @param nc the pointer to the #natsConnection object.
+ * @param subject the subject this subscription is created for.
+ * @param queueGroup the name of the group.
+ * @param cb the #natsMsgHandler callback.
+ * @param cbClosure a pointer to an user defined object (can be `NULL`). See
+ * the #natsMsgHandler prototype.
+ *
+ */
+NATS_EXTERN natsStatus
+natsConnection_QueueSubscribe(natsSubscription **sub, natsConnection *nc,
+                              const char *subject, const char *queueGroup,
+                              natsMsgHandler cb, void *cbClosure);
+
+/** \brief Creates an asynchronous queue subscriber with a timeout.
+ *
+ * Creates an asynchronous queue subscriber on the given subject.
+ * All subscribers with the same queue name will form the queue group and
+ * only one member of the group will be selected to receive any given
+ * message asynchronously.
+ *
+ * If no message is received by the given timeout (in milliseconds), the
+ * message handler is invoked with a `NULL` message.<br>
+ * You can then destroy the subscription in the callback, or simply
+ * return, in which case, the message handler will fire again when a
+ * message is received or the subscription times-out again.
+ *
+ * \note Receiving a message reset the timeout. Until all pending messages
+ * are processed, no timeout will occur. The timeout starts when the
+ * message handler for the last pending message returns.
+ *
+ * \warning If you re-use message handler code between subscriptions with
+ * and without timeouts, keep in mind that the message passed in the
+ * message handler may be `NULL`.
+ *
+ * @param sub the location where to store the pointer to the newly created
+ * #natsSubscription object.
+ * @param nc the pointer to the #natsConnection object.
+ * @param subject the subject this subscription is created for.
+ * @param queueGroup the name of the group.
+ * @param timeout the interval (in milliseconds) after which, if no message
+ * is received, the message handler is invoked with a `NULL` message.
+ * @param cb the #natsMsgHandler callback.
+ * @param cbClosure a pointer to an user defined object (can be `NULL`). See
+ * the #natsMsgHandler prototype.
+ */
+NATS_EXTERN natsStatus
+natsConnection_QueueSubscribeTimeout(natsSubscription **sub, natsConnection *nc,
+                   const char *subject, const char *queueGroup,
+                   int64_t timeout, natsMsgHandler cb, void *cbClosure);
+
+/** \brief Creates a synchronous queue subscriber.
+ *
+ * Similar to #natsConnection_QueueSubscribe, but creates a synchronous
+ * subscription that can be polled via #natsSubscription_NextMsg().
+ *
+ * @param sub the location where to store the pointer to the newly created
+ * #natsSubscription object.
+ * @param nc the pointer to the #natsConnection object.
+ * @param subject the subject this subscription is created for.
+ * @param queueGroup the name of the group.
+ */
+NATS_EXTERN natsStatus
+natsConnection_QueueSubscribeSync(natsSubscription **sub, natsConnection *nc,
+                                  const char *subject, const char *queueGroup);
+
+/** @} */ // end of connSubGroup
+
+/** @} */ // end of connGroup
+
+/** \defgroup subGroup Subscription
+ *
+ *  NATS Subscriptions.
+ *  @{
+ */
+
+/** \brief Enables the No Delivery Delay mode.
+ *
+ * By default, messages that arrive are not immediately delivered. This
+ * generally improves performance. However, in case of request-reply,
+ * this delay has a negative impact. In such case, call this function
+ * to have the subscriber be notified immediately each time a message
+ * arrives.
+ *
+ * @param sub the pointer to the #natsSubscription object.
+ *
+ * \deprecated No longer needed. Will be removed in the future.
+ */
+NATS_EXTERN natsStatus
+natsSubscription_NoDeliveryDelay(natsSubscription *sub);
+
+/** \brief Returns the next available message.
+ *
+ * Return the next message available to a synchronous subscriber or block until
+ * one is available.
+ * A timeout (expressed in milliseconds) can be used to return when no message
+ * has been delivered. If the value is zero, then this call will not wait and
+ * return the next message that was pending in the client, and #NATS_TIMEOUT
+ * otherwise.
+ *
+ * \note If you create a subscription for a subject used as the reply subject
+ * of a #natsConnection_PublishRequest call (or any of its variant), and there
+ * are no responders for the request subject, NATS Servers v2.2.0+ will return
+ * an empty message with a header "Status" and value "503". The library v2.2.0
+ * until v2.4.1 would return this message to the user, which was wrong.<br>
+ * The library now returns no message and #NATS_NO_RESPONDERS status.
+ *
+ * @param nextMsg the location where to store the pointer to the next available
+ * message.
+ * @param sub the pointer to the #natsSubscription object.
+ * @param timeout time, in milliseconds, after which this call will return
+ * #NATS_TIMEOUT if no message is available.
+ */
+NATS_EXTERN natsStatus
+natsSubscription_NextMsg(natsMsg **nextMsg, natsSubscription *sub,
+                         int64_t timeout);
+
+/** \brief Unsubscribes.
+ *
+ * Removes interest on the subject. Asynchronous subscription may still have
+ * a callback in progress, in that case, the subscription will still be valid
+ * until the callback returns.
+ *
+ * @param sub the pointer to the #natsSubscription object.
+ */
+NATS_EXTERN natsStatus
+natsSubscription_Unsubscribe(natsSubscription *sub);
+
+/** \brief Auto-Unsubscribes.
+ *
+ * This call issues an automatic #natsSubscription_Unsubscribe that is
+ * processed by the server when 'max' messages have been received.
+ * This can be useful when sending a request to an unknown number
+ * of subscribers.
+ *
+ * @param sub the pointer to the #natsSubscription object.
+ * @param max the maximum number of message you want this subscription
+ * to receive.
+ */
+NATS_EXTERN natsStatus
+natsSubscription_AutoUnsubscribe(natsSubscription *sub, int max);
+
+/** \brief Gets the number of pending messages.
+ *
+ * Returns the number of queued messages in the client for this subscription.
+ *
+ * \deprecated Use #natsSubscription_GetPending instead.
+ *
+ * @param sub the pointer to the #natsSubscription object.
+ * @param queuedMsgs the location where to store the number of queued messages.
+ */
+NATS_EXTERN natsStatus
+natsSubscription_QueuedMsgs(natsSubscription *sub, uint64_t *queuedMsgs);
+
+/** \brief Gets the subscription id.
+ *
+ * Returns the id of the given subscription.
+ *
+ * \note Invalid or closed subscriptions will cause a value of 0 to be returned.
+ *
+ * @param sub the pointer to the #natsSubscription object.
+ */
+NATS_EXTERN int64_t
+natsSubscription_GetID(natsSubscription* sub);
+
+/** \brief Gets the subject name.
+ *
+ * Returns the subject of the given subscription.
+ *
+ * \note Invalid or closed subscriptions will cause a value of NULL to be returned.
+ *
+ * \warning The string belongs to the subscription and must not be freed. Copy it if needed.
+ *
+ * @param sub the pointer to the #natsSubscription object.
+ */
+NATS_EXTERN const char*
+natsSubscription_GetSubject(natsSubscription* sub);
+
+/** \brief Sets the limit for pending messages and bytes.
+ *
+ * Specifies the maximum number and size of incoming messages that can be
+ * buffered in the library for this subscription, before new incoming messages are
+ * dropped and #NATS_SLOW_CONSUMER status is reported to the #natsErrHandler
+ * callback (if one has been set).
+ *
+ * If no limit is set at the subscription level, the limit set by #natsOptions_SetMaxPendingMsgs
+ * before creating the connection will be used.
+ *
+ * \note If no option is set, there is still a default of `65536` messages and
+ * `65536 * 1024` bytes.
+ *
+ * @see natsOptions_SetMaxPendingMsgs
+ * @see natsSubscription_GetPendingLimits
+ *
+ * @param sub he pointer to the #natsSubscription object.
+ * @param msgLimit the limit in number of messages that the subscription can hold.
+ * @param bytesLimit the limit in bytes that the subscription can hold.
+ */
+NATS_EXTERN natsStatus
+natsSubscription_SetPendingLimits(natsSubscription *sub, int msgLimit, int bytesLimit);
+
+/** \brief Returns the current limit for pending messages and bytes.
+ *
+ * Regardless if limits have been explicitly set with #natsSubscription_SetPendingLimits,
+ * this call will store in the provided memory locations, the limits set for
+ * this subscription.
+ *
+ * \note It is possible for `msgLimit` and/or `bytesLimits` to be `NULL`, in which
+ * case the corresponding value is obviously not stored, but the function will
+ * not return an error.
+ *
+ * @see natsOptions_SetMaxPendingMsgs
+ * @see natsSubscription_SetPendingLimits
+ *
+ * @param sub the pointer to the #natsSubscription object.
+ * @param msgLimit if not `NULL`, the memory location where to store the maximum
+ * number of pending messages for this subscription.
+ * @param bytesLimit if not `NULL`, the memory location where to store the maximum
+ * size of pending messages for this subscription.
+ */
+NATS_EXTERN natsStatus
+natsSubscription_GetPendingLimits(natsSubscription *sub, int *msgLimit, int *bytesLimit);
+
+/** \brief Returns the number of pending messages and bytes.
+ *
+ * Returns the total number and size of pending messages on this subscription.
+ *
+ * \note It is possible for `msgs` and `bytes` to be NULL, in which case the
+ * corresponding values are obviously not stored, but the function will not return
+ * an error.
+ *
+ * @param sub the pointer to the #natsSubscription object.
+ * @param msgs if not `NULL`, the memory location where to store the number of
+ * pending messages.
+ * @param bytes if not `NULL`, the memory location where to store the total size of
+ * pending messages.
+ */
+NATS_EXTERN natsStatus
+natsSubscription_GetPending(natsSubscription *sub, int *msgs, int *bytes);
+
+/** \brief Returns the number of delivered messages.
+ *
+ * Returns the number of delivered messages for this subscription.
+ *
+ * @param sub the pointer to the #natsSubscription object.
+ * @param msgs the memory location where to store the number of
+ * delivered messages.
+ */
+NATS_EXTERN natsStatus
+natsSubscription_GetDelivered(natsSubscription *sub, int64_t *msgs);
+
+/** \brief Returns the number of dropped messages.
+ *
+ * Returns the number of known dropped messages for this subscription. This happens
+ * when a consumer is not keeping up and the library starts to drop messages
+ * when the maximum number (and/or size) of pending messages has been reached.
+ *
+ * \note If the server declares the connection a slow consumer, this number may
+ * not be valid.
+ *
+ * @see natsOptions_SetMaxPendingMsgs
+ * @see natsSubscription_SetPendingLimits
+ *
+ * @param sub the pointer to the #natsSubscription object.
+ * @param msgs the memory location where to store the number of dropped messages.
+ */
+NATS_EXTERN natsStatus
+natsSubscription_GetDropped(natsSubscription *sub, int64_t *msgs);
+
+/** \brief Returns the maximum number of pending messages and bytes.
+ *
+ * Returns the maximum of pending messages and bytes seen so far.
+ *
+ * \note `msgs` and/or `bytes` can be NULL.
+ *
+ * @param sub the pointer to the #natsSubscription object.
+ * @param msgs if not `NULL`, the memory location where to store the maximum
+ * number of pending messages seen so far.
+ * @param bytes if not `NULL`, the memory location where to store the maximum
+ * number of bytes pending seen so far.
+ */
+NATS_EXTERN natsStatus
+natsSubscription_GetMaxPending(natsSubscription *sub, int *msgs, int *bytes);
+
+/** \brief Clears the statistics regarding the maximum pending values.
+ *
+ * Clears the statistics regarding the maximum pending values.
+ *
+ * @param sub the pointer to the #natsSubscription object.
+ */
+NATS_EXTERN natsStatus
+natsSubscription_ClearMaxPending(natsSubscription *sub);
+
+/** \brief Get various statistics from this subscription.
+ *
+ * This is a convenient function to get several subscription's statistics
+ * in one call.
+ *
+ * \note Any or all of the statistics pointers can be `NULL`.
+ *
+ * @see natsSubscription_GetPending
+ * @see natsSubscription_GetMaxPending
+ * @see natsSubscription_GetDelivered
+ * @see natsSubscription_GetDropped
+ *
+ * @param sub the pointer to the #natsSubscription object.
+ * @param pendingMsgs if not `NULL`, memory location where to store the
+ * number of pending messages.
+ * @param pendingBytes if not `NULL`, memory location where to store the
+ * total size of pending messages.
+ * @param maxPendingMsgs if not `NULL`, memory location where to store the
+ * maximum number of pending messages seen so far.
+ * @param maxPendingBytes if not `NULL`, memory location where to store the
+ * maximum total size of pending messages seen so far.
+ * @param deliveredMsgs if not `NULL`, memory location where to store the
+ * number of delivered messages.
+ * @param droppedMsgs if not `NULL`, memory location where to store the
+ * number of dropped messages.
+ */
+NATS_EXTERN natsStatus
+natsSubscription_GetStats(natsSubscription *sub,
+                          int     *pendingMsgs,
+                          int     *pendingBytes,
+                          int     *maxPendingMsgs,
+                          int     *maxPendingBytes,
+                          int64_t *deliveredMsgs,
+                          int64_t *droppedMsgs);
+
+/** \brief Checks the validity of the subscription.
+ *
+ * Returns a boolean indicating whether the subscription is still active.
+ * This will return false if the subscription has already been closed,
+ * or auto unsubscribed.
+ *
+ * @param sub the pointer to the #natsSubscription object.
+ */
+NATS_EXTERN bool
+natsSubscription_IsValid(natsSubscription *sub);
+
+/** \brief Drains the subscription with a default timeout.
+ *
+ * Drain will remove interest but continue to invoke callbacks until all messages
+ * have been processed.
+ *
+ * This call uses a default drain timeout of 30 seconds. See #natsSubscription_DrainTimeout
+ * for details on behavior when timeout elapses.
+ *
+ * \warning This function does not block waiting for the operation
+ * to complete. To synchronously wait, see #natsSubscription_WaitForDrainCompletion
+ *
+ * @see natsSubscription_DrainTimeout
+ * @see natsSubscription_WaitForDrainCompletion
+ * @see natsSubscription_DrainCompletionStatus
+ *
+ * @param sub the pointer to the #natsSubscription object.
+ */
+NATS_EXTERN natsStatus
+natsSubscription_Drain(natsSubscription *sub);
+
+/** \brief Drains the subscription with the specified timeout.
+ *
+ * Drain will remove interest but continue to invoke callbacks until all messages
+ * have been processed, or the specified timeout has elapsed. In that case, the
+ * subscription will be forcibly closed and remaining pending messages (if any)
+ * will not be processed.
+ *
+ * The timeout is expressed in milliseconds. Zero or negative value means that
+ * the call will not timeout, but see below for more details.
+ *
+ * When this call returns, the UNSUBSCRIBE protocol for this subscription has
+ * been enqueued to the outgoing connection buffer, but not sent to the server,
+ * ensuring that this call does not block.
+ *
+ * The library then asynchronously ensures that this protocol is sent and waits
+ * for a confirmation from the server. After that, it is guaranteed that no
+ * new message for this subscription will be received and the library can proceed
+ * with the rest of the draining.
+ *
+ * However, should the "flush" of the protocol fail, the library will ensure that
+ * no new message is added to the subscription (in the event the server did not
+ * receive the UNSUBSCRIBE protocol and still attempts to deliver messages), and
+ * will proceed with the draining of the pending messages. Users can check the
+ * status of the draining after it has completed by calling #natsSubscription_DrainCompletionStatus.
+ *
+ * If no timeout is specified (that is, value is zero or negative), a timeout
+ * will be used for the "flush" of the protocol. Again, even in case of failure,
+ * the draining will proceed.
+ *
+ * If a timeout is specified, the complete process: "flush" of the protocol
+ * and draining of messages, must happen before the timeout elapses otherwise the
+ * subscription will be forcibly closed, and not all message callbacks may be invoked.
+ *
+ * Regardless of the presence of a timeout or not, should the subscription or connection
+ * be closed while draining occurs, the draining process will stop. The
+ * #natsSubscription_WaitForDrainCompletion call will not report an error. To
+ * know if an error occurred, the user can call #natsSubscription_DrainCompletionStatus
+ * after ensuring that the drain has completed.
+ *
+ * \warning This function does not block waiting for the operation
+ * to complete. To synchronously wait, see #natsSubscription_WaitForDrainCompletion
+ *
+ * @see natsSubscription_Drain
+ * @see natsSubscription_WaitForDrainCompletion
+ * @see natsSubscription_DrainCompletionStatus
+ *
+ * @param sub the pointer to the #natsSubscription object.
+ * @param timeout how long to wait for the operation to complete, expressed in
+ * milliseconds. If the timeout elapses the subscription will be closed.
+ */
+NATS_EXTERN natsStatus
+natsSubscription_DrainTimeout(natsSubscription *sub, int64_t timeout);
+
+/** \brief Blocks until the drain operation completes.
+ *
+ * This function blocks until the subscription is fully drained.
+ * Returns no error if the subscription is drained or closed, otherwise
+ * returns the error if the subscription was not in drained mode (#NATS_ILLEGAL_STATE)
+ * or if this subscription was not drained or closed prior to the specified
+ * timeout (#NATS_TIMEOUT).
+ *
+ * The timeout is expressed in milliseconds. Zero or negative value
+ * means that the call will not timeout.
+ *
+ * Note that if this call times-out, it does not mean that the drain stops.
+ * The drain will continue until its own timeout elapses.
+ *
+ * @see natsSubscription_Drain
+ * @see natsSubscription_DrainTimeout
+ * @see natsSubscription_DrainCompletionStatus
+ *
+ * @param sub the pointer to the #natsSubscription object.
+ * @param timeout how long to wait for the operation to complete, expressed in
+ * milliseconds.
+ */
+NATS_EXTERN natsStatus
+natsSubscription_WaitForDrainCompletion(natsSubscription *sub, int64_t timeout);
+
+/** \brief Returns the status of the drain after completion.
+ *
+ * Once the drain has completed, users can use this function to know if the
+ * drain completed successfully or not.
+ *
+ * Possible return values (the list is not exhaustive):
+ *
+ * <c>NATS_OK</c> the library sent the UNSUBSCRIBE protocol and finished processing
+ * all messages that were pending.<br>
+ * <c>NATS_ILLEGAL_STATE</c> this call was made for a subscription that had not
+ * started draining or the draining is still in progress.<br>
+ * <c>NATS_INVALID_SUBSCRIPTION</c> the subscription was closed while draining,
+ * which means that some messages may not have been processed.<br>
+ * <c>NATS_CONNECTION_CLOSED</c> the connection was closed while draining, which
+ * means that some messages may not have been processed.
+ *
+ * \note This call does not wait for the drain completion (see #natsSubscription_WaitForDrainCompletion
+ * for that).
+ *
+ * @see natsSubscription_Drain
+ * @see natsSubscription_DrainTimeout
+ * @see natsSubscription_WaitForDrainCompletion
+ *
+ * @param sub the pointer to the #natsSubscription object.
+ */
+NATS_EXTERN natsStatus
+natsSubscription_DrainCompletionStatus(natsSubscription *sub);
+
+/** \brief Sets a completion callback.
+ *
+ * In order to make sure that an asynchronous subscription's message handler is no longer invoked once the
+ * subscription is closed (#natsSubscription_Unsubscribe), the subscription should be closed from the
+ * message handler itslef.
+ *
+ * If the application closes the subscription from a different thread and immediately frees resources
+ * needed in the message handler, there is a risk of a crash since the subscription's message handler
+ * may still be invoked one last time or already in the process of executing.
+ *
+ * To address this, the user can set a callback that will be invoked after the subscription is closed and the
+ * message handler has returned. This applies to asynchronous subscriptions using their own dispatcher or using
+ * the library's delivery thread pool.
+ *
+ * \note You don't need to call this function if you are not freeing resources needed in the message handler or if
+ * you always close the subscription from the message handler itself.
+ *
+ * \note If you plan on calling this function, you should do so before calling #natsSubscription_AutoUnsubscribe, since
+ * there is a risk that the subscription be removed as soon as #natsSubscription_AutoUnsubscribe returns.
+ *
+ * Calling this function on a synchronous or closed subscription will return #NATS_INVALID_SUBSCRIPTION.
+ *
+ * @see natsOnCompleteCB
+ *
+ * @param sub the pointer to the #natsSubscription object
+ * @param cb the callback to invoke when the last message of a closed subscription has been dispatched
+ * @param closure the pointer to a user defined object (possibly `NULL`) that will be passed to the callback
+ */
+NATS_EXTERN natsStatus
+natsSubscription_SetOnCompleteCB(natsSubscription *sub, natsOnCompleteCB cb, void *closure);
+
+/** \brief Destroys the subscription.
+ *
+ * Destroys the subscription object, freeing up memory.
+ * If not already done, this call will removes interest on the subject.
+ *
+ * @param sub the pointer to the #natsSubscription object to destroy.
+ */
+NATS_EXTERN void
+natsSubscription_Destroy(natsSubscription *sub);
+
+/** @} */ // end of subGroup
+
+#if defined(NATS_HAS_STREAMING)
+/** \defgroup stanConnGroup Streaming Connection
+ *
+ * NATS Streaming Connection
+ * @{
+ */
+
+/** \defgroup stanConnMgtGroup Management
+ *
+ *  Functions related to connection management.
+ *  @{
+ */
+
+/** \brief Connects to a `NATS Streaming Server` using the provided options.
+ *
+ * Attempts to connect to a `NATS Streaming Server`.
+ *
+ * This call is cloning the #stanConnOptions object, if given. Once this call returns,
+ * changes made to the `options` will not have an effect to this connection.
+ * The `options` can however be changed prior to be passed to another
+ * #stanConnection_Connect() call if desired.
+ *
+ * \note The Streaming connection does not honor the NATS Connection option
+ * #natsOptions_SetRetryOnFailedConnect(). If you pass NATS Options with
+ * this option enabled, no error is returned, but if the connection cannot
+ * be established "right away", the connect call will return an error.
+ *
+ * \warning If connecting to a NATS Server v2.2.0+ and there is no Streaming server
+ * listening on the connect request subject, this call will return #NATS_NO_RESPONDERS,
+ * not #NATS_TIMEOUT.
+ *
+ * @see #stanConnOptions
+ * @see #stanConnection_Destroy()
+ *
+ * @param sc the location where to store the pointer to the newly created
+ * #natsConnection object.
+ * @param clusterID the name of the cluster this connection is for.
+ * @param clientID the client ID for this connection. Only one connection
+ * with this ID will be accepted by the server. Use only a-zA-Z0-9_- characters.
+ * @param options the options to use for this connection (can be `NULL`).
+ */
+NATS_EXTERN natsStatus
+stanConnection_Connect(stanConnection **sc, const char *clusterID, const char *clientID,
+                       stanConnOptions *options);
+
+/** \brief Returns the underlying NATS Connection.
+ *
+ * This can be used if the application needs to do non streaming messaging
+ * but does not want to create a separate NATS Connection.
+ *
+ * Obtain a NATS connection from a NATS streaming connection. The NATS
+ * connection can be used to perform regular NATS operations, but it is owned
+ * and managed by the NATS streaming connection. It cannot be closed,
+ * which will happen when the NATS streaming connection is closed.
+ *
+ * \note For each call to this function, the user must call
+ * #stanConnection_ReleaseNATSConnection() when access to the NATS Connection
+ * is no longer needed.
+ *
+ * \warning The returned connection cannot be closed, drained nor destroyed.
+ * Calling corresponding functions will have no effect or return #NATS_ILLEGAL_STATE.
+ *
+ * @see stanConnection_ReleaseNATSConnection()
+ *
+ * @param sc the pointer to the #stanConnection object.
+ * @param nc the location where to store the pointer of the #natsConnection object.
+ */
+NATS_EXTERN natsStatus
+stanConnection_GetNATSConnection(stanConnection *sc, natsConnection **nc);
+
+/** \brief Releases the NATS Connection.
+ *
+ * This should be paired with the #stanConnection_GetNATSConnection() call.
+ * That is, after getting a reference to the underlying NATS Connection and
+ * once that connection is no longer needed, calling this function will
+ * allow resources to be properly released when the streaming connection is destroyed.
+ *
+ * You would normally call #stanConnection_GetNATSConnection() and this function
+ * only once.
+ *
+ * After the last #stanConnection_ReleaseNATSConnection() call is made, you
+ * must no longer use the NATS Connection because if #stanConnection_Destroy()
+ * is called, that could make the pointer to the NATS Connection invalid.
+ *
+ * \note If the streaming connection is closed/destroyed before the last
+ * call to #stanConnection_ReleaseNATSConnection, the pointer to the NATS
+ * connection will still be valid, although all calls will fail since the
+ * connection is now closed. Calling this function will release the streaming
+ * object allowing memory to be freed.
+ *
+ * @see stanConnection_GetNATSConnection
+ *
+ * @param sc the pointer to the #stanConnection object.
+ */
+NATS_EXTERN void
+stanConnection_ReleaseNATSConnection(stanConnection *sc);
+
+/** \brief Closes the connection.
+ *
+ * Closes the connection to the server. This call will release all blocking
+ * calls. The connection object is still usable until the call to
+ * #stanConnection_Destroy().
+ *
+ * \warning See warning about connecting to a NATS Server v2.2.0+ in #stanConnection_Connect().
+ *
+ * @param sc the pointer to the #stanConnection object.
+ */
+NATS_EXTERN natsStatus
+stanConnection_Close(stanConnection *sc);
+
+/** \brief Destroys the connection object.
+ *
+ * Destroys the connection object, freeing up memory.
+ * If not already done, this call first closes the connection to the server.
+ *
+ * @param sc the pointer to the #stanConnection object.
+ */
+NATS_EXTERN natsStatus
+stanConnection_Destroy(stanConnection *sc);
+
+/** @} */ // end of stanConnMgtGroup
+
+/** \defgroup stanConnPubGroup Publishing
+ *
+ *  Publishing functions
+ *  @{
+ */
+
+/** \brief Publishes data on a channel.
+ *
+ * Publishes the data argument to the given channel. The data argument is left
+ * untouched and needs to be correctly interpreted on the receiver.
+ *
+ * @param sc the pointer to the #stanConnection object.
+ * @param channel the channel name the data is sent to.
+ * @param data the data to be sent, can be `NULL`.
+ * @param dataLen the length of the data to be sent.
+ */
+NATS_EXTERN natsStatus
+stanConnection_Publish(stanConnection *sc, const char *channel,
+                       const void *data, int dataLen);
+
+/** \brief Asynchronously publishes data on a channel.
+ *
+ * Publishes the data argument to the given channel. The data argument is left
+ * untouched and needs to be correctly interpreted on the receiver.
+ *
+ * This function does not wait for an acknowledgment back from the server.
+ * Instead, the library will invoke the provided callback when that acknowledgment
+ * comes.
+ *
+ * In order to correlate the acknowledgment with the published message, you
+ * can use the `ahClosure` since this will be passed to the #stanPubAckHandler
+ * on every invocation. In other words, you should use a unique closure for
+ * each published message.
+ *
+ * @param sc the pointer to the #natsConnection object.
+ * @param channel the channel name the data is sent to.
+ * @param data the data to be sent, can be `NULL`.
+ * @param dataLen the length of the data to be sent.
+ * @param ah the publish acknowledgment callback. If `NULL` the user will not
+ * be notified of the publish result.
+ * @param ahClosure the closure the library will pass to the `ah` callback if
+ * one has been set.
+ */
+NATS_EXTERN natsStatus
+stanConnection_PublishAsync(stanConnection *sc, const char *channel,
+                            const void *data, int dataLen,
+                            stanPubAckHandler ah, void *ahClosure);
+
+/** @} */ // end of stanConnPubGroup
+
+/** \defgroup stanConnSubGroup Subscribing
+ *
+ *  Subscribing functions.
+ *  @{
+ */
+
+/** \brief Creates a subscription.
+ *
+ * Expresses interest in the given subject. The subject can NOT have wildcards.
+ * Messages will be delivered to the associated #stanMsgHandler.
+ *
+ * \warning See warning about connecting to a NATS Server v2.2.0+ in #stanConnection_Connect().
+ *
+ * @param sub the location where to store the pointer to the newly created
+ * #natsSubscription object.
+ * @param sc the pointer to the #natsConnection object.
+ * @param channel the channel this subscription is created for.
+ * @param cb the #stanMsgHandler callback.
+ * @param cbClosure a pointer to an user defined object (can be `NULL`). See
+ * the #stanMsgHandler prototype.
+ * @param options the optional to further configure the subscription.
+ */
+NATS_EXTERN natsStatus
+stanConnection_Subscribe(stanSubscription **sub, stanConnection *sc,
+                         const char *channel, stanMsgHandler cb,
+                         void *cbClosure, stanSubOptions *options);
+
+/** \brief Creates a queue subscription.
+ *
+ * Creates a queue subscriber on the given channel.
+ * All subscribers with the same queue name will form the queue group and
+ * only one member of the group will be selected to receive any given
+ * message asynchronously.
+ *
+ * \warning See warning about connecting to a NATS Server v2.2.0+ in #stanConnection_Connect().
+ *
+ * @param sub the location where to store the pointer to the newly created
+ * #natsSubscription object.
+ * @param sc the pointer to the #natsConnection object.
+ * @param channel the channel name this subscription is created for.
+ * @param queueGroup the name of the group.
+ * @param cb the #natsMsgHandler callback.
+ * @param cbClosure a pointer to an user defined object (can be `NULL`). See
+ * the #natsMsgHandler prototype.
+ * @param options the optional options to further configure this queue subscription.
+ */
+NATS_EXTERN natsStatus
+stanConnection_QueueSubscribe(stanSubscription **sub, stanConnection *sc,
+                              const char *channel, const char *queueGroup,
+                              stanMsgHandler cb, void *cbClosure, stanSubOptions *options);
+
+/** @} */ // end of stanConnSubGroup
+
+/** @} */ // end of stanConnGroup
+
+/** \defgroup stanSubGroup Streaming Subscription
+ *
+ *  NATS Streaming Subscriptions.
+ *  @{
+ */
+
+/** \brief Sets a completion callback.
+ *
+ * In order to make sure that an asynchronous subscription's message handler is no longer invoked once the
+ * subscription is closed (or unsubscribed) (#stanSubscription_Close, #stanSubscription_Unsubscribe), the
+ * subscription should be closed from the message handler itslef.
+ *
+ * If the application closes the subscription from a different thread and immediately frees resources
+ * needed in the message handler, there is a risk of a crash since the subscription's message handler
+ * may still be invoked one last time or already in the process of executing.
+ *
+ * To address this, the user can set a callback that will be invoked after the subscription is closed and the
+ * message handler has returned.
+ *
+ * \note You don't need to call this function if you are not freeing resources needed in the message handler or if
+ * you always close the subscription from the message handler itself.
+ *
+ * @see natsOnCompleteCB
+ *
+ * @param sub the pointer to the #stanSubscription object
+ * @param cb the callback to invoke when the last message of a closed subscription has been dispatched
+ * @param closure the pointer to a user defined object (possibly `NULL`) that will be passed to the callback
+ */
+NATS_EXTERN natsStatus
+stanSubscription_SetOnCompleteCB(stanSubscription *sub, natsOnCompleteCB cb, void *closure);
+
+/** \brief Acknowledge a message.
+ *
+ * If the subscription is created with manual acknowledgment mode (see #stanSubOptions_SetManualAckMode)
+ * then it is the user responsibility to acknowledge received messages when
+ * appropriate.
+ *
+ * @param sub the pointer to the #stanSubscription object.
+ * @param msg the message to acknowledge.
+ */
+NATS_EXTERN natsStatus
+stanSubscription_AckMsg(stanSubscription *sub, stanMsg *msg);
+
+/** \brief Permanently remove a subscription.
+ *
+ * Removes interest on the channel. The subscription may still have
+ * a callback in progress, in that case, the subscription will still be valid
+ * until the callback returns.
+ *
+ * For non-durable subscriptions, #stanSubscription_Unsubscribe and #stanSubscription_Close
+ * have the same effect.
+ *
+ * For durable subscriptions, calling this function causes the server
+ * to remove the durable subscription (instead of simply suspending it).
+ * It means that once this call is made, calling #stanConnection_Subscribe() with
+ * the same durable name creates a brand new durable subscription, instead
+ * of simply resuming delivery.
+ *
+ * \warning See warning about connecting to a NATS Server v2.2.0+ in #stanConnection_Connect().
+ *
+ * @param sub the pointer to the #stanSubscription object.
+ */
+NATS_EXTERN natsStatus
+stanSubscription_Unsubscribe(stanSubscription *sub);
+
+/** \brief Closes the subscription.
+ *
+ * Similar to #stanSubscription_Unsubscribe() except that durable interest
+ * is not removed in the server. The durable subscription can therefore be
+ * resumed.
+ *
+ * \warning See warning about connecting to a NATS Server v2.2.0+ in #stanConnection_Connect().
+ *
+ * @param sub the pointer to the #stanSubscription object.
+ */
+NATS_EXTERN natsStatus
+stanSubscription_Close(stanSubscription *sub);
+
+/** \brief Destroys the subscription.
+ *
+ * Destroys the subscription object, freeing up memory.
+ * If not already done, this call will removes interest on the subject.
+ *
+ * @param sub the pointer to the #stanSubscription object to destroy.
+ */
+NATS_EXTERN void
+stanSubscription_Destroy(stanSubscription *sub);
+
+/** @} */ // end of stanSubGroup
+#endif
+
+/** \defgroup jsGroup JetStream
+ *
+ *  JetStream.
+ *  @{
+ */
+
+/** \brief Initializes a streaming context options structure.
+ *
+ * Use this before setting specific stream context options and passing it
+ * to JetStream APIs.
+ *
+ * @param opts the pointer to the #jsOptions to initialize.
+ */
+NATS_EXTERN natsStatus
+jsOptions_Init(jsOptions *opts);
+
+/** \brief Returns a new JetStream context.
+ *
+ * A JetStream context is used for messaging and assets management.
+ *
+ * Since the underlying NATS connection is used for communication, the NATS connection
+ * should stay valid while using the JetStream context. That is, do not close/destroy
+ * the NATS connection before destroying the JetStream context.
+ *
+ * \note When done, the context should be destroyed to release memory.
+ *
+ * @param js the location where to store the pointer to the newly created #jsCtx object.
+ * @param nc the pointer to the #natsConnection object from which to get the JetStream context.
+ * @param opts the pointer to the #jsOptions object, possibly `NULL`.
+ */
+NATS_EXTERN natsStatus
+natsConnection_JetStream(jsCtx **js, natsConnection *nc, jsOptions *opts);
+
+/** \brief Destroys the JetStream context.
+ *
+ * Releases memory used by the context object.
+ *
+ * @param js the pointer to the #jsCtx object to destroy.
+ */
+NATS_EXTERN void
+jsCtx_Destroy(jsCtx *js);
+
+/** \defgroup jsAssetsGroup JetStream Assets Management
+ *
+ *  JetStream Assets Management
+ *  @{
+ */
+
+/** \brief Initializes a streaming configuration structure.
+ *
+ * Use this before setting specific stream configuration options and passing this
+ * configuration to some of the stream management APIs.
+ *
+ * @param cfg the pointer to the #jsStreamConfig to initialize.
+ */
+NATS_EXTERN natsStatus
+jsStreamConfig_Init(jsStreamConfig *cfg);
+
+/** \brief Initializes a placement configuration structure.
+ *
+ * Use this before setting specific stream placement options.
+ *
+ * @param placement the pointer to the #jsPlacement to initialize.
+ */
+NATS_EXTERN natsStatus
+jsPlacement_Init(jsPlacement *placement);
+
+/** \brief Initializes a stream source configuration structure.
+ *
+ * Use this before setting specific stream source options.
+ *
+ * @param source the pointer to the #jsStreamSource to initialize.
+ */
+NATS_EXTERN natsStatus
+jsStreamSource_Init(jsStreamSource *source);
+
+/** \brief Initializes an external stream configuration structure.
+ *
+ * Use this before setting specific external stream options.
+ *
+ * @param external the pointer to the #jsExternalStream to initialize.
+ */
+NATS_EXTERN natsStatus
+jsExternalStream_Init(jsExternalStream *external);
+
+/** \brief Initializes a republish structure.
+ *
+ * Use this to set the source, destination and/or headers only for a stream re-publish.
+ *
+ * @param rp the pointer to the #jsRePublish to initialize.
+ */
+NATS_EXTERN natsStatus
+jsRePublish_Init(jsRePublish *rp);
+
+/** \brief Creates a stream.
+ *
+ * Creates a stream based on the provided configuration (that cannot be `NULL`).
+ * The name is mandatory and cannot contain <c>.</c> characters.
+ *
+ * \note If you do not need a #jsStreamInfo to be returned, you can pass `NULL`,
+ * otherwise, on success you are responsible for freeing this object.
+ *
+ * @see jsStreamConfig_Init
+ * @see jsStreamInfo_Destroy
+ *
+ * @param si the location where to store the pointer to the new #jsStreamInfo object in
+ * response to the creation request, or `NULL` if the stream information is not needed.
+ * @param js the pointer to the #jsCtx context.
+ * @param cfg the pointer to the #jsStreamConfig.
+ * @param opts the pointer to the #jsOptions object, possibly `NULL`.
+ * @param errCode the location where to store the JetStream specific error code, or `NULL`
+ * if not needed.
+ */
+NATS_EXTERN natsStatus
+js_AddStream(jsStreamInfo **si, jsCtx *js, jsStreamConfig *cfg, jsOptions *opts, jsErrCode *errCode);
+
+/** \brief Updates a stream.
+ *
+ * Updates a stream based on the provided configuration (that cannot be `NULL`).
+ * The name is mandatory and cannot contain <c>.</c> characters.
+ *
+ * \note If you do not need a #jsStreamInfo to be returned, you can pass `NULL`,
+ * otherwise, on success you are responsible for freeing this object.
+ *
+ * @see jsStreamConfig_Init
+ * @see jsStreamInfo_Destroy
+ *
+ * @param si the location where to store the pointer to the new #jsStreamInfo object in
+ * response to the creation request, or `NULL` if the stream information is not needed.
+ * @param js the pointer to the #jsCtx context.
+ * @param cfg the pointer to the #jsStreamConfig.
+ * @param opts the pointer to the #jsOptions object, possibly `NULL`.
+ * @param errCode the location where to store the JetStream specific error code, or `NULL`
+ * if not needed.
+ */
+NATS_EXTERN natsStatus
+js_UpdateStream(jsStreamInfo **si, jsCtx *js, jsStreamConfig *cfg, jsOptions *opts, jsErrCode *errCode);
+
+/** \brief Purges a stream.
+ *
+ * Purges the stream named <c>stream</c>.
+ *
+ * For more advanced purge options, you can specify them through #jsOptions.
+ *
+ * \code{.unparsed}
+ * jsOptions        o;
+ *
+ * jsOptions_Init(&o);
+ * o.Stream.Purge.Subject  = "foo";
+ * o.Stream.Purge.Sequence = 4;
+ *
+ * js_PurgeStream(js, "MY_STREAM", &o, &jerr);
+ * \endcode
+ *
+ * @param js the pointer to the #jsCtx context.
+ * @param stream the name of the stream to purge.
+ * @param opts the pointer to the #jsOptions object, possibly `NULL`.
+ * @param errCode the location where to store the JetStream specific error code, or `NULL`
+ * if not needed.
+ */
+NATS_EXTERN natsStatus
+js_PurgeStream(jsCtx *js, const char *stream, jsOptions *opts, jsErrCode *errCode);
+
+/** \brief Deletes a stream.
+ *
+ * Deletes the stream named <c>stream</c>.
+ *
+ * @param js the pointer to the #jsCtx context.
+ * @param stream the name of the stream to delete.
+ * @param opts the pointer to the #jsOptions object, possibly `NULL`.
+ * @param errCode the location where to store the JetStream specific error code, or `NULL`
+ * if not needed.
+ */
+NATS_EXTERN natsStatus
+js_DeleteStream(jsCtx *js, const char *stream, jsOptions *opts, jsErrCode *errCode);
+
+/** \brief Retrieves a JetStream message from the stream by sequence.
+ *
+ * Retrieves a raw stream message stored in JetStream by sequence number.
+ *
+ * \note The message needs to be destroyed by calling #natsMsg_Destroy.
+ *
+ * @see js_GetLastMsg
+ * @see natsMsg_Destroy
+ *
+ * @param msg the memory location where the library will store the pointer to the #natsMsg.
+ * @param js the pointer to the #jsCtx context.
+ * @param stream the name of the stream.
+ * @param seq the sequence in the stream of the message being retrieved.
+ * @param opts the pointer to the #jsOptions object, possibly `NULL`.
+ * @param errCode the location where to store the JetStream specific error code, or `NULL`
+ * if not needed.
+ */
+NATS_EXTERN natsStatus
+js_GetMsg(natsMsg **msg, jsCtx *js, const char *stream, uint64_t seq, jsOptions *opts, jsErrCode *errCode);
+
+/** \brief Retrieves the last JetStream message from the stream for a given subject.
+ *
+ * Retrieves the last JetStream message from the stream for a given subject.
+ *
+ * \note The message needs to be destroyed by calling #natsMsg_Destroy.
+ *
+ * @see js_GetMsg
+ * @see natsMsg_Destroy
+ *
+ * @param msg the memory location where the library will store the pointer to the #natsMsg.
+ * @param js the pointer to the #jsCtx context.
+ * @param stream the name of the stream.
+ * @param subject the subject for which the last message is being retrieved.
+ * @param opts the pointer to the #jsOptions object, possibly `NULL`.
+ * @param errCode the location where to store the JetStream specific error code, or `NULL`
+ * if not needed.
+ */
+NATS_EXTERN natsStatus
+js_GetLastMsg(natsMsg **msg, jsCtx *js, const char *stream, const char *subject, jsOptions *opts, jsErrCode *errCode);
+
+/** \brief Initializes a direct get message options structure.
+ *
+ * Use this before setting specific direct get message options and passing it
+ * to #js_DirectGetMsg API.
+ *
+ * @param opts the pointer to the #jsDirectGetMsgOptions object.
+ */
+NATS_EXTERN natsStatus
+jsDirectGetMsgOptions_Init(jsDirectGetMsgOptions *opts);
+
+/** \brief Retrieves directly a JetStream message based on provided options.
+ *
+ * If a stream is created with `AllowDirect`, it is possible to retrieve a message
+ * without going through the leader.
+ *
+ * To specify the options, call #jsDirectGetMsgOptions_Init first and the set
+ * the appropriate options, then invoke this function.
+ *
+ * \note Some options are mutually exclusive but the library is not doing the
+ * check and leave it to the server to do it and return the error returned by
+ * the server.
+ *
+ * \note This API can only be used against servers that support the direct
+ * get feature, which is `v2.9.0+`. If running against an older server the
+ * call will likely timeout.
+ *
+ * @param msg the location where to store the pointer to the retrieved message.
+ * @param js  the pointer to the #jsCtx context.
+ * @param stream the name of the stream.
+ * @param opts the pointer to the #jsOptions object, possibly `NULL`.
+ * @param dgOpts the pointer to the #jsDirectGetMsgOptions object, cannot be `NULL`.
+ */
+NATS_EXTERN natsStatus
+js_DirectGetMsg(natsMsg **msg, jsCtx *js, const char *stream, jsOptions *opts, jsDirectGetMsgOptions *dgOpts);
+
+/** \brief Deletes a message from the stream.
+ *
+ * Deletes the message at sequence <c>seq</c> in the stream named <c>stream</c>.
+ *
+ * \note To completely erase the content of the deleted message when stored on disk,
+ * use #js_EraseMsg instead.
+ *
+ * @see js_EraseMsg
+ *
+ * @param js the pointer to the #jsCtx context.
+ * @param stream the name of the stream.
+ * @param seq the sequence in the stream of the message to delete.
+ * @param opts the pointer to the #jsOptions object, possibly `NULL`.
+ * @param errCode the location where to store the JetStream specific error code, or `NULL`
+ * if not needed.
+ */
+NATS_EXTERN natsStatus
+js_DeleteMsg(jsCtx *js, const char *stream, uint64_t seq, jsOptions *opts, jsErrCode *errCode);
+
+/** \brief Erases a message from the stream.
+ *
+ * Similar to #js_DeleteMsg except that the content of the deleted message is
+ * erased from stable storage.
+ *
+ * @see js_DeleteMsg
+ *
+ * @param js the pointer to the #jsCtx context.
+ * @param stream the name of the stream.
+ * @param seq the sequence in the stream of the message to erase.
+ * @param opts the pointer to the #jsOptions object, possibly `NULL`.
+ * @param errCode the location where to store the JetStream specific error code, or `NULL`
+ * if not needed.
+ */
+NATS_EXTERN natsStatus
+js_EraseMsg(jsCtx *js, const char *stream, uint64_t seq, jsOptions *opts, jsErrCode *errCode);
+
+/** \brief Retreives information from a stream.
+ *
+ * Returns information about the stream named <c>stream</c>.
+ *
+ * \note You need to free the returned object.
+ *
+ * To get some detailed information about deleted messages, set this option:
+ *
+ * \code{.unparsed}
+ * jsOptions                o;
+ *
+ * jsOptions_Init(&o);
+ * o.Stream.Info.DeletedDetails = true;
+ * js_GetStreamInfo(&si, js, "MY_STREAM", &o, &jerr);
+ * \endcode
+ *
+ * @see jsStreamInfo_Destroy
+ *
+ * @param si the location where to store the pointer to the new #jsStreamInfo object in
+ * response to the creation request.
+ * @param js the pointer to the #jsCtx context.
+ * @param stream the name of the stream which information is retrieved.
+ * @param opts the pointer to the #jsOptions object, possibly `NULL`.
+ * @param errCode the location where to store the JetStream specific error code, or `NULL`
+ * if not needed.
+ */
+NATS_EXTERN natsStatus
+js_GetStreamInfo(jsStreamInfo **si, jsCtx *js, const char *stream, jsOptions *opts, jsErrCode *errCode);
+
+/** \brief Destroys the stream information object.
+ *
+ * Releases memory allocated for this stream information object.
+ *
+ * @param si the pointer to the #jsStreamInfo object.
+ */
+NATS_EXTERN void
+jsStreamInfo_Destroy(jsStreamInfo *si);
+
+/** \brief Retrieves the list of all available streams.
+ *
+ * Retrieves the list of all #jsStreamInfo. It is possible to filter
+ * which streams are to be retrieved based on a subject filter.
+ *
+ * \warning The list should be destroyed when no longer used by
+ * calling #jsStreamInfoList_Destroy.
+ *
+ * @param list the location where to store the pointer to the new #jsStreamInfoList object.
+ * @param js the pointer to the #jsCtx context.
+ * @param opts the pointer to the #jsOptions object, possibly `NULL`.
+ * @param errCode the location where to store the JetStream specific error code, or `NULL`
+ * if not needed.
+ */
+NATS_EXTERN natsStatus
+js_Streams(jsStreamInfoList **list, jsCtx *js, jsOptions *opts, jsErrCode *errCode);
+
+/** \brief Destroys the stream information list object.
+ *
+ * Releases memory allocated for this stream information list.
+ *
+ * \warning All #jsStreamInfo pointers contained in the list will
+ * be destroyed by this call.
+ *
+ * @param list the pointer to the #jsStreamInfoList object.
+ */
+NATS_EXTERN void
+jsStreamInfoList_Destroy(jsStreamInfoList *list);
+
+/** \brief Retrieves the list of all available stream names.
+ *
+ * Retrieves the list of all stream names. It is possible to filter
+ * which streams are to be retrieved based on a subject filter.
+ *
+ * \warning The list should be destroyed when no longer used by
+ * calling #jsStreamNamesList_Destroy.
+ *
+ * @param list the location where to store the pointer to the new #jsStreamNamesList object.
+ * @param js the pointer to the #jsCtx context.
+ * @param opts the pointer to the #jsOptions object, possibly `NULL`.
+ * @param errCode the location where to store the JetStream specific error code, or `NULL`
+ * if not needed.
+ */
+NATS_EXTERN natsStatus
+js_StreamNames(jsStreamNamesList **list, jsCtx *js, jsOptions *opts, jsErrCode *errCode);
+
+/** \brief Destroys the stream names list object.
+ *
+ * Releases memory allocated for this list of stream names.
+ *
+ * \warning All string pointers contained in the list will
+ * be destroyed by this call.
+ *
+ * @param list the pointer to the #jsStreamNamesList object.
+ */
+NATS_EXTERN void
+jsStreamNamesList_Destroy(jsStreamNamesList *list);
+
+/** \brief Initializes a consumer configuration structure.
+ *
+ * Use this before adding a consumer.
+ *
+ * @see #jsConsumerConfig
+ *
+ * @param cc the pointer to the #jsConsumerConfig to initialize.
+ */
+NATS_EXTERN natsStatus
+jsConsumerConfig_Init(jsConsumerConfig *cc);
+
+/** \brief Adds a JetStream consumer.
+ *
+ * Adds a consumer based on the provided configuration (that cannot be `NULL`).
+ *
+ * \note If you do not need a #jsConsumerInfo to be returned, you can pass `NULL`,
+ * otherwise, on success you are responsible for freeing this object.
+ *
+ * @see jsConsumerConfig_Init
+ * @see jsConsumerInfo_Destroy
+ *
+ * @param ci the location where to store the pointer to the new #jsConsumerInfo object in
+ * response to the creation request, or `NULL` if the consumer information is not needed.
+ * @param js the pointer to the #jsCtx context.
+ * @param stream the name of the stream.
+ * @param cfg the pointer to the #jsConsumerConfig.
+ * @param opts the pointer to the #jsOptions object, possibly `NULL`.
+ * @param errCode the location where to store the JetStream specific error code, or `NULL`
+ * if not needed.
+ */
+NATS_EXTERN natsStatus
+js_AddConsumer(jsConsumerInfo **ci, jsCtx *js,
+                   const char *stream, jsConsumerConfig *cfg,
+                   jsOptions *opts, jsErrCode *errCode);
+
+/** \brief Updates a JetStream consumer.
+ *
+ * Updates a consumer based on the provided configuration (that cannot be `NULL`).
+ *
+ * \note If you do not need a #jsConsumerInfo to be returned, you can pass `NULL`,
+ * otherwise, on success you are responsible for freeing this object.
+ *
+ * @see jsConsumerConfig_Init
+ * @see jsConsumerInfo_Destroy
+ *
+ * @param ci the location where to store the pointer to the new #jsConsumerInfo object in
+ * response to the creation request, or `NULL` if the consumer information is not needed.
+ * @param js the pointer to the #jsCtx context.
+ * @param stream the name of the stream.
+ * @param cfg the pointer to the #jsConsumerConfig.
+ * @param opts the pointer to the #jsOptions object, possibly `NULL`.
+ * @param errCode the location where to store the JetStream specific error code, or `NULL`
+ * if not needed.
+ */
+NATS_EXTERN natsStatus
+js_UpdateConsumer(jsConsumerInfo **ci, jsCtx *js,
+                  const char *stream, jsConsumerConfig *cfg,
+                  jsOptions *opts, jsErrCode *errCode);
+
+/** \brief Retrieves information about a consumer.
+ *
+ * \note The returned object should be destroyed using #jsConsumerInfo_Destroy in order
+ * to free allocated memory.
+ *
+ * @param ci the location where to store the pointer to the new #jsConsumerInfo object.
+ * @param js the pointer to the #jsCtx context.
+ * @param stream the name of the stream.
+ * @param consumer the name of the consumer.
+ * @param opts the pointer to the #jsOptions object, possibly `NULL`.
+ * @param errCode the location where to store the JetStream specific error code, or `NULL`
+ * if not needed.
+ */
+NATS_EXTERN natsStatus
+js_GetConsumerInfo(jsConsumerInfo **ci, jsCtx *js,
+                       const char *stream, const char *consumer,
+                       jsOptions *opts, jsErrCode *errCode);
+
+/** \brief Deletes a consumer.
+ *
+ * Deletes the consumer named <c>consumer</c> from stream named <c>stream</c>.
+ *
+ * @param js the pointer to the #jsCtx context.
+ * @param stream the name of the stream.
+ * @param consumer the name of the consumer.
+ * @param opts the pointer to the #jsOptions object, possibly `NULL`.
+ * @param errCode the location where to store the JetStream specific error code, or `NULL`
+ * if not needed.
+ */
+NATS_EXTERN natsStatus
+js_DeleteConsumer(jsCtx *js, const char *stream, const char *consumer,
+                      jsOptions *opts, jsErrCode *errCode);
+
+/** \brief Destroys the consumer information object.
+ *
+ * Releases memory allocated for this consumer information object.
+ *
+ * @param ci the pointer to the #jsConsumerInfo object.
+ */
+NATS_EXTERN void
+jsConsumerInfo_Destroy(jsConsumerInfo *ci);
+
+/** \brief Retrieves the list of all available consumers for a stream.
+ *
+ * Retrieves the list of all #jsConsumerInfo for a given stream.
+ *
+ * \warning The list should be destroyed when no longer used by
+ * calling #jsConsumerInfoList_Destroy.
+ *
+ * @param list the location where to store the pointer to the new #jsConsumerInfoList object.
+ * @param js the pointer to the #jsCtx context.
+ * @param stream the stream name whose consumer list is requested.
+ * @param opts the pointer to the #jsOptions object, possibly `NULL`.
+ * @param errCode the location where to store the JetStream specific error code, or `NULL`
+ * if not needed.
+ */
+NATS_EXTERN natsStatus
+js_Consumers(jsConsumerInfoList **list, jsCtx *js, const char *stream, jsOptions *opts, jsErrCode *errCode);
+
+/** \brief Destroys the consumer information list object.
+ *
+ * Releases memory allocated for this consumer information list.
+ *
+ * \warning All #jsConsumerInfo pointers contained in the list will
+ * be destroyed by this call.
+ *
+ * @param list the pointer to the #jsConsumerInfoList object.
+ */
+NATS_EXTERN void
+jsConsumerInfoList_Destroy(jsConsumerInfoList *list);
+
+/** \brief Retrieves the list of all available consumer names for a stream.
+ *
+ * Retrieves the list of all consumer names for a given stream.
+ *
+ * \warning The list should be destroyed when no longer used by
+ * calling #jsConsumerNamesList_Destroy.
+ *
+ * @param list the location where to store the pointer to the new #jsConsumerNamesList object.
+ * @param js the pointer to the #jsCtx context.
+ * @param stream the stream name whose consumer list is requested.
+ * @param opts the pointer to the #jsOptions object, possibly `NULL`.
+ * @param errCode the location where to store the JetStream specific error code, or `NULL`
+ * if not needed.
+ */
+NATS_EXTERN natsStatus
+js_ConsumerNames(jsConsumerNamesList **list, jsCtx *js, const char *stream, jsOptions *opts, jsErrCode *errCode);
+
+/** \brief Destroys the consumer names list object.
+ *
+ * Releases memory allocated for this list of consumer names.
+ *
+ * \warning All string pointers contained in the list will
+ * be destroyed by this call.
+ *
+ * @param list the pointer to the #jsConsumerNamesList object.
+ */
+NATS_EXTERN void
+jsConsumerNamesList_Destroy(jsConsumerNamesList *list);
+
+/** \brief Retrieves information about the JetStream usage from an account.
+ *
+ * Retrieves information about the JetStream usage from an account.
+ *
+ * \note The returned object should be destroyed using #jsAccountInfo_Destroy in order
+ * to free allocated memory.
+ *
+ * @param ai the location where to store the pointer to the new #jsAccountInfo object in
+ * response to the account information request.
+ * @param js the pointer to the #jsCtx context.
+ * @param opts the pointer to the #jsOptions object, possibly `NULL`.
+ * @param errCode the location where to store the JetStream specific error code, or `NULL`
+ * if not needed.
+ */
+NATS_EXTERN natsStatus
+js_GetAccountInfo(jsAccountInfo **ai, jsCtx *js, jsOptions *opts, jsErrCode *errCode);
+
+/** \brief Destroys the account information object.
+ *
+ * Releases memory allocated for this account information object.
+ *
+ * @param ai the pointer to the #jsAccountInfo object.
+ */
+NATS_EXTERN void
+jsAccountInfo_Destroy(jsAccountInfo *ai);
+
+/** @} */ // end of jsAssetsGroup
+
+/** \defgroup jsPubGroup Publishing
+ *
+ *  Publishing functions
+ *  @{
+ */
+
+/** \brief Initializes a publish options structure.
+ *
+ * Use this before setting specific publish options and passing this
+ * configuration to the JetStream publish APIs.
+ *
+ * @param opts the pointer to the #jsPubOptions to initialize.
+ */
+NATS_EXTERN natsStatus
+jsPubOptions_Init(jsPubOptions *opts);
+
+/** \brief Publishes data on a subject to JetStream.
+ *
+ * Publishes the data to the given subject to JetStream.
+ *
+ * See #js_PublishMsg for details.
+ *
+ * @param pubAck the location where to store the pub acknowledgment, or `NULL` if not needed.
+ * @param js the pointer to the #jsCtx object.
+ * @param subj the subject the data is sent to.
+ * @param data the data to be sent, can be `NULL`.
+ * @param dataLen the length of the data to be sent.
+ * @param opts the publish options, possibly `NULL`.
+ * @param errCode the location where to store the JetStream specific error code, or `NULL`
+ * if not needed.
+ */
+NATS_EXTERN natsStatus
+js_Publish(jsPubAck **pubAck, jsCtx *js, const char *subj, const void *data, int dataLen,
+           jsPubOptions *opts, jsErrCode *errCode);
+
+/** \brief Publishes a message to JetStream.
+ *
+ * Publishes the given message to JetStream.
+ *
+ * \note If you are not interested in inspecting the publish acknowledgment, you can
+ * pass `NULL`, but keep in mind that the publish acknowledgment is still sent by
+ * the server.
+ * \note The returned #jsPubAck object needs to be destroyed with #jsPubAck_Destroy
+ * when no longer needed.
+ *
+ * @see jsPubAck_Destroy
+ *
+ * @param pubAck the location where to store the pub acknowledgment, or `NULL` if not needed.
+ * @param js the pointer to the #jsCtx object.
+ * @param msg the pointer to the #natsMsg object to send.
+ * @param opts the publish options, possibly `NULL`.
+ * @param errCode the location where to store the JetStream specific error code, or `NULL`
+ * if not needed.
+ */
+NATS_EXTERN natsStatus
+js_PublishMsg(jsPubAck **pubAck, jsCtx *js, natsMsg *msg,
+              jsPubOptions *opts, jsErrCode *errCode);
+
+/** \brief Destroys the publish acknowledgment object.
+ *
+ * Releases memory allocated for this publish acknowledgment object.
+ *
+ * @param pubAck the #jsPubAck object to destroy.
+ */
+NATS_EXTERN void
+jsPubAck_Destroy(jsPubAck *pubAck);
+
+/** \brief Publishes data to JetStream but does not wait for a #jsPubAck.
+ *
+ * See #js_PublishMsgAsync for details.
+ *
+ * @param js the pointer to the #jsCtx object.
+ * @param subj the subject the data is sent to.
+ * @param data the data to be sent, can be `NULL`.
+ * @param dataLen the length of the data to be sent.
+ * @param opts the publish options, possibly `NULL`.
+ */
+NATS_EXTERN natsStatus
+js_PublishAsync(jsCtx *js, const char *subj, const void *data, int dataLen,
+                jsPubOptions *opts);
+
+/** \brief Publishes a message to JetStream but does not wait for a #jsPubAck.
+ *
+ * Publishes a message asynchronously to JetStream. User can call #js_PublishAsyncComplete
+ * to be notified when all publish acknowledgments for the pending publish calls
+ * have been received.
+ *
+ * \note If this call is successful, the library takes ownership of the message
+ * and will destroy it after the acknowledgment has been received, or will
+ * present it to the user through the #jsPubAckErrHandler callback. To prevent the user
+ * from accessing/destroying the message while in use by the library, this function
+ * requires a pointer to the pointer of the message so that it can be cleared.
+ * That way, the user should always call #natsMsg_Destroy, regardless of success or
+ * failure, since #natsMsg_Destroy will have no effect if the message pointer is `NULL`.
+ *
+ * @see js_PublishAsyncComplete
+ * @see jsPubAckErrHandler
+ *
+ * @param js the pointer to the #jsCtx object.
+ * @param msg the memory location where the pointer to the #natsMsg object is located.
+ * If the library takes ownership of the message, this location will be cleared so a following
+ * call to #natsMsg_Destroy would have no effect.
+ * @param opts the publish options, possibly `NULL`.
+ */
+NATS_EXTERN natsStatus
+js_PublishMsgAsync(jsCtx *js, natsMsg **msg, jsPubOptions *opts);
+
+/** \brief Wait for all outstanding messages to be acknowledged.
+ *
+ * This call will block until the library has received acknowledgment for
+ * all outstanding published messages.
+ *
+ * To limit the wait, user can pass a #jsPubOptions with a `MaxWait` set to the
+ * maximum number of milliseconds that the call should block.
+ *
+ * @param js the pointer to the #jsCtx object.
+ * @param opts the publish options, possibly `NULL`.
+ */
+NATS_EXTERN natsStatus
+js_PublishAsyncComplete(jsCtx *js, jsPubOptions *opts);
+
+/** \brief Returns the list of pending messages published asynchronously.
+ *
+ * This call returns the list of all asynchronously published messages
+ * for which no acknowledgment have been received yet.
+ *
+ * The user has now back ownership of the messages and can resend send if
+ * desired or simply destroy them.
+ *
+ * \note After this call returns, it is possible that acknowledgments arrive
+ * from the server but since they have been removed from the pending list, the
+ * acknowledgments will be discarded (no #jsPubAckErrHandler callback invoked).
+ * If the server did receive a particular message and the user in the meantime
+ * has resent that message, it would be a duplicate, so in order for the server
+ * to detect this duplicate, ensure that the stream's duplicate window setting
+ * is specified and a unique message ID was set when sending the message.
+ *
+ * \warning The user must call #natsMsgList_Destroy to release memory
+ * allocated by this call and destroy all pending messages still present in the list.
+ *
+ * \code{.unparsed}
+ * natsMsgList pending;
+ *
+ * s = js_PublishAsyncGetPendingList(&pending, js);
+ * if (s == NATS_OK)
+ * {
+ *      int i;
+ *
+ *      for (i=0; i<pending.Count; i++)
+ *      {
+ *              if (your_decision_to_resend(pending.Msgs[i]))
+ *              {
+ *                      // If the call is successful, pending.Msgs[i] will
+ *                      // be set to NULL so the message will not be
+ *                      // destroyed.
+ *                      js_PublishMsgAsync(js, &(pending.Msgs[i]), NULL);
+ *              }
+ *      }
+ *
+ *      // Calling this will release memory allocated to hold the
+ *      // array of messages but also call natsMsg_Destroy on all
+ *      // messages still present in the array.
+ *      natsMsgList_Destroy(&pending);
+ * }
+ * \endcode
+ *
+ * @param pending pointer to a #natsMsgList object, typically defined on the stack.
+ * @param js the pointer to the #jsCtx object.
+ */
+NATS_EXTERN natsStatus
+js_PublishAsyncGetPendingList(natsMsgList *pending, jsCtx *js);
+
+/** @} */ // end of jsPubGroup
+
+/** \defgroup jsSubGroup Subscribing
+ *
+ *  Subscribing functions
+ *  @{
+ */
+
+/** \brief Initializes a subscribe options structure.
+ *
+ * Use this before setting specific subscribe options and passing this
+ * configuration to the JetStream subscribe APIs.
+ *
+ * @param opts the pointer to the #jsSubOptions to initialize.
+ */
+NATS_EXTERN natsStatus
+jsSubOptions_Init(jsSubOptions *opts);
+
+/** \brief Create an asynchronous subscription.
+ *
+ * Typically the user or administrator will have created a JetStream
+ * consumer and this call will reference the stream/consumer to bind
+ * to with the use of #jsSubOptions's `Stream` and `Consumer`.
+ *
+ * Without the stream information, the library will use the provided
+ * `subject` to try figure out which stream this subscription is for.
+ *
+ * If a `Durable` is specified (with #jsSubOptions' `Config.Durable`),
+ * the subscription will be durable. However, note the behavior described
+ * below regarding JetStream consumers created by this call.
+ *
+ * If no `Durable` is specified, the subscription will be ephemeral
+ * and removed by the server either after calling #natsSubscription_Unsubscribe
+ * or after the subscription is destroyed and the `InactivityThreshold`
+ * has elapsed.
+ *
+ * \note If a JetStream consumer does not exist and this call creates
+ * it, it will be removed in the server once the user calls #natsSubscription_Unsubscribe
+ * or #natsSubscription_Drain, even if this is a `Durable` subscription.
+ * If the subscription should be maintained, it should be explicitly
+ * created using #js_AddConsumer and then bound to with the use
+ * of #jsSubOptions' `Stream` and `Consumer`.
+ *
+ * \warning Prior to release v3.4.0, calling #natsSubscription_Destroy
+ * would delete the JetStream consumer if it was created by this call.
+ * The original intent was that it would be deleted only with explicit
+ * calls to unsubscribe or drain. Therefore, starting v3.4.0, if
+ * the user calls only #natsSubscription_Destroy (to free memory),
+ * the JetStream consumer will no longer be deleted. The user would
+ * have to explicitly call #natsSubscription_Unsubscribe or #js_DeleteConsumer.
+ *
+ * @param sub the location where to store the pointer to the newly created
+ * #natsSubscription object.
+ * @param js the pointer to the #jsCtx object.
+ * @param subject the subject this subscription is created for.
+ * @param cb the #natsMsgHandler callback.
+ * @param cbClosure a pointer to an user defined object (can be `NULL`). See
+ * the #natsMsgHandler prototype.
+ * @param opts the pointer to the #jsOptions object, possibly `NULL`.
+ * @param subOpts the subscribe options, possibly `NULL`.
+ * @param errCode the location where to store the JetStream specific error code, or `NULL`
+ * if not needed.
+ */
+NATS_EXTERN natsStatus
+js_Subscribe(natsSubscription **sub, jsCtx *js, const char *subject,
+             natsMsgHandler cb, void* cbClosure,
+             jsOptions *opts, jsSubOptions *subOpts, jsErrCode *errCode);
+
+/** \brief Create a synchronous subscription.
+ *
+ * See important notes in #js_Subscribe.
+ *
+ * @param sub the location where to store the pointer to the newly created
+ * #natsSubscription object.
+ * @param js the pointer to the #jsCtx object.
+ * @param subject the subject this subscription is created for.
+ * the #natsMsgHandler prototype.
+ * @param opts the pointer to the #jsOptions object, possibly `NULL`.
+ * @param subOpts the subscribe options, possibly `NULL`.
+ * @param errCode the location where to store the JetStream specific error code, or `NULL`
+ * if not needed.
+ */
+NATS_EXTERN natsStatus
+js_SubscribeSync(natsSubscription **sub, jsCtx *js, const char *subject,
+                 jsOptions *opts, jsSubOptions *subOpts, jsErrCode *errCode);
+
+/** \brief Create a pull subscriber.
+ *
+ * A pull based consumer is a type of consumer that does not have a delivery subject,
+ * that is the library has to request for the messages to be delivered as needed from the server.
+ *
+ * \note If no durable name is provided, the pull subscription will create an ephemeral
+ * JetStream consumer. The requirement for a durable name is lifted in NATS C client v3.4.0+
+ * and NATS Server v2.7.0+.
+ * \note If a durable name is specified, it cannot contain the character ".".
+ *
+ * See important notes in #js_Subscribe.
+ *
+ * @param sub the location where to store the pointer to the newly created #natsSubscription object.
+ * @param js the pointer to the #jsCtx object.
+ * @param subject the subject this subscription is created for.
+ * @param durable the optional durable name.
+ * @param opts the pointer to the #jsOptions object, possibly `NULL`.
+ * @param subOpts the subscribe options, possibly `NULL`.
+ * @param errCode the location where to store the JetStream specific error code, or `NULL`
+ * if not needed.
+ */
+NATS_EXTERN natsStatus
+js_PullSubscribe(natsSubscription **sub, jsCtx *js, const char *subject, const char *durable,
+                 jsOptions *opts, jsSubOptions *subOpts, jsErrCode *errCode);
+
+/** \brief Fetches messages for a pull subscription.
+ *
+ * Fetches up to `batch` messages from the server, waiting up to `timeout` milliseconds.
+ * No more thant `batch` messages will be returned, however, it can be less.
+ *
+ * For `batch` greater than `1`, this call will not necessarily wait up `timeout` milliseconds
+ * if some messages were collected and the library receives a notification that
+ * no more messages are available at this time.<br>
+ * It means that calling `natsSubscription_Fetch(&list, sub, 10, 5000)` may
+ * return after less than 5 seconds with only 3 messages.
+ *
+ * @param list the location to a #natsMsgList that will be filled by the result of this call.
+ * @param sub the pointer to the #natsSubscription object.
+ * @param batch the batch size, that is, the maximum number of messages to return.
+ * @param timeout the timeout (required) expressed in number of milliseconds.
+ * @param errCode the location where to store the JetStream specific error code, or `NULL`
+ * if not needed.
+ */
+NATS_EXTERN natsStatus
+natsSubscription_Fetch(natsMsgList *list, natsSubscription *sub, int batch, int64_t timeout,
+                       jsErrCode *errCode);
+
+/** \brief Initializes a fetch request options structure.
+ *
+ * Use this before setting specific fetch options and passing it to #natsSubscription_FetchRequest.
+ *
+ * @param request the pointer to the #jsFetchRequest object.
+ */
+NATS_EXTERN natsStatus
+jsFetchRequest_Init(jsFetchRequest *request);
+
+/** \brief Fetches messages for a pull subscription with a complete request configuration
+ *
+ * Similar to #natsSubscription_Fetch but a full #jsFetchRequest configuration is provided
+ * for maximum control.
+ *
+ * Initialize the #jsFetchRequest structure using #jsFetchRequest_Init and then set
+ * the parameters desired, then invoke this function.
+ *
+ * @param list the location to a #natsMsgList that will be filled by the result of this call.
+ * @param sub the pointer to the #natsSubscription object.
+ * @param request the pointer to a #jsFetchRequest configuration.
+ */
+NATS_EXTERN natsStatus
+natsSubscription_FetchRequest(natsMsgList *list, natsSubscription *sub, jsFetchRequest *request);
+
+/** \brief Returns the jsConsumerInfo associated with this subscription.
+ *
+ * Returns the #jsConsumerInfo associated with this subscription.
+ *
+ * @param ci the location where to store the pointer to the new #jsConsumerInfo object.
+ * @param sub the pointer to the #natsSubscription object.
+ * @param opts the pointer to the #jsOptions object, possibly `NULL`.
+ * @param errCode the location where to store the JetStream specific error code, or `NULL`
+ * if not needed.
+ */
+NATS_EXTERN natsStatus
+natsSubscription_GetConsumerInfo(jsConsumerInfo **ci, natsSubscription *sub,
+                                 jsOptions *opts, jsErrCode *errCode);
+
+/** \brief Returns the consumer sequence mismatch information.
+ *
+ * If `Heartbeat` is configured in #jsConsumerConfig object (or configured in an existing
+ * JetStream consumer), the server sends heartbeats to the client at the given interval.
+ *
+ * Those heartbeats contains information that allow the application to detect a mismatch
+ * between the server and client's view of the state of the consumer.
+ *
+ * If the library detects a sequence mismatch, the behavior is different depending on
+ * the type of subscription:
+ *
+ * * For asynchronous subscriptions: the error #NATS_MISMATCH is published to the error handler
+ * (see #natsOptions_SetErrorHandler).
+ * * For synchronous subscriptions: the next call to #natsSubscription_NextMsg() will
+ * return the error #NATS_MISMATCH (but will succeed afterwards).
+ *
+ * In both cases, the user should check what the mismatch is using this function and
+ * possibly recreate the consumer based on the provided information.
+ *
+ * \note For a valid JetStream subscription, this function will return #NATS_NOT_FOUND
+ * if no consumer sequence mismatch has been detected.
+ *
+ * @see jsConsumerSequenceMismatch
+ *
+ * @param csm the pointer location where to copy the consumer sequence mismatch information.
+ * @param sub the pointer to the #natsSubscription object.
+ */
+NATS_EXTERN natsStatus
+natsSubscription_GetSequenceMismatch(jsConsumerSequenceMismatch *csm, natsSubscription *sub);
+
+/** @} */ // end of jsSubGroup
+
+/** \defgroup jsMsg Messages
+ *
+ *  Function specific to JetStream messages
+ *  @{
+ */
+
+/** \brief Returns metadata from this JetStream message.
+ *
+ * This works only for JetStream messages that have been received through
+ * a subscription callback or calling #natsSubscription_NextMsg.
+ *
+ * \note The user must destroy the returned object with #jsMsgMetaData_Destroy.
+ *
+ * \note This function will return an error for non JetStream messages.
+ *
+ * @param new_meta the location where to store the pointer to the newly created
+ * #jsMsgMetaData object.
+ * @param msg the pointer to the #natsMsg object, which should be a JetStream
+ * message received through a subscription callback or #natsSubscription_NextMsg.
+ */
+NATS_EXTERN natsStatus
+natsMsg_GetMetaData(jsMsgMetaData **new_meta, natsMsg *msg);
+
+/** \brief Destroys the message metadata object.
+ *
+ * Releases memory allocated for this #jsMsgMetaData object.
+ *
+ * @param meta the pointer to the #jsMsgMetaData object.
+ */
+NATS_EXTERN void
+jsMsgMetaData_Destroy(jsMsgMetaData *meta);
+
+/** \brief Acknowledges a message.
+ *
+ * This tells the server that the message was successfully processed and
+ * it can move on to the next message.
+ *
+ * @param msg the pointer to the #natsMsg object.
+ * @param opts the pointer to the #jsOptions object, possibly `NULL`.
+ */
+NATS_EXTERN natsStatus
+natsMsg_Ack(natsMsg *msg, jsOptions *opts);
+
+/** \brief Acknowledges a message and wait for a confirmation.
+ *
+ * This is the synchronous version of #natsMsg_Ack. This indicates successful
+ * message processing, and waits for confirmation from the server that
+ * the acknowledgment has been processed.
+ *
+ * @param msg the pointer to the #natsMsg object.
+ * @param opts the pointer to the #jsOptions object, possibly `NULL`.
+ * @param errCode the location where to store the JetStream specific error code, or `NULL`
+ * if not needed.
+ */
+NATS_EXTERN natsStatus
+natsMsg_AckSync(natsMsg *msg, jsOptions *opts, jsErrCode *errCode);
+
+/** \brief Negatively acknowledges a message.
+ *
+ * This tells the server to redeliver the message. You can configure the
+ * number of redeliveries by passing `MaxDeliver` when you subscribe.
+ *
+ * The default is infinite redeliveries.
+ *
+ * @param msg the pointer to the #natsMsg object.
+ * @param opts the pointer to the #jsOptions object, possibly `NULL`.
+ */
+NATS_EXTERN natsStatus
+natsMsg_Nak(natsMsg *msg, jsOptions *opts);
+
+/** \brief Negatively acknowledges a message.
+ *
+ * This tells the server to redeliver the message after the given `delay`
+ * duration expressed in milliseconds. You can configure the number of
+ * redeliveries by passing `MaxDeliver` when you subscribe.
+ *
+ * The default is infinite redeliveries.
+ *
+ * @param msg the pointer to the #natsMsg object.
+ * @param delay the amount of time before the redelivery expressed in milliseconds.
+ * @param opts the pointer to the #jsOptions object, possibly `NULL`.
+ */
+NATS_EXTERN natsStatus
+natsMsg_NakWithDelay(natsMsg *msg, int64_t delay, jsOptions *opts);
+
+/** \brief Resets redelivery timer on the server.
+ *
+ * This tells the server that this message is being worked on. It resets
+ * the redelivery timer on the server.
+ *
+ * @param msg the pointer to the #natsMsg object.
+ * @param opts the pointer to the #jsOptions object, possibly `NULL`.
+ */
+NATS_EXTERN natsStatus
+natsMsg_InProgress(natsMsg *msg, jsOptions *opts);
+
+/** \brief Abandon this message.
+ *
+ * This tells the server to not redeliver this message, regardless of
+ * the value `MaxDeliver`.
+ *
+ * @param msg the pointer to the #natsMsg object.
+ * @param opts the pointer to the #jsOptions object, possibly `NULL`.
+ */
+NATS_EXTERN natsStatus
+natsMsg_Term(natsMsg *msg, jsOptions *opts);
+
+/** \brief Returns the sequence number of this JetStream message.
+ *
+ * Returns the sequence number of this JetStream message, or `0` if `msg` is `NULL`
+ * or not a JetStream message.
+ *
+ * \note This applies to JetStream messages retrieved with #js_GetMsg or #js_GetLastMsg.
+ *
+ * @param msg the pointer to the #natsMsg object.
+ */
+NATS_EXTERN uint64_t
+natsMsg_GetSequence(natsMsg *msg);
+
+/** \brief Returns the timestamp (in UTC) of this JetStream message.
+ *
+ * Returns the timestamp (in UTC) of this JetStream message, or `0` if `msg` is `NULL`
+ * or not a JetStream message.
+ *
+ * \note This applies to JetStream messages retrieved with #js_GetMsg or #js_GetLastMsg.
+ *
+ * @param msg the pointer to the #natsMsg object.
+ */
+NATS_EXTERN int64_t
+natsMsg_GetTime(natsMsg *msg);
+
+/** @} */ // end of jsMsg
+
+/** @} */ // end of jsGroup
+
+/** \defgroup kvGroup KeyValue store
+ *
+ * A KeyValue store is a materialized view of JetStream.
+ *
+ * \warning EXPERIMENTAL FEATURE! We reserve the right to change the API without
+ * necessarily bumping the major version of the library.
+ *
+ *  @{
+ */
+
+/** \defgroup kvGroupMgt KeyValue store management
+ *
+ * These functions allow to create, get or delete a KeyValue store.
+ *
+ * \warning EXPERIMENTAL FEATURE! We reserve the right to change the API without
+ * necessarily bumping the major version of the library.
+ *
+ *  @{
+ */
+
+/** \brief Initializes a KeyValue configuration structure.
+ *
+ * Use this before setting specific #kvConfig options and passing it to #js_CreateKeyValue.
+ *
+ * @see js_CreateKeyValue
+ *
+ * @param cfg the pointer to the stack variable #kvConfig to initialize.
+ */
+NATS_EXTERN natsStatus
+kvConfig_Init(kvConfig *cfg);
+
+/** \brief Creates a KeyValue store with a given configuration.
+ *
+ * Creates a KeyValue store with a given configuration.
+ *
+ * Bucket names are restricted to this set of characters: `A-Z`, `a-z`, `0-9`, `_` and `-`.
+ *
+ * \note The return #kvStore object needs to be destroyed using #kvStore_Destroy when
+ * no longer needed to free allocated memory. This is different from deleting a KeyValue store
+ * from the server using the #js_DeleteKeyValue API.
+ *
+ * @param new_kv the location where to store the newly created #kvStore object.
+ * @param js the pointer to the #jsCtx object.
+ * @param cfg the pointer to the #kvConfig configuration information used to create the #kvStore object.
+ */
+NATS_EXTERN natsStatus
+js_CreateKeyValue(kvStore **new_kv, jsCtx *js, kvConfig *cfg);
+
+/** \brief Looks-up and binds to an existing KeyValue store.
+ *
+ * This call is when the user wants to use an existing KeyValue store.
+ * If the store does not already exists, an error is returned.
+ *
+ * Bucket names are restricted to this set of characters: `A-Z`, `a-z`, `0-9`, `_` and `-`.
+ *
+ * \note The return #kvStore object needs to be destroyed using #kvStore_Destroy when
+ * no longer needed to free allocated memory. This is different from deleting a KeyValue store
+ * from the server using the #js_DeleteKeyValue API.
+ *
+ * @param new_kv the location where to store the newly created #kvStore object.
+ * @param js the pointer to the #jsCtx object.
+ * @param bucket the name of the bucket of the existing KeyValue store.
+ */
+NATS_EXTERN natsStatus
+js_KeyValue(kvStore **new_kv, jsCtx *js, const char *bucket);
+
+/** \brief Deletes a KeyValue store.
+ *
+ * This will delete the KeyValue store with the `bucket` name.
+ *
+ * Bucket names are restricted to this set of characters: `A-Z`, `a-z`, `0-9`, `_` and `-`.
+ *
+ * @param js the pointer to the #jsCtx object.
+ * @param bucket the name of the bucket of the existing KeyValue store.
+ */
+NATS_EXTERN natsStatus
+js_DeleteKeyValue(jsCtx *js, const char *bucket);
+
+/** \brief Destroys a KeyValue store object.
+ *
+ * This will simply free memory resources in the library for this #kvStore,
+ * but does not delete the KeyValue store in the server.
+ *
+ * @param kv the pointer to the #kvStore object.
+ */
+NATS_EXTERN void
+kvStore_Destroy(kvStore *kv);
+
+/** @} */ // end of  kvGroupMgt
+
+/** \defgroup kvEntry KeyValue store entries
+ *
+ * These functions allow to inspect a the value, or entry, of a given key.
+ *
+ * \warning EXPERIMENTAL FEATURE! We reserve the right to change the API without
+ * necessarily bumping the major version of the library.
+ *
+ *  @{
+ */
+
+/** \brief Returns the name of the bucket the data was loaded from.
+ *
+ * Returns the name of the bucket the data was loaded from, or `NULL` if `e` itself is `NULL`.
+ *
+ * @param e the pointer to the #kvEntry object.
+ */
+NATS_EXTERN const char*
+kvEntry_Bucket(kvEntry *e);
+
+/** \brief Returns the name of the key that was retrieved.
+ *
+ * Returns the name of the key that was retrieved, or `NULL` if `e` itself is `NULL`.
+ *
+ * @param e the pointer to the #kvEntry object.
+ */
+NATS_EXTERN const char*
+kvEntry_Key(kvEntry *e);
+
+/** \brief Returns the value for this key.
+ *
+ * Returns the value for this key, or `NULL` if `e` itself is `NULL`.
+ *
+ * @param e the pointer to the #kvEntry object.
+ */
+NATS_EXTERN const void*
+kvEntry_Value(kvEntry *e);
+
+/** \brief Returns the value length for this key.
+ *
+ * Returns the value length for this key, or `-1` if `e` itself is `NULL`.
+ *
+ * @param e the pointer to the #kvEntry object.
+ */
+NATS_EXTERN int
+kvEntry_ValueLen(kvEntry *e);
+
+/** \brief Returns the value, as a string, for this key.
+ *
+ * If the value is an actual string, this call will return a NULL terminating string (`const char*`),
+ * or `NULL` if `e` itself is `NULL`.
+ *
+ * @param e the pointer to the #kvEntry object.
+ */
+NATS_EXTERN const char*
+kvEntry_ValueString(kvEntry *e);
+
+/** \brief Returns the unique sequence for this value.
+ *
+ * Returns the unique sequence for this value, or `0` if `e` itself is `NULL`.
+ *
+ * @param e the pointer to the #kvEntry object.
+ */
+NATS_EXTERN uint64_t
+kvEntry_Revision(kvEntry *e);
+
+/** \brief Returns the time (in UTC) the data was put in the bucket.
+ *
+ * Returns the time (in UTC) the data was put in the bucket, or `0` if `e` itself is `NULL`.
+ *
+ * @param e the pointer to the #kvEntry object.
+ */
+NATS_EXTERN int64_t
+kvEntry_Created(kvEntry *e);
+
+/** \brief Returns the distance from the latest value.
+ *
+ * Returns the distance from the latest value, or `0` if `e` itself is `NULL`.
+ *
+ * If history is enabled this is effectively the index of the historical value,
+ * 0 for latest, 1 for most recent etc...
+ *
+ * @param e the pointer to the #kvEntry object.
+ */
+NATS_EXTERN uint64_t
+kvEntry_Delta(kvEntry *e);
+
+/** \brief Returns the type of operation of this value.
+ *
+ * Returns the type of operation of this value.
+ *
+ * @see kvOperation
+ *
+ * @param e the pointer to the #kvEntry object.
+ */
+NATS_EXTERN kvOperation
+kvEntry_Operation(kvEntry *e);
+
+/** \brief Destroys the KeyValue entry object.
+ *
+ * Releases memory allocated for this #kvEntry object.
+ *
+ * @param e the pointer to the #kvEntry object.
+ */
+NATS_EXTERN void
+kvEntry_Destroy(kvEntry *e);
+
+/** @} */ // end of kvEntry
+
+/** \brief Returns the latest entry for the key.
+ *
+ * Returns the latest entry for the key.
+ *
+ * \note The entry should be destroyed to release memory using #kvEntry_Destroy.
+ *
+ * @param new_entry the location where to store the pointer to the entry associated with the `key`.
+ * @param kv the pointer to the #kvStore object.
+ * @param key the name of the key.
+ */
+NATS_EXTERN natsStatus
+kvStore_Get(kvEntry **new_entry, kvStore *kv, const char *key);
+
+/** \brief Returns the entry at the specific revision for the key.
+ *
+ * Returns the entry at the specific revision for the key, or #NATS_NOT_FOUND if there is no
+ * entry for that key and revision.
+ *
+ * \note The entry should be destroyed to release memory using #kvEntry_Destroy.
+ *
+ * @param new_entry the location where to store the pointer to the entry associated with the `key`.
+ * @param kv the pointer to the #kvStore object.
+ * @param key the name of the key.
+ * @param revision the revision of the entry (must be > 0).
+ */
+NATS_EXTERN natsStatus
+kvStore_GetRevision(kvEntry **new_entry, kvStore *kv, const char *key, uint64_t revision);
+
+/** \brief Places the new value for the key into the store.
+ *
+ * Places the new value for the key into the store.
+ *
+ * @param rev the location where to store the revision of this value, or `NULL` if the stream information is not needed.
+ * @param kv the pointer to the #kvStore object.
+ * @param key the name of the key.
+ * @param data the pointer to the data in memory.
+ * @param len the number of bytes to copy from the data's memory location.
+ */
+NATS_EXTERN natsStatus
+kvStore_Put(uint64_t *rev, kvStore *kv, const char *key, const void *data, int len);
+
+/** \brief Places the new value (as a string) for the key into the store.
+ *
+ * Places the new value, as a string, for the key into the store.
+ *
+ * \note This is equivalent of calling #kvStore_Put with `(int) strlen(data)`.
+ *
+ * \warning The NULL terminating character is not included in the number of bytes stored in the KeyValue store.
+ *
+ * @param rev the location where to store the revision of this value, or `NULL` if the stream information is not needed.
+ * @param kv the pointer to the #kvStore object.
+ * @param key the name of the key.
+ * @param data the pointer to the string to store.
+ */
+NATS_EXTERN natsStatus
+kvStore_PutString(uint64_t *rev, kvStore *kv, const char *key, const char *data);
+
+/** \brief Places the value for the key into the store if and only if the key does not exist.
+ *
+ * Places the value for the key into the store if and only if the key does not exist.
+ *
+ * @param rev the location where to store the revision of this value, or `NULL` if the stream information is not needed.
+ * @param kv the pointer to the #kvStore object.
+ * @param key the name of the key.
+ * @param data the pointer to the data in memory.
+ * @param len the number of bytes to copy from the data's memory location.
+ */
+NATS_EXTERN natsStatus
+kvStore_Create(uint64_t *rev, kvStore *kv, const char *key, const void *data, int len);
+
+/** \brief Places the value (as a string) for the key into the store if and only if the key does not exist.
+ *
+ * Places the value (as a string) for the key into the store if and only if the key does not exist.
+ *
+ * \note This is equivalent of calling #kvStore_Create with `(int) strlen(data)`.
+ *
+ * \warning The NULL terminating character is not included in the number of bytes stored in the KeyValue store.
+ *
+ * @param rev the location where to store the revision of this value, or `NULL` if the stream information is not needed.
+ * @param kv the pointer to the #kvStore object.
+ * @param key the name of the key.
+ * @param data the pointer to the string.
+ */
+NATS_EXTERN natsStatus
+kvStore_CreateString(uint64_t *rev, kvStore *kv, const char *key, const char *data);
+
+/** \brief Updates the value for the key into the store if and only if the latest revision matches.
+ *
+ * Updates the value for the key into the store if and only if the latest revision matches.
+ *
+ * @param rev the location where to store the revision of this value, or `NULL` if the stream information is not needed.
+ * @param kv the pointer to the #kvStore object.
+ * @param key the name of the key.
+ * @param data the pointer to the data in memory.
+ * @param len the number of bytes to copy from the data's memory location.
+ * @param last the expected latest revision prior to the update.
+ */
+NATS_EXTERN natsStatus
+kvStore_Update(uint64_t *rev, kvStore *kv, const char *key, const void *data, int len, uint64_t last);
+
+/** \brief Updates the value (as a string) for the key into the store if and only if the latest revision matches.
+ *
+ * Updates the value (as a string) for the key into the store if and only if the latest revision matches.
+ *
+ * \note This is equivalent of calling #kvStore_Update with `(int) strlen(data)`.
+ *
+ * \warning The NULL terminating character is not included in the number of bytes stored in the KeyValue store.
+ *
+ * @param rev the location where to store the revision of this value, or `NULL` if the stream information is not needed.
+ * @param kv the pointer to the #kvStore object.
+ * @param key the name of the key.
+ * @param data the pointer to the string.
+ * @param last the expected latest revision prior to the update.
+ */
+NATS_EXTERN natsStatus
+kvStore_UpdateString(uint64_t *rev, kvStore *kv, const char *key, const char *data, uint64_t last);
+
+/** \brief Deletes a key by placing a delete marker and leaving all revisions.
+ *
+ * Deletes a key by placing a delete marker and leaving all revisions.
+ *
+ * @param kv the pointer to the #kvStore object.
+ * @param key the name of the key.
+ */
+NATS_EXTERN natsStatus
+kvStore_Delete(kvStore *kv, const char *key);
+
+/** \brief Deletes a key by placing a purge marker and removing all revisions.
+ *
+ * Deletes a key by placing a purge marker and removing all revisions.
+ *
+ * @param kv the pointer to the #kvStore object.
+ * @param key the name of the key.
+ * @param opts the pointer to the #kvPurgeOptions, possibly `NULL`.
+ */
+NATS_EXTERN natsStatus
+kvStore_Purge(kvStore *kv, const char *key, kvPurgeOptions *opts);
+
+/** \brief Initializes a KeyValue watcher options structure.
+ *
+ * Use this before setting specific watcher options and passing it
+ * to #kvStore_Watch.
+ *
+ * @param opts the pointer to the #kvWatchOptions to initialize.
+ */
+NATS_EXTERN natsStatus
+kvWatchOptions_Init(kvWatchOptions *opts);
+
+/** \brief Initializes a KeyValue purge options structure.
+ *
+ * Use this before setting specific purge options and passing it
+ * to #kvStore_Purge or #kvStore_PurgeDeletes.
+ *
+ * @param opts the pointer to the #kvPurgeOptions to initialize.
+ */
+NATS_EXTERN natsStatus
+kvPurgeOptions_Init(kvPurgeOptions *opts);
+
+/** \brief Purge and removes delete markers.
+ *
+ * Removes data and delete markers, but may keep the markers that are considered
+ * more recent than a certain threshold (default is 30 minutes).
+ *
+ * This is a maintenance option if there is a larger buildup of delete markers.
+ *
+ * \note Use #kvPurgeOptions.Timeout to specify how long to wait (in milliseconds)
+ * in gathering all keys that have purge markers. This function will still
+ * purge some of the keys and return #NATS_TIMEOUT to indicate that it may not
+ * have deleted them all.
+ *
+ * @see kvPurgeOptions_Init
+ *
+ * @param kv the pointer to the #kvStore object.
+ * @param opts the pointer to the #kvPurgeOptions, possibly `NULL`.
+ */
+NATS_EXTERN natsStatus
+kvStore_PurgeDeletes(kvStore *kv, kvPurgeOptions *opts);
+
+/** \brief Returns a watcher for any updates to keys that match the `keys` argument.
+ *
+ * Returns a watcher for any updates to keys that match the `keys` argument, which
+ * could include wildcard.
+ *
+ * A `NULL` entry will be posted when the watcher has received all initial values.
+ *
+ * Call #kvWatcher_Next to get the next #kvEntry.
+ *
+ * \note The watcher should be destroyed to release memory using #kvWatcher_Destroy.
+ *
+ * @param new_watcher the location where to store the pointer to the new #kvWatcher object.
+ * @param kv the pointer to the #kvStore object.
+ * @param keys the keys (wildcard possible) to create the watcher for.
+ * @param opts the watcher options, possibly `NULL`.
+ */
+NATS_EXTERN natsStatus
+kvStore_Watch(kvWatcher **new_watcher, kvStore *kv, const char *keys, kvWatchOptions *opts);
+
+/** \brief Returns a watcher for any updates to any keys of the KeyValue store bucket.
+ *
+ * Returns a watcher for any updates to any keys of the KeyValue store bucket.
+ *
+ * A `NULL` entry will be posted when the watcher has received all initial values.
+ *
+ * Call #kvWatcher_Next to get the next #kvEntry.
+ *
+ * \note The watcher should be destroyed to release memory using #kvWatcher_Destroy.
+ *
+ * @param new_watcher the location where to store the pointer to the new #kvWatcher object.
+ * @param kv the pointer to the #kvStore object.
+ * @param opts the watcher options, possibly `NULL`.
+ */
+NATS_EXTERN natsStatus
+kvStore_WatchAll(kvWatcher **new_watcher, kvStore *kv, kvWatchOptions *opts);
+
+/** \brief Returns all keys in the bucket.
+ *
+ * Returns all keys in the bucket.
+ *
+ * \note Use #kvWatchOptions.Timeout to specify how long to wait (in milliseconds)
+ * to gather all keys for this bucket. If the deadline is reached, this function
+ * will return #NATS_TIMEOUT and no keys.
+ *
+ * \warning The user should call #kvKeysList_Destroy to release memory allocated
+ * for the entries list.
+ *
+ * @see kvWatchOptions_Init
+ * @see kvKeysList_Destroy
+ *
+ * @param list list the pointer to a #kvKeysList that will be initialized and filled with resulting key strings.
+ * @param kv the pointer to the #kvStore object.
+ * @param opts the history options, possibly `NULL`.
+ */
+NATS_EXTERN natsStatus
+kvStore_Keys(kvKeysList *list, kvStore *kv, kvWatchOptions *opts);
+
+/** \brief Destroys this list of KeyValue store key strings.
+ *
+ * This function iterates through the list of all key strings and free them.
+ * It then frees the array that was allocated to hold pointers to those keys.
+ *
+ * \note The #kvKeysList object itself is not freed since it is expected that
+ * users will pass a pointer to a stack object. Should the user create its own
+ * object, it will be the user responsibility to free this object.
+ *
+ * @param list the #kvKeysList list of key strings to destroy.
+ */
+NATS_EXTERN void
+kvKeysList_Destroy(kvKeysList *list);
+
+/** \brief Returns all historical entries for the key.
+ *
+ * Returns all historical entries for the key
+ *
+ * Use the options to alter the behavior. For instance, if delete markers
+ * are not desired, option #kvWatchOptions.IgnoreDeletes should be specified.
+ *
+ * \note Use #kvWatchOptions.Timeout to specify how long to wait (in milliseconds)
+ * to gather all entries for this key. If the deadline is reached, this function
+ * will return #NATS_TIMEOUT and no entries.
+ *
+ * \warning The user should call #kvEntryList_Destroy to release memory allocated
+ * for the entries list.
+ *
+ * @see kvWatchOptions_Init
+ * @see kvEntryList_Destroy
+ *
+ * @param list the pointer to a #kvEntryList that will be initialized and filled with resulting entries.
+ * @param kv the pointer to the #kvStore object.
+ * @param key the key for which the history is requested.
+ * @param opts the history options, possibly `NULL`.
+ */
+NATS_EXTERN natsStatus
+kvStore_History(kvEntryList *list, kvStore *kv, const char *key, kvWatchOptions *opts);
+
+/** \brief Destroys this list of KeyValue store entries.
+ *
+ * This function iterates through the list of all entries and call #kvEntry_Destroy.
+ * It then frees the array that was allocated to hold pointers to those entries.
+ *
+ * \note The #kvEntryList object itself is not freed since it is expected that
+ * users will pass a pointer to a stack object. Should the user create its own
+ * object, it will be the user responsibility to free this object.
+ *
+ * @param list the #kvEntryList list of #kvEntry objects to destroy.
+ */
+NATS_EXTERN void
+kvEntryList_Destroy(kvEntryList *list);
+
+/** \brief Returns the bucket name of this KeyValue store object.
+ *
+ * Returns the bucket name of this KeyValue store object, or `NULL` if
+ * `kv` itself is NULL.
+ *
+ * \warning Do not free the string returned by this function.
+ *
+ * @param kv the pointer to the #kvStore object.
+ */
+NATS_EXTERN const char*
+kvStore_Bucket(kvStore *kv);
+
+// PurgeDeletes
+
+/** \brief Returns the status and configuration of a bucket.
+ *
+ * Returns the status and configuration of a bucket.
+ *
+ * \note The status should be destroyed to release memory using #kvStatus_Destroy.
+ *
+ * @param new_status the location where to store the status of this KeyValue store.
+ * @param kv the pointer to the #kvStore object.
+ */
+NATS_EXTERN natsStatus
+kvStore_Status(kvStatus **new_status, kvStore *kv);
+
+/** \defgroup kvWatcher KeyValue store watcher
+ *
+ * These functions allow to receive updates for key(s) on a given bucket.
+ *
+ * \warning EXPERIMENTAL FEATURE! We reserve the right to change the API without
+ * necessarily bumping the major version of the library.
+ *
+ *  @{
+ */
+
+/** \brief Returns the next entry for this watcher.
+ *
+ * Returns the next entry for this watcher. The entry may be `NULL`
+ * (with #NATS_OK status) to indicate that the initial state has
+ * been retrieved.
+ *
+ * If a thread is waiting on this call, it can be canceled with a call to
+ * #kvWatcher_Stop.
+ *
+ * \note The entry should be destroyed to release memory using #kvEntry_Destroy.
+ *
+ * @param new_entry the location where to store the pointer to the #kvEntry object.
+ * @param w the pointer to the #kvWatcher object.
+ * @param timeout how long to wait (in milliseconds) for the next entry.
+ */
+NATS_EXTERN natsStatus
+kvWatcher_Next(kvEntry **new_entry, kvWatcher *w, int64_t timeout);
+
+/** \brief Stops the watcher.
+ *
+ * Stops the watcher. Stopping a stopped watcher returns #NATS_OK.
+ *
+ * After this call, new and existing calls to #kvWatcher_Next (that are waiting
+ * for an update) will return with #NATS_ILLEGAL_STATE.
+ *
+ * @param w the pointer to the #kvWatcher object.
+ */
+NATS_EXTERN natsStatus
+kvWatcher_Stop(kvWatcher *w);
+
+/** \brief Destroys the KeyValue watcher object.
+ *
+ * Releases memory allocated for this #kvWatcher object.
+ *
+ * @param w the pointer to the #kvWatcher object.
+ */
+NATS_EXTERN void
+kvWatcher_Destroy(kvWatcher *w);
+
+/** @} */ // end of kvWatcher
+
+/** \defgroup kvStatus KeyValue store status
+ *
+ * These functions allow to inspect the status of a bucket.
+ *
+ * \warning EXPERIMENTAL FEATURE! We reserve the right to change the API without
+ * necessarily bumping the major version of the library.
+ *
+ *  @{
+ */
+
+/** \brief Returns the bucket name.
+ *
+ * Returns the bucket name, or `NULL` if `sts` itself is `NULL`.
+ *
+ * @param sts the pointer to the #kvStatus object.
+ */
+NATS_EXTERN const char*
+kvStatus_Bucket(kvStatus *sts);
+
+/** \brief Returns how many messages are in the bucket, including historical values.
+ *
+ * Returns how many messages are in the bucket, including historical values, or `0` if `sts` itself is `NULL`.
+ *
+ * @param sts the pointer to the #kvStatus object.
+ */
+NATS_EXTERN uint64_t
+kvStatus_Values(kvStatus *sts);
+
+/** \brief Returns the configured history kept per key.
+ *
+ * Returns the configured history kept per key, or `0` if `sts` itself is `NULL`.
+ *
+ * @param sts the pointer to the #kvStatus object.
+ */
+NATS_EXTERN int64_t
+kvStatus_History(kvStatus *sts);
+
+/** \brief Returns how long the bucket keeps values for.
+ *
+ * Returns how long the bucket keeps values for, or `0` if `sts` itself is `NULL`.
+ *
+ * @param sts the pointer to the #kvStatus object.
+ */
+NATS_EXTERN int64_t
+kvStatus_TTL(kvStatus *sts);
+
+/** \brief Returns the number of replicas to keep for a bucket.
+ *
+ * Returns the number of replicas to keep for a bucket, or `0` if `sts` itself is `NULL`.
+ *
+ * @param sts the pointer to the #kvStatus object.
+ */
+NATS_EXTERN int64_t
+kvStatus_Replicas(kvStatus *sts);
+
+/** \brief Destroys the KeyValue status object.
+ *
+ * Releases memory allocated for this #kvStatus object.
+ *
+ * @param sts the pointer to the #kvStatus object.
+ */
+NATS_EXTERN void
+kvStatus_Destroy(kvStatus *sts);
+
+/** @} */ // end of kvStatus
+
+/** @} */ // end of kvGroup
+
+/** @} */ // end of funcGroup
+
+/**  \defgroup wildcardsGroup Wildcards
+ *  @{
+ *  Use of wildcards. There are two type of wildcards: `*` for partial,
+ *  and `>` for full.
+ *
+ *  A subscription on subject `foo.*` would receive messages sent to:
+ *  - `foo.bar`
+ *  - `foo.baz`
+ *
+ *  but not on:
+ *
+ *  - `foo.bar.baz` (too many elements)
+ *  - `bar.foo`. (does not start with `foo`).
+ *
+ *  A subscription on subject `foo.>` would receive messages sent to:
+ *  - `foo.bar`
+ *  - `foo.baz`
+ *  - `foo.bar.baz`
+ *
+ *  but not on:
+ *  - `foo` (only one element, needs at least two)
+ *  - `bar.baz` (does not start with `foo`).
+ ** @} */
+
+/**  \defgroup envVariablesGroup Environment Variables
+ *  @{
+ *  You will find here the environment variables that change the default behavior
+ *  of the NATS C Client library.
+ * <br><br>
+ * Name | Effect
+ * -----|:-----:
+ * <b>`NATS_DEFAULT_TO_LIB_MSG_DELIVERY`</b> | On #nats_Open, the library looks for this environment variable. If set (to any value), the library will default to using a global thread pool to perform message delivery. See #natsOptions_UseGlobalMessageDelivery and #nats_SetMessageDeliveryPoolSize.
+ *
+ ** @} */
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* NATS_H_ */
diff --git a/src/natsp.h b/src/natsp.h
new file mode 100644 (file)
index 0000000..8385e48
--- /dev/null
@@ -0,0 +1,904 @@
+// Copyright 2015-2022 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef NATSP_H_
+#define NATSP_H_
+
+#if defined(_WIN32)
+# include "include/n-win.h"
+#else
+# include "include/n-unix.h"
+#endif
+
+#if defined(NATS_HAS_TLS)
+#include <openssl/ssl.h>
+#include <openssl/err.h>
+#include <openssl/x509v3.h>
+#include <openssl/rand.h>
+#else
+#define SSL             void*
+#define SSL_free(c)     { (c) = NULL; }
+#define SSL_CTX         void*
+#define SSL_CTX_free(c) { (c) = NULL; }
+#define NO_SSL_ERR  "The library was built without SSL support!"
+#endif
+
+#include "err.h"
+#include "nats.h"
+#include "buf.h"
+#include "parser.h"
+#include "timer.h"
+#include "url.h"
+#include "srvpool.h"
+#include "msg.h"
+#include "asynccb.h"
+#include "hash.h"
+#include "stats.h"
+#include "natstime.h"
+#include "nuid.h"
+
+// Comment/uncomment to replace some function calls with direct structure
+// access
+//#define DEV_MODE    (1)
+
+#define LIB_NATS_VERSION_STRING             NATS_VERSION_STRING
+#define LIB_NATS_VERSION_NUMBER             NATS_VERSION_NUMBER
+#define LIB_NATS_VERSION_REQUIRED_NUMBER    NATS_VERSION_REQUIRED_NUMBER
+
+#define CString     "C"
+
+#define _OK_OP_     "+OK"
+#define _ERR_OP_    "-ERR"
+#define _MSG_OP_    "MSG"
+#define _PING_OP_   "PING"
+#define _PONG_OP_   "PONG"
+#define _INFO_OP_   "INFO"
+
+#define _CRLF_      "\r\n"
+#define _SPC_       " "
+#define _HPUB_P_    "HPUB "
+
+#define _PING_PROTO_         "PING\r\n"
+#define _PONG_PROTO_         "PONG\r\n"
+#define _SUB_PROTO_          "SUB %s %s %" PRId64 "\r\n"
+#define _UNSUB_PROTO_        "UNSUB %" PRId64 " %d\r\n"
+#define _UNSUB_NO_MAX_PROTO_ "UNSUB %" PRId64 " \r\n"
+
+#define STALE_CONNECTION            "Stale Connection"
+#define PERMISSIONS_ERR             "Permissions Violation"
+#define AUTHORIZATION_ERR           "Authorization Violation"
+#define AUTHENTICATION_EXPIRED_ERR  "User Authentication Expired"
+
+#define _CRLF_LEN_          (2)
+#define _SPC_LEN_           (1)
+#define _HPUB_P_LEN_        (5)
+#define _PING_OP_LEN_       (4)
+#define _PONG_OP_LEN_       (4)
+#define _PING_PROTO_LEN_    (6)
+#define _PONG_PROTO_LEN_    (6)
+#define _OK_OP_LEN_         (3)
+#define _ERR_OP_LEN_        (4)
+
+#define NATS_DEFAULT_INBOX_PRE      "_INBOX."
+#define NATS_DEFAULT_INBOX_PRE_LEN  (7)
+
+#define NATS_MAX_REQ_ID_LEN (19) // to display 2^63-1 number
+
+#define WAIT_FOR_READ       (0)
+#define WAIT_FOR_WRITE      (1)
+#define WAIT_FOR_CONNECT    (2)
+
+#define DEFAULT_DRAIN_TIMEOUT   30000 // 30 seconds
+
+#define MAX_FRAMES (50)
+
+#define nats_IsStringEmpty(s) ((((s) == NULL) || ((s)[0] == '\0')) ? true : false)
+
+#define DUP_STRING(s, s1, s2) \
+        { \
+            (s1) = NATS_STRDUP(s2); \
+            if ((s1) == NULL) \
+                (s) = nats_setDefaultError(NATS_NO_MEMORY); \
+        }
+
+#define IF_OK_DUP_STRING(s, s1, s2) \
+        if (((s) == NATS_OK) && !nats_IsStringEmpty(s2)) \
+            DUP_STRING((s), (s1), (s2))
+
+
+#define ERR_CODE_AUTH_EXPIRED   (1)
+#define ERR_CODE_AUTH_VIOLATION (2)
+
+// This is temporary until we remove original connection status enum
+// values without NATS_CONN_STATUS_ prefix
+#if defined(NATS_CONN_STATUS_NO_PREFIX)
+#define NATS_CONN_STATUS_DISCONNECTED   DISCONNECTED
+#define NATS_CONN_STATUS_CONNECTING     CONNECTING
+#define NATS_CONN_STATUS_CONNECTED      CONNECTED
+#define NATS_CONN_STATUS_CLOSED         CLOSED
+#define NATS_CONN_STATUS_RECONNECTING   RECONNECTING
+#define NATS_CONN_STATUS_DRAINING_SUBS  DRAINING_SUBS
+#define NATS_CONN_STATUS_DRAINING_PUBS  DRAINING_PUBS
+#endif
+
+#define IFOK(s, c)      if (s == NATS_OK) { s = (c); }
+
+#define NATS_MILLIS_TO_NANOS(d)     (((int64_t)d)*(int64_t)1E6)
+#define NATS_SECONDS_TO_NANOS(d)    (((int64_t)d)*(int64_t)1E9)
+
+extern int64_t gLockSpinCount;
+
+typedef void (*natsInitOnceCb)(void);
+
+typedef struct __natsControl
+{
+    char    *op;
+    char    *args;
+
+} natsControl;
+
+typedef struct __natsServerInfo
+{
+    char        *id;
+    char        *host;
+    int         port;
+    char        *version;
+    bool        authRequired;
+    bool        tlsRequired;
+    int64_t     maxPayload;
+    char        **connectURLs;
+    int         connectURLsCount;
+    int         proto;
+    uint64_t    CID;
+    char        *nonce;
+    char        *clientIP;
+    bool        lameDuckMode;
+    bool        headers;
+
+} natsServerInfo;
+
+typedef struct __natsSSLCtx
+{
+    natsMutex   *lock;
+    int         refs;
+    SSL_CTX     *ctx;
+    char        *expectedHostname;
+    bool        skipVerify;
+
+} natsSSLCtx;
+
+#define natsSSLCtx_getExpectedHostname(ctx) ((ctx)->expectedHostname)
+
+typedef struct
+{
+    natsEvLoop_Attach           attach;
+    natsEvLoop_ReadAddRemove    read;
+    natsEvLoop_WriteAddRemove   write;
+    natsEvLoop_Detach           detach;
+
+} natsEvLoopCallbacks;
+
+typedef struct __userCreds
+{
+    char        *userOrChainedFile;
+    char        *seedFile;
+
+} userCreds;
+
+struct __natsOptions
+{
+    // This field must be the first (see natsOptions_clone, same if you add
+    // allocated fields such as strings).
+    natsMutex               *mu;
+
+    char                    *url;
+    char                    **servers;
+    int                     serversCount;
+    bool                    noRandomize;
+    int64_t                 timeout;
+    char                    *name;
+    bool                    verbose;
+    bool                    pedantic;
+    bool                    allowReconnect;
+    bool                    secure;
+    int                     ioBufSize;
+    int                     maxReconnect;
+    int64_t                 reconnectWait;
+    int                     reconnectBufSize;
+    int64_t                 writeDeadline;
+
+    char                    *user;
+    char                    *password;
+    char                    *token;
+
+    natsTokenHandler        tokenCb;
+    void                    *tokenCbClosure;
+
+    natsConnectionHandler   closedCb;
+    void                    *closedCbClosure;
+
+    natsConnectionHandler   disconnectedCb;
+    void                    *disconnectedCbClosure;
+
+    natsConnectionHandler   reconnectedCb;
+    void                    *reconnectedCbClosure;
+
+    natsConnectionHandler   discoveredServersCb;
+    void                    *discoveredServersClosure;
+    bool                    ignoreDiscoveredServers;
+
+    natsConnectionHandler   connectedCb;
+    void                    *connectedCbClosure;
+
+    natsConnectionHandler   lameDuckCb;
+    void                    *lameDuckClosure;
+
+    natsErrHandler          asyncErrCb;
+    void                    *asyncErrCbClosure;
+
+    int64_t                 pingInterval;
+    int                     maxPingsOut;
+    int                     maxPendingMsgs;
+
+    natsSSLCtx              *sslCtx;
+
+    void                    *evLoop;
+    natsEvLoopCallbacks     evCbs;
+
+    bool                    libMsgDelivery;
+
+    int                     orderIP; // possible values: 0,4,6,46,64
+
+    // forces the old method of Requests that utilize
+    // a new Inbox and a new Subscription for each request
+    bool                    useOldRequestStyle;
+
+    // If set to true, the Publish call will flush in place and
+    // not rely on the flusher.
+    bool                    sendAsap;
+
+    // If set to true, pending requests will fail with NATS_CONNECTION_DISCONNECTED
+    // when the library detects a disconnection.
+    bool                    failRequestsOnDisconnect;
+
+    // NoEcho configures whether the server will echo back messages
+    // that are sent on this connection if we also have matching subscriptions.
+    // Note this is supported on servers >= version 1.2. Proto 1 or greater.
+    bool                    noEcho;
+
+    // If set to true, in case of failed connect, tries again using
+    // reconnect options values.
+    bool                    retryOnFailedConnect;
+
+    // Callback/closure used to get the user JWT. Will be set to
+    // internal natsConn_userFromFile function when userCreds != NULL.
+    natsUserJWTHandler      userJWTHandler;
+    void                    *userJWTClosure;
+
+    // Callback/closure used to sign the server nonce. Will be set to
+    // internal natsConn_signatureHandler function when userCreds != NULL;
+    natsSignatureHandler    sigHandler;
+    void                    *sigClosure;
+
+    // Public NKey that will be used to authenticate when connecting
+    // to the server.
+    char                    *nkey;
+
+    // If user has invoked natsOptions_SetUserCredentialsFromFiles, this
+    // will be set and points to userOrChainedFile and possibly seedFile.
+    struct __userCreds      *userCreds;
+
+    // Reconnect jitter added to reconnect wait
+    int64_t                 reconnectJitter;
+    int64_t                 reconnectJitterTLS;
+
+    // Custom handler to specify reconnect wait time.
+    natsCustomReconnectDelayHandler customReconnectDelayCB;
+    void                            *customReconnectDelayCBClosure;
+
+    // Disable the "no responders" feature.
+    bool disableNoResponders;
+
+    // Custom inbox prefix
+    char *inboxPfx;
+};
+
+typedef struct __nats_MsgList
+{
+    natsMsg     *head;
+    natsMsg     *tail;
+    int         msgs;
+    int         bytes;
+
+} nats_MsgList;
+
+typedef struct __natsMsgDlvWorker
+{
+    natsMutex       *lock;
+    natsCondition   *cond;
+    natsThread      *thread;
+    bool            shutdown;
+    nats_MsgList     msgList;
+
+} natsMsgDlvWorker;
+
+typedef struct __pmInfo
+{
+    char                *subject;
+    int64_t             deadline;
+    struct __pmInfo     *next;
+
+} pmInfo;
+
+struct __jsCtx
+{
+    natsMutex              *mu;
+    natsConnection      *nc;
+    jsOptions                  opts;
+    int                                    refs;
+    natsCondition       *cond;
+    natsStrHash         *pm;
+    natsTimer           *pmtmr;
+    pmInfo              *pmHead;
+    pmInfo              *pmTail;
+    natsSubscription    *rsub;
+    char                *rpre;
+    int                 rpreLen;
+    int                 pacw;
+    int64_t             pmcount;
+    int                 stalled;
+    bool                closed;
+};
+
+typedef struct __jsSub
+{
+    jsCtx               *js;
+    char                *stream;
+    char                *consumer;
+    char                *nxtMsgSubj;
+    bool                pull;
+    bool                inFetch;
+    bool                ordered;
+    bool                dc; // delete JS consumer in Unsub()/Drain()
+    bool                ackNone;
+
+    // This is ConsumerInfo's Pending+Consumer.Delivered that we get from the
+    // add consumer response. Note that some versions of the server gather the
+    // consumer info *after* the creation of the consumer, which means that
+    // some messages may have been already delivered. So the sum of the two
+    // is a more accurate representation of the number of messages pending or
+    // in the process of being delivered to the subscription when created.
+    uint64_t            pending;
+
+    int64_t             hbi;
+    bool                active;
+    natsTimer           *hbTimer;
+    natsMsg             *mhMsg;
+
+    char                *cmeta;
+    uint64_t            sseq;
+    uint64_t            dseq;
+    // Skip sequence mismatch notification. This is used for
+    // async subscriptions to notify the asyn err handler only
+    // once. Should the mismatch be resolved, this will be
+    // cleared so notification can happen again.
+    bool                ssmn;
+    // Sequence mismatch. This is for synchronous subscription
+    // so that they don't have to rely on async error callback.
+    // Calling NextMsg() when this is true will cause NextMsg()
+    // to return NATS_SLOW_CONSUMER, so that user can check
+    // the sequence mismatch report. Should the mismatch be
+    // resolved, this will be cleared.
+    bool                sm;
+    // These are the mismatch seq info
+    struct mismatch
+    {
+        uint64_t        sseq;
+        uint64_t        dseq;
+        uint64_t        ldseq;
+    } mismatch;
+
+    // When in auto-ack mode, we have an internal callback
+    // that will call natsMsg_Ack after the user callback returns.
+    // We need to keep track of the user callback/closure though.
+    natsMsgHandler      usrCb;
+    void                *usrCbClosure;
+
+    // For flow control, when the subscription reaches this
+    // delivered count, then send a message to this reply subject.
+    uint64_t            fcDelivered;
+    uint64_t            fciseq;
+    char                *fcReply;
+
+    // When reseting an OrderedConsumer, need the original configuration.
+    jsConsumerConfig    *ocCfg;
+
+} jsSub;
+
+struct __kvStore
+{
+    natsMutex           *mu;
+    int                 refs;
+    jsCtx               *js;
+    char                *bucket;
+    char                *stream;
+    char                *pre;
+    bool                useJSPrefix;
+    bool                useDirect;
+
+};
+
+struct __kvEntry
+{
+    kvStore             *kv;
+    const char          *key;
+    natsMsg             *msg;
+    uint64_t            delta;
+    kvOperation         op;
+    struct __kvEntry    *next;
+
+};
+
+struct __kvStatus
+{
+    kvStore             *kv;
+    jsStreamInfo        *si;
+
+};
+
+struct __kvWatcher
+{
+    natsMutex           *mu;
+    int                 refs;
+    kvStore             *kv;
+    natsSubscription    *sub;
+    uint64_t            initPending;
+    uint64_t            received;
+    bool                ignoreDel;
+    bool                initDone;
+    bool                retMarker;
+    bool                stopped;
+
+};
+
+struct __natsSubscription
+{
+    natsMutex                   *mu;
+
+    int                         refs;
+
+    // This is non-zero when auto-unsubscribe is used.
+    uint64_t                    max;
+
+    // This is updated in the delivery thread (or NextMsg) and indicates
+    // how many message have been presented to the callback (or returned
+    // from NextMsg). Like 'msgs', this is also used to determine if we
+    // have reached the max number of messages.
+    uint64_t                    delivered;
+
+    // The list of messages waiting to be delivered to the callback (or
+    // returned from NextMsg).
+    nats_MsgList                msgList;
+
+    // True if msgList.count is over pendingMax
+    bool                        slowConsumer;
+
+    // Condition variable used to wait for message delivery.
+    natsCondition               *cond;
+
+    // The subscriber is closed (or closing).
+    bool                        closed;
+
+    // Indicates if this subscription is actively draining.
+    bool                        draining;
+    // This holds if draining has started and/or completed.
+    uint8_t                     drainState;
+    // Thread started to do the flush and wait for drain to complete.
+    natsThread                  *drainThread;
+    // Holds the status of the drain: if there was an error during the drain process.
+    natsStatus                  drainStatus;
+    // This is the timeout for the drain operation.
+    int64_t                     drainTimeout;
+    // This is set if the flush failed and will prevent the connection for pushing further messages.
+    bool                        drainSkip;
+
+    // Same than draining but for the global delivery situation.
+    // This boolean will be switched off when processed, as opposed
+    // to draining that once set does not get reset.
+    bool                        libDlvDraining;
+
+    // If true, the subscription is closed, but because the connection
+    // was closed, not because of subscription (auto-)unsubscribe.
+    bool                        connClosed;
+
+    // Subscriber id. Assigned during the creation, does not change after that.
+    int64_t                     sid;
+
+    // Subject that represents this subscription. This can be different
+    // than the received subject inside a Msg if this is a wildcard.
+    char                        *subject;
+
+    // Optional queue group name. If present, all subscriptions with the
+    // same name will form a distributed queue, and each message will
+    // only be processed by one member of the group.
+    char                        *queue;
+
+    // Reference to the connection that created this subscription.
+    struct __natsConnection     *conn;
+
+    // Delivery thread (for async subscription).
+    natsThread                  *deliverMsgsThread;
+
+    // If message delivery is done by the library instead, this is the
+    // reference to the worker handling this subscription.
+    natsMsgDlvWorker            *libDlvWorker;
+
+    // Message callback and closure (for async subscription).
+    natsMsgHandler              msgCb;
+    void                        *msgCbClosure;
+
+    int64_t                     timeout;
+    natsTimer                   *timeoutTimer;
+    bool                        timedOut;
+    bool                        timeoutSuspended;
+
+    // Pending limits, etc..
+    int                         msgsMax;
+    int                         bytesMax;
+    int                         msgsLimit;
+    int                         bytesLimit;
+    int64_t                     dropped;
+
+    // Complete callback
+    natsOnCompleteCB            onCompleteCB;
+    void                        *onCompleteCBClosure;
+
+    // For JetStream
+    jsSub                       *jsi;
+
+};
+
+typedef struct __natsPong
+{
+    int64_t             id;
+
+    struct __natsPong   *prev;
+    struct __natsPong   *next;
+
+} natsPong;
+
+typedef struct __natsPongList
+{
+    natsPong            *head;
+    natsPong            *tail;
+
+    int64_t             incoming;
+    int64_t             outgoingPings;
+
+    natsPong            cached;
+
+    natsCondition       *cond;
+
+} natsPongList;
+
+typedef struct __natsSockCtx
+{
+    natsSock        fd;
+    bool            fdActive;
+
+    natsDeadline    readDeadline;
+    natsDeadline    writeDeadline;
+
+    SSL             *ssl;
+
+    // This is true when we are using an external event loop (such as libuv).
+    bool            useEventLoop;
+
+    int             orderIP; // possible values: 0,4,6,46,64
+
+    // By default, the list of IPs returned by the hostname resolution will
+    // be shuffled. This option, if `true`, will disable the shuffling.
+    bool            noRandomize;
+
+} natsSockCtx;
+
+typedef struct __respInfo
+{
+    natsMutex           *mu;
+    natsCondition       *cond;
+    natsMsg             *msg;
+    bool                closed;
+    natsStatus          closedSts;
+    bool                removed;
+    bool                pooled;
+
+} respInfo;
+
+// Used internally for testing and allow to alter/suppress an incoming message
+typedef void (*natsMsgFilter)(natsConnection *nc, natsMsg **msg, void* closure);
+
+struct __natsConnection
+{
+    natsMutex           *mu;
+    natsOptions         *opts;
+    natsSrv             *cur;
+    const char          *tlsName;
+
+    int                 refs;
+
+    natsSockCtx         sockCtx;
+
+    natsSrvPool         *srvPool;
+
+    natsBuffer          *pending;
+    bool                usePending;
+
+    natsBuffer          *bw;
+    natsBuffer          *scratch;
+
+    natsServerInfo      info;
+
+    int64_t             ssid;
+    natsHash            *subs;
+    natsMutex           *subsMu;
+
+    natsConnStatus      status;
+    bool                initc; // true if the connection is performing the initial connect
+    bool                ar;    // abort reconnect attempts
+    bool                rle;   // reconnect loop ended
+    natsStatus          err;
+    char                errStr[256];
+
+    natsParser          *ps;
+    natsTimer           *ptmr;
+    int                 pout;
+
+    natsPongList        pongs;
+
+    natsThread          *readLoopThread;
+
+    natsThread          *flusherThread;
+    natsCondition       *flusherCond;
+    bool                flusherSignaled;
+    bool                flusherStop;
+
+    natsThread          *reconnectThread;
+    int                 inReconnect;
+    natsCondition       *reconnectCond;
+
+    natsStatistics      stats;
+
+    natsThread          *drainThread;
+    int64_t             drainTimeout;
+    bool                dontSendInPlace;
+
+    // Set to true when owned by a Streaming connection,
+    // which will prevent user from calling Close and/or Destroy.
+    bool                stanOwned;
+
+    // New Request style
+    char                respId[NATS_MAX_REQ_ID_LEN+1];
+    int                 respIdPos;
+    int                 respIdVal;
+    char                *respSub;   // The wildcard subject
+    natsSubscription    *respMux;   // A single response subscription
+    natsStrHash         *respMap;   // Request map for the response msg
+    respInfo            **respPool;
+    int                 respPoolSize;
+    int                 respPoolIdx;
+
+    // For inboxes. We now support custom prefixes, so we can't rely
+    // on constants based on hardcoded "_INBOX." prefix.
+    const char          *inboxPfx;
+    int                 inboxPfxLen;
+    int                 reqIdOffset;
+
+    struct
+    {
+        bool            attached;
+        bool            writeAdded;
+        void            *buffer;
+        void            *data;
+    } el;
+
+    // Msg filters for testing.
+    // Protected by subsMu
+    natsMsgFilter       filter;
+    void                *filterClosure;
+
+    // Server version
+    struct
+    {
+        int             ma;
+        int             mi;
+        int             up;
+    } srvVersion;
+};
+
+//
+// Library
+//
+
+void
+natsSys_Init(void);
+
+void
+natsLib_Retain(void);
+
+void
+natsLib_Release(void);
+
+int64_t
+nats_setTargetTime(int64_t timeout);
+
+void
+nats_resetTimer(natsTimer *t, int64_t newInterval);
+
+void
+nats_stopTimer(natsTimer *t);
+
+// Returns the number of timers that have been created and not stopped.
+int
+nats_getTimersCount(void);
+
+// Returns the number of timers actually in the list. This should be
+// equal to nats_getTimersCount() or nats_getTimersCount() - 1 when a
+// timer thread is invoking a timer's callback.
+int
+nats_getTimersCountInList(void);
+
+natsStatus
+nats_postAsyncCbInfo(natsAsyncCbInfo *info);
+
+void
+nats_sslRegisterThreadForCleanup(void);
+
+natsStatus
+nats_sslInit(void);
+
+natsStatus
+natsLib_msgDeliveryPostControlMsg(natsSubscription *sub);
+
+natsStatus
+natsLib_msgDeliveryAssignWorker(natsSubscription *sub);
+
+bool
+natsLib_isLibHandlingMsgDeliveryByDefault(void);
+
+int64_t
+natsLib_defaultWriteDeadline(void);
+
+void
+natsLib_getMsgDeliveryPoolInfo(int *maxSize, int *size, int *idx, natsMsgDlvWorker ***workersArray);
+
+void
+nats_setNATSThreadKey(void);
+
+//
+// Threads
+//
+typedef void (*natsThreadCb)(void *arg);
+
+natsStatus
+natsThread_Create(natsThread **t, natsThreadCb cb, void *arg);
+
+bool
+natsThread_IsCurrent(natsThread *t);
+
+void
+natsThread_Join(natsThread *t);
+
+void
+natsThread_Detach(natsThread *t);
+
+void
+natsThread_Yield(void);
+
+void
+natsThread_Destroy(natsThread *t);
+
+natsStatus
+natsThreadLocal_CreateKey(natsThreadLocal *tl, void (*destructor)(void*));
+
+void*
+natsThreadLocal_Get(natsThreadLocal tl);
+
+#define natsThreadLocal_Set(k, v) natsThreadLocal_SetEx((k), (v), true)
+
+natsStatus
+natsThreadLocal_SetEx(natsThreadLocal tl, const void *value, bool setErr);
+
+void
+natsThreadLocal_DestroyKey(natsThreadLocal tl);
+
+bool
+nats_InitOnce(natsInitOnceType *control, natsInitOnceCb cb);
+
+
+//
+// Conditions
+//
+natsStatus
+natsCondition_Create(natsCondition **cond);
+
+void
+natsCondition_Wait(natsCondition *cond, natsMutex *mutex);
+
+natsStatus
+natsCondition_TimedWait(natsCondition *cond, natsMutex *mutex, int64_t timeout);
+
+natsStatus
+natsCondition_AbsoluteTimedWait(natsCondition *cond, natsMutex *mutex,
+                                int64_t absoluteTime);
+
+void
+natsCondition_Signal(natsCondition *cond);
+
+void
+natsCondition_Broadcast(natsCondition *cond);
+
+void
+natsCondition_Destroy(natsCondition *cond);
+
+//
+// Mutexes
+//
+natsStatus
+natsMutex_Create(natsMutex **newMutex);
+
+void
+natsMutex_Lock(natsMutex *m);
+
+bool
+natsMutex_TryLock(natsMutex *m);
+
+void
+natsMutex_Unlock(natsMutex *m);
+
+void
+natsMutex_Destroy(natsMutex *m);
+
+//
+// JetStream
+//
+void
+jsSub_free(jsSub *sub);
+
+natsStatus
+jsSub_deleteConsumer(natsSubscription *sub);
+
+void
+jsSub_deleteConsumerAfterDrain(natsSubscription *sub);
+
+natsStatus
+jsSub_trackSequences(jsSub *jsi, const char *reply);
+
+natsStatus
+jsSub_processSequenceMismatch(natsSubscription *sub, natsMsg *msg, bool *sm);
+
+char*
+jsSub_checkForFlowControlResponse(natsSubscription *sub);
+
+natsStatus
+jsSub_scheduleFlowControlResponse(jsSub *jsi, const char *reply);
+
+natsStatus
+jsSub_checkOrderedMsg(natsSubscription *sub, natsMsg *msg, bool *reset);
+
+natsStatus
+jsSub_resetOrderedConsumer(natsSubscription *sub, uint64_t sseq);
+
+bool
+natsMsg_isJSCtrl(natsMsg *msg, int *ctrlType);
+
+#endif /* NATSP_H_ */
diff --git a/src/natstime.c b/src/natstime.c
new file mode 100644 (file)
index 0000000..8e87d75
--- /dev/null
@@ -0,0 +1,87 @@
+// Copyright 2015-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "natsp.h"
+
+#ifdef _WIN32
+#include <sys/timeb.h>
+#endif
+#include <time.h>
+
+int64_t
+nats_Now(void)
+{
+#ifdef _WIN32
+    struct _timeb now;
+    _ftime_s(&now);
+    return (((int64_t)now.time) * 1000 + now.millitm);
+#elif defined CLOCK_REALTIME
+    struct timespec ts;
+    if (clock_gettime(CLOCK_REALTIME, &ts) != 0)
+        abort();
+    return ((int64_t)ts.tv_sec) * 1000 + (((int64_t)ts.tv_nsec) / 1000000);
+#else
+    struct timeval tv;
+    if (gettimeofday(&tv, NULL) != 0)
+        abort();
+    return ((int64_t)tv.tv_sec) * 1000 + (((int64_t)tv.tv_usec) / 1000);
+#endif
+}
+
+int64_t
+nats_NowInNanoSeconds(void)
+{
+#ifdef _WIN32
+    struct _timeb now;
+    _ftime_s(&now);
+    return (((int64_t)now.time) * 1000 + now.millitm) * 1000000L;
+#elif defined CLOCK_REALTIME
+    struct timespec ts;
+    if (clock_gettime(CLOCK_REALTIME, &ts) != 0)
+        abort();
+    return ((int64_t)ts.tv_sec) * 1000000000L + ((int64_t)ts.tv_nsec);
+#else
+    struct timeval tv;
+    if (gettimeofday(&tv, NULL) != 0)
+        abort();
+    return ((int64_t)tv.tv_sec) * 1000000000L + (((int64_t)tv.tv_usec) * 1000);
+#endif
+}
+
+void
+natsDeadline_Init(natsDeadline *deadline, int64_t timeout)
+{
+    deadline->active          = true;
+    deadline->absoluteTime    = nats_setTargetTime(timeout);
+}
+
+void
+natsDeadline_Clear(natsDeadline *deadline)
+{
+    deadline->active = false;
+}
+
+int
+natsDeadline_GetTimeout(natsDeadline *deadline)
+{
+    int timeout;
+
+    if (!(deadline->active))
+        return -1;
+
+    timeout = (int) (deadline->absoluteTime - nats_Now());
+    if (timeout < 0)
+        timeout = 0;
+
+    return timeout;
+}
diff --git a/src/natstime.h b/src/natstime.h
new file mode 100644 (file)
index 0000000..b7041d2
--- /dev/null
@@ -0,0 +1,37 @@
+// Copyright 2015-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+
+#ifndef NATSTIME_H_
+#define NATSTIME_H_
+
+#include "natsp.h"
+
+typedef struct __natsDeadline
+{
+    int64_t             absoluteTime;
+    bool                active;
+
+} natsDeadline;
+
+void
+natsDeadline_Init(natsDeadline *deadline, int64_t timeout);
+
+int
+natsDeadline_GetTimeout(natsDeadline *deadline);
+
+void
+natsDeadline_Clear(natsDeadline *deadline);
+
+
+#endif /* NATSTIME_H_ */
diff --git a/src/nkeys.c b/src/nkeys.c
new file mode 100644 (file)
index 0000000..3d636c9
--- /dev/null
@@ -0,0 +1,157 @@
+// Copyright 2019 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "natsp.h"
+#include "mem.h"
+#include "util.h"
+#include "crypto.h"
+#include "nkeys.h"
+
+// PREFIX_BYTE_SEED is the version byte used for encoded NATS Seeds
+#define PREFIX_BYTE_SEED    ((char) (18 << 3))  // Base32-encodes to 'S...'
+
+// PREFIX_BYTE_PRIVATE is the version byte used for encoded NATS Private keys
+#define PREFIX_BYTE_PRIVATE ((char) (15 << 3))  // Base32-encodes to 'P...'
+
+// PREFIX_BYTE_SERVER is the version byte used for encoded NATS Servers
+#define PREFIX_BYTE_SERVER ((char) (13 << 3))   // Base32-encodes to 'N...'
+
+// PREFIX_BYTE_CLUSTER is the version byte used for encoded NATS Clusters
+#define PREFIX_BYTE_CLUSTER ((char) (2 << 3))   // Base32-encodes to 'C...'
+
+// PREFIX_BYTE_ACCOUNT is the version byte used for encoded NATS Accounts
+#define PREFIX_BYTE_ACCOUNT ((char) 0)          // Base32-encodes to 'A...'
+
+// PREFIX_BYTE_USER is the version byte used for encoded NATS Users
+#define PREFIX_BYTE_USER    ((char) (20 << 3))  // Base32-encodes to 'U...'
+
+static uint16_t
+_getUInt16LittleEndian(char *src)
+{
+    uint16_t b0 = (uint16_t) (src[0] & 0xFF);
+    uint16_t b1 = (uint16_t) (src[1] & 0xFF);
+
+    return (b0 | b1<<8);
+}
+
+static bool
+_isValidPublicPrefixByte(char b)
+{
+    switch (b)
+    {
+        case PREFIX_BYTE_USER:
+        case PREFIX_BYTE_SERVER:
+        case PREFIX_BYTE_CLUSTER:
+        case PREFIX_BYTE_ACCOUNT:
+            return true;
+        default:
+            return false;
+    }
+}
+
+static natsStatus
+_decodeSeed(const char *seed, char *raw, int rawMax)
+{
+    natsStatus  s       = NATS_OK;
+    uint16_t    crc     = 0;
+    char        b1      = 0;
+    char        b2      = 0;
+    int         rawLen  = 0;
+
+    s = nats_Base32_DecodeString(seed, raw, rawMax, &rawLen);
+    if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    if (rawLen < 4)
+        return nats_setError(NATS_ERR, "%s", NKEYS_INVALID_ENCODED_KEY);
+
+    // Read the crc that is stored as the two last bytes
+    crc = _getUInt16LittleEndian((char*)(raw + rawLen - 2));
+
+    // ensure checksum is valid
+    if (!nats_CRC16_Validate((unsigned char*) raw, rawLen - 2, crc))
+        return nats_setError(NATS_ERR, "%s", NKEYS_INVALID_CHECKSUM);
+
+    // Need to do the reverse here to get back to internal representation.
+    b1 = raw[0] & 248;                          // 248 = 11111000
+    b2 = (raw[0]&7)<<5 | ((raw[1] & 248) >> 3); // 7 = 00000111
+
+    if (b1 != PREFIX_BYTE_SEED)
+        return nats_setError(NATS_ERR, "%s", NKEYS_INVALID_SEED);
+
+    if (!_isValidPublicPrefixByte(b2))
+        return nats_setError(NATS_ERR, "%s", NKEYS_INVALID_PREFIX);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsKeys_Sign(const char *encodedSeed, const unsigned char *input, int inputLen, unsigned char *signature)
+{
+    natsStatus      s       = NATS_OK;
+    char            *seed   = NULL;
+    int             seedLen = 0;
+
+    if ((input != NULL) && (inputLen == 0))
+        inputLen = (int) strlen((char*) input);
+
+    seedLen = (int)((strlen(encodedSeed) * 5) / 8);
+    seed = NATS_CALLOC(1, seedLen);
+    if (seed == NULL)
+        s = nats_setDefaultError(NATS_NO_MEMORY);
+    if (s == NATS_OK)
+        s = _decodeSeed(encodedSeed, seed, seedLen);
+    if (s == NATS_OK)
+    {
+        // The actual seed starts after the first 2 characters.
+        s = natsCrypto_Sign((const unsigned char*) (seed+2), input, inputLen, signature);
+    }
+    if (seed != NULL)
+    {
+        natsCrypto_Clear((void*) seed, seedLen);
+        NATS_FREE(seed);
+    }
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+nats_Sign(const char    *encodedSeed,
+          const char    *input,
+          unsigned char **signature,
+          int           *signatureLength)
+{
+    natsStatus      s;
+    unsigned char   sig[NATS_CRYPTO_SIGN_BYTES];
+
+    if (nats_IsStringEmpty(encodedSeed))
+        return nats_setError(NATS_INVALID_ARG, "%s", "seed cannot be empty");
+
+    if (nats_IsStringEmpty(input))
+        return nats_setError(NATS_INVALID_ARG, "%s", "input cannot be empty");
+
+    if ((signature == NULL) || (signatureLength == NULL))
+        return nats_setError(NATS_INVALID_ARG, "%s", "signature and/or signatureLength cannot be NULL");
+
+    s = natsKeys_Sign(encodedSeed, (const unsigned char*) input, (int) strlen(input), sig);
+    if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    *signature = (unsigned char*) NATS_MALLOC(NATS_CRYPTO_SIGN_BYTES);
+    if (*signature == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    memcpy(*signature, sig, NATS_CRYPTO_SIGN_BYTES);
+    *signatureLength = NATS_CRYPTO_SIGN_BYTES;
+    return NATS_OK;
+}
diff --git a/src/nkeys.h b/src/nkeys.h
new file mode 100644 (file)
index 0000000..153f878
--- /dev/null
@@ -0,0 +1,27 @@
+// Copyright 2019 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef NKEYS_H_
+#define NKEYS_H_
+
+#include "natsp.h"
+
+#define NKEYS_INVALID_ENCODED_KEY   "invalid encoded key"
+#define NKEYS_INVALID_CHECKSUM      "invalid checksum"
+#define NKEYS_INVALID_SEED          "invalid seed"
+#define NKEYS_INVALID_PREFIX        "invalid prefix byte"
+
+natsStatus
+natsKeys_Sign(const char *encodedSeed, const unsigned char *input, int inputLen, unsigned char *signature);
+
+#endif /* NKEYS_H_ */
diff --git a/src/nuid.c b/src/nuid.c
new file mode 100644 (file)
index 0000000..134784c
--- /dev/null
@@ -0,0 +1,282 @@
+// Copyright 2016-2021 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "natsp.h"
+
+// From https://en.wikipedia.org/wiki/Multiply-with-carry
+
+// CMWC working parts
+#define CMWC_CYCLE 4096         // as Marsaglia recommends
+#define CMWC_C_MAX 809430660    // as Marsaglia recommends
+static uint32_t Q[CMWC_CYCLE];
+static uint32_t carry = 362436;     // must be limited with CMWC_C_MAX (we will reinit it with seed)
+
+// Make 32 bit random number (some systems use 16 bit RAND_MAX)
+static uint32_t
+_rand32(void)
+{
+    uint32_t result = 0;
+    result = rand();
+    result <<= 16;
+    result |= rand();
+    return result;
+}
+
+// Init all engine parts with seed
+static void
+_initCMWC(unsigned int seed)
+{
+    int i;
+
+    for (i = 0; i < CMWC_CYCLE; i++)
+        Q[i] = _rand32();
+
+    do
+    {
+        carry = _rand32();
+    }
+    while (carry >= CMWC_C_MAX);
+}
+
+// CMWC engine
+static uint32_t
+_randCMWC(void)
+{
+    static uint32_t i = CMWC_CYCLE - 1;
+    uint64_t t = 0;
+    uint64_t a = 18782;         // as Marsaglia recommends
+    uint32_t r = 0xfffffffe;    // as Marsaglia recommends
+    uint32_t x = 0;
+
+    i = (i + 1) & (CMWC_CYCLE - 1);
+    t = a * Q[i] + carry;
+    carry = t >> 32;
+    x = (uint32_t) (t + carry);
+    if (x < carry)
+    {
+        x++;
+        carry++;
+    }
+
+    return (Q[i] = r - x);
+}
+
+static int64_t
+_rand64(int64_t maxValue)
+{
+    int64_t v;
+
+    v  = ((int64_t) _randCMWC() << 32);
+    v |= (int64_t) _randCMWC();
+
+    if (v < 0)
+        v = v * -1;
+
+    v = v % maxValue;
+
+    return v;
+}
+
+int64_t
+nats_Rand64(void)
+{
+    return _rand64(0x7FFFFFFFFFFFFFFF);
+}
+
+// A unique identifier generator that is high performance, very fast, and entropy pool friendly.
+//
+// NUID needs to be very fast to generate and truly unique, all while being entropy pool friendly.
+// We will use 12 bytes of crypto generated data (entropy draining), and 10 bytes of sequential data
+// that is started at a pseudo random number and increments with a pseudo-random increment.
+// Total is 22 bytes of base 36 ascii text :)
+
+#define NUID_PRE_LEN (12)
+#define NUID_SEQ_LEN (10)
+
+static const char       *digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+static const int        base    = 36;
+static const int64_t    maxPre  = 4738381338321616896L;
+static const int64_t    maxSeq  = 3656158440062976L;
+static const int64_t    minInc  = 33L;
+static const int64_t    maxInc  = 333L;
+static const int        totalLen= NUID_PRE_LEN + NUID_SEQ_LEN;
+
+typedef struct natsNUID
+{
+    char    pre[NUID_PRE_LEN];
+    int64_t seq;
+    int64_t inc;
+
+} natsNUID;
+
+typedef struct natsLockedNUID
+{
+    natsMutex   *mu;
+    natsNUID    nuid;
+
+} natsLockedNUID;
+
+// Global NUID
+static natsLockedNUID   globalNUID;
+
+static natsStatus
+_nextLong(int64_t *next, bool useCrypto, int64_t maxValue)
+{
+    natsStatus s = NATS_OK;
+
+    if (maxValue <= 0)
+        return nats_setError(NATS_INVALID_ARG,
+                             "Invalid argument for nextLong: %" PRId64 "",
+                             maxValue);
+#if defined(NATS_HAS_TLS)
+    if (useCrypto)
+    {
+        int64_t r = 0;
+
+        RAND_bytes((unsigned char*) &r, sizeof(int64_t));
+        if (r < 0)
+            r = r * -1;
+
+        *next = r;
+    }
+    else
+#endif
+        *next = _rand64(maxValue);
+
+    return s;
+}
+
+// Resets the sequential portion of the NUID.
+static natsStatus
+_resetSequential(natsNUID *nuid)
+{
+    natsStatus s;
+
+    s = _nextLong(&(nuid->seq), false, maxSeq);
+    if (s == NATS_OK)
+        s = _nextLong(&(nuid->inc), false, maxInc - minInc);
+    if (s == NATS_OK)
+        nuid->inc += minInc;
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+// Generate a new prefix from crypto rand.
+// This will drain entropy and will be called automatically when we exhaust the sequential
+static natsStatus
+_randomizePrefix(natsNUID *nuid)
+{
+    natsStatus  s;
+    int64_t     r = 0;
+
+    s = _nextLong(&r, true, maxPre);
+    if (s == NATS_OK)
+    {
+        int64_t l;
+        int     i = NUID_PRE_LEN;
+        for (l = r; i > 0; l /= base)
+        {
+            i--;
+            nuid->pre[i] = digits[(int) (l % base)];
+        }
+    }
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+void
+natsNUID_free(void)
+{
+    natsMutex_Destroy(globalNUID.mu);
+    globalNUID.mu = NULL;
+}
+
+// Seed sequential random with math/random and current time and generate crypto prefix.
+natsStatus
+natsNUID_init(void)
+{
+    natsStatus      s;
+    unsigned int    seed = (unsigned int) nats_NowInNanoSeconds();
+
+    memset(&globalNUID, 0, sizeof(natsLockedNUID));
+
+    srand(seed);
+    _initCMWC(seed);
+
+    s = natsMutex_Create(&(globalNUID.mu));
+    if (s == NATS_OK)
+        s = _resetSequential(&(globalNUID.nuid));
+    if (s == NATS_OK)
+        s = _randomizePrefix(&(globalNUID.nuid));
+
+    if (s != NATS_OK)
+        natsNUID_free();
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+// Generate the next NUID string.
+static natsStatus
+_nextNUID(natsNUID *nuid, char *buffer, int bufferLen)
+{
+    natsStatus s = NATS_OK;
+
+    // Check bufferLen is big enough
+    if (bufferLen <= totalLen)
+        return nats_setError(NATS_INSUFFICIENT_BUFFER, "Buffer should be at least %d bytes, it is only %d bytes", totalLen, bufferLen);
+
+    // Increment and capture.
+    nuid->seq += nuid->inc;
+    if (nuid->seq >= maxSeq)
+    {
+        s = _randomizePrefix(nuid);
+        if (s == NATS_OK)
+            s = _resetSequential(nuid);
+    }
+
+    if (s == NATS_OK)
+    {
+        int64_t l;
+        int     i;
+
+        // Copy prefix
+        memcpy(buffer, nuid->pre, NUID_PRE_LEN);
+
+        // copy in the seq in base36.
+        l = nuid->seq;
+        for (i = totalLen; i > NUID_PRE_LEN; l /= base)
+        {
+            i--;
+            buffer[i] = digits[(int) (l % base)];
+        }
+
+        buffer[totalLen] = '\0';
+    }
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+// Generate the next NUID string from the global locked NUID instance.
+natsStatus
+natsNUID_Next(char *buffer, int bufferLen)
+{
+    natsStatus s;
+
+    natsMutex_Lock(globalNUID.mu);
+
+    s = _nextNUID(&(globalNUID.nuid), buffer, bufferLen);
+
+    natsMutex_Unlock(globalNUID.mu);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
diff --git a/src/nuid.h b/src/nuid.h
new file mode 100644 (file)
index 0000000..a015a02
--- /dev/null
@@ -0,0 +1,35 @@
+// Copyright 2016-2021 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef NUID_H_
+#define NUID_H_
+
+#include "status.h"
+
+#define NUID_BUFFER_LEN (12 + 10)
+
+// Seed sequential random with math/random and current time and generate crypto prefix.
+natsStatus
+natsNUID_init(void);
+
+// Generate the next NUID string from the global locked NUID instance.
+natsStatus
+natsNUID_Next(char *buffer, int bufferLen);
+
+int64_t
+nats_Rand64(void);
+
+void
+natsNUID_free(void);
+
+#endif /* NUID_H_ */
diff --git a/src/opts.c b/src/opts.c
new file mode 100644 (file)
index 0000000..e95d2c2
--- /dev/null
@@ -0,0 +1,1556 @@
+// Copyright 2015-2021 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "natsp.h"
+
+#include <string.h>
+
+#include "mem.h"
+#include "opts.h"
+#include "util.h"
+#include "conn.h"
+
+natsStatus
+natsOptions_SetURL(natsOptions *opts, const char* url)
+{
+    natsStatus s = NATS_OK;
+
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    if (opts->url != NULL)
+    {
+        NATS_FREE(opts->url);
+        opts->url = NULL;
+    }
+
+    if (url != NULL)
+        s = nats_Trim(&(opts->url), url);
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static void
+_freeServers(natsOptions *opts)
+{
+    int i;
+
+    if ((opts->servers == NULL) || (opts->serversCount == 0))
+        return;
+
+    for (i = 0; i < opts->serversCount; i++)
+        NATS_FREE(opts->servers[i]);
+
+    NATS_FREE(opts->servers);
+
+    opts->servers       = NULL;
+    opts->serversCount  = 0;
+}
+
+natsStatus
+natsOptions_SetServers(natsOptions *opts, const char** servers, int serversCount)
+{
+    natsStatus  s = NATS_OK;
+    int         i;
+
+    LOCK_AND_CHECK_OPTIONS(opts,
+                           (((servers != NULL) && (serversCount <= 0))
+                            || ((servers == NULL) && (serversCount != 0))));
+
+    _freeServers(opts);
+
+    if (servers != NULL)
+    {
+        opts->servers = (char**) NATS_CALLOC(serversCount, sizeof(char*));
+        if (opts->servers == NULL)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+
+        for (i = 0; (s == NATS_OK) && (i < serversCount); i++)
+        {
+            s = nats_Trim(&(opts->servers[i]), servers[i]);
+            if (s == NATS_OK)
+                opts->serversCount++;
+        }
+    }
+
+    if (s != NATS_OK)
+        _freeServers(opts);
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsOptions_SetNoRandomize(natsOptions *opts, bool noRandomize)
+{
+    natsStatus  s = NATS_OK;
+
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    opts->noRandomize = noRandomize;
+
+    UNLOCK_OPTS(opts);
+
+    return s;
+}
+
+natsStatus
+natsOptions_SetTimeout(natsOptions *opts, int64_t timeout)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, (timeout < 0));
+
+    opts->timeout = timeout;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+
+natsStatus
+natsOptions_SetName(natsOptions *opts, const char *name)
+{
+    natsStatus  s = NATS_OK;
+
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    NATS_FREE(opts->name);
+    opts->name = NULL;
+    if (name != NULL)
+    {
+        opts->name = NATS_STRDUP(name);
+        if (opts->name == NULL)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+    }
+
+    UNLOCK_OPTS(opts);
+
+    return s;
+}
+
+natsStatus
+natsOptions_SetUserInfo(natsOptions *opts, const char *user, const char *password)
+{
+    natsStatus  s = NATS_OK;
+
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    NATS_FREE(opts->user);
+    opts->user= NULL;
+    NATS_FREE(opts->password);
+    opts->password = NULL;
+    if (user != NULL)
+    {
+        opts->user = NATS_STRDUP(user);
+        if (opts->user== NULL)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+    }
+    if ((s == NATS_OK) && (password != NULL))
+    {
+        opts->password = NATS_STRDUP(password);
+        if (opts->password == NULL)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+    }
+
+    UNLOCK_OPTS(opts);
+
+    return s;
+}
+
+natsStatus
+natsOptions_SetToken(natsOptions *opts, const char *token)
+{
+    natsStatus  s = NATS_OK;
+
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    if ((token != NULL) && (opts->tokenCb != NULL))
+        s = nats_setError(NATS_ILLEGAL_STATE, "%s", "Cannot set a token if a token handler has already been set");
+    else
+    {
+        NATS_FREE(opts->token);
+        opts->token = NULL;
+        if (token != NULL)
+        {
+            opts->token = NATS_STRDUP(token);
+            if (opts->token == NULL)
+                s = nats_setDefaultError(NATS_NO_MEMORY);
+        }
+    }
+
+    UNLOCK_OPTS(opts);
+
+    return s;
+}
+
+natsStatus
+natsOptions_SetTokenHandler(natsOptions *opts, natsTokenHandler tokenCb, void *closure)
+{
+    natsStatus  s = NATS_OK;
+
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    if ((tokenCb != NULL) && (opts->token != NULL))
+        s = nats_setError(NATS_ILLEGAL_STATE, "%s", "Cannot set a token handler if a token has already been set");
+    else
+    {
+        opts->tokenCb = tokenCb;
+        opts->tokenCbClosure = closure;
+    }
+
+    UNLOCK_OPTS(opts);
+
+    return s;
+}
+
+static void
+natsSSLCtx_release(natsSSLCtx *ctx)
+{
+    int refs;
+
+    if (ctx == NULL)
+        return;
+
+    natsMutex_Lock(ctx->lock);
+
+    refs = --(ctx->refs);
+
+    natsMutex_Unlock(ctx->lock);
+
+    if (refs == 0)
+    {
+        NATS_FREE(ctx->expectedHostname);
+        SSL_CTX_free(ctx->ctx);
+        natsMutex_Destroy(ctx->lock);
+        NATS_FREE(ctx);
+    }
+}
+
+static natsSSLCtx*
+natsSSLCtx_retain(natsSSLCtx *ctx)
+{
+    natsMutex_Lock(ctx->lock);
+    ctx->refs++;
+    natsMutex_Unlock(ctx->lock);
+
+    return ctx;
+}
+
+#if defined(NATS_HAS_TLS)
+
+static natsStatus
+_createSSLCtx(natsSSLCtx **newCtx)
+{
+    natsStatus  s    = NATS_OK;
+    natsSSLCtx  *ctx = NULL;
+
+    ctx = (natsSSLCtx*) NATS_CALLOC(1, sizeof(natsSSLCtx));
+    if (ctx == NULL)
+        s = nats_setDefaultError(NATS_NO_MEMORY);
+
+    if (s == NATS_OK)
+    {
+        ctx->refs = 1;
+
+        s = natsMutex_Create(&(ctx->lock));
+    }
+    if (s == NATS_OK)
+    {
+#if defined(NATS_USE_OPENSSL_1_1)
+        ctx->ctx = SSL_CTX_new(TLS_client_method());
+#else
+        ctx->ctx = SSL_CTX_new(TLSv1_2_client_method());
+#endif
+        if (ctx->ctx == NULL)
+            s = nats_setError(NATS_SSL_ERROR,
+                              "Unable to create SSL context: %s",
+                              NATS_SSL_ERR_REASON_STRING);
+    }
+
+    if (s == NATS_OK)
+    {
+        (void) SSL_CTX_set_mode(ctx->ctx, SSL_MODE_AUTO_RETRY);
+
+#if defined(NATS_USE_OPENSSL_1_1)
+        SSL_CTX_set_min_proto_version(ctx->ctx, TLS1_2_VERSION);
+#else
+        SSL_CTX_set_options(ctx->ctx, SSL_OP_NO_SSLv2);
+        SSL_CTX_set_options(ctx->ctx, SSL_OP_NO_SSLv3);
+#endif
+        SSL_CTX_set_default_verify_paths(ctx->ctx);
+
+        *newCtx = ctx;
+    }
+    else if (ctx != NULL)
+    {
+        natsSSLCtx_release(ctx);
+    }
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_getSSLCtx(natsOptions *opts)
+{
+    natsStatus s;
+
+    s = nats_sslInit();
+    if ((s == NATS_OK) && (opts->sslCtx != NULL))
+    {
+        bool createNew = false;
+
+        natsMutex_Lock(opts->sslCtx->lock);
+
+        // If this context is retained by a cloned natsOptions, we need to
+        // release it and create a new context.
+        if (opts->sslCtx->refs > 1)
+            createNew = true;
+
+        natsMutex_Unlock(opts->sslCtx->lock);
+
+        if (createNew)
+        {
+            natsSSLCtx_release(opts->sslCtx);
+            opts->sslCtx = NULL;
+        }
+        else
+        {
+            // We can use this ssl context.
+            return NATS_OK;
+        }
+    }
+
+    if (s == NATS_OK)
+        s = _createSSLCtx(&(opts->sslCtx));
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsOptions_SetSecure(natsOptions *opts, bool secure)
+{
+    natsStatus s = NATS_OK;
+
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    if (!secure && (opts->sslCtx != NULL))
+    {
+        natsSSLCtx_release(opts->sslCtx);
+        opts->sslCtx = NULL;
+    }
+    else if (secure && (opts->sslCtx == NULL))
+    {
+        s = _getSSLCtx(opts);
+    }
+
+    if (s == NATS_OK)
+        opts->secure = secure;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsOptions_LoadCATrustedCertificates(natsOptions *opts, const char *fileName)
+{
+    natsStatus s = NATS_OK;
+
+    LOCK_AND_CHECK_OPTIONS(opts, ((fileName == NULL) || (fileName[0] == '\0')));
+
+    s = _getSSLCtx(opts);
+    if (s == NATS_OK)
+    {
+        nats_sslRegisterThreadForCleanup();
+
+        if (SSL_CTX_load_verify_locations(opts->sslCtx->ctx, fileName, NULL) != 1)
+        {
+            s = nats_setError(NATS_SSL_ERROR,
+                              "Error loading trusted certificates '%s': %s",
+                              fileName,
+                              NATS_SSL_ERR_REASON_STRING);
+        }
+    }
+
+    UNLOCK_OPTS(opts);
+
+    return s;
+}
+
+natsStatus
+natsOptions_SetCATrustedCertificates(natsOptions *opts, const char *certs)
+{
+    natsStatus s = NATS_OK;
+
+    if (nats_IsStringEmpty(certs))
+    {
+        return nats_setError(NATS_INVALID_ARG, "%s",
+                             "CA certificates can't be NULL nor empty");
+    }
+
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    s = _getSSLCtx(opts);
+    if (s == NATS_OK)
+    {
+        BIO                 *bio  = NULL;
+        X509_STORE          *cts  = NULL;
+        STACK_OF(X509_INFO) *inf  = NULL;
+        int i;
+
+        nats_sslRegisterThreadForCleanup();
+
+        cts = SSL_CTX_get_cert_store(opts->sslCtx->ctx);
+        if (cts == NULL)
+        {
+            s = nats_setError(NATS_SSL_ERROR,
+                              "unable to get certificates store: %s",
+                              NATS_SSL_ERR_REASON_STRING);
+        }
+        if (s == NATS_OK)
+        {
+            bio = BIO_new_mem_buf((char*) certs, -1);
+            if (bio != NULL)
+                inf = PEM_X509_INFO_read_bio(bio, NULL, NULL, NULL);
+            if ((inf == NULL) || (sk_X509_INFO_num(inf) == 0))
+            {
+                s = nats_setError(NATS_SSL_ERROR,
+                                  "unable to get CA certificates: %s",
+                                  NATS_SSL_ERR_REASON_STRING);
+            }
+        }
+        for (i = 0; ((s == NATS_OK) && (i < (int)sk_X509_INFO_num(inf))); i++)
+        {
+            X509_INFO *itmp = sk_X509_INFO_value(inf, i);
+            if (itmp->x509)
+            {
+                if (X509_STORE_add_cert(cts, itmp->x509) != 1)
+                {
+                    s = nats_setError(NATS_SSL_ERROR,
+                                      "error adding CA certificates: %s",
+                                      NATS_SSL_ERR_REASON_STRING);
+                }
+            }
+            if ((s == NATS_OK) && (itmp->crl))
+            {
+                if (X509_STORE_add_crl(cts, itmp->crl) != 1)
+                {
+                    s = nats_setError(NATS_SSL_ERROR,
+                                      "error adding CA CRL: %s",
+                                      NATS_SSL_ERR_REASON_STRING);
+                }
+            }
+        }
+
+        if (inf != NULL)
+            sk_X509_INFO_pop_free(inf, X509_INFO_free);
+
+        if (bio != NULL)
+            BIO_free(bio);
+    }
+
+    UNLOCK_OPTS(opts);
+
+    return s;
+}
+
+natsStatus
+natsOptions_LoadCertificatesChain(natsOptions *opts,
+                                  const char *certFileName,
+                                  const char *keyFileName)
+{
+    natsStatus s = NATS_OK;
+
+    if ((certFileName == NULL) || (certFileName[0] == '\0')
+        || (keyFileName == NULL) || (keyFileName[0] == '\0'))
+    {
+        return nats_setError(NATS_INVALID_ARG, "%s",
+                             "certificate and key file names can't be NULL nor empty");
+    }
+
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    s = _getSSLCtx(opts);
+    if (s == NATS_OK)
+    {
+        nats_sslRegisterThreadForCleanup();
+
+        if (SSL_CTX_use_certificate_chain_file(opts->sslCtx->ctx, certFileName) != 1)
+        {
+            s = nats_setError(NATS_SSL_ERROR,
+                              "Error loading certificate chain '%s': %s",
+                              certFileName,
+                              NATS_SSL_ERR_REASON_STRING);
+        }
+    }
+    if (s == NATS_OK)
+    {
+        if (SSL_CTX_use_PrivateKey_file(opts->sslCtx->ctx, keyFileName, SSL_FILETYPE_PEM) != 1)
+        {
+            s = nats_setError(NATS_SSL_ERROR,
+                              "Error loading private key '%s': %s",
+                              keyFileName,
+                              NATS_SSL_ERR_REASON_STRING);
+        }
+    }
+
+    UNLOCK_OPTS(opts);
+
+    return s;
+}
+
+natsStatus
+natsOptions_SetCertificatesChain(natsOptions *opts, const char *certStr, const char *keyStr)
+{
+    natsStatus  s = NATS_OK;
+
+    if (nats_IsStringEmpty(certStr) || nats_IsStringEmpty(keyStr))
+    {
+        return nats_setError(NATS_INVALID_ARG, "%s",
+                             "certificate and key can't be NULL nor empty");
+    }
+
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    s = _getSSLCtx(opts);
+    if (s == NATS_OK)
+    {
+        X509 *cert = NULL;
+        BIO  *bio  = NULL;
+
+        nats_sslRegisterThreadForCleanup();
+
+        bio = BIO_new_mem_buf((char*) certStr, -1);
+        if ((bio == NULL) || ((cert = PEM_read_bio_X509(bio, NULL, 0, NULL)) == NULL))
+        {
+            s = nats_setError(NATS_SSL_ERROR,
+                              "Error creating certificate: %s",
+                              NATS_SSL_ERR_REASON_STRING);
+        }
+        if ((s == NATS_OK) && (SSL_CTX_use_certificate(opts->sslCtx->ctx, cert) != 1))
+        {
+            s = nats_setError(NATS_SSL_ERROR,
+                              "Error using certificate: %s",
+                              NATS_SSL_ERR_REASON_STRING);
+        }
+        if (cert != NULL)
+            X509_free(cert);
+        if (bio != NULL)
+            BIO_free(bio);
+    }
+    if (s == NATS_OK)
+    {
+        BIO         *bio  = NULL;
+        EVP_PKEY    *pkey = NULL;
+
+        bio = BIO_new_mem_buf((char*) keyStr, -1);
+        if ((bio == NULL) || ((pkey = PEM_read_bio_PrivateKey(bio, NULL, 0, NULL)) == NULL))
+        {
+            s = nats_setError(NATS_SSL_ERROR,
+                              "Error creating key: %s",
+                              NATS_SSL_ERR_REASON_STRING);
+        }
+
+        if ((s == NATS_OK) && (SSL_CTX_use_PrivateKey(opts->sslCtx->ctx, pkey) != 1))
+        {
+            s = nats_setError(NATS_SSL_ERROR,
+                              "Error using private key: %s",
+                              NATS_SSL_ERR_REASON_STRING);
+        }
+        if (pkey != NULL)
+            EVP_PKEY_free(pkey);
+        if (bio != NULL)
+            BIO_free(bio);
+    }
+
+    UNLOCK_OPTS(opts);
+
+    return s;
+}
+
+natsStatus
+natsOptions_SetCiphers(natsOptions *opts, const char *ciphers)
+{
+    natsStatus s = NATS_OK;
+
+    LOCK_AND_CHECK_OPTIONS(opts, ((ciphers == NULL) || (ciphers[0] == '\0')));
+
+    s = _getSSLCtx(opts);
+    if (s == NATS_OK)
+    {
+        nats_sslRegisterThreadForCleanup();
+
+        if (SSL_CTX_set_cipher_list(opts->sslCtx->ctx, ciphers) != 1)
+        {
+            s = nats_setError(NATS_SSL_ERROR,
+                              "Error setting ciphers '%s': %s",
+                              ciphers,
+                              NATS_SSL_ERR_REASON_STRING);
+        }
+    }
+
+    UNLOCK_OPTS(opts);
+
+    return s;
+}
+
+natsStatus
+natsOptions_SetCipherSuites(natsOptions *opts, const char *ciphers)
+{
+    natsStatus s = NATS_OK;
+
+#if defined(NATS_USE_OPENSSL_1_1)
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    s = _getSSLCtx(opts);
+    if (s == NATS_OK)
+    {
+        nats_sslRegisterThreadForCleanup();
+
+        if (SSL_CTX_set_ciphersuites(opts->sslCtx->ctx, ciphers) != 1)
+        {
+            s = nats_setError(NATS_SSL_ERROR,
+                              "Error setting ciphers '%s': %s",
+                              ciphers,
+                              NATS_SSL_ERR_REASON_STRING);
+        }
+    }
+
+    UNLOCK_OPTS(opts);
+#else
+    s = nats_setError(NATS_ERR, "%s", "Setting TLSv1.3 ciphersuites requires OpenSSL 1.1+");
+#endif
+
+    return s;
+}
+
+natsStatus
+natsOptions_SetExpectedHostname(natsOptions *opts, const char *hostname)
+{
+    natsStatus s = NATS_OK;
+
+    // Allow hostname to be empty in order to reset...
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    s = _getSSLCtx(opts);
+    if (s == NATS_OK)
+    {
+        NATS_FREE(opts->sslCtx->expectedHostname);
+        opts->sslCtx->expectedHostname = NULL;
+
+        if (hostname != NULL)
+        {
+            opts->sslCtx->expectedHostname = NATS_STRDUP(hostname);
+            if (opts->sslCtx->expectedHostname == NULL)
+            {
+                s = nats_setDefaultError(NATS_NO_MEMORY);
+            }
+        }
+    }
+
+    UNLOCK_OPTS(opts);
+
+    return s;
+}
+
+natsStatus
+natsOptions_SkipServerVerification(natsOptions *opts, bool skip)
+{
+    natsStatus s = NATS_OK;
+
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    s = _getSSLCtx(opts);
+    if (s == NATS_OK)
+        opts->sslCtx->skipVerify = skip;
+
+    UNLOCK_OPTS(opts);
+
+    return s;
+}
+
+#else
+
+natsStatus
+natsOptions_SetSecure(natsOptions *opts, bool secure)
+{
+    return nats_setError(NATS_ILLEGAL_STATE, "%s", NO_SSL_ERR);
+}
+
+natsStatus
+natsOptions_LoadCATrustedCertificates(natsOptions *opts, const char *fileName)
+{
+    return nats_setError(NATS_ILLEGAL_STATE, "%s", NO_SSL_ERR);
+}
+
+natsStatus
+natsOptions_SetCATrustedCertificates(natsOptions *opts, const char *certificates)
+{
+    return nats_setError(NATS_ILLEGAL_STATE, "%s", NO_SSL_ERR);
+}
+
+natsStatus
+natsOptions_LoadCertificatesChain(natsOptions *opts,
+                                  const char *certFileName,
+                                  const char *keyFileName)
+{
+    return nats_setError(NATS_ILLEGAL_STATE, "%s", NO_SSL_ERR);
+}
+
+natsStatus
+natsOptions_SetCertificatesChain(natsOptions *opts, const char *certStr, const char *keyStr)
+{
+    return nats_setError(NATS_ILLEGAL_STATE, "%s", NO_SSL_ERR);
+}
+
+natsStatus
+natsOptions_SetCiphers(natsOptions *opts, const char *ciphers)
+{
+    return nats_setError(NATS_ILLEGAL_STATE, "%s", NO_SSL_ERR);
+}
+
+natsStatus
+natsOptions_SetExpectedHostname(natsOptions *opts, const char *hostname)
+{
+    return nats_setError(NATS_ILLEGAL_STATE, "%s", NO_SSL_ERR);
+}
+
+natsStatus
+natsOptions_SkipServerVerification(natsOptions *opts, bool skip)
+{
+    return nats_setError(NATS_ILLEGAL_STATE, "%s", NO_SSL_ERR);
+}
+
+#endif
+
+natsStatus
+natsOptions_SetVerbose(natsOptions *opts, bool verbose)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    opts->verbose = verbose;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsOptions_SetPedantic(natsOptions *opts, bool pedantic)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    opts->pedantic = pedantic;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsOptions_SetPingInterval(natsOptions *opts, int64_t interval)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    opts->pingInterval = interval;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsOptions_SetMaxPingsOut(natsOptions *opts, int maxPignsOut)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    opts->maxPingsOut = maxPignsOut;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsOptions_SetIOBufSize(natsOptions *opts, int ioBufSize)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, (ioBufSize < 0));
+
+    opts->ioBufSize = ioBufSize;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsOptions_SetAllowReconnect(natsOptions *opts, bool allow)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    opts->allowReconnect = allow;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsOptions_SetMaxReconnect(natsOptions *opts, int maxReconnect)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    opts->maxReconnect = maxReconnect;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsOptions_SetReconnectWait(natsOptions *opts, int64_t reconnectWait)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, (reconnectWait < 0));
+
+    opts->reconnectWait = reconnectWait;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsOptions_SetReconnectJitter(natsOptions *opts, int64_t jitter, int64_t jitterTLS)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, ((jitter < 0) || (jitterTLS < 0)));
+
+    opts->reconnectJitter    = jitter;
+    opts->reconnectJitterTLS = jitterTLS;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsOptions_SetCustomReconnectDelay(natsOptions *opts,
+                                    natsCustomReconnectDelayHandler cb,
+                                    void *closure)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    opts->customReconnectDelayCB        = cb;
+    opts->customReconnectDelayCBClosure = closure;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsOptions_SetReconnectBufSize(natsOptions *opts, int reconnectBufSize)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, (reconnectBufSize < 0));
+
+    opts->reconnectBufSize = reconnectBufSize;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsOptions_SetMaxPendingMsgs(natsOptions *opts, int maxPending)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, (maxPending <= 0));
+
+    opts->maxPendingMsgs = maxPending;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsOptions_SetErrorHandler(natsOptions *opts, natsErrHandler errHandler,
+                            void *closure)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    opts->asyncErrCb = errHandler;
+    opts->asyncErrCbClosure = closure;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsOptions_SetClosedCB(natsOptions *opts, natsConnectionHandler closedCb,
+                        void *closure)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    opts->closedCb = closedCb;
+    opts->closedCbClosure = closure;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsOptions_SetDisconnectedCB(natsOptions *opts,
+                              natsConnectionHandler disconnectedCb,
+                              void *closure)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    opts->disconnectedCb = disconnectedCb;
+    opts->disconnectedCbClosure = closure;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsOptions_SetReconnectedCB(natsOptions *opts,
+                             natsConnectionHandler reconnectedCb,
+                             void *closure)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    opts->reconnectedCb = reconnectedCb;
+    opts->reconnectedCbClosure = closure;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsOptions_SetDiscoveredServersCB(natsOptions *opts,
+                                   natsConnectionHandler discoveredServersCb,
+                                   void *closure)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    opts->discoveredServersCb = discoveredServersCb;
+    opts->discoveredServersClosure = closure;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsOptions_SetIgnoreDiscoveredServers(natsOptions *opts, bool ignore)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    opts->ignoreDiscoveredServers = ignore;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsOptions_SetLameDuckModeCB(natsOptions *opts,
+                              natsConnectionHandler lameDuckCb,
+                              void *closure)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    opts->lameDuckCb = lameDuckCb;
+    opts->lameDuckClosure = closure;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsOptions_SetEventLoop(natsOptions *opts,
+                         void *loop,
+                         natsEvLoop_Attach          attachCb,
+                         natsEvLoop_ReadAddRemove   readCb,
+                         natsEvLoop_WriteAddRemove  writeCb,
+                         natsEvLoop_Detach          detachCb)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, (loop == NULL)
+                                 || (attachCb == NULL)
+                                 || (readCb == NULL)
+                                 || (writeCb == NULL)
+                                 || (detachCb == NULL));
+
+    opts->evLoop        = loop;
+    opts->evCbs.attach  = attachCb;
+    opts->evCbs.read    = readCb;
+    opts->evCbs.write   = writeCb;
+    opts->evCbs.detach  = detachCb;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsOptions_UseGlobalMessageDelivery(natsOptions *opts, bool global)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    // Sets if the subscriptions created from the connection will
+    // create their own delivery thread or use the one(s) from
+    // the library.
+    opts->libMsgDelivery = global;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsOptions_IPResolutionOrder(natsOptions *opts, int order)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, ((order != 0)
+                                    && (order != 4)
+                                    && (order != 6)
+                                    && (order != 46)
+                                    && (order != 64)));
+
+    opts->orderIP = order;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsOptions_SetSendAsap(natsOptions *opts, bool sendAsap)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+    opts->sendAsap = sendAsap;
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsOptions_SetNoEcho(natsOptions *opts, bool noEcho)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+    opts->noEcho = noEcho;
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsOptions_SetRetryOnFailedConnect(natsOptions *opts, bool retry,
+        natsConnectionHandler connectedCb, void *closure)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+    opts->retryOnFailedConnect = retry;
+    if (!retry)
+    {
+        opts->connectedCb = NULL;
+        opts->connectedCbClosure = NULL;
+    }
+    else
+    {
+        opts->connectedCb = connectedCb;
+        opts->connectedCbClosure = closure;
+    }
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsOptions_UseOldRequestStyle(natsOptions *opts, bool useOldStype)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+    opts->useOldRequestStyle = useOldStype;
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsOptions_SetFailRequestsOnDisconnect(natsOptions *opts, bool failRequests)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+    opts->failRequestsOnDisconnect = failRequests;
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+static void
+_freeUserCreds(userCreds *uc)
+{
+    if (uc == NULL)
+        return;
+
+    NATS_FREE(uc->userOrChainedFile);
+    NATS_FREE(uc->seedFile);
+    NATS_FREE(uc);
+}
+
+static natsStatus
+_createUserCreds(userCreds **puc, bool onlySeedFile, const char *uocf, const char *sf)
+{
+    natsStatus  s   = NATS_OK;
+    userCreds   *uc = NULL;
+
+    uc = NATS_CALLOC(1, sizeof(userCreds));
+    if (uc == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    if (!onlySeedFile)
+    {
+        uc->userOrChainedFile = NATS_STRDUP(uocf);
+        if (uc->userOrChainedFile == NULL)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+    }
+    if ((s == NATS_OK) && sf != NULL)
+    {
+        uc->seedFile = NATS_STRDUP(sf);
+        if (uc->seedFile == NULL)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+    }
+    if (s != NATS_OK)
+        _freeUserCreds(uc);
+    else
+        *puc = uc;
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsOptions_SetUserCredentialsFromFiles(natsOptions *opts, const char *userOrChainedFile, const char *seedFile)
+{
+    natsStatus  s   = NATS_OK;
+    userCreds   *uc = NULL;
+
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    // Both files can be NULL (to unset), but if seeFile can't
+    // be set if userOrChainedFile is not.
+    if (nats_IsStringEmpty(userOrChainedFile) && !nats_IsStringEmpty(seedFile))
+    {
+        UNLOCK_OPTS(opts);
+        return nats_setError(NATS_INVALID_ARG, "%s", "user or chained file need to be specified");
+    }
+
+    if (!nats_IsStringEmpty(userOrChainedFile))
+    {
+        s = _createUserCreds(&uc, false, userOrChainedFile, seedFile);
+        if (s != NATS_OK)
+        {
+            UNLOCK_OPTS(opts);
+            return NATS_UPDATE_ERR_STACK(s);
+        }
+    }
+
+    // Free previous object
+    _freeUserCreds(opts->userCreds);
+    // Set to new one (possibly NULL)
+    opts->userCreds = uc;
+
+    if (uc != NULL)
+    {
+        opts->userJWTHandler = natsConn_userFromFile;
+        opts->userJWTClosure = (void*) uc;
+
+        opts->sigHandler = natsConn_signatureHandler;
+        opts->sigClosure = (void*) uc;
+
+        // NKey and UserCreds are mutually exclusive.
+        if (opts->nkey != NULL)
+        {
+            NATS_FREE(opts->nkey);
+            opts->nkey = NULL;
+        }
+    }
+    else
+    {
+        opts->userJWTHandler = NULL;
+        opts->userJWTClosure = NULL;
+
+        opts->sigHandler = NULL;
+        opts->sigClosure = NULL;
+    }
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsOptions_SetUserCredentialsCallbacks(natsOptions *opts,
+                                        natsUserJWTHandler      ujwtCB,
+                                        void                    *ujwtClosure,
+                                        natsSignatureHandler    sigCB,
+                                        void                    *sigClosure)
+{
+    // Callbacks can all be NULL (to unset), however, if one is set,
+    // the other must be.
+    LOCK_AND_CHECK_OPTIONS(opts,
+            (((ujwtCB != NULL) && (sigCB == NULL)) ||
+                    ((ujwtCB == NULL) && (sigCB != NULL))));
+
+    _freeUserCreds(opts->userCreds);
+    opts->userCreds = NULL;
+
+    opts->userJWTHandler = ujwtCB;
+    opts->userJWTClosure = ujwtClosure;
+
+    opts->sigHandler = sigCB;
+    opts->sigClosure = sigClosure;
+
+    // If setting callbacks and there is an NKey, erase it
+    // (NKey and UserCreds are mutually exclusive).
+    if ((ujwtCB != NULL) && (opts->nkey != NULL))
+    {
+        NATS_FREE(opts->nkey);
+        opts->nkey = NULL;
+    }
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsOptions_SetNKey(natsOptions             *opts,
+                    const char              *pubKey,
+                    natsSignatureHandler    sigCB,
+                    void                    *sigClosure)
+{
+    char        *nk = NULL;
+
+    // If pubKey is not empty, then signature must be specified
+    LOCK_AND_CHECK_OPTIONS(opts,
+            (!nats_IsStringEmpty(pubKey) && (sigCB == NULL)));
+
+    if (!nats_IsStringEmpty(pubKey))
+    {
+        nk = NATS_STRDUP(pubKey);
+        if (nk == NULL)
+        {
+            UNLOCK_OPTS(opts);
+            return nats_setDefaultError(NATS_NO_MEMORY);
+        }
+    }
+
+    // Free previous value
+    NATS_FREE(opts->nkey);
+
+    // Set new values
+    opts->nkey       = nk;
+    opts->sigHandler = sigCB;
+    opts->sigClosure = sigClosure;
+
+    // If we set an NKey, make sure that userJWT is unset
+    // since the two are mutually exclusive.
+    if (nk != NULL)
+    {
+        if (opts->userCreds != NULL)
+        {
+            _freeUserCreds(opts->userCreds);
+            opts->userCreds = NULL;
+        }
+        opts->userJWTHandler = NULL;
+        opts->userJWTClosure = NULL;
+    }
+    UNLOCK_OPTS(opts);
+    return NATS_OK;
+}
+
+natsStatus
+natsOptions_SetNKeyFromSeed(natsOptions *opts,
+                            const char  *pubKey,
+                            const char  *seedFile)
+{
+    natsStatus  s;
+    char        *nk = NULL;
+    userCreds   *uc = NULL;
+
+    LOCK_AND_CHECK_OPTIONS(opts,
+        (!nats_IsStringEmpty(pubKey) && nats_IsStringEmpty(seedFile)));
+
+    if (!nats_IsStringEmpty(pubKey))
+    {
+        nk = NATS_STRDUP(pubKey);
+        if (nk == NULL)
+        {
+            UNLOCK_OPTS(opts);
+            return nats_setDefaultError(NATS_NO_MEMORY);
+        }
+        s = _createUserCreds(&uc, true, NULL, seedFile);
+        if (s != NATS_OK)
+        {
+            NATS_FREE(nk);
+            UNLOCK_OPTS(opts);
+            return NATS_UPDATE_ERR_STACK(s);
+        }
+    }
+
+    // Free previous values
+    NATS_FREE(opts->nkey);
+    _freeUserCreds(opts->userCreds);
+
+    // Set new values
+    opts->nkey       = nk;
+    opts->sigHandler = (nk == NULL ? NULL : natsConn_signatureHandler);
+    opts->sigClosure = (nk == NULL ? NULL : (void*) uc);
+    opts->userCreds  = (nk == NULL ? NULL : uc);
+    // NKey and JWT mutually exclusive
+    opts->userJWTHandler = NULL;
+    opts->userJWTClosure = NULL;
+
+    UNLOCK_OPTS(opts);
+    return NATS_OK;
+}
+
+natsStatus
+natsOptions_SetWriteDeadline(natsOptions *opts, int64_t deadline)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, (deadline < 0));
+
+    opts->writeDeadline = deadline;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsOptions_DisableNoResponders(natsOptions *opts, bool disabled)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    opts->disableNoResponders = disabled;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+static natsStatus
+_setCustomInboxPrefix(natsOptions *opts, const char *inboxPrefix, bool check)
+{
+    natsStatus s = NATS_OK;
+
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    NATS_FREE(opts->inboxPfx);
+    opts->inboxPfx = NULL;
+
+    if (!nats_IsStringEmpty(inboxPrefix))
+    {
+        // If not called from clone(), we need to check the validity of the
+        // inbox prefix.
+        if (check && !nats_IsSubjectValid(inboxPrefix, false))
+            s = nats_setError(NATS_INVALID_ARG, "Invalid inbox prefix '%s'", inboxPrefix);
+
+        if (s == NATS_OK)
+        {
+            // If invoked from user, there will not be the last '.', which
+            // we will add here.
+            if (check)
+            {
+                if (nats_asprintf(&opts->inboxPfx, "%s.", inboxPrefix) < 0)
+                    s = nats_setDefaultError(NATS_NO_MEMORY);
+            }
+            else
+            {
+                // We are invoked from clone(), simply duplicate the string.
+                DUP_STRING(s, opts->inboxPfx, inboxPrefix);
+            }
+        }
+    }
+
+    UNLOCK_OPTS(opts);
+
+    return s;
+}
+
+natsStatus
+natsOptions_SetCustomInboxPrefix(natsOptions *opts, const char *inboxPrefix)
+{
+    natsStatus s = _setCustomInboxPrefix(opts, inboxPrefix, true);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static void
+_freeOptions(natsOptions *opts)
+{
+    if (opts == NULL)
+        return;
+
+    NATS_FREE(opts->url);
+    NATS_FREE(opts->name);
+    _freeServers(opts);
+    NATS_FREE(opts->user);
+    NATS_FREE(opts->password);
+    NATS_FREE(opts->token);
+    NATS_FREE(opts->nkey);
+    natsSSLCtx_release(opts->sslCtx);
+    _freeUserCreds(opts->userCreds);
+    NATS_FREE(opts->inboxPfx);
+    natsMutex_Destroy(opts->mu);
+    NATS_FREE(opts);
+}
+
+natsStatus
+natsOptions_Create(natsOptions **newOpts)
+{
+    natsStatus  s;
+    natsOptions *opts = NULL;
+
+    // Ensure the library is loaded
+    s = nats_Open(-1);
+    if (s != NATS_OK)
+        return s;
+
+    opts = (natsOptions*) NATS_CALLOC(1, sizeof(natsOptions));
+    if (opts == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    if (natsMutex_Create(&(opts->mu)) != NATS_OK)
+    {
+        NATS_FREE(opts);
+        return NATS_UPDATE_ERR_STACK(NATS_NO_MEMORY);
+    }
+
+    opts->allowReconnect        = true;
+    opts->secure                = false;
+    opts->maxReconnect          = NATS_OPTS_DEFAULT_MAX_RECONNECT;
+    opts->reconnectWait         = NATS_OPTS_DEFAULT_RECONNECT_WAIT;
+    opts->pingInterval          = NATS_OPTS_DEFAULT_PING_INTERVAL;
+    opts->maxPingsOut           = NATS_OPTS_DEFAULT_MAX_PING_OUT;
+    opts->ioBufSize             = NATS_OPTS_DEFAULT_IO_BUF_SIZE;
+    opts->maxPendingMsgs        = NATS_OPTS_DEFAULT_MAX_PENDING_MSGS;
+    opts->timeout               = NATS_OPTS_DEFAULT_TIMEOUT;
+    opts->libMsgDelivery        = natsLib_isLibHandlingMsgDeliveryByDefault();
+    opts->writeDeadline         = natsLib_defaultWriteDeadline();
+    opts->reconnectBufSize      = NATS_OPTS_DEFAULT_RECONNECT_BUF_SIZE;
+    opts->reconnectJitter       = NATS_OPTS_DEFAULT_RECONNECT_JITTER;
+    opts->reconnectJitterTLS    = NATS_OPTS_DEFAULT_RECONNECT_JITTER_TLS;
+
+    *newOpts = opts;
+
+    return NATS_OK;
+}
+
+natsOptions*
+natsOptions_clone(natsOptions *opts)
+{
+    natsStatus  s       = NATS_OK;
+    natsOptions *cloned = NULL;
+    int         muSize;
+
+    if ((s = natsOptions_Create(&cloned)) != NATS_OK)
+    {
+        NATS_UPDATE_ERR_STACK(s);
+        return NULL;
+    }
+
+    natsMutex_Lock(opts->mu);
+
+    muSize = sizeof(cloned->mu);
+
+    // Make a blind copy first...
+    memcpy((char*)cloned + muSize, (char*)opts + muSize,
+           sizeof(natsOptions) - muSize);
+
+    // Then remove all pointers, so that if we fail while
+    // strduping them, and free the cloned, we don't free the strings
+    // from the original.
+    cloned->name    = NULL;
+    cloned->servers = NULL;
+    cloned->url     = NULL;
+    cloned->sslCtx  = NULL;
+    cloned->user    = NULL;
+    cloned->password= NULL;
+    cloned->token   = NULL;
+    cloned->nkey    = NULL;
+    cloned->userCreds = NULL;
+    cloned->inboxPfx  = NULL;
+
+    // Also, set the number of servers count to 0, until we update
+    // it (if necessary) when calling SetServers.
+    cloned->serversCount = 0;
+
+    if (opts->name != NULL)
+        s = natsOptions_SetName(cloned, opts->name);
+
+    if ((s == NATS_OK) && (opts->url != NULL))
+        s = natsOptions_SetURL(cloned, opts->url);
+
+    if ((s == NATS_OK) && (opts->servers != NULL))
+        s = natsOptions_SetServers(cloned,
+                                   (const char**)opts->servers,
+                                   opts->serversCount);
+
+    if ((s == NATS_OK) && (opts->user != NULL))
+        s = natsOptions_SetUserInfo(cloned, opts->user, opts->password);
+
+    if ((s == NATS_OK) && (opts->token != NULL))
+        s = natsOptions_SetToken(cloned, opts->token);
+
+    if ((s == NATS_OK) && (opts->sslCtx != NULL))
+        cloned->sslCtx = natsSSLCtx_retain(opts->sslCtx);
+
+    if ((s == NATS_OK) && (opts->nkey != NULL))
+    {
+        if (opts->userCreds != NULL)
+            s = natsOptions_SetNKeyFromSeed(cloned, opts->nkey, opts->userCreds->seedFile);
+        else
+            s = natsOptions_SetNKey(cloned, opts->nkey, opts->sigHandler, opts->sigClosure);
+    }
+    else if ((s == NATS_OK) && (opts->userCreds != NULL))
+    {
+        s = natsOptions_SetUserCredentialsFromFiles(cloned,
+                                                    opts->userCreds->userOrChainedFile,
+                                                    opts->userCreds->seedFile);
+    }
+    if ((s == NATS_OK) && (opts->inboxPfx != NULL))
+        s = _setCustomInboxPrefix(cloned, opts->inboxPfx, false);
+
+    if (s != NATS_OK)
+    {
+        _freeOptions(cloned);
+        cloned = NULL;
+        NATS_UPDATE_ERR_STACK(s);
+    }
+
+    natsMutex_Unlock(opts->mu);
+
+    return cloned;
+}
+
+void
+natsOptions_Destroy(natsOptions *opts)
+{
+    if (opts == NULL)
+        return;
+
+    _freeOptions(opts);
+}
diff --git a/src/opts.h b/src/opts.h
new file mode 100644 (file)
index 0000000..3ee87e3
--- /dev/null
@@ -0,0 +1,41 @@
+// Copyright 2015-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef OPTS_H_
+#define OPTS_H_
+
+#include "natsp.h"
+
+#define LOCK_AND_CHECK_OPTIONS(o, c) \
+    if (((o) == NULL) || ((c))) \
+        return nats_setDefaultError(NATS_INVALID_ARG); \
+    natsMutex_Lock((o)->mu);
+
+#define UNLOCK_OPTS(o) natsMutex_Unlock((o)->mu)
+
+
+#define NATS_OPTS_DEFAULT_MAX_RECONNECT         (60)
+#define NATS_OPTS_DEFAULT_TIMEOUT               (2 * 1000)          // 2 seconds
+#define NATS_OPTS_DEFAULT_RECONNECT_WAIT        (2 * 1000)          // 2 seconds
+#define NATS_OPTS_DEFAULT_PING_INTERVAL         (2 * 60 * 1000)     // 2 minutes
+#define NATS_OPTS_DEFAULT_MAX_PING_OUT          (2)
+#define NATS_OPTS_DEFAULT_IO_BUF_SIZE           (32 * 1024)         // 32 KB
+#define NATS_OPTS_DEFAULT_MAX_PENDING_MSGS      (65536)
+#define NATS_OPTS_DEFAULT_RECONNECT_BUF_SIZE    (8 * 1024 * 1024)   // 8 MB
+#define NATS_OPTS_DEFAULT_RECONNECT_JITTER      (100)               // 100 ms
+#define NATS_OPTS_DEFAULT_RECONNECT_JITTER_TLS  (1000)              // 1 second
+
+natsOptions*
+natsOptions_clone(natsOptions *opts);
+
+#endif /* OPTS_H_ */
diff --git a/src/parser.c b/src/parser.c
new file mode 100644 (file)
index 0000000..eb52397
--- /dev/null
@@ -0,0 +1,940 @@
+// Copyright 2015-2020 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include <string.h>
+#include <stdio.h>
+
+#include "natsp.h"
+#include "conn.h"
+#include "util.h"
+#include "mem.h"
+
+// cloneMsgArg is used when the split buffer scenario has the pubArg in the existing read buffer, but
+// we need to hold onto it into the next read.
+static natsStatus
+_cloneMsgArg(natsConnection *nc)
+{
+    natsStatus  s;
+    int         subjLen = natsBuf_Len(nc->ps->ma.subject);
+
+    s = natsBuf_InitWithBackend(&(nc->ps->argBufRec),
+                                nc->ps->scratch,
+                                0,
+                                sizeof(nc->ps->scratch));
+    if (s == NATS_OK)
+    {
+        nc->ps->argBuf = &(nc->ps->argBufRec);
+
+        s = natsBuf_Append(nc->ps->argBuf,
+                           natsBuf_Data(nc->ps->ma.subject),
+                           natsBuf_Len(nc->ps->ma.subject));
+        if (s == NATS_OK)
+        {
+            natsBuf_Destroy(nc->ps->ma.subject);
+            nc->ps->ma.subject = NULL;
+
+            s = natsBuf_InitWithBackend(&(nc->ps->ma.subjectRec),
+                                        nc->ps->scratch,
+                                        subjLen,
+                                        subjLen);
+            if (s == NATS_OK)
+                nc->ps->ma.subject = &(nc->ps->ma.subjectRec);
+        }
+    }
+    if ((s == NATS_OK) && (nc->ps->ma.reply != NULL))
+    {
+        s = natsBuf_Append(nc->ps->argBuf,
+                           natsBuf_Data(nc->ps->ma.reply),
+                           natsBuf_Len(nc->ps->ma.reply));
+        if (s == NATS_OK)
+        {
+            int replyLen = natsBuf_Len(nc->ps->ma.reply);
+
+            natsBuf_Destroy(nc->ps->ma.reply);
+            nc->ps->ma.reply = NULL;
+
+            s = natsBuf_InitWithBackend(&(nc->ps->ma.replyRec),
+                                        nc->ps->scratch + subjLen,
+                                        replyLen,
+                                        replyLen);
+            if (s == NATS_OK)
+                nc->ps->ma.reply = &(nc->ps->ma.replyRec);
+        }
+    }
+
+    return s;
+}
+
+struct slice
+{
+    char    *start;
+    int     len;
+};
+
+static natsStatus
+_processMsgArgs(natsConnection *nc, char *buf, int bufLen)
+{
+    natsStatus      s       = NATS_OK;
+    int             start   = -1;
+    int             index   = 0;
+    int             i;
+    char            b;
+    struct slice    slices[5];
+    char            errTxt[256];
+    int             indexLimit = 3;
+    int             minArgs    = 3;
+    int             maxArgs    = 4;
+    bool            hasHeaders = (nc->ps->hdr >= 0 ? true : false);
+
+    // If headers, the content should be:
+    // <subject> <sid> [reply] <hdr size> <overall size>
+    // otherwise:
+    // <subject> <sid> [reply] <overall size>
+    if (hasHeaders)
+    {
+        indexLimit = 4;
+        minArgs    = 4;
+        maxArgs    = 5;
+    }
+
+    for (i = 0; i < bufLen; i++)
+    {
+        b = buf[i];
+
+        if (((b == ' ') || (b == '\t') || (b == '\r') || (b == '\n')))
+        {
+            if (start >=0)
+            {
+                if (index > indexLimit)
+                {
+                    s = NATS_PROTOCOL_ERROR;
+                    break;
+                }
+                slices[index].start = buf + start;
+                slices[index].len   = i - start;
+                index++;
+                start = -1;
+            }
+        }
+        else if (start < 0)
+        {
+            start = i;
+        }
+    }
+    if ((s == NATS_OK) && (start >= 0))
+    {
+        if (index > indexLimit)
+        {
+            s = NATS_PROTOCOL_ERROR;
+        }
+        else
+        {
+            slices[index].start = buf + start;
+            slices[index].len   = i - start;
+            index++;
+        }
+    }
+    if ((s == NATS_OK) && ((index == minArgs) || (index == maxArgs)))
+    {
+        int maSizeIndex  = index-1; // position of size is always last.
+        int hdrSizeIndex = index-2; // position of hdr size is always before last.
+
+        s = natsBuf_InitWithBackend(&(nc->ps->ma.subjectRec),
+                                    slices[0].start,
+                                    slices[0].len,
+                                    slices[0].len);
+        if (s == NATS_OK)
+        {
+            nc->ps->ma.subject = &(nc->ps->ma.subjectRec);
+
+            nc->ps->ma.sid   = nats_ParseInt64(slices[1].start, slices[1].len);
+
+            if (index == minArgs)
+            {
+                nc->ps->ma.reply = NULL;
+            }
+            else
+            {
+                s = natsBuf_InitWithBackend(&(nc->ps->ma.replyRec),
+                                            slices[2].start,
+                                            slices[2].len,
+                                            slices[2].len);
+                if (s == NATS_OK)
+                {
+                    nc->ps->ma.reply = &(nc->ps->ma.replyRec);
+                }
+            }
+        }
+        if (s == NATS_OK)
+        {
+            if (hasHeaders)
+            {
+                nc->ps->ma.hdr = (int) nats_ParseInt64(slices[hdrSizeIndex].start,
+                                                       slices[hdrSizeIndex].len);
+            }
+            nc->ps->ma.size = (int) nats_ParseInt64(slices[maSizeIndex].start,
+                                                    slices[maSizeIndex].len);
+        }
+    }
+    else
+    {
+        snprintf(errTxt, sizeof(errTxt), "%s", "processMsgArgs Parse Error: wrong number of arguments");
+        s = NATS_PROTOCOL_ERROR;
+    }
+    if (nc->ps->ma.sid < 0)
+    {
+        snprintf(errTxt, sizeof(errTxt), "processMsgArgs Bad or Missing Sid: '%.*s'",
+                 bufLen, buf);
+        s = NATS_PROTOCOL_ERROR;
+    }
+    if (nc->ps->ma.size < 0)
+    {
+        snprintf(errTxt, sizeof(errTxt), "processMsgArgs Bad or Missing Size: '%.*s'",
+                 bufLen, buf);
+        s = NATS_PROTOCOL_ERROR;
+    }
+    if (hasHeaders && ((nc->ps->ma.hdr < 0) || (nc->ps->ma.hdr > nc->ps->ma.size)))
+    {
+        snprintf(errTxt, sizeof(errTxt), "processMsgArgs Bad or Missing Header Size: '%.*s'",
+                 bufLen, buf);
+        s = NATS_PROTOCOL_ERROR;
+    }
+
+    if (s != NATS_OK)
+    {
+        natsConn_Lock(nc);
+        snprintf(nc->errStr, sizeof(nc->errStr), "%s", errTxt);
+        nc->err = s;
+        natsConn_Unlock(nc);
+    }
+
+    return s;
+}
+
+// parse is the fast protocol parser engine.
+natsStatus
+natsParser_Parse(natsConnection *nc, char* buf, int bufLen)
+{
+    natsStatus  s = NATS_OK;
+    int         i;
+    char        b;
+
+    for (i = 0; (s == NATS_OK) && (i < bufLen); i++)
+    {
+        b = buf[i];
+
+        switch (nc->ps->state)
+        {
+            case OP_START:
+            {
+                switch (b)
+                {
+                    case 'M':
+                    case 'm':
+                        nc->ps->state  = OP_M;
+                        nc->ps->hdr    = -1;
+                        nc->ps->ma.hdr = -1;
+                        break;
+                    case 'H':
+                    case 'h':
+                        nc->ps->state  = OP_H;
+                        nc->ps->hdr    = 0;
+                        nc->ps->ma.hdr = 0;
+                        break;
+                    case 'P':
+                    case 'p':
+                        nc->ps->state = OP_P;
+                        break;
+                    case '+':
+                        nc->ps->state = OP_PLUS;
+                        break;
+                    case '-':
+                        nc->ps->state = OP_MINUS;
+                        break;
+                    case 'I':
+                    case 'i':
+                        nc->ps->state = OP_I;
+                        break;
+                    default:
+                        goto parseErr;
+                }
+                break;
+            }
+            case OP_H:
+            {
+                switch (b)
+                {
+                    case 'M':
+                    case 'm':
+                        nc->ps->state = OP_M;
+                        break;
+                    default:
+                        goto parseErr;
+                }
+                break;
+            }
+            case OP_M:
+            {
+                switch (b)
+                {
+                    case 'S':
+                    case 's':
+                        nc->ps->state = OP_MS;
+                        break;
+                    default:
+                        goto parseErr;
+                }
+                break;
+            }
+            case OP_MS:
+            {
+                switch (b)
+                {
+                    case 'G':
+                    case 'g':
+                        nc->ps->state = OP_MSG;
+                        break;
+                    default:
+                        goto parseErr;
+                }
+                break;
+            }
+            case OP_MSG:
+            {
+                switch (b)
+                {
+                    case ' ':
+                    case '\t':
+                        nc->ps->state = OP_MSG_SPC;
+                        break;
+                    default:
+                        goto parseErr;
+                }
+                break;
+            }
+            case OP_MSG_SPC:
+            {
+                switch (b)
+                {
+                    case ' ':
+                    case '\t':
+                        continue;
+                    default:
+                        nc->ps->state      = MSG_ARG;
+                        nc->ps->afterSpace = i;
+                        break;
+                }
+                break;
+            }
+            case MSG_ARG:
+            {
+                switch (b)
+                {
+                    case '\r':
+                        nc->ps->drop = 1;
+                        break;
+                    case '\n':
+                    {
+                        char    *start = NULL;
+                        int     len    = 0;
+
+                        if (nc->ps->argBuf != NULL)
+                        {
+                            start = natsBuf_Data(nc->ps->argBuf);
+                            len   = natsBuf_Len(nc->ps->argBuf);
+                        }
+                        else
+                        {
+                            start = buf + nc->ps->afterSpace;
+                            len   = (i - nc->ps->drop) - nc->ps->afterSpace;
+                        }
+
+                        s = _processMsgArgs(nc, start, len);
+                        if (s == NATS_OK)
+                        {
+                            nc->ps->drop        = 0;
+                            nc->ps->afterSpace  = i+1;
+                            nc->ps->state       = MSG_PAYLOAD;
+
+                            // jump ahead with the index. If this overruns
+                            // what is left we fall out and process split
+                            // buffer.
+                            i = nc->ps->afterSpace + nc->ps->ma.size - 1;
+                        }
+                        break;
+                    }
+                    default:
+                    {
+                        if (nc->ps->argBuf != NULL)
+                            s = natsBuf_AppendByte(nc->ps->argBuf, b);
+                        break;
+                    }
+                }
+                break;
+            }
+            case MSG_PAYLOAD:
+            {
+                bool done = false;
+
+                if (nc->ps->msgBuf != NULL)
+                {
+                    if (natsBuf_Len(nc->ps->msgBuf) >= nc->ps->ma.size)
+                    {
+                        s = natsConn_processMsg(nc,
+                                                natsBuf_Data(nc->ps->msgBuf),
+                                                natsBuf_Len(nc->ps->msgBuf));
+                        done = true;
+                    }
+                    else
+                    {
+                        // copy as much as we can to the buffer and skip ahead.
+                        int toCopy = nc->ps->ma.size - natsBuf_Len(nc->ps->msgBuf);
+                        int avail  = bufLen - i;
+
+                        if (avail < toCopy)
+                            toCopy = avail;
+
+                        if (toCopy > 0)
+                        {
+                            s = natsBuf_Append(nc->ps->msgBuf, buf+i, toCopy);
+                            if (s == NATS_OK)
+                                i += toCopy - 1;
+                        }
+                        else
+                        {
+                            s = natsBuf_AppendByte(nc->ps->msgBuf, b);
+                        }
+                    }
+                }
+                else if (i-nc->ps->afterSpace >= nc->ps->ma.size)
+                {
+                    char    *start  = NULL;
+                    int     len     = 0;
+
+                    start = buf + nc->ps->afterSpace;
+                    len   = (i - nc->ps->afterSpace);
+
+                    s = natsConn_processMsg(nc, start, len);
+
+                    done = true;
+                }
+
+                if (done)
+                {
+                    natsBuf_Destroy(nc->ps->argBuf);
+                    nc->ps->argBuf = NULL;
+                    natsBuf_Destroy(nc->ps->msgBuf);
+                    nc->ps->msgBuf = NULL;
+                    nc->ps->state = MSG_END;
+                }
+
+                break;
+            }
+            case MSG_END:
+            {
+                switch (b)
+                {
+                    case '\n':
+                        nc->ps->drop        = 0;
+                        nc->ps->afterSpace  = i+1;
+                        nc->ps->state       = OP_START;
+                        break;
+                    default:
+                        continue;
+                }
+                break;
+            }
+            case OP_PLUS:
+            {
+                switch (b)
+                {
+                    case 'O':
+                    case 'o':
+                        nc->ps->state = OP_PLUS_O;
+                        break;
+                    default:
+                        goto parseErr;
+                }
+                break;
+            }
+            case OP_PLUS_O:
+            {
+                switch (b)
+                {
+                    case 'K':
+                    case 'k':
+                        nc->ps->state = OP_PLUS_OK;
+                        break;
+                    default:
+                        goto parseErr;
+                }
+                break;
+            }
+            case OP_PLUS_OK:
+            {
+                switch (b)
+                {
+                    case '\n':
+                        natsConn_processOK(nc);
+                        nc->ps->drop  = 0;
+                        nc->ps->state = OP_START;
+                        break;
+                }
+                break;
+            }
+            case OP_MINUS:
+            {
+                switch (b)
+                {
+                    case 'E':
+                    case 'e':
+                        nc->ps->state = OP_MINUS_E;
+                        break;
+                    default:
+                        goto parseErr;
+                }
+                break;
+            }
+            case OP_MINUS_E:
+            {
+                switch (b)
+                {
+                    case 'R':
+                    case 'r':
+                        nc->ps->state = OP_MINUS_ER;
+                        break;
+                    default:
+                        goto parseErr;
+                }
+                break;
+            }
+            case OP_MINUS_ER:
+            {
+                switch (b)
+                {
+                    case 'R':
+                    case 'r':
+                        nc->ps->state = OP_MINUS_ERR;
+                        break;
+                    default:
+                        goto parseErr;
+                }
+                break;
+            }
+            case OP_MINUS_ERR:
+            {
+                switch (b)
+                {
+                    case ' ':
+                    case '\t':
+                        nc->ps->state = OP_MINUS_ERR_SPC;
+                        break;
+                    default:
+                        goto parseErr;
+                }
+                break;
+            }
+            case OP_MINUS_ERR_SPC:
+            {
+                switch (b)
+                {
+                    case ' ':
+                    case '\t':
+                        continue;
+                    default:
+                        nc->ps->state       = MINUS_ERR_ARG;
+                        nc->ps->afterSpace  = i;
+                        break;
+                }
+                break;
+            }
+            case MINUS_ERR_ARG:
+            {
+                switch (b)
+                {
+                    case '\r':
+                        nc->ps->drop = 1;
+                        break;
+                    case '\n':
+                    {
+                        char    *start = NULL;
+                        int     len    = 0;
+
+                        if (nc->ps->argBuf != NULL)
+                        {
+                            start = natsBuf_Data(nc->ps->argBuf);
+                            len   = natsBuf_Len(nc->ps->argBuf);
+                        }
+                        else
+                        {
+                            start = buf + nc->ps->afterSpace;
+                            len   = (i - nc->ps->drop) - nc->ps->afterSpace;
+                        }
+
+                        natsConn_processErr(nc, start, len);
+
+                        nc->ps->drop        = 0;
+                        nc->ps->afterSpace  = i+1;
+                        nc->ps->state       = OP_START;
+
+                        if (nc->ps->argBuf != NULL)
+                        {
+                            natsBuf_Destroy(nc->ps->argBuf);
+                            nc->ps->argBuf = NULL;
+                        }
+
+                        break;
+                    }
+                    default:
+                    {
+                        if (nc->ps->argBuf != NULL)
+                            s = natsBuf_AppendByte(nc->ps->argBuf, b);
+
+                        break;
+                    }
+                }
+                break;
+            }
+            case OP_P:
+            {
+                switch (b)
+                {
+                    case 'I':
+                    case 'i':
+                        nc->ps->state = OP_PI;
+                        break;
+                    case 'O':
+                    case 'o':
+                        nc->ps->state = OP_PO;
+                        break;
+                    default:
+                        goto parseErr;
+                }
+                break;
+            }
+            case OP_PO:
+            {
+                switch (b)
+                {
+                    case 'N':
+                    case 'n':
+                        nc->ps->state = OP_PON;
+                        break;
+                    default:
+                        goto parseErr;
+                }
+                break;
+            }
+            case OP_PON:
+            {
+                switch (b)
+                {
+                    case 'G':
+                    case 'g':
+                        nc->ps->state = OP_PONG;
+                        break;
+                    default:
+                        goto parseErr;
+                }
+                break;
+            }
+            case OP_PONG:
+            {
+                switch (b)
+                {
+                    case '\n':
+                        natsConn_processPong(nc);
+
+                        nc->ps->drop        = 0;
+                        nc->ps->afterSpace  = i+1;
+                        nc->ps->state       = OP_START;
+                        break;
+                }
+                break;
+            }
+            case OP_PI:
+            {
+                switch (b)
+                {
+                    case 'N':
+                    case 'n':
+                        nc->ps->state = OP_PIN;
+                        break;
+                    default:
+                        goto parseErr;
+                }
+                break;
+            }
+            case OP_PIN:
+            {
+                switch (b)
+                {
+                    case 'G':
+                    case 'g':
+                        nc->ps->state = OP_PING;
+                        break;
+                    default:
+                        goto parseErr;
+                }
+                break;
+            }
+            case OP_PING:
+            {
+                switch (b)
+                {
+                    case '\n':
+                        natsConn_processPing(nc);
+
+                        nc->ps->drop        = 0;
+                        nc->ps->afterSpace  = i+1;
+                        nc->ps->state       = OP_START;
+                        break;
+                }
+                break;
+            }
+            case OP_I:
+            {
+                switch (b)
+                {
+                    case 'N':
+                    case 'n':
+                        nc->ps->state = OP_IN;
+                        break;
+                    default:
+                        goto parseErr;
+                }
+                break;
+            }
+            case OP_IN:
+            {
+                switch (b)
+                {
+                    case 'F':
+                    case 'f':
+                        nc->ps->state = OP_INF;
+                        break;
+                    default:
+                        goto parseErr;
+                }
+                break;
+            }
+            case OP_INF:
+            {
+                switch (b)
+                {
+                    case 'O':
+                    case 'o':
+                        nc->ps->state = OP_INFO;
+                        break;
+                    default:
+                        goto parseErr;
+                }
+                break;
+            }
+            case OP_INFO:
+            {
+                switch (b)
+                {
+                    case ' ':
+                    case '\t':
+                        nc->ps->state = OP_INFO_SPC;
+                        break;
+                    default:
+                        goto parseErr;
+                }
+                break;
+            }
+            case OP_INFO_SPC:
+            {
+                switch (b)
+                {
+                    case ' ':
+                    case '\t':
+                        continue;
+                    default:
+                        nc->ps->state = INFO_ARG;
+                        nc->ps->afterSpace = i;
+                        break;
+                }
+                break;
+            }
+            case INFO_ARG:
+            {
+                switch (b)
+                {
+                    case '\r':
+                        nc->ps->drop = 1;
+                        break;
+                    case '\n':
+                    {
+                        char    *start = NULL;
+                        int     len    = 0;
+
+                        if (nc->ps->argBuf != NULL)
+                        {
+                            start = natsBuf_Data(nc->ps->argBuf);
+                            len   = natsBuf_Len(nc->ps->argBuf);
+                        }
+                        else
+                        {
+                            start = buf + nc->ps->afterSpace;
+                            len   = (i - nc->ps->drop) - nc->ps->afterSpace;
+                        }
+                        natsConn_processAsyncINFO(nc, start, len);
+                        nc->ps->drop        = 0;
+                        nc->ps->afterSpace  = i+1;
+                        nc->ps->state       = OP_START;
+
+                        if (nc->ps->argBuf != NULL)
+                        {
+                            natsBuf_Destroy(nc->ps->argBuf);
+                            nc->ps->argBuf = NULL;
+                        }
+                        break;
+                    }
+                    default:
+                    {
+                        if (nc->ps->argBuf != NULL)
+                            s = natsBuf_AppendByte(nc->ps->argBuf, b);
+                        break;
+                    }
+                }
+                break;
+            }
+            default:
+                goto parseErr;
+        }
+    }
+
+    // Check for split buffer scenarios
+    if ((s == NATS_OK)
+        && ((nc->ps->state == MSG_ARG)
+                || (nc->ps->state == MINUS_ERR_ARG)
+                || (nc->ps->state == INFO_ARG))
+        && (nc->ps->argBuf == NULL))
+    {
+        s = natsBuf_InitWithBackend(&(nc->ps->argBufRec),
+                                    nc->ps->scratch,
+                                    0,
+                                    sizeof(nc->ps->scratch));
+        if (s == NATS_OK)
+        {
+            nc->ps->argBuf = &(nc->ps->argBufRec);
+            s = natsBuf_Append(nc->ps->argBuf,
+                               buf + nc->ps->afterSpace,
+                               (i - nc->ps->drop) - nc->ps->afterSpace);
+        }
+    }
+    // Check for split msg
+    if ((s == NATS_OK)
+        && (nc->ps->state == MSG_PAYLOAD) && (nc->ps->msgBuf == NULL))
+    {
+        // We need to clone the msgArg if it is still referencing the
+        // read buffer and we are not able to process the msg.
+        if (nc->ps->argBuf == NULL)
+            s = _cloneMsgArg(nc);
+
+        if (s == NATS_OK)
+        {
+            int remainingInScratch;
+            int toCopy;
+
+#ifdef _WIN32
+// Suppresses the warning that nc->ps->argBuf may be NULL.
+// If nc->ps->argBuf is NULL above, then _cloneMsgArg() will set it. If 's'
+// is NATS_OK here, then nc->ps->argBuf can't be NULL.
+#pragma warning(suppress: 6011)
+#endif
+
+            // If we will overflow the scratch buffer, just create a
+            // new buffer to hold the split message.
+            remainingInScratch = sizeof(nc->ps->scratch) - natsBuf_Len(nc->ps->argBuf);
+            toCopy = bufLen - nc->ps->afterSpace;
+
+            if (nc->ps->ma.size > remainingInScratch)
+            {
+                s = natsBuf_Create(&(nc->ps->msgBuf), nc->ps->ma.size);
+            }
+            else
+            {
+                s = natsBuf_InitWithBackend(&(nc->ps->msgBufRec),
+                                            nc->ps->scratch + natsBuf_Len(nc->ps->argBuf),
+                                            0, remainingInScratch);
+                if (s == NATS_OK)
+                    nc->ps->msgBuf = &(nc->ps->msgBufRec);
+            }
+            if (s == NATS_OK)
+                s = natsBuf_Append(nc->ps->msgBuf,
+                                   buf + nc->ps->afterSpace,
+                                   toCopy);
+        }
+    }
+
+    if (s != NATS_OK)
+    {
+        // Let's clear all our pointers...
+        natsBuf_Destroy(nc->ps->argBuf);
+        nc->ps->argBuf = NULL;
+        natsBuf_Destroy(nc->ps->msgBuf);
+        nc->ps->msgBuf = NULL;
+        natsBuf_Destroy(nc->ps->ma.subject);
+        nc->ps->ma.subject = NULL;
+        natsBuf_Destroy(nc->ps->ma.reply);
+        nc->ps->ma.reply = NULL;
+    }
+
+    return s;
+
+parseErr:
+    if (s == NATS_OK)
+        s = NATS_PROTOCOL_ERROR;
+
+    natsMutex_Lock(nc->mu);
+
+    snprintf(nc->errStr, sizeof(nc->errStr),
+             "Parse Error [%u]: '%.*s'",
+             nc->ps->state,
+             bufLen - i,
+             buf + i);
+
+    natsMutex_Unlock(nc->mu);
+
+    return s;
+}
+
+natsStatus
+natsParser_Create(natsParser **newParser)
+{
+    natsParser  *parser = (natsParser *) NATS_CALLOC(1, sizeof(natsParser));
+
+    if (parser == NULL)
+        return NATS_NO_MEMORY;
+
+    *newParser = parser;
+
+    return NATS_OK;
+}
+
+void
+natsParser_Destroy(natsParser *parser)
+{
+    if (parser == NULL)
+        return;
+
+    natsBuf_Cleanup(&(parser->ma.subjectRec));
+    natsBuf_Cleanup(&(parser->ma.replyRec));
+    natsBuf_Cleanup(&(parser->argBufRec));
+    natsBuf_Cleanup(&(parser->msgBufRec));
+
+    NATS_FREE(parser);
+}
diff --git a/src/parser.h b/src/parser.h
new file mode 100644 (file)
index 0000000..4a8bbf3
--- /dev/null
@@ -0,0 +1,101 @@
+// Copyright 2015-2020 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef PARSER_H_
+#define PARSER_H_
+
+#include <stdint.h>
+
+//#include "natsp.h"
+#include "status.h"
+#include "buf.h"
+
+typedef enum
+{
+    OP_START = 0,
+    OP_PLUS,
+    OP_PLUS_O,
+    OP_PLUS_OK,
+    OP_MINUS,
+    OP_MINUS_E,
+    OP_MINUS_ER,
+    OP_MINUS_ERR,
+    OP_MINUS_ERR_SPC,
+    MINUS_ERR_ARG,
+    OP_M,
+    OP_MS,
+    OP_MSG,
+    OP_MSG_SPC,
+    MSG_ARG,
+    MSG_PAYLOAD,
+    MSG_END,
+    OP_H,
+    OP_P,
+    OP_PI,
+    OP_PIN,
+    OP_PING,
+    OP_PO,
+    OP_PON,
+    OP_PONG,
+    OP_I,
+    OP_IN,
+    OP_INF,
+    OP_INFO,
+    OP_INFO_SPC,
+    INFO_ARG
+
+} natsOp;
+
+typedef struct __natsMsgArg
+{
+    natsBuffer  subjectRec;
+    natsBuffer  *subject;
+    natsBuffer  replyRec;
+    natsBuffer  *reply;
+    int64_t     sid;
+    int         hdr;
+    int         size;
+
+} natsMsgArg;
+
+#define MAX_CONTROL_LINE_SIZE   (4096)
+
+typedef struct __natsParser
+{
+    natsOp      state;
+    int         afterSpace;
+    int         drop;
+    int         hdr;
+    natsMsgArg  ma;
+    natsBuffer  argBufRec;
+    natsBuffer  *argBuf;
+    natsBuffer  msgBufRec;
+    natsBuffer  *msgBuf;
+    char        scratch[MAX_CONTROL_LINE_SIZE];
+
+} natsParser;
+
+// This is defined in natsp.h, natsp.h includes us. Alternatively, we can move
+// all the parser defines in natsp.h
+struct __natsConnection;
+
+natsStatus
+natsParser_Create(natsParser **newParser);
+
+natsStatus
+natsParser_Parse(struct __natsConnection *nc, char *buf, int bufLen);
+
+void
+natsParser_Destroy(natsParser *parser);
+
+#endif /* PARSER_H_ */
diff --git a/src/pub.c b/src/pub.c
new file mode 100644 (file)
index 0000000..5a563bf
--- /dev/null
+++ b/src/pub.c
@@ -0,0 +1,569 @@
+// Copyright 2015-2021 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "natsp.h"
+
+#include <string.h>
+
+#include "conn.h"
+#include "sub.h"
+#include "msg.h"
+#include "nuid.h"
+#include "mem.h"
+
+static const char *digits = "0123456789";
+
+#define _publishMsg(n, m, r) natsConn_publish((n), (m), (r), false)
+
+#define GETBYTES_SIZE(len, b, i) {\
+    if ((len) > 0)\
+    {\
+        int l;\
+        for (l = (len); l > 0; l /= 10)\
+        {\
+            (i) -= 1;\
+            (b)[(i)] = digits[l%10];\
+        }\
+    }\
+    else\
+    {\
+        (i) -= 1;\
+        (b)[(i)] = digits[0];\
+    }\
+}
+
+// This represents the maximum size of a byte array containing the
+// string representation of a hdr/msg size. See GETBYTES_SIZE.
+#define BYTES_SIZE_MAX (12)
+
+// _publish is the internal function to publish messages to a nats server.
+// Sends a protocol data message by queueing into the bufio writer
+// and kicking the flusher thread. These writes should be protected.
+natsStatus
+natsConn_publish(natsConnection *nc, natsMsg *msg, const char *reply, bool directFlush)
+{
+    natsStatus  s               = NATS_OK;
+    int         msgHdSize       = 0;
+    char        dlb[BYTES_SIZE_MAX];
+    int         dli             = BYTES_SIZE_MAX;
+    int         dlSize          = 0;
+    char        hlb[BYTES_SIZE_MAX];
+    int         hli             = BYTES_SIZE_MAX;
+    int         hlSize          = 0;
+    int         subjLen         = 0;
+    int         replyLen        = 0;
+    bool        reconnecting    = false;
+    int         ppo             = 1; // pub proto offset
+    int         hdrl            = 0;
+    int         totalLen        = 0;
+
+    if (nc == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    if ((msg->subject == NULL)
+        || ((subjLen = (int) strlen(msg->subject)) == 0))
+    {
+        return nats_setDefaultError(NATS_INVALID_SUBJECT);
+    }
+
+    // If a reply is provided through params, use that one,
+    // otherwise fallback to msg->reply.
+    if (reply == NULL)
+        reply = msg->reply;
+
+    replyLen = ((reply != NULL) ? (int) strlen(reply) : 0);
+
+    natsConn_Lock(nc);
+
+    if (natsConn_isClosed(nc))
+    {
+        natsConn_Unlock(nc);
+
+        return nats_setDefaultError(NATS_CONNECTION_CLOSED);
+    }
+
+    if (natsConn_isDrainingPubs(nc))
+    {
+        natsConn_Unlock(nc);
+
+        return nats_setDefaultError(NATS_DRAINING);
+    }
+
+    // We can have headers NULL but needsLift which means we are in special
+    // situation where a message was received and is sent back without the user
+    // accessing the headers. It should still be considered having headers.
+    if ((msg->headers != NULL) || natsMsg_needsLift(msg))
+    {
+        if (!nc->info.headers)
+        {
+            natsConn_Unlock(nc);
+
+            return nats_setDefaultError(NATS_NO_SERVER_SUPPORT);
+        }
+
+        hdrl = natsMsgHeader_encodedLen(msg);
+        if (hdrl > 0)
+        {
+            GETBYTES_SIZE(hdrl, hlb, hli)
+            hlSize = (BYTES_SIZE_MAX - hli);
+            ppo = 0;
+            totalLen = hdrl;
+        }
+    }
+    // This will represent headers + data
+    totalLen += msg->dataLen;
+
+    if (!nc->initc && ((int64_t) totalLen > nc->info.maxPayload))
+    {
+        natsConn_Unlock(nc);
+
+        return nats_setError(NATS_MAX_PAYLOAD,
+                             "Payload %d greater than maximum allowed: %" PRId64,
+                             totalLen, nc->info.maxPayload);
+    }
+
+    // Check if we are reconnecting, and if so check if
+    // we have exceeded our reconnect outbound buffer limits.
+    if ((reconnecting = natsConn_isReconnecting(nc)))
+    {
+        // Check if we are over
+        if (natsBuf_Len(nc->pending) >= nc->opts->reconnectBufSize)
+        {
+            natsConn_Unlock(nc);
+            return nats_setDefaultError(NATS_INSUFFICIENT_BUFFER);
+        }
+    }
+
+    GETBYTES_SIZE(totalLen, dlb, dli)
+    dlSize = (BYTES_SIZE_MAX - dli);
+
+    // We include the NATS headers in the message header scratch.
+    msgHdSize = (_HPUB_P_LEN_ - ppo)
+                + subjLen + 1
+                + (replyLen > 0 ? replyLen + 1 : 0)
+                + (hdrl > 0 ? hlSize + 1 + hdrl : 0)
+                + dlSize + _CRLF_LEN_;
+
+    natsBuf_MoveTo(nc->scratch, _HPUB_P_LEN_);
+
+    if (natsBuf_Capacity(nc->scratch) < msgHdSize)
+    {
+        // Although natsBuf_Append() would make sure that the buffer
+        // grows, it is better to make sure that the buffer is big
+        // enough for the pre-calculated size. We make it even a bit bigger.
+        s = natsBuf_Expand(nc->scratch, (int) ((float)msgHdSize * 1.1));
+    }
+
+    if (s == NATS_OK)
+        s = natsBuf_Append(nc->scratch, msg->subject, subjLen);
+    if (s == NATS_OK)
+        s = natsBuf_Append(nc->scratch, _SPC_, _SPC_LEN_);
+    if ((s == NATS_OK) && (reply != NULL))
+    {
+        s = natsBuf_Append(nc->scratch, reply, replyLen);
+        if (s == NATS_OK)
+            s = natsBuf_Append(nc->scratch, _SPC_, _SPC_LEN_);
+    }
+    if ((s == NATS_OK) && (hdrl > 0))
+    {
+        s = natsBuf_Append(nc->scratch, (hlb+hli), hlSize);
+        if (s == NATS_OK)
+            s = natsBuf_Append(nc->scratch, _SPC_, _SPC_LEN_);
+    }
+    if (s == NATS_OK)
+        s = natsBuf_Append(nc->scratch, (dlb+dli), dlSize);
+    if (s == NATS_OK)
+        s = natsBuf_Append(nc->scratch, _CRLF_, _CRLF_LEN_);
+    if ((s == NATS_OK) && hdrl > 0)
+        s = natsMsgHeader_encode(nc->scratch, msg);
+
+    if (s == NATS_OK)
+    {
+        int pos = 0;
+
+        if (reconnecting)
+            pos = natsBuf_Len(nc->pending);
+        else
+            SET_WRITE_DEADLINE(nc);
+
+        s = natsConn_bufferWrite(nc, natsBuf_Data(nc->scratch)+ppo, msgHdSize);
+
+        if (s == NATS_OK)
+            s = natsConn_bufferWrite(nc, msg->data, msg->dataLen);
+
+        if (s == NATS_OK)
+            s = natsConn_bufferWrite(nc, _CRLF_, _CRLF_LEN_);
+
+        if ((s != NATS_OK) && reconnecting)
+            natsBuf_MoveTo(nc->pending, pos);
+    }
+
+    if ((s == NATS_OK) && !reconnecting)
+    {
+        if (directFlush)
+            s = natsConn_bufferFlush(nc);
+        else
+            s = natsConn_flushOrKickFlusher(nc);
+    }
+
+    if (s == NATS_OK)
+    {
+        nc->stats.outMsgs  += 1;
+        nc->stats.outBytes += totalLen;
+    }
+
+    natsConn_Unlock(nc);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+/*
+ * Publishes the data argument to the given subject. The data argument is left
+ * untouched and needs to be correctly interpreted on the receiver.
+ */
+natsStatus
+natsConnection_Publish(natsConnection *nc, const char *subj,
+                       const void *data, int dataLen)
+{
+    natsStatus s;
+    natsMsg    msg;
+
+    natsMsg_init(&msg, subj, (const char*) data, dataLen);
+    s = _publishMsg(nc, &msg, NULL);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+/*
+ * Convenient function to publish a string. This call is equivalent to:
+ *
+ * const char* myString = "hello";
+ *
+ * natsPublish(nc, subj, (const void*) myString, (int) strlen(myString));
+ */
+natsStatus
+natsConnection_PublishString(natsConnection *nc, const char *subj,
+                             const char *str)
+{
+    natsStatus s;
+    natsMsg    msg;
+    int        dataLen = 0;
+
+    if (str != NULL)
+        dataLen = (int) strlen(str);
+
+    natsMsg_init(&msg, subj, str, dataLen);
+    s = _publishMsg(nc, &msg, NULL);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+/*
+ * Publishes the natsMsg structure, which includes the subject, an optional
+ * reply and optional data.
+ */
+natsStatus
+natsConnection_PublishMsg(natsConnection *nc, natsMsg *msg)
+{
+    const char *reply = (msg != NULL ? msg->reply : NULL);
+    natsStatus s;
+
+    s = _publishMsg(nc, msg, reply);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+/*
+ * Publishes the data argument to the given subject expecting a response on
+ * the reply subject. Use natsConnection_Request() for automatically waiting for a
+ * response inline.
+ */
+natsStatus
+natsConnection_PublishRequest(natsConnection *nc, const char *subj,
+                              const char *reply, const void *data, int dataLen)
+{
+    natsStatus s;
+    natsMsg    msg;
+
+    if ((reply == NULL) || (strlen(reply) == 0))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    natsMsg_init(&msg, subj, (const char*) data, dataLen);
+    s = _publishMsg(nc, &msg, reply);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+/*
+ * Convenient function to publish a request as a string. This call is
+ * equivalent to:
+ *
+ * const char* myString = "hello";
+ *
+ * natsPublishRequest(nc, subj, reply, (const void*) myString,
+ *                    (int) strlen(myString));
+ */
+natsStatus
+natsConnection_PublishRequestString(natsConnection *nc, const char *subj,
+                                    const char *reply, const char *str)
+{
+    natsStatus s;
+    natsMsg    msg;
+    int        dataLen = 0;
+
+    if ((reply == NULL) || (strlen(reply) == 0))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    if (str != NULL)
+        dataLen = (int) strlen(str);
+
+    natsMsg_init(&msg, subj, str, dataLen);
+    s = _publishMsg(nc, &msg, reply);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+// Old way of sending a request...
+static natsStatus
+_oldRequestMsg(natsMsg **replyMsg, natsConnection *nc,
+               natsMsg *requestMsg, int64_t timeout)
+{
+    natsStatus          s       = NATS_OK;
+    natsSubscription    *sub    = NULL;
+    char                inboxBuf[32 + NUID_BUFFER_LEN + 1];
+    char                *inbox  = NULL;
+    bool                freeIbx = false;
+
+    s = natsConn_initInbox(nc, inboxBuf, sizeof(inboxBuf), &inbox, &freeIbx);
+    if (s == NATS_OK)
+        s = natsConn_subscribeSyncNoPool(&sub, nc, inbox);
+    if (s == NATS_OK)
+        s = natsSubscription_AutoUnsubscribe(sub, 1);
+    if (s == NATS_OK)
+        s = natsConn_publish(nc, requestMsg, (const char*) inbox, true);
+    if (s == NATS_OK)
+        s = natsSubscription_NextMsg(replyMsg, sub, timeout);
+
+    if (freeIbx)
+        NATS_FREE(inbox);
+    natsSubscription_Destroy(sub);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static void
+_respHandler(natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure)
+{
+    char        *rt   = NULL;
+    const char  *subj = NULL;
+    respInfo    *resp = NULL;
+    bool        dmsg  = true;
+
+    natsConn_Lock(nc);
+    if (natsConn_isClosed(nc))
+    {
+        natsConn_Unlock(nc);
+        natsMsg_Destroy(msg);
+        return;
+    }
+    subj = natsMsg_GetSubject(msg);
+    // We look for the reply token by first checking that the message subject
+    // prefix matches the subscription's subject (without the last '*').
+    // It is possible that it does not due to subject rewrite (JetStream).
+    if (((int) strlen(subj) > nc->reqIdOffset)
+        && (memcmp((const void*) sub->subject, (const void*) subj, strlen(sub->subject) - 1) == 0))
+    {
+        rt = (char*) (natsMsg_GetSubject(msg) + nc->reqIdOffset);
+        resp = (respInfo*) natsStrHash_Remove(nc->respMap, rt);
+    }
+    else if (natsStrHash_Count(nc->respMap) == 1)
+    {
+        // Only if the subject is completely different, we assume that it
+        // could be the server that has rewritten the subject and so if there
+        // is a single entry, use that.
+        void *value = NULL;
+        natsStrHash_RemoveSingle(nc->respMap, NULL, &value);
+        resp = (respInfo*) value;
+    }
+    if (resp != NULL)
+    {
+        natsMutex_Lock(resp->mu);
+        // Check for the race where the requestor has already timed-out.
+        // If so, resp->removed will be true, in which case simply discard
+        // the message.
+        if (!resp->removed)
+        {
+            // Do not destroy the message since it is being used.
+            dmsg = false;
+            resp->msg = msg;
+            resp->removed = true;
+            natsCondition_Signal(resp->cond);
+        }
+        natsMutex_Unlock(resp->mu);
+    }
+    natsConn_Unlock(nc);
+
+    if (dmsg)
+        natsMsg_Destroy(msg);
+}
+
+/*
+ * Sends a request and waits for the first reply, up to the provided timeout.
+ * This is optimized for the case of multiple responses.
+ */
+natsStatus
+natsConnection_RequestMsg(natsMsg **replyMsg, natsConnection *nc,
+                          natsMsg *m, int64_t timeout)
+{
+    natsStatus          s           = NATS_OK;
+    respInfo            *resp       = NULL;
+    bool                needsRemoval= true;
+    char                respInboxBuf[32 + NUID_BUFFER_LEN + NATS_MAX_REQ_ID_LEN + 1]; // <inbox prefix>.<nuid>.<reqId>
+    char                *respInbox = respInboxBuf;
+
+    if ((replyMsg == NULL) || (nc == NULL) || (m == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    *replyMsg = NULL;
+
+    natsConn_Lock(nc);
+    if (natsConn_isClosed(nc))
+    {
+        natsConn_Unlock(nc);
+        return nats_setDefaultError(NATS_CONNECTION_CLOSED);
+    }
+    if (nc->opts->useOldRequestStyle)
+    {
+        natsConn_Unlock(nc);
+        return _oldRequestMsg(replyMsg, nc, m, timeout);
+    }
+
+    // If the custom inbox prefix is more than the reserved 32 characters
+    // in respInboxBuf, then we need to allocate...
+    if (nc->inboxPfxLen > 32)
+    {
+        respInbox = NATS_MALLOC(nc->inboxPfxLen + NUID_BUFFER_LEN + NATS_MAX_REQ_ID_LEN + 1);
+        if (respInbox == NULL)
+        {
+            natsConn_Unlock(nc);
+            return nats_setDefaultError(NATS_NO_MEMORY);
+        }
+    }
+
+    // Since we are going to release the lock and connection
+    // may be closed while we wait for reply, we need to retain
+    // the connection object.
+    natsConn_retain(nc);
+
+    // Setup only once (but could be more if natsConn_initResp() returns != OK)
+    if (nc->respMux == NULL)
+        s = natsConn_initResp(nc, _respHandler);
+    if (s == NATS_OK)
+        s = natsConn_addRespInfo(&resp, nc, respInbox, sizeof(respInbox));
+
+    natsConn_Unlock(nc);
+
+    if (s == NATS_OK)
+    {
+        s = natsConn_publish(nc, m, (const char*) respInbox, true);
+        if (s == NATS_OK)
+        {
+            natsMutex_Lock(resp->mu);
+            while ((s != NATS_TIMEOUT) && (resp->msg == NULL) && !resp->closed)
+                s = natsCondition_TimedWait(resp->cond, resp->mu, timeout);
+
+            // If we have a message, deliver it.
+            if (resp->msg != NULL)
+            {
+                // In case of race where s != NATS_OK but we got the message,
+                // we need to override status and set it to OK.
+                s = NATS_OK;
+
+                // For servers that support it, we may receive an empty message
+                // with a 503 status header. If that is the case, return NULL
+                // message and NATS_NO_RESPONDERS error.
+                if (natsMsg_IsNoResponders(resp->msg))
+                {
+                    natsMsg_Destroy(resp->msg);
+                    s = NATS_NO_RESPONDERS;
+                }
+                else
+                    *replyMsg = resp->msg;
+            }
+            else
+            {
+                // Set the correct error status that we return to the user
+                if (resp->closed)
+                    s = resp->closedSts;
+                else
+                    s = NATS_TIMEOUT;
+            }
+            resp->msg = NULL;
+            needsRemoval = !resp->removed;
+            // Signal to _respHandler that we are no longer interested.
+            resp->removed = true;
+            natsMutex_Unlock(resp->mu);
+        }
+    }
+    // Common to success or if we failed to create the sub, send the request...
+    if (needsRemoval)
+    {
+        natsConn_Lock(nc);
+        if (nc->respMap != NULL)
+            natsStrHash_Remove(nc->respMap, respInbox+nc->reqIdOffset);
+        natsConn_Unlock(nc);
+    }
+    natsConn_disposeRespInfo(nc, resp, true);
+
+    natsConn_release(nc);
+
+    if (respInbox != respInboxBuf)
+        NATS_FREE(respInbox);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+/*
+ * Convenient function to send a request as a string. This call is
+ * equivalent to:
+ *
+ * const char* myString = "hello";
+ *
+ * natsConnection_Request(nc, subj, reply, (const void*) myString,
+ *                        (int) strlen(myString));
+ */
+natsStatus
+natsConnection_RequestString(natsMsg **replyMsg, natsConnection *nc,
+                             const char *subj, const char *str,
+                             int64_t timeout)
+{
+    natsStatus s;
+    natsMsg    msg;
+
+    natsMsg_init(&msg, subj, str, (str == NULL ? 0 : (int) strlen(str)));
+    s = natsConnection_RequestMsg(replyMsg, nc, &msg, timeout);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsConnection_Request(natsMsg **replyMsg, natsConnection *nc, const char *subj,
+                       const void *data, int dataLen, int64_t timeout)
+{
+    natsStatus s;
+    natsMsg    msg;
+
+    natsMsg_init(&msg, subj, (const char*) data, dataLen);
+    s = natsConnection_RequestMsg(replyMsg, nc, &msg, timeout);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
diff --git a/src/srvpool.c b/src/srvpool.c
new file mode 100644 (file)
index 0000000..46b0a1e
--- /dev/null
@@ -0,0 +1,468 @@
+// Copyright 2015-2020 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "natsp.h"
+
+#include "mem.h"
+#include "url.h"
+
+static void
+_freeSrv(natsSrv *srv)
+{
+    if (srv == NULL)
+        return;
+
+    natsUrl_Destroy(srv->url);
+    NATS_FREE(srv->tlsName);
+    NATS_FREE(srv);
+}
+
+static natsStatus
+_createSrv(natsSrv **newSrv, char *url, bool implicit, const char *tlsName)
+{
+    natsStatus  s = NATS_OK;
+    natsSrv     *srv = (natsSrv*) NATS_CALLOC(1, sizeof(natsSrv));
+
+    if (srv == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    srv->isImplicit = implicit;
+
+    s = natsUrl_Create(&(srv->url), url);
+    if ((s == NATS_OK) && (tlsName != NULL))
+    {
+        srv->tlsName = NATS_STRDUP(tlsName);
+        if (srv->tlsName == NULL)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+    }
+    if (s == NATS_OK)
+        *newSrv = srv;
+    else
+        _freeSrv(srv);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsSrv*
+natsSrvPool_GetCurrentServer(natsSrvPool *pool, const natsSrv *cur, int *index)
+{
+    natsSrv *s = NULL;
+    int     i;
+
+    for (i = 0; i < pool->size; i++)
+    {
+        s = pool->srvrs[i];
+        if (s == cur)
+        {
+            if (index != NULL)
+                *index = i;
+
+            return s;
+        }
+    }
+
+    if (index != NULL)
+        *index = -1;
+
+    return NULL;
+}
+
+// Pop the current server and put onto the end of the list. Select head of list as long
+// as number of reconnect attempts under MaxReconnect.
+natsSrv*
+natsSrvPool_GetNextServer(natsSrvPool *pool, natsOptions *opts, const natsSrv *cur)
+{
+    natsSrv *s = NULL;
+    int     i, j;
+
+    s = natsSrvPool_GetCurrentServer(pool, cur, &i);
+    if (i < 0)
+        return NULL;
+
+    // Shift left servers past current to the current's position
+    for (j = i; j < pool->size - 1; j++)
+        pool->srvrs[j] = pool->srvrs[j+1];
+
+    if ((opts->maxReconnect < 0)
+        || (s->reconnects < opts->maxReconnect))
+    {
+        // Move the current server to the back of the list
+        pool->srvrs[pool->size - 1] = s;
+    }
+    else
+    {
+        // Remove the server from the list
+        _freeSrv(s);
+        pool->size--;
+    }
+
+    if (pool->size <= 0)
+        return NULL;
+
+    return pool->srvrs[0];
+}
+
+void
+natsSrvPool_Destroy(natsSrvPool *pool)
+{
+    natsSrv *srv;
+    int     i;
+
+    if (pool == NULL)
+        return;
+
+    for (i = 0; i < pool->size; i++)
+    {
+        srv = pool->srvrs[i];
+        _freeSrv(srv);
+    }
+    natsStrHash_Destroy(pool->urls);
+    pool->urls = NULL;
+
+    NATS_FREE(pool->srvrs);
+    pool->srvrs = NULL;
+    pool->size  = 0;
+    NATS_FREE(pool->user);
+    NATS_FREE(pool->pwd);
+    NATS_FREE(pool);
+}
+
+static natsStatus
+_addURLToPool(natsSrvPool *pool, char *sURL, bool implicit, const char *tlsName)
+{
+    natsStatus  s;
+    natsSrv     *srv = NULL;
+    bool        addedToMap = false;
+    char        bareURL[256];
+
+    s = _createSrv(&srv, sURL, implicit, tlsName);
+    if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    // For and explicit URL, we will save the user info if one is provided
+    // and if not already done.
+    if (!implicit && (pool->user == NULL) && (srv->url->username != NULL))
+    {
+        DUP_STRING(s, pool->user, srv->url->username);
+        if ((s == NATS_OK) && !nats_IsStringEmpty(srv->url->password))
+            DUP_STRING(s, pool->pwd, srv->url->password);
+        if (s != NATS_OK)
+            return NATS_UPDATE_ERR_STACK(s);
+    }
+
+    // In the map, we need to add an URL that is just host:port
+    snprintf(bareURL, sizeof(bareURL), "%s:%d", srv->url->host, srv->url->port);
+    s = natsStrHash_Set(pool->urls, bareURL, true, (void*)1, NULL);
+    if (s == NATS_OK)
+    {
+        addedToMap = true;
+        if (pool->size + 1 > pool->cap)
+        {
+            natsSrv **newArray  = NULL;
+            int     newCap      = 2 * pool->cap;
+
+            newArray = (natsSrv**) NATS_REALLOC(pool->srvrs, newCap * sizeof(char*));
+            if (newArray == NULL)
+                s = nats_setDefaultError(NATS_NO_MEMORY);
+
+            if (s == NATS_OK)
+            {
+                pool->cap = newCap;
+                pool->srvrs = newArray;
+            }
+        }
+        if (s == NATS_OK)
+            pool->srvrs[pool->size++] = srv;
+    }
+    if (s != NATS_OK)
+    {
+        if (addedToMap)
+            natsStrHash_Remove(pool->urls, sURL);
+
+        _freeSrv(srv);
+    }
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static void
+_shufflePool(natsSrvPool *pool, int offset)
+{
+    int     i, j;
+    natsSrv *tmp;
+
+    if (pool->size <= offset+1)
+        return;
+
+    srand((unsigned int) nats_NowInNanoSeconds());
+
+    for (i = offset; i < pool->size; i++)
+    {
+        j = offset + rand() % (i + 1 - offset);
+        tmp = pool->srvrs[i];
+        pool->srvrs[i] = pool->srvrs[j];
+        pool->srvrs[j] = tmp;
+    }
+}
+
+natsStatus
+natsSrvPool_addNewURLs(natsSrvPool *pool, const natsUrl *curUrl, char **urls, int urlCount, const char *tlsName, bool *added)
+{
+    natsStatus  s       = NATS_OK;
+    char        url[256];
+    int         i, j;
+    char        *sport;
+    int         portPos;
+    bool        found;
+    bool        isLH;
+    natsStrHash *tmp = NULL;
+    natsSrv     *srv = NULL;
+
+    // Note about pool randomization: when the pool was first created,
+    // it was randomized (if allowed). We keep the order the same (removing
+    // implicit servers that are no longer sent to us). New URLs are sent
+    // to us in no specific order so don't need extra randomization.
+
+    *added = false;
+
+    // Transform what we got to a map for easy lookups
+    s = natsStrHash_Create(&tmp, urlCount);
+    if (s != NATS_OK)
+        return  NATS_UPDATE_ERR_STACK(s);
+
+    for (i=0; (s == NATS_OK) && (i<urlCount); i++)
+    {
+        s = natsStrHash_Set(tmp, urls[i], false, (void*)1, NULL);
+    }
+
+    // Walk the pool and removed the implicit servers that are no longer in the
+    // given array/map
+    for (i=0; i<pool->size; i++)
+    {
+        void *inInfo= NULL;
+
+        srv = pool->srvrs[i];
+        snprintf(url, sizeof(url), "%s:%d", srv->url->host, srv->url->port);
+        // Check if this URL is in the INFO protocol
+        inInfo = natsStrHash_Get(tmp, url);
+        // Remove from the temp map so that at the end we are left with only
+        // new (or restarted) servers that need to be added to the pool.
+        natsStrHash_Remove(tmp, url);
+        // Keep servers that were set through Options, but also the one that
+        // we are currently connected to (even if it is a discovered server).
+        if (!(srv->isImplicit) || (srv->url == curUrl))
+        {
+            continue;
+        }
+        if (!inInfo)
+        {
+            // Remove from server pool. Keep current order.
+
+            // Shift left servers past current to the current's position
+            for (j = i; j < pool->size - 1; j++)
+            {
+                pool->srvrs[j] = pool->srvrs[j+1];
+            }
+            _freeSrv(srv);
+            pool->size--;
+            i--;
+        }
+    }
+
+    // If there are any left in the tmp map, these are new (or restarted) servers
+    // and need to be added to the pool.
+    if (s == NATS_OK)
+    {
+        natsStrHashIter iter;
+        char            *curl = NULL;
+
+        natsStrHashIter_Init(&iter, tmp);
+        while ((s == NATS_OK) && natsStrHashIter_Next(&iter, &curl, NULL))
+        {
+            // Before adding, check if this is a new (as in never seen) URL.
+            // This is used to figure out if we invoke the DiscoveredServersCB
+
+            isLH  = false;
+            found = false;
+
+            // Consider localhost:<port>, 127.0.0.1:<port> and [::1]:<port>
+            // all the same.
+            sport = strrchr(curl, ':');
+            portPos = (int) (sport - curl);
+            if (((nats_strcasestr(curl, "localhost") == curl) && (portPos == 9))
+                    || (strncmp(curl, "127.0.0.1", portPos) == 0)
+                    || (strncmp(curl, "[::1]", portPos) == 0))
+            {
+                isLH = ((curl[0] == 'l') || (curl[0] == 'L'));
+
+                snprintf(url, sizeof(url), "localhost%s", sport);
+                found = (natsStrHash_Get(pool->urls, url) != NULL);
+                if (!found)
+                {
+                    snprintf(url, sizeof(url), "127.0.0.1%s", sport);
+                    found = (natsStrHash_Get(pool->urls, url) != NULL);
+                }
+                if (!found)
+                {
+                    snprintf(url, sizeof(url), "[::1]%s", sport);
+                    found = (natsStrHash_Get(pool->urls, url) != NULL);
+                }
+            }
+            else
+            {
+                found = (natsStrHash_Get(pool->urls, curl) != NULL);
+            }
+
+            snprintf(url, sizeof(url), "nats://%s", curl);
+            if (!found)
+            {
+                // Make sure that localhost URL is always stored in lower case.
+                if (isLH)
+                    snprintf(url, sizeof(url), "nats://localhost%s", sport);
+
+                *added = true;
+            }
+            s = _addURLToPool(pool, url, true, tlsName);
+        }
+        natsStrHashIter_Done(&iter);
+        if ((s == NATS_OK) && added && pool->randomize)
+            _shufflePool(pool, 1);
+    }
+
+    natsStrHash_Destroy(tmp);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+// Create the server pool using the options given.
+// We will place a Url option first, followed by any
+// Server Options. We will randomize the server pool unlesss
+// the NoRandomize flag is set.
+natsStatus
+natsSrvPool_Create(natsSrvPool **newPool, natsOptions *opts)
+{
+    natsStatus  s        = NATS_OK;
+    natsSrvPool *pool    = NULL;
+    int         poolSize;
+    int         i;
+
+    poolSize  = (opts->url != NULL ? 1 : 0);
+    poolSize += opts->serversCount;
+
+    // If the pool is going to be empty, we will add the default URL.
+    if (poolSize == 0)
+        poolSize = 1;
+
+    pool = (natsSrvPool*) NATS_CALLOC(1, sizeof(natsSrvPool));
+    if (pool == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    pool->srvrs = (natsSrv**) NATS_CALLOC(poolSize, sizeof(natsSrv*));
+    if (pool->srvrs == NULL)
+    {
+        NATS_FREE(pool);
+        return nats_setDefaultError(NATS_NO_MEMORY);
+    }
+    // Set the current capacity. The array of urls may have to grow in
+    // the future.
+    pool->cap = poolSize;
+    pool->randomize = !opts->noRandomize;
+
+    // Map that helps find out if an URL is already known.
+    s = natsStrHash_Create(&(pool->urls), poolSize);
+
+    // Add URLs from Options' Servers
+    for (i=0; (s == NATS_OK) && (i < opts->serversCount); i++)
+        s = _addURLToPool(pool, opts->servers[i], false, NULL);
+
+    if (s == NATS_OK)
+    {
+        // Randomize if allowed to
+        if (pool->randomize)
+            _shufflePool(pool, 0);
+    }
+
+    // Normally, if this one is set, Options.Servers should not be,
+    // but we always allowed that, so continue to do so.
+    if ((s == NATS_OK) && (opts->url != NULL))
+    {
+        // Add to the end of the array
+        s = _addURLToPool(pool, opts->url, false, NULL);
+        if ((s == NATS_OK) && (pool->size > 1))
+        {
+            // Then swap it with first to guarantee that Options.Url is tried first.
+            natsSrv *opstUrl = pool->srvrs[pool->size-1];
+
+            pool->srvrs[pool->size-1] = pool->srvrs[0];
+            pool->srvrs[0] = opstUrl;
+        }
+    }
+    else if ((s == NATS_OK) && (pool->size == 0))
+    {
+        // Place default URL if pool is empty.
+        s = _addURLToPool(pool, (char*) NATS_DEFAULT_URL, false, NULL);
+    }
+
+    if (s == NATS_OK)
+        *newPool = pool;
+    else
+        natsSrvPool_Destroy(pool);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsSrvPool_GetServers(natsSrvPool *pool, bool implicitOnly, char ***servers, int *count)
+{
+    natsStatus  s       = NATS_OK;
+    char        **srvrs = NULL;
+    natsSrv     *srv;
+    natsUrl     *url;
+    int         i;
+    int         discovered = 0;
+
+    if (pool->size == 0)
+    {
+        *servers = NULL;
+        *count   = 0;
+        return NATS_OK;
+    }
+
+    srvrs = (char **) NATS_CALLOC(pool->size, sizeof(char*));
+    if (srvrs == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    for (i=0; ((s == NATS_OK) && (i<pool->size)); i++)
+    {
+        srv = pool->srvrs[i];
+        if (implicitOnly && !srv->isImplicit)
+            continue;
+        url = srv->url;
+        if (nats_asprintf(&(srvrs[discovered]), "nats://%s:%d", url->host, url->port) == -1)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+        else
+            discovered++;
+    }
+    if (s == NATS_OK)
+    {
+        *servers = srvrs;
+        *count   = discovered;
+    }
+    else
+    {
+        for (i=0; i<discovered; i++)
+            NATS_FREE(srvrs[i]);
+        NATS_FREE(srvrs);
+    }
+    return NATS_UPDATE_ERR_STACK(s);
+}
diff --git a/src/srvpool.h b/src/srvpool.h
new file mode 100644 (file)
index 0000000..f1fc400
--- /dev/null
@@ -0,0 +1,84 @@
+// Copyright 2015-2019 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef SRVPOOL_H_
+#define SRVPOOL_H_
+
+#include "status.h"
+#include "hash.h"
+
+// Tracks individual backend servers.
+typedef struct __natsSrv
+{
+    natsUrl     *url;
+    bool        didConnect;
+    bool        isImplicit;
+    int         reconnects;
+    char        *tlsName;
+    int         lastAuthErrCode;
+
+} natsSrv;
+
+typedef struct __natsSrvPool
+{
+    natsSrv     **srvrs;
+    natsStrHash *urls;
+    int         size;
+    int         cap;
+    bool        randomize;
+    char        *user;
+    char        *pwd;
+
+} natsSrvPool;
+
+// This is defined in natsp.h, but natsp.h includes this file. Alternatively,
+// we would need to move the defs above in natsp.h.
+struct __natsOptions;
+
+#define natsSrvPool_GetSize(p)              ((p)->size)
+#define natsSrvPool_GetSrv(p,i)             ((p)->srvrs[(i)])
+#define natsSrvPool_SetSrvDidConnect(p,i,c) (natsSrvPool_GetSrv((p),(i))->didConnect=(c))
+#define natsSrvPool_SetSrvReconnects(p,i,r) (natsSrvPool_GetSrv((p),(i))->reconnects=(r))
+
+// Create the server pool using the options given.
+// We will place a Url option first, followed by any
+// Server Options. We will randomize the server pool unlesss
+// the NoRandomize flag is set.
+natsStatus
+natsSrvPool_Create(natsSrvPool **newPool, struct __natsOptions *opts);
+
+// Return the server corresponding to given `cur` with current position
+// in the pool.
+natsSrv*
+natsSrvPool_GetCurrentServer(natsSrvPool *pool, const natsSrv *cur, int *index);
+
+// Pop the current server and put onto the end of the list. Select head of list as long
+// as number of reconnect attempts under MaxReconnect.
+natsSrv*
+natsSrvPool_GetNextServer(natsSrvPool *pool, struct __natsOptions *opts, const natsSrv *cur);
+
+// Go through the list of the given URLs and add them to the pool if not already
+// present.
+natsStatus
+natsSrvPool_addNewURLs(natsSrvPool *pool, const natsUrl *curUrl, char **urls, int urlCount, const char *tlsName, bool *added);
+
+// Returns an array of servers (as a copy). User is responsible to free the memory.
+natsStatus
+natsSrvPool_GetServers(natsSrvPool *pool, bool implicitOnly, char ***servers, int *count);
+
+// Destroy the pool, freeing up all memory used.
+void
+natsSrvPool_Destroy(natsSrvPool *pool);
+
+
+#endif /* SRVPOOL_H_ */
diff --git a/src/stan/conn.c b/src/stan/conn.c
new file mode 100644 (file)
index 0000000..50aaec9
--- /dev/null
@@ -0,0 +1,871 @@
+// Copyright 2018-2019 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "conn.h"
+#include "copts.h"
+#include "pub.h"
+
+#include "../asynccb.h"
+#include "../conn.h"
+#include "../sub.h"
+
+// Client send connID in ConnectRequest and PubMsg, and server
+// listens and responds to client PINGs. The validity of the
+// connection (based on connID) is checked on incoming PINGs.
+#define PROTOCOL_ONE    (1)
+
+#ifdef DEV_MODE
+// For type safety
+
+static void _retain(stanConnection *sc)  { sc->refs++; }
+static void _release(stanConnection *sc) { sc->refs--; }
+
+void stanConn_Lock(stanConnection *nc)   { natsMutex_Lock(nc->mu);   }
+void stanConn_Unlock(stanConnection *nc) { natsMutex_Unlock(nc->mu); }
+
+#else
+// We know what we are doing :-)
+
+#define _retain(c)  ((c)->refs++)
+#define _release(c) ((c)->refs--)
+
+#endif // DEV_MODE
+
+bool testAllowMillisecInPings = false;
+
+#if defined(__arm__)
+int MEMALIGN = (int)(__alignof(void*));
+#else
+int MEMALIGN = 1;
+#endif
+
+static void
+_freeConn(stanConnection *sc)
+{
+    if (sc == NULL)
+        return;
+
+    natsSubscription_Destroy(sc->hbSubscription);
+    natsSubscription_Destroy(sc->ackSubscription);
+    natsSubscription_Destroy(sc->pingSub);
+    natsConn_destroy(sc->nc, false);
+    natsInbox_Destroy(sc->hbInbox);
+    natsStrHash_Destroy(sc->pubAckMap);
+    natsCondition_Destroy(sc->pubAckCond);
+    natsCondition_Destroy(sc->pubAckMaxInflightCond);
+    stanConnOptions_Destroy(sc->opts);
+    NATS_FREE(sc->pubMsgBuf);
+    NATS_FREE(sc->pubSubjBuf);
+    natsMutex_Destroy(sc->pubAckMu);
+    natsTimer_Destroy(sc->pubAckTimer);
+    natsPBufAllocator_Destroy(sc->pubAckAllocator);
+    natsTimer_Destroy(sc->pingTimer);
+    natsMutex_Destroy(sc->pingMu);
+    natsMutex_Destroy(sc->mu);
+    NATS_FREE(sc->clusterID);
+    NATS_FREE(sc->clientID);
+    NATS_FREE(sc->connID);
+    NATS_FREE(sc->pubPrefix);
+    NATS_FREE(sc->subRequests);
+    NATS_FREE(sc->unsubRequests);
+    NATS_FREE(sc->subCloseRequests);
+    NATS_FREE(sc->closeRequests);
+    NATS_FREE(sc->ackSubject);
+    NATS_FREE(sc->pingBytes);
+    NATS_FREE(sc->pingRequests);
+    NATS_FREE(sc->pingInbox);
+    NATS_FREE(sc->connLostErrTxt);
+
+    NATS_FREE(sc);
+
+    natsLib_Release();
+}
+
+void
+stanConn_retain(stanConnection *sc)
+{
+    if (sc == NULL)
+        return;
+
+    stanConn_Lock(sc);
+    sc->refs++;
+    stanConn_Unlock(sc);
+}
+
+void
+stanConn_release(stanConnection *sc)
+{
+    int refs = 0;
+
+    if (sc == NULL)
+        return;
+
+    stanConn_Lock(sc);
+    refs = --(sc->refs);
+    stanConn_Unlock(sc);
+
+    if (refs == 0)
+        _freeConn(sc);
+}
+
+
+static void
+_releaseStanConnCB(void *closure)
+{
+    stanConnection *sc = (stanConnection*) closure;
+    stanConn_release(sc);
+}
+
+static void
+_processHeartBeat(natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure)
+{
+    // No payload assumed, just reply.
+    natsConnection_Publish(nc, natsMsg_GetReply(msg), NULL, 0);
+    natsMsg_Destroy(msg);
+}
+
+static void
+_closeDueToPing(stanConnection *sc, const char* errTxt)
+{
+    natsStatus s = NATS_OK;
+
+    stanConnClose(sc, false);
+
+    stanConn_Lock(sc);
+    // Make a copy
+    DUP_STRING(s, sc->connLostErrTxt, errTxt);
+    stanConn_Unlock(sc);
+
+    if (s == NATS_OK)
+        natsAsyncCb_PostStanConnLostHandler(sc);
+}
+
+void
+stanConn_defaultConnLostHandler(stanConnection *sc, const char* errorTxt, void *closure)
+{
+    stanConn_Lock(sc);
+    fprintf(stderr, "Connection permanently lost: clusterID=%s clientID=%s error=%s\n", sc->clusterID, sc->clientID, errorTxt);
+    stanConn_Unlock(sc);
+}
+
+static void
+_processPingResponse(natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure)
+{
+    stanConnection  *sc  = (stanConnection*) closure;
+
+    if (natsMsg_GetDataLength(msg) > 0)
+    {
+        Pb__PingResponse *pingResp = NULL;
+        char             *errTxt = NULL;
+
+        pingResp = pb__ping_response__unpack(NULL,
+                (size_t) natsMsg_GetDataLength(msg),
+                (const uint8_t*) natsMsg_GetData(msg));
+        if ((pingResp != NULL) && (strlen(pingResp->error) > 0))
+            errTxt = NATS_STRDUP(pingResp->error);
+
+        pb__ping_response__free_unpacked(pingResp, NULL);
+
+        if (errTxt != NULL)
+        {
+            _closeDueToPing(sc, (const char*) errTxt);
+            NATS_FREE(errTxt);
+            natsMsg_Destroy(msg);
+            return;
+        }
+    }
+    // Check for no responders
+    else if (natsMsg_IsNoResponders(msg))
+    {
+        natsMsg_Destroy(msg);
+        return;
+    }
+    // Do not attempt to decrement, simply reset to 0.
+    natsMutex_Lock(sc->pingMu);
+    sc->pingOut = 0;
+    natsMutex_Unlock(sc->pingMu);
+    natsMsg_Destroy(msg);
+}
+
+static void
+_pingServer(natsTimer *timer, void* closure)
+{
+    natsStatus      s;
+    stanConnection  *sc = (stanConnection*) closure;
+
+    natsMutex_Lock(sc->pingMu);
+    if (sc->closed)
+    {
+        natsMutex_Unlock(sc->pingMu);
+        return;
+    }
+    sc->pingOut++;
+    if (sc->pingOut > sc->opts->pingMaxOut)
+    {
+        natsMutex_Unlock(sc->pingMu);
+        _closeDueToPing(sc, STAN_ERR_MAX_PINGS);
+        return;
+    }
+    natsMutex_Unlock(sc->pingMu);
+
+    // Ok to reference these connection's fields outside of the lock since they
+    // are immutable and valid until the connection is freed.
+
+    s = natsConnection_PublishRequest(sc->nc, sc->pingRequests, sc->pingInbox,
+            (const void*) sc->pingBytes, sc->pingBytesLen);
+    if (s == NATS_CONNECTION_CLOSED)
+        _closeDueToPing(sc, natsStatus_GetText(s));
+}
+
+static void
+_pingTimerStopCB(natsTimer *timer, void* closure)
+{
+    stanConnection *sc = (stanConnection*) closure;
+    stanConn_release(sc);
+}
+
+static natsStatus
+_createPingBytes(stanConnection *sc)
+{
+    Pb__Ping    ping;
+    int         size = 0;
+    int         packedSize = 0;
+
+    pb__ping__init(&ping);
+    ping.connid.data = (uint8_t*) sc->connID;
+    ping.connid.len = (size_t) sc->connIDLen;
+    size = (int) pb__ping__get_packed_size(&ping);
+    if (size == 0)
+        return nats_setError(NATS_ERR, "%s", "ping protocol packed size is 0");
+
+    sc->pingBytes = NATS_MALLOC(size);
+    if (sc->pingBytes == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    packedSize = (int) pb__ping__pack(&ping, (uint8_t*) sc->pingBytes);
+    if (size != packedSize)
+        return nats_setError(NATS_ERR, "ping protocol computed packed size is %d, got %v",
+                size, packedSize);
+
+    sc->pingBytesLen = size;
+    return NATS_OK;
+}
+
+natsStatus
+stanConnection_Connect(stanConnection **newConn, const char* clusterID, const char* clientID, stanConnOptions *opts)
+{
+    stanConnection      *sc = NULL;
+    natsStatus          s;
+    natsSubscription    *pingSub = NULL;
+    char                *pingInbox = NULL;
+    bool                unsubPingSub = false;
+
+    if ((newConn == NULL)
+            || (clusterID == NULL)
+            || (clusterID[0] == '\0')
+            || (clientID == NULL)
+            || (clientID[0] == '\0'))
+    {
+        return nats_setDefaultError(NATS_INVALID_ARG);
+    }
+
+    s = nats_Open(-1);
+    if (s != NATS_OK)
+        return s;
+
+    sc = NATS_CALLOC(1, sizeof(stanConnection));
+    if (sc == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    s = natsMutex_Create(&sc->mu);
+    if (s != NATS_OK)
+    {
+        NATS_FREE(sc);
+        return NATS_UPDATE_ERR_STACK(s);
+    }
+
+    natsLib_Retain();
+
+    // Set to 1 so that release free the connection in case of error after this point.
+    sc->refs = 1;
+
+    // Set options
+    if (opts != NULL)
+        s = stanConnOptions_clone(&sc->opts, opts);
+    else
+        s = stanConnOptions_Create(&sc->opts);
+
+    if ((s == NATS_OK) && (sc->opts->ncOpts == NULL))
+        s = natsOptions_Create(&sc->opts->ncOpts);
+
+    // Override NATS connections (but we work on our clone or private one,
+    // so that does not affect user's provided options).
+    if (s == NATS_OK)
+        s = natsOptions_SetName(sc->opts->ncOpts, clientID);
+    if (s == NATS_OK)
+        s = natsOptions_SetReconnectBufSize(sc->opts->ncOpts, 0);
+    if (s == NATS_OK)
+        s = natsOptions_SetMaxReconnect(sc->opts->ncOpts, -1);
+    if (s == NATS_OK)
+        s = natsOptions_SetAllowReconnect(sc->opts->ncOpts, true);
+
+    // We don't support SetRetryOnFailedConnect for now
+    if ((s == NATS_OK) && (opts != NULL))
+        s = natsOptions_SetRetryOnFailedConnect(sc->opts->ncOpts, false, NULL, NULL);
+
+    // Set the URL if provided through STAN options
+    if ((s == NATS_OK) && (sc->opts->url != NULL))
+        s = natsOptions_SetURL(sc->opts->ncOpts, sc->opts->url);
+
+    // Connect to NATS
+    if (s == NATS_OK)
+        s = natsConnection_Connect(&sc->nc, sc->opts->ncOpts);
+
+    if (s == NATS_OK)
+    {
+        natsConn_Lock(sc->nc);
+        sc->nc->stanOwned = true;
+        natsConn_Unlock(sc->nc);
+
+        sc->pubAckMaxInflightThreshold = (int) ((float) sc->opts->maxPubAcksInflight * sc->opts->maxPubAcksInFlightPercentage);
+        if (sc->pubAckMaxInflightThreshold <= 0)
+            sc->pubAckMaxInflightThreshold = 1;
+    }
+
+    // Make a copy of user provided clientID
+    IF_OK_DUP_STRING(s, sc->clientID, clientID);
+    IF_OK_DUP_STRING(s, sc->clusterID, clusterID);
+
+    if (s == NATS_OK)
+    {
+        char tmpNUID[NUID_BUFFER_LEN + 1];
+
+        s = natsNUID_Next(tmpNUID, NUID_BUFFER_LEN + 1);
+        IF_OK_DUP_STRING(s, sc->connID, tmpNUID);
+        if (s == NATS_OK)
+            sc->connIDLen = (int) strlen(sc->connID);
+    }
+
+    // Create maps, etc..
+    if (s == NATS_OK)
+        s = natsStrHash_Create(&sc->pubAckMap, 16);
+    if (s == NATS_OK)
+        s = natsCondition_Create(&sc->pubAckCond);
+    if (s == NATS_OK)
+        s = natsCondition_Create(&sc->pubAckMaxInflightCond);
+    if (s == NATS_OK)
+        s = natsMutex_Create(&sc->pubAckMu);
+    if (s == NATS_OK)
+        s = natsPBufAllocator_Create(&sc->pubAckAllocator, sizeof(Pb__PubAck), 2);
+    if (s == NATS_OK)
+        s = natsMutex_Create(&sc->pingMu);
+
+    // Create HB inbox and a subscription on that
+    if (s == NATS_OK)
+        s = natsConn_newInbox(sc->nc, &sc->hbInbox);
+    if (s == NATS_OK)
+    {
+        s = natsConn_subscribeNoPool(&sc->hbSubscription, sc->nc, sc->hbInbox, _processHeartBeat, NULL);
+        if (s == NATS_OK)
+        {
+            natsSubscription_SetPendingLimits(sc->hbSubscription, -1, -1);
+            sc->refs++;
+            s = natsSubscription_SetOnCompleteCB(sc->hbSubscription, _releaseStanConnCB, (void*) sc);
+            if (s != NATS_OK)
+                sc->refs--;
+        }
+    }
+    // Prepare a subscription on ping responses
+    if (s == NATS_OK)
+    {
+        s = natsConn_newInbox(sc->nc, (natsInbox**) &pingInbox);
+        if (s == NATS_OK)
+            s = natsConn_subscribeNoPool(&pingSub, sc->nc, pingInbox, _processPingResponse, (void*) sc);
+        if (s == NATS_OK)
+        {
+            // Mark this as needing a destroy if we end up not using PINGs.
+            unsubPingSub = true;
+
+            natsSubscription_SetPendingLimits(pingSub, -1, -1);
+            sc->refs++;
+            s = natsSubscription_SetOnCompleteCB(pingSub, _releaseStanConnCB, (void*) sc);
+            if (s != NATS_OK)
+                sc->refs--;
+        }
+    }
+
+    // Send the connection request
+    if (s == NATS_OK)
+    {
+        Pb__ConnectRequest  connReq;
+        int                 reqSize   = 0;
+        char                *reqBytes = NULL;
+        natsMsg             *replyMsg = NULL;
+        char                discoverySubj[256];
+
+        pb__connect_request__init(&connReq);
+        connReq.clientid = sc->clientID;
+        connReq.connid.data = (uint8_t*) sc->connID;
+        connReq.connid.len = sc->connIDLen;
+        connReq.heartbeatinbox = sc->hbInbox;
+        connReq.protocol = PROTOCOL_ONE;
+        connReq.pinginterval = sc->opts->pingInterval;
+        connReq.pingmaxout = sc->opts->pingMaxOut;
+
+        reqSize = (int) pb__connect_request__get_packed_size(&connReq);
+        if (reqSize == 0)
+        {
+            s = nats_setError(NATS_ERR, "%s", "connection request protocol packed size is 0");
+        }
+        else
+        {
+            reqBytes = NATS_MALLOC(reqSize);
+            if (reqBytes == NULL)
+                s = nats_setDefaultError(NATS_NO_MEMORY);
+        }
+        if (s == NATS_OK)
+        {
+            int packedSize = (int) pb__connect_request__pack(&connReq, (uint8_t*) reqBytes);
+            if (reqSize != packedSize)
+            {
+                s = nats_setError(NATS_ERR, "connect request computed packed size is %d, got %d",
+                        reqSize, packedSize);
+            }
+            else
+            {
+                snprintf(discoverySubj, sizeof(discoverySubj), "%s.%s", sc->opts->discoveryPrefix, clusterID);
+                s = natsConnection_Request(&replyMsg, sc->nc, discoverySubj, reqBytes, reqSize, sc->opts->connTimeout);
+                if (s == NATS_TIMEOUT)
+                    NATS_UPDATE_ERR_TXT("%s", STAN_ERR_CONNECT_REQUEST_TIMEOUT);
+                else if (s == NATS_NO_RESPONDERS)
+                    NATS_UPDATE_ERR_TXT("%s", STAN_ERR_CONNECT_REQUEST_NO_RESP);
+            }
+            NATS_FREE(reqBytes);
+        }
+        if (s == NATS_OK)
+        {
+            Pb__ConnectResponse *connResp = NULL;
+
+            connResp = pb__connect_response__unpack(NULL,
+                    (size_t) natsMsg_GetDataLength(replyMsg),
+                    (const uint8_t*) natsMsg_GetData(replyMsg));
+            if (connResp == NULL)
+                s = nats_setError(NATS_ERR, "%s", "unable to decode connection response");
+
+            if ((s == NATS_OK) && (strlen(connResp->error) > 0))
+                s = nats_setError(NATS_ERR, "%s", connResp->error);
+
+            // Duplicate strings
+            IF_OK_DUP_STRING(s, sc->pubPrefix, connResp->pubprefix);
+            IF_OK_DUP_STRING(s, sc->subRequests, connResp->subrequests);
+            IF_OK_DUP_STRING(s, sc->unsubRequests, connResp->unsubrequests);
+            IF_OK_DUP_STRING(s, sc->subCloseRequests, connResp->subcloserequests);
+            IF_OK_DUP_STRING(s, sc->closeRequests, connResp->closerequests);
+
+            if (s == NATS_OK)
+                sc->pubPrefixLen = (int) strlen(sc->pubPrefix);
+
+            // Do this with servers which are at least at PROTOCOL_ONE.
+            if ((s == NATS_OK) && (connResp->protocol >= PROTOCOL_ONE))
+            {
+                // Note that in the future server may override client ping
+                // interval value sent in ConnectRequest, so use the
+                // value in ConnectResponse to decide if we send PINGs
+                // and at what interval.
+                // In tests, the interval could be negative to indicate
+                // milliseconds.
+                if (connResp->pinginterval != 0)
+                {
+                    int64_t interval = 0;
+
+                    // These will be immutable.
+                    DUP_STRING(s, sc->pingRequests, connResp->pingrequests);
+                    IF_OK_DUP_STRING(s, sc->pingInbox, pingInbox);
+                    if (s == NATS_OK)
+                        s = _createPingBytes(sc);
+
+                    if (s == NATS_OK)
+                    {
+                        // In test, it is possible that we get a negative value
+                        // to represent milliseconds.
+                        if (testAllowMillisecInPings && (connResp->pinginterval < 0))
+                            interval = sc->opts->pingInterval * -1;
+                        else
+                            interval = sc->opts->pingInterval * 1000;
+
+                        sc->opts->pingMaxOut = (int) connResp->pingmaxout;
+                    }
+
+                    if (s == NATS_OK)
+                    {
+                        // Set the timer now that we are set. Use lock to create
+                        // synchronization point.
+                        natsMutex_Lock(sc->pingMu);
+                        s = natsTimer_Create(&sc->pingTimer, _pingServer, _pingTimerStopCB,
+                                interval, (void*) sc);
+                        if (s == NATS_OK)
+                            sc->refs++;
+                        natsMutex_Unlock(sc->pingMu);
+                    }
+
+                    if (s == NATS_OK)
+                    {
+                        sc->pingSub = pingSub;
+                        unsubPingSub = false;
+                    }
+                }
+            }
+
+            pb__connect_response__free_unpacked(connResp, NULL);
+
+            natsMsg_Destroy(replyMsg);
+        }
+    }
+    // Setup (pub) ACK subscription
+    if (s == NATS_OK)
+    {
+        char tmp[11 + NUID_BUFFER_LEN + 1];
+
+        snprintf(tmp, sizeof(tmp), "%s", "_STAN.acks.");
+        s = natsNUID_Next(tmp+11, NUID_BUFFER_LEN + 1);
+        IF_OK_DUP_STRING(s, sc->ackSubject, (char*)tmp);
+
+        if (s == NATS_OK)
+            s = natsConn_subscribeNoPool(&sc->ackSubscription, sc->nc, sc->ackSubject, stanProcessPubAck, (void*) sc);
+        if (s == NATS_OK)
+        {
+            natsSubscription_SetPendingLimits(sc->ackSubscription, -1, -1);
+            sc->refs++;
+            s = natsSubscription_SetOnCompleteCB(sc->ackSubscription, _releaseStanConnCB, (void*) sc);
+            if (s != NATS_OK)
+                sc->refs--;
+        }
+    }
+
+    if (unsubPingSub)
+        natsSubscription_Destroy(pingSub);
+
+    if (s == NATS_OK)
+        *newConn = sc;
+    else
+    {
+        if (sc->nc != NULL)
+            natsConn_close(sc->nc);
+
+        stanConn_release(sc);
+    }
+
+    NATS_FREE(pingInbox);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+stanConnection_GetNATSConnection(stanConnection *sc, natsConnection **nc)
+{
+    natsConnection *snc = NULL;
+
+    if ((sc == NULL) || (nc == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    stanConn_Lock(sc);
+    if (sc->closed)
+    {
+        stanConn_Unlock(sc);
+        return nats_setDefaultError(NATS_CONNECTION_CLOSED);
+    }
+    snc = sc->nc;
+    // For the first, retain the stan connection
+    if (sc->ncRefs++ == 0)
+        _retain(sc);
+    stanConn_Unlock(sc);
+
+    *nc = snc;
+    return NATS_OK;
+}
+
+void
+stanConnection_ReleaseNATSConnection(stanConnection *sc)
+{
+    bool doRelease = false;
+
+    if (sc == NULL)
+        return;
+
+    stanConn_Lock(sc);
+    // Make sure this does not go below zero
+    if (sc->ncRefs > 0)
+        doRelease = (--sc->ncRefs == 0);
+    stanConn_Unlock(sc);
+
+    if (doRelease)
+        stanConn_release(sc);
+}
+
+natsStatus
+stanConnClose(stanConnection *sc, bool sendProto)
+{
+    natsStatus          s = NATS_OK;
+    Pb__CloseRequest    closeReq;
+    int                 reqSize   = 0;
+    char                *reqBytes = NULL;
+    natsMsg             *replyMsg = NULL;
+    natsConnection      *nc       = NULL;
+    char                *cid      = NULL;
+    char                *closeSubj= NULL;
+    int64_t             timeout   = 0;
+
+    // Need to release publish call if applicable.
+
+    // Do not grab the connection lock yet since a publish call
+    // may be holding the connection lock but wait on the
+    // pubAckMaxInflightCond condition variable.
+    natsMutex_Lock(sc->pubAckMu);
+    if (!sc->pubAckClosed)
+    {
+        sc->pubAckClosed = true;
+        natsCondition_Broadcast(sc->pubAckMaxInflightCond);
+    }
+    natsMutex_Unlock(sc->pubAckMu);
+
+    stanConn_Lock(sc);
+    if (sc->closed)
+    {
+        stanConn_Unlock(sc);
+        return NATS_OK;
+    }
+    natsMutex_Lock(sc->pubAckMu);
+    natsMutex_Lock(sc->pingMu);
+    sc->closed = true;
+    natsMutex_Unlock(sc->pingMu);
+    // Release possible blocked publish calls
+    natsCondition_Broadcast(sc->pubAckCond);
+    natsMutex_Unlock(sc->pubAckMu);
+
+    natsSubscription_Unsubscribe(sc->hbSubscription);
+    natsSubscription_Unsubscribe(sc->ackSubscription);
+
+    // If there is a timer set, make it trigger soon, this will
+    // release the pending pubAcks for async publish calls.
+    if (sc->pubAckTimer != NULL)
+        natsTimer_Reset(sc->pubAckTimer, 1);
+
+    if (sc->pingTimer != NULL)
+        natsTimer_Stop(sc->pingTimer);
+
+    nc        = sc->nc;
+    cid       = sc->clientID;
+    closeSubj = sc->closeRequests;
+    timeout   = sc->opts->connTimeout;
+    stanConn_Unlock(sc);
+
+    if (sendProto)
+    {
+        pb__close_request__init(&closeReq);
+        closeReq.clientid = cid;
+
+        reqSize = (int) pb__close_request__get_packed_size(&closeReq);
+        if (reqSize == 0)
+        {
+            s = nats_setError(NATS_ERR, "%s", "connection close protocol packed size is 0");
+        }
+        else
+        {
+            reqBytes = NATS_MALLOC(reqSize);
+            if (reqBytes == NULL)
+                s = nats_setDefaultError(NATS_NO_MEMORY);
+            if (s == NATS_OK)
+            {
+                int packedSize = (int) pb__close_request__pack(&closeReq, (uint8_t*) reqBytes);
+                if (reqSize != packedSize)
+                {
+                    s = nats_setError(NATS_ERR, "connection close request computed packed size is %d, got %v",
+                            reqSize, packedSize);
+                }
+                else
+                {
+                    s = natsConnection_Request(&replyMsg, nc, closeSubj, reqBytes, reqSize, timeout);
+                    if (s == NATS_TIMEOUT)
+                        NATS_UPDATE_ERR_TXT("%s", STAN_ERR_CLOSE_REQUEST_TIMEOUT);
+                    else if (s == NATS_NO_RESPONDERS)
+                        NATS_UPDATE_ERR_TXT("%s", STAN_ERR_CLOSE_REQUEST_NO_RESP);
+                }
+
+                NATS_FREE(reqBytes);
+            }
+            if (s == NATS_OK)
+            {
+                Pb__CloseResponse *closeResp = NULL;
+
+                closeResp = pb__close_response__unpack(NULL,
+                        (size_t) natsMsg_GetDataLength(replyMsg),
+                        (const uint8_t*) natsMsg_GetData(replyMsg));
+
+                if ((closeResp != NULL) && (strlen(closeResp->error) > 0))
+                    s = nats_setError(NATS_ERR, "%s", closeResp->error);
+
+                pb__close_response__free_unpacked(closeResp, NULL);
+                natsMsg_Destroy(replyMsg);
+            }
+        }
+    }
+
+    natsConn_close(sc->nc);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+stanConnection_Close(stanConnection *sc)
+{
+    natsStatus s;
+
+    if (sc == NULL)
+        return NATS_OK;
+
+    s = stanConnClose(sc, true);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+stanConnection_Destroy(stanConnection *sc)
+{
+    natsStatus s;
+
+    if (sc == NULL)
+        return NATS_OK;
+
+    s = stanConnClose(sc, true);
+    stanConn_release(sc);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+expandBuf(char **buf, int *cap, int newcap)
+{
+    char *newBuf = NULL;
+
+    if (*buf == NULL)
+        newBuf = NATS_MALLOC(newcap);
+    else
+        newBuf = NATS_REALLOC(*buf, newcap);
+    if (newBuf == NULL)
+        return nats_setError(NATS_NO_MEMORY, "unable to expand buffer from %d to %d", *cap, newcap);
+
+    *buf = newBuf; // possibly same if realloc did it in place
+    *cap = newcap;
+
+    return NATS_OK;
+}
+
+static int
+_roundUp(int val)
+{
+    return ((val+(MEMALIGN-1))/MEMALIGN)*MEMALIGN;
+}
+
+static void*
+_pbufAlloc(void *allocator, size_t size)
+{
+    natsPBufAllocator   *a     = (natsPBufAllocator*) allocator;
+    int                 needed = MEMALIGN + _roundUp((int) size);
+    char                *ptr;
+
+    if (needed > a->remaining)
+    {
+        ptr = NATS_MALLOC(needed);
+        ptr[0] = '1';
+    }
+    else
+    {
+        ptr = a->buf+a->used;
+
+        a->used      += needed;
+        a->remaining -= needed;
+
+        ptr[0] = '0';
+    }
+    return (void*) (ptr+MEMALIGN);
+}
+
+static void
+_pbufFree(void *allocator, void *ptr)
+{
+    char *real = ((char*)ptr - MEMALIGN);
+
+    if (real[0] == '1')
+        NATS_FREE(real);
+}
+
+// Creates a new protobuf allocator with given protobuf object size and overhead.
+// When calling pb__xxx__unpack() functions, we will pass such allocator.
+// An allocator is created for a specific protobuf object. The protobuf library
+// will call the alloc function with, at the very least, the size of the protobuf
+// object (protoSize), and for each field that is a string or byte array.
+// For strings, the protobuf library asks for 1 more byte. The overhead is
+// to count the number of expected strings or byte arrays in the protobuf object
+// the allocator is created for.
+//
+// An allocator once created is not thread-safe and expected to be used in a
+// single thread this way:
+//
+// natsPBufAllocator_Prepare(alloc, msg->dataLen);
+// pbMsg = pb__msg_proto__unpack(alloc, (size_t) msg->dataLen, (const uint8_t*) msg->data);
+// ...
+// pb__msg_proto__free_unpacked(pbMsg, alloc);
+//
+natsStatus
+natsPBufAllocator_Create(natsPBufAllocator **newAllocator, int protoSize, int overhead)
+{
+    natsPBufAllocator *a = NULL;
+
+    a = NATS_CALLOC(1, sizeof(natsPBufAllocator));
+    if (a == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    a->protoSize = MEMALIGN + _roundUp(protoSize);
+    a->overhead  = (overhead * MEMALIGN) + overhead + (overhead * (MEMALIGN-1));
+
+    a->base.alloc           = _pbufAlloc;
+    a->base.free            = _pbufFree;
+    a->base.allocator_data  = a;
+
+    *newAllocator = a;
+
+    return NATS_OK;
+}
+
+// Prepare resets some internal counters and allocate or expand the buffer
+// based on the known size of the protobuf object and the given buffer size
+// that is going to be unpacked.
+void
+natsPBufAllocator_Prepare(natsPBufAllocator *allocator, int bufSize)
+{
+    int needed = allocator->protoSize + allocator->overhead + bufSize;
+
+    if (needed > allocator->cap)
+        expandBuf(&allocator->buf, &allocator->cap, needed);
+
+    allocator->remaining = allocator->cap;
+    allocator->used      = 0;
+}
+
+void
+natsPBufAllocator_Destroy(natsPBufAllocator *allocator)
+{
+    if (allocator == NULL)
+        return;
+
+    NATS_FREE(allocator->buf);
+    NATS_FREE(allocator);
+}
diff --git a/src/stan/conn.h b/src/stan/conn.h
new file mode 100644 (file)
index 0000000..d797319
--- /dev/null
@@ -0,0 +1,65 @@
+// Copyright 2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef STAN_CONN_H_
+#define STAN_CONN_H_
+
+#include "stanp.h"
+
+#ifdef DEV_MODE
+// For type safety
+
+void stanConn_Lock(stanConnection *sc);
+void stanConn_Unlock(stanConnection *sc);
+
+#else
+// We know what we are doing :-)
+
+#define stanConn_Lock(c)    (natsMutex_Lock((c)->mu))
+#define stanConn_Unlock(c)  (natsMutex_Unlock((c)->mu))
+
+#endif // DEV_MODE
+
+#define STAN_ERR_CONNECT_REQUEST_TIMEOUT    "connect request timeout"
+#define STAN_ERR_CONNECT_REQUEST_NO_RESP    "no streaming server was listening for this connect request"
+#define STAN_ERR_CLOSE_REQUEST_TIMEOUT      "close request timeout"
+#define STAN_ERR_CLOSE_REQUEST_NO_RESP      "no streaming server was listening for this close request"
+#define STAN_ERR_MAX_PINGS                  "connection lost due to PING failure"
+
+extern int MEMALIGN;
+
+void
+stanConn_retain(stanConnection *nc);
+
+void
+stanConn_release(stanConnection *nc);
+
+void
+stanConn_defaultConnLostHandler(stanConnection *sc, const char* errorTxt, void *closure);
+
+natsStatus
+stanConnClose(stanConnection *sc, bool sendProto);
+
+natsStatus
+expandBuf(char **buf, int *cap, int newcap);
+
+natsStatus
+natsPBufAllocator_Create(natsPBufAllocator **newAllocator, int protoSize, int overhead);
+
+void
+natsPBufAllocator_Prepare(natsPBufAllocator *allocator, int bufSize);
+
+void
+natsPBufAllocator_Destroy(natsPBufAllocator *allocator);
+
+#endif /* STAN_CONN_H_ */
diff --git a/src/stan/copts.c b/src/stan/copts.c
new file mode 100644 (file)
index 0000000..908b2fb
--- /dev/null
@@ -0,0 +1,263 @@
+// Copyright 2018-2019 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "conn.h"
+#include "copts.h"
+#include "../opts.h"
+
+static void
+_stanConnOpts_free(stanConnOptions *opts)
+{
+    if (opts == NULL)
+        return;
+
+    NATS_FREE(opts->url);
+    NATS_FREE(opts->discoveryPrefix);
+    natsOptions_Destroy(opts->ncOpts);
+    natsMutex_Destroy(opts->mu);
+    NATS_FREE(opts);
+}
+
+natsStatus
+stanConnOptions_Create(stanConnOptions **newOpts)
+{
+    natsStatus      s     = NATS_OK;
+    stanConnOptions *opts = NULL;
+
+    // Ensure the library is loaded
+    s = nats_Open(-1);
+    if (s != NATS_OK)
+        return s;
+
+    opts = (stanConnOptions*) NATS_CALLOC(1, sizeof(stanConnOptions));
+    if (opts == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    if (natsMutex_Create(&(opts->mu)) != NATS_OK)
+    {
+        NATS_FREE(opts);
+        return NATS_UPDATE_ERR_STACK(NATS_NO_MEMORY);
+    }
+
+    DUP_STRING(s, opts->discoveryPrefix, STAN_CONN_OPTS_DEFAULT_DISCOVERY_PREFIX);
+    if (s == NATS_OK)
+    {
+        opts->pubAckTimeout = STAN_CONN_OPTS_DEFAULT_PUB_ACK_TIMEOUT;
+        opts->connTimeout = STAN_CONN_OPTS_DEFAULT_CONN_TIMEOUT;
+        opts->maxPubAcksInflight = STAN_CONN_OPTS_DEFAULT_MAX_PUB_ACKS_INFLIGHT;
+        opts->maxPubAcksInFlightPercentage = STAN_CONN_OPTS_DEFAULT_MAX_PUB_ACKS_INFLIGHT_PERCENTAGE;
+        opts->pingInterval = STAN_CONN_OPTS_DEFAULT_PING_INTERVAL;
+        opts->pingMaxOut = STAN_CONN_OPTS_DEFAULT_PING_MAX_OUT;
+        opts->connectionLostCB = stanConn_defaultConnLostHandler;
+    }
+
+    if (s == NATS_OK)
+        *newOpts = opts;
+    else
+        _stanConnOpts_free(opts);
+
+    return s;
+}
+
+natsStatus
+stanConnOptions_SetURL(stanConnOptions *opts, const char *url)
+{
+    natsStatus s = NATS_OK;
+
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    if (opts->url != NULL)
+    {
+        NATS_FREE(opts->url);
+        opts->url = NULL;
+    }
+    if ((url != NULL) && (url[0] != '\0'))
+        DUP_STRING(s, opts->url, url);
+
+    UNLOCK_OPTS(opts);
+
+    return s;
+}
+
+natsStatus
+stanConnOptions_SetNATSOptions(stanConnOptions *opts, natsOptions *nOpts)
+{
+    natsStatus s = NATS_OK;
+
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    if (opts->ncOpts != NULL)
+    {
+        natsOptions_Destroy(opts->ncOpts);
+        opts->ncOpts = NULL;
+    }
+    if (nOpts != NULL)
+    {
+        opts->ncOpts = natsOptions_clone(nOpts);
+        if (opts->ncOpts == NULL)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+    }
+
+    UNLOCK_OPTS(opts);
+
+    return s;
+}
+
+natsStatus
+stanConnOptions_SetConnectionWait(stanConnOptions *opts, int64_t wait)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, (wait <= 0));
+
+    opts->connTimeout = wait;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+stanConnOptions_SetPubAckWait(stanConnOptions *opts, int64_t wait)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, (wait <= 0));
+
+    opts->pubAckTimeout = wait;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+stanConnOptions_SetDiscoveryPrefix(stanConnOptions *opts, const char *prefix)
+{
+    natsStatus s = NATS_OK;
+
+    LOCK_AND_CHECK_OPTIONS(opts, ((prefix == NULL) || (prefix[0]=='\0')));
+
+    if (opts->discoveryPrefix != NULL)
+    {
+        NATS_FREE(opts->discoveryPrefix);
+        opts->discoveryPrefix = NULL;
+    }
+    DUP_STRING(s, opts->discoveryPrefix, prefix);
+
+    UNLOCK_OPTS(opts);
+
+    return s;
+}
+
+natsStatus
+stanConnOptions_SetMaxPubAcksInflight(stanConnOptions *opts, int maxPubAcksInflight, float percentage)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, ((maxPubAcksInflight <= 0) || (percentage <= 0.0) || (percentage > 1.0)));
+
+    opts->maxPubAcksInflight = maxPubAcksInflight;
+    opts->maxPubAcksInFlightPercentage = percentage;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+stanConnOptions_SetPings(stanConnOptions *opts, int interval, int maxOut)
+{
+    if (testAllowMillisecInPings)
+    {
+        if ((interval == 0) || (maxOut < 2))
+            return nats_setDefaultError(NATS_INVALID_ARG);
+    }
+    else
+    {
+        if ((interval <= 0) || (maxOut < 2))
+            return nats_setDefaultError(NATS_INVALID_ARG);
+    }
+
+    natsMutex_Lock(opts->mu);
+
+    opts->pingInterval = interval;
+    opts->pingMaxOut = maxOut;
+
+    natsMutex_Unlock(opts->mu);
+
+    return NATS_OK;
+}
+
+natsStatus
+stanConnOptions_SetConnectionLostHandler(stanConnOptions *opts, stanConnectionLostHandler handler, void *closure)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    opts->connectionLostCB = handler;
+    opts->connectionLostCBClosure = closure;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+stanConnOptions_clone(stanConnOptions **clonedOpts, stanConnOptions *opts)
+{
+    natsStatus      s       = NATS_OK;
+    stanConnOptions *cloned = NULL;
+    int             muSize;
+
+    s = stanConnOptions_Create(&cloned);
+    if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    // The Create call sets (strdup) the default discovery prefix.
+    // So free those now.
+    NATS_FREE(cloned->discoveryPrefix);
+    cloned->discoveryPrefix = NULL;
+
+    natsMutex_Lock(opts->mu);
+
+    muSize = sizeof(cloned->mu);
+
+    // Make a blind copy first...
+    memcpy((char*)cloned + muSize, (char*)opts + muSize,
+           sizeof(stanConnOptions) - muSize);
+
+    // Then remove all pointers, so that if we fail while
+    // copying them, and free the cloned, we don't free the pointers
+    // from the original.
+    cloned->url             = NULL;
+    cloned->discoveryPrefix = NULL;
+    cloned->ncOpts          = NULL;
+
+    s = stanConnOptions_SetURL(cloned, opts->url);
+    if (s == NATS_OK)
+        s = stanConnOptions_SetDiscoveryPrefix(cloned, opts->discoveryPrefix);
+    if (s == NATS_OK)
+        s = stanConnOptions_SetNATSOptions(cloned, opts->ncOpts);
+
+    if (s == NATS_OK)
+        *clonedOpts = cloned;
+    else
+        _stanConnOpts_free(cloned);
+
+    natsMutex_Unlock(opts->mu);
+
+    return s;
+}
+
+void
+stanConnOptions_Destroy(stanConnOptions *opts)
+{
+    if (opts == NULL)
+        return;
+
+    _stanConnOpts_free(opts);
+}
diff --git a/src/stan/copts.h b/src/stan/copts.h
new file mode 100644 (file)
index 0000000..e9dbaf2
--- /dev/null
@@ -0,0 +1,30 @@
+// Copyright 2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef STAN_CONN_OPTS_H_
+#define STAN_CONN_OPTS_H_
+
+#include "stanp.h"
+
+#define STAN_CONN_OPTS_DEFAULT_DISCOVERY_PREFIX                   "_STAN.discover"
+#define STAN_CONN_OPTS_DEFAULT_PUB_ACK_TIMEOUT                    (30 * 1000)       // 30 seconds
+#define STAN_CONN_OPTS_DEFAULT_CONN_TIMEOUT                       (2 * 1000)        // 2 seconds
+#define STAN_CONN_OPTS_DEFAULT_MAX_PUB_ACKS_INFLIGHT              (16384)
+#define STAN_CONN_OPTS_DEFAULT_MAX_PUB_ACKS_INFLIGHT_PERCENTAGE   (float) (0.5)     // 50% of MaxPubAcksInflight
+#define STAN_CONN_OPTS_DEFAULT_PING_INTERVAL                      (5)               // 5 seconds
+#define STAN_CONN_OPTS_DEFAULT_PING_MAX_OUT                       (88)
+
+natsStatus
+stanConnOptions_clone(stanConnOptions **clonedOpts, stanConnOptions *opts);
+
+#endif /* STAN_CONN_OPTS_H_ */
diff --git a/src/stan/msg.c b/src/stan/msg.c
new file mode 100644 (file)
index 0000000..3ce2d52
--- /dev/null
@@ -0,0 +1,126 @@
+// Copyright 2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "msg.h"
+
+uint64_t
+stanMsg_GetSequence(const stanMsg *msg)
+{
+    if (msg == NULL)
+        return 0;
+
+    return msg->seq;
+}
+
+const char*
+stanMsg_GetData(const stanMsg *msg)
+{
+    if (msg == NULL)
+        return NULL;
+
+    return (const char*) msg->data;
+}
+
+int
+stanMsg_GetDataLength(const stanMsg *msg)
+{
+    if (msg == NULL)
+        return 0;
+
+    return msg->dataLen;
+}
+
+int64_t
+stanMsg_GetTimestamp(const stanMsg *msg)
+{
+    if (msg == NULL)
+        return 0;
+
+    return msg->timestamp;
+}
+
+bool
+stanMsg_IsRedelivered(const stanMsg *msg)
+{
+    if (msg == NULL)
+        return false;
+
+    return msg->redelivered;
+}
+
+static void
+stanMsg_free(void *object)
+{
+    stanMsg *msg;
+
+    if (object == NULL)
+        return;
+
+    msg = (stanMsg*) object;
+
+    NATS_FREE(msg);
+}
+
+void
+stanMsg_Destroy(stanMsg *msg)
+{
+    if (msg == NULL)
+        return;
+
+    if (natsGC_collect((natsGCItem *) msg))
+        return;
+
+    stanMsg_free((void*) msg);
+}
+
+natsStatus
+stanMsg_create(stanMsg **newMsg, stanSubscription *sub, Pb__MsgProto *pb)
+{
+    stanMsg *msg        = NULL;
+    char    *ptr        = NULL;
+    int     payloadSize = 0;
+
+    payloadSize = (int) pb->data.len;
+    msg = NATS_MALLOC(sizeof(stanMsg) + payloadSize + 1);
+    if (msg == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    // To be safe, we could 'memset' the message up to sizeof(stanMsg),
+    // but since we are explicitly initializing most of the fields, we save
+    // on that call, but we need to make sure what we initialize all fields!!!
+
+    // That being said, we memset the 'gc' structure to protect us in case
+    // some fields are later added to this 'external' structure and we forget
+    // about updating this initialization code.
+    memset(&(msg->gc), 0, sizeof(natsGCItem));
+
+    msg->seq         = pb->sequence;
+    msg->timestamp   = pb->timestamp;
+    msg->redelivered = pb->redelivered;
+    msg->sub         = sub;
+
+    ptr = (char*) (((char*) &(msg->sub)) + sizeof(msg->sub));
+    msg->data    = (const char*) ptr;
+    msg->dataLen = payloadSize;
+    memcpy(ptr, (char*) pb->data.data, payloadSize);
+    ptr += payloadSize;
+    *(ptr) = '\0';
+
+    // Setting the callback will trigger garbage collection when
+    // stanMsg_Destroy() is invoked.
+    msg->gc.freeCb = stanMsg_free;
+
+    *newMsg = msg;
+
+    return NATS_OK;
+}
diff --git a/src/stan/msg.h b/src/stan/msg.h
new file mode 100644 (file)
index 0000000..ef85683
--- /dev/null
@@ -0,0 +1,22 @@
+// Copyright 2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef SMSG_H_
+#define SMSG_H_
+
+#include "stanp.h"
+
+natsStatus
+stanMsg_create(stanMsg **newMsg, stanSubscription *sub, Pb__MsgProto *pb);
+
+#endif /* SMSG_H_ */
diff --git a/src/stan/protocol.pb-c.c b/src/stan/protocol.pb-c.c
new file mode 100644 (file)
index 0000000..24f046d
--- /dev/null
@@ -0,0 +1,1672 @@
+/* Generated by the protocol buffer compiler.  DO NOT EDIT! */
+/* Generated from: protocol.proto */
+
+/* Do not generate deprecated warnings for self */
+#ifndef PROTOBUF_C__NO_DEPRECATED
+#define PROTOBUF_C__NO_DEPRECATED
+#endif
+
+#include "protocol.pb-c.h"
+void   pb__pub_msg__init
+                     (Pb__PubMsg         *message)
+{
+  static const Pb__PubMsg init_value = PB__PUB_MSG__INIT;
+  *message = init_value;
+}
+size_t pb__pub_msg__get_packed_size
+                     (const Pb__PubMsg *message)
+{
+  assert(message->base.descriptor == &pb__pub_msg__descriptor);
+  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t pb__pub_msg__pack
+                     (const Pb__PubMsg *message,
+                      uint8_t       *out)
+{
+  assert(message->base.descriptor == &pb__pub_msg__descriptor);
+  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t pb__pub_msg__pack_to_buffer
+                     (const Pb__PubMsg *message,
+                      ProtobufCBuffer *buffer)
+{
+  assert(message->base.descriptor == &pb__pub_msg__descriptor);
+  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+Pb__PubMsg *
+       pb__pub_msg__unpack
+                     (ProtobufCAllocator  *allocator,
+                      size_t               len,
+                      const uint8_t       *data)
+{
+  return (Pb__PubMsg *)
+     protobuf_c_message_unpack (&pb__pub_msg__descriptor,
+                                allocator, len, data);
+}
+void   pb__pub_msg__free_unpacked
+                     (Pb__PubMsg *message,
+                      ProtobufCAllocator *allocator)
+{
+  if(!message)
+    return;
+  assert(message->base.descriptor == &pb__pub_msg__descriptor);
+  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+void   pb__pub_ack__init
+                     (Pb__PubAck         *message)
+{
+  static const Pb__PubAck init_value = PB__PUB_ACK__INIT;
+  *message = init_value;
+}
+size_t pb__pub_ack__get_packed_size
+                     (const Pb__PubAck *message)
+{
+  assert(message->base.descriptor == &pb__pub_ack__descriptor);
+  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t pb__pub_ack__pack
+                     (const Pb__PubAck *message,
+                      uint8_t       *out)
+{
+  assert(message->base.descriptor == &pb__pub_ack__descriptor);
+  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t pb__pub_ack__pack_to_buffer
+                     (const Pb__PubAck *message,
+                      ProtobufCBuffer *buffer)
+{
+  assert(message->base.descriptor == &pb__pub_ack__descriptor);
+  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+Pb__PubAck *
+       pb__pub_ack__unpack
+                     (ProtobufCAllocator  *allocator,
+                      size_t               len,
+                      const uint8_t       *data)
+{
+  return (Pb__PubAck *)
+     protobuf_c_message_unpack (&pb__pub_ack__descriptor,
+                                allocator, len, data);
+}
+void   pb__pub_ack__free_unpacked
+                     (Pb__PubAck *message,
+                      ProtobufCAllocator *allocator)
+{
+  if(!message)
+    return;
+  assert(message->base.descriptor == &pb__pub_ack__descriptor);
+  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+void   pb__msg_proto__init
+                     (Pb__MsgProto         *message)
+{
+  static const Pb__MsgProto init_value = PB__MSG_PROTO__INIT;
+  *message = init_value;
+}
+size_t pb__msg_proto__get_packed_size
+                     (const Pb__MsgProto *message)
+{
+  assert(message->base.descriptor == &pb__msg_proto__descriptor);
+  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t pb__msg_proto__pack
+                     (const Pb__MsgProto *message,
+                      uint8_t       *out)
+{
+  assert(message->base.descriptor == &pb__msg_proto__descriptor);
+  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t pb__msg_proto__pack_to_buffer
+                     (const Pb__MsgProto *message,
+                      ProtobufCBuffer *buffer)
+{
+  assert(message->base.descriptor == &pb__msg_proto__descriptor);
+  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+Pb__MsgProto *
+       pb__msg_proto__unpack
+                     (ProtobufCAllocator  *allocator,
+                      size_t               len,
+                      const uint8_t       *data)
+{
+  return (Pb__MsgProto *)
+     protobuf_c_message_unpack (&pb__msg_proto__descriptor,
+                                allocator, len, data);
+}
+void   pb__msg_proto__free_unpacked
+                     (Pb__MsgProto *message,
+                      ProtobufCAllocator *allocator)
+{
+  if(!message)
+    return;
+  assert(message->base.descriptor == &pb__msg_proto__descriptor);
+  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+void   pb__ack__init
+                     (Pb__Ack         *message)
+{
+  static const Pb__Ack init_value = PB__ACK__INIT;
+  *message = init_value;
+}
+size_t pb__ack__get_packed_size
+                     (const Pb__Ack *message)
+{
+  assert(message->base.descriptor == &pb__ack__descriptor);
+  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t pb__ack__pack
+                     (const Pb__Ack *message,
+                      uint8_t       *out)
+{
+  assert(message->base.descriptor == &pb__ack__descriptor);
+  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t pb__ack__pack_to_buffer
+                     (const Pb__Ack *message,
+                      ProtobufCBuffer *buffer)
+{
+  assert(message->base.descriptor == &pb__ack__descriptor);
+  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+Pb__Ack *
+       pb__ack__unpack
+                     (ProtobufCAllocator  *allocator,
+                      size_t               len,
+                      const uint8_t       *data)
+{
+  return (Pb__Ack *)
+     protobuf_c_message_unpack (&pb__ack__descriptor,
+                                allocator, len, data);
+}
+void   pb__ack__free_unpacked
+                     (Pb__Ack *message,
+                      ProtobufCAllocator *allocator)
+{
+  if(!message)
+    return;
+  assert(message->base.descriptor == &pb__ack__descriptor);
+  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+void   pb__connect_request__init
+                     (Pb__ConnectRequest         *message)
+{
+  static const Pb__ConnectRequest init_value = PB__CONNECT_REQUEST__INIT;
+  *message = init_value;
+}
+size_t pb__connect_request__get_packed_size
+                     (const Pb__ConnectRequest *message)
+{
+  assert(message->base.descriptor == &pb__connect_request__descriptor);
+  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t pb__connect_request__pack
+                     (const Pb__ConnectRequest *message,
+                      uint8_t       *out)
+{
+  assert(message->base.descriptor == &pb__connect_request__descriptor);
+  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t pb__connect_request__pack_to_buffer
+                     (const Pb__ConnectRequest *message,
+                      ProtobufCBuffer *buffer)
+{
+  assert(message->base.descriptor == &pb__connect_request__descriptor);
+  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+Pb__ConnectRequest *
+       pb__connect_request__unpack
+                     (ProtobufCAllocator  *allocator,
+                      size_t               len,
+                      const uint8_t       *data)
+{
+  return (Pb__ConnectRequest *)
+     protobuf_c_message_unpack (&pb__connect_request__descriptor,
+                                allocator, len, data);
+}
+void   pb__connect_request__free_unpacked
+                     (Pb__ConnectRequest *message,
+                      ProtobufCAllocator *allocator)
+{
+  if(!message)
+    return;
+  assert(message->base.descriptor == &pb__connect_request__descriptor);
+  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+void   pb__connect_response__init
+                     (Pb__ConnectResponse         *message)
+{
+  static const Pb__ConnectResponse init_value = PB__CONNECT_RESPONSE__INIT;
+  *message = init_value;
+}
+size_t pb__connect_response__get_packed_size
+                     (const Pb__ConnectResponse *message)
+{
+  assert(message->base.descriptor == &pb__connect_response__descriptor);
+  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t pb__connect_response__pack
+                     (const Pb__ConnectResponse *message,
+                      uint8_t       *out)
+{
+  assert(message->base.descriptor == &pb__connect_response__descriptor);
+  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t pb__connect_response__pack_to_buffer
+                     (const Pb__ConnectResponse *message,
+                      ProtobufCBuffer *buffer)
+{
+  assert(message->base.descriptor == &pb__connect_response__descriptor);
+  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+Pb__ConnectResponse *
+       pb__connect_response__unpack
+                     (ProtobufCAllocator  *allocator,
+                      size_t               len,
+                      const uint8_t       *data)
+{
+  return (Pb__ConnectResponse *)
+     protobuf_c_message_unpack (&pb__connect_response__descriptor,
+                                allocator, len, data);
+}
+void   pb__connect_response__free_unpacked
+                     (Pb__ConnectResponse *message,
+                      ProtobufCAllocator *allocator)
+{
+  if(!message)
+    return;
+  assert(message->base.descriptor == &pb__connect_response__descriptor);
+  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+void   pb__ping__init
+                     (Pb__Ping         *message)
+{
+  static const Pb__Ping init_value = PB__PING__INIT;
+  *message = init_value;
+}
+size_t pb__ping__get_packed_size
+                     (const Pb__Ping *message)
+{
+  assert(message->base.descriptor == &pb__ping__descriptor);
+  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t pb__ping__pack
+                     (const Pb__Ping *message,
+                      uint8_t       *out)
+{
+  assert(message->base.descriptor == &pb__ping__descriptor);
+  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t pb__ping__pack_to_buffer
+                     (const Pb__Ping *message,
+                      ProtobufCBuffer *buffer)
+{
+  assert(message->base.descriptor == &pb__ping__descriptor);
+  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+Pb__Ping *
+       pb__ping__unpack
+                     (ProtobufCAllocator  *allocator,
+                      size_t               len,
+                      const uint8_t       *data)
+{
+  return (Pb__Ping *)
+     protobuf_c_message_unpack (&pb__ping__descriptor,
+                                allocator, len, data);
+}
+void   pb__ping__free_unpacked
+                     (Pb__Ping *message,
+                      ProtobufCAllocator *allocator)
+{
+  if(!message)
+    return;
+  assert(message->base.descriptor == &pb__ping__descriptor);
+  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+void   pb__ping_response__init
+                     (Pb__PingResponse         *message)
+{
+  static const Pb__PingResponse init_value = PB__PING_RESPONSE__INIT;
+  *message = init_value;
+}
+size_t pb__ping_response__get_packed_size
+                     (const Pb__PingResponse *message)
+{
+  assert(message->base.descriptor == &pb__ping_response__descriptor);
+  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t pb__ping_response__pack
+                     (const Pb__PingResponse *message,
+                      uint8_t       *out)
+{
+  assert(message->base.descriptor == &pb__ping_response__descriptor);
+  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t pb__ping_response__pack_to_buffer
+                     (const Pb__PingResponse *message,
+                      ProtobufCBuffer *buffer)
+{
+  assert(message->base.descriptor == &pb__ping_response__descriptor);
+  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+Pb__PingResponse *
+       pb__ping_response__unpack
+                     (ProtobufCAllocator  *allocator,
+                      size_t               len,
+                      const uint8_t       *data)
+{
+  return (Pb__PingResponse *)
+     protobuf_c_message_unpack (&pb__ping_response__descriptor,
+                                allocator, len, data);
+}
+void   pb__ping_response__free_unpacked
+                     (Pb__PingResponse *message,
+                      ProtobufCAllocator *allocator)
+{
+  if(!message)
+    return;
+  assert(message->base.descriptor == &pb__ping_response__descriptor);
+  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+void   pb__subscription_request__init
+                     (Pb__SubscriptionRequest         *message)
+{
+  static const Pb__SubscriptionRequest init_value = PB__SUBSCRIPTION_REQUEST__INIT;
+  *message = init_value;
+}
+size_t pb__subscription_request__get_packed_size
+                     (const Pb__SubscriptionRequest *message)
+{
+  assert(message->base.descriptor == &pb__subscription_request__descriptor);
+  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t pb__subscription_request__pack
+                     (const Pb__SubscriptionRequest *message,
+                      uint8_t       *out)
+{
+  assert(message->base.descriptor == &pb__subscription_request__descriptor);
+  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t pb__subscription_request__pack_to_buffer
+                     (const Pb__SubscriptionRequest *message,
+                      ProtobufCBuffer *buffer)
+{
+  assert(message->base.descriptor == &pb__subscription_request__descriptor);
+  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+Pb__SubscriptionRequest *
+       pb__subscription_request__unpack
+                     (ProtobufCAllocator  *allocator,
+                      size_t               len,
+                      const uint8_t       *data)
+{
+  return (Pb__SubscriptionRequest *)
+     protobuf_c_message_unpack (&pb__subscription_request__descriptor,
+                                allocator, len, data);
+}
+void   pb__subscription_request__free_unpacked
+                     (Pb__SubscriptionRequest *message,
+                      ProtobufCAllocator *allocator)
+{
+  if(!message)
+    return;
+  assert(message->base.descriptor == &pb__subscription_request__descriptor);
+  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+void   pb__subscription_response__init
+                     (Pb__SubscriptionResponse         *message)
+{
+  static const Pb__SubscriptionResponse init_value = PB__SUBSCRIPTION_RESPONSE__INIT;
+  *message = init_value;
+}
+size_t pb__subscription_response__get_packed_size
+                     (const Pb__SubscriptionResponse *message)
+{
+  assert(message->base.descriptor == &pb__subscription_response__descriptor);
+  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t pb__subscription_response__pack
+                     (const Pb__SubscriptionResponse *message,
+                      uint8_t       *out)
+{
+  assert(message->base.descriptor == &pb__subscription_response__descriptor);
+  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t pb__subscription_response__pack_to_buffer
+                     (const Pb__SubscriptionResponse *message,
+                      ProtobufCBuffer *buffer)
+{
+  assert(message->base.descriptor == &pb__subscription_response__descriptor);
+  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+Pb__SubscriptionResponse *
+       pb__subscription_response__unpack
+                     (ProtobufCAllocator  *allocator,
+                      size_t               len,
+                      const uint8_t       *data)
+{
+  return (Pb__SubscriptionResponse *)
+     protobuf_c_message_unpack (&pb__subscription_response__descriptor,
+                                allocator, len, data);
+}
+void   pb__subscription_response__free_unpacked
+                     (Pb__SubscriptionResponse *message,
+                      ProtobufCAllocator *allocator)
+{
+  if(!message)
+    return;
+  assert(message->base.descriptor == &pb__subscription_response__descriptor);
+  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+void   pb__unsubscribe_request__init
+                     (Pb__UnsubscribeRequest         *message)
+{
+  static const Pb__UnsubscribeRequest init_value = PB__UNSUBSCRIBE_REQUEST__INIT;
+  *message = init_value;
+}
+size_t pb__unsubscribe_request__get_packed_size
+                     (const Pb__UnsubscribeRequest *message)
+{
+  assert(message->base.descriptor == &pb__unsubscribe_request__descriptor);
+  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t pb__unsubscribe_request__pack
+                     (const Pb__UnsubscribeRequest *message,
+                      uint8_t       *out)
+{
+  assert(message->base.descriptor == &pb__unsubscribe_request__descriptor);
+  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t pb__unsubscribe_request__pack_to_buffer
+                     (const Pb__UnsubscribeRequest *message,
+                      ProtobufCBuffer *buffer)
+{
+  assert(message->base.descriptor == &pb__unsubscribe_request__descriptor);
+  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+Pb__UnsubscribeRequest *
+       pb__unsubscribe_request__unpack
+                     (ProtobufCAllocator  *allocator,
+                      size_t               len,
+                      const uint8_t       *data)
+{
+  return (Pb__UnsubscribeRequest *)
+     protobuf_c_message_unpack (&pb__unsubscribe_request__descriptor,
+                                allocator, len, data);
+}
+void   pb__unsubscribe_request__free_unpacked
+                     (Pb__UnsubscribeRequest *message,
+                      ProtobufCAllocator *allocator)
+{
+  if(!message)
+    return;
+  assert(message->base.descriptor == &pb__unsubscribe_request__descriptor);
+  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+void   pb__close_request__init
+                     (Pb__CloseRequest         *message)
+{
+  static const Pb__CloseRequest init_value = PB__CLOSE_REQUEST__INIT;
+  *message = init_value;
+}
+size_t pb__close_request__get_packed_size
+                     (const Pb__CloseRequest *message)
+{
+  assert(message->base.descriptor == &pb__close_request__descriptor);
+  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t pb__close_request__pack
+                     (const Pb__CloseRequest *message,
+                      uint8_t       *out)
+{
+  assert(message->base.descriptor == &pb__close_request__descriptor);
+  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t pb__close_request__pack_to_buffer
+                     (const Pb__CloseRequest *message,
+                      ProtobufCBuffer *buffer)
+{
+  assert(message->base.descriptor == &pb__close_request__descriptor);
+  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+Pb__CloseRequest *
+       pb__close_request__unpack
+                     (ProtobufCAllocator  *allocator,
+                      size_t               len,
+                      const uint8_t       *data)
+{
+  return (Pb__CloseRequest *)
+     protobuf_c_message_unpack (&pb__close_request__descriptor,
+                                allocator, len, data);
+}
+void   pb__close_request__free_unpacked
+                     (Pb__CloseRequest *message,
+                      ProtobufCAllocator *allocator)
+{
+  if(!message)
+    return;
+  assert(message->base.descriptor == &pb__close_request__descriptor);
+  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+void   pb__close_response__init
+                     (Pb__CloseResponse         *message)
+{
+  static const Pb__CloseResponse init_value = PB__CLOSE_RESPONSE__INIT;
+  *message = init_value;
+}
+size_t pb__close_response__get_packed_size
+                     (const Pb__CloseResponse *message)
+{
+  assert(message->base.descriptor == &pb__close_response__descriptor);
+  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t pb__close_response__pack
+                     (const Pb__CloseResponse *message,
+                      uint8_t       *out)
+{
+  assert(message->base.descriptor == &pb__close_response__descriptor);
+  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t pb__close_response__pack_to_buffer
+                     (const Pb__CloseResponse *message,
+                      ProtobufCBuffer *buffer)
+{
+  assert(message->base.descriptor == &pb__close_response__descriptor);
+  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+Pb__CloseResponse *
+       pb__close_response__unpack
+                     (ProtobufCAllocator  *allocator,
+                      size_t               len,
+                      const uint8_t       *data)
+{
+  return (Pb__CloseResponse *)
+     protobuf_c_message_unpack (&pb__close_response__descriptor,
+                                allocator, len, data);
+}
+void   pb__close_response__free_unpacked
+                     (Pb__CloseResponse *message,
+                      ProtobufCAllocator *allocator)
+{
+  if(!message)
+    return;
+  assert(message->base.descriptor == &pb__close_response__descriptor);
+  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
+static const ProtobufCFieldDescriptor pb__pub_msg__field_descriptors[7] =
+{
+  {
+    "clientID",
+    1,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_STRING,
+    0,   /* quantifier_offset */
+    offsetof(Pb__PubMsg, clientid),
+    NULL,
+    &protobuf_c_empty_string,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "guid",
+    2,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_STRING,
+    0,   /* quantifier_offset */
+    offsetof(Pb__PubMsg, guid),
+    NULL,
+    &protobuf_c_empty_string,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "subject",
+    3,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_STRING,
+    0,   /* quantifier_offset */
+    offsetof(Pb__PubMsg, subject),
+    NULL,
+    &protobuf_c_empty_string,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "reply",
+    4,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_STRING,
+    0,   /* quantifier_offset */
+    offsetof(Pb__PubMsg, reply),
+    NULL,
+    &protobuf_c_empty_string,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "data",
+    5,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_BYTES,
+    0,   /* quantifier_offset */
+    offsetof(Pb__PubMsg, data),
+    NULL,
+    NULL,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "connID",
+    6,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_BYTES,
+    0,   /* quantifier_offset */
+    offsetof(Pb__PubMsg, connid),
+    NULL,
+    NULL,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "sha256",
+    10,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_BYTES,
+    0,   /* quantifier_offset */
+    offsetof(Pb__PubMsg, sha256),
+    NULL,
+    NULL,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+};
+static const unsigned pb__pub_msg__field_indices_by_name[] = {
+  0,   /* field[0] = clientID */
+  5,   /* field[5] = connID */
+  4,   /* field[4] = data */
+  1,   /* field[1] = guid */
+  3,   /* field[3] = reply */
+  6,   /* field[6] = sha256 */
+  2,   /* field[2] = subject */
+};
+static const ProtobufCIntRange pb__pub_msg__number_ranges[2 + 1] =
+{
+  { 1, 0 },
+  { 10, 6 },
+  { 0, 7 }
+};
+const ProtobufCMessageDescriptor pb__pub_msg__descriptor =
+{
+  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+  "pb.PubMsg",
+  "PubMsg",
+  "Pb__PubMsg",
+  "pb",
+  sizeof(Pb__PubMsg),
+  7,
+  pb__pub_msg__field_descriptors,
+  pb__pub_msg__field_indices_by_name,
+  2,  pb__pub_msg__number_ranges,
+  (ProtobufCMessageInit) pb__pub_msg__init,
+  NULL,NULL,NULL    /* reserved[123] */
+};
+static const ProtobufCFieldDescriptor pb__pub_ack__field_descriptors[2] =
+{
+  {
+    "guid",
+    1,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_STRING,
+    0,   /* quantifier_offset */
+    offsetof(Pb__PubAck, guid),
+    NULL,
+    &protobuf_c_empty_string,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "error",
+    2,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_STRING,
+    0,   /* quantifier_offset */
+    offsetof(Pb__PubAck, error),
+    NULL,
+    &protobuf_c_empty_string,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+};
+static const unsigned pb__pub_ack__field_indices_by_name[] = {
+  1,   /* field[1] = error */
+  0,   /* field[0] = guid */
+};
+static const ProtobufCIntRange pb__pub_ack__number_ranges[1 + 1] =
+{
+  { 1, 0 },
+  { 0, 2 }
+};
+const ProtobufCMessageDescriptor pb__pub_ack__descriptor =
+{
+  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+  "pb.PubAck",
+  "PubAck",
+  "Pb__PubAck",
+  "pb",
+  sizeof(Pb__PubAck),
+  2,
+  pb__pub_ack__field_descriptors,
+  pb__pub_ack__field_indices_by_name,
+  1,  pb__pub_ack__number_ranges,
+  (ProtobufCMessageInit) pb__pub_ack__init,
+  NULL,NULL,NULL    /* reserved[123] */
+};
+static const ProtobufCFieldDescriptor pb__msg_proto__field_descriptors[7] =
+{
+  {
+    "sequence",
+    1,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_UINT64,
+    0,   /* quantifier_offset */
+    offsetof(Pb__MsgProto, sequence),
+    NULL,
+    NULL,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "subject",
+    2,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_STRING,
+    0,   /* quantifier_offset */
+    offsetof(Pb__MsgProto, subject),
+    NULL,
+    &protobuf_c_empty_string,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "reply",
+    3,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_STRING,
+    0,   /* quantifier_offset */
+    offsetof(Pb__MsgProto, reply),
+    NULL,
+    &protobuf_c_empty_string,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "data",
+    4,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_BYTES,
+    0,   /* quantifier_offset */
+    offsetof(Pb__MsgProto, data),
+    NULL,
+    NULL,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "timestamp",
+    5,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_INT64,
+    0,   /* quantifier_offset */
+    offsetof(Pb__MsgProto, timestamp),
+    NULL,
+    NULL,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "redelivered",
+    6,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_BOOL,
+    0,   /* quantifier_offset */
+    offsetof(Pb__MsgProto, redelivered),
+    NULL,
+    NULL,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "CRC32",
+    10,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_UINT32,
+    0,   /* quantifier_offset */
+    offsetof(Pb__MsgProto, crc32),
+    NULL,
+    NULL,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+};
+static const unsigned pb__msg_proto__field_indices_by_name[] = {
+  6,   /* field[6] = CRC32 */
+  3,   /* field[3] = data */
+  5,   /* field[5] = redelivered */
+  2,   /* field[2] = reply */
+  0,   /* field[0] = sequence */
+  1,   /* field[1] = subject */
+  4,   /* field[4] = timestamp */
+};
+static const ProtobufCIntRange pb__msg_proto__number_ranges[2 + 1] =
+{
+  { 1, 0 },
+  { 10, 6 },
+  { 0, 7 }
+};
+const ProtobufCMessageDescriptor pb__msg_proto__descriptor =
+{
+  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+  "pb.MsgProto",
+  "MsgProto",
+  "Pb__MsgProto",
+  "pb",
+  sizeof(Pb__MsgProto),
+  7,
+  pb__msg_proto__field_descriptors,
+  pb__msg_proto__field_indices_by_name,
+  2,  pb__msg_proto__number_ranges,
+  (ProtobufCMessageInit) pb__msg_proto__init,
+  NULL,NULL,NULL    /* reserved[123] */
+};
+static const ProtobufCFieldDescriptor pb__ack__field_descriptors[2] =
+{
+  {
+    "subject",
+    1,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_STRING,
+    0,   /* quantifier_offset */
+    offsetof(Pb__Ack, subject),
+    NULL,
+    &protobuf_c_empty_string,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "sequence",
+    2,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_UINT64,
+    0,   /* quantifier_offset */
+    offsetof(Pb__Ack, sequence),
+    NULL,
+    NULL,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+};
+static const unsigned pb__ack__field_indices_by_name[] = {
+  1,   /* field[1] = sequence */
+  0,   /* field[0] = subject */
+};
+static const ProtobufCIntRange pb__ack__number_ranges[1 + 1] =
+{
+  { 1, 0 },
+  { 0, 2 }
+};
+const ProtobufCMessageDescriptor pb__ack__descriptor =
+{
+  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+  "pb.Ack",
+  "Ack",
+  "Pb__Ack",
+  "pb",
+  sizeof(Pb__Ack),
+  2,
+  pb__ack__field_descriptors,
+  pb__ack__field_indices_by_name,
+  1,  pb__ack__number_ranges,
+  (ProtobufCMessageInit) pb__ack__init,
+  NULL,NULL,NULL    /* reserved[123] */
+};
+static const ProtobufCFieldDescriptor pb__connect_request__field_descriptors[6] =
+{
+  {
+    "clientID",
+    1,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_STRING,
+    0,   /* quantifier_offset */
+    offsetof(Pb__ConnectRequest, clientid),
+    NULL,
+    &protobuf_c_empty_string,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "heartbeatInbox",
+    2,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_STRING,
+    0,   /* quantifier_offset */
+    offsetof(Pb__ConnectRequest, heartbeatinbox),
+    NULL,
+    &protobuf_c_empty_string,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "protocol",
+    3,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_INT32,
+    0,   /* quantifier_offset */
+    offsetof(Pb__ConnectRequest, protocol),
+    NULL,
+    NULL,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "connID",
+    4,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_BYTES,
+    0,   /* quantifier_offset */
+    offsetof(Pb__ConnectRequest, connid),
+    NULL,
+    NULL,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "pingInterval",
+    5,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_INT32,
+    0,   /* quantifier_offset */
+    offsetof(Pb__ConnectRequest, pinginterval),
+    NULL,
+    NULL,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "pingMaxOut",
+    6,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_INT32,
+    0,   /* quantifier_offset */
+    offsetof(Pb__ConnectRequest, pingmaxout),
+    NULL,
+    NULL,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+};
+static const unsigned pb__connect_request__field_indices_by_name[] = {
+  0,   /* field[0] = clientID */
+  3,   /* field[3] = connID */
+  1,   /* field[1] = heartbeatInbox */
+  4,   /* field[4] = pingInterval */
+  5,   /* field[5] = pingMaxOut */
+  2,   /* field[2] = protocol */
+};
+static const ProtobufCIntRange pb__connect_request__number_ranges[1 + 1] =
+{
+  { 1, 0 },
+  { 0, 6 }
+};
+const ProtobufCMessageDescriptor pb__connect_request__descriptor =
+{
+  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+  "pb.ConnectRequest",
+  "ConnectRequest",
+  "Pb__ConnectRequest",
+  "pb",
+  sizeof(Pb__ConnectRequest),
+  6,
+  pb__connect_request__field_descriptors,
+  pb__connect_request__field_indices_by_name,
+  1,  pb__connect_request__number_ranges,
+  (ProtobufCMessageInit) pb__connect_request__init,
+  NULL,NULL,NULL    /* reserved[123] */
+};
+static const ProtobufCFieldDescriptor pb__connect_response__field_descriptors[11] =
+{
+  {
+    "pubPrefix",
+    1,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_STRING,
+    0,   /* quantifier_offset */
+    offsetof(Pb__ConnectResponse, pubprefix),
+    NULL,
+    &protobuf_c_empty_string,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "subRequests",
+    2,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_STRING,
+    0,   /* quantifier_offset */
+    offsetof(Pb__ConnectResponse, subrequests),
+    NULL,
+    &protobuf_c_empty_string,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "unsubRequests",
+    3,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_STRING,
+    0,   /* quantifier_offset */
+    offsetof(Pb__ConnectResponse, unsubrequests),
+    NULL,
+    &protobuf_c_empty_string,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "closeRequests",
+    4,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_STRING,
+    0,   /* quantifier_offset */
+    offsetof(Pb__ConnectResponse, closerequests),
+    NULL,
+    &protobuf_c_empty_string,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "error",
+    5,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_STRING,
+    0,   /* quantifier_offset */
+    offsetof(Pb__ConnectResponse, error),
+    NULL,
+    &protobuf_c_empty_string,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "subCloseRequests",
+    6,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_STRING,
+    0,   /* quantifier_offset */
+    offsetof(Pb__ConnectResponse, subcloserequests),
+    NULL,
+    &protobuf_c_empty_string,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "pingRequests",
+    7,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_STRING,
+    0,   /* quantifier_offset */
+    offsetof(Pb__ConnectResponse, pingrequests),
+    NULL,
+    &protobuf_c_empty_string,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "pingInterval",
+    8,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_INT32,
+    0,   /* quantifier_offset */
+    offsetof(Pb__ConnectResponse, pinginterval),
+    NULL,
+    NULL,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "pingMaxOut",
+    9,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_INT32,
+    0,   /* quantifier_offset */
+    offsetof(Pb__ConnectResponse, pingmaxout),
+    NULL,
+    NULL,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "protocol",
+    10,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_INT32,
+    0,   /* quantifier_offset */
+    offsetof(Pb__ConnectResponse, protocol),
+    NULL,
+    NULL,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "publicKey",
+    100,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_STRING,
+    0,   /* quantifier_offset */
+    offsetof(Pb__ConnectResponse, publickey),
+    NULL,
+    &protobuf_c_empty_string,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+};
+static const unsigned pb__connect_response__field_indices_by_name[] = {
+  3,   /* field[3] = closeRequests */
+  4,   /* field[4] = error */
+  7,   /* field[7] = pingInterval */
+  8,   /* field[8] = pingMaxOut */
+  6,   /* field[6] = pingRequests */
+  9,   /* field[9] = protocol */
+  0,   /* field[0] = pubPrefix */
+  10,   /* field[10] = publicKey */
+  5,   /* field[5] = subCloseRequests */
+  1,   /* field[1] = subRequests */
+  2,   /* field[2] = unsubRequests */
+};
+static const ProtobufCIntRange pb__connect_response__number_ranges[2 + 1] =
+{
+  { 1, 0 },
+  { 100, 10 },
+  { 0, 11 }
+};
+const ProtobufCMessageDescriptor pb__connect_response__descriptor =
+{
+  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+  "pb.ConnectResponse",
+  "ConnectResponse",
+  "Pb__ConnectResponse",
+  "pb",
+  sizeof(Pb__ConnectResponse),
+  11,
+  pb__connect_response__field_descriptors,
+  pb__connect_response__field_indices_by_name,
+  2,  pb__connect_response__number_ranges,
+  (ProtobufCMessageInit) pb__connect_response__init,
+  NULL,NULL,NULL    /* reserved[123] */
+};
+static const ProtobufCFieldDescriptor pb__ping__field_descriptors[1] =
+{
+  {
+    "connID",
+    1,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_BYTES,
+    0,   /* quantifier_offset */
+    offsetof(Pb__Ping, connid),
+    NULL,
+    NULL,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+};
+static const unsigned pb__ping__field_indices_by_name[] = {
+  0,   /* field[0] = connID */
+};
+static const ProtobufCIntRange pb__ping__number_ranges[1 + 1] =
+{
+  { 1, 0 },
+  { 0, 1 }
+};
+const ProtobufCMessageDescriptor pb__ping__descriptor =
+{
+  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+  "pb.Ping",
+  "Ping",
+  "Pb__Ping",
+  "pb",
+  sizeof(Pb__Ping),
+  1,
+  pb__ping__field_descriptors,
+  pb__ping__field_indices_by_name,
+  1,  pb__ping__number_ranges,
+  (ProtobufCMessageInit) pb__ping__init,
+  NULL,NULL,NULL    /* reserved[123] */
+};
+static const ProtobufCFieldDescriptor pb__ping_response__field_descriptors[1] =
+{
+  {
+    "error",
+    1,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_STRING,
+    0,   /* quantifier_offset */
+    offsetof(Pb__PingResponse, error),
+    NULL,
+    &protobuf_c_empty_string,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+};
+static const unsigned pb__ping_response__field_indices_by_name[] = {
+  0,   /* field[0] = error */
+};
+static const ProtobufCIntRange pb__ping_response__number_ranges[1 + 1] =
+{
+  { 1, 0 },
+  { 0, 1 }
+};
+const ProtobufCMessageDescriptor pb__ping_response__descriptor =
+{
+  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+  "pb.PingResponse",
+  "PingResponse",
+  "Pb__PingResponse",
+  "pb",
+  sizeof(Pb__PingResponse),
+  1,
+  pb__ping_response__field_descriptors,
+  pb__ping_response__field_indices_by_name,
+  1,  pb__ping_response__number_ranges,
+  (ProtobufCMessageInit) pb__ping_response__init,
+  NULL,NULL,NULL    /* reserved[123] */
+};
+static const ProtobufCFieldDescriptor pb__subscription_request__field_descriptors[10] =
+{
+  {
+    "clientID",
+    1,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_STRING,
+    0,   /* quantifier_offset */
+    offsetof(Pb__SubscriptionRequest, clientid),
+    NULL,
+    &protobuf_c_empty_string,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "subject",
+    2,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_STRING,
+    0,   /* quantifier_offset */
+    offsetof(Pb__SubscriptionRequest, subject),
+    NULL,
+    &protobuf_c_empty_string,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "qGroup",
+    3,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_STRING,
+    0,   /* quantifier_offset */
+    offsetof(Pb__SubscriptionRequest, qgroup),
+    NULL,
+    &protobuf_c_empty_string,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "inbox",
+    4,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_STRING,
+    0,   /* quantifier_offset */
+    offsetof(Pb__SubscriptionRequest, inbox),
+    NULL,
+    &protobuf_c_empty_string,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "maxInFlight",
+    5,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_INT32,
+    0,   /* quantifier_offset */
+    offsetof(Pb__SubscriptionRequest, maxinflight),
+    NULL,
+    NULL,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "ackWaitInSecs",
+    6,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_INT32,
+    0,   /* quantifier_offset */
+    offsetof(Pb__SubscriptionRequest, ackwaitinsecs),
+    NULL,
+    NULL,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "durableName",
+    7,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_STRING,
+    0,   /* quantifier_offset */
+    offsetof(Pb__SubscriptionRequest, durablename),
+    NULL,
+    &protobuf_c_empty_string,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "startPosition",
+    10,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_ENUM,
+    0,   /* quantifier_offset */
+    offsetof(Pb__SubscriptionRequest, startposition),
+    &pb__start_position__descriptor,
+    NULL,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "startSequence",
+    11,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_UINT64,
+    0,   /* quantifier_offset */
+    offsetof(Pb__SubscriptionRequest, startsequence),
+    NULL,
+    NULL,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "startTimeDelta",
+    12,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_INT64,
+    0,   /* quantifier_offset */
+    offsetof(Pb__SubscriptionRequest, starttimedelta),
+    NULL,
+    NULL,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+};
+static const unsigned pb__subscription_request__field_indices_by_name[] = {
+  5,   /* field[5] = ackWaitInSecs */
+  0,   /* field[0] = clientID */
+  6,   /* field[6] = durableName */
+  3,   /* field[3] = inbox */
+  4,   /* field[4] = maxInFlight */
+  2,   /* field[2] = qGroup */
+  7,   /* field[7] = startPosition */
+  8,   /* field[8] = startSequence */
+  9,   /* field[9] = startTimeDelta */
+  1,   /* field[1] = subject */
+};
+static const ProtobufCIntRange pb__subscription_request__number_ranges[2 + 1] =
+{
+  { 1, 0 },
+  { 10, 7 },
+  { 0, 10 }
+};
+const ProtobufCMessageDescriptor pb__subscription_request__descriptor =
+{
+  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+  "pb.SubscriptionRequest",
+  "SubscriptionRequest",
+  "Pb__SubscriptionRequest",
+  "pb",
+  sizeof(Pb__SubscriptionRequest),
+  10,
+  pb__subscription_request__field_descriptors,
+  pb__subscription_request__field_indices_by_name,
+  2,  pb__subscription_request__number_ranges,
+  (ProtobufCMessageInit) pb__subscription_request__init,
+  NULL,NULL,NULL    /* reserved[123] */
+};
+static const ProtobufCFieldDescriptor pb__subscription_response__field_descriptors[2] =
+{
+  {
+    "ackInbox",
+    2,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_STRING,
+    0,   /* quantifier_offset */
+    offsetof(Pb__SubscriptionResponse, ackinbox),
+    NULL,
+    &protobuf_c_empty_string,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "error",
+    3,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_STRING,
+    0,   /* quantifier_offset */
+    offsetof(Pb__SubscriptionResponse, error),
+    NULL,
+    &protobuf_c_empty_string,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+};
+static const unsigned pb__subscription_response__field_indices_by_name[] = {
+  0,   /* field[0] = ackInbox */
+  1,   /* field[1] = error */
+};
+static const ProtobufCIntRange pb__subscription_response__number_ranges[1 + 1] =
+{
+  { 2, 0 },
+  { 0, 2 }
+};
+const ProtobufCMessageDescriptor pb__subscription_response__descriptor =
+{
+  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+  "pb.SubscriptionResponse",
+  "SubscriptionResponse",
+  "Pb__SubscriptionResponse",
+  "pb",
+  sizeof(Pb__SubscriptionResponse),
+  2,
+  pb__subscription_response__field_descriptors,
+  pb__subscription_response__field_indices_by_name,
+  1,  pb__subscription_response__number_ranges,
+  (ProtobufCMessageInit) pb__subscription_response__init,
+  NULL,NULL,NULL    /* reserved[123] */
+};
+static const ProtobufCFieldDescriptor pb__unsubscribe_request__field_descriptors[4] =
+{
+  {
+    "clientID",
+    1,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_STRING,
+    0,   /* quantifier_offset */
+    offsetof(Pb__UnsubscribeRequest, clientid),
+    NULL,
+    &protobuf_c_empty_string,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "subject",
+    2,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_STRING,
+    0,   /* quantifier_offset */
+    offsetof(Pb__UnsubscribeRequest, subject),
+    NULL,
+    &protobuf_c_empty_string,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "inbox",
+    3,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_STRING,
+    0,   /* quantifier_offset */
+    offsetof(Pb__UnsubscribeRequest, inbox),
+    NULL,
+    &protobuf_c_empty_string,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "durableName",
+    4,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_STRING,
+    0,   /* quantifier_offset */
+    offsetof(Pb__UnsubscribeRequest, durablename),
+    NULL,
+    &protobuf_c_empty_string,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+};
+static const unsigned pb__unsubscribe_request__field_indices_by_name[] = {
+  0,   /* field[0] = clientID */
+  3,   /* field[3] = durableName */
+  2,   /* field[2] = inbox */
+  1,   /* field[1] = subject */
+};
+static const ProtobufCIntRange pb__unsubscribe_request__number_ranges[1 + 1] =
+{
+  { 1, 0 },
+  { 0, 4 }
+};
+const ProtobufCMessageDescriptor pb__unsubscribe_request__descriptor =
+{
+  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+  "pb.UnsubscribeRequest",
+  "UnsubscribeRequest",
+  "Pb__UnsubscribeRequest",
+  "pb",
+  sizeof(Pb__UnsubscribeRequest),
+  4,
+  pb__unsubscribe_request__field_descriptors,
+  pb__unsubscribe_request__field_indices_by_name,
+  1,  pb__unsubscribe_request__number_ranges,
+  (ProtobufCMessageInit) pb__unsubscribe_request__init,
+  NULL,NULL,NULL    /* reserved[123] */
+};
+static const ProtobufCFieldDescriptor pb__close_request__field_descriptors[1] =
+{
+  {
+    "clientID",
+    1,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_STRING,
+    0,   /* quantifier_offset */
+    offsetof(Pb__CloseRequest, clientid),
+    NULL,
+    &protobuf_c_empty_string,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+};
+static const unsigned pb__close_request__field_indices_by_name[] = {
+  0,   /* field[0] = clientID */
+};
+static const ProtobufCIntRange pb__close_request__number_ranges[1 + 1] =
+{
+  { 1, 0 },
+  { 0, 1 }
+};
+const ProtobufCMessageDescriptor pb__close_request__descriptor =
+{
+  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+  "pb.CloseRequest",
+  "CloseRequest",
+  "Pb__CloseRequest",
+  "pb",
+  sizeof(Pb__CloseRequest),
+  1,
+  pb__close_request__field_descriptors,
+  pb__close_request__field_indices_by_name,
+  1,  pb__close_request__number_ranges,
+  (ProtobufCMessageInit) pb__close_request__init,
+  NULL,NULL,NULL    /* reserved[123] */
+};
+static const ProtobufCFieldDescriptor pb__close_response__field_descriptors[1] =
+{
+  {
+    "error",
+    1,
+    PROTOBUF_C_LABEL_NONE,
+    PROTOBUF_C_TYPE_STRING,
+    0,   /* quantifier_offset */
+    offsetof(Pb__CloseResponse, error),
+    NULL,
+    &protobuf_c_empty_string,
+    0,             /* flags */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+};
+static const unsigned pb__close_response__field_indices_by_name[] = {
+  0,   /* field[0] = error */
+};
+static const ProtobufCIntRange pb__close_response__number_ranges[1 + 1] =
+{
+  { 1, 0 },
+  { 0, 1 }
+};
+const ProtobufCMessageDescriptor pb__close_response__descriptor =
+{
+  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+  "pb.CloseResponse",
+  "CloseResponse",
+  "Pb__CloseResponse",
+  "pb",
+  sizeof(Pb__CloseResponse),
+  1,
+  pb__close_response__field_descriptors,
+  pb__close_response__field_indices_by_name,
+  1,  pb__close_response__number_ranges,
+  (ProtobufCMessageInit) pb__close_response__init,
+  NULL,NULL,NULL    /* reserved[123] */
+};
+static const ProtobufCEnumValue pb__start_position__enum_values_by_number[5] =
+{
+  { "NewOnly", "PB__START_POSITION__NewOnly", 0 },
+  { "LastReceived", "PB__START_POSITION__LastReceived", 1 },
+  { "TimeDeltaStart", "PB__START_POSITION__TimeDeltaStart", 2 },
+  { "SequenceStart", "PB__START_POSITION__SequenceStart", 3 },
+  { "First", "PB__START_POSITION__First", 4 },
+};
+static const ProtobufCIntRange pb__start_position__value_ranges[] = {
+{0, 0},{0, 5}
+};
+static const ProtobufCEnumValueIndex pb__start_position__enum_values_by_name[5] =
+{
+  { "First", 4 },
+  { "LastReceived", 1 },
+  { "NewOnly", 0 },
+  { "SequenceStart", 3 },
+  { "TimeDeltaStart", 2 },
+};
+const ProtobufCEnumDescriptor pb__start_position__descriptor =
+{
+  PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
+  "pb.StartPosition",
+  "StartPosition",
+  "Pb__StartPosition",
+  "pb",
+  5,
+  pb__start_position__enum_values_by_number,
+  5,
+  pb__start_position__enum_values_by_name,
+  1,
+  pb__start_position__value_ranges,
+  NULL,NULL,NULL,NULL   /* reserved[1234] */
+};
diff --git a/src/stan/protocol.pb-c.h b/src/stan/protocol.pb-c.h
new file mode 100644 (file)
index 0000000..5df724e
--- /dev/null
@@ -0,0 +1,739 @@
+/* Generated by the protocol buffer compiler.  DO NOT EDIT! */
+/* Generated from: protocol.proto */
+
+#ifndef PROTOBUF_C_protocol_2eproto__INCLUDED
+#define PROTOBUF_C_protocol_2eproto__INCLUDED
+
+#include <protobuf-c/protobuf-c.h>
+
+PROTOBUF_C__BEGIN_DECLS
+
+#if PROTOBUF_C_VERSION_NUMBER < 1003000
+# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers.
+#elif 1003000 < PROTOBUF_C_MIN_COMPILER_VERSION
+# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c.
+#endif
+
+//#include "github.com/gogo/protobuf/gogoproto/gogo.pb-c.h"
+
+typedef struct _Pb__PubMsg Pb__PubMsg;
+typedef struct _Pb__PubAck Pb__PubAck;
+typedef struct _Pb__MsgProto Pb__MsgProto;
+typedef struct _Pb__Ack Pb__Ack;
+typedef struct _Pb__ConnectRequest Pb__ConnectRequest;
+typedef struct _Pb__ConnectResponse Pb__ConnectResponse;
+typedef struct _Pb__Ping Pb__Ping;
+typedef struct _Pb__PingResponse Pb__PingResponse;
+typedef struct _Pb__SubscriptionRequest Pb__SubscriptionRequest;
+typedef struct _Pb__SubscriptionResponse Pb__SubscriptionResponse;
+typedef struct _Pb__UnsubscribeRequest Pb__UnsubscribeRequest;
+typedef struct _Pb__CloseRequest Pb__CloseRequest;
+typedef struct _Pb__CloseResponse Pb__CloseResponse;
+
+
+/* --- enums --- */
+
+/*
+ * Enum for start position type.
+ */
+typedef enum _Pb__StartPosition {
+  PB__START_POSITION__NewOnly = 0,
+  PB__START_POSITION__LastReceived = 1,
+  PB__START_POSITION__TimeDeltaStart = 2,
+  PB__START_POSITION__SequenceStart = 3,
+  PB__START_POSITION__First = 4
+    PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(PB__START_POSITION)
+} Pb__StartPosition;
+
+/* --- messages --- */
+
+/*
+ * How messages are delivered to the STAN cluster
+ */
+struct  _Pb__PubMsg
+{
+  ProtobufCMessage base;
+  /*
+   * ClientID
+   */
+  char *clientid;
+  /*
+   * guid
+   */
+  char *guid;
+  /*
+   * subject
+   */
+  char *subject;
+  /*
+   * optional reply
+   */
+  char *reply;
+  /*
+   * payload
+   */
+  ProtobufCBinaryData data;
+  /*
+   * Connection ID. For servers that know about this field, clientID can be omitted
+   */
+  ProtobufCBinaryData connid;
+  /*
+   * optional sha256 of data
+   */
+  ProtobufCBinaryData sha256;
+};
+#define PB__PUB_MSG__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&pb__pub_msg__descriptor) \
+    , (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, {0,NULL}, {0,NULL}, {0,NULL} }
+
+
+/*
+ * Used to ACK to publishers
+ */
+struct  _Pb__PubAck
+{
+  ProtobufCMessage base;
+  /*
+   * guid
+   */
+  char *guid;
+  /*
+   * err string, empty/omitted if no error
+   */
+  char *error;
+};
+#define PB__PUB_ACK__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&pb__pub_ack__descriptor) \
+    , (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string }
+
+
+/*
+ * Msg struct. Sequence is assigned for global ordering by
+ * the cluster after the publisher has been acknowledged.
+ */
+struct  _Pb__MsgProto
+{
+  ProtobufCMessage base;
+  /*
+   * globally ordered sequence number for the subject's channel
+   */
+  uint64_t sequence;
+  /*
+   * subject
+   */
+  char *subject;
+  /*
+   * optional reply
+   */
+  char *reply;
+  /*
+   * payload
+   */
+  ProtobufCBinaryData data;
+  /*
+   * received timestamp
+   */
+  int64_t timestamp;
+  /*
+   * Flag specifying if the message is being redelivered
+   */
+  protobuf_c_boolean redelivered;
+  /*
+   * optional IEEE CRC32
+   */
+  uint32_t crc32;
+};
+#define PB__MSG_PROTO__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&pb__msg_proto__descriptor) \
+    , 0, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, {0,NULL}, 0, 0, 0 }
+
+
+/*
+ * Ack will deliver an ack for a delivered msg.
+ */
+struct  _Pb__Ack
+{
+  ProtobufCMessage base;
+  /*
+   * Subject
+   */
+  char *subject;
+  /*
+   * Sequence to acknowledge
+   */
+  uint64_t sequence;
+};
+#define PB__ACK__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&pb__ack__descriptor) \
+    , (char *)protobuf_c_empty_string, 0 }
+
+
+/*
+ * Connection Request
+ */
+struct  _Pb__ConnectRequest
+{
+  ProtobufCMessage base;
+  /*
+   * Client name/identifier.
+   */
+  char *clientid;
+  /*
+   * Inbox for server initiated heartbeats.
+   */
+  char *heartbeatinbox;
+  /*
+   * Protocol the client is at.
+   */
+  int32_t protocol;
+  /*
+   * Connection ID, a way to uniquely identify a connection (no connection should ever have the same)
+   */
+  ProtobufCBinaryData connid;
+  /*
+   * Interval at which client wishes to send PINGs (expressed in seconds).
+   */
+  int32_t pinginterval;
+  /*
+   * Maximum number of PINGs without a response after which the connection can be considered lost.
+   */
+  int32_t pingmaxout;
+};
+#define PB__CONNECT_REQUEST__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&pb__connect_request__descriptor) \
+    , (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, 0, {0,NULL}, 0, 0 }
+
+
+/*
+ * Response to a client connect
+ */
+struct  _Pb__ConnectResponse
+{
+  ProtobufCMessage base;
+  /*
+   * Prefix to use when publishing to this STAN cluster
+   */
+  char *pubprefix;
+  /*
+   * Subject to use for subscription requests
+   */
+  char *subrequests;
+  /*
+   * Subject to use for unsubscribe requests
+   */
+  char *unsubrequests;
+  /*
+   * Subject for closing the stan connection
+   */
+  char *closerequests;
+  /*
+   * err string, empty/omitted if no error
+   */
+  char *error;
+  /*
+   * Subject to use for subscription close requests
+   */
+  char *subcloserequests;
+  /*
+   * Subject to use for PING requests
+   */
+  char *pingrequests;
+  /*
+   * Interval at which client should send PINGs (expressed in seconds).
+   */
+  int32_t pinginterval;
+  /*
+   * Maximum number of PINGs without a response after which the connection can be considered lost
+   */
+  int32_t pingmaxout;
+  /*
+   * Protocol version the server is at
+   */
+  int32_t protocol;
+  /*
+   * Possibly used to sign acks, etc.
+   */
+  char *publickey;
+};
+#define PB__CONNECT_RESPONSE__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&pb__connect_response__descriptor) \
+    , (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, 0, 0, 0, (char *)protobuf_c_empty_string }
+
+
+/*
+ * PING from client to server
+ */
+struct  _Pb__Ping
+{
+  ProtobufCMessage base;
+  /*
+   * Connection ID
+   */
+  ProtobufCBinaryData connid;
+};
+#define PB__PING__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&pb__ping__descriptor) \
+    , {0,NULL} }
+
+
+/*
+ * PING response from the server
+ */
+struct  _Pb__PingResponse
+{
+  ProtobufCMessage base;
+  /*
+   * Error string, empty/omitted if no error
+   */
+  char *error;
+};
+#define PB__PING_RESPONSE__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&pb__ping_response__descriptor) \
+    , (char *)protobuf_c_empty_string }
+
+
+/*
+ * Protocol for a client to subscribe
+ */
+struct  _Pb__SubscriptionRequest
+{
+  ProtobufCMessage base;
+  /*
+   * ClientID
+   */
+  char *clientid;
+  /*
+   * Formal subject to subscribe to, e.g. foo.bar
+   */
+  char *subject;
+  /*
+   * Optional queue group
+   */
+  char *qgroup;
+  /*
+   * Inbox subject to deliver messages on
+   */
+  char *inbox;
+  /*
+   * Maximum inflight messages without an ack allowed
+   */
+  int32_t maxinflight;
+  /*
+   * Timeout for receiving an ack from the client
+   */
+  int32_t ackwaitinsecs;
+  /*
+   * Optional durable name which survives client restarts
+   */
+  char *durablename;
+  /*
+   * Start position
+   */
+  Pb__StartPosition startposition;
+  /*
+   * Optional start sequence number
+   */
+  uint64_t startsequence;
+  /*
+   * Optional start time
+   */
+  int64_t starttimedelta;
+};
+#define PB__SUBSCRIPTION_REQUEST__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&pb__subscription_request__descriptor) \
+    , (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, 0, 0, (char *)protobuf_c_empty_string, PB__START_POSITION__NewOnly, 0, 0 }
+
+
+/*
+ * Response for SubscriptionRequest and UnsubscribeRequests
+ */
+struct  _Pb__SubscriptionResponse
+{
+  ProtobufCMessage base;
+  /*
+   * ackInbox for sending acks
+   */
+  char *ackinbox;
+  /*
+   * err string, empty/omitted if no error
+   */
+  char *error;
+};
+#define PB__SUBSCRIPTION_RESPONSE__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&pb__subscription_response__descriptor) \
+    , (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string }
+
+
+/*
+ * Protocol for a clients to unsubscribe. Will return a SubscriptionResponse
+ */
+struct  _Pb__UnsubscribeRequest
+{
+  ProtobufCMessage base;
+  /*
+   * ClientID
+   */
+  char *clientid;
+  /*
+   * subject for the subscription
+   */
+  char *subject;
+  /*
+   * Inbox subject to identify subscription
+   */
+  char *inbox;
+  /*
+   * Optional durable name which survives client restarts
+   */
+  char *durablename;
+};
+#define PB__UNSUBSCRIBE_REQUEST__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&pb__unsubscribe_request__descriptor) \
+    , (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string }
+
+
+/*
+ * Protocol for a client to close a connection
+ */
+struct  _Pb__CloseRequest
+{
+  ProtobufCMessage base;
+  /*
+   * Client name provided to Connect() requests
+   */
+  char *clientid;
+};
+#define PB__CLOSE_REQUEST__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&pb__close_request__descriptor) \
+    , (char *)protobuf_c_empty_string }
+
+
+/*
+ * Response for CloseRequest
+ */
+struct  _Pb__CloseResponse
+{
+  ProtobufCMessage base;
+  /*
+   * err string, empty/omitted if no error
+   */
+  char *error;
+};
+#define PB__CLOSE_RESPONSE__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&pb__close_response__descriptor) \
+    , (char *)protobuf_c_empty_string }
+
+
+/* Pb__PubMsg methods */
+void   pb__pub_msg__init
+                     (Pb__PubMsg         *message);
+size_t pb__pub_msg__get_packed_size
+                     (const Pb__PubMsg   *message);
+size_t pb__pub_msg__pack
+                     (const Pb__PubMsg   *message,
+                      uint8_t             *out);
+size_t pb__pub_msg__pack_to_buffer
+                     (const Pb__PubMsg   *message,
+                      ProtobufCBuffer     *buffer);
+Pb__PubMsg *
+       pb__pub_msg__unpack
+                     (ProtobufCAllocator  *allocator,
+                      size_t               len,
+                      const uint8_t       *data);
+void   pb__pub_msg__free_unpacked
+                     (Pb__PubMsg *message,
+                      ProtobufCAllocator *allocator);
+/* Pb__PubAck methods */
+void   pb__pub_ack__init
+                     (Pb__PubAck         *message);
+size_t pb__pub_ack__get_packed_size
+                     (const Pb__PubAck   *message);
+size_t pb__pub_ack__pack
+                     (const Pb__PubAck   *message,
+                      uint8_t             *out);
+size_t pb__pub_ack__pack_to_buffer
+                     (const Pb__PubAck   *message,
+                      ProtobufCBuffer     *buffer);
+Pb__PubAck *
+       pb__pub_ack__unpack
+                     (ProtobufCAllocator  *allocator,
+                      size_t               len,
+                      const uint8_t       *data);
+void   pb__pub_ack__free_unpacked
+                     (Pb__PubAck *message,
+                      ProtobufCAllocator *allocator);
+/* Pb__MsgProto methods */
+void   pb__msg_proto__init
+                     (Pb__MsgProto         *message);
+size_t pb__msg_proto__get_packed_size
+                     (const Pb__MsgProto   *message);
+size_t pb__msg_proto__pack
+                     (const Pb__MsgProto   *message,
+                      uint8_t             *out);
+size_t pb__msg_proto__pack_to_buffer
+                     (const Pb__MsgProto   *message,
+                      ProtobufCBuffer     *buffer);
+Pb__MsgProto *
+       pb__msg_proto__unpack
+                     (ProtobufCAllocator  *allocator,
+                      size_t               len,
+                      const uint8_t       *data);
+void   pb__msg_proto__free_unpacked
+                     (Pb__MsgProto *message,
+                      ProtobufCAllocator *allocator);
+/* Pb__Ack methods */
+void   pb__ack__init
+                     (Pb__Ack         *message);
+size_t pb__ack__get_packed_size
+                     (const Pb__Ack   *message);
+size_t pb__ack__pack
+                     (const Pb__Ack   *message,
+                      uint8_t             *out);
+size_t pb__ack__pack_to_buffer
+                     (const Pb__Ack   *message,
+                      ProtobufCBuffer     *buffer);
+Pb__Ack *
+       pb__ack__unpack
+                     (ProtobufCAllocator  *allocator,
+                      size_t               len,
+                      const uint8_t       *data);
+void   pb__ack__free_unpacked
+                     (Pb__Ack *message,
+                      ProtobufCAllocator *allocator);
+/* Pb__ConnectRequest methods */
+void   pb__connect_request__init
+                     (Pb__ConnectRequest         *message);
+size_t pb__connect_request__get_packed_size
+                     (const Pb__ConnectRequest   *message);
+size_t pb__connect_request__pack
+                     (const Pb__ConnectRequest   *message,
+                      uint8_t             *out);
+size_t pb__connect_request__pack_to_buffer
+                     (const Pb__ConnectRequest   *message,
+                      ProtobufCBuffer     *buffer);
+Pb__ConnectRequest *
+       pb__connect_request__unpack
+                     (ProtobufCAllocator  *allocator,
+                      size_t               len,
+                      const uint8_t       *data);
+void   pb__connect_request__free_unpacked
+                     (Pb__ConnectRequest *message,
+                      ProtobufCAllocator *allocator);
+/* Pb__ConnectResponse methods */
+void   pb__connect_response__init
+                     (Pb__ConnectResponse         *message);
+size_t pb__connect_response__get_packed_size
+                     (const Pb__ConnectResponse   *message);
+size_t pb__connect_response__pack
+                     (const Pb__ConnectResponse   *message,
+                      uint8_t             *out);
+size_t pb__connect_response__pack_to_buffer
+                     (const Pb__ConnectResponse   *message,
+                      ProtobufCBuffer     *buffer);
+Pb__ConnectResponse *
+       pb__connect_response__unpack
+                     (ProtobufCAllocator  *allocator,
+                      size_t               len,
+                      const uint8_t       *data);
+void   pb__connect_response__free_unpacked
+                     (Pb__ConnectResponse *message,
+                      ProtobufCAllocator *allocator);
+/* Pb__Ping methods */
+void   pb__ping__init
+                     (Pb__Ping         *message);
+size_t pb__ping__get_packed_size
+                     (const Pb__Ping   *message);
+size_t pb__ping__pack
+                     (const Pb__Ping   *message,
+                      uint8_t             *out);
+size_t pb__ping__pack_to_buffer
+                     (const Pb__Ping   *message,
+                      ProtobufCBuffer     *buffer);
+Pb__Ping *
+       pb__ping__unpack
+                     (ProtobufCAllocator  *allocator,
+                      size_t               len,
+                      const uint8_t       *data);
+void   pb__ping__free_unpacked
+                     (Pb__Ping *message,
+                      ProtobufCAllocator *allocator);
+/* Pb__PingResponse methods */
+void   pb__ping_response__init
+                     (Pb__PingResponse         *message);
+size_t pb__ping_response__get_packed_size
+                     (const Pb__PingResponse   *message);
+size_t pb__ping_response__pack
+                     (const Pb__PingResponse   *message,
+                      uint8_t             *out);
+size_t pb__ping_response__pack_to_buffer
+                     (const Pb__PingResponse   *message,
+                      ProtobufCBuffer     *buffer);
+Pb__PingResponse *
+       pb__ping_response__unpack
+                     (ProtobufCAllocator  *allocator,
+                      size_t               len,
+                      const uint8_t       *data);
+void   pb__ping_response__free_unpacked
+                     (Pb__PingResponse *message,
+                      ProtobufCAllocator *allocator);
+/* Pb__SubscriptionRequest methods */
+void   pb__subscription_request__init
+                     (Pb__SubscriptionRequest         *message);
+size_t pb__subscription_request__get_packed_size
+                     (const Pb__SubscriptionRequest   *message);
+size_t pb__subscription_request__pack
+                     (const Pb__SubscriptionRequest   *message,
+                      uint8_t             *out);
+size_t pb__subscription_request__pack_to_buffer
+                     (const Pb__SubscriptionRequest   *message,
+                      ProtobufCBuffer     *buffer);
+Pb__SubscriptionRequest *
+       pb__subscription_request__unpack
+                     (ProtobufCAllocator  *allocator,
+                      size_t               len,
+                      const uint8_t       *data);
+void   pb__subscription_request__free_unpacked
+                     (Pb__SubscriptionRequest *message,
+                      ProtobufCAllocator *allocator);
+/* Pb__SubscriptionResponse methods */
+void   pb__subscription_response__init
+                     (Pb__SubscriptionResponse         *message);
+size_t pb__subscription_response__get_packed_size
+                     (const Pb__SubscriptionResponse   *message);
+size_t pb__subscription_response__pack
+                     (const Pb__SubscriptionResponse   *message,
+                      uint8_t             *out);
+size_t pb__subscription_response__pack_to_buffer
+                     (const Pb__SubscriptionResponse   *message,
+                      ProtobufCBuffer     *buffer);
+Pb__SubscriptionResponse *
+       pb__subscription_response__unpack
+                     (ProtobufCAllocator  *allocator,
+                      size_t               len,
+                      const uint8_t       *data);
+void   pb__subscription_response__free_unpacked
+                     (Pb__SubscriptionResponse *message,
+                      ProtobufCAllocator *allocator);
+/* Pb__UnsubscribeRequest methods */
+void   pb__unsubscribe_request__init
+                     (Pb__UnsubscribeRequest         *message);
+size_t pb__unsubscribe_request__get_packed_size
+                     (const Pb__UnsubscribeRequest   *message);
+size_t pb__unsubscribe_request__pack
+                     (const Pb__UnsubscribeRequest   *message,
+                      uint8_t             *out);
+size_t pb__unsubscribe_request__pack_to_buffer
+                     (const Pb__UnsubscribeRequest   *message,
+                      ProtobufCBuffer     *buffer);
+Pb__UnsubscribeRequest *
+       pb__unsubscribe_request__unpack
+                     (ProtobufCAllocator  *allocator,
+                      size_t               len,
+                      const uint8_t       *data);
+void   pb__unsubscribe_request__free_unpacked
+                     (Pb__UnsubscribeRequest *message,
+                      ProtobufCAllocator *allocator);
+/* Pb__CloseRequest methods */
+void   pb__close_request__init
+                     (Pb__CloseRequest         *message);
+size_t pb__close_request__get_packed_size
+                     (const Pb__CloseRequest   *message);
+size_t pb__close_request__pack
+                     (const Pb__CloseRequest   *message,
+                      uint8_t             *out);
+size_t pb__close_request__pack_to_buffer
+                     (const Pb__CloseRequest   *message,
+                      ProtobufCBuffer     *buffer);
+Pb__CloseRequest *
+       pb__close_request__unpack
+                     (ProtobufCAllocator  *allocator,
+                      size_t               len,
+                      const uint8_t       *data);
+void   pb__close_request__free_unpacked
+                     (Pb__CloseRequest *message,
+                      ProtobufCAllocator *allocator);
+/* Pb__CloseResponse methods */
+void   pb__close_response__init
+                     (Pb__CloseResponse         *message);
+size_t pb__close_response__get_packed_size
+                     (const Pb__CloseResponse   *message);
+size_t pb__close_response__pack
+                     (const Pb__CloseResponse   *message,
+                      uint8_t             *out);
+size_t pb__close_response__pack_to_buffer
+                     (const Pb__CloseResponse   *message,
+                      ProtobufCBuffer     *buffer);
+Pb__CloseResponse *
+       pb__close_response__unpack
+                     (ProtobufCAllocator  *allocator,
+                      size_t               len,
+                      const uint8_t       *data);
+void   pb__close_response__free_unpacked
+                     (Pb__CloseResponse *message,
+                      ProtobufCAllocator *allocator);
+/* --- per-message closures --- */
+
+typedef void (*Pb__PubMsg_Closure)
+                 (const Pb__PubMsg *message,
+                  void *closure_data);
+typedef void (*Pb__PubAck_Closure)
+                 (const Pb__PubAck *message,
+                  void *closure_data);
+typedef void (*Pb__MsgProto_Closure)
+                 (const Pb__MsgProto *message,
+                  void *closure_data);
+typedef void (*Pb__Ack_Closure)
+                 (const Pb__Ack *message,
+                  void *closure_data);
+typedef void (*Pb__ConnectRequest_Closure)
+                 (const Pb__ConnectRequest *message,
+                  void *closure_data);
+typedef void (*Pb__ConnectResponse_Closure)
+                 (const Pb__ConnectResponse *message,
+                  void *closure_data);
+typedef void (*Pb__Ping_Closure)
+                 (const Pb__Ping *message,
+                  void *closure_data);
+typedef void (*Pb__PingResponse_Closure)
+                 (const Pb__PingResponse *message,
+                  void *closure_data);
+typedef void (*Pb__SubscriptionRequest_Closure)
+                 (const Pb__SubscriptionRequest *message,
+                  void *closure_data);
+typedef void (*Pb__SubscriptionResponse_Closure)
+                 (const Pb__SubscriptionResponse *message,
+                  void *closure_data);
+typedef void (*Pb__UnsubscribeRequest_Closure)
+                 (const Pb__UnsubscribeRequest *message,
+                  void *closure_data);
+typedef void (*Pb__CloseRequest_Closure)
+                 (const Pb__CloseRequest *message,
+                  void *closure_data);
+typedef void (*Pb__CloseResponse_Closure)
+                 (const Pb__CloseResponse *message,
+                  void *closure_data);
+
+/* --- services --- */
+
+
+/* --- descriptors --- */
+
+extern const ProtobufCEnumDescriptor    pb__start_position__descriptor;
+extern const ProtobufCMessageDescriptor pb__pub_msg__descriptor;
+extern const ProtobufCMessageDescriptor pb__pub_ack__descriptor;
+extern const ProtobufCMessageDescriptor pb__msg_proto__descriptor;
+extern const ProtobufCMessageDescriptor pb__ack__descriptor;
+extern const ProtobufCMessageDescriptor pb__connect_request__descriptor;
+extern const ProtobufCMessageDescriptor pb__connect_response__descriptor;
+extern const ProtobufCMessageDescriptor pb__ping__descriptor;
+extern const ProtobufCMessageDescriptor pb__ping_response__descriptor;
+extern const ProtobufCMessageDescriptor pb__subscription_request__descriptor;
+extern const ProtobufCMessageDescriptor pb__subscription_response__descriptor;
+extern const ProtobufCMessageDescriptor pb__unsubscribe_request__descriptor;
+extern const ProtobufCMessageDescriptor pb__close_request__descriptor;
+extern const ProtobufCMessageDescriptor pb__close_response__descriptor;
+
+PROTOBUF_C__END_DECLS
+
+
+#endif  /* PROTOBUF_C_protocol_2eproto__INCLUDED */
diff --git a/src/stan/pub.c b/src/stan/pub.c
new file mode 100644 (file)
index 0000000..86f84bc
--- /dev/null
@@ -0,0 +1,536 @@
+// Copyright 2018-2020 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "pub.h"
+#include "conn.h"
+
+#include "../conn.h"
+
+static void
+_pubAckFree(_pubAck *pa)
+{
+    if ((pa->error != NULL) && !pa->dontFreeError)
+        NATS_FREE(pa->error);
+    NATS_FREE(pa->guid);
+    NATS_FREE(pa);
+}
+
+static void
+_pubAckRemoveFromList(stanConnection *sc, _pubAck *pa)
+{
+    if ((pa->prev != NULL) || (pa->next != NULL))
+    {
+        if (pa->prev != NULL)
+            pa->prev->next = pa->next;
+        if (pa->next != NULL)
+            pa->next->prev = pa->prev;
+    }
+    if (pa == sc->pubAckHead)
+        sc->pubAckHead = pa->next;
+    if (pa == sc->pubAckTail)
+        sc->pubAckTail = pa->prev;
+
+    pa->prev = NULL;
+    pa->next = NULL;
+}
+
+static void
+_stanPossiblyReleasePublishCall(stanConnection *sc)
+{
+    if (natsStrHash_Count(sc->pubAckMap) < sc->pubAckMaxInflightThreshold)
+        natsCondition_Broadcast(sc->pubAckMaxInflightCond);
+}
+
+void
+stanProcessPubAck(natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure)
+{
+    stanConnection  *sc     = (stanConnection*) closure;
+    uint8_t         *data   = NULL;
+    size_t          dataLen = 0;
+
+    data    = (uint8_t*) natsMsg_GetData(msg);
+    dataLen = (size_t) natsMsg_GetDataLength(msg);
+
+    if (dataLen > 0)
+    {
+        ProtobufCAllocator  *alloc = (ProtobufCAllocator*) sc->pubAckAllocator;
+        Pb__PubAck          *pubAck;
+
+        natsPBufAllocator_Prepare(sc->pubAckAllocator, (int) dataLen);
+
+        pubAck = pb__pub_ack__unpack(alloc, dataLen, data);
+        if (pubAck != NULL)
+        {
+            _pubAck *pa;
+            char    *error = NULL;
+            bool    ic = false;
+
+            if ((pubAck->error != NULL) && (pubAck->error[0] != '\0'))
+                error = pubAck->error;
+
+            natsMutex_Lock(sc->pubAckMu);
+            pa = natsStrHash_Remove(sc->pubAckMap, pubAck->guid);
+            // It could have been removed by the publish calls.
+            if (pa != NULL)
+            {
+                // For sync publish, we need to update `pa`
+                // and wake up caller.
+                if (pa->isSync)
+                {
+                    // Mark that the pub ack was received
+                    pa->received = true;
+                    // Get the error if any
+                    if (error != NULL)
+                    {
+                        pa->error = NATS_STRDUP(error);
+                        if (pa->error == NULL)
+                        {
+                            pa->error = (char*) "no memory copying error";
+                            pa->dontFreeError = true;
+                        }
+                    }
+                    // Wake up caller if needed.
+                    if (sc->pubAckInWait > 0)
+                        natsCondition_Broadcast(sc->pubAckCond);
+                }
+                else
+                {
+                    // Remove from list
+                    _pubAckRemoveFromList(sc, pa);
+
+                    // Indicate that we need to invoke the callback
+                    ic = true;
+                }
+
+                // Check for possible blocked publish call and release if needed
+                if (sc->pubAckMaxInflightInWait)
+                    _stanPossiblyReleasePublishCall(sc);
+            }
+            natsMutex_Unlock(sc->pubAckMu);
+
+            // Asynchronous publish calls only..
+            // We don't check for ((pa != NULL) && !pa->isSync)) here
+            // because for sync calls, `pa` may have been freed by
+            // now in stanConnection_Publish().
+            if (ic)
+            {
+                // If handler specified, invoke here.
+                if (pa->ah != NULL)
+                    (*pa->ah)(pubAck->guid, error, pa->ahClosure);
+
+                // Done with `pa`.
+                _pubAckFree(pa);
+            }
+
+            pb__pub_ack__free_unpacked(pubAck, alloc);
+        }
+    }
+
+    natsMsg_Destroy(msg);
+}
+
+static void
+_pubAckTimerCB(natsTimer *timer, void* closure)
+{
+    stanConnection      *sc     = (stanConnection*) closure;
+    _pubAck             *pa     = NULL;
+    bool                ic      = false;
+    const char          *err    = NULL;
+    bool                closed  = false;
+    bool                done    = false;
+
+    for (;!done;)
+    {
+        ic = false;
+
+        natsMutex_Lock(sc->pubAckMu);
+        closed = sc->pubAckClosed;
+        if (sc->pubAckHead != NULL)
+        {
+            int64_t now = nats_Now();
+
+            pa = sc->pubAckHead;
+
+            // Check that we are at or past the deadline
+            if (closed || (now >= pa->deadline))
+            {
+                natsStrHash_Remove(sc->pubAckMap, pa->guid);
+                // This will update the head
+                _pubAckRemoveFromList(sc, pa);
+                // Check for possible blocked publish call and release if needed
+                if (!sc->pubAckClosed && sc->pubAckMaxInflightInWait)
+                    _stanPossiblyReleasePublishCall(sc);
+                // We should invoke the callback
+                ic = true;
+            }
+
+            if (!closed)
+            {
+                // Reset timer, either with current head but new timeout
+                // or to the new head's deadline.
+                if (sc->pubAckHead != NULL)
+                {
+                    // If next deadline is really close, consider that
+                    // it will expire in this iteration. Set its deadline
+                    // to now and don't reset timer yet.
+                    if (sc->pubAckHead->deadline-now <= 5)
+                    {
+                        sc->pubAckHead->deadline = now;
+                    }
+                    else
+                    {
+                        natsTimer_Reset(sc->pubAckTimer, sc->pubAckHead->deadline-now);
+                        // Stop the 'for' loop
+                        done = true;
+                    }
+                }
+                else
+                {
+                    // Set to an hour, but mark that this need a reset when
+                    // a new async message is published.
+                    natsTimer_Reset(sc->pubAckTimer, 60*60*1000);
+                    sc->pubAckTimerNeedReset = true;
+                    // Stop the 'for' loop
+                    done = true;
+                }
+            }
+        }
+        else
+        {
+            done = true;
+        }
+        natsMutex_Unlock(sc->pubAckMu);
+
+        if (ic && (pa != NULL))
+        {
+            // Handler may not be set.
+            if (pa->ah != NULL)
+            {
+                if (closed)
+                    err = natsStatus_GetText(NATS_CONNECTION_CLOSED);
+                else
+                    err = STAN_ERR_PUB_ACK_TIMEOUT;
+                (*pa->ah)(pa->guid, (char*) err, pa->ahClosure);
+            }
+            // Done with `pa`.
+            _pubAckFree(pa);
+        }
+    }
+
+    if (closed)
+    {
+        natsMutex_Lock(sc->mu);
+        natsTimer_Stop(sc->pubAckTimer);
+        natsMutex_Unlock(sc->mu);
+    }
+}
+
+static void
+_pubAckTimerStopCB(natsTimer *timer, void* closure)
+{
+    stanConnection *sc = (stanConnection*) closure;
+    stanConn_release(sc);
+}
+
+#define GUID_LEN   (23)
+
+static natsStatus
+_stanPublish(stanConnection *sc, const char *channel, const void *data, int dataLen,
+             bool isSync, int64_t *deadline, _pubAck *pa)
+{
+    natsStatus  s = NATS_OK;
+    int64_t     ackTimeout = 0;
+
+    if (sc == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    if (channel == NULL)
+        return nats_setDefaultError(NATS_INVALID_SUBJECT);
+
+    stanConn_Lock(sc);
+    if (sc->closed)
+    {
+        stanConn_Unlock(sc);
+        return nats_setDefaultError(NATS_CONNECTION_CLOSED);
+    }
+
+    pa->guid = NATS_MALLOC(GUID_LEN);
+    if (pa->guid == NULL)
+        s = nats_setDefaultError(NATS_NO_MEMORY);
+
+    if (s == NATS_OK)
+        s = natsNUID_Next(pa->guid, GUID_LEN);
+    if (s == NATS_OK)
+    {
+        Pb__PubMsg  pubReq;
+        int         pubSize   = 0;
+
+        pb__pub_msg__init(&pubReq);
+        pubReq.clientid = sc->clientID;
+        pubReq.connid.data = (uint8_t*) sc->connID;
+        pubReq.connid.len = sc->connIDLen;
+        pubReq.subject = (char*) channel;
+        pubReq.guid = pa->guid;
+        pubReq.data.data = (uint8_t*) data;
+        pubReq.data.len = dataLen;
+
+        pubSize = (int) pb__pub_msg__get_packed_size(&pubReq);
+        if (pubSize == 0)
+        {
+            s = nats_setError(NATS_ERR, "%s", "publish message protocol packed size is 0");
+        }
+        else
+        {
+            int chanLen = (int) strlen(channel);
+            int subjLen = sc->pubPrefixLen + 1 + chanLen + 1;
+
+            if (subjLen > sc->pubSubjBufCap)
+                s = expandBuf(&sc->pubSubjBuf, &sc->pubSubjBufCap, subjLen);
+
+            if (pubSize > sc->pubMsgBufCap)
+                s = expandBuf(&sc->pubMsgBuf, &sc->pubMsgBufCap, (int)((float)pubSize * 1.1));
+
+            if (s == NATS_OK)
+            {
+                char *ptr;
+
+                ptr = sc->pubSubjBuf;
+                // We know the buffer is big enough, so copy directly
+                memcpy(ptr, sc->pubPrefix, sc->pubPrefixLen);
+                ptr += sc->pubPrefixLen;
+                ptr[0]='.';
+                ptr++;
+                memcpy(ptr, channel, chanLen);
+                ptr += chanLen;
+                ptr[0]='\0';
+            }
+            if (s == NATS_OK)
+            {
+                natsMutex_Lock(sc->pubAckMu);
+
+                // If calling Close() while stuck in the condition wait below, this
+                // flag will be set to true (under pubAckMu) by Close() to kick us
+                // out and make sure we don't go back right at it.
+
+                // Check if we should block due to maxInflight. Since we are under
+                // connection's lock, there can be at most one Publis[Async]() call
+                // blocked here (the other would be blocked at top of function trying
+                // to grab the connection's lock).
+                while (!sc->pubAckClosed && (natsStrHash_Count(sc->pubAckMap) == sc->opts->maxPubAcksInflight))
+                {
+                    sc->pubAckMaxInflightInWait = true;
+                    natsCondition_Wait(sc->pubAckMaxInflightCond, sc->pubAckMu);
+                    sc->pubAckMaxInflightInWait = false;
+                }
+
+                // We could be closing, but stanConnection_Close() is waiting for
+                // sc->mu to be released. Still, we can fail this publish call.
+                if (sc->pubAckClosed)
+                    s = nats_setDefaultError(NATS_CONNECTION_CLOSED);
+
+                if (s == NATS_OK)
+                {
+                    // Compute absolute time based on current time and the pub ack timeout.
+                    ackTimeout = nats_setTargetTime(sc->opts->pubAckTimeout);
+
+                    // For Publish() calls, store in map, no need to copy keep since it is in pa.
+                    if (isSync)
+                    {
+                        s = natsStrHash_Set(sc->pubAckMap, pa->guid, false, (void*) pa, NULL);
+                    }
+                    else
+                    {
+                        pa->deadline = ackTimeout;
+
+                        s = natsStrHash_Set(sc->pubAckMap, pa->guid, false, (void*) pa, NULL);
+
+                        // Add to list and create timer if needed
+                        if (s == NATS_OK)
+                        {
+                            // If timer was never created, create now
+                            if (sc->pubAckTimer == NULL)
+                            {
+                                s = natsTimer_Create(&sc->pubAckTimer, _pubAckTimerCB, _pubAckTimerStopCB, sc->opts->pubAckTimeout, (void*) sc);
+                                if (s == NATS_OK)
+                                    sc->refs++;
+                            }
+                            else if (sc->pubAckTimerNeedReset)
+                            {
+                                natsTimer_Reset(sc->pubAckTimer, sc->opts->pubAckTimeout);
+                                sc->pubAckTimerNeedReset = false;
+                            }
+                            if (s == NATS_OK)
+                            {
+                                // Add to list
+                                if (sc->pubAckTail != NULL)
+                                {
+                                    pa->prev = sc->pubAckTail;
+                                    sc->pubAckTail->next = pa;
+                                }
+                                else
+                                {
+                                    sc->pubAckHead = pa;
+                                }
+                                sc->pubAckTail = pa;
+                            }
+                            else
+                            {
+                                natsStrHash_Remove(sc->pubAckMap, pa->guid);
+                            }
+                        }
+                    }
+                }
+                natsMutex_Unlock(sc->pubAckMu);
+            }
+            if (s == NATS_OK)
+            {
+                int packedSize;
+
+                packedSize = (int) pb__pub_msg__pack(&pubReq, (uint8_t*) sc->pubMsgBuf);
+                if (pubSize != packedSize)
+                {
+                    s = nats_setError(NATS_ERR, "publish message protocol computed packed size is %d, got %d",
+                            pubSize, packedSize);
+                }
+                else
+                {
+                    natsMsg msg;
+
+                    natsMsg_init(&msg, (const char*) sc->pubSubjBuf,
+                                 (const char*) sc->pubMsgBuf, pubSize);
+                    // Use private function to cause flush of buffer in place if sync call
+                    s = natsConn_publish(sc->nc, &msg, (const char*) sc->ackSubject, isSync);
+                }
+                if ((s != NATS_OK) && (pa != NULL))
+                {
+                    // Since we may not have sent the message, remove the pa from map
+                    natsMutex_Lock(sc->pubAckMu);
+                    natsStrHash_Remove(sc->pubAckMap, pa->guid);
+                    // Only PublishAsync() calls add `pa` to the list
+                    if (!isSync)
+                        _pubAckRemoveFromList(sc, pa);
+                    natsMutex_Unlock(sc->pubAckMu);
+                }
+            }
+        }
+    }
+    // On success, retain for sync calls.
+    if ((s == NATS_OK) && isSync)
+        sc->refs++;
+    stanConn_Unlock(sc);
+
+    if ((s == NATS_OK) && isSync)
+        *deadline = ackTimeout;
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+stanConnection_Publish(stanConnection *sc, const char *channel, const void *data, int dataLen)
+{
+    natsStatus  s;
+    int64_t     deadline = 0;
+    _pubAck     *pa = NULL;
+    bool        releaseConn = false;
+
+    pa = NATS_CALLOC(1, sizeof(_pubAck));
+    if (pa == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    pa->isSync = true;
+
+    s = _stanPublish(sc, channel, data, dataLen, true, &deadline, pa);
+    if (s == NATS_OK)
+    {
+        bool received = false;
+        bool closed   = false;
+
+        // On _stanPublish success, we need to release connection at the end
+        // of this function.
+        releaseConn = true;
+
+        while ((s != NATS_TIMEOUT) && !received && !closed)
+        {
+            natsMutex_Lock(sc->pubAckMu);
+            received = pa->received;
+            closed = sc->pubAckClosed;
+            if (!closed && !received)
+            {
+                sc->pubAckInWait++;
+                s = natsCondition_AbsoluteTimedWait(sc->pubAckCond, sc->pubAckMu, deadline);
+                sc->pubAckInWait--;
+            }
+            natsMutex_Unlock(sc->pubAckMu);
+        }
+        if ((s == NATS_OK) && !received && closed)
+            s = nats_setDefaultError(NATS_CONNECTION_CLOSED);
+        if (s != NATS_OK)
+        {
+            // Regardless the error, we need to remove from map
+            natsMutex_Lock(sc->pubAckMu);
+            // If we cannot remove, it means we just received the ack
+            // and need to proceed with "success" branch.
+            if (natsStrHash_Remove(sc->pubAckMap, pa->guid) != NULL)
+            {
+                // For timeout, augment the error text
+                if (s == NATS_TIMEOUT)
+                    NATS_UPDATE_ERR_TXT("%s", STAN_ERR_PUB_ACK_TIMEOUT);
+            }
+            else
+            {
+                s = NATS_OK;
+                // Error was set in condition wait, so clear.
+                nats_clearLastError();
+            }
+            natsMutex_Unlock(sc->pubAckMu);
+        }
+        if (s == NATS_OK)
+        {
+            // PubAck was received, if error report that error.
+            if (pa->error != NULL)
+                s = nats_setError(NATS_ERR, "%s", pa->error);
+        }
+    }
+    // Done with `pa`.
+    _pubAckFree(pa);
+
+    if (releaseConn)
+        stanConn_release(sc);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+stanConnection_PublishAsync(stanConnection *sc, const char *channel,
+                            const void *data, int dataLen,
+                            stanPubAckHandler ah, void *ahClosure)
+{
+    natsStatus  s;
+    _pubAck     *pa = NULL;
+
+    pa = NATS_CALLOC(1, sizeof(_pubAck));
+    if (pa == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    // These are possibly NULL.
+    pa->ah        = ah;
+    pa->ahClosure = ahClosure;
+
+    s = _stanPublish(sc, channel, data, dataLen, false, NULL, pa);
+    // If error, `pa` has not been stored (or stored, but then removed).
+    // It is our responsibility to free it here.
+    if (s != NATS_OK)
+        _pubAckFree(pa);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
diff --git a/src/stan/pub.h b/src/stan/pub.h
new file mode 100644 (file)
index 0000000..4acb2e9
--- /dev/null
@@ -0,0 +1,24 @@
+// Copyright 2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef STAN_PUB_H_
+#define STAN_PUB_H_
+
+#include "stanp.h"
+
+#define STAN_ERR_PUB_ACK_TIMEOUT  "publish ack timeout"
+
+void
+stanProcessPubAck(natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure);
+
+#endif /* STAN_PUB_H_ */
diff --git a/src/stan/sopts.c b/src/stan/sopts.c
new file mode 100644 (file)
index 0000000..041333e
--- /dev/null
@@ -0,0 +1,225 @@
+// Copyright 2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "sopts.h"
+#include "../opts.h"
+
+static void
+_stanSubOpts_free(stanSubOptions *opts)
+{
+    if (opts == NULL)
+        return;
+
+    NATS_FREE(opts->durableName);
+    natsMutex_Destroy(opts->mu);
+    NATS_FREE(opts);
+}
+
+natsStatus
+stanSubOptions_Create(stanSubOptions **newOpts)
+{
+    natsStatus      s = NATS_OK;
+    stanSubOptions  *opts = NULL;
+
+    // Ensure the library is loaded
+    s = nats_Open(-1);
+    if (s != NATS_OK)
+        return s;
+
+    opts = (stanSubOptions*) NATS_CALLOC(1, sizeof(stanSubOptions));
+    if (opts == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    if (natsMutex_Create(&(opts->mu)) != NATS_OK)
+    {
+        NATS_FREE(opts);
+        return NATS_UPDATE_ERR_STACK(NATS_NO_MEMORY);
+    }
+
+    opts->maxInflight = STAN_SUB_OPTS_DEFAULT_MAX_INFLIGHT;
+    opts->ackWait = STAN_SUB_OPTS_DEFAULT_ACK_WAIT;
+    opts->startAt = PB__START_POSITION__NewOnly;
+
+    if (s == NATS_OK)
+        *newOpts = opts;
+    else
+        _stanSubOpts_free(opts);
+
+    return s;
+}
+
+natsStatus
+stanSubOptions_SetDurableName(stanSubOptions *opts, const char *durableName)
+{
+    natsStatus s = NATS_OK;
+
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    if (opts->durableName != NULL)
+    {
+        NATS_FREE(opts->durableName);
+        opts->durableName = NULL;
+    }
+    if (durableName != NULL)
+        DUP_STRING(s, opts->durableName, durableName);
+
+    UNLOCK_OPTS(opts);
+
+    return s;
+}
+
+natsStatus
+stanSubOptions_SetAckWait(stanSubOptions *opts, int64_t wait)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, (wait <= 0));
+
+    opts->ackWait = wait;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+stanSubOptions_SetMaxInflight(stanSubOptions *opts, int maxInflight)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, (maxInflight < 1));
+
+    opts->maxInflight = maxInflight;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+stanSubOptions_StartAtSequence(stanSubOptions *opts, uint64_t seq)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, (seq < 1));
+
+    opts->startAt = PB__START_POSITION__SequenceStart;
+    opts->startSequence = seq;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+stanSubOptions_StartAtTime(stanSubOptions *opts, int64_t time)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, (time < 0));
+
+    opts->startAt = PB__START_POSITION__TimeDeltaStart;
+    opts->startTime = time;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+stanSubOptions_StartAtTimeDelta(stanSubOptions *opts, int64_t delta)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, (delta < 0));
+
+    opts->startAt = PB__START_POSITION__TimeDeltaStart;
+    opts->startTime = nats_Now() - delta;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+stanSubOptions_StartWithLastReceived(stanSubOptions *opts)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    opts->startAt = PB__START_POSITION__LastReceived;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+
+}
+
+natsStatus
+stanSubOptions_DeliverAllAvailable(stanSubOptions *opts)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    opts->startAt = PB__START_POSITION__First;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+
+}
+
+natsStatus
+stanSubOptions_SetManualAckMode(stanSubOptions *opts, bool manual)
+{
+    LOCK_AND_CHECK_OPTIONS(opts, 0);
+
+    opts->manualAcks = manual;
+
+    UNLOCK_OPTS(opts);
+
+    return NATS_OK;
+}
+
+natsStatus
+stanSubOptions_clone(stanSubOptions **clonedOpts, stanSubOptions *opts)
+{
+    natsStatus      s       = NATS_OK;
+    stanSubOptions  *cloned = NULL;
+    int             muSize;
+
+    s = stanSubOptions_Create(&cloned);
+    if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    natsMutex_Lock(opts->mu);
+
+    muSize = sizeof(cloned->mu);
+
+    // Make a blind copy first...
+    memcpy((char*)cloned + muSize, (char*)opts + muSize,
+           sizeof(stanSubOptions) - muSize);
+
+    // Then remove all pointers, so that if we fail while
+    // copying them, and free the cloned, we don't free the pointers
+    // from the original.
+    cloned->durableName = NULL;
+
+    s = stanSubOptions_SetDurableName(cloned, opts->durableName);
+
+    if (s == NATS_OK)
+        *clonedOpts = cloned;
+    else
+        _stanSubOpts_free(cloned);
+
+    natsMutex_Unlock(opts->mu);
+
+    return s;
+}
+
+void
+stanSubOptions_Destroy(stanSubOptions *opts)
+{
+    if (opts == NULL)
+        return;
+
+    _stanSubOpts_free(opts);
+}
diff --git a/src/stan/sopts.h b/src/stan/sopts.h
new file mode 100644 (file)
index 0000000..1fba8b6
--- /dev/null
@@ -0,0 +1,25 @@
+// Copyright 2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef SOPTS_H_
+#define SOPTS_H_
+
+#include "stanp.h"
+
+#define STAN_SUB_OPTS_DEFAULT_MAX_INFLIGHT       (1024)
+#define STAN_SUB_OPTS_DEFAULT_ACK_WAIT           (30 * 1000) // 30 seconds
+
+natsStatus
+stanSubOptions_clone(stanSubOptions **clonedOpts, stanSubOptions *opts);
+
+#endif /* SOPTS_H_ */
diff --git a/src/stan/stanp.h b/src/stan/stanp.h
new file mode 100644 (file)
index 0000000..8189b29
--- /dev/null
@@ -0,0 +1,238 @@
+// Copyright 2018-2019 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef STANP_H_
+#define STANP_H_
+
+#include "../natsp.h"
+#include "../mem.h"
+#include "protocol.pb-c.h"
+#include "protobuf-c/protobuf-c.h"
+
+extern bool testAllowMillisecInPings;
+
+struct __stanConnOptions
+{
+    natsMutex                   *mu;
+
+    // URL to connect to. Takes precedence to any URL set in ncOpts.
+    char                        *url;
+
+    // Low level NATS connection options to use to create the NATS connection.
+    natsOptions                 *ncOpts;
+
+    // Discovery prefix. The connect request is sent to that + "." + name of cluster.
+    char                        *discoveryPrefix;
+
+    // Connection create/close request timeout (in milliseconds).
+    int64_t                     connTimeout;
+
+    // How long (in milliseconds) to wait for a published message ack.
+    int64_t                     pubAckTimeout;
+    // Max number of messages that can be sent without receiving corresponding ack from server.
+    int                         maxPubAcksInflight;
+    // Percentage of above value to decide when to release a blocked publish call.
+    float                       maxPubAcksInFlightPercentage;
+
+    // Ping interval (number of seconds, except in tests where it can be interpreted as milliseconds)
+    int                         pingInterval;
+    // Max number of PINGs without receiving any PONG
+    int                         pingMaxOut;
+
+    // Callback and closure to invoke when connection is permanently lost.
+    stanConnectionLostHandler   connectionLostCB;
+    void                        *connectionLostCBClosure;
+};
+
+struct __stanSubOptions
+{
+    natsMutex                   *mu;
+
+    // DurableName, if set will survive client restarts.
+    char                        *durableName;
+
+    // Controls the number of messages the cluster will have inflight without an ACK.
+    int                         maxInflight;
+
+    // Controls the time the cluster will wait for an ACK for a given message.
+    // This is in milliseconds.
+    int64_t                     ackWait;
+
+    // StartPosition enum from proto.
+    Pb__StartPosition           startAt;
+
+    // Optional start sequence number.
+    uint64_t                    startSequence;
+
+    // Optional start time (expressed in milliseconds)
+    int64_t                     startTime;
+
+    // Option to do Manual Acks
+    bool                        manualAcks;
+};
+
+
+typedef struct __pubAck
+{
+    char                *guid;
+    int64_t             deadline;
+    stanPubAckHandler   ah;
+    void                *ahClosure;
+    char                *error;
+    bool                dontFreeError;
+    bool                received;
+    bool                isSync;
+    struct __pubAck     *prev;
+    struct __pubAck     *next;
+
+} _pubAck;
+
+typedef struct __natsPBufAllocator
+{
+    ProtobufCAllocator  base;
+
+    char                *buf;
+    int                 cap;
+    int                 used;
+    int                 remaining;
+    int                 protoSize;
+    int                 overhead;
+
+} natsPBufAllocator;
+
+struct __stanConnection
+{
+    natsMutex           *mu;
+    int                 refs;
+
+    stanConnOptions     *opts;
+
+    natsConnection      *nc;
+
+    char                *clusterID;
+    char                *clientID;
+    char                *connID;
+    int                 connIDLen;
+
+    char                *pubPrefix;
+    char                *subRequests;
+    char                *unsubRequests;
+    char                *subCloseRequests;
+    char                *closeRequests;
+
+    char                *ackSubject;
+    natsSubscription    *ackSubscription;
+
+    natsInbox           *hbInbox;
+    natsSubscription    *hbSubscription;
+
+    natsMutex           *pubAckMu;
+    natsStrHash         *pubAckMap;
+    natsCondition       *pubAckCond;
+    int                 pubAckInWait;
+    natsCondition       *pubAckMaxInflightCond;
+    int                 pubAckMaxInflightThreshold;
+    bool                pubAckMaxInflightInWait;
+    bool                pubAckClosed;
+
+    _pubAck             *pubAckHead;
+    _pubAck             *pubAckTail;
+    natsTimer           *pubAckTimer;
+    bool                pubAckTimerNeedReset;
+    natsPBufAllocator   *pubAckAllocator;
+
+    char                *pubMsgBuf;
+    int                 pubMsgBufCap;
+
+    int                 pubPrefixLen;
+    char                *pubSubjBuf;
+    int                 pubSubjBufCap;
+
+    natsMutex           *pingMu;
+    natsSubscription    *pingSub;
+    natsTimer           *pingTimer;
+    char                *pingBytes;
+    int                 pingBytesLen;
+    char                *pingRequests;
+    char                *pingInbox;
+    int                 pingOut;
+
+    char                *connLostErrTxt;
+
+    bool                closed;
+
+    // This is used when user calls stanConnection_GetNATSConnection().
+    // User is supposed to call stanConnection_ReleaseNATSConnection()
+    // when done with it. When ncRefs == 1, the stan connection is
+    // retained, when ncRefs == 0, it is released.
+    // We could simply retain on each Get call and release on Release,
+    // but this offers a bit more protection against mismatch between
+    // Get() and Release() calls.
+    int                 ncRefs;
+};
+
+struct __stanMsg
+{
+    natsGCItem          gc;
+
+    // The message is allocated as a single memory block that contains
+    // this structure and enough space for the payload. The msg payload
+    // starts after the 'next' pointer.
+    uint64_t            seq;
+    int64_t             timestamp;
+    const char          *data;
+    int                 dataLen;
+    bool                redelivered;
+    // Must be last field!
+    stanSubscription    *sub;
+
+    // Nothing after this: the message payload goes there.
+};
+
+struct __stanSubscription
+{
+    natsMutex           *mu;
+    int                 refs;
+
+    stanSubOptions      *opts;
+
+    stanConnection      *sc;
+
+    char                *channel;
+
+    char                *qgroup;
+
+    char                *inbox;
+    natsSubscription    *inboxSub;
+
+    char                *ackInbox;
+
+    stanMsgHandler      cb;
+    void                *cbClosure;
+
+    // count messages received, and use it compared to MaxInflight
+    // to cause a low level buffer flush when sending ACK.
+    int                 msgs;
+
+    char                *ackBuf;
+    int                 ackBufCap;
+
+    natsPBufAllocator   *allocator;
+
+    bool                closed;
+
+    natsOnCompleteCB    onCompleteCB;
+    void                *onCompleteCBClosure;
+};
+
+#endif /* STANP_H_ */
diff --git a/src/stan/sub.c b/src/stan/sub.c
new file mode 100644 (file)
index 0000000..a363bda
--- /dev/null
@@ -0,0 +1,696 @@
+// Copyright 2018-2020 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "conn.h"
+#include "sub.h"
+#include "sopts.h"
+#include "msg.h"
+
+#include "../conn.h"
+#include "../sub.h"
+#include "../buf.h"
+
+#ifdef DEV_MODE
+// For type safety
+void stanSub_Lock(stanSubscription *sub)   { natsMutex_Lock(sub->mu);   }
+void stanSub_Unlock(stanSubscription *sub) { natsMutex_Unlock(sub->mu); }
+#endif // DEV_MODE
+
+static void
+_freeStanSub(stanSubscription *sub)
+{
+    if (sub == NULL)
+        return;
+
+    NATS_FREE(sub->ackInbox);
+    NATS_FREE(sub->channel);
+    NATS_FREE(sub->inbox);
+    NATS_FREE(sub->qgroup);
+    NATS_FREE(sub->ackBuf);
+    natsSubscription_Destroy(sub->inboxSub);
+    stanSubOptions_Destroy(sub->opts);
+    natsPBufAllocator_Destroy(sub->allocator);
+    natsMutex_Destroy(sub->mu);
+
+    NATS_FREE(sub);
+}
+
+void
+stanSub_release(stanSubscription *sub)
+{
+    int refs = 0;
+
+    if (sub == NULL)
+        return;
+
+    stanSub_Lock(sub);
+    refs = --(sub->refs);
+    stanSub_Unlock(sub);
+
+    if (refs == 0)
+        _freeStanSub(sub);
+}
+
+static void
+_stanProcessMsg(natsConnection *nc, natsSubscription *ignored, natsMsg *msg, void *closure)
+{
+    natsStatus          s       = NATS_OK;
+    stanSubscription    *sub    = (stanSubscription*) closure;
+    Pb__MsgProto        *pbMsg  = NULL;
+    stanMsg             *sMsg   = NULL;
+    ProtobufCAllocator  *alloc  = (ProtobufCAllocator*) sub->allocator;
+
+    natsPBufAllocator_Prepare(sub->allocator, msg->dataLen);
+
+    pbMsg = pb__msg_proto__unpack(alloc, (size_t) msg->dataLen, (const uint8_t*) msg->data);
+    if (pbMsg == NULL)
+    {
+        natsMsg_Destroy(msg);
+        return;
+    }
+
+    s = stanMsg_create(&sMsg, sub, pbMsg);
+    if (s == NATS_OK)
+    {
+        stanMsgHandler  cb          = NULL;
+        void            *cbClosure  = NULL;
+        stanConnection  *sc         = NULL;
+        char            *channel    = NULL;
+        bool            sendAck     = false;
+        char            *ackSubject = NULL;
+        bool            flush       = false;
+        char            *ackBuf     = NULL;
+        int             ackSize     = 0;
+        Pb__Ack         ack;
+
+        stanSub_Lock(sub);
+        if (sub->closed)
+            s = NATS_INVALID_SUBSCRIPTION;
+        if (s == NATS_OK)
+        {
+            sc = sub->sc;
+            cb = sub->cb;
+            cbClosure = sub->cbClosure;
+            channel = sub->channel;
+            sendAck = sub->opts->manualAcks == false;
+            ackSubject = sub->ackInbox;
+            // Prepare buf for ack
+            if (sendAck)
+            {
+                if (++sub->msgs == sub->opts->maxInflight)
+                {
+                    sub->msgs = 0;
+                    flush = true;
+                }
+                pb__ack__init(&ack);
+                ack.subject = channel;
+                ack.sequence = sMsg->seq;
+
+                ackSize = (int) pb__ack__get_packed_size(&ack);
+                if (ackSize > sub->ackBufCap)
+                    s = expandBuf(&sub->ackBuf, &sub->ackBufCap, 2*ackSize);
+
+                if (s == NATS_OK)
+                    ackBuf = sub->ackBuf;
+            }
+        }
+        stanSub_Unlock(sub);
+
+        if (s == NATS_OK)
+        {
+            (*cb)(sc, sub, channel, sMsg, cbClosure);
+
+            if (sendAck)
+            {
+                int packedSize = 0;
+
+                packedSize = (int) pb__ack__pack(&ack, (uint8_t*) ackBuf);
+                if (ackSize == packedSize)
+                {
+                    natsMsg ackMsg;
+
+                    natsMsg_init(&ackMsg, (const char*) ackSubject, (const char*) ackBuf, ackSize);
+                    natsConn_publish(nc, &ackMsg, NULL, flush);
+                }
+            }
+        }
+        else
+        {
+            // Since we didn't pass to callback, need to destroy.
+            stanMsg_Destroy(sMsg);
+        }
+    }
+
+    natsMsg_Destroy(msg);
+
+    pb__msg_proto__free_unpacked(pbMsg, alloc);
+}
+
+natsStatus
+stanSubscription_AckMsg(stanSubscription *sub, stanMsg *msg)
+{
+    natsStatus      s       = NATS_OK;
+    natsConnection  *nc     = NULL;
+    bool            flush   = false;
+    char            *ackSub = NULL;
+    int             ackSize = 0;
+    Pb__Ack         ack;
+
+    if ((sub == NULL) || (msg == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    stanSub_Lock(sub);
+    if (sub->closed)
+    {
+        stanSub_Unlock(sub);
+        return nats_setDefaultError(NATS_INVALID_SUBSCRIPTION);
+    }
+    if (!sub->opts->manualAcks)
+    {
+        stanSub_Unlock(sub);
+        return nats_setError(NATS_ERR, "%s", STAN_ERR_MANUAL_ACK);
+    }
+    if (msg->sub != sub)
+    {
+        stanSub_Unlock(sub);
+        return nats_setError(NATS_ILLEGAL_STATE, "%s", STAN_ERR_SUB_NOT_OWNER);
+    }
+
+    if (++sub->msgs == sub->opts->maxInflight)
+    {
+        sub->msgs = 0;
+        flush = true;
+    }
+
+    nc     = sub->sc->nc;
+    ackSub = sub->ackInbox;
+
+    pb__ack__init(&ack);
+    ack.subject = sub->channel;
+    ack.sequence = msg->seq;
+
+    stanSub_Unlock(sub);
+
+    ackSize = (int) pb__ack__get_packed_size(&ack);
+    if (ackSize == 0)
+    {
+        s = nats_setError(NATS_ERR, "%s", "message acknowledgment protocol packed size is 0");
+    }
+    else
+    {
+        char    ackBuf[1024];
+        char    *ackBytes  = NULL;
+        int     packedSize = 0;
+        bool    needFree   = false;
+
+        if (ackSize > (int) sizeof(ackBuf))
+        {
+            ackBytes = NATS_MALLOC(ackSize);
+            if (ackBytes == NULL)
+                s = nats_setDefaultError(NATS_NO_MEMORY);
+            else
+                needFree = true;
+        }
+        else
+        {
+            ackBytes = (char*) ackBuf;
+        }
+        if (s == NATS_OK)
+        {
+            packedSize = (int) pb__ack__pack(&ack, (uint8_t*) ackBuf);
+            if (ackSize != packedSize)
+                s = nats_setError(NATS_ERR, "message acknowledgment protocol computed packed size is %d, got %d",
+                        ackSize, packedSize);
+            else
+            {
+                natsMsg ackMsg;
+
+                natsMsg_init(&ackMsg, ackSub, (const void*) ackBuf, ackSize);
+                s = natsConn_publish(nc, &ackMsg, NULL, flush);
+            }
+
+            if (needFree)
+                NATS_FREE(ackBytes);
+        }
+    }
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static void
+_releaseStanSubCB(void *closure)
+{
+    stanSubscription *sub = (stanSubscription*) closure;
+    stanConnection   *sc  = NULL;
+    natsOnCompleteCB cb   = NULL;
+    void             *cbc = NULL;
+    int              refs;
+
+    stanSub_Lock(sub);
+    cb = sub->onCompleteCB;
+    cbc = sub->onCompleteCBClosure;
+    sc = sub->sc;
+    refs = --sub->refs;
+    stanSub_Unlock(sub);
+
+    if (cb != NULL)
+        (cb)(cbc);
+
+    if (refs == 0)
+        _freeStanSub(sub);
+
+    stanConn_release(sc);
+}
+
+// Sends a subscription close protocol with provided information.
+// Best effort: does not wait for the reply and ignore any error.
+static void
+_sendCloseSub(natsConnection *nc, char *closeSubj, char *cid, char *channel, char*inbox)
+{
+    Pb__UnsubscribeRequest  usr;
+    int                     usrSize   = 0;
+    char                    *usrBytes = NULL;
+    int                     packedSize= 0;
+
+    pb__unsubscribe_request__init(&usr);
+    usr.clientid = cid;
+    usr.subject  = channel;
+    usr.inbox    = inbox;
+
+    usrSize = (int) pb__unsubscribe_request__get_packed_size(&usr);
+    if (usrSize == 0)
+        return;
+
+    usrBytes = NATS_MALLOC(usrSize);
+    if (usrBytes == NULL)
+        return;
+
+    packedSize = (int) pb__unsubscribe_request__pack(&usr, (uint8_t*) usrBytes);
+    if (usrSize != packedSize)
+        return;
+
+    natsConnection_Publish(nc, closeSubj, (const void*) usrBytes, usrSize);
+
+    NATS_FREE(usrBytes);
+}
+
+static natsStatus
+stanConn_subscribe(stanSubscription **newSub, stanConnection *sc,
+        const char *channel, const char *queue,
+        stanMsgHandler cb, void *cbClosure,
+        stanSubOptions *opts)
+{
+    natsStatus          s      = NATS_OK;
+    stanSubscription    *sub   = NULL;
+    natsConnection      *nc    = NULL;
+    char                *cid   = NULL;
+    char                *rSubj = NULL;
+    int64_t             timeout= 0;
+    char                *closeSubj = NULL;
+
+    if ((newSub == NULL)
+            || (sc == NULL)
+            || (channel == NULL)
+            || (cb == NULL))
+    {
+        return nats_setDefaultError(NATS_INVALID_ARG);
+    }
+
+    stanConn_Lock(sc);
+    if (sc->closed)
+    {
+        stanConn_Unlock(sc);
+        return nats_setDefaultError(NATS_CONNECTION_CLOSED);
+    }
+
+    sub = NATS_CALLOC(1, sizeof(stanSubscription));
+    if (sub == NULL)
+    {
+        stanConn_Unlock(sc);
+        return nats_setDefaultError(NATS_NO_MEMORY);
+    }
+
+    s = natsMutex_Create(&sub->mu);
+    if (s != NATS_OK)
+    {
+        stanConn_Unlock(sc);
+        NATS_FREE(sub);
+        return NATS_UPDATE_ERR_STACK(s);
+    }
+
+    // Retain the connection until we have fully setup the subscription
+    // since we will release the lock at one point.
+    sc->refs++;
+
+    // Capture some stan connection fields. We know they will be valid
+    // even if the connection is closed, because we have retained the
+    // object.
+    nc = sc->nc;
+    cid = sc->clientID;
+    rSubj = sc->subRequests;
+    timeout = sc->opts->connTimeout;
+    closeSubj = sc->subCloseRequests;
+
+    stanConn_Unlock(sc);
+
+    // Lock the subscription while we set it up.
+    stanSub_Lock(sub);
+
+    sub->refs = 1;
+    sub->sc = sc;
+    sub->cb = cb;
+    sub->cbClosure = cbClosure;
+
+    if (opts != NULL)
+        s = stanSubOptions_clone(&sub->opts, opts);
+    else
+        s = stanSubOptions_Create(&sub->opts);
+
+    IF_OK_DUP_STRING(s, sub->channel, channel);
+    if ((s == NATS_OK) && queue != NULL)
+        DUP_STRING(s, sub->qgroup, queue);
+    if (s == NATS_OK)
+        s = natsPBufAllocator_Create(&sub->allocator, sizeof(Pb__MsgProto), 3);
+    if (s == NATS_OK)
+        s = natsConn_newInbox(nc, (natsInbox**) &sub->inbox);
+
+    if (s == NATS_OK)
+    {
+        s = natsConnection_Subscribe(&sub->inboxSub, nc, sub->inbox, _stanProcessMsg, (void*) sub);
+        if (s == NATS_OK)
+        {
+            natsSubscription_SetPendingLimits(sub->inboxSub, -1, -1);
+            // Retain both sub and sc
+            sub->refs++;
+            stanConn_retain(sc);
+            s = natsSubscription_SetOnCompleteCB(sub->inboxSub, _releaseStanSubCB, (void*) sub);
+            if (s != NATS_OK)
+            {
+                sub->refs--;
+                stanConn_release(sc);
+            }
+        }
+        if (s == NATS_OK)
+        {
+            Pb__SubscriptionRequest subReq;
+            int                     reqSize   = 0;
+            char                    *reqBytes = NULL;
+            natsMsg                 *replyMsg = NULL;
+
+            pb__subscription_request__init(&subReq);
+            subReq.clientid = cid;
+            subReq.subject = sub->channel;
+            subReq.qgroup = sub->qgroup;
+            subReq.inbox = sub->inbox;
+            subReq.maxinflight = sub->opts->maxInflight;
+            subReq.ackwaitinsecs = (int32_t)(sub->opts->ackWait / 1000);
+            subReq.startposition = sub->opts->startAt;
+            subReq.durablename = sub->opts->durableName;
+
+            if (subReq.startposition == PB__START_POSITION__TimeDeltaStart)
+            {
+                subReq.starttimedelta = (nats_Now() - sub->opts->startTime) * (int64_t) 1000000;
+            }
+            else if (subReq.startposition == PB__START_POSITION__SequenceStart)
+            {
+                subReq.startsequence = sub->opts->startSequence;
+            }
+
+            reqSize = (int) pb__subscription_request__get_packed_size(&subReq);
+            if (reqSize == 0)
+            {
+                s = nats_setError(NATS_ERR, "%s", "subscription request protocol packed size is 0");
+            }
+            else
+            {
+                reqBytes = NATS_MALLOC(reqSize);
+                if (reqBytes == NULL)
+                    s = nats_setDefaultError(NATS_NO_MEMORY);
+            }
+            if (s == NATS_OK)
+            {
+                int packedSize = (int) pb__subscription_request__pack(&subReq, (uint8_t*) reqBytes);
+                if (reqSize != packedSize)
+                {
+                    s = nats_setError(NATS_ERR, "subscription request protocol computed packed size is %d, got %d",
+                            reqSize, packedSize);
+                }
+                else
+                {
+                    s = natsConnection_Request(&replyMsg, nc, rSubj, (const void*) reqBytes, reqSize, timeout);
+                    if (s == NATS_TIMEOUT)
+                        NATS_UPDATE_ERR_TXT("%s", STAN_ERR_SUBSCRIBE_REQUEST_TIMEOUT);
+                    else if (s == NATS_NO_RESPONDERS)
+                        NATS_UPDATE_ERR_TXT("%s", STAN_ERR_SUBSCRIBE_REQUEST_NO_RESP);
+                }
+
+                NATS_FREE(reqBytes);
+            }
+            if (s == NATS_OK)
+            {
+                Pb__SubscriptionResponse *subResp = NULL;
+
+                subResp = pb__subscription_response__unpack(NULL,
+                        (size_t) natsMsg_GetDataLength(replyMsg),
+                        (const uint8_t*) natsMsg_GetData(replyMsg));
+                if (subResp == NULL)
+                    s = nats_setError(NATS_ERR, "%s", "unable to decode subscription response");
+
+                if ((s == NATS_OK) && (strlen(subResp->error) > 0))
+                    s = nats_setError(NATS_ERR, "%s", subResp->error);
+
+                IF_OK_DUP_STRING(s, sub->ackInbox, subResp->ackinbox);
+
+                pb__subscription_response__free_unpacked(subResp, NULL);
+
+                natsMsg_Destroy(replyMsg);
+            }
+
+            // If there was an error, need to unsub.
+            if (s != NATS_OK)
+            {
+                natsSubscription_Unsubscribe(sub->inboxSub);
+                if (s == NATS_TIMEOUT)
+                {
+                    // On timeout, we don't know if the server got the request or
+                    // not. So we will do best effort and send a "subscription close"
+                    // request. However, since we don't have the AckInbox that is
+                    // normally used to close a subscription, we will use the sub's
+                    // inbox. Newer servers will fallback to lookup by inbox if they
+                    // don't find the sub from the "AckInbox" lookup.
+                    _sendCloseSub(nc, closeSubj, cid, sub->channel, sub->inbox);
+                }
+            }
+        }
+    }
+    stanSub_Unlock(sub);
+
+    if (s == NATS_OK)
+        *newSub = sub;
+    else
+        stanSub_release(sub);
+
+    stanConn_release(sc);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+stanConnection_Subscribe(stanSubscription **newSub, stanConnection *sc,
+        const char *channel,
+        stanMsgHandler cb, void *cbClosure,
+        stanSubOptions *opts)
+{
+    natsStatus s;
+
+    s = stanConn_subscribe(newSub, sc, channel, NULL, cb, cbClosure, opts);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+stanConnection_QueueSubscribe(stanSubscription **newSub, stanConnection *sc,
+        const char *channel, const char *queueGroup,
+        stanMsgHandler cb, void *cbClosure,
+        stanSubOptions *opts)
+{
+    natsStatus s;
+
+    s = stanConn_subscribe(newSub, sc, channel, queueGroup, cb, cbClosure, opts);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_closeOrUnsubscribeStanSub(stanSubscription *sub, bool doClose)
+{
+    natsStatus              s           = NATS_OK;
+    stanConnection          *sc         = NULL;
+    natsConnection          *nc         = NULL;
+    char                    *reqSubj    = NULL;
+    char                    *cid        = NULL;
+    char                    *subj       = NULL;
+    char                    *ackInbox   = NULL;
+    int64_t                 timeout     = 0;
+    Pb__UnsubscribeRequest  usr;
+    int                     usrSize     = 0;
+
+    stanSub_Lock(sub);
+    if (sub->closed)
+    {
+        stanSub_Unlock(sub);
+        return nats_setDefaultError(NATS_INVALID_SUBSCRIPTION);
+    }
+    sub->closed = true;
+    natsSubscription_Unsubscribe(sub->inboxSub);
+    sc          = sub->sc;
+    ackInbox    = sub->ackInbox;
+    subj        = sub->channel;
+    stanSub_Unlock(sub);
+
+    stanConn_Lock(sc);
+    if (sc->closed)
+    {
+        stanConn_Unlock(sc);
+        return nats_setDefaultError(NATS_CONNECTION_CLOSED);
+    }
+    reqSubj = sc->unsubRequests;
+    if (doClose)
+    {
+        reqSubj = sc->subCloseRequests;
+        if (reqSubj == NULL)
+        {
+            stanConn_Unlock(sc);
+            s = nats_setError(NATS_NO_SERVER_SUPPORT, "%s", STAN_ERR_SUB_CLOSE_NOT_SUPPORTED);
+            return s;
+        }
+    }
+    nc      = sc->nc;
+    cid     = sc->clientID;
+    timeout = sc->opts->connTimeout;
+    stanConn_Unlock(sc);
+
+    pb__unsubscribe_request__init(&usr);
+    usr.clientid = cid;
+    usr.subject  = subj;
+    usr.inbox    = ackInbox;
+
+    usrSize = (int) pb__unsubscribe_request__get_packed_size(&usr);
+    if (usrSize == 0)
+    {
+        s = nats_setError(NATS_ERR, "%s subscription request protocol packed size is 0",
+                (doClose ? "close" : "unsubscribe"));
+    }
+    else
+    {
+        natsMsg *replyMsg = NULL;
+        char    *usrBytes = NATS_MALLOC(usrSize);
+
+        if (usrBytes == NULL)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+
+        if (s == NATS_OK)
+        {
+            int packedSize = (int) pb__unsubscribe_request__pack(&usr, (uint8_t*) usrBytes);
+            if (usrSize != packedSize)
+            {
+                s = nats_setError(NATS_ERR, "%s subscription protocol computed packed size is %v, got %v",
+                        (doClose ? "close" : "unsubscribe"), usrSize, packedSize);
+            }
+            else
+            {
+                s = natsConnection_Request(&replyMsg, nc, reqSubj, (const void*) usrBytes, usrSize, timeout);
+                if (s == NATS_TIMEOUT)
+                    NATS_UPDATE_ERR_TXT("%s", (doClose ? STAN_ERR_CLOSE_REQUEST_TIMEOUT : STAN_ERR_UNSUBSCRIBE_REQUEST_TIMEOUT));
+                else if (s == NATS_NO_RESPONDERS)
+                    NATS_UPDATE_ERR_TXT("%s", (doClose ? STAN_ERR_CLOSE_REQUEST_NO_RESP : STAN_ERR_UNSUBSCRIBE_REQUEST_NO_RESP));
+            }
+
+            NATS_FREE(usrBytes);
+
+            if (s == NATS_OK)
+            {
+                Pb__SubscriptionResponse *resp = NULL;
+
+                resp = pb__subscription_response__unpack(NULL,
+                        (size_t) natsMsg_GetDataLength(replyMsg),
+                        (const uint8_t*) natsMsg_GetData(replyMsg));
+
+                if (resp == NULL)
+                    s = nats_setError(NATS_ERR, "%s", "unable to decode subscription response");
+
+                if ((s == NATS_OK) && (strlen(resp->error) > 0))
+                    s = nats_setError(NATS_ERR, "%s", resp->error);
+
+
+                pb__subscription_response__free_unpacked(resp, NULL);
+
+                natsMsg_Destroy(replyMsg);
+            }
+        }
+    }
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+stanSubscription_SetOnCompleteCB(stanSubscription *sub, natsOnCompleteCB cb, void *closure)
+{
+    natsStatus s = NATS_OK;
+
+    if (sub == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    stanSub_Lock(sub);
+    if (sub->closed)
+        s = nats_setDefaultError(NATS_INVALID_SUBSCRIPTION);
+    else
+    {
+        sub->onCompleteCB = cb;
+        sub->onCompleteCBClosure = closure;
+    }
+    stanSub_Unlock(sub);
+
+    return s;
+}
+
+natsStatus
+stanSubscription_Unsubscribe(stanSubscription *sub)
+{
+    natsStatus s;
+
+    if (sub == NULL)
+        return NATS_OK;
+
+    s = _closeOrUnsubscribeStanSub(sub, false);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+stanSubscription_Close(stanSubscription *sub)
+{
+    natsStatus s;
+
+    if (sub == NULL)
+        return NATS_OK;
+
+    s = _closeOrUnsubscribeStanSub(sub, true);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+void
+stanSubscription_Destroy(stanSubscription *sub)
+{
+    if (sub == NULL)
+        return;
+
+    _closeOrUnsubscribeStanSub(sub, true);
+    stanSub_release(sub);
+}
diff --git a/src/stan/sub.h b/src/stan/sub.h
new file mode 100644 (file)
index 0000000..872ccca
--- /dev/null
@@ -0,0 +1,45 @@
+// Copyright 2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef STAN_SUB_H_
+#define STAN_SUB_H_
+
+#include "stanp.h"
+
+#ifdef DEV_MODE
+// For type safety
+
+void stanSub_Lock(stanSubscription *sub);
+void stanSub_Unlock(stanSubscription *sub);
+
+#else
+// We know what we are doing :-)
+
+#define stanSub_Lock(c)    (natsMutex_Lock((c)->mu))
+#define stanSub_Unlock(c)  (natsMutex_Unlock((c)->mu))
+
+#endif // DEV_MODE
+
+#define STAN_ERR_SUBSCRIBE_REQUEST_TIMEOUT      "subscribe request timeout"
+#define STAN_ERR_SUBSCRIBE_REQUEST_NO_RESP      "no streaming server was listening for this subscribe request"
+#define STAN_ERR_UNSUBSCRIBE_REQUEST_TIMEOUT    "unsubscribe request timeout"
+#define STAN_ERR_UNSUBSCRIBE_REQUEST_NO_RESP    "no streaming server was listening for this unsubscribe request"
+#define STAN_ERR_MANUAL_ACK                     "cannot manually ack in auto-ack mode"
+#define STAN_ERR_SUB_CLOSE_NOT_SUPPORTED        "server does not support subscription close"
+#define STAN_ERR_SUB_NOT_OWNER                  "subscription is not the owner of this message"
+
+void
+stanSub_release(stanSubscription *sub);
+
+
+#endif /* STAN_SUB_H_ */
diff --git a/src/stats.c b/src/stats.c
new file mode 100644 (file)
index 0000000..301bac0
--- /dev/null
@@ -0,0 +1,65 @@
+// Copyright 2015-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "natsp.h"
+
+#include <stdlib.h>
+#include "status.h"
+#include "stats.h"
+#include "mem.h"
+
+natsStatus
+natsStatistics_Create(natsStatistics **newStats)
+{
+    natsStatistics *stats = NULL;
+
+    stats = (natsStatistics*) NATS_CALLOC(1, sizeof(natsStatistics));
+    if (stats == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    *newStats = stats;
+
+    return NATS_OK;
+}
+
+natsStatus
+natsStatistics_GetCounts(const natsStatistics *stats,
+                         uint64_t *inMsgs, uint64_t *inBytes,
+                         uint64_t *outMsgs, uint64_t *outBytes,
+                         uint64_t *reconnects)
+{
+    if (stats == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    if (inMsgs != NULL)
+        *inMsgs = stats->inMsgs;
+    if (inBytes != NULL)
+        *inBytes = stats->inBytes;
+    if (outMsgs != NULL)
+        *outMsgs = stats->outMsgs;
+    if (outBytes != NULL)
+        *outBytes = stats->outBytes;
+    if (reconnects != NULL)
+        *reconnects = stats->reconnects;
+
+    return NATS_OK;
+}
+
+void
+natsStatistics_Destroy(natsStatistics *stats)
+{
+    if (stats == NULL)
+        return;
+
+    NATS_FREE(stats);
+}
diff --git a/src/stats.h b/src/stats.h
new file mode 100644 (file)
index 0000000..9c50f93
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright 2015-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+
+#ifndef STATS_H_
+#define STATS_H_
+
+#include <stdint.h>
+
+#include "status.h"
+
+struct __natsStatistics
+{
+    uint64_t    inMsgs;
+    uint64_t    outMsgs;
+    uint64_t    inBytes;
+    uint64_t    outBytes;
+    uint64_t    reconnects;
+
+};
+
+#endif /* STATS_H_ */
diff --git a/src/status.c b/src/status.c
new file mode 100644 (file)
index 0000000..1339bf4
--- /dev/null
@@ -0,0 +1,79 @@
+// Copyright 2015-2021 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "natsp.h"
+
+static const char *statusText[] = {
+    "OK",
+
+    "Error",
+    "Protocol Error",
+    "IO Error",
+    "Line too long",
+
+    "Connection Closed",
+    "No server available for connection",
+    "Stale Connection",
+    "Secure Connection not available",
+    "Secure Connection Required",
+    "Connection Disconnected",
+    "Authentication Violation",
+
+    "Not Permitted",
+    "Not Found",
+
+    "TCP Address missing",
+
+    "Invalid Subject",
+    "Invalid Argument",
+    "Invalid Subscription",
+    "Invalid Timeout",
+
+    "Illegal State",
+
+    "Slow Consumer, messages dropped",
+
+    "Maximum Payload Exceeded",
+    "Maximum Messages Delivered",
+
+    "Insufficient Buffer",
+
+    "No Memory",
+
+    "System Error",
+
+    "Timeout",
+
+    "Initialization Failed",
+    "Not Initialized",
+
+    "SSL Error",
+
+    "Not Supported By Server",
+
+    "Not Yet Connected",
+
+    "Draining in progress",
+
+    "Invalid queue name",
+
+    "No responders available for request",
+
+    "Mismatch",
+    "Missed Server Heartbeat",
+};
+
+const char*
+natsStatus_GetText(natsStatus s) {
+    return statusText[(int) s];
+}
diff --git a/src/status.h b/src/status.h
new file mode 100644 (file)
index 0000000..729d52f
--- /dev/null
@@ -0,0 +1,268 @@
+// Copyright 2015-2022 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef STATUS_H_
+#define STATUS_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/// The connection state
+typedef enum
+{
+#if defined(NATS_CONN_STATUS_NO_PREFIX)
+    // This is deprecated and applications referencing connection
+    // status should be updated to use the values prefixed with NATS_CONN_STATUS_.
+
+    DISCONNECTED = 0, ///< The connection has been disconnected
+    CONNECTING,       ///< The connection is in the process or connecting
+    CONNECTED,        ///< The connection is connected
+    CLOSED,           ///< The connection is closed
+    RECONNECTING,     ///< The connection is in the process or reconnecting
+    DRAINING_SUBS,    ///< The connection is draining subscriptions
+    DRAINING_PUBS,    ///< The connection is draining publishers
+#else
+    NATS_CONN_STATUS_DISCONNECTED = 0, ///< The connection has been disconnected
+    NATS_CONN_STATUS_CONNECTING,       ///< The connection is in the process or connecting
+    NATS_CONN_STATUS_CONNECTED,        ///< The connection is connected
+    NATS_CONN_STATUS_CLOSED,           ///< The connection is closed
+    NATS_CONN_STATUS_RECONNECTING,     ///< The connection is in the process or reconnecting
+    NATS_CONN_STATUS_DRAINING_SUBS,    ///< The connection is draining subscriptions
+    NATS_CONN_STATUS_DRAINING_PUBS,    ///< The connection is draining publishers
+#endif
+
+} natsConnStatus;
+
+/// Status returned by most of the APIs
+typedef enum
+{
+    NATS_OK         = 0,                ///< Success
+
+    NATS_ERR,                           ///< Generic error
+    NATS_PROTOCOL_ERROR,                ///< Error when parsing a protocol message,
+                                        ///  or not getting the expected message.
+    NATS_IO_ERROR,                      ///< IO Error (network communication).
+    NATS_LINE_TOO_LONG,                 ///< The protocol message read from the socket
+                                        ///  does not fit in the read buffer.
+
+    NATS_CONNECTION_CLOSED,             ///< Operation on this connection failed because
+                                        ///  the connection is closed.
+    NATS_NO_SERVER,                     ///< Unable to connect, the server could not be
+                                        ///  reached or is not running.
+    NATS_STALE_CONNECTION,              ///< The server closed our connection because it
+                                        ///  did not receive PINGs at the expected interval.
+    NATS_SECURE_CONNECTION_WANTED,      ///< The client is configured to use TLS, but the
+                                        ///  server is not.
+    NATS_SECURE_CONNECTION_REQUIRED,    ///< The server expects a TLS connection.
+    NATS_CONNECTION_DISCONNECTED,       ///< The connection was disconnected. Depending on
+                                        ///  the configuration, the connection may reconnect.
+
+    NATS_CONNECTION_AUTH_FAILED,        ///< The connection failed due to authentication error.
+    NATS_NOT_PERMITTED,                 ///< The action is not permitted.
+    NATS_NOT_FOUND,                     ///< An action could not complete because something
+                                        ///  was not found. So far, this is an internal error.
+
+    NATS_ADDRESS_MISSING,               ///< Incorrect URL. For instance no host specified in
+                                        ///  the URL.
+
+    NATS_INVALID_SUBJECT,               ///< Invalid subject, for instance NULL or empty string.
+    NATS_INVALID_ARG,                   ///< An invalid argument is passed to a function. For
+                                        ///  instance passing NULL to an API that does not
+                                        ///  accept this value.
+    NATS_INVALID_SUBSCRIPTION,          ///< The call to a subscription function fails because
+                                        ///  the subscription has previously been closed.
+    NATS_INVALID_TIMEOUT,               ///< Timeout must be positive numbers.
+
+    NATS_ILLEGAL_STATE,                 ///< An unexpected state, for instance calling
+                                        ///  #natsSubscription_NextMsg() on an asynchronous
+                                        ///  subscriber.
+
+    NATS_SLOW_CONSUMER,                 ///< The maximum number of messages waiting to be
+                                        ///  delivered has been reached. Messages are dropped.
+
+    NATS_MAX_PAYLOAD,                   ///< Attempt to send a payload larger than the maximum
+                                        ///  allowed by the NATS Server.
+    NATS_MAX_DELIVERED_MSGS,            ///< Attempt to receive more messages than allowed, for
+                                        ///  instance because of #natsSubscription_AutoUnsubscribe().
+
+    NATS_INSUFFICIENT_BUFFER,           ///< A buffer is not large enough to accommodate the data.
+
+    NATS_NO_MEMORY,                     ///< An operation could not complete because of insufficient
+                                        ///  memory.
+
+    NATS_SYS_ERROR,                     ///< Some system function returned an error.
+
+    NATS_TIMEOUT,                       ///< An operation timed-out. For instance
+                                        ///  #natsSubscription_NextMsg().
+
+    NATS_FAILED_TO_INITIALIZE,          ///< The library failed to initialize.
+    NATS_NOT_INITIALIZED,               ///< The library is not yet initialized.
+
+    NATS_SSL_ERROR,                     ///< An SSL error occurred when trying to establish a
+                                        ///  connection.
+
+    NATS_NO_SERVER_SUPPORT,             ///< The server does not support this action.
+
+    NATS_NOT_YET_CONNECTED,             ///< A connection could not be immediately established and
+                                        ///  #natsOptions_SetRetryOnFailedConnect() specified
+                                        ///  a connected callback. The connect is retried asynchronously.
+
+    NATS_DRAINING,                      ///< A connection and/or subscription entered the draining mode.
+                                        ///  Some operations will fail when in that mode.
+
+    NATS_INVALID_QUEUE_NAME,            ///< An invalid queue name was passed when creating a queue subscription.
+
+    NATS_NO_RESPONDERS,                 ///< No responders were running when the server received the request.
+
+    NATS_MISMATCH,                      ///< For JetStream subscriptions, it means that a consumer sequence mismatch was discovered.
+
+    NATS_MISSED_HEARTBEAT,              ///< For JetStream subscriptions, it means that the library detected that server heartbeats have been missed.
+
+} natsStatus;
+
+typedef enum {
+
+    JSAccountResourcesExceededErr = 10002,              ///< Resource limits exceeded for account
+    JSBadRequestErr = 10003,                            ///< Bad request
+    JSClusterIncompleteErr = 10004,                     ///< Incomplete results
+    JSClusterNoPeersErr = 10005,                        ///< No suitable peers for placement
+    JSClusterNotActiveErr = 10006,                      ///< JetStream not in clustered mode
+    JSClusterNotAssignedErr = 10007,                    ///< JetStream cluster not assigned to this server
+    JSClusterNotAvailErr = 10008,                       ///< JetStream system temporarily unavailable
+    JSClusterNotLeaderErr = 10009,                      ///< JetStream cluster can not handle request
+    JSClusterRequiredErr = 10010,                       ///< JetStream clustering support required
+    JSClusterTagsErr = 10011,                           ///< Tags placement not supported for operation
+    JSConsumerCreateErr = 10012,                        ///< General consumer creation failure string
+    JSConsumerNameExistErr = 10013,                     ///< Consumer name already in use
+    JSConsumerNotFoundErr = 10014,                      ///< Consumer not found
+    JSSnapshotDeliverSubjectInvalidErr = 10015,         ///< Deliver subject not valid
+    JSConsumerDurableNameNotInSubjectErr = 10016,       ///< Consumer expected to be durable but no durable name set in subject
+    JSConsumerDurableNameNotMatchSubjectErr = 10017,    ///< Consumer name in subject does not match durable name in request
+    JSConsumerDurableNameNotSetErr = 10018,             ///< Consumer expected to be durable but a durable name was not set
+    JSConsumerEphemeralWithDurableInSubjectErr = 10019, ///< Consumer expected to be ephemeral but detected a durable name set in subject
+    JSConsumerEphemeralWithDurableNameErr = 10020,      ///< Consumer expected to be ephemeral but a durable name was set in request
+    JSStreamExternalApiOverlapErr = 10021,              ///< Stream external api prefix must not overlap
+    JSStreamExternalDelPrefixOverlapsErr = 10022,       ///< Stream external delivery prefix overlaps with stream subject
+    JSInsufficientResourcesErr = 10023,                 ///< Insufficient resources
+    JSStreamInvalidExternalDeliverySubjErr = 10024,     ///< Stream external delivery prefix must not contain wildcards
+    JSInvalidJSONErr = 10025,                           ///< Invalid JSON
+    JSMaximumConsumersLimitErr = 10026,                 ///< Maximum consumers exceeds account limit
+    JSMaximumStreamsLimitErr = 10027,                   ///< Maximum number of streams reached
+    JSMemoryResourcesExceededErr = 10028,               ///< Insufficient memory resources available
+    JSMirrorConsumerSetupFailedErr = 10029,             ///< Generic mirror consumer setup failure
+    JSMirrorMaxMessageSizeTooBigErr = 10030,            ///< Stream mirror must have max message size >= source
+    JSMirrorWithSourcesErr = 10031,                     ///< Stream mirrors can not also contain other sources
+    JSMirrorWithStartSeqAndTimeErr = 10032,             ///< Stream mirrors can not have both start seq and start time configured
+    JSMirrorWithSubjectFiltersErr = 10033,              ///< Stream mirrors can not contain filtered subjects
+    JSMirrorWithSubjectsErr = 10034,                    ///< Stream mirrors can not also contain subjects
+    JSNoAccountErr = 10035,                             ///< Account not found
+    JSClusterUnSupportFeatureErr = 10036,               ///< Not currently supported in clustered mode
+    JSNoMessageFoundErr = 10037,                        ///< No message found
+    JSNotEmptyRequestErr = 10038,                       ///< Expected an empty request payload
+    JSNotEnabledForAccountErr = 10039,                  ///< JetStream not enabled for account
+    JSClusterPeerNotMemberErr = 10040,                  ///< Peer not a member
+    JSRaftGeneralErr = 10041,                           ///< General RAFT error
+    JSRestoreSubscribeFailedErr = 10042,                ///< JetStream unable to subscribe to restore snapshot
+    JSSequenceNotFoundErr = 10043,                      ///< Sequence not found
+    JSClusterServerNotMemberErr = 10044,                ///< Server is not a member of the cluster
+    JSSourceConsumerSetupFailedErr = 10045,             ///< General source consumer setup failure
+    JSSourceMaxMessageSizeTooBigErr = 10046,            ///< Stream source must have max message size >= target
+    JSStorageResourcesExceededErr = 10047,              ///< Insufficient storage resources available
+    JSStreamAssignmentErr = 10048,                      ///< Generic stream assignment error
+    JSStreamCreateErr = 10049,                          ///< Generic stream creation error
+    JSStreamDeleteErr = 10050,                          ///< General stream deletion error
+    JSStreamGeneralError = 10051,                       ///< General stream failure
+    JSStreamInvalidConfig = 10052,                      ///< Stream configuration validation error
+    JSStreamLimitsErr = 10053,                          ///< General stream limits exceeded error
+    JSStreamMessageExceedsMaximumErr = 10054,           ///< Message size exceeds maximum allowed
+    JSStreamMirrorNotUpdatableErr = 10055,              ///< Mirror configuration can not be updated
+    JSStreamMismatchErr = 10056,                        ///< Stream name in subject does not match request
+    JSStreamMsgDeleteFailed = 10057,                    ///< Generic message deletion failure error
+    JSStreamNameExistErr = 10058,                       ///< Stream name already in use
+    JSStreamNotFoundErr = 10059,                        ///< Stream not found
+    JSStreamNotMatchErr = 10060,                        ///< Expected stream does not match
+    JSStreamReplicasNotUpdatableErr = 10061,            ///< Replicas configuration can not be updated
+    JSStreamRestoreErr = 10062,                         ///< Restore failed
+    JSStreamSequenceNotMatchErr = 10063,                ///< Expected stream sequence does not match
+    JSStreamSnapshotErr = 10064,                        ///< Snapshot failed
+    JSStreamSubjectOverlapErr = 10065,                  ///< Subjects overlap with an existing stream
+    JSStreamTemplateCreateErr = 10066,                  ///< Generic template creation failed
+    JSStreamTemplateDeleteErr = 10067,                  ///< Generic stream template deletion failed error
+    JSStreamTemplateNotFoundErr = 10068,                ///< Template not found
+    JSStreamUpdateErr = 10069,                          ///< Generic stream update error
+    JSStreamWrongLastMsgIDErr = 10070,                  ///< Wrong last msg ID
+    JSStreamWrongLastSequenceErr = 10071,               ///< Wrong last sequence
+    JSTempStorageFailedErr = 10072,                     ///< JetStream unable to open temp storage for restore
+    JSTemplateNameNotMatchSubjectErr = 10073,           ///< Template name in subject does not match request
+    JSStreamReplicasNotSupportedErr = 10074,            ///< Replicas > 1 not supported in non-clustered mode
+    JSPeerRemapErr = 10075,                             ///< Peer remap failed
+    JSNotEnabledErr = 10076,                            ///< JetStream not enabled
+    JSStreamStoreFailedErr = 10077,                     ///< Generic error when storing a message failed
+    JSConsumerConfigRequiredErr = 10078,                ///< Consumer config required
+    JSConsumerDeliverToWildcardsErr = 10079,            ///< Consumer deliver subject has wildcards
+    JSConsumerPushMaxWaitingErr = 10080,                ///< Consumer in push mode can not set max waiting
+    JSConsumerDeliverCycleErr = 10081,                  ///< Consumer deliver subject forms a cycle
+    JSConsumerMaxPendingAckPolicyRequiredErr = 10082,   ///< Consumer requires ack policy for max ack pending
+    JSConsumerSmallHeartbeatErr = 10083,                ///< Consumer idle heartbeat needs to be >= 100ms
+    JSConsumerPullRequiresAckErr = 10084,               ///< Consumer in pull mode requires explicit ack policy
+    JSConsumerPullNotDurableErr = 10085,                ///< Consumer in pull mode requires a durable name
+    JSConsumerPullWithRateLimitErr = 10086,             ///< Consumer in pull mode can not have rate limit set
+    JSConsumerMaxWaitingNegativeErr = 10087,            ///< Consumer max waiting needs to be positive
+    JSConsumerHBRequiresPushErr = 10088,                ///< Consumer idle heartbeat requires a push based consumer
+    JSConsumerFCRequiresPushErr = 10089,                ///< Consumer flow control requires a push based consumer
+    JSConsumerDirectRequiresPushErr = 10090,            ///< Consumer direct requires a push based consumer
+    JSConsumerDirectRequiresEphemeralErr = 10091,       ///< Consumer direct requires an ephemeral consumer
+    JSConsumerOnMappedErr = 10092,                      ///< Consumer direct on a mapped consumer
+    JSConsumerFilterNotSubsetErr = 10093,               ///< Consumer filter subject is not a valid subset of the interest subjects
+    JSConsumerInvalidPolicyErr = 10094,                 ///< Generic delivery policy error
+    JSConsumerInvalidSamplingErr = 10095,               ///< Failed to parse consumer sampling configuration
+    JSStreamInvalidErr = 10096,                         ///< Stream not valid
+    JSConsumerWQRequiresExplicitAckErr = 10098,         ///< Workqueue stream requires explicit ack
+    JSConsumerWQMultipleUnfilteredErr = 10099,          ///< Multiple non-filtered consumers not allowed on workqueue stream
+    JSConsumerWQConsumerNotUniqueErr = 10100,           ///< Filtered consumer not unique on workqueue stream
+    JSConsumerWQConsumerNotDeliverAllErr = 10101,       ///< Consumer must be deliver all on workqueue stream
+    JSConsumerNameTooLongErr = 10102,                   ///< Consumer name is too long
+    JSConsumerBadDurableNameErr = 10103,                ///< Durable name can not contain '.', '*', '>'
+    JSConsumerStoreFailedErr = 10104,                   ///< Error creating store for consumer
+    JSConsumerExistingActiveErr = 10105,                ///< Consumer already exists and is still active
+    JSConsumerReplacementWithDifferentNameErr = 10106,  ///< Consumer replacement durable config not the same
+    JSConsumerDescriptionTooLongErr = 10107,            ///< Consumer description is too long
+    JSConsumerWithFlowControlNeedsHeartbeatsErr = 10108,///< Consumer with flow control also needs heartbeats
+    JSStreamSealedErr = 10109,                          ///< Invalid operation on sealed stream
+    JSStreamPurgeFailedErr = 10110,                     ///< Generic stream purge failure
+    JSStreamRollupFailedErr = 10111,                    ///< Generic stream rollup failure
+    JSConsumerInvalidDeliverSubjectErr = 10112,         ///< Invalid push consumer deliver subject
+    JSStreamMaxBytesRequiredErr = 10113,                ///< Account requires a stream config to have max bytes set
+    JSConsumerMaxRequestBatchNegativeErr = 10114,       ///< Consumer max request batch needs to be > 0
+    JSConsumerMaxRequestExpiresToSmallErr = 10115,      ///< Consumer max request expires needs to be > 1ms
+    JSConsumerMaxDeliverBackoffErr = 10116,             ///< Max deliver is required to be > length of backoff values
+    JSStreamInfoMaxSubjectsErr = 10117,                 ///< Subject details would exceed maximum allowed
+    JSStreamOfflineErr = 10118,                         ///< Stream is offline
+    JSConsumerOfflineErr = 10119,                       ///< Consumer is offline
+    JSNoLimitsErr = 10120,                              ///< No JetStream default or applicable tiered limit present
+    JSConsumerMaxPendingAckExcessErr = 10121,           ///< Consumer max ack pending exceeds system limit
+    JSStreamMaxStreamBytesExceededErr = 10122,          ///< Stream max bytes exceeds account limit max stream bytes
+    JSStreamMoveAndScaleErr = 10123,                    ///< Cannot move and scale a stream in a single update
+    JSStreamMoveInProgressErr = 10124,                  ///< Stream move already in progress
+    JSConsumerMaxRequestBatchExceededErr = 10125,       ///< Consumer max request batch exceeds server limit
+    JSConsumerReplicasExceedsStreamErr = 10126,         ///< Consumer config replica count exceeds parent stream
+
+} jsErrCode;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* STATUS_H_ */
diff --git a/src/sub.c b/src/sub.c
new file mode 100644 (file)
index 0000000..a2fe703
--- /dev/null
+++ b/src/sub.c
@@ -0,0 +1,1467 @@
+// Copyright 2015-2021 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "natsp.h"
+
+#include <string.h>
+#include <stdio.h>
+
+#include "mem.h"
+#include "conn.h"
+#include "sub.h"
+#include "msg.h"
+#include "util.h"
+#include "js.h"
+
+#ifdef DEV_MODE
+
+static void _retain(natsSubscription *sub)   { sub->refs++; }
+static void _release(natsSubscription *sub)  { sub->refs--; }
+
+void natsSub_Lock(natsSubscription *sub)     { natsMutex_Lock(sub->mu);   }
+void natsSub_Unlock(natsSubscription *sub)   { natsMutex_Unlock(sub->mu); }
+
+#else
+
+#define _retain(s)  ((s)->refs++)
+#define _release(s) ((s)->refs--)
+
+#endif // DEV_MODE
+
+#define SUB_DLV_WORKER_LOCK(s)      if ((s)->libDlvWorker != NULL) \
+                                        natsMutex_Lock((s)->libDlvWorker->lock)
+
+#define SUB_DLV_WORKER_UNLOCK(s)    if ((s)->libDlvWorker != NULL) \
+                                        natsMutex_Unlock((s)->libDlvWorker->lock)
+
+bool testDrainAutoUnsubRace = false;
+
+static void
+_freeSubscription(natsSubscription *sub)
+{
+    natsMsg *m;
+
+    if (sub == NULL)
+        return;
+
+    while ((m = sub->msgList.head) != NULL)
+    {
+        sub->msgList.head = m->next;
+        natsMsg_Destroy(m);
+    }
+
+    NATS_FREE(sub->subject);
+    NATS_FREE(sub->queue);
+
+    if (sub->deliverMsgsThread != NULL)
+    {
+        natsThread_Detach(sub->deliverMsgsThread);
+        natsThread_Destroy(sub->deliverMsgsThread);
+    }
+    natsTimer_Destroy(sub->timeoutTimer);
+    natsCondition_Destroy(sub->cond);
+    natsMutex_Destroy(sub->mu);
+    jsSub_free(sub->jsi);
+
+    natsConn_release(sub->conn);
+
+    NATS_FREE(sub);
+}
+
+void
+natsSub_retain(natsSubscription *sub)
+{
+    natsSub_Lock(sub);
+
+    sub->refs++;
+
+    natsSub_Unlock(sub);
+}
+
+void
+natsSub_release(natsSubscription *sub)
+{
+    int refs = 0;
+
+    if (sub == NULL)
+        return;
+
+    natsSub_Lock(sub);
+
+    refs = --(sub->refs);
+
+    natsSub_Unlock(sub);
+
+    if (refs == 0)
+        _freeSubscription(sub);
+}
+
+void
+natsSubAndLdw_Lock(natsSubscription *sub)
+{
+    natsMutex_Lock(sub->mu);
+    SUB_DLV_WORKER_LOCK(sub);
+}
+
+void
+natsSubAndLdw_Unlock(natsSubscription *sub)
+{
+    SUB_DLV_WORKER_UNLOCK(sub);
+    natsMutex_Unlock(sub->mu);
+}
+
+// Runs under the subscription lock but will release it for a JS subscription
+// if the JS consumer needs to be deleted.
+static void
+_setDrainCompleteState(natsSubscription *sub)
+{
+    // It is possible that we are here without being in "drain in progress"
+    // or event "started" due to auto-unsubscribe. So unless we already
+    // switched to "drain complete", swith the state.
+    if (!natsSub_drainComplete(sub))
+    {
+        // For JS subscription we may need to delete the JS consumer, but
+        // we want to do so here ONLY if there was really a drain started.
+        // So need to check on drain started state. Also, note that if
+        // jsSub_deleteConsumerAfterDrain is invoked, the lock may be
+        // released/reacquired in that function.
+        if ((sub->jsi != NULL) && natsSub_drainStarted(sub) && sub->jsi->dc)
+        {
+            jsSub_deleteConsumerAfterDrain(sub);
+            // Check drainCompete state again, since another thread may have
+            // beat us to it while lock was released.
+            if (natsSub_drainComplete(sub))
+                return;
+        }
+
+        // If drain status is not already set (could be done in _flushAndDrain
+        // if flush fails, or timeout occurs), set it here to report if the
+        // connection or subscription has been closed prior to drain completion.
+        if (sub->drainStatus == NATS_OK)
+        {
+            if (sub->connClosed)
+                sub->drainStatus = NATS_CONNECTION_CLOSED;
+            else if (sub->closed)
+                sub->drainStatus = NATS_INVALID_SUBSCRIPTION;
+        }
+        sub->drainState |= SUB_DRAIN_COMPLETE;
+        natsCondition_Broadcast(sub->cond);
+    }
+}
+
+void
+natsSub_setDrainCompleteState(natsSubscription *sub)
+{
+    natsSub_Lock(sub);
+    _setDrainCompleteState(sub);
+    natsSub_Unlock(sub);
+}
+
+// _deliverMsgs is used to deliver messages to asynchronous subscribers.
+void
+natsSub_deliverMsgs(void *arg)
+{
+    natsSubscription    *sub        = (natsSubscription*) arg;
+    natsConnection      *nc         = sub->conn;
+    natsMsgHandler      mcb         = sub->msgCb;
+    void                *mcbClosure = sub->msgCbClosure;
+    uint64_t            delivered;
+    uint64_t            max;
+    natsMsg             *msg;
+    int64_t             timeout;
+    natsStatus          s = NATS_OK;
+    bool                draining = false;
+    bool                rmSub    = false;
+    natsOnCompleteCB    onCompleteCB = NULL;
+    void                *onCompleteCBClosure = NULL;
+    char                *fcReply = NULL;
+    jsSub               *jsi = NULL;
+
+    // This just serves as a barrier for the creation of this thread.
+    natsConn_Lock(nc);
+    natsConn_Unlock(nc);
+
+    natsSub_Lock(sub);
+    timeout = sub->timeout;
+    jsi = sub->jsi;
+    natsSub_Unlock(sub);
+
+    while (true)
+    {
+        natsSub_Lock(sub);
+
+        s = NATS_OK;
+        while (((msg = sub->msgList.head) == NULL) && !(sub->closed) && !(sub->draining) && (s != NATS_TIMEOUT))
+        {
+            if (timeout != 0)
+                s = natsCondition_TimedWait(sub->cond, sub->mu, timeout);
+            else
+                natsCondition_Wait(sub->cond, sub->mu);
+        }
+
+        if (sub->closed)
+        {
+            natsSub_Unlock(sub);
+            break;
+        }
+        draining = sub->draining;
+
+        // Will happen with timeout subscription
+        if (msg == NULL)
+        {
+            natsSub_Unlock(sub);
+            if (draining)
+            {
+                rmSub = true;
+                break;
+            }
+            // If subscription timed-out, invoke callback with NULL message.
+            if (s == NATS_TIMEOUT)
+                (*mcb)(nc, sub, NULL, mcbClosure);
+            continue;
+        }
+
+        delivered = ++(sub->delivered);
+
+        sub->msgList.head = msg->next;
+
+        if (sub->msgList.tail == msg)
+            sub->msgList.tail = NULL;
+
+        sub->msgList.msgs--;
+        sub->msgList.bytes -= natsMsg_dataAndHdrLen(msg);
+
+        msg->next = NULL;
+
+        // Capture this under lock.
+        max = sub->max;
+
+        // Check for JS flow control
+        fcReply = (jsi == NULL ? NULL : jsSub_checkForFlowControlResponse(sub));
+
+        natsSub_Unlock(sub);
+
+        if ((max == 0) || (delivered <= max))
+        {
+           (*mcb)(nc, sub, msg, mcbClosure);
+        }
+        else
+        {
+            // We need to destroy the message since the user can't do it
+            natsMsg_Destroy(msg);
+        }
+
+        if (fcReply != NULL)
+        {
+            natsConnection_Publish(nc, fcReply, NULL, 0);
+            NATS_FREE(fcReply);
+        }
+
+        // Don't do 'else' because we need to remove when we have hit
+        // the max (after the callback returns).
+        if ((max > 0) && (delivered >= max))
+        {
+            // If we have hit the max for delivered msgs, remove sub.
+            rmSub = true;
+            break;
+        }
+    }
+
+    natsSub_Lock(sub);
+    onCompleteCB        = sub->onCompleteCB;
+    onCompleteCBClosure = sub->onCompleteCBClosure;
+    _setDrainCompleteState(sub);
+    natsSub_Unlock(sub);
+
+    if (rmSub)
+        natsConn_removeSubscription(nc, sub);
+
+    if (onCompleteCB != NULL)
+        (*onCompleteCB)(onCompleteCBClosure);
+
+    natsSub_release(sub);
+}
+
+bool
+natsSub_setMax(natsSubscription *sub, uint64_t max)
+{
+    bool accepted = false;
+
+    natsSub_Lock(sub);
+    SUB_DLV_WORKER_LOCK(sub);
+    sub->max = (max <= sub->delivered ? 0 : max);
+    accepted = sub->max != 0;
+    SUB_DLV_WORKER_UNLOCK(sub);
+    natsSub_Unlock(sub);
+    return accepted;
+}
+
+natsStatus
+natsSubscription_SetOnCompleteCB(natsSubscription *sub, natsOnCompleteCB cb, void *closure)
+{
+    natsStatus s = NATS_OK;
+
+    if (sub == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    natsSub_Lock(sub);
+    if ((sub->closed) || (sub->msgCb == NULL))
+        s = nats_setDefaultError(NATS_INVALID_SUBSCRIPTION);
+    else
+    {
+        sub->onCompleteCB = cb;
+        sub->onCompleteCBClosure = closure;
+    }
+    natsSub_Unlock(sub);
+
+    return s;
+}
+
+void
+natsSub_close(natsSubscription *sub, bool connectionClosed)
+{
+    natsSub_Lock(sub);
+
+    SUB_DLV_WORKER_LOCK(sub);
+
+    if (!(sub->closed))
+    {
+        sub->closed = true;
+        sub->connClosed = connectionClosed;
+
+        if ((sub->jsi != NULL) && (sub->jsi->hbTimer != NULL))
+            natsTimer_Stop(sub->jsi->hbTimer);
+
+        if (sub->libDlvWorker != NULL)
+        {
+            // If this is a subscription with timeout, stop the timer.
+            if (sub->timeout != 0)
+                natsTimer_Stop(sub->timeoutTimer);
+
+            // Post a control message to wake-up the worker which will
+            // ensure that all pending messages for this subscription
+            // are removed and the subscription will ultimately be
+            // released in the worker thread.
+            natsLib_msgDeliveryPostControlMsg(sub);
+        }
+        else
+            natsCondition_Broadcast(sub->cond);
+    }
+
+    SUB_DLV_WORKER_UNLOCK(sub);
+
+    natsSub_Unlock(sub);
+}
+
+static void
+_asyncTimeoutCb(natsTimer *timer, void* closure)
+{
+    natsSubscription *sub = (natsSubscription*) closure;
+
+    // Should not happen, but in case
+    if (sub->libDlvWorker == NULL)
+        return;
+
+    SUB_DLV_WORKER_LOCK(sub);
+
+    // If the subscription is closed, or if we are prevented from posting
+    // a "timeout" control message, do nothing.
+    if (!sub->closed && !sub->timedOut && !sub->timeoutSuspended)
+    {
+        // Prevent from scheduling another control message while we are not
+        // done with previous one.
+        sub->timedOut = true;
+
+        // Set the timer to a very high value, it will be reset from the
+        // worker thread.
+        natsTimer_Reset(sub->timeoutTimer, 60*60*1000);
+
+        // Post a control message to the worker thread.
+        natsLib_msgDeliveryPostControlMsg(sub);
+    }
+
+    SUB_DLV_WORKER_UNLOCK(sub);
+}
+
+static void
+_asyncTimeoutStopCb(natsTimer *timer, void* closure)
+{
+    natsSubscription *sub = (natsSubscription*) closure;
+
+    natsSub_release(sub);
+}
+
+natsStatus
+natsSub_create(natsSubscription **newSub, natsConnection *nc, const char *subj,
+               const char *queueGroup, int64_t timeout, natsMsgHandler cb, void *cbClosure,
+               bool preventUseOfLibDlvPool, jsSub *jsi)
+{
+    natsStatus          s = NATS_OK;
+    natsSubscription    *sub = NULL;
+    int                 bytesLimit = nc->opts->maxPendingMsgs * 1024;
+
+    if (bytesLimit <= 0)
+        return nats_setError(NATS_INVALID_ARG, "Invalid bytes limit of %d", bytesLimit);
+
+    sub = (natsSubscription*) NATS_CALLOC(1, sizeof(natsSubscription));
+    if (sub == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    s = natsMutex_Create(&(sub->mu));
+    if (s != NATS_OK)
+    {
+        NATS_FREE(sub);
+        return NATS_UPDATE_ERR_STACK(s);
+    }
+
+    natsConn_retain(nc);
+
+    sub->refs           = 1;
+    sub->conn           = nc;
+    sub->timeout        = timeout;
+    sub->msgCb          = cb;
+    sub->msgCbClosure   = cbClosure;
+    sub->msgsLimit      = nc->opts->maxPendingMsgs;
+    sub->bytesLimit     = bytesLimit;
+    sub->jsi            = jsi;
+
+    sub->subject = NATS_STRDUP(subj);
+    if (sub->subject == NULL)
+        s = nats_setDefaultError(NATS_NO_MEMORY);
+
+    if ((s == NATS_OK) && (queueGroup != NULL) && (strlen(queueGroup) > 0))
+    {
+        sub->queue = NATS_STRDUP(queueGroup);
+        if (sub->queue == NULL)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+    }
+    if (s == NATS_OK)
+        s = natsCondition_Create(&(sub->cond));
+    if ((s == NATS_OK) && (cb != NULL))
+    {
+        if (!(nc->opts->libMsgDelivery) || preventUseOfLibDlvPool)
+        {
+            // Let's not rely on the created thread acquiring the lock that
+            // would make it safe to retain only on success.
+            _retain(sub);
+
+            // If we have an async callback, start up a sub specific
+            // thread to deliver the messages.
+            s = natsThread_Create(&(sub->deliverMsgsThread), natsSub_deliverMsgs,
+                                  (void*) sub);
+            if (s != NATS_OK)
+                _release(sub);
+        }
+        else
+        {
+            _retain(sub);
+            s = natsLib_msgDeliveryAssignWorker(sub);
+            if ((s == NATS_OK) && (timeout > 0))
+            {
+                _retain(sub);
+                s = natsTimer_Create(&sub->timeoutTimer, _asyncTimeoutCb,
+                                     _asyncTimeoutStopCb, timeout, (void*) sub);
+                if (s != NATS_OK)
+                    _release(sub);
+            }
+            if (s != NATS_OK)
+                _release(sub);
+        }
+    }
+
+    if (s == NATS_OK)
+        *newSub = sub;
+    else
+        natsSub_release(sub);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+/*
+ * Expresses interest in the given subject. The subject can have wildcards
+ * (partial:*, full:>). Messages will be delivered to the associated
+ * natsMsgHandler. If no natsMsgHandler is given, the subscription is a
+ * synchronous subscription and can be polled via natsSubscription_NextMsg().
+ */
+natsStatus
+natsConnection_Subscribe(natsSubscription **sub, natsConnection *nc, const char *subject,
+                         natsMsgHandler cb, void *cbClosure)
+{
+    natsStatus s;
+
+    if (cb == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    s = natsConn_subscribe(sub, nc, subject, cb, cbClosure);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+/*
+ * Similar to natsConnection_Subscribe() except that a timeout is given.
+ * If the subscription has not receive any message for the given timeout,
+ * the callback is invoked with a `NULL` message. The subscription can
+ * then be destroyed, if not, the callback will be invoked again when
+ * a message is received or the subscription times-out again.
+ */
+natsStatus
+natsConnection_SubscribeTimeout(natsSubscription **sub, natsConnection *nc, const char *subject,
+                                int64_t timeout, natsMsgHandler cb, void *cbClosure)
+{
+    natsStatus s;
+
+    if ((cb == NULL) || (timeout <= 0))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    s = natsConn_subscribeWithTimeout(sub, nc, subject, timeout, cb, cbClosure);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+
+/*
+ * natsSubscribeSync is syntactic sugar for natsSubscribe(&sub, nc, subject, NULL).
+ */
+natsStatus
+natsConnection_SubscribeSync(natsSubscription **sub, natsConnection *nc, const char *subject)
+{
+    natsStatus s;
+
+    s = natsConn_subscribeSync(sub, nc, subject);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+/*
+ * Creates an asynchronous queue subscriber on the given subject.
+ * All subscribers with the same queue name will form the queue group and
+ * only one member of the group will be selected to receive any given
+ * message asynchronously.
+ */
+natsStatus
+natsConnection_QueueSubscribe(natsSubscription **sub, natsConnection *nc,
+                   const char *subject, const char *queueGroup,
+                   natsMsgHandler cb, void *cbClosure)
+{
+    natsStatus s;
+
+    if ((queueGroup == NULL) || (strlen(queueGroup) == 0) || (cb == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    s = natsConn_queueSubscribe(sub, nc, subject, queueGroup, cb, cbClosure);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+/*
+ * Similar to natsConnection_QueueSubscribe() except that a timeout is given.
+ * If the subscription has not receive any message for the given timeout,
+ * the callback is invoked with a `NULL` message. The subscription can
+ * then be destroyed, if not, the callback will be invoked again when
+ * a message is received or the subscription times-out again.
+ */
+natsStatus
+natsConnection_QueueSubscribeTimeout(natsSubscription **sub, natsConnection *nc,
+                   const char *subject, const char *queueGroup,
+                   int64_t timeout, natsMsgHandler cb, void *cbClosure)
+{
+    natsStatus s;
+
+    if ((queueGroup == NULL) || (strlen(queueGroup) == 0) || (cb == NULL)
+            || (timeout <= 0))
+    {
+        return nats_setDefaultError(NATS_INVALID_ARG);
+    }
+
+    s = natsConn_queueSubscribeWithTimeout(sub, nc, subject, queueGroup, timeout, cb, cbClosure);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+/*
+ * Similar to natsQueueSubscribe except that the subscription is synchronous.
+ */
+natsStatus
+natsConnection_QueueSubscribeSync(natsSubscription **sub, natsConnection *nc,
+                       const char *subject, const char *queueGroup)
+{
+    natsStatus s;
+
+    if ((queueGroup == NULL) || (strlen(queueGroup) == 0))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    s = natsConn_queueSubscribeSync(sub, nc, subject, queueGroup);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+/*
+ * By default, messages that arrive are not immediately delivered. This
+ * generally improves performance. However, in case of request-reply,
+ * this delay has a negative impact. In such case, call this function
+ * to have the subscriber be notified immediately each time a message
+ * arrives.
+ *
+ * DEPRECATED
+ */
+natsStatus
+natsSubscription_NoDeliveryDelay(natsSubscription *sub)
+{
+    if (sub == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsSub_nextMsg(natsMsg **nextMsg, natsSubscription *sub, int64_t timeout, bool pullSubInternal)
+{
+    natsStatus      s    = NATS_OK;
+    natsConnection  *nc  = NULL;
+    natsMsg         *msg = NULL;
+    bool            removeSub = false;
+    int64_t         target    = 0;
+    jsSub           *jsi      = NULL;
+    char            *fcReply  = NULL;
+
+    if ((sub == NULL) || (nextMsg == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    natsSub_Lock(sub);
+
+    if (sub->connClosed)
+    {
+        natsSub_Unlock(sub);
+
+        return nats_setDefaultError(NATS_CONNECTION_CLOSED);
+    }
+    if (sub->closed)
+    {
+        if ((sub->max > 0) && (sub->delivered >= sub->max))
+            s = NATS_MAX_DELIVERED_MSGS;
+        else
+            s = NATS_INVALID_SUBSCRIPTION;
+
+        natsSub_Unlock(sub);
+
+        return nats_setDefaultError(s);
+    }
+    if (sub->msgCb != NULL)
+    {
+        natsSub_Unlock(sub);
+
+        return nats_setDefaultError(NATS_ILLEGAL_STATE);
+    }
+    if (sub->slowConsumer)
+    {
+        sub->slowConsumer = false;
+        natsSub_Unlock(sub);
+
+        return nats_setDefaultError(NATS_SLOW_CONSUMER);
+    }
+    if (sub->jsi != NULL)
+    {
+        if (sub->jsi->sm)
+        {
+            sub->jsi->sm = false;
+            natsSub_Unlock(sub);
+
+            return nats_setError(NATS_MISMATCH, "%s", jsErrConsumerSeqMismatch);
+        }
+        else if (!pullSubInternal && sub->jsi->pull)
+        {
+            natsSub_Unlock(sub);
+            return nats_setError(NATS_INVALID_SUBSCRIPTION, "%s", jsErrNotApplicableToPullSub);
+        }
+    }
+
+    nc = sub->conn;
+    jsi= sub->jsi;
+
+    if (timeout > 0)
+    {
+        while ((sub->msgList.msgs == 0)
+               && (s != NATS_TIMEOUT)
+               && !(sub->closed)
+               && !(sub->draining))
+        {
+            if (target == 0)
+                target = nats_setTargetTime(timeout);
+
+            s = natsCondition_AbsoluteTimedWait(sub->cond, sub->mu, target);
+            if (s != NATS_OK)
+                s = nats_setDefaultError(s);
+        }
+
+        if (sub->connClosed)
+            s = nats_setDefaultError(NATS_CONNECTION_CLOSED);
+        else if (sub->closed)
+            s = nats_setDefaultError(NATS_INVALID_SUBSCRIPTION);
+    }
+    else
+    {
+        s = (sub->msgList.msgs == 0 ? NATS_TIMEOUT : NATS_OK);
+        if ((s != NATS_OK) && !pullSubInternal)
+            s = nats_setDefaultError(s);
+    }
+
+    if (s == NATS_OK)
+    {
+        msg = sub->msgList.head;
+        if ((msg == NULL) && sub->draining)
+        {
+            removeSub = true;
+            s = NATS_TIMEOUT;
+        }
+        else
+        {
+            sub->msgList.head = msg->next;
+
+            if (sub->msgList.tail == msg)
+                sub->msgList.tail = NULL;
+
+            sub->msgList.msgs--;
+            sub->msgList.bytes -= natsMsg_dataAndHdrLen(msg);
+
+            msg->next = NULL;
+
+            sub->delivered++;
+            fcReply = (jsi == NULL ? NULL : jsSub_checkForFlowControlResponse(sub));
+
+            if (sub->max > 0)
+            {
+                if (sub->delivered > sub->max)
+                    s = nats_setDefaultError(NATS_MAX_DELIVERED_MSGS);
+                else if (sub->delivered == sub->max)
+                    removeSub = true;
+            }
+
+            if (sub->draining && (sub->msgList.msgs == 0))
+                removeSub = true;
+        }
+        if (removeSub)
+            _retain(sub);
+    }
+    if ((s == NATS_OK) && natsMsg_IsNoResponders(msg))
+    {
+        natsMsg_Destroy(msg);
+        s = NATS_NO_RESPONDERS;
+    }
+    else if (s == NATS_OK)
+        *nextMsg = msg;
+
+    natsSub_Unlock(sub);
+
+    if (fcReply != NULL)
+    {
+        natsConnection_Publish(nc, fcReply, NULL, 0);
+        NATS_FREE(fcReply);
+    }
+
+    if (removeSub)
+    {
+        natsSub_setDrainCompleteState(sub);
+        natsConn_removeSubscription(nc, sub);
+        natsSub_release(sub);
+    }
+
+    if (pullSubInternal && (s == NATS_TIMEOUT))
+        return s;
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+/*
+ * Return the next message available to a synchronous subscriber or block until
+ * one is available. A timeout can be used to return when no message has been
+ * delivered.
+ */
+natsStatus
+natsSubscription_NextMsg(natsMsg **nextMsg, natsSubscription *sub, int64_t timeout)
+{
+    natsStatus s = natsSub_nextMsg(nextMsg, sub, timeout, false);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_unsubscribe(natsSubscription *sub, int max, bool drainMode, int64_t timeout)
+{
+    natsStatus      s   = NATS_OK;
+    natsConnection  *nc = NULL;
+    bool            dc  = false;
+    jsSub           *jsi;
+
+    if (sub == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    natsSub_Lock(sub);
+    nc = sub->conn;
+    _retain(sub);
+
+    if ((jsi = sub->jsi) != NULL)
+    {
+        if (jsi->hbTimer != NULL)
+            natsTimer_Stop(jsi->hbTimer);
+
+        dc = jsi->dc;
+    }
+
+    natsSub_Unlock(sub);
+
+    s = natsConn_unsubscribe(nc, sub, max, drainMode, timeout);
+
+    // If user calls natsSubscription_Unsubscribe() and this
+    // is a JS subscription that is supposed to delete the JS
+    // consumer, do so now.
+    if ((s == NATS_OK) && (max == 0) && !drainMode && dc)
+        s = jsSub_deleteConsumer(sub);
+
+    natsSub_release(sub);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsSubscription_Unsubscribe(natsSubscription *sub)
+{
+    natsStatus s = _unsubscribe(sub, 0, false, 0);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsSubscription_AutoUnsubscribe(natsSubscription *sub, int max)
+{
+    natsStatus s = _unsubscribe(sub, max, false, 0);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+void
+natsSub_drain(natsSubscription *sub)
+{
+    natsSub_Lock(sub);
+    SUB_DLV_WORKER_LOCK(sub);
+    if (sub->closed)
+    {
+        SUB_DLV_WORKER_UNLOCK(sub);
+        natsSub_Unlock(sub);
+        return;
+    }
+    sub->draining = true;
+    if (sub->libDlvWorker != NULL)
+    {
+        // If this is a subscription with timeout, stop the timer.
+        if (sub->timeout != 0)
+        {
+            natsTimer_Stop(sub->timeoutTimer);
+            // Prevent code to reset this timer
+            sub->timeoutSuspended = true;
+        }
+
+        // Set this to true. It will be set to false in the
+        // worker delivery thread when the control message is
+        // processed.
+        sub->libDlvDraining = true;
+
+        // Post a control message to wake-up the worker which will
+        // ensure that all pending messages for this subscription
+        // are removed and the subscription will ultimately be
+        // released in the worker thread.
+        natsLib_msgDeliveryPostControlMsg(sub);
+    }
+    else
+        natsCondition_Broadcast(sub->cond);
+    SUB_DLV_WORKER_UNLOCK(sub);
+    natsSub_Unlock(sub);
+}
+
+static void
+_updateDrainStatus(natsSubscription *sub, natsStatus s)
+{
+    // Do not override a drain status if already set.
+    if (sub->drainStatus == NATS_OK)
+        sub->drainStatus = s;
+}
+
+void
+natsSub_updateDrainStatus(natsSubscription *sub, natsStatus s)
+{
+    natsSub_Lock(sub);
+    _updateDrainStatus(sub, s);
+    natsSub_Unlock(sub);
+}
+
+// Mark the subscription such that connection stops to try to push messages into its list.
+void
+natsSub_setDrainSkip(natsSubscription *sub, natsStatus s)
+{
+    natsSub_Lock(sub);
+    SUB_DLV_WORKER_LOCK(sub);
+    _updateDrainStatus(sub, s);
+    sub->drainSkip = true;
+    SUB_DLV_WORKER_UNLOCK(sub);
+    natsSub_Unlock(sub);
+}
+
+static void
+_flushAndDrain(void *closure)
+{
+    natsSubscription *sub     = (natsSubscription*) closure;
+    natsConnection   *nc      = NULL;
+    natsThread       *t       = NULL;
+    int64_t          timeout  = 0;
+    int64_t          deadline = 0;
+    bool             sync     = false;
+    natsStatus       s;
+
+    natsSub_Lock(sub);
+    nc      = sub->conn;
+    t       = sub->drainThread;
+    timeout = sub->drainTimeout;
+    sync    = (sub->msgCb == NULL ? true : false);
+    natsSub_Unlock(sub);
+
+    // Make sure that negative value is considered no timeout.
+    if (timeout < 0)
+        timeout = 0;
+    else
+        deadline = nats_setTargetTime(timeout);
+
+    // Flush to make sure server has processed UNSUB and no new messages are coming.
+    if (timeout == 0)
+        s = natsConnection_Flush(nc);
+    else
+        s = natsConnection_FlushTimeout(nc, timeout);
+
+    // If flush failed, update drain status and prevent connection from
+    // pushing new messages to this subscription.
+    if (s != NATS_OK)
+        natsSub_setDrainSkip(sub, s);
+
+    // Switch to drain regardless of status
+    natsSub_drain(sub);
+
+    // We are going to check for completion only if a timeout is specified.
+    // If that is the case, the library will forcibly close the subscription.
+    if (timeout > 0)
+    {
+        // Reset status from possibly failed flush. We are now checking for
+        // the drain timeout.
+        s = NATS_OK;
+        // Wait for drain to complete or deadline is reached.
+        natsSub_Lock(sub);
+        // For sync subs, it is possible that we get here and users have
+        // already called NextMsg() for all pending messages before the sub
+        // was marked as "draining", so if we detect this situation, we need
+        // to switch status to complete here.
+        if (sync && !natsSub_drainComplete(sub) && (sub->msgList.msgs == 0))
+        {
+            _setDrainCompleteState(sub);
+        }
+        else
+        {
+            while ((s != NATS_TIMEOUT) && !natsSub_drainComplete(sub))
+                s = natsCondition_AbsoluteTimedWait(sub->cond, sub->mu, deadline);
+        }
+        natsSub_Unlock(sub);
+
+        if (s != NATS_OK)
+        {
+            natsSub_updateDrainStatus(sub, s);
+            natsConn_removeSubscription(nc, sub);
+        }
+    }
+
+    natsThread_Detach(t);
+    natsThread_Destroy(t);
+    natsSub_release(sub);
+}
+
+// Switch subscription's drain state to "started".
+void
+natsSub_initDrain(natsSubscription *sub)
+{
+    natsSub_Lock(sub);
+    sub->drainState |= SUB_DRAIN_STARTED;
+    natsSub_Unlock(sub);
+}
+
+// Initiates draining, unless already done.
+// Note that this runs under the associated connection lock.
+natsStatus
+natsSub_startDrain(natsSubscription *sub, int64_t timeout)
+{
+    natsStatus s;
+
+    if (testDrainAutoUnsubRace)
+        nats_Sleep(1);
+
+    natsSub_Lock(sub);
+    if (natsSub_drainStarted(sub))
+    {
+        natsSub_Unlock(sub);
+        return NATS_OK;
+    }
+    // Make sure that we just add to buffer but we don't flush it in place
+    // to make sure that this call will not block.
+    s = natsConn_enqueueUnsubProto(sub->conn, sub->sid);
+    if (s == NATS_OK)
+        s = natsThread_Create(&(sub->drainThread), _flushAndDrain, (void*) sub);
+    if (s == NATS_OK)
+    {
+        sub->drainTimeout = timeout;
+        sub->drainState |= SUB_DRAIN_STARTED;
+        _retain(sub);
+    }
+    natsSub_Unlock(sub);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsSubscription_Drain(natsSubscription *sub)
+{
+    natsStatus s;
+
+    s = _unsubscribe(sub, 0, true, DEFAULT_DRAIN_TIMEOUT);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsSubscription_DrainTimeout(natsSubscription *sub, int64_t timeout)
+{
+    natsStatus s;
+
+    s = _unsubscribe(sub, 0, true, timeout);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+natsSubscription_WaitForDrainCompletion(natsSubscription *sub, int64_t timeout)
+{
+    natsStatus  s        = NATS_OK;
+    int64_t     deadline = 0;
+    bool        dc       = false;
+
+    if (sub == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    natsSub_Lock(sub);
+    if (!natsSub_drainStarted(sub))
+    {
+        natsSub_Unlock(sub);
+        return nats_setError(NATS_ILLEGAL_STATE, "%s", "Subscription not in draining mode");
+    }
+    _retain(sub);
+
+    dc = (sub->jsi != NULL ? sub->jsi->dc : false);
+
+    if (timeout > 0)
+        deadline = nats_setTargetTime(timeout);
+
+    while ((s != NATS_TIMEOUT) && !natsSub_drainComplete(sub))
+    {
+        if (timeout > 0)
+            s = natsCondition_AbsoluteTimedWait(sub->cond, sub->mu, deadline);
+        else
+            natsCondition_Wait(sub->cond, sub->mu);
+    }
+    natsSub_Unlock(sub);
+
+    if ((s == NATS_OK) && dc)
+        s = jsSub_deleteConsumer(sub);
+
+    natsSub_release(sub);
+
+    // Here, we return a status as a result, not as if there was something wrong
+    // with the execution of this function. So we do not update the error stack.
+    return s;
+}
+
+natsStatus
+natsSubscription_DrainCompletionStatus(natsSubscription *sub)
+{
+    natsStatus s;
+
+    if (sub == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    natsSub_Lock(sub);
+    if (!natsSub_drainComplete(sub))
+        s = NATS_ILLEGAL_STATE;
+    else
+        s = sub->drainStatus;
+    natsSub_Unlock(sub);
+
+    return s;
+}
+
+/*
+ * Returns the number of queued messages in the client for this subscription.
+ */
+natsStatus
+natsSubscription_QueuedMsgs(natsSubscription *sub, uint64_t *queuedMsgs)
+{
+    natsStatus  s;
+    int         msgs = 0;
+
+    if (queuedMsgs == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    s = natsSubscription_GetPending(sub, &msgs, NULL);
+    if (s == NATS_OK)
+        *queuedMsgs = (uint64_t) msgs;
+
+    return s;
+}
+
+int64_t
+natsSubscription_GetID(natsSubscription* sub)
+{
+    int64_t id = 0;
+
+    if (sub == NULL)
+        return 0;
+
+    natsSub_Lock(sub);
+
+    if (sub->closed)
+    {
+        natsSub_Unlock(sub);
+        return 0;
+    }
+
+    id = sub->sid;
+
+    natsSub_Unlock(sub);
+
+    return id;
+}
+
+const char*
+natsSubscription_GetSubject(natsSubscription* sub)
+{
+    const char* subject = NULL;
+
+    if (sub == NULL)
+        return NULL;
+
+    natsSub_Lock(sub);
+
+    if (sub->closed)
+    {
+        natsSub_Unlock(sub);
+        return NULL;
+    }
+
+    subject = (const char*)sub->subject;
+
+    natsSub_Unlock(sub);
+
+    return subject;
+}
+
+natsStatus
+natsSubscription_GetPending(natsSubscription *sub, int *msgs, int *bytes)
+{
+    if (sub == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    natsSub_Lock(sub);
+
+    if (sub->closed)
+    {
+        natsSub_Unlock(sub);
+        return nats_setDefaultError(NATS_INVALID_SUBSCRIPTION);
+    }
+
+    SUB_DLV_WORKER_LOCK(sub);
+
+    if (msgs != NULL)
+        *msgs = sub->msgList.msgs;
+
+    if (bytes != NULL)
+        *bytes = sub->msgList.bytes;
+
+    SUB_DLV_WORKER_UNLOCK(sub);
+
+    natsSub_Unlock(sub);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsSubscription_SetPendingLimits(natsSubscription *sub, int msgLimit, int bytesLimit)
+{
+    if (sub == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    if ((msgLimit == 0) || (bytesLimit == 0))
+        return nats_setError(NATS_INVALID_ARG, "%s",
+                "Limits must be either > 0 or negative to specify no limit");
+
+    natsSub_Lock(sub);
+
+    if (sub->closed)
+    {
+        natsSub_Unlock(sub);
+        return nats_setDefaultError(NATS_INVALID_SUBSCRIPTION);
+    }
+
+    SUB_DLV_WORKER_LOCK(sub);
+
+    sub->msgsLimit = msgLimit;
+    sub->bytesLimit = bytesLimit;
+
+    SUB_DLV_WORKER_UNLOCK(sub);
+
+    natsSub_Unlock(sub);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsSubscription_GetPendingLimits(natsSubscription *sub, int *msgLimit, int *bytesLimit)
+{
+    if (sub == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    natsSub_Lock(sub);
+
+    if (sub->closed)
+    {
+        natsSub_Unlock(sub);
+        return nats_setDefaultError(NATS_INVALID_SUBSCRIPTION);
+    }
+
+    SUB_DLV_WORKER_LOCK(sub);
+
+    if (msgLimit != NULL)
+        *msgLimit = sub->msgsLimit;
+
+    if (bytesLimit != NULL)
+        *bytesLimit = sub->bytesLimit;
+
+    SUB_DLV_WORKER_UNLOCK(sub);
+
+    natsSub_Unlock(sub);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsSubscription_GetDelivered(natsSubscription *sub, int64_t *msgs)
+{
+    if ((sub == NULL) || (msgs == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    natsSub_Lock(sub);
+
+    if (sub->closed)
+    {
+        natsSub_Unlock(sub);
+        return nats_setDefaultError(NATS_INVALID_SUBSCRIPTION);
+    }
+
+    SUB_DLV_WORKER_LOCK(sub);
+
+    *msgs = (int64_t) sub->delivered;
+
+    SUB_DLV_WORKER_UNLOCK(sub);
+
+    natsSub_Unlock(sub);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsSubscription_GetDropped(natsSubscription *sub, int64_t *msgs)
+{
+    if ((sub == NULL) || (msgs == NULL))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    natsSub_Lock(sub);
+
+    if (sub->closed)
+    {
+        natsSub_Unlock(sub);
+        return nats_setDefaultError(NATS_INVALID_SUBSCRIPTION);
+    }
+
+    SUB_DLV_WORKER_LOCK(sub);
+
+    *msgs = sub->dropped;
+
+    SUB_DLV_WORKER_UNLOCK(sub);
+
+    natsSub_Unlock(sub);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsSubscription_GetMaxPending(natsSubscription *sub, int *msgs, int *bytes)
+{
+    if (sub == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    natsSub_Lock(sub);
+
+    if (sub->closed)
+    {
+        natsSub_Unlock(sub);
+        return nats_setDefaultError(NATS_INVALID_SUBSCRIPTION);
+    }
+
+    SUB_DLV_WORKER_LOCK(sub);
+
+    if (msgs != NULL)
+        *msgs = sub->msgsMax;
+
+    if (bytes != NULL)
+        *bytes = sub->bytesMax;
+
+    SUB_DLV_WORKER_UNLOCK(sub);
+
+    natsSub_Unlock(sub);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsSubscription_ClearMaxPending(natsSubscription *sub)
+{
+    if (sub == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    natsSub_Lock(sub);
+
+    if (sub->closed)
+    {
+        natsSub_Unlock(sub);
+        return nats_setDefaultError(NATS_INVALID_SUBSCRIPTION);
+    }
+
+    SUB_DLV_WORKER_LOCK(sub);
+
+    sub->msgsMax = 0;
+    sub->bytesMax = 0;
+
+    SUB_DLV_WORKER_UNLOCK(sub);
+
+    natsSub_Unlock(sub);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsSubscription_GetStats(natsSubscription *sub,
+        int     *pendingMsgs,
+        int     *pendingBytes,
+        int     *maxPendingMsgs,
+        int     *maxPendingBytes,
+        int64_t *deliveredMsgs,
+        int64_t *droppedMsgs)
+{
+    if (sub == NULL)
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    natsSub_Lock(sub);
+
+    if (sub->closed)
+    {
+        natsSub_Unlock(sub);
+        return nats_setDefaultError(NATS_INVALID_SUBSCRIPTION);
+    }
+
+    SUB_DLV_WORKER_LOCK(sub);
+
+    if (pendingMsgs != NULL)
+        *pendingMsgs = sub->msgList.msgs;
+
+    if (pendingBytes != NULL)
+        *pendingBytes = sub->msgList.bytes;
+
+    if (maxPendingMsgs != NULL)
+        *maxPendingMsgs = sub->msgsMax;
+
+    if (maxPendingBytes != NULL)
+        *maxPendingBytes = sub->bytesMax;
+
+    if (deliveredMsgs != NULL)
+        *deliveredMsgs = (int) sub->delivered;
+
+    if (droppedMsgs != NULL)
+        *droppedMsgs = sub->dropped;
+
+    SUB_DLV_WORKER_UNLOCK(sub);
+
+    natsSub_Unlock(sub);
+
+    return NATS_OK;
+}
+
+/*
+ * Returns a boolean indicating whether the subscription is still active.
+ * This will return false if the subscription has already been closed,
+ * or auto unsubscribed.
+ */
+bool
+natsSubscription_IsValid(natsSubscription *sub)
+{
+    bool valid = false;
+
+    if (sub == NULL)
+        return false;
+
+    natsSub_Lock(sub);
+
+    valid = !(sub->closed);
+
+    natsSub_Unlock(sub);
+
+    return valid;
+}
+
+/*
+ * Destroys the subscription object, freeing up memory.
+ * If not already done, this call will removes interest on the subject.
+ */
+void
+natsSubscription_Destroy(natsSubscription *sub)
+{
+    bool doUnsub = false;
+
+    if (sub == NULL)
+        return;
+
+    natsSub_Lock(sub);
+
+    doUnsub = !(sub->closed);
+    // If not yet closed but user is closing from message callback but it
+    // happens that auto-unsub was used and the max number was delivered, then
+    // we can suppress the UNSUB protocol.
+    if (doUnsub && (sub->max > 0))
+        doUnsub = sub->delivered < sub->max;
+
+    // For a JetStream subscription, disable the "delete consumer" flag
+    // because we auto-delete only on explicit calls to unsub/drain.
+    if (sub->jsi != NULL)
+        sub->jsi->dc = false;
+
+    natsSub_Unlock(sub);
+
+    if (doUnsub)
+        (void) natsSubscription_Unsubscribe(sub);
+
+    natsSub_release(sub);
+}
diff --git a/src/sub.h b/src/sub.h
new file mode 100644 (file)
index 0000000..0d54ed9
--- /dev/null
+++ b/src/sub.h
@@ -0,0 +1,84 @@
+// Copyright 2015-2021 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef SUB_H_
+#define SUB_H_
+
+#include "natsp.h"
+
+#ifdef DEV_MODE
+// For type safety...
+
+void natsSub_Lock(natsSubscription *sub);
+void natsSub_Unlock(natsSubscription *sub);
+
+#else
+
+#define natsSub_Lock(s)      natsMutex_Lock((s)->mu)
+#define natsSub_Unlock(s)    natsMutex_Unlock((s)->mu)
+
+#endif // DEV_MODE
+
+#define SUB_DRAIN_STARTED     ((uint8_t) 1)
+#define SUB_DRAIN_COMPLETE    ((uint8_t) 2)
+
+#define natsSub_drainStarted(s)     (((s)->drainState & SUB_DRAIN_STARTED) != 0)
+#define natsSub_drainComplete(s)    (((s)->drainState & SUB_DRAIN_COMPLETE) != 0)
+
+extern bool testDrainAutoUnsubRace;
+
+void
+natsSub_retain(natsSubscription *sub);
+
+void
+natsSub_release(natsSubscription *sub);
+
+natsStatus
+natsSub_create(natsSubscription **newSub, natsConnection *nc, const char *subj,
+               const char *queueGroup, int64_t timeout, natsMsgHandler cb, void *cbClosure,
+               bool noLibDlvPool, jsSub *jsi);
+
+bool
+natsSub_setMax(natsSubscription *sub, uint64_t max);
+
+void
+natsSub_initDrain(natsSubscription *sub);
+
+natsStatus
+natsSub_startDrain(natsSubscription *sub, int64_t timeout);
+
+void
+natsSub_setDrainCompleteState(natsSubscription *sub);
+
+void
+natsSub_setDrainSkip(natsSubscription *sub, natsStatus s);
+
+void
+natsSub_updateDrainStatus(natsSubscription *sub, natsStatus s);
+
+void
+natsSub_drain(natsSubscription *sub);
+
+natsStatus
+natsSub_nextMsg(natsMsg **nextMsg, natsSubscription *sub, int64_t timeout, bool pullSubInternal);
+
+void
+natsSubAndLdw_Lock(natsSubscription *sub);
+
+void
+natsSubAndLdw_Unlock(natsSubscription *sub);
+
+void
+natsSub_close(natsSubscription *sub, bool connectionClosed);
+
+#endif /* SUB_H_ */
diff --git a/src/timer.c b/src/timer.c
new file mode 100644 (file)
index 0000000..7a44945
--- /dev/null
@@ -0,0 +1,97 @@
+// Copyright 2015-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "natsp.h"
+#include "mem.h"
+#include "util.h"
+
+static void
+_freeTimer(natsTimer *t)
+{
+    if (t == NULL)
+        return;
+
+    natsMutex_Destroy(t->mu);
+    NATS_FREE(t);
+}
+
+void
+natsTimer_Release(natsTimer *t)
+{
+    int refs = 0;
+
+    natsMutex_Lock(t->mu);
+
+    refs = --(t->refs);
+
+    natsMutex_Unlock(t->mu);
+
+    if (refs == 0)
+        _freeTimer(t);
+}
+
+natsStatus
+natsTimer_Create(natsTimer **timer, natsTimerCb timerCb, natsTimerStopCb stopCb,
+                 int64_t interval, void* closure)
+{
+    natsStatus  s  = NATS_OK;
+    natsTimer   *t = (natsTimer*) NATS_CALLOC(1, sizeof(natsTimer));
+
+    if (t == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    t->refs    = 1;
+    t->cb      = timerCb;
+    t->stopCb  = stopCb;
+    t->closure = closure;
+
+    s = natsMutex_Create(&(t->mu));
+    if (s == NATS_OK)
+    {
+        // Doing so, so that nats_resetTimer() does not try to remove the timer
+        // from the list (since it is new it would not be there!).
+        t->stopped = true;
+
+        nats_resetTimer(t, interval);
+
+        *timer = t;
+    }
+    else
+        _freeTimer(t);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+void
+natsTimer_Stop(natsTimer *timer)
+{
+    // Proxy for this call:
+    nats_stopTimer(timer);
+}
+
+void
+natsTimer_Reset(natsTimer *timer, int64_t interval)
+{
+    // Proxy for this call:
+    nats_resetTimer(timer, interval);
+}
+
+void
+natsTimer_Destroy(natsTimer *timer)
+{
+    if (timer == NULL)
+        return;
+
+    nats_stopTimer(timer);
+    natsTimer_Release(timer);
+}
diff --git a/src/timer.h b/src/timer.h
new file mode 100644 (file)
index 0000000..db44645
--- /dev/null
@@ -0,0 +1,68 @@
+// Copyright 2015-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef TIMER_H_
+#define TIMER_H_
+
+#include <stdint.h>
+
+//#include "natsp.h"
+#include "status.h"
+
+struct __natsTimer;
+
+// Callback signature for timer
+typedef void (*natsTimerCb)(struct __natsTimer *timer, void* closure);
+
+// Callback invoked when the timer has been stopped and guaranteed
+// not to be in the timer callback.
+typedef void (*natsTimerStopCb)(struct __natsTimer *timer, void* closure);
+
+typedef struct __natsTimer
+{
+    struct __natsTimer  *prev;
+    struct __natsTimer  *next;
+
+    natsMutex           *mu;
+    int                 refs;
+
+    natsTimerCb         cb;
+    natsTimerStopCb     stopCb;
+    void*               closure;
+
+    int64_t             interval;
+    int64_t             absoluteTime;
+
+    bool                stopped;
+    bool                inCallback;
+
+} natsTimer;
+
+natsStatus
+natsTimer_Create(natsTimer **timer, natsTimerCb timerCb, natsTimerStopCb stopCb,
+                 int64_t interval, void* closure);
+
+void
+natsTimer_Stop(natsTimer *timer);
+
+void
+natsTimer_Reset(natsTimer *timer, int64_t interval);
+
+void
+natsTimer_Release(natsTimer *t);
+
+void
+natsTimer_Destroy(natsTimer *timer);
+
+
+#endif /* TIMER_H_ */
diff --git a/src/unix/cond.c b/src/unix/cond.c
new file mode 100644 (file)
index 0000000..2541ad9
--- /dev/null
@@ -0,0 +1,114 @@
+// Copyright 2015-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "../natsp.h"
+
+#include <errno.h>
+
+#include "../util.h"
+#include "../mem.h"
+
+natsStatus
+natsCondition_Create(natsCondition **cond)
+{
+    natsCondition   *c = (natsCondition*) NATS_CALLOC(1, sizeof(natsCondition));
+    natsStatus      s  = NATS_OK;
+
+    if (c == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    if (pthread_cond_init(c, NULL) != 0)
+        s = nats_setError(NATS_SYS_ERROR, "pthread_cond_init error: %d", errno);
+
+    if (s == NATS_OK)
+        *cond = c;
+    else
+        NATS_FREE(c);
+
+    return s;
+}
+
+void
+natsCondition_Wait(natsCondition *cond, natsMutex *mutex)
+{
+    if (pthread_cond_wait(cond, mutex) != 0)
+        abort();
+}
+
+static natsStatus
+_timedWait(natsCondition *cond, natsMutex *mutex, bool isAbsolute, int64_t timeout)
+{
+    int     r;
+    struct  timespec ts;
+    int64_t target;
+
+    if (timeout <= 0)
+        return NATS_TIMEOUT;
+
+    target = (isAbsolute ? timeout : nats_setTargetTime(timeout));
+
+    ts.tv_sec = target / 1000;
+    ts.tv_nsec = (target % 1000) * 1000000;
+
+    if (ts.tv_nsec >= 1000000000L)
+    {
+        ts.tv_sec++;
+        ts.tv_nsec -= 1000000000L;
+    }
+
+    r = pthread_cond_timedwait(cond, mutex, &ts);
+
+    if (r == 0)
+        return NATS_OK;
+
+    if (r == ETIMEDOUT)
+        return NATS_TIMEOUT;
+
+    return nats_setError(NATS_SYS_ERROR, "pthread_cond_timedwait error: %d", errno);
+}
+
+natsStatus
+natsCondition_TimedWait(natsCondition *cond, natsMutex *mutex, int64_t timeout)
+{
+    return _timedWait(cond, mutex, false, timeout);
+}
+
+natsStatus
+natsCondition_AbsoluteTimedWait(natsCondition *cond, natsMutex *mutex, int64_t absoluteTime)
+{
+    return _timedWait(cond, mutex, true, absoluteTime);
+}
+
+void
+natsCondition_Signal(natsCondition *cond)
+{
+    if (pthread_cond_signal(cond) != 0)
+      abort();
+}
+
+void
+natsCondition_Broadcast(natsCondition *cond)
+{
+    if (pthread_cond_broadcast(cond) != 0)
+      abort();
+}
+
+void
+natsCondition_Destroy(natsCondition *cond)
+{
+    if (cond == NULL)
+        return;
+
+    pthread_cond_destroy(cond);
+    NATS_FREE(cond);
+}
diff --git a/src/unix/mutex.c b/src/unix/mutex.c
new file mode 100644 (file)
index 0000000..ddc6a56
--- /dev/null
@@ -0,0 +1,124 @@
+// Copyright 2015-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "../natsp.h"
+#include "../mem.h"
+
+natsStatus
+natsMutex_Create(natsMutex **newMutex)
+{
+    natsStatus          s = NATS_OK;
+    pthread_mutexattr_t attr;
+    natsMutex           *m = NATS_CALLOC(1, sizeof(natsMutex));
+
+    if (m == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    if (pthread_mutexattr_init(&attr) != 0)
+    {
+        NATS_FREE(m);
+        return nats_setError(NATS_SYS_ERROR, "pthread_mutexattr_init error: %d",
+                             errno);
+    }
+
+    if (pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE) != 0)
+    {
+        s = nats_setError(NATS_SYS_ERROR, "pthread_mutexattr_settype error: %d",
+                          errno);
+    }
+
+    if ((s == NATS_OK)
+        && (pthread_mutex_init(m, &attr) != 0))
+    {
+        s = nats_setError(NATS_SYS_ERROR, "pthread_mutex_init error: %d",
+                          errno);
+    }
+
+    if (s == NATS_OK)
+        *newMutex = m;
+    else
+    {
+        NATS_FREE(m);
+        pthread_mutexattr_destroy(&attr);
+    }
+
+    return s;
+}
+
+bool
+natsMutex_TryLock(natsMutex *m)
+{
+    if (pthread_mutex_trylock(m) == 0)
+        return true;
+
+    return false;
+}
+
+void
+natsMutex_Lock(natsMutex *m)
+{
+#if !defined(NATS_NO_SPIN)
+    if (gLockSpinCount > 0)
+    {
+        int64_t attempts = 0;
+        while (pthread_mutex_trylock(m) != 0)
+        {
+            if (++attempts <= gLockSpinCount)
+            {
+                #if defined(__x86_64__) || \
+                    defined(__mips__)
+                    __asm__ __volatile__ ("pause" ::: "memory");
+                #elif (defined(__arm__) && __ARM_ARCH >=6) || \
+                      defined(__aarch64__)
+                    __asm__ __volatile__ ("yield" ::: "memory");
+                #elif defined(__powerpc__) || \
+                      defined(__powerpc64__)
+                    __asm__ __volatile__ ("or 27,27,27" ::: "memory");
+                #else
+                    usleep(0);
+                #endif
+            }
+            else
+            {
+                if (pthread_mutex_lock(m))
+                    abort();
+
+                break;
+            }
+        }
+    }
+    else
+#endif
+    {
+        if (pthread_mutex_lock(m))
+            abort();
+    }
+}
+
+
+void
+natsMutex_Unlock(natsMutex *m)
+{
+    if (pthread_mutex_unlock(m))
+        abort();
+}
+
+void
+natsMutex_Destroy(natsMutex *m)
+{
+    if (m == NULL)
+        return;
+
+    pthread_mutex_destroy(m);
+    NATS_FREE(m);
+}
diff --git a/src/unix/sock.c b/src/unix/sock.c
new file mode 100644 (file)
index 0000000..94e512c
--- /dev/null
@@ -0,0 +1,105 @@
+// Copyright 2015-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "../natsp.h"
+#include "../mem.h"
+#include "../comsock.h"
+
+void
+natsSys_Init(void)
+{
+    // Would do anything that needs to be initialized when
+    // the library loads, specific to unix.
+}
+
+natsStatus
+natsSock_WaitReady(int waitMode, natsSockCtx *ctx)
+{
+    natsDeadline    *deadline = &(ctx->writeDeadline);
+    struct pollfd   pfd;
+    int             timeout   = -1;
+    int             res;
+
+    pfd.fd = ctx->fd;
+    pfd.events = 0;
+    pfd.revents = 0;
+
+    switch (waitMode)
+    {
+        case WAIT_FOR_READ:
+            deadline = &(ctx->readDeadline);
+            pfd.events = POLLIN;
+            break;
+        case WAIT_FOR_WRITE:
+        case WAIT_FOR_CONNECT:
+            pfd.events = POLLOUT;
+            break;
+        default:
+            abort();
+    }
+
+    if (deadline != NULL)
+        timeout = natsDeadline_GetTimeout(deadline);
+
+    res = poll(&pfd, 1, timeout);
+    if (res == NATS_SOCK_ERROR)
+        return nats_setError(NATS_IO_ERROR, "poll error: %d", NATS_SOCK_GET_ERROR);
+    else if (res == 0)
+        return nats_setDefaultError(NATS_TIMEOUT);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsSock_SetBlocking(natsSock fd, bool blocking)
+{
+    int flags;
+
+    if ((flags = fcntl(fd, F_GETFL)) == -1)
+        return nats_setError(NATS_SYS_ERROR, "fcntl error: %d", errno);
+
+    if (blocking)
+        flags &= ~O_NONBLOCK;
+    else
+        flags |= O_NONBLOCK;
+
+    if (fcntl(fd, F_SETFL, flags) == -1)
+        return nats_setError(NATS_SYS_ERROR, "fcntl error: %d", errno);
+
+    return NATS_OK;
+}
+
+bool
+natsSock_IsConnected(natsSock fd)
+{
+    int         res;
+    int         error = 0;
+    socklen_t   errorLen = (socklen_t) sizeof(int);
+
+    res = getsockopt(fd, SOL_SOCKET, SO_ERROR, &error, &errorLen);
+    if ((res == NATS_SOCK_ERROR) || (error != 0))
+        return false;
+
+    return true;
+}
+
+natsStatus
+natsSock_Flush(natsSock fd)
+{
+    if (fsync(fd) != 0)
+        return nats_setError(NATS_IO_ERROR,
+                             "Error flushing socket. Error: %d",
+                             NATS_SOCK_GET_ERROR);
+
+    return NATS_OK;
+}
diff --git a/src/unix/thread.c b/src/unix/thread.c
new file mode 100644 (file)
index 0000000..2f77738
--- /dev/null
@@ -0,0 +1,183 @@
+// Copyright 2015-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "../natsp.h"
+#include "../mem.h"
+
+bool
+nats_InitOnce(natsInitOnceType *control, natsInitOnceCb cb)
+{
+    if (pthread_once(control, cb) != 0)
+        return false;
+
+    return true;
+}
+
+struct threadCtx
+{
+    natsThreadCb    entry;
+    void            *arg;
+};
+
+static void*
+_threadStart(void *arg)
+{
+    struct threadCtx *c = (struct threadCtx*) arg;
+
+    nats_setNATSThreadKey();
+
+    c->entry(c->arg);
+
+    NATS_FREE(c);
+
+    nats_ReleaseThreadMemory();
+    natsLib_Release();
+
+    return NULL;
+}
+
+natsStatus
+natsThread_Create(natsThread **thread, natsThreadCb cb, void *arg)
+{
+    struct threadCtx    *ctx = NULL;
+    natsThread          *t   = NULL;
+    natsStatus          s    = NATS_OK;
+    int                 err;
+
+    natsLib_Retain();
+    ctx = (struct threadCtx*) NATS_CALLOC(1, sizeof(*ctx));
+    t = (natsThread*) NATS_CALLOC(1, sizeof(natsThread));
+
+    if ((ctx == NULL) || (t == NULL))
+        s = nats_setDefaultError(NATS_NO_MEMORY);
+
+    if (s == NATS_OK)
+    {
+        ctx->entry  = cb;
+        ctx->arg    = arg;
+
+        err = pthread_create(t, NULL, _threadStart, ctx);
+        if (err)
+            s = nats_setError(NATS_SYS_ERROR,
+                              "pthread_create error: %d", errno);
+    }
+
+    if (s == NATS_OK)
+    {
+        *thread = t;
+    }
+    else
+    {
+        NATS_FREE(ctx);
+        NATS_FREE(t);
+        natsLib_Release();
+    }
+
+    return s;
+}
+
+void
+natsThread_Join(natsThread *t)
+{
+    // I think that 'join' should automatically detect if the call is made
+    // from the current thread. This simplify the use. That is, you don't
+    // need to do:
+    // if (!natsThread_IsCurrent(t))
+    //     natsThread_Join(t)
+
+    if (!natsThread_IsCurrent(t))
+    {
+        if (pthread_join(*t, NULL) != 0)
+            abort();
+    }
+    else
+    {
+        pthread_detach(*t);
+    }
+}
+
+void
+natsThread_Detach(natsThread *t)
+{
+    if (pthread_detach(*t) !=0)
+        abort();
+}
+
+bool
+natsThread_IsCurrent(natsThread *t)
+{
+    if (pthread_equal(pthread_self(), *t) == 0)
+        return false;
+
+    return true;
+}
+
+void
+natsThread_Yield(void)
+{
+    sched_yield();
+}
+
+void
+natsThread_Destroy(natsThread *t)
+{
+    if (t == NULL)
+        return;
+
+    NATS_FREE(t);
+}
+
+natsStatus
+natsThreadLocal_CreateKey(natsThreadLocal *tl, void (*destructor)(void*))
+{
+    int ret;
+
+    if ((ret = pthread_key_create(tl, destructor)) != 0)
+    {
+        return nats_setError(NATS_SYS_ERROR,
+                             "pthread_key_create error: %d", ret);
+    }
+
+    return NATS_OK;
+}
+
+void*
+natsThreadLocal_Get(natsThreadLocal tl)
+{
+    return pthread_getspecific(tl);
+}
+
+natsStatus
+natsThreadLocal_SetEx(natsThreadLocal tl, const void *value, bool setErr)
+{
+    int ret;
+
+    if ((ret = pthread_setspecific(tl, value)) != 0)
+    {
+        if (setErr)
+            return nats_setError(NATS_SYS_ERROR,
+                                 "pthread_setspecific: %d",
+                                 ret);
+        else
+            return NATS_SYS_ERROR;
+    }
+
+    return NATS_OK;
+}
+
+void
+natsThreadLocal_DestroyKey(natsThreadLocal tl)
+{
+    pthread_key_delete(tl);
+}
+
diff --git a/src/url.c b/src/url.c
new file mode 100644 (file)
index 0000000..4e5910d
--- /dev/null
+++ b/src/url.c
@@ -0,0 +1,188 @@
+// Copyright 2015-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "natsp.h"
+#include "util.h"
+
+#include <string.h>
+
+#include "mem.h"
+
+void
+natsUrl_Destroy(natsUrl *url)
+{
+    if (url == NULL)
+        return;
+
+    NATS_FREE(url->fullUrl);
+    NATS_FREE(url->host);
+    NATS_FREE(url->username);
+    NATS_FREE(url->password);
+    NATS_FREE(url);
+}
+
+static natsStatus
+_parsePort(int *port, const char *sport)
+{
+    natsStatus  s    = NATS_OK;
+    int64_t     n    = 0;
+
+    n = nats_ParseInt64(sport, (int) strlen(sport));
+    if ((n < 0) || (n > INT32_MAX))
+        s = nats_setError(NATS_INVALID_ARG, "invalid port '%s'", sport);
+    else
+        *port = (int) n;
+
+    return s;
+}
+
+natsStatus
+natsUrl_Create(natsUrl **newUrl, const char *urlStr)
+{
+    natsStatus  s      = NATS_OK;
+    char        *copy  = NULL;
+    char        *ptr   = NULL;
+    const char  *scheme= NULL;
+    const char  *user  = NULL;
+    const char  *pwd   = NULL;
+    const char  *host  = NULL;
+    const char  *port  = NULL;
+    const char  *path  = NULL;
+    natsUrl     *url   = NULL;
+
+    if (nats_IsStringEmpty(urlStr))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    url = (natsUrl*) NATS_CALLOC(1, sizeof(natsUrl));
+    if (url == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    s = nats_Trim(&copy, urlStr);
+
+    // Scheme
+    if (s == NATS_OK)
+    {
+        ptr = strstr(copy, "://");
+        if (ptr == NULL)
+        {
+            scheme = "nats";
+            ptr = copy;
+        }
+        else
+        {
+            *ptr = '\0';
+            scheme = (const char*) copy;
+            ptr += 3;
+        }
+    }
+    // User info
+    if (s == NATS_OK)
+    {
+        char *sep  = strrchr(ptr, '@');
+
+        if (sep != NULL)
+        {
+            host = (const char*) (sep+1);
+            *sep = '\0';
+
+            if (ptr != sep)
+            {
+                sep = strchr(ptr, ':');
+                if (sep != NULL)
+                {
+                    *sep = '\0';
+                    if (sep != ptr)
+                        user = (const char*) ptr;
+                    if (sep+1 != host)
+                        pwd = (const char*) (sep+1);
+                }
+                else
+                {
+                    user = (const char*) ptr;
+                }
+            }
+        }
+        else
+        {
+            host = (const char*) ptr;
+        }
+    }
+    // Host
+    if (s == NATS_OK)
+    {
+        // Search for end of IPv6 address (if applicable)
+        ptr = strrchr(host, ']');
+        if (ptr == NULL)
+            ptr = (char*) host;
+
+        // From that point, search for the last ':' character
+        ptr = strrchr(ptr, ':');
+        if (ptr != NULL)
+        {
+            *ptr = '\0';
+            port = (const char*) (ptr+1);
+        }
+        if (nats_IsStringEmpty(host))
+            host = "localhost";
+    }
+    // Port
+    if (s == NATS_OK)
+    {
+        if (port != NULL)
+        {
+            char *sep = strchr(port, '/');
+
+            if (sep != NULL)
+            {
+                *sep = '\0';
+                path = (const char*) (sep+1);
+            }
+        }
+        if (nats_IsStringEmpty(port))
+            url->port = 4222;
+        else
+            s = _parsePort(&url->port, port);
+    }
+    // Assemble everything
+    if (s == NATS_OK)
+    {
+        const char  *userval    = (nats_IsStringEmpty(user) ? "" : user);
+        const char  *usep       = (nats_IsStringEmpty(pwd) ? "" : ":");
+        const char  *pwdval     = (nats_IsStringEmpty(pwd) ? "" : pwd);
+        const char  *hsep       = (nats_IsStringEmpty(user) ? "" : "@");
+        const char  *pathsep    = (nats_IsStringEmpty(path) ? "" : "/");
+        const char  *pathval    = (nats_IsStringEmpty(path) ? "" : path);
+
+        DUP_STRING(s, url->host, host);
+
+        if (user != NULL)
+            IF_OK_DUP_STRING(s, url->username, user);
+        if (pwd != NULL)
+            IF_OK_DUP_STRING(s, url->password, pwd);
+
+        if ((s == NATS_OK) && nats_asprintf(&url->fullUrl, "%s://%s%s%s%s%s:%d%s%s",
+                scheme, userval, usep, pwdval, hsep, host, url->port, pathsep, pathval) < 0)
+        {
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+        }
+    }
+
+    NATS_FREE(copy);
+
+    if (s == NATS_OK)
+        *newUrl = url;
+    else
+        natsUrl_Destroy(url);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
diff --git a/src/url.h b/src/url.h
new file mode 100644 (file)
index 0000000..dd47f86
--- /dev/null
+++ b/src/url.h
@@ -0,0 +1,35 @@
+// Copyright 2015-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef URL_H_
+#define URL_H_
+
+#include "status.h"
+
+typedef struct __natsUrl
+{
+    char    *fullUrl;
+    char    *host;
+    int     port;
+    char    *username;
+    char    *password;
+
+} natsUrl;
+
+natsStatus
+natsUrl_Create(natsUrl **newUrl, const char *urlStr);
+
+void
+natsUrl_Destroy(natsUrl *url);
+
+#endif /* SRC_URL_H_ */
diff --git a/src/util.c b/src/util.c
new file mode 100644 (file)
index 0000000..33d07b6
--- /dev/null
@@ -0,0 +1,2284 @@
+// Copyright 2015-2021 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "natsp.h"
+
+#include <stdio.h>
+#include <stdarg.h>
+#include <string.h>
+#include <ctype.h>
+#include <time.h>
+
+#include "util.h"
+#include "mem.h"
+
+int jsonMaxNested = JSON_MAX_NEXTED;
+
+// A long double memory size is larger (or equal to) u/int64_t, so use that
+// as the maximum size of a num element in an array.
+#define JSON_MAX_NUM_SIZE   ((int) sizeof(long double))
+
+// Forward declarations due to recursive calls
+static natsStatus _jsonParse(nats_JSON **newJSON, int *parsedLen, const char *jsonStr, int jsonLen, int nested);
+static natsStatus _jsonParseValue(char **str, nats_JSONField *field, int nested);
+static void       _jsonFreeArray(nats_JSONArray *arr, bool freeObj);
+
+#define JSON_GET_AS(jt, t) \
+natsStatus      s      = NATS_OK;                       \
+nats_JSONField  *field = NULL;                          \
+s = nats_JSONGetField(json, fieldName, (jt), &field);   \
+if ((s == NATS_OK) && (field == NULL))                  \
+{                                                       \
+    *value = 0;                                         \
+    return NATS_OK;                                     \
+}                                                       \
+else if (s == NATS_OK)                                  \
+{                                                       \
+    switch (field->numTyp)                              \
+    {                                                   \
+        case TYPE_INT:                                  \
+            *value = (t)field->value.vint;  break;      \
+        case TYPE_UINT:                                 \
+            *value = (t)field->value.vuint; break;      \
+        default:                                        \
+            *value = (t)field->value.vdec;              \
+    }                                                   \
+}                                                       \
+return NATS_UPDATE_ERR_STACK(s);
+
+#define JSON_ARRAY_AS(t) \
+int i;                                              \
+t* values = (t*) NATS_CALLOC(arr->size, sizeof(t)); \
+if (values == NULL)                                 \
+    return nats_setDefaultError(NATS_NO_MEMORY);    \
+for (i=0; i<arr->size; i++)                         \
+    values[i] = ((t*) arr->values)[i];              \
+*array     = values;                                \
+*arraySize = arr->size;                             \
+return NATS_OK;
+
+#define JSON_ARRAY_AS_NUM(t) \
+int i;                                                          \
+t* values = (t*) NATS_CALLOC(arr->size, sizeof(t));             \
+if (values == NULL)                                             \
+    return nats_setDefaultError(NATS_NO_MEMORY);                \
+for (i=0; i<arr->size; i++)                                     \
+{                                                               \
+    void *ptr = NULL;                                           \
+    ptr = (void*) ((char*)(arr->values)+(i*JSON_MAX_NUM_SIZE)); \
+    values[i] = *(t*) ptr;                                      \
+}                                                               \
+*array     = values;                                            \
+*arraySize = arr->size;                                         \
+return NATS_OK;
+
+#define JSON_GET_ARRAY(t, f) \
+natsStatus      s      = NATS_OK;                           \
+nats_JSONField  *field = NULL;                              \
+s = nats_JSONGetArrayField(json, fieldName, (t), &field);   \
+if ((s == NATS_OK) && (field == NULL))                      \
+{                                                           \
+    *array      = NULL;                                     \
+    *arraySize  = 0;                                        \
+    return NATS_OK;                                         \
+}                                                           \
+else if (s == NATS_OK)                                      \
+    s = (f)(field->value.varr, array, arraySize);           \
+return NATS_UPDATE_ERR_STACK(s);
+
+
+#define ASCII_0 (48)
+#define ASCII_9 (57)
+
+static char base32DecodeMap[256];
+
+static const char *base64EncodeURL= "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
+static const char *base64EncodeStd= "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+static char        base64Padding  = '=';
+
+static int base64Ints[] = {
+    62, -1, -1, -1, 63, 52, 53, 54, 55, 56,
+    57, 58, 59, 60, 61, -1, -1, -1, -1, -1,
+    -1, -1,  0,  1,  2,  3,  4,  5,  6,  7,
+     8,  9, 10, 11, 12, 13, 14, 15, 16, 17,
+    18, 19, 20, 21, 22, 23, 24, 25, -1, -1,
+    -1, -1, -1, -1, 26, 27, 28, 29, 30, 31,
+    32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+    42, 43, 44, 45, 46, 47, 48, 49, 50, 51};
+
+
+// An implementation of crc16 according to CCITT standards for XMODEM.
+static uint16_t crc16tab[256] = {
+    0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7,
+    0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, 0xd1ad, 0xe1ce, 0xf1ef,
+    0x1231, 0x0210, 0x3273, 0x2252, 0x52b5, 0x4294, 0x72f7, 0x62d6,
+    0x9339, 0x8318, 0xb37b, 0xa35a, 0xd3bd, 0xc39c, 0xf3ff, 0xe3de,
+    0x2462, 0x3443, 0x0420, 0x1401, 0x64e6, 0x74c7, 0x44a4, 0x5485,
+    0xa56a, 0xb54b, 0x8528, 0x9509, 0xe5ee, 0xf5cf, 0xc5ac, 0xd58d,
+    0x3653, 0x2672, 0x1611, 0x0630, 0x76d7, 0x66f6, 0x5695, 0x46b4,
+    0xb75b, 0xa77a, 0x9719, 0x8738, 0xf7df, 0xe7fe, 0xd79d, 0xc7bc,
+    0x48c4, 0x58e5, 0x6886, 0x78a7, 0x0840, 0x1861, 0x2802, 0x3823,
+    0xc9cc, 0xd9ed, 0xe98e, 0xf9af, 0x8948, 0x9969, 0xa90a, 0xb92b,
+    0x5af5, 0x4ad4, 0x7ab7, 0x6a96, 0x1a71, 0x0a50, 0x3a33, 0x2a12,
+    0xdbfd, 0xcbdc, 0xfbbf, 0xeb9e, 0x9b79, 0x8b58, 0xbb3b, 0xab1a,
+    0x6ca6, 0x7c87, 0x4ce4, 0x5cc5, 0x2c22, 0x3c03, 0x0c60, 0x1c41,
+    0xedae, 0xfd8f, 0xcdec, 0xddcd, 0xad2a, 0xbd0b, 0x8d68, 0x9d49,
+    0x7e97, 0x6eb6, 0x5ed5, 0x4ef4, 0x3e13, 0x2e32, 0x1e51, 0x0e70,
+    0xff9f, 0xefbe, 0xdfdd, 0xcffc, 0xbf1b, 0xaf3a, 0x9f59, 0x8f78,
+    0x9188, 0x81a9, 0xb1ca, 0xa1eb, 0xd10c, 0xc12d, 0xf14e, 0xe16f,
+    0x1080, 0x00a1, 0x30c2, 0x20e3, 0x5004, 0x4025, 0x7046, 0x6067,
+    0x83b9, 0x9398, 0xa3fb, 0xb3da, 0xc33d, 0xd31c, 0xe37f, 0xf35e,
+    0x02b1, 0x1290, 0x22f3, 0x32d2, 0x4235, 0x5214, 0x6277, 0x7256,
+    0xb5ea, 0xa5cb, 0x95a8, 0x8589, 0xf56e, 0xe54f, 0xd52c, 0xc50d,
+    0x34e2, 0x24c3, 0x14a0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405,
+    0xa7db, 0xb7fa, 0x8799, 0x97b8, 0xe75f, 0xf77e, 0xc71d, 0xd73c,
+    0x26d3, 0x36f2, 0x0691, 0x16b0, 0x6657, 0x7676, 0x4615, 0x5634,
+    0xd94c, 0xc96d, 0xf90e, 0xe92f, 0x99c8, 0x89e9, 0xb98a, 0xa9ab,
+    0x5844, 0x4865, 0x7806, 0x6827, 0x18c0, 0x08e1, 0x3882, 0x28a3,
+    0xcb7d, 0xdb5c, 0xeb3f, 0xfb1e, 0x8bf9, 0x9bd8, 0xabbb, 0xbb9a,
+    0x4a75, 0x5a54, 0x6a37, 0x7a16, 0x0af1, 0x1ad0, 0x2ab3, 0x3a92,
+    0xfd2e, 0xed0f, 0xdd6c, 0xcd4d, 0xbdaa, 0xad8b, 0x9de8, 0x8dc9,
+    0x7c26, 0x6c07, 0x5c64, 0x4c45, 0x3ca2, 0x2c83, 0x1ce0, 0x0cc1,
+    0xef1f, 0xff3e, 0xcf5d, 0xdf7c, 0xaf9b, 0xbfba, 0x8fd9, 0x9ff8,
+    0x6e17, 0x7e36, 0x4e55, 0x5e74, 0x2e93, 0x3eb2, 0x0ed1, 0x1ef0,
+};
+
+// parseInt64 expects decimal positive numbers. We
+// return -1 to signal error
+int64_t
+nats_ParseInt64(const char *d, int dLen)
+{
+    int     i;
+    char    dec;
+    int64_t pn = 0;
+    int64_t n  = 0;
+
+    if (dLen == 0)
+        return -1;
+
+    for (i=0; i<dLen; i++)
+    {
+        dec = d[i];
+        if ((dec < ASCII_0) || (dec > ASCII_9))
+            return -1;
+
+        n = (n * 10) + (int64_t)(dec - ASCII_0);
+
+        // Check overflow..
+        if (n < pn)
+            return -1;
+
+        pn = n;
+    }
+
+    return n;
+}
+
+natsStatus
+nats_Trim(char **pres, const char *s)
+{
+    int     len    = 0;
+    char    *res   = NULL;
+    char    *ptr   = (char*) s;
+    char    *start = (char*) s;
+
+    while ((*ptr != '\0') && isspace(*ptr))
+        ptr++;
+
+    start = ptr;
+    ptr = (char*) (s + strlen(s) - 1);
+    while ((ptr != start) && isspace(*ptr))
+        ptr--;
+
+    // Compute len of trimmed string
+    len = (int) (ptr-start) + 1;
+
+    // Allocate for copy (add 1 for terminating 0)
+    res = NATS_MALLOC(len+1);
+    if (res == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    memcpy(res, start, (size_t) len);
+    res[len] = '\0';
+    *pres = res;
+
+    return NATS_OK;
+}
+
+natsStatus
+nats_ParseControl(natsControl *control, const char *line)
+{
+    natsStatus  s           = NATS_OK;
+    char        *tok        = NULL;
+    int         len         = 0;
+
+    if ((line == NULL) || (line[0] == '\0'))
+        return nats_setDefaultError(NATS_PROTOCOL_ERROR);
+
+    tok = strchr(line, (int) ' ');
+    if (tok == NULL)
+    {
+        control->op = NATS_STRDUP(line);
+        if (control->op == NULL)
+            return nats_setDefaultError(NATS_NO_MEMORY);
+
+        return NATS_OK;
+    }
+
+    len = (int) (tok - line);
+    control->op = NATS_MALLOC(len + 1);
+    if (control->op == NULL)
+    {
+        s = nats_setDefaultError(NATS_NO_MEMORY);
+    }
+    else
+    {
+        memcpy(control->op, line, len);
+        control->op[len] = '\0';
+    }
+
+    if (s == NATS_OK)
+    {
+        // Discard all spaces and the like in between the next token
+        while ((tok[0] != '\0')
+               && ((tok[0] == ' ')
+                   || (tok[0] == '\r')
+                   || (tok[0] == '\n')
+                   || (tok[0] == '\t')))
+        {
+            tok++;
+        }
+    }
+
+    // If there is a token...
+    if (tok[0] != '\0')
+    {
+        char *tmp;
+
+        len = (int) strlen(tok);
+        tmp = &(tok[len - 1]);
+
+        // Remove trailing spaces and the like.
+        while ((tmp[0] != '\0')
+                && ((tmp[0] == ' ')
+                    || (tmp[0] == '\r')
+                    || (tmp[0] == '\n')
+                    || (tmp[0] == '\t')))
+        {
+            tmp--;
+            len--;
+        }
+
+        // We are sure that len is > 0 because of the first while() loop.
+
+        control->args = NATS_MALLOC(len + 1);
+        if (control->args == NULL)
+        {
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+        }
+        else
+        {
+            memcpy(control->args, tok, len);
+            control->args[len] = '\0';
+        }
+    }
+
+    if (s != NATS_OK)
+    {
+        NATS_FREE(control->op);
+        control->op = NULL;
+
+        NATS_FREE(control->args);
+        control->args = NULL;
+    }
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+nats_CreateStringFromBuffer(char **newStr, natsBuffer *buf)
+{
+    char    *str = NULL;
+    int     len  = 0;
+
+    if ((buf == NULL) || ((len = natsBuf_Len(buf)) == 0))
+        return NATS_OK;
+
+    str = NATS_MALLOC(len + 1);
+    if (str == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    memcpy(str, natsBuf_Data(buf), len);
+    str[len] = '\0';
+
+    *newStr = str;
+
+    return NATS_OK;
+}
+
+void
+nats_Sleep(int64_t millisec)
+{
+#ifdef _WIN32
+    Sleep((DWORD) millisec);
+#else
+    usleep(millisec * 1000);
+#endif
+}
+
+const char*
+nats_GetBoolStr(bool value)
+{
+    if (value)
+        return "true";
+
+    return "false";
+}
+
+void
+nats_NormalizeErr(char *error)
+{
+    int start = 0;
+    int end   = 0;
+    int len   = (int) strlen(error);
+    int i;
+
+    if (strncmp(error, _ERR_OP_, _ERR_OP_LEN_) == 0)
+        start = _ERR_OP_LEN_;
+
+    for (i=start; i<len; i++)
+    {
+        if ((error[i] != ' ') && (error[i] != '\''))
+            break;
+    }
+
+    start = i;
+    if (start == len)
+    {
+        error[0] = '\0';
+        return;
+    }
+
+    for (end=len-1; end>0; end--)
+    {
+        char c = error[end];
+        if ((c == '\r') || (c == '\n') || (c == '\'') || (c == ' '))
+            continue;
+        break;
+    }
+
+    if (end <= start)
+    {
+        error[0] = '\0';
+        return;
+    }
+
+    len = end - start + 1;
+    memmove(error, error + start, len);
+    error[len] = '\0';
+}
+
+static natsStatus
+_jsonCreateField(nats_JSONField **newField, char *fieldName)
+{
+    nats_JSONField *field = NULL;
+
+    field = (nats_JSONField*) NATS_CALLOC(1, sizeof(nats_JSONField));
+    if (field == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    field->name = fieldName;
+    field->typ  = TYPE_NOT_SET;
+
+    *newField = field;
+
+    return NATS_OK;
+}
+
+static void
+_jsonFreeArray(nats_JSONArray *arr, bool freeObj)
+{
+    if (arr == NULL)
+        return;
+
+    if ((arr->typ == TYPE_OBJECT) || (arr->typ == TYPE_ARRAY))
+    {
+        int i;
+
+        for (i=0; i<arr->size; i++)
+        {
+            if (arr->typ == TYPE_OBJECT)
+            {
+                nats_JSON *fjson = ((nats_JSON**)arr->values)[i];
+                nats_JSONDestroy(fjson);
+            }
+            else
+            {
+                nats_JSONArray *farr = ((nats_JSONArray**)arr->values)[i];
+                _jsonFreeArray(farr, true);
+            }
+        }
+    }
+    NATS_FREE(arr->values);
+    if (freeObj)
+        NATS_FREE(arr);
+}
+
+static void
+_jsonFreeField(nats_JSONField *field)
+{
+    if (field->typ == TYPE_ARRAY)
+        _jsonFreeArray(field->value.varr, true);
+    else if (field->typ == TYPE_OBJECT)
+        nats_JSONDestroy(field->value.vobj);
+    NATS_FREE(field);
+}
+
+static char*
+_jsonTrimSpace(char *ptr)
+{
+    while ((*ptr != '\0')
+            && ((*ptr == ' ') || (*ptr == '\t') || (*ptr == '\r') || (*ptr == '\n')))
+    {
+        ptr += 1;
+    }
+    return ptr;
+}
+
+static natsStatus
+_decodeUni(char **iPtr, char *val)
+{
+    int     res = 0;
+    char    *i  = *iPtr;
+    int     j;
+
+    if (strlen(i) < 5)
+        return NATS_ERR;
+
+    i++;
+    for (j=0; j<4; j++)
+    {
+        char c = i[j];
+        if ((c >= '0') && (c <= '9'))
+            c = c - '0';
+        else if ((c >= 'a') && (c <= 'f'))
+            c = c - 'a' + 10;
+        else if ((c >= 'A') && (c <= 'F'))
+            c = c - 'A' + 10;
+        else
+            return NATS_ERR;
+
+               res = (res << 4) + c;
+       }
+    *val   = (char) res;
+    *iPtr += 5;
+
+    return NATS_OK;
+}
+
+static natsStatus
+_jsonGetStr(char **ptr, char **value)
+{
+    char *p = *ptr;
+    char *o = *ptr;
+
+    while ((*p != '\0') && (*p != '"'))
+    {
+        if (*p != '\\')
+        {
+            if (o != p)
+                *o = *p;
+            o++;
+            p++;
+            continue;
+        }
+        p++;
+        // Escaped character here...
+        if (*p == '\0')
+        {
+            *o = '\0';
+            return nats_setError(NATS_ERR,
+                                 "error parsing string '%s': invalid control character at the end",
+                                 o);
+        }
+        // based on what http://www.json.org/ says a string should be
+        switch (*p)
+        {
+            case 'b': *o++ = '\b'; break;
+            case 'f': *o++ = '\f'; break;
+            case 'n': *o++ = '\n'; break;
+            case 'r': *o++ = '\r'; break;
+            case 't': *o++ = '\t'; break;
+            case '"':
+            case '\\':
+            case '/':
+                *o++ = *p;
+                break;
+            case 'u':
+            {
+                char        val = 0;
+                natsStatus  s   = _decodeUni(&p, &val);
+                if (s != NATS_OK)
+                {
+                    return nats_setError(NATS_ERR,
+                                         "error parsing string '%s': invalid unicode character",
+                                         p);
+                }
+                *o++ = val;
+                p--;
+                break;
+            }
+            default:
+                return nats_setError(NATS_ERR,
+                                     "error parsing string '%s': invalid control character",
+                                     p);
+        }
+        p++;
+    }
+
+    if (*p != '\0')
+    {
+        *o = '\0';
+        *value = *ptr;
+        *ptr = (char*) (p + 1);
+        return NATS_OK;
+    }
+    return nats_setError(NATS_ERR,
+                         "error parsing string '%s': unexpected end of JSON input",
+                         *ptr);
+}
+
+static natsStatus
+_jsonGetNum(char **ptr, nats_JSONField *field)
+{
+    char        *p             = *ptr;
+    bool        expIsNegative  = false;
+    uint64_t    uintVal        = 0;
+    uint64_t    decVal         = 0;
+    uint64_t    decPower       = 1;
+    long double sign           = 1.0;
+    long double ePower         = 1.0;
+    int         decPCount      = 0;
+    int         numTyp         = 0;
+
+    while (isspace(*p))
+        p++;
+
+    sign = (*p == '-' ? -1.0 : 1.0);
+
+    if ((*p == '-') || (*p == '+'))
+        p++;
+
+    while (isdigit(*p))
+        uintVal = uintVal * 10 + (*p++ - '0');
+
+    if (*p == '.')
+    {
+        p++;
+        numTyp = TYPE_DOUBLE;
+    }
+
+    while (isdigit(*p))
+    {
+        decVal = decVal * 10 + (*p++ - '0');
+        decPower *= 10;
+        decPCount++;
+    }
+
+    if ((*p == 'e') || (*p == 'E'))
+    {
+        int64_t eVal = 0;
+
+        numTyp = TYPE_DOUBLE;
+
+        p++;
+
+        expIsNegative = (*p == '-' ? true : false);
+
+        if ((*p == '-') || (*p == '+'))
+            p++;
+
+        while (isdigit(*p))
+            eVal = eVal * 10 + (*p++ - '0');
+
+        if (expIsNegative)
+        {
+            if (decPower > 0)
+                ePower = (long double) decPower;
+        }
+        else
+        {
+            if (decPCount > eVal)
+            {
+                eVal = decPCount - eVal;
+                expIsNegative = true;
+            }
+            else
+            {
+                eVal -= decPCount;
+            }
+        }
+        while (eVal != 0)
+        {
+            ePower *= 10;
+            eVal--;
+        }
+    }
+
+    // If we don't end with a ' ', ',', ']', or '}', this is syntax error.
+    if ((*p != ' ') && (*p != ',') && (*p != '}') && (*p != ']'))
+        return nats_setError(NATS_ERR,
+                             "error parsing number '%s': missing separator or unexpected end of JSON input",
+                             *ptr);
+
+    if (numTyp == TYPE_DOUBLE)
+    {
+        long double res = 0.0;
+
+        if (decVal > 0)
+            res = sign * (long double) (uintVal * decPower + decVal);
+        else
+            res = sign * (long double) uintVal;
+
+        if (ePower > 1)
+        {
+            if (expIsNegative)
+                res /= ePower;
+            else
+                res *= ePower;
+        }
+        else if (decVal > 0)
+        {
+            res /= decPower;
+        }
+        field->value.vdec = res;
+    }
+    else if (sign < 0)
+    {
+        numTyp = TYPE_INT;
+        field->value.vint = -((int64_t) uintVal);
+    }
+    else
+    {
+        numTyp = TYPE_UINT;
+        field->value.vuint = uintVal;
+    }
+    *ptr = p;
+    field->numTyp = numTyp;
+    return NATS_OK;
+}
+
+static natsStatus
+_jsonGetBool(char **ptr, bool *val)
+{
+    if (strncmp(*ptr, "true", 4) == 0)
+    {
+        *val = true;
+        *ptr += 4;
+        return NATS_OK;
+    }
+    else if (strncmp(*ptr, "false", 5) == 0)
+    {
+        *val = false;
+        *ptr += 5;
+        return NATS_OK;
+    }
+    return nats_setError(NATS_ERR,
+                         "error parsing boolean, got: '%s'", *ptr);
+}
+
+static natsStatus
+_jsonGetArray(char **ptr, nats_JSONArray **newArray, int nested)
+{
+    natsStatus      s       = NATS_OK;
+    char            *p      = *ptr;
+    bool            end     = false;
+    int             typ     = TYPE_NOT_SET;
+    nats_JSONField  field;
+    nats_JSONArray  array;
+
+    if (nested >= jsonMaxNested)
+        return nats_setError(NATS_ERR, "json reached maximum nested arrays of %d", jsonMaxNested);
+
+    // Initialize our stack variable
+    memset(&array, 0, sizeof(nats_JSONArray));
+
+    while ((s == NATS_OK) && (*p != '\0'))
+    {
+        p = _jsonTrimSpace(p);
+
+        if ((typ == TYPE_NOT_SET) && (*p == ']'))
+        {
+            array.typ = TYPE_NULL;
+            end = true;
+            break;
+        }
+
+        // Initialize the field before parsing.
+        memset(&field, 0, sizeof(nats_JSONField));
+
+        s = _jsonParseValue(&p, &field, nested);
+        if (s == NATS_OK)
+        {
+            if (typ == TYPE_NOT_SET)
+            {
+                typ       = field.typ;
+                array.typ = field.typ;
+
+                // Set the element size based on type.
+                switch (typ)
+                {
+                    case TYPE_STR:      array.eltSize = sizeof(char*);              break;
+                    case TYPE_BOOL:     array.eltSize = sizeof(bool);               break;
+                    case TYPE_NUM:      array.eltSize = JSON_MAX_NUM_SIZE;          break;
+                    case TYPE_OBJECT:   array.eltSize = sizeof(nats_JSON*);         break;
+                    case TYPE_ARRAY:    array.eltSize = sizeof(nats_JSONArray*);    break;
+                    default:
+                        s = nats_setError(NATS_ERR,
+                                          "array of type %d not supported", typ);
+                }
+            }
+            else if (typ != field.typ)
+            {
+                s = nats_setError(NATS_ERR,
+                                  "array content of different types '%s'",
+                                  *ptr);
+            }
+        }
+        if (s != NATS_OK)
+            break;
+
+        if (array.size + 1 > array.cap)
+        {
+            char **newValues  = NULL;
+            int newCap      = 2 * array.cap;
+
+            if (newCap == 0)
+                newCap = 4;
+
+            newValues = (char**) NATS_REALLOC(array.values, newCap * array.eltSize);
+            if (newValues == NULL)
+            {
+                s = nats_setDefaultError(NATS_NO_MEMORY);
+                break;
+            }
+            array.values = (void**) newValues;
+            array.cap    = newCap;
+        }
+        // Set value based on type
+        switch (typ)
+        {
+            case TYPE_STR:
+                ((char**)array.values)[array.size++] = field.value.vstr;
+                break;
+            case TYPE_BOOL:
+                ((bool*)array.values)[array.size++] = field.value.vbool;
+                 break;
+            case TYPE_NUM:
+            {
+                void    *numPtr = NULL;
+                size_t  sz   = 0;
+
+                switch (field.numTyp)
+                {
+                    case TYPE_INT:
+                        numPtr = &(field.value.vint);
+                        sz     = sizeof(int64_t);
+                        break;
+                    case TYPE_UINT:
+                        numPtr = &(field.value.vuint);
+                        sz     = sizeof(uint64_t);
+                        break;
+                    default:
+                        numPtr = &(field.value.vdec);
+                        sz     = sizeof(long double);
+                }
+                memcpy((void*)(((char *)array.values)+(array.size*array.eltSize)), numPtr, sz);
+                array.size++;
+                break;
+            }
+            case TYPE_OBJECT:
+                ((nats_JSON**)array.values)[array.size++] = field.value.vobj;
+                break;
+            case TYPE_ARRAY:
+                ((nats_JSONArray**)array.values)[array.size++] = field.value.varr;
+                break;
+        }
+
+        p = _jsonTrimSpace(p);
+        if (*p == '\0')
+            break;
+
+        if (*p == ']')
+        {
+            end = true;
+            break;
+        }
+        else if (*p == ',')
+        {
+            p += 1;
+        }
+        else
+        {
+            s = nats_setError(NATS_ERR, "expected ',' got '%s'", p);
+        }
+    }
+    if ((s == NATS_OK) && !end)
+    {
+        s = nats_setError(NATS_ERR,
+                          "unexpected end of array: '%s'",
+                          (*p != '\0' ? p : "NULL"));
+    }
+    if (s == NATS_OK)
+    {
+        *newArray = NATS_MALLOC(sizeof(nats_JSONArray));
+        if (*newArray == NULL)
+        {
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+        }
+        else
+        {
+            memcpy(*newArray, &array, sizeof(nats_JSONArray));
+            *ptr = (char*) (p + 1);
+        }
+    }
+    if (s != NATS_OK)
+        _jsonFreeArray(&array, false);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+#define JSON_STATE_START        (0)
+#define JSON_STATE_NO_FIELD_YET (1)
+#define JSON_STATE_FIELD        (2)
+#define JSON_STATE_SEPARATOR    (3)
+#define JSON_STATE_VALUE        (4)
+#define JSON_STATE_NEXT_FIELD   (5)
+#define JSON_STATE_END          (6)
+
+static natsStatus
+_jsonParseValue(char **str, nats_JSONField *field, int nested)
+{
+    natsStatus  s    = NATS_OK;
+    char        *ptr = *str;
+
+    // Parsing value here. Determine the type based on first character.
+    if (*ptr == '"')
+    {
+        ptr += 1;
+        field->typ = TYPE_STR;
+        s = _jsonGetStr(&ptr, &field->value.vstr);
+    }
+    else if ((*ptr == 't') || (*ptr == 'f'))
+    {
+        field->typ = TYPE_BOOL;
+        s = _jsonGetBool(&ptr, &field->value.vbool);
+    }
+    else if (isdigit(*ptr) || (*ptr == '-'))
+    {
+        field->typ = TYPE_NUM;
+        s = _jsonGetNum(&ptr, field);
+    }
+    else if (*ptr == '[')
+    {
+        ptr += 1;
+        field->typ = TYPE_ARRAY;
+        s = _jsonGetArray(&ptr, &field->value.varr, nested+1);
+    }
+    else if (*ptr == '{')
+    {
+        nats_JSON   *object = NULL;
+        int         objLen  = 0;
+
+        ptr += 1;
+        field->typ = TYPE_OBJECT;
+        s = _jsonParse(&object, &objLen, ptr, -1, nested+1);
+        if (s == NATS_OK)
+        {
+            field->value.vobj = object;
+            ptr += objLen;
+        }
+    }
+    else if ((*ptr == 'n') && (strstr(ptr, "null") == ptr))
+    {
+        ptr += 4;
+        field->typ = TYPE_NULL;
+    }
+    else
+    {
+        s = nats_setError(NATS_ERR,
+                            "looking for value, got: '%s'", ptr);
+    }
+    if (s == NATS_OK)
+        *str = ptr;
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_jsonParse(nats_JSON **newJSON, int *parsedLen, const char *jsonStr, int jsonLen, int nested)
+{
+    natsStatus      s         = NATS_OK;
+    nats_JSON       *json     = NULL;
+    nats_JSONField  *field    = NULL;
+    void            *oldField = NULL;
+    char            *ptr;
+    char            *fieldName = NULL;
+    int             state;
+    char            *copyStr  = NULL;
+    bool            breakLoop = false;
+
+    if (parsedLen != NULL)
+        *parsedLen = 0;
+
+    if (nested >= jsonMaxNested)
+        return nats_setError(NATS_ERR, "json reached maximum nested objects of %d", jsonMaxNested);
+
+    if (jsonLen < 0)
+    {
+        if (jsonStr == NULL)
+            return nats_setDefaultError(NATS_INVALID_ARG);
+
+        jsonLen = (int) strlen(jsonStr);
+    }
+
+    json = NATS_CALLOC(1, sizeof(nats_JSON));
+    if (json == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    s = natsStrHash_Create(&(json->fields), 4);
+    if (s == NATS_OK)
+    {
+        json->str = NATS_MALLOC(jsonLen + 1);
+        if (json->str == NULL)
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+
+        if (s == NATS_OK)
+        {
+            memcpy(json->str, jsonStr, jsonLen);
+            json->str[jsonLen] = '\0';
+        }
+    }
+    if (s != NATS_OK)
+    {
+        nats_JSONDestroy(json);
+        return NATS_UPDATE_ERR_STACK(s);
+    }
+
+    ptr = json->str;
+    copyStr = NATS_STRDUP(ptr);
+    if (copyStr == NULL)
+    {
+        nats_JSONDestroy(json);
+        return nats_setDefaultError(NATS_NO_MEMORY);
+    }
+    state = (nested == 0 ? JSON_STATE_START : JSON_STATE_NO_FIELD_YET);
+
+    while ((s == NATS_OK) && (*ptr != '\0') && !breakLoop)
+    {
+        ptr = _jsonTrimSpace(ptr);
+        if (*ptr == '\0')
+            break;
+        switch (state)
+        {
+            case JSON_STATE_START:
+            {
+                // Should be the start of the JSON string
+                if (*ptr != '{')
+                {
+                    s = nats_setError(NATS_ERR, "incorrect JSON string: '%s'", ptr);
+                    break;
+                }
+                ptr += 1;
+                state = JSON_STATE_NO_FIELD_YET;
+                break;
+            }
+            case JSON_STATE_NO_FIELD_YET:
+            case JSON_STATE_FIELD:
+            {
+                // Check for end, which is valid only in state == JSON_STATE_NO_FIELD_YET
+                if (*ptr == '}')
+                {
+                    if (state == JSON_STATE_NO_FIELD_YET)
+                    {
+                        ptr += 1;
+                        state = JSON_STATE_END;
+                        break;
+                    }
+                    s = nats_setError(NATS_ERR,
+                                      "expected beginning of field, got: '%s'",
+                                      ptr);
+                    break;
+                }
+                // Check for
+                // Should be the first quote of a field name
+                if (*ptr != '"')
+                {
+                    s = nats_setError(NATS_ERR, "missing quote: '%s'", ptr);
+                    break;
+                }
+                ptr += 1;
+                s = _jsonGetStr(&ptr, &fieldName);
+                if (s != NATS_OK)
+                    break;
+                s = _jsonCreateField(&field, fieldName);
+                if (s != NATS_OK)
+                {
+                    NATS_UPDATE_ERR_STACK(s);
+                    break;
+                }
+                s = natsStrHash_Set(json->fields, fieldName, false, (void*) field, &oldField);
+                if (s != NATS_OK)
+                {
+                    NATS_UPDATE_ERR_STACK(s);
+                    break;
+                }
+                if (oldField != NULL)
+                {
+                    NATS_FREE(oldField);
+                    oldField = NULL;
+                }
+                state = JSON_STATE_SEPARATOR;
+                break;
+            }
+            case JSON_STATE_SEPARATOR:
+            {
+                // Should be the separation between field name and value.
+                if (*ptr != ':')
+                {
+                    s = nats_setError(NATS_ERR, "missing value for field '%s': '%s'", fieldName, ptr);
+                    break;
+                }
+                ptr += 1;
+                state = JSON_STATE_VALUE;
+                break;
+            }
+            case JSON_STATE_VALUE:
+            {
+                s = _jsonParseValue(&ptr, field, nested);
+                if (s == NATS_OK)
+                    state = JSON_STATE_NEXT_FIELD;
+                break;
+            }
+            case JSON_STATE_NEXT_FIELD:
+            {
+                // We should have a ',' separator or be at the end of the string
+                if ((*ptr != ',') && (*ptr != '}'))
+                {
+                    s =  nats_setError(NATS_ERR, "missing separator: '%s' (%s)", ptr, copyStr);
+                    break;
+                }
+                if (*ptr == ',')
+                    state = JSON_STATE_FIELD;
+                else
+                    state = JSON_STATE_END;
+                ptr += 1;
+                break;
+            }
+            case JSON_STATE_END:
+            {
+                if (nested > 0)
+                {
+                    breakLoop = true;
+                    break;
+                }
+                // If we are here it means that there was a character after the '}'
+                // so that's considered a failure.
+                s = nats_setError(NATS_ERR,
+                                  "invalid characters after end of JSON: '%s'",
+                                  ptr);
+                break;
+            }
+        }
+    }
+    if (s == NATS_OK)
+    {
+        if (state != JSON_STATE_END)
+            s = nats_setError(NATS_ERR, "%s", "JSON string not properly closed");
+    }
+    if (s == NATS_OK)
+    {
+        if (parsedLen != NULL)
+            *parsedLen = (int) (ptr - json->str);
+        *newJSON = json;
+    }
+    else
+        nats_JSONDestroy(json);
+
+    NATS_FREE(copyStr);
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+nats_JSONParse(nats_JSON **newJSON, const char *jsonStr, int jsonLen)
+{
+    natsStatus s = _jsonParse(newJSON, NULL, jsonStr, jsonLen, 0);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+nats_JSONGetField(nats_JSON *json, const char *fieldName, int fieldType, nats_JSONField **retField)
+{
+    nats_JSONField *field = NULL;
+
+    field = (nats_JSONField*) natsStrHash_Get(json->fields, (char*) fieldName);
+    if ((field == NULL) || (field->typ == TYPE_NULL))
+    {
+        *retField = NULL;
+        return NATS_OK;
+    }
+
+    // Check parsed type matches what is being asked.
+    switch (fieldType)
+    {
+        case TYPE_INT:
+        case TYPE_UINT:
+        case TYPE_DOUBLE:
+            if (field->typ != TYPE_NUM)
+                return nats_setError(NATS_INVALID_ARG,
+                                     "Asked for field '%s' as type %d, but got type %d when parsing",
+                                     field->name, fieldType, field->typ);
+            break;
+        case TYPE_BOOL:
+        case TYPE_STR:
+        case TYPE_OBJECT:
+            if (field->typ != fieldType)
+                return nats_setError(NATS_INVALID_ARG,
+                                     "Asked for field '%s' as type %d, but got type %d when parsing",
+                                     field->name, fieldType, field->typ);
+            break;
+        default:
+            return nats_setError(NATS_INVALID_ARG,
+                                 "Asked for field '%s' as type %d, but this type does not exist",
+                                 field->name, fieldType);
+    }
+    *retField = field;
+    return NATS_OK;
+}
+
+natsStatus
+nats_JSONGetStr(nats_JSON *json, const char *fieldName, char **value)
+{
+    natsStatus      s      = NATS_OK;
+    nats_JSONField  *field = NULL;
+
+    s = nats_JSONGetField(json, fieldName, TYPE_STR, &field);
+    if (s == NATS_OK)
+    {
+        if ((field == NULL) || (field->value.vstr == NULL))
+        {
+            *value = NULL;
+            return NATS_OK;
+        }
+        else
+        {
+            char *tmp = NATS_STRDUP(field->value.vstr);
+            if (tmp == NULL)
+                return nats_setDefaultError(NATS_NO_MEMORY);
+            *value = tmp;
+        }
+    }
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+nats_JSONGetStrPtr(nats_JSON *json, const char *fieldName, const char **str)
+{
+    natsStatus      s;
+    nats_JSONField  *field = NULL;
+
+    s = nats_JSONGetField(json, fieldName, TYPE_STR, &field);
+    if (s == NATS_OK)
+    {
+        if (field == NULL)
+            *str = NULL;
+        else
+            *str = field->value.vstr;
+    }
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+nats_JSONGetBytes(nats_JSON *json, const char *fieldName, unsigned char **value, int *len)
+{
+    natsStatus      s;
+    const char      *str = NULL;
+
+    *value = NULL;
+    *len   = 0;
+
+    s = nats_JSONGetStrPtr(json, fieldName, &str);
+    if ((s == NATS_OK) && (str != NULL))
+        s = nats_Base64_Decode(str, value, len);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+nats_JSONGetInt(nats_JSON *json, const char *fieldName, int *value)
+{
+    JSON_GET_AS(TYPE_INT, int);
+}
+
+natsStatus
+nats_JSONGetInt32(nats_JSON *json, const char *fieldName, int32_t *value)
+{
+    JSON_GET_AS(TYPE_INT, int32_t);
+}
+
+natsStatus
+nats_JSONGetUInt16(nats_JSON *json, const char *fieldName, uint16_t *value)
+{
+    JSON_GET_AS(TYPE_UINT, uint16_t);
+}
+
+natsStatus
+nats_JSONGetBool(nats_JSON *json, const char *fieldName, bool *value)
+{
+    natsStatus      s      = NATS_OK;
+    nats_JSONField  *field = NULL;
+
+    s = nats_JSONGetField(json, fieldName, TYPE_BOOL, &field);
+    if (s == NATS_OK)
+    {
+        *value = (field == NULL ? false : field->value.vbool);
+        return NATS_OK;
+    }
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+nats_JSONGetLong(nats_JSON *json, const char *fieldName, int64_t *value)
+{
+    JSON_GET_AS(TYPE_INT, int64_t);
+}
+
+natsStatus
+nats_JSONGetULong(nats_JSON *json, const char *fieldName, uint64_t *value)
+{
+    JSON_GET_AS(TYPE_UINT, uint64_t);
+}
+
+natsStatus
+nats_JSONGetDouble(nats_JSON *json, const char *fieldName, long double *value)
+{
+    JSON_GET_AS(TYPE_DOUBLE, long double);
+}
+
+natsStatus
+nats_JSONGetObject(nats_JSON *json, const char *fieldName, nats_JSON **value)
+{
+    natsStatus      s      = NATS_OK;
+    nats_JSONField  *field = NULL;
+
+    s = nats_JSONGetField(json, fieldName, TYPE_OBJECT, &field);
+    if (s == NATS_OK)
+    {
+        *value = (field == NULL ? NULL : field->value.vobj);
+        return NATS_OK;
+    }
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+nats_parseTime(char *orgStr, int64_t *timeUTC)
+{
+    natsStatus  s           = NATS_OK;
+    char        *dotPos     = NULL;
+    char        utcOff[7]   = {'\0'};
+    int64_t     nanosecs    = 0;
+    char        *p          = NULL;
+    char        timeStr[42] = {'\0'};
+    char        tmpStr[36]  = {'\0'};
+    char        *str        = NULL;
+    char        offSign     = '+';
+    int         offHours    = 0;
+    int         offMin      = 0;
+    int         i, l;
+    struct tm   tp;
+
+    // Check for "0"
+    if (strcmp(orgStr, "0001-01-01T00:00:00Z") == 0)
+    {
+        *timeUTC = 0;
+        return NATS_OK;
+    }
+
+    l = (int) strlen(orgStr);
+    // The smallest date/time should be: "YYYY:MM:DDTHH:MM:SSZ", which is 20
+    // while the longest should be: "YYYY:MM:DDTHH:MM:SS.123456789-12:34" which is 35
+    if ((l < 20) || (l > (int) (sizeof(tmpStr) - 1)))
+    {
+        if (l < 20)
+            s = nats_setError(NATS_INVALID_ARG, "time '%s' too small", orgStr);
+        else
+            s = nats_setError(NATS_INVALID_ARG, "time '%s' too long", orgStr);
+        return NATS_UPDATE_ERR_STACK(s);
+    }
+
+    // Copy the user provided string in our temporary buffer since we may alter
+    // the string as we parse.
+    snprintf(tmpStr, sizeof(tmpStr), "%s", orgStr);
+    str = (char*) tmpStr;
+    memset(&tp, 0, sizeof(struct tm));
+
+    // If ends with 'Z', the time is already UTC
+    if ((str[l-1] == 'Z') || (str[l-1] == 'z'))
+    {
+        // Set the timezone to "+00:00"
+        snprintf(utcOff, sizeof(utcOff), "%s", "+00:00");
+        str[l-1] = '\0';
+    }
+    else
+    {
+        // Make sure the UTC offset comes as "+12:34" (or "-12:34").
+        p = str+l-6;
+        if ((strlen(p) != 6) || ((*p != '+') && (*p != '-')) || (*(p+3) != ':'))
+        {
+            s = nats_setError(NATS_INVALID_ARG, "time '%s' has invalid UTC offset", orgStr);
+            return NATS_UPDATE_ERR_STACK(s);
+        }
+        snprintf(utcOff, sizeof(utcOff), "%s", p);
+        // Set end of 'str' to beginning of the offset.
+        *p = '\0';
+    }
+
+    // Check if there is below seconds precision
+    dotPos = strstr(str, ".");
+    if (dotPos != NULL)
+    {
+        int64_t val = 0;
+
+        p = (char*) (dotPos+1);
+        // Need to recompute the length, since it has changed.
+        l = (int) strlen(p);
+
+        val = nats_ParseInt64((const char*) p, l);
+        if (val == -1)
+        {
+            s = nats_setError(NATS_INVALID_ARG, "time '%s' is invalid", orgStr);
+            return NATS_UPDATE_ERR_STACK(s);
+        }
+
+        for (i=0; i<9-l; i++)
+            val *= 10;
+
+        if (val > 999999999)
+        {
+            s = nats_setError(NATS_INVALID_ARG, "time '%s' second fraction too big", orgStr);
+            return NATS_UPDATE_ERR_STACK(s);
+        }
+
+        nanosecs = val;
+        // Set end of string at the place of the '.'
+        *dotPos = '\0';
+    }
+
+    snprintf(timeStr, sizeof(timeStr), "%s%s", str, utcOff);
+    if (sscanf(timeStr, "%4d-%2d-%2dT%2d:%2d:%2d%c%2d:%2d",
+               &tp.tm_year, &tp.tm_mon, &tp.tm_mday, &tp.tm_hour, &tp.tm_min, &tp.tm_sec,
+               &offSign, &offHours, &offMin) == 9)
+    {
+        int64_t res = 0;
+        int64_t off = 0;
+
+        tp.tm_year -= 1900;
+        tp.tm_mon--;
+        tp.tm_isdst = 0;
+#ifdef _WIN32
+        res = (int64_t) _mkgmtime64(&tp);
+#else
+        res = (int64_t) timegm(&tp);
+#endif
+        if (res == -1)
+        {
+            s = nats_setError(NATS_ERR, "error parsing time '%s'", orgStr);
+            return NATS_UPDATE_ERR_STACK(s);
+        }
+        // Compute the offset
+        off = (int64_t) ((offHours * 60 * 60) + (offMin * 60));
+        // If UTC offset is positive, then we need to remove to get down to UTC time,
+        // where as if negative, we need to add the offset to get up to UTC time.
+        if (offSign == '+')
+            off *= (int64_t) -1;
+
+        res *= (int64_t) 1E9;
+        res += (off * (int64_t) 1E9);
+        res += nanosecs;
+        *timeUTC = res;
+    }
+    else
+    {
+        s = nats_setError(NATS_ERR, "error parsing time '%s'", orgStr);
+    }
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+nats_JSONGetTime(nats_JSON *json, const char *fieldName, int64_t *timeUTC)
+{
+    natsStatus  s           = NATS_OK;
+    char        *str        = NULL;
+
+    s = nats_JSONGetStr(json, fieldName, &str);
+    if ((s == NATS_OK) && (str == NULL))
+    {
+        *timeUTC = 0;
+        return NATS_OK;
+    }
+    else if (s != NATS_OK)
+        return NATS_UPDATE_ERR_STACK(s);
+
+    s = nats_parseTime(str, timeUTC);
+    NATS_FREE(str);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+nats_JSONGetArrayField(nats_JSON *json, const char *fieldName, int fieldType, nats_JSONField **retField)
+{
+    nats_JSONField  *field   = NULL;
+
+    field = (nats_JSONField*) natsStrHash_Get(json->fields, (char*) fieldName);
+    if ((field == NULL) || (field->typ == TYPE_NULL))
+    {
+        *retField = NULL;
+        return NATS_OK;
+    }
+
+    // Check parsed type matches what is being asked.
+    if (field->typ != TYPE_ARRAY)
+        return nats_setError(NATS_INVALID_ARG,
+                             "Field '%s' is not an array, it has type: %d",
+                             field->name, field->typ);
+    // If empty array, return NULL/OK
+    if (field->value.varr->typ == TYPE_NULL)
+    {
+        *retField = NULL;
+        return NATS_OK;
+    }
+    if (fieldType != field->value.varr->typ)
+        return nats_setError(NATS_INVALID_ARG,
+                             "Asked for field '%s' as an array of type: %d, but it is an array of type: %d",
+                             field->name, fieldType, field->typ);
+
+    *retField = field;
+    return NATS_OK;
+}
+
+natsStatus
+nats_JSONArrayAsStrings(nats_JSONArray *arr, char ***array, int *arraySize)
+{
+    natsStatus  s = NATS_OK;
+    int         i;
+
+    char **values = NATS_CALLOC(arr->size, arr->eltSize);
+    if (values == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    for (i=0; i<arr->size; i++)
+    {
+        values[i] = NATS_STRDUP((char*)(arr->values[i]));
+        if (values[i] == NULL)
+        {
+            s = nats_setDefaultError(NATS_NO_MEMORY);
+            break;
+        }
+    }
+    if (s != NATS_OK)
+    {
+        int j;
+
+        for (j=0; j<i; j++)
+            NATS_FREE(values[i]);
+
+        NATS_FREE(values);
+    }
+    else
+    {
+        *array     = values;
+        *arraySize = arr->size;
+    }
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+nats_JSONGetArrayStr(nats_JSON *json, const char *fieldName, char ***array, int *arraySize)
+{
+    JSON_GET_ARRAY(TYPE_STR, nats_JSONArrayAsStrings);
+}
+
+natsStatus
+nats_JSONArrayAsBools(nats_JSONArray *arr, bool **array, int *arraySize)
+{
+    JSON_ARRAY_AS(bool);
+}
+
+natsStatus
+nats_JSONGetArrayBool(nats_JSON *json, const char *fieldName, bool **array, int *arraySize)
+{
+    JSON_GET_ARRAY(TYPE_BOOL, nats_JSONArrayAsBools);
+}
+
+natsStatus
+nats_JSONArrayAsDoubles(nats_JSONArray *arr, long double **array, int *arraySize)
+{
+    JSON_ARRAY_AS_NUM(long double);
+}
+
+natsStatus
+nats_JSONGetArrayDouble(nats_JSON *json, const char *fieldName, long double **array, int *arraySize)
+{
+    JSON_GET_ARRAY(TYPE_NUM, nats_JSONArrayAsDoubles);
+}
+
+natsStatus
+nats_JSONArrayAsInts(nats_JSONArray *arr, int **array, int *arraySize)
+{
+    JSON_ARRAY_AS_NUM(int);
+}
+
+natsStatus
+nats_JSONGetArrayInt(nats_JSON *json, const char *fieldName, int **array, int *arraySize)
+{
+    JSON_GET_ARRAY(TYPE_NUM, nats_JSONArrayAsInts);
+}
+
+natsStatus
+nats_JSONArrayAsLongs(nats_JSONArray *arr, int64_t **array, int *arraySize)
+{
+    JSON_ARRAY_AS_NUM(int64_t);
+}
+
+natsStatus
+nats_JSONGetArrayLong(nats_JSON *json, const char *fieldName, int64_t **array, int *arraySize)
+{
+    JSON_GET_ARRAY(TYPE_NUM, nats_JSONArrayAsLongs);
+}
+
+natsStatus
+nats_JSONArrayAsULongs(nats_JSONArray *arr, uint64_t **array, int *arraySize)
+{
+    JSON_ARRAY_AS_NUM(uint64_t);
+}
+
+natsStatus
+nats_JSONGetArrayULong(nats_JSON *json, const char *fieldName, uint64_t **array, int *arraySize)
+{
+    JSON_GET_ARRAY(TYPE_NUM, nats_JSONArrayAsULongs);
+}
+
+natsStatus
+nats_JSONArrayAsObjects(nats_JSONArray *arr, nats_JSON ***array, int *arraySize)
+{
+    JSON_ARRAY_AS(nats_JSON*);
+}
+
+natsStatus
+nats_JSONGetArrayObject(nats_JSON *json, const char *fieldName, nats_JSON ***array, int *arraySize)
+{
+    JSON_GET_ARRAY(TYPE_OBJECT, nats_JSONArrayAsObjects);
+}
+
+natsStatus
+nats_JSONArrayAsArrays(nats_JSONArray *arr, nats_JSONArray ***array, int *arraySize)
+{
+    JSON_ARRAY_AS(nats_JSONArray*);
+}
+
+natsStatus
+nats_JSONGetArrayArray(nats_JSON *json, const char *fieldName, nats_JSONArray ***array, int *arraySize)
+{
+    JSON_GET_ARRAY(TYPE_ARRAY, nats_JSONArrayAsArrays);
+}
+
+natsStatus
+nats_JSONRange(nats_JSON *json, int expectedType, int expectedNumType, jsonRangeCB cb, void *userInfo)
+{
+    natsStrHashIter iter;
+    char            *fname  = NULL;
+    void            *val    = NULL;
+    natsStatus      s       = NATS_OK;
+
+    natsStrHashIter_Init(&iter, json->fields);
+    while ((s == NATS_OK) && natsStrHashIter_Next(&iter, &fname, &val))
+    {
+        nats_JSONField *f = (nats_JSONField*) val;
+
+        if (f->typ != expectedType)
+            s = nats_setError(NATS_ERR, "field '%s': expected value type of %d, got %d",
+                              f->name, expectedType, f->typ);
+        else if ((f->typ == TYPE_NUM) && (f->numTyp != expectedNumType))
+            s = nats_setError(NATS_ERR, "field '%s': expected numeric type of %d, got %d",
+                              f->name, expectedNumType, f->numTyp);
+        else
+            s = cb(userInfo, (const char*) f->name, f);
+    }
+    natsStrHashIter_Done(&iter);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+void
+nats_JSONDestroy(nats_JSON *json)
+{
+    natsStrHashIter iter;
+    void            *field = NULL;
+
+    if (json == NULL)
+        return;
+
+    natsStrHashIter_Init(&iter, json->fields);
+    while (natsStrHashIter_Next(&iter, NULL, &field))
+    {
+        natsStrHashIter_RemoveCurrent(&iter);
+        _jsonFreeField((nats_JSONField*) field);
+    }
+    natsStrHash_Destroy(json->fields);
+    NATS_FREE(json->str);
+    NATS_FREE(json);
+}
+
+natsStatus
+nats_EncodeTimeUTC(char *buf, size_t bufLen, int64_t timeUTC)
+{
+    int64_t     t  = timeUTC / (int64_t) 1E9;
+    int64_t     ns = timeUTC - ((int64_t) t * (int64_t) 1E9);
+    struct tm   tp;
+    int         n;
+
+    // We will encode at most: "YYYY:MM:DDTHH:MM:SS.123456789+12:34"
+    // so we need at least 35+1 characters.
+    if (bufLen < 36)
+        return nats_setError(NATS_INVALID_ARG,
+                             "buffer to encode UTC time is too small (%d), needs 36",
+                             (int) bufLen);
+
+    if (timeUTC == 0)
+    {
+        snprintf(buf, bufLen, "%s", "0001-01-01T00:00:00Z");
+        return NATS_OK;
+    }
+
+    memset(&tp, 0, sizeof(struct tm));
+#ifdef _WIN32
+    _gmtime64_s(&tp, (const __time64_t*) &t);
+#else
+    gmtime_r((const time_t*) &t, &tp);
+#endif
+    n = (int) strftime(buf, bufLen, "%FT%T", &tp);
+    if (n == 0)
+        return nats_setDefaultError(NATS_ERR);
+
+    if (ns > 0)
+    {
+        char nsBuf[15];
+        int i, nd;
+
+        nd = snprintf(nsBuf, sizeof(nsBuf), ".%" PRId64, ns);
+        for (; (nd > 0) && (nsBuf[nd-1] == '0'); )
+            nd--;
+
+        for (i=0; i<nd; i++)
+            *(buf+n++) = nsBuf[i];
+    }
+    *(buf+n) = 'Z';
+    *(buf+n+1) = '\0';
+
+    return NATS_OK;
+}
+
+void
+nats_Base32_Init(void)
+{
+    const char  *alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";
+    int         alphaLen  = (int) strlen(alphabet);
+    int         i;
+
+    for (i=0; i<(int)sizeof(base32DecodeMap); i++)
+        base32DecodeMap[i] = (char) 0xFF;
+
+    for (i=0; i<alphaLen; i++)
+        base32DecodeMap[(int)alphabet[i]] = (char) i;
+}
+
+natsStatus
+nats_Base32_DecodeString(const char *src, char *dst, int dstMax, int *dstLen)
+{
+    char        *ptr      = (char*) src;
+    int         n         = 0;
+    bool        done      = false;
+    int         srcLen    = (int) strlen(src);
+    int         remaining = srcLen;
+
+    *dstLen = 0;
+
+    while (remaining > 0)
+    {
+        char dbuf[8];
+        int  dLen = 8;
+        int  j;
+        int  needs;
+
+        for (j=0; j<8; )
+        {
+            int in;
+
+            if (remaining == 0)
+            {
+                dLen = j;
+                done  = true;
+                break;
+            }
+
+            in = (int) *ptr;
+            ptr++;
+            remaining--;
+
+            dbuf[j] = base32DecodeMap[in];
+            // If invalid character, report the position but as the number of character
+            // since beginning, not array index.
+            if (dbuf[j] == (char) 0xFF)
+                return nats_setError(NATS_ERR, "base32: invalid data at location %d", srcLen - remaining);
+            j++;
+        }
+
+        needs = 0;
+        switch (dLen)
+        {
+            case 8: needs = 5; break;
+            case 7: needs = 4; break;
+            case 5: needs = 3; break;
+            case 4: needs = 2; break;
+            case 2: needs = 1; break;
+        }
+        if (n+needs > dstMax)
+            return nats_setError(NATS_INSUFFICIENT_BUFFER, "based32: needs %d bytes, max is %d", n+needs, dstMax);
+
+        if (dLen == 8)
+            dst[4] = dbuf[6]<<5 | dbuf[7];
+        if (dLen >= 7)
+            dst[3] = dbuf[4]<<7 | dbuf[5]<<2 | dbuf[6]>>3;
+        if (dLen >= 5)
+            dst[2] = dbuf[3]<<4 | dbuf[4]>>1;
+        if (dLen >= 4)
+            dst[1] = dbuf[1]<<6 | dbuf[2]<<1 | dbuf[3]>>4;
+        if (dLen >= 2)
+            dst[0] = dbuf[0]<<3 | dbuf[1]>>2;
+
+        n += needs;
+
+        if (!done)
+            dst += 5;
+    }
+
+    *dstLen = n;
+
+    return NATS_OK;
+}
+
+static natsStatus
+_base64Encode(const char *map, bool padding, const unsigned char *src, int srcLen, char **pDest)
+{
+    char        *dst   = NULL;
+    int         dstLen = 0;
+    int         n;
+    int         di = 0;
+    int         si = 0;
+    int         remain = 0;
+    uint32_t    val = 0;
+
+    *pDest = NULL;
+
+    if ((src == NULL) || (src[0] == '\0'))
+        return NATS_OK;
+
+    n = srcLen;
+    if (padding)
+        dstLen = (n + 2) / 3 * 4;
+    else
+        dstLen = (n * 8 + 5) / 6;
+    dst = NATS_CALLOC(1, dstLen + 1);
+    if (dst == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    n = ((srcLen / 3) * 3);
+    for (si = 0; si < n; )
+    {
+        // Convert 3x 8bit source bytes into 4 bytes
+        val = (uint32_t)(src[si+0])<<16 | (uint32_t)(src[si+1])<<8 | (uint32_t)(src[si+2]);
+
+        dst[di+0] = map[val >> 18 & 0x3F];
+        dst[di+1] = map[val >> 12 & 0x3F];
+        dst[di+2] = map[val >>  6 & 0x3F];
+        dst[di+3] = map[val       & 0x3F];
+
+        si += 3;
+        di += 4;
+    }
+
+    remain = srcLen - si;
+    if (remain == 0)
+    {
+        *pDest = dst;
+        return NATS_OK;
+    }
+
+    // Add the remaining small block
+    val = (uint32_t)src[si+0] << 16;
+    if (remain == 2)
+        val |= (uint32_t)src[si+1] << 8;
+
+    dst[di+0] = map[val >> 18 & 0x3F];
+    dst[di+1] = map[val >> 12 & 0x3F];
+
+    if (remain == 2)
+    {
+        dst[di+2] = map[val >> 6 & 0x3F];
+        if (padding)
+            dst[di+3] = base64Padding;
+    }
+    else if (padding && (remain == 1))
+    {
+        dst[di+2] = base64Padding;
+        dst[di+3] = base64Padding;
+    }
+
+    *pDest = dst;
+
+    return NATS_OK;
+}
+
+natsStatus
+nats_Base64RawURL_EncodeString(const unsigned char *src, int srcLen, char **pDest)
+{
+    natsStatus s = _base64Encode(base64EncodeURL, false, src, srcLen, pDest);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+nats_Base64_Encode(const unsigned char *src, int srcLen, char **pDest)
+{
+    natsStatus s = _base64Encode(base64EncodeStd, true, src, srcLen, pDest);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static bool
+_base64IsValidChar(char c, bool paddingOk)
+{
+    if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')
+        || (c >= '0' && c <= '9') || c == '+' || c == '/')
+    {
+        return true;
+    }
+    if (c == base64Padding && paddingOk)
+        return true;
+    return false;
+}
+
+natsStatus
+nats_Base64_DecodeLen(const char *src, int *srcLen, int *dstLen)
+{
+    int l;
+    int dl;
+    int i;
+
+    if (nats_IsStringEmpty(src))
+        return nats_setError(NATS_INVALID_ARG, "%s", "base64 content cannot be empty");
+
+    l = (int) strlen(src);
+    if (l % 4 != 0)
+        return nats_setError(NATS_INVALID_ARG, "invalid base64 length: %d", l);
+
+    dl = l / 4 * 3;
+    for (i=0; i<l; i++)
+    {
+        if (!_base64IsValidChar(src[i], i>=l-2))
+            return nats_setError(NATS_INVALID_ARG, "invalid base64 character: '%c'", src[i]);
+
+        if (src[i] == base64Padding)
+            dl--;
+    }
+
+    *srcLen = l;
+    *dstLen = dl;
+    return NATS_OK;
+}
+
+void
+nats_Base64_DecodeInPlace(const char *src, int l, unsigned char *dst)
+{
+    int i, j, v;
+
+    for (i=0, j=0; i<l; i+=4, j+=3)
+    {
+        v = base64Ints[src[i]-43];
+        v = (v << 6) | base64Ints[src[i+1]-43];
+        v = (src[i+2] == base64Padding ? v << 6 : (v << 6) | base64Ints[src[i+2]-43]);
+        v = (src[i+3] == base64Padding ? v << 6 : (v << 6) | base64Ints[src[i+3]-43]);
+
+        dst[j] = (v >> 16) & 0xFF;
+        if (src[i+2] != base64Padding)
+            dst[j+1] = (v >> 8) & 0xFF;
+        if (src[i+3] != base64Padding)
+            dst[j+2] = v & 0xFF;
+    }
+}
+
+natsStatus
+nats_Base64_Decode(const char *src, unsigned char **dst, int *dstLen)
+{
+    natsStatus  s;
+    int         sl = 0;
+
+    *dst = NULL;
+    *dstLen = 0;
+
+    s = nats_Base64_DecodeLen(src, &sl, dstLen);
+    if (s == NATS_OK)
+    {
+        *dst = (unsigned char*) NATS_MALLOC(*dstLen);
+        if (*dst == NULL)
+        {
+            *dstLen = 0;
+            return nats_setDefaultError(NATS_NO_MEMORY);
+        }
+        nats_Base64_DecodeInPlace(src, sl, *dst);
+    }
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+// Returns the 2-byte crc for the data provided.
+uint16_t
+nats_CRC16_Compute(unsigned char *data, int len)
+{
+    uint16_t    crc = 0;
+    int         i;
+
+    for (i=0; i<len; i++)
+        crc = ((crc << 8) & 0xFFFF) ^ crc16tab[((crc>>8)^(uint16_t)(data[i]))&0x00FF];
+
+    return crc;
+}
+
+// Checks the calculated crc16 checksum for data against the expected.
+bool
+nats_CRC16_Validate(unsigned char *data, int len, uint16_t expected)
+{
+    uint16_t crc = nats_CRC16_Compute(data, len);
+    return crc == expected;
+}
+
+natsStatus
+nats_ReadFile(natsBuffer **buffer, int initBufSize, const char *fn)
+{
+    natsStatus  s;
+    FILE        *f      = NULL;
+    natsBuffer  *buf    = NULL;
+    char        *ptr    = NULL;
+    int         total   = 0;
+
+    if ((initBufSize <= 0) || nats_IsStringEmpty(fn))
+        return nats_setDefaultError(NATS_INVALID_ARG);
+
+    f = fopen(fn, "r");
+    if (f == NULL)
+        return nats_setError(NATS_ERR, "error opening file '%s': %s", fn, strerror(errno));
+
+    s = natsBuf_Create(&buf, initBufSize);
+    if (s == NATS_OK)
+        ptr = natsBuf_Data(buf);
+    while (s == NATS_OK)
+    {
+        int r = (int) fread(ptr, 1, (size_t) natsBuf_Available(buf), f);
+        if (r == 0)
+            break;
+
+        total += r;
+        natsBuf_MoveTo(buf, total);
+        if (natsBuf_Available(buf) == 0)
+            s = natsBuf_Expand(buf, natsBuf_Capacity(buf)*2);
+        if (s == NATS_OK)
+            ptr = natsBuf_Data(buf) + total;
+    }
+
+    // Close file. If there was an error, do not report possible closing error
+    // as the actual error
+    if (s != NATS_OK)
+        fclose(f);
+    else if (fclose(f) != 0)
+        s = nats_setError(NATS_ERR, "error closing file '%s': '%s", fn, strerror(errno));
+
+    IFOK(s, natsBuf_AppendByte(buf, '\0'));
+
+    if (s == NATS_OK)
+    {
+        *buffer = buf;
+    }
+    else if (buf != NULL)
+    {
+        memset(natsBuf_Data(buf), 0, natsBuf_Capacity(buf));
+        natsBuf_Destroy(buf);
+    }
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+void
+nats_FreeAddrInfo(struct addrinfo *res)
+{
+    // Calling freeaddrinfo(NULL) is undefined behavior.
+    if (res == NULL)
+        return;
+
+    freeaddrinfo(res);
+}
+
+bool
+nats_HostIsIP(const char *host)
+{
+    struct addrinfo hint;
+    struct addrinfo *res = NULL;
+    bool            isIP = true;
+
+    memset(&hint, '\0', sizeof hint);
+
+    hint.ai_family = PF_UNSPEC;
+    hint.ai_flags = AI_NUMERICHOST;
+
+    if (getaddrinfo(host, NULL, &hint, &res) != 0)
+        isIP = false;
+
+    nats_FreeAddrInfo(res);
+
+    return isIP;
+}
+
+static bool
+_isLineAnHeader(const char *ptr)
+{
+    char    *last   = NULL;
+    int     len     = 0;
+    int     count   = 0;
+    bool    done    = false;
+
+    // We are looking for a header. Based on the Go client's regex,
+    // the strict requirement is that it ends with at least 3 consecutive
+    // `-` characters. It must also have 3 consecutive `-` before that.
+    // So the minimum size would be 6.
+    len = (int) strlen(ptr);
+    if (len < 6)
+        return false;
+
+    // First make sure that we have at least 3 `-` at the end.
+    last = (char*) (ptr + len - 1);
+
+    while ((*last == '-') && (last != ptr))
+    {
+        count++;
+        last--;
+        if (count == 3)
+            break;
+    }
+    if (count != 3)
+        return false;
+
+    // Now from that point and going backward, we consider
+    // to have proper header if we find again 3 consecutive
+    // dashes.
+    count = 0;
+    while (!done)
+    {
+        if (*last == '-')
+        {
+            // We have at least `---`, we are done.
+            if (++count == 3)
+                return true;
+        }
+        else
+        {
+            // Reset.. we need 3 consecutive dashes
+            count = 0;
+        }
+        if (last == ptr)
+            done = true;
+        else
+            last--;
+    }
+    // If we are here, it means we did not find `---`
+    return false;
+}
+
+natsStatus
+nats_GetJWTOrSeed(char **val, const char *content, int item)
+{
+    natsStatus  s       = NATS_OK;
+    char        *pch    = NULL;
+    char        *str    = NULL;
+    char        *saved  = NULL;
+    int         curItem = 0;
+    int         orgLen  = 0;
+    char        *nt     = NULL;
+
+    // First, make a copy of the original content since
+    // we are going to call strtok on it, which alters it.
+    str = NATS_STRDUP(content);
+    if (str == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    orgLen = (int) strlen(str);
+
+    pch = nats_strtok(str, "\n", &nt);
+    while (pch != NULL)
+    {
+        if (_isLineAnHeader(pch))
+        {
+            // We got the start of the section. Save the next line
+            // as the possible returned value if the following line
+            // is a header too.
+            pch = nats_strtok(NULL, "\n", &nt);
+            saved = pch;
+
+            while (pch != NULL)
+            {
+                pch = nats_strtok(NULL, "\n", &nt);
+                if (pch == NULL)
+                    break;
+
+                // We tolerate empty string(s).
+                if (*pch == '\0')
+                    continue;
+
+                break;
+            }
+            if (pch == NULL)
+                break;
+
+            if (_isLineAnHeader(pch))
+            {
+                // Is this the item we were looking for?
+                if (curItem == item)
+                {
+                    // Return a copy of the saved line
+                    *val = NATS_STRDUP(saved);
+                    if (*val == NULL)
+                        s = nats_setDefaultError(NATS_NO_MEMORY);
+
+                    break;
+                }
+                else if (++curItem > 1)
+                {
+                    break;
+                }
+            }
+        }
+        pch = nats_strtok(NULL, "\n", &nt);
+    }
+
+    memset(str, 0, orgLen);
+    NATS_FREE(str);
+
+    // Nothing was found, return NATS_NOT_FOUND but don't set the stack error.
+    if ((s == NATS_OK) && (*val == NULL))
+        return NATS_NOT_FOUND;
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+static natsStatus
+_marshalLongVal(natsBuffer *buf, bool comma, const char *fieldName, bool l, int64_t lval, uint64_t uval)
+{
+    natsStatus  s = NATS_OK;
+    char        temp[32];
+    const char  *start = (comma ? ",\"" : "\"");
+
+    if (l)
+        snprintf(temp, sizeof(temp), "%" PRId64, lval);
+    else
+        snprintf(temp, sizeof(temp), "%" PRIi64, uval);
+
+    s = natsBuf_Append(buf, start, -1);
+    IFOK(s, natsBuf_Append(buf, fieldName, -1));
+    IFOK(s, natsBuf_Append(buf, "\":", -1));
+    IFOK(s, natsBuf_Append(buf, temp, -1));
+
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+nats_marshalLong(natsBuffer *buf, bool comma, const char *fieldName, int64_t lval)
+{
+    natsStatus s = _marshalLongVal(buf, comma, fieldName, true, lval, 0);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+natsStatus
+nats_marshalULong(natsBuffer *buf, bool comma, const char *fieldName, uint64_t uval)
+{
+    natsStatus s = _marshalLongVal(buf, comma, fieldName, false, 0, uval);
+    return NATS_UPDATE_ERR_STACK(s);
+}
+
+
+bool
+nats_IsSubjectValid(const char *subject, bool wcAllowed)
+{
+    int     i       = 0;
+    int     len     = 0;
+    int     lastDot = -1;
+    char    c;
+
+    if (nats_IsStringEmpty(subject))
+        return false;
+
+    len = (int) strlen(subject);
+    for (i=0; i<len ; i++)
+    {
+        c = subject[i];
+        if (isspace(c))
+            return false;
+
+        if (c == '.')
+        {
+            if ((i == len-1) || (i == lastDot+1))
+                return false;
+
+            // If the last token was 1 character long...
+            if (i == lastDot+2)
+            {
+                char prevToken = subject[i-1];
+
+                // If that token was `>`, then it is not a valid subject,
+                // regardless if wildcards are allowed or not.
+                if (prevToken == '>')
+                    return false;
+                else if (!wcAllowed && (prevToken == '*'))
+                    return false;
+            }
+
+            lastDot = i;
+        }
+
+        // Check the last character to see if it is a wildcard. Others
+        // are handled when processing the next '.' character (since
+        // if not a token of their own, they are not considered wildcards).
+        if (i == len-1)
+        {
+            // If they are a token of their own, that is, the preceeding
+            // character is the `.` or they are the first and only character,
+            // then the result will depend if wilcards are allowed or not.
+            if (((c == '>') || (c == '*')) && (i == lastDot+1))
+                return wcAllowed;
+        }
+    }
+    return true;
+}
diff --git a/src/util.h b/src/util.h
new file mode 100644 (file)
index 0000000..d8a3f3b
--- /dev/null
@@ -0,0 +1,249 @@
+// Copyright 2015-2021 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef UTIL_H_
+#define UTIL_H_
+
+#include "natsp.h"
+
+#define JSON_MAX_NEXTED 100
+
+extern int jsonMaxNested;
+
+#define TYPE_NOT_SET    (0)
+#define TYPE_STR        (1)
+#define TYPE_BOOL       (2)
+#define TYPE_NUM        (3)
+#define TYPE_INT        (4)
+#define TYPE_UINT       (5)
+#define TYPE_DOUBLE     (6)
+#define TYPE_ARRAY      (7)
+#define TYPE_OBJECT     (8)
+#define TYPE_NULL       (9)
+
+typedef struct
+{
+    void    **values;
+    int     typ;
+    int     eltSize;
+    int     size;
+    int     cap;
+
+} nats_JSONArray;
+
+typedef struct
+{
+    char        *str;
+    natsStrHash *fields;
+
+} nats_JSON;
+
+typedef struct
+{
+    char    *name;
+    int     typ;
+    union
+    {
+            char            *vstr;
+            bool            vbool;
+            uint64_t        vuint;
+            int64_t         vint;
+            long double     vdec;
+            nats_JSONArray  *varr;
+            nats_JSON       *vobj;
+    } value;
+    int     numTyp;
+
+} nats_JSONField;
+
+typedef natsStatus (*jsonRangeCB)(void *userInfo, const char *fieldName, nats_JSONField *f);
+
+#define snprintf_truncate(d, szd, f, ...) if (snprintf((d), (szd), (f), __VA_ARGS__) >= (int) (szd)) { \
+    int offset = (int) (szd) - 2;         \
+    if (offset > 0) (d)[offset--] = '.';  \
+    if (offset > 0) (d)[offset--] = '.';  \
+    if (offset > 0) (d)[offset--] = '.';  \
+}
+
+int64_t
+nats_ParseInt64(const char *d, int dLen);
+
+natsStatus
+nats_Trim(char **pres, const char *s);
+
+natsStatus
+nats_ParseControl(natsControl *control, const char *line);
+
+natsStatus
+nats_CreateStringFromBuffer(char **newStr, natsBuffer *buf);
+
+const char*
+nats_GetBoolStr(bool value);
+
+void
+nats_NormalizeErr(char *error);
+
+natsStatus
+nats_JSONParse(nats_JSON **json, const char *str, int strLen);
+
+natsStatus
+nats_JSONGetField(nats_JSON *json, const char *fieldName, int fieldType, nats_JSONField **retField);
+
+natsStatus
+nats_JSONGetStr(nats_JSON *json, const char *fieldName, char **value);
+
+natsStatus
+nats_JSONGetStrPtr(nats_JSON *json, const char *fieldName, const char **str);
+
+natsStatus
+nats_JSONGetBytes(nats_JSON *json, const char *fieldName, unsigned char **value, int *len);
+
+natsStatus
+nats_JSONGetInt(nats_JSON *json, const char *fieldName, int *value);
+
+natsStatus
+nats_JSONGetInt32(nats_JSON *json, const char *fieldName, int32_t *value);
+
+natsStatus
+nats_JSONGetUInt16(nats_JSON *json, const char *fieldName, uint16_t *value);
+
+natsStatus
+nats_JSONGetBool(nats_JSON *json, const char *fieldName, bool *value);
+
+natsStatus
+nats_JSONGetLong(nats_JSON *json, const char *fieldName, int64_t *value);
+
+natsStatus
+nats_JSONGetULong(nats_JSON *json, const char *fieldName, uint64_t *value);
+
+natsStatus
+nats_JSONGetDouble(nats_JSON *json, const char *fieldName, long double *value);
+
+natsStatus
+nats_JSONGetObject(nats_JSON *json, const char *fieldName, nats_JSON **value);
+
+natsStatus
+nats_JSONGetTime(nats_JSON *json, const char *fieldName, int64_t *timeUTC);
+
+natsStatus
+nats_JSONGetArrayField(nats_JSON *json, const char *fieldName, int fieldType, nats_JSONField **retField);
+
+natsStatus
+nats_JSONArrayAsStrings(nats_JSONArray *arr, char ***array, int *arraySize);
+
+natsStatus
+nats_JSONGetArrayStr(nats_JSON *json, const char *fieldName, char ***array, int *arraySize);
+
+natsStatus
+nats_JSONArrayAsBools(nats_JSONArray *arr, bool **array, int *arraySize);
+
+natsStatus
+nats_JSONGetArrayBool(nats_JSON *json, const char *fieldName, bool **array, int *arraySize);
+
+natsStatus
+nats_JSONArrayAsDoubles(nats_JSONArray *arr, long double **array, int *arraySize);
+
+natsStatus
+nats_JSONGetArrayDouble(nats_JSON *json, const char *fieldName, long double **array, int *arraySize);
+
+natsStatus
+nats_JSONArrayAsInts(nats_JSONArray *arr, int **array, int *arraySize);
+
+natsStatus
+nats_JSONGetArrayInt(nats_JSON *json, const char *fieldName, int **array, int *arraySize);
+
+natsStatus
+nats_JSONArrayAsLongs(nats_JSONArray *arr, int64_t **array, int *arraySize);
+
+natsStatus
+nats_JSONGetArrayLong(nats_JSON *json, const char *fieldName, int64_t **array, int *arraySize);
+
+natsStatus
+nats_JSONArrayAsULongs(nats_JSONArray *arr, uint64_t **array, int *arraySize);
+
+natsStatus
+nats_JSONGetArrayULong(nats_JSON *json, const char *fieldName, uint64_t **array, int *arraySize);
+
+natsStatus
+nats_JSONArrayAsObjects(nats_JSONArray *arr, nats_JSON ***array, int *arraySize);
+
+natsStatus
+nats_JSONGetArrayObject(nats_JSON *json, const char *fieldName, nats_JSON ***array, int *arraySize);
+
+natsStatus
+nats_JSONArrayAsArrays(nats_JSONArray *arr, nats_JSONArray ***array, int *arraySize);
+
+natsStatus
+nats_JSONGetArrayArray(nats_JSON *json, const char *fieldName, nats_JSONArray ***array, int *arraySize);
+
+natsStatus
+nats_JSONRange(nats_JSON *json, int expectedType, int expectedNumType, jsonRangeCB cb, void *userInfo);
+
+void
+nats_JSONDestroy(nats_JSON *json);
+
+natsStatus
+nats_EncodeTimeUTC(char *buf, size_t bufLen, int64_t timeUTC);
+
+void
+nats_Base32_Init(void);
+
+natsStatus
+nats_Base32_DecodeString(const char *src, char *dst, int dstMax, int *dstLen);
+
+natsStatus
+nats_Base64RawURL_EncodeString(const unsigned char *src, int srcLen, char **pDest);
+
+natsStatus
+nats_Base64_Encode(const unsigned char *src, int srcLen, char **pDest);
+
+natsStatus
+nats_Base64_DecodeLen(const char *src, int *srcLen, int *dstLen);
+
+void
+nats_Base64_DecodeInPlace(const char *src, int l, unsigned char *dst);
+
+natsStatus
+nats_Base64_Decode(const char *src, unsigned char **dst, int *dstLen);
+
+uint16_t
+nats_CRC16_Compute(unsigned char *data, int len);
+
+bool
+nats_CRC16_Validate(unsigned char *data, int len, uint16_t expected);
+
+natsStatus
+nats_ReadFile(natsBuffer **buffer, int initBufSize, const char *fn);
+
+bool
+nats_HostIsIP(const char *host);
+
+natsStatus
+nats_GetJWTOrSeed(char **val, const char *content, int item);
+
+void
+nats_FreeAddrInfo(struct addrinfo *res);
+
+natsStatus
+nats_marshalLong(natsBuffer *buf, bool comma, const char *fieldName, int64_t lval);
+
+natsStatus
+nats_marshalULong(natsBuffer *buf, bool comma, const char *fieldName, uint64_t uval);
+
+bool
+nats_IsSubjectValid(const char *subject, bool wcAllowed);
+
+natsStatus
+nats_parseTime(char *str, int64_t *timeUTC);
+
+#endif /* UTIL_H_ */
diff --git a/src/version.h b/src/version.h
new file mode 100644 (file)
index 0000000..c766eaa
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * DO NOT EDIT! Generated during make process.
+ * Copyright 2015-2018 The NATS Authors
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef VERSION_H_
+#define VERSION_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define NATS_VERSION_MAJOR  3
+#define NATS_VERSION_MINOR  4
+#define NATS_VERSION_PATCH  1
+
+#define NATS_VERSION_STRING "3.4.1"
+                                                         
+#define NATS_VERSION_NUMBER ((NATS_VERSION_MAJOR << 16) | \
+                             (NATS_VERSION_MINOR <<  8) | \
+                             NATS_VERSION_PATCH)
+                             
+#define NATS_VERSION_REQUIRED_NUMBER 0x030400
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* VERSION_H_ */
diff --git a/src/version.h.in b/src/version.h.in
new file mode 100644 (file)
index 0000000..786cfca
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * DO NOT EDIT! Generated during make process.
+ * Copyright 2015-2018 The NATS Authors
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef VERSION_H_
+#define VERSION_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define NATS_VERSION_MAJOR  @NATS_VERSION_MAJOR@
+#define NATS_VERSION_MINOR  @NATS_VERSION_MINOR@
+#define NATS_VERSION_PATCH  @NATS_VERSION_PATCH@
+
+#define NATS_VERSION_STRING "@NATS_VERSION_MAJOR@.@NATS_VERSION_MINOR@.@NATS_VERSION_PATCH@@NATS_VERSION_SUFFIX@"
+                                                         
+#define NATS_VERSION_NUMBER ((NATS_VERSION_MAJOR << 16) | \
+                             (NATS_VERSION_MINOR <<  8) | \
+                             NATS_VERSION_PATCH)
+                             
+#define NATS_VERSION_REQUIRED_NUMBER @NATS_VERSION_REQUIRED_NUMBER@
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* VERSION_H_ */
diff --git a/src/win/cond.c b/src/win/cond.c
new file mode 100644 (file)
index 0000000..74b1464
--- /dev/null
@@ -0,0 +1,99 @@
+// Copyright 2015-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "../natsp.h"
+#include "../mem.h"
+
+natsStatus
+natsCondition_Create(natsCondition **cond)
+{
+    natsCondition   *c = (natsCondition*) NATS_CALLOC(1, sizeof(natsCondition));
+    natsStatus      s  = NATS_OK;
+
+    if (c == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    InitializeConditionVariable(c);
+    *cond = c;
+
+    return s;
+}
+
+void
+natsCondition_Wait(natsCondition *cond, natsMutex *mutex)
+{
+    if (SleepConditionVariableCS(cond, mutex, INFINITE) == 0)
+        abort();
+}
+
+natsStatus
+natsCondition_TimedWait(natsCondition *cond, natsMutex *mutex, int64_t timeout)
+{
+    if (timeout <= 0)
+        return NATS_TIMEOUT;
+
+    if (SleepConditionVariableCS(cond, mutex, (DWORD) timeout) == 0)
+    {
+        if (GetLastError() == ERROR_TIMEOUT)
+            return NATS_TIMEOUT;
+
+        return nats_setError(NATS_SYS_ERROR,
+                             "SleepConditionVariableCS error: %d",
+                             GetLastError());
+    }
+
+    return NATS_OK;
+}
+
+natsStatus
+natsCondition_AbsoluteTimedWait(natsCondition *cond, natsMutex *mutex, int64_t absoluteTime)
+{
+    int64_t now = nats_Now();;
+    int64_t sleepTime = absoluteTime - now;
+
+    if (sleepTime <= 0)
+        return NATS_TIMEOUT;
+
+    if (SleepConditionVariableCS(cond, mutex, (DWORD) sleepTime) == 0)
+    {
+        if (GetLastError() == ERROR_TIMEOUT)
+            return NATS_TIMEOUT;
+
+        return nats_setError(NATS_SYS_ERROR,
+                             "SleepConditionVariableCS error: %d",
+                             GetLastError());
+    }
+
+    return NATS_OK;
+}
+
+void
+natsCondition_Signal(natsCondition *cond)
+{
+    WakeConditionVariable(cond);
+}
+
+void
+natsCondition_Broadcast(natsCondition *cond)
+{
+    WakeAllConditionVariable(cond);
+}
+
+void
+natsCondition_Destroy(natsCondition *cond)
+{
+    if (cond == NULL)
+        return;
+
+    NATS_FREE(cond);
+}
diff --git a/src/win/mutex.c b/src/win/mutex.c
new file mode 100644 (file)
index 0000000..376f55e
--- /dev/null
@@ -0,0 +1,65 @@
+// Copyright 2015-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "../natsp.h"
+#include "../mem.h"
+
+natsStatus
+natsMutex_Create(natsMutex **newMutex)
+{
+    natsMutex *m = NATS_CALLOC(1, sizeof(natsMutex));
+
+    if (m == NULL)
+        return nats_setDefaultError(NATS_NO_MEMORY);
+
+    if (gLockSpinCount > 0)
+        InitializeCriticalSectionAndSpinCount(m, (DWORD) gLockSpinCount);
+    else
+        InitializeCriticalSection(m);
+    *newMutex = m;
+
+    return NATS_OK;
+}
+
+bool
+natsMutex_TryLock(natsMutex *m)
+{
+    if (TryEnterCriticalSection(m) == 0)
+        return false;
+
+    return true;
+}
+
+void
+natsMutex_Lock(natsMutex *m)
+{
+    // If gLockSpinCount > 0, the mutex has been created as as spin lock,
+    // so we don't have to do anything special here.
+    EnterCriticalSection(m);
+}
+
+void
+natsMutex_Unlock(natsMutex *m)
+{
+    LeaveCriticalSection(m);
+}
+
+void
+natsMutex_Destroy(natsMutex *m)
+{
+    if (m == NULL)
+        return;
+
+    DeleteCriticalSection(m);
+    NATS_FREE(m);
+}
diff --git a/src/win/sock.c b/src/win/sock.c
new file mode 100644 (file)
index 0000000..ea2845e
--- /dev/null
@@ -0,0 +1,152 @@
+// Copyright 2015-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "../natsp.h"
+
+#include <errno.h>
+#include <io.h>
+
+#include "../mem.h"
+#include "../comsock.h"
+
+void
+natsSys_Init(void)
+{
+    WSADATA wsaData;
+    int     errorno;
+
+    /* Initialize winsock */
+    errorno = WSAStartup(MAKEWORD(2, 2), &wsaData);
+    if (errorno != 0)
+    {
+        printf("FATAL: Unable to initialize winsock!\n");
+        abort();
+    }
+}
+
+
+natsStatus
+natsSock_WaitReady(int waitMode, natsSockCtx *ctx)
+{
+    natsDeadline    *deadline = &ctx->writeDeadline;
+    struct timeval  timeout_tv= {0};
+    struct timeval  *timeout  = NULL;
+    natsSock        sock      = ctx->fd;
+    fd_set          fdSet;
+    fd_set          errSet;
+    int             res;
+
+    FD_ZERO(&fdSet);
+    FD_SET(sock, &fdSet);
+
+    FD_ZERO(&errSet);
+    FD_SET(sock, &errSet);
+
+    if (waitMode == WAIT_FOR_READ)
+        deadline = &ctx->readDeadline;
+
+    if (deadline != NULL)
+    {
+        int timeoutMS = natsDeadline_GetTimeout(deadline);
+        if (timeoutMS != -1)
+        {
+            timeout_tv.tv_sec = (long) timeoutMS / 1000;
+            timeout_tv.tv_usec = (timeoutMS % 1000) * 1000;
+            timeout = &timeout_tv;
+        }
+    }
+
+    // On Windows, we will know if the non-blocking connect has failed
+    // by using the exception set, not the write set.
+    switch (waitMode)
+    {
+        case WAIT_FOR_READ:
+            res = select(0, &fdSet, NULL, &errSet, timeout);
+            break;
+        case WAIT_FOR_WRITE:
+        case WAIT_FOR_CONNECT:
+            res = select(0, NULL, &fdSet, &errSet, timeout);
+            break;
+        default: abort();
+    }
+
+    if (res == NATS_SOCK_ERROR)
+        return nats_setError(NATS_IO_ERROR, "select error: %d", NATS_SOCK_GET_ERROR);
+
+    // Not ready...
+    if (res == 0)
+        return nats_setDefaultError(NATS_TIMEOUT);
+
+    return NATS_OK;
+}
+
+natsStatus
+natsSock_SetBlocking(natsSock fd, bool blocking)
+{
+    u_long iMode = 0;
+
+    // If iMode = 0, blocking is enabled;
+    // If iMode != 0, non-blocking mode is enabled.
+    if (!blocking)
+        iMode = 1;
+
+    if (ioctlsocket(fd, FIONBIO, &iMode) != NO_ERROR)
+        return nats_setError(NATS_SYS_ERROR,
+                             "ioctlsocket error: %d",
+                             NATS_SOCK_GET_ERROR);
+
+    return NATS_OK;
+}
+
+bool
+natsSock_IsConnected(natsSock fd)
+{
+    int res;
+    int error = 0;
+    int errorLen = (socklen_t) sizeof(int);
+
+    res = getsockopt(fd, SOL_SOCKET, SO_ERROR, (char*)&error, &errorLen);
+    if ((res == NATS_SOCK_ERROR) || (error != 0))
+        return false;
+
+    return true;
+}
+
+natsStatus
+natsSock_Flush(natsSock fd)
+{
+    HANDLE fh = (HANDLE)_get_osfhandle((int) fd);
+
+    if (fh == INVALID_HANDLE_VALUE)
+    {
+        errno = EBADF;
+        return nats_setError(NATS_INVALID_ARG, "%s",
+                             "Error setting flushing socket. Invalid handle");
+    }
+
+    if (!FlushFileBuffers(fh))
+    {
+        DWORD code = GetLastError();
+
+        if (code == ERROR_INVALID_HANDLE)
+            errno = EINVAL;
+        else
+            errno = EIO;
+
+        return nats_setError(NATS_IO_ERROR,
+                             "Error setting flushing socket. Error: %d",
+                             NATS_SOCK_GET_ERROR);
+    }
+
+    return NATS_OK;
+}
diff --git a/src/win/strings.c b/src/win/strings.c
new file mode 100644 (file)
index 0000000..e39629a
--- /dev/null
@@ -0,0 +1,140 @@
+// Copyright 2015-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "../natsp.h"
+
+#include "../mem.h"
+
+int
+nats_asprintf(char **newStr, const char *fmt, ...)
+{
+    char    tmp[256];
+    char    *str;
+    int     n, size;
+    va_list ap;
+
+    size = sizeof(tmp);
+    str  = (char*) tmp;
+
+    do
+    {
+        va_start(ap, fmt);
+        n = vsnprintf(str, size, fmt, ap);
+        va_end(ap);
+
+        if ((n < 0) || (n >= size))
+        {
+            // We failed, but we don't know how much we need, so start with
+            // doubling the size and see if it's better.
+            if (n < 0)
+            {
+                size *= 2;
+            }
+            else
+            {
+                // We know exactly how much we need.
+                size = (n + 1);
+
+                // now set n to -1 so that we loop again.
+                n = -1;
+            }
+
+            if (str != tmp)
+            {
+                char *realloced = NULL;
+
+                realloced = NATS_REALLOC(str, size);
+                if (realloced == NULL)
+                {
+                    NATS_FREE(str);
+                    str = NULL;
+                }
+                else
+                {
+                    str = realloced;
+                }
+            }
+            else
+            {
+                str = NATS_MALLOC(size);
+            }
+        }
+    }
+    while ((n < 0) && (str != NULL));
+
+    if (str != NULL)
+    {
+        if (str != tmp)
+            *newStr = str;
+        else
+            *newStr = NATS_STRDUP(str);
+
+        if (*newStr == NULL)
+            n = -1;
+    }
+
+    return n;
+}
+
+char*
+nats_strcasestr(const char *haystack, const char *needle)
+{
+    char *lowHaystack = NATS_STRDUP(haystack);
+    char *lowNeedle   = NATS_STRDUP(needle);
+    char *res         = NULL;
+    int  offset       = 0;
+
+    if ((lowHaystack == NULL) || (lowNeedle == NULL))
+    {
+        NATS_FREE(lowHaystack);
+        NATS_FREE(lowNeedle);
+        return NULL;
+    }
+
+    _strlwr(lowHaystack);
+    _strlwr(lowNeedle);
+
+    res = strstr((const char*) lowHaystack, (const char*) lowNeedle);
+    if (res != NULL)
+    {
+        offset = (int) (res - lowHaystack);
+        res = (char *) (haystack + offset);
+    }
+
+    NATS_FREE(lowHaystack);
+    NATS_FREE(lowNeedle);
+
+    return res;
+}
+
+#if _MSC_VER < 1900
+int
+nats_snprintf(char *buffer, size_t countszt, char *format, ...)
+{
+    int     count = (int) countszt;
+    int     len   = 0;
+    va_list ap;
+
+    memset(buffer, 0, count);
+
+    va_start(ap, format);
+    len = (int) vsnprintf(buffer, count, format, ap);
+    va_end(ap);
+    if ((len == count) || (len < 0))
+    {
+        buffer[count-1] = '\0';
+        len = count-1;
+    }
+    return len;
+}
+#endif
diff --git a/src/win/thread.c b/src/win/thread.c
new file mode 100644 (file)
index 0000000..c85e828
--- /dev/null
@@ -0,0 +1,198 @@
+// Copyright 2015-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "../natsp.h"
+
+#include <process.h>
+
+#include "../mem.h"
+
+static BOOL CALLBACK
+_initHandleFunction(PINIT_ONCE InitOnce, PVOID Parameter, PVOID *lpContext)
+{
+    natsInitOnceCb cb = (natsInitOnceCb) Parameter;
+
+    (*cb)();
+
+       return TRUE;
+}
+
+bool
+nats_InitOnce(natsInitOnceType *control, natsInitOnceCb cb)
+{
+    BOOL  bStatus;
+
+    // Execute the initialization callback function
+    bStatus = InitOnceExecuteOnce(control,
+                                  _initHandleFunction,
+                                  (PVOID) cb,
+                                  NULL);
+
+    // InitOnceExecuteOnce function succeeded.
+    if (bStatus)
+        return true;
+
+    return false;
+}
+
+struct threadCtx
+{
+    natsThreadCb    entry;
+    void            *arg;
+};
+
+static unsigned __stdcall _threadStart(void* arg)
+{
+  struct threadCtx *c = (struct threadCtx*) arg;
+
+  nats_setNATSThreadKey();
+
+  c->entry(c->arg);
+
+  NATS_FREE(c);
+
+  nats_ReleaseThreadMemory();
+  natsLib_Release();
+
+  return 0;
+}
+
+natsStatus
+natsThread_Create(natsThread **thread, natsThreadCb cb, void *arg)
+{
+    struct threadCtx    *ctx = NULL;
+    natsThread          *t   = NULL;
+    natsStatus          s    = NATS_OK;
+
+    natsLib_Retain();
+    ctx = (struct threadCtx*) NATS_CALLOC(1, sizeof(*ctx));
+    t = (natsThread*) NATS_CALLOC(1, sizeof(natsThread));
+
+    if ((ctx == NULL) || (t == NULL))
+        s = nats_setDefaultError(NATS_NO_MEMORY);
+
+    if (s == NATS_OK)
+    {
+        ctx->entry  = cb;
+        ctx->arg    = arg;
+
+        t->t = (HANDLE) _beginthreadex(NULL, 0, _threadStart, ctx, 0, NULL);
+        if (t->t == NULL)
+            s = nats_setError(NATS_SYS_ERROR,
+                              "_beginthreadex error: %d",
+                              GetLastError());
+        else
+            t->id = GetThreadId(t->t);
+    }
+    if (s == NATS_OK)
+    {
+        *thread = t;
+    }
+    else
+    {
+        NATS_FREE(ctx);
+        NATS_FREE(t);
+        natsLib_Release();
+    }
+
+    return s;
+}
+
+void
+natsThread_Join(natsThread *t)
+{
+    if (GetCurrentThreadId() != t->id)
+    {
+        if (WaitForSingleObject(t->t, INFINITE))
+            abort();
+    }
+}
+
+void
+natsThread_Detach(natsThread *t)
+{
+    // nothing for now.
+}
+
+bool
+natsThread_IsCurrent(natsThread *t)
+{
+    if (GetCurrentThreadId() == t->id)
+        return true;
+
+    return false;
+}
+
+void
+natsThread_Yield()
+{
+    // The correct way would be to call the following function.
+    // However, it looks like the connection reconnect test
+    // is failing on Windows without a proper sleep (that is,
+    // even Sleep(0) does not help).
+//    SwitchToThread();
+    nats_Sleep(1);
+}
+
+void
+natsThread_Destroy(natsThread *t)
+{
+    if (t == NULL)
+        return;
+
+    CloseHandle(t->t);
+
+    NATS_FREE(t);
+}
+
+natsStatus
+natsThreadLocal_CreateKey(natsThreadLocal *tl, void (*destructor)(void*))
+{
+    if ((*tl = TlsAlloc()) == TLS_OUT_OF_INDEXES)
+    {
+        return nats_setError(NATS_SYS_ERROR,
+                             "TlsAlloc error: %d",
+                              GetLastError());
+    }
+
+    return NATS_OK;
+}
+
+void*
+natsThreadLocal_Get(natsThreadLocal tl)
+{
+    return (void*) TlsGetValue(tl);
+}
+
+natsStatus
+natsThreadLocal_SetEx(natsThreadLocal tl, const void *value, bool setErr)
+{
+    if (TlsSetValue(tl, (LPVOID) value) == 0)
+    {
+        if (setErr)
+            return nats_setError(NATS_SYS_ERROR,
+                                 "TlsSetValue error: %d",
+                                 GetLastError());
+        else
+            return NATS_SYS_ERROR;
+    }
+
+    return NATS_OK;
+}
+
+void
+natsThreadLocal_DestroyKey(natsThreadLocal tl)
+{
+    TlsFree(tl);
+}
+
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
new file mode 100644 (file)
index 0000000..be55f85
--- /dev/null
@@ -0,0 +1,48 @@
+if(NOT BUILD_TESTING)
+  return()
+endif()
+if(NOT NATS_BUILD_LIB_STATIC)
+   MESSAGE(FATAL_ERROR
+     "Building tests require static library, or run CMake with -DBUILD_TESTING=OFF")
+  return()
+endif()  
+
+# We need this to build the test program
+include_directories(${PROJECT_SOURCE_DIR}/src)
+if(NATS_BUILD_WITH_TLS)
+  include_directories(${OPENSSL_INCLUDE_DIR})
+endif(NATS_BUILD_WITH_TLS)
+if(NATS_BUILD_STREAMING)
+  include_directories(${NATS_PROTOBUF_INCLUDE_DIRS})
+  include_directories(${PROJECT_SOURCE_DIR}/src/stan)
+endif(NATS_BUILD_STREAMING)
+
+# Build the test program
+add_executable(testsuite test.c)
+
+# Link statically with the library
+target_link_libraries(testsuite nats_static ${NATS_EXTRA_LIB})
+
+# Set the test index to 0
+set(testIndex 0)
+
+# Read the file 'list.txt' to get all the test names
+file(STRINGS list.txt listOfTestNames)
+
+# For each test name
+foreach(name ${listOfTestNames})
+
+  # Create a test and pass the index (start and end are the same)
+  # to the testsuite executable
+  add_test(NAME Test_${name}
+           WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
+           COMMAND testsuite ${testIndex} ${testIndex})
+
+  # Make sure the test passes
+  set_tests_properties(Test_${name} PROPERTIES PASS_REGULAR_EXPRESSION "ALL PASSED")
+
+  # Bump the test index number
+  math(EXPR testIndex "${testIndex}+1")
+endforeach()
+
+
diff --git a/test/certs/ca.pem b/test/certs/ca.pem
new file mode 100644 (file)
index 0000000..b84dccd
--- /dev/null
@@ -0,0 +1,22 @@
+-----BEGIN CERTIFICATE-----
+MIIDqDCCApCgAwIBAgIBATANBgkqhkiG9w0BAQsFADBtMQswCQYDVQQGEwJVUzEL
+MAkGA1UECAwCQ0ExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xEDAOBgNVBAoMB1N5
+bmFkaWExEDAOBgNVBAsMB25hdHMuaW8xFTATBgNVBAMMDGxvY2FsaG9zdCBjYTAe
+Fw0yMTA3MDExNTU2NTlaFw0yOTEwMTQxMzU3MjZaMG0xCzAJBgNVBAYTAlVTMQsw
+CQYDVQQIDAJDQTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzEQMA4GA1UECgwHU3lu
+YWRpYTEQMA4GA1UECwwHbmF0cy5pbzEVMBMGA1UEAwwMbG9jYWxob3N0IGNhMIIB
+IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwy+fupDc9MZldhetmGqPJtuM
+sp5VV6W9amlzkTck15B9Vc3laC6ph7Ble7FrT2L0sjG3U94MwU9/AHTXOmZdmbjM
+FpkjkLIVdFkbcWiErXYWDBHdA6dzOu+dagn0OyxRDjfqo1QUVKYVNu8Jw6MyWHXJ
+gljFl2ymHaQEhta/87tSvPULZ7gcEZ5CPFLENHWOlJPtQrPhJHDKjS8XHlbE1uXp
+i8kHqPCkImlv/s7Jw/QRIknV/kiAXAWGJCMbqLDG9JEatp7ektytcwMCr9pz9VzF
+6O/4LvOC8UCbu50eW7OudppN8G18IF3cMgH9jWsJpgVmXfJR+VZNe92/6ePTgQID
+AQABo1MwUTAdBgNVHQ4EFgQU7upCnRG44j5THcgKd28H4ESXBFkwHwYDVR0jBBgw
+FoAU7upCnRG44j5THcgKd28H4ESXBFkwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG
+9w0BAQsFAAOCAQEAfBHCa8sm0e767+oIZj3JIRi9MWN24hB9i4lVjDrwdOMaapMC
+YLLj5urqIgjOULjdsxBMzdNgNgH1vPenRYUUvIQcq7tk1q8DpfvmHEg2DHajpTAC
+DroutE5fYtlmFPSQ5UGG1if237osd6pDarVhGAdxex4YhwM+y+OXgpLqk6oC85oI
+fatf+hcovwFOlNeOTUqNZW6fEC+iFdH5g4+dtlx2LAJLpW57+5z25iTH7z16nUwB
+Vi76fezpaGA3xwkP/NMujgD4MbpVpF22a0YdK5fjUjXFwRI4Vu1zAjyJFhVuOWCS
+yT9yNzidtD5pho+Iv3JMzu54VWSq7nSUoPmKHQ==
+-----END CERTIFICATE-----
diff --git a/test/certs/client-cert.pem b/test/certs/client-cert.pem
new file mode 100644 (file)
index 0000000..0f96aec
--- /dev/null
@@ -0,0 +1,23 @@
+-----BEGIN CERTIFICATE-----
+MIID0jCCArqgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBtMQswCQYDVQQGEwJVUzEL
+MAkGA1UECAwCQ0ExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xEDAOBgNVBAoMB1N5
+bmFkaWExEDAOBgNVBAsMB25hdHMuaW8xFTATBgNVBAMMDGxvY2FsaG9zdCBjYTAe
+Fw0yMTA3MDExNTU2NTlaFw0yOTEwMTQxMzU3MjZaMHExCzAJBgNVBAYTAlVTMQsw
+CQYDVQQIDAJDQTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzEQMA4GA1UECgwHU3lu
+YWRpYTEQMA4GA1UECwwHbmF0cy5pbzEZMBcGA1UEAwwQbG9jYWxob3N0IGNsaWVu
+dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMn1VyxBY4AkODPmOxK5
+VG3F2qQ+0jNFeikwcgJPHvFamqn3cA5AIJIUVmMtBiUfjnperHVKeuPfmW1bJw4E
+ne3V2eccDySoAR/BTX4kw0SPtIO3hnHyhOLX4bY4/Xw5OWgw2HMEwEwuoWxd+jpc
+GGzXY49J9gRKqxJFXR9tXD6T+1ABZPynqrTm3SYYCJoWq/C6feTSkf13HvnTnf8k
+fWcFum1Y5FegAObqbPqJwA0TGiuXSFkqw5oV0uAZzRQ7zqB6V8MB3W1U1pw86F1h
+09EN78PrW1yXX1LZrLKwlqPTVh53Y1HuT+mwJkdQjFbOGXwh3x7rmp8+A3QLD4pR
+5tsCAwEAAaN5MHcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBeAwHQYDVR0lBBYwFAYI
+KwYBBQUHAwEGCCsGAQUFBwMCMD4GA1UdEQQ3MDWHBH8AAAGHEAAAAAAAAAAAAAAA
+AAAAAAGCCWxvY2FsaG9zdIIQY2xpZW50LmxvY2FsaG9zdDANBgkqhkiG9w0BAQsF
+AAOCAQEAWie6Pz2iJP6F9HfVH7anKVHeIXecwXJj4iLgEONaIcOyMcLPU4cthx1S
+OdvKAh+D9tT2PhVaIeDyYTUgFg/aaZUqI/W3odRH5HwQmE2YJDfXQusRtdFDTAUV
+XDqFkkNoJo4w3OQmlnQGm6QVReedyQ3jMTvqDRV+pa8gx6aH64jhP9fQRS4WkpYX
+d0HjWarV9/GzCP/+vGVZhwrhRG9p4F2ZCsflBzTx0YMGdo+vLDCSjwMbIT9t0T6/
+mt07Q70QSk8M3QAClrqarvLk+5z5XSZjtM06s/Z6opyqK2X8KYcOYX4WQyNFbOpy
+0YHy3iqmx/Ii0Zn5XZUXzAVGyJk5Yg==
+-----END CERTIFICATE-----
diff --git a/test/certs/client-key.pem b/test/certs/client-key.pem
new file mode 100644 (file)
index 0000000..4d98188
--- /dev/null
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpAIBAAKCAQEAyfVXLEFjgCQ4M+Y7ErlUbcXapD7SM0V6KTByAk8e8Vqaqfdw
+DkAgkhRWYy0GJR+Oel6sdUp649+ZbVsnDgSd7dXZ5xwPJKgBH8FNfiTDRI+0g7eG
+cfKE4tfhtjj9fDk5aDDYcwTATC6hbF36OlwYbNdjj0n2BEqrEkVdH21cPpP7UAFk
+/KeqtObdJhgImhar8Lp95NKR/Xce+dOd/yR9ZwW6bVjkV6AA5ups+onADRMaK5dI
+WSrDmhXS4BnNFDvOoHpXwwHdbVTWnDzoXWHT0Q3vw+tbXJdfUtmssrCWo9NWHndj
+Ue5P6bAmR1CMVs4ZfCHfHuuanz4DdAsPilHm2wIDAQABAoIBAHu5DodxI5i8F6ZL
+1EK7QOri+/gE+FcqqBUVtbKOcCFh5UBc8sv4Izv6s5WcXphdhbaXy0UrtK9nKyIg
+ZoOi9nFewlhgCzLkrZObo3K06N9Wvjq3MukZrqkdogw1S61PjUi0K9YCwh+prYCq
+7gHUq636IecFY27ro3PVBKCdKZa3jwNIg4Oy5H0dsLgA1ma+tJaZMxDQZGyXvPqD
+wGXdkjdIefo7WQHi3yyujSs3Bu76ChmkGQfma48clWiu4HNlWI3Uc8aLBwDWVmjF
+S4T8s9HNw+nDWNHvnD45dkgKyTNAGA4rmD01OtuiC44GfZkRtupXcI0xA7d0lzd+
+yvMBlfkCgYEA/9zpUgL2Uw24H28pDXiV6Lc0PmCmHVLPQxQpDzsudX/ukaUl0tMC
+tOL9575sluXOXDSkuoMX5nDX/8C6fPNSbi4AzrqDxQ7Dc05W41MvlJ9DdIzlozEm
+LFJ4RfXccxcVCXRrgNDNHpkMKQkk3Z+zmlZeNbbhWKs2CgZGrvyFnW8CgYEAyhEJ
+Z1aRC6XrP+GbMCiN7w2X6ZcDNm89o8jXR/94hTDGvyyQ4XIs0245XjHNYVP/ghzi
+iFpIRlph4QpKZebWiqgkwlsNsPKQmiBn5uqobo3VsUt+rFIhaX50GyM5cxSbSRkl
+/i9Z7ZZdj/dcsviURthKZiBn2uw+aROLCgKm71UCgYEA102h2K09cm4c/fagaQGL
+xCRGBid2IT7Jwfx5AKQgWCerLUv3JA0EPgq09gm7fs8qc1SpOXmO5w8V89TOGM74
+ElcLvuocb/oYZjMJ0ojxhPLv5Geb5VM6eBl9tAFL3F0UCry4qdEKijDnlrBnIUd9
+7uW2qSSXQ/Huq0jUufMszGkCgYEAnayLnPJkviUbG77svLh4gHgn+SNYY2qMO7il
+nE3R+oRkIZsh9nmEVvtkkobkDzVfZGUrs2BXk2ZFiDfic/+bm5i3Dl3EojW09j+h
+NAQZqCLPA8i4MLjpz4rYCLEEzDLhNToFdoH2dzllCsjnsdPcyCdQbr6Mq7y6un2A
+ejA1mP0CgYABUHeLemQTvsciXVAy7ZggDYmFIVPvxwYejAXWAeUdq2FEFWIqmywy
+gTISeMrWpaCpwRr97Rez5bLgYe1Crqujd03uzYzoMtuiE0027XE6CaqeDGEk7jWQ
+bnbanxoy7Ax6yjcEbqyaaG4ZbVXu5EbsCMPFE3mws3AqyF1/54YmbQ==
+-----END RSA PRIVATE KEY-----
diff --git a/test/certs/server-cert.pem b/test/certs/server-cert.pem
new file mode 100644 (file)
index 0000000..f7cc0f8
--- /dev/null
@@ -0,0 +1,23 @@
+-----BEGIN CERTIFICATE-----
+MIID0jCCArqgAwIBAgIBAzANBgkqhkiG9w0BAQsFADBtMQswCQYDVQQGEwJVUzEL
+MAkGA1UECAwCQ0ExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xEDAOBgNVBAoMB1N5
+bmFkaWExEDAOBgNVBAsMB25hdHMuaW8xFTATBgNVBAMMDGxvY2FsaG9zdCBjYTAe
+Fw0yMTA3MDExNTU2NTlaFw0yOTEwMTQxMzU3MjZaMHExCzAJBgNVBAYTAlVTMQsw
+CQYDVQQIDAJDQTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzEQMA4GA1UECgwHU3lu
+YWRpYTEQMA4GA1UECwwHbmF0cy5pbzEZMBcGA1UEAwwQbG9jYWxob3N0IHNlcnZl
+cjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN/v4lwsEQqEr8gqG6Xu
+UjNfvUBN/enc/26FqtsAF6ms0r4oHcyR3RZQGQj+Z0RF3Wu0Kq9692gk7FD/QulE
+hYJTjq6lEwvETuUHbkNmIAppNJW1JvgLsTOfm38VorBVU5PUMbrcfsVsFijXVACj
+9VMZ23So4dxtlvnqrd5/fVx0Pql5EjY87bJEKH5Zngy1v+AR5kybZaorOX9T4/Nl
+e0P184GwGs15hKAokoQMPm9uIhG527JMyhQh5J/2wooY2DBZ9jDt5FVXNpb0C+nr
+M+AULk5QHQsobTtmC3RSNHiNw5B5w+gmauhGziurq8gcx0DctqAslKFBkCLkL9fc
+F30CAwEAAaN5MHcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBeAwHQYDVR0lBBYwFAYI
+KwYBBQUHAwEGCCsGAQUFBwMCMD4GA1UdEQQ3MDWHBH8AAAGHEAAAAAAAAAAAAAAA
+AAAAAAGCCWxvY2FsaG9zdIIQc2VydmVyLmxvY2FsaG9zdDANBgkqhkiG9w0BAQsF
+AAOCAQEATM/K671w3aHt665HBMawzMIZZPq/ZoBfEUkSUW9KdnQHgTxatHcZonsL
+aFn4XZBYQ0Pqkz7H1w39mHdvpURQ5ZMnsmn4jH3LECsOtQ4ztrLk2fhLSoMQBVdb
+UjdYhrM8AuILKRCzOBNsDm/ZB/vPSlmYhnaEBUjO0t+I/A0X1z5eDcYPLl578kfJ
+WjlvRluWr7Uku1DaZUy7TByYvUuOjP4c33DAnbZ5Sldx18repZ20REASxsCpa/CW
+tptxVfUvLcGRHIY0FxOn+5Pfm1QDo2uh6yVYHgsOCh1qW8FHfJvgnrMlvvXniKXu
+5H6A5GeyCkIVvAENDfl1cN9LaV5eQg==
+-----END CERTIFICATE-----
diff --git a/test/certs/server-key.pem b/test/certs/server-key.pem
new file mode 100644 (file)
index 0000000..edfd16e
--- /dev/null
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpAIBAAKCAQEA3+/iXCwRCoSvyCobpe5SM1+9QE396dz/boWq2wAXqazSvigd
+zJHdFlAZCP5nREXda7Qqr3r3aCTsUP9C6USFglOOrqUTC8RO5QduQ2YgCmk0lbUm
++AuxM5+bfxWisFVTk9Qxutx+xWwWKNdUAKP1UxnbdKjh3G2W+eqt3n99XHQ+qXkS
+NjztskQoflmeDLW/4BHmTJtlqis5f1Pj82V7Q/XzgbAazXmEoCiShAw+b24iEbnb
+skzKFCHkn/bCihjYMFn2MO3kVVc2lvQL6esz4BQuTlAdCyhtO2YLdFI0eI3DkHnD
+6CZq6EbOK6uryBzHQNy2oCyUoUGQIuQv19wXfQIDAQABAoIBAC5rWl/C3rFwecOj
+PuHxeeaeVOuMfzLIFcbCPH1zEnSgl3rFdA/guJSUe+wKWDulw9U8npCLi9dxt+6+
+Sw9xnb87NNts6nrI8ZW2KZwdAk1GK5lQ2MgYHF5YGnKIeJXWyiFdngVfCYRA+IL0
+x7vuQL8+H+iZzV/U87PQesQhZ0oPh03n/4OtSo1bnPOoiPLAC+GVVpSSKoh13beb
+GpIRXhGNXonGPWnj1t/oBHQwLDfDndnljkRaWTzxeCZGcQ1wYucf6jne5dI1E21q
+vrdyK8GL4SqzHC2SHnJO24aKam/Xr7YqOM2T+XsVywKxE4I1icT2YhQAgRuN8Nlg
+7CELdAECgYEA+CEhY7JYfmRb/+PIvogRr67uaYtxYygvDcYfse5O/V/HOzotIXIT
+t99deD8XOFpWhJHdDzDD/TStb/rmwu5kavMQzmQafyesu7okk1NtB+fZtMLQfF9/
+0+bW9uJQFyc1EVHKgyya3UidXTcmKcExKQZT+jdgFz614zndcOKl0H0CgYEA5wpO
+WIjjxVqke5ucrVSRsm37l0BZYeea2vxLAzUV4txVw3hcOgJo+FhEGFy6EjNSV2OR
+y589gZDEPZ/LNeaj7nbNUqf2xZV7MAXBgUCtj7fJqMbVhbXZB0w0hIknDL+td2WZ
+bocuVExTwRwXyuSCgUFo0Bz++L0cR3JK6kNBEwECgYEAyOfKaTbWgEAyXZbJy7vQ
+1jcFw1+sh2TZ9IUe1KroOi962XHZaOM9I/wvalVrL621r9GK8+nARxyH8cttXRg5
+Jn94dCSJb7toGPg29TLvbR9FHx8+P/XzQlf+ZhgIUTbluQhIuL09Bz7sa7VjqRtL
++rOs+0QrAac9DqajretV5uECgYEAgaXe4P+wEQcUVei0uu9B8waUsAOEJNR6qXf6
+AArCBVPvLIlV95dyoCmnzKP8Jkp2YmOVZNYvBY3fEVWiCtUqGJ7CCSgH6kg/oGsa
+cxWAT62qk/M/zpCFAPtaXSU5rIXDKcTxnHxvGw7Z0PuavlgMg8vYrTAYRCyaud0A
+/QRQeAECgYBuRDM+mk5EDbsi6MOD24x6krRDHr5/Ch5xCQXK2FhU8zcQ8P24UixU
+Re71LBsYLBHkhB/slofGdBvgeiVHwJyVWA9c3+kb+IwSilNRLV7IwxrfLg3xSVBu
+0KEwWLSXlJmPnGWObpBmz62HrfquyMME4srQrNfW1q+Qm8OlZIeInw==
+-----END RSA PRIVATE KEY-----
diff --git a/test/dylib/CMakeLists.txt b/test/dylib/CMakeLists.txt
new file mode 100644 (file)
index 0000000..3bbc66e
--- /dev/null
@@ -0,0 +1,17 @@
+if(NOT BUILD_TESTING)
+  return()
+endif()
+if(NOT NATS_BUILD_LIB_SHARED)
+  return()
+endif()  
+
+# We need this to build the test program
+include_directories(${PROJECT_SOURCE_DIR}/src)
+
+# Build the test program
+add_executable(nonats nonats.c)
+
+# Link dynamically with the library
+add_definitions(-Dnats_IMPORTS)
+
+target_link_libraries(nonats nats ${NATS_EXTRA_LIB})
diff --git a/test/dylib/nonats.c b/test/dylib/nonats.c
new file mode 100644 (file)
index 0000000..6ef07ea
--- /dev/null
@@ -0,0 +1,24 @@
+// Copyright 2017-2018 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include <nats.h>
+
+int main(int argc, char **argv)
+{
+    // Give a chance for the destructor/DllMain to be registered.
+    // Note that nats_Sleep() is not "opening" the library, so
+    // the cleanup code would still crash if we were not skipping
+    // the cleanup if we detect that library was never oepened.
+    nats_Sleep(1000);
+    return 0;
+}
diff --git a/test/list.txt b/test/list.txt
new file mode 100644 (file)
index 0000000..38f5138
--- /dev/null
@@ -0,0 +1,282 @@
+Version
+VersionMatchesTag
+OpenCloseAndWait
+natsNowAndSleep
+natsAllocSprintf
+natsStrCaseStr
+natsSnprintf
+natsBuffer
+natsParseInt64
+natsParseControl
+natsNormalizeErr
+natsMutex
+natsThread
+natsCondition
+natsTimer
+natsUrl
+natsCreateStringFromBuffer
+natsHash
+natsHashing
+natsStrHash
+natsInbox
+natsOptions
+natsSock_ConnectTcp
+natsSock_ShuffleIPs
+natsSock_IPOrder
+natsSock_ReadLine
+natsJSON
+natsEncodeTimeUTC
+natsErrWithLongText
+natsErrStackMoreThanMaxFrames
+natsMsg
+natsBase32
+natsBase64
+natsCRC16
+natsKeys
+natsReadFile
+natsGetJWTOrSeed
+natsHostIsIP
+natsWaitReady
+natsSign
+HeadersLift
+HeadersAPIs
+MsgIsJSControl
+SrvVersionAtLeast
+ReconnectServerStats
+ParseStateReconnectFunctionality
+ServersRandomize
+SelectNextServer
+ParserPing
+ParserErr
+ParserOK
+ParseINFO
+ParserShouldFail
+ParserSplitMsg
+ProcessMsgArgs
+LibMsgDelivery
+AsyncINFO
+RequestPool
+NoFlusherIfSendAsapOption
+HeadersAndSubPendingBytes
+DefaultConnection
+SimplifiedURLs
+IPResolutionOrder
+UseDefaultURLIfNoServerSpecified
+ConnectToWithMultipleURLs
+ConnectionWithNULLOptions
+ConnectionToWithNullURLs
+ConnectionStatus
+ConnClosedCB
+CloseDisconnectedCB
+ServerStopDisconnectedCB
+ClosedConnections
+ConnectVerboseOption
+ReconnectThreadLeak
+ReconnectTotalTime
+ReconnectDisallowedFlags
+ReconnectAllowedFlags
+ConnCloseBreaksReconnectLoop
+BasicReconnectFunctionality
+ExtendedReconnectFunctionality
+QueueSubsOnReconnect
+IsClosed
+IsReconnectingAndStatus
+ReconnectBufSize
+RetryOnFailedConnect
+NoPartialOnReconnect
+ReconnectFailsPendingRequests
+ErrOnConnectAndDeadlock
+ErrOnMaxPayloadLimit
+Auth
+AuthFailNoDisconnectCB
+AuthToken
+AuthTokenHandler
+PermViolation
+AuthViolation
+AuthenticationExpired
+AuthenticationExpiredReconnect
+ConnectedServer
+MultipleClose
+SimplePublish
+SimplePublishNoData
+PublishMsg
+InvalidSubsArgs
+AsyncSubscribe
+AsyncSubscribeTimeout
+SyncSubscribe
+PubSubWithReply
+NoResponders
+Flush
+ConnCloseDoesFlush
+QueueSubscriber
+ReplyArg
+SyncReplyArg
+Unsubscribe
+DoubleUnsubscribe
+SubRemovedWhileProcessingMsg
+RequestTimeout
+Request
+RequestNoBody
+RequestMuxWithMappedSubject
+OldRequest
+SimultaneousRequests
+RequestClose
+CustomInbox
+FlushInCb
+ReleaseFlush
+FlushErrOnDisconnect
+Inbox
+Stats
+BadSubject
+SubBadSubjectAndQueueNames
+ClientAsyncAutoUnsub
+ClientSyncAutoUnsub
+ClientAutoUnsubAndReconnect
+AutoUnsubNoUnsubOnDestroy
+NextMsgOnClosedSub
+CloseSubRelease
+IsValidSubscriber
+SlowSubscriber
+SlowAsyncSubscriber
+SlowConsumerCb
+PendingLimitsDeliveredAndDropped
+PendingLimitsWithSyncSub
+AsyncSubscriptionPending
+AsyncSubscriptionPendingDrain
+SyncSubscriptionPending
+SyncSubscriptionPendingDrain
+AsyncErrHandler
+AsyncSubscriberStarvation
+AsyncSubscriberOnClose
+NextMsgCallOnAsyncSub
+SubOnComplete
+GetLastError
+StaleConnection
+ServerErrorClosesConnection
+NoEcho
+NoEchoOldServer
+DrainSub
+DrainSubStops
+DrainSubRaceOnAutoUnsub
+DrainSubNotResentOnReconnect
+DrainConn
+NoDoubleCloseCbOnDrain
+GetClientID
+GetClientIP
+GetRTT
+GetLocalIPAndPort
+UserCredsCallbacks
+UserCredsFromFiles
+NKey
+NKeyFromSeed
+ConnSign
+WriteDeadline
+HeadersNotSupported
+HeadersBasic
+MsgsFilter
+EventLoop
+EventLoopRetryOnFailedConnect
+EventLoopTLS
+SSLBasic
+SSLVerify
+SSLCAFromMemory
+SSLCertAndKeyFromMemory
+SSLVerifyHostname
+SSLSkipServerVerification
+SSLCiphers
+SSLMultithreads
+SSLConnectVerboseOption
+SSLSocketLeakEventLoop
+SSLReconnectWithAuthError
+ServersOption
+AuthServers
+AuthFailToReconnect
+ReconnectWithTokenHandler
+BasicClusterReconnect
+HotSpotReconnect
+ProperReconnectDelay
+ProperFalloutAfterMaxAttempts
+StopReconnectAfterTwoAuthErr
+TimeoutOnNoServer
+PingReconnect
+GetServers
+GetDiscoveredServers
+DiscoveredServersCb
+IgnoreDiscoveredServers
+INFOAfterFirstPONGisProcessedOK
+ServerPoolUpdatedOnClusterUpdate
+ReconnectJitter
+CustomReconnectDelay
+LameDuckMode
+ReconnectImplicitUserInfo
+JetStreamUnmarshalAccInfo
+JetStreamUnmarshalStreamState
+JetStreamUnmarshalStreamCfg
+JetStreamUnmarshalStreamInfo
+JetStreamMarshalStreamCfg
+JetStreamUnmarshalConsumerInfo
+JetStreamContext
+JetStreamDomain
+JetStreamMgtStreams
+JetStreamMgtConsumers
+JetStreamPublish
+JetStreamPublishAsync
+JetStreamPublishAckHandler
+JetStreamSubscribe
+JetStreamSubscribeSync
+JetStreamSubscribeConfigCheck
+JetStreamSubscribeIdleHeartbeat
+JetStreamSubscribeFlowControl
+JetStreamSubscribePull
+JetStreamSubscribeHeadersOnly
+JetStreamOrderedCons
+JetStreamOrderedConsWithErrors
+JetStreamOrderedConsAutoUnsub
+JetStreamOrderedConsSrvRestart
+JetStreamSubscribeWithFWC
+JetStreamStreamsSealAndRollup
+JetStreamGetMsgAndLastMsg
+JetStreamConvertDirectMsg
+JetStreamDirectGetMsg
+JetStreamNakWithDelay
+JetStreamBackOffRedeliveries
+JetStreamInfoWithSubjects
+KeyValueManager
+KeyValueBasics
+KeyValueWatch
+KeyValueHistory
+KeyValueKeys
+KeyValueDeleteVsPurge
+KeyValueDeleteTombstones
+KeyValueDeleteMarkerThreshold
+KeyValueCrossAccount
+KeyValueDiscardOldToNew
+KeyValueRePublish
+KeyValueMirrorDirectGet
+StanPBufAllocator
+StanConnOptions
+StanSubOptions
+StanMsg
+StanServerNotReachable
+StanBasicConnect
+StanConnectError
+StanBasicPublish
+StanBasicPublishAsync
+StanPublishTimeout
+StanPublishMaxAcksInflight
+StanBasicSubscription
+StanSubscriptionCloseAndUnsub
+StanDurableSubscription
+StanBasicQueueSubscription
+StanDurableQueueSubscription
+StanCheckReceivedMsg
+StanSubscriptionAckMsg
+StanPings
+StanPingsNoResponder
+StanConnectionLostHandlerNotSet
+StanPingsUnblockPublishCalls
+StanGetNATSConnection
+StanNoRetryOnFailedConnect
+StanInternalSubsNotPooled
+StanSubOnComplete
+StanSubTimeout
diff --git a/test/permissions.conf b/test/permissions.conf
new file mode 100644 (file)
index 0000000..ee40d4c
--- /dev/null
@@ -0,0 +1,12 @@
+authorization {
+  users = [
+    {
+               user: ivan
+               password: pwd
+       permissions: {
+               publish="foo"
+               subscribe="bar"
+       }
+       }
+  ]
+}
diff --git a/test/test.c b/test/test.c
new file mode 100644 (file)
index 0000000..dc1f0ef
--- /dev/null
@@ -0,0 +1,33862 @@
+// Copyright 2015-2022 The NATS Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "natsp.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#ifdef _WIN32
+#else
+#include <dirent.h>
+#include <sys/stat.h>
+#endif
+
+#include "buf.h"
+#include "timer.h"
+#include "url.h"
+#include "opts.h"
+#include "../src/util.h"
+#include "hash.h"
+#include "conn.h"
+#include "sub.h"
+#include "msg.h"
+#include "stats.h"
+#include "comsock.h"
+#include "crypto.h"
+#include "nkeys.h"
+#include "parser.h"
+#include "js.h"
+#include "kv.h"
+#if defined(NATS_HAS_STREAMING)
+#include "stan/conn.h"
+#include "stan/pub.h"
+#include "stan/sub.h"
+#include "stan/copts.h"
+#include "stan/sopts.h"
+#endif
+
+static int  tests  = 0;
+static bool failed = false;
+
+static bool keepServerOutput    = false;
+static bool valgrind            = false;
+static bool runOnTravis         = false;
+
+static const char *natsServerExe = "nats-server";
+static const char *serverVersion = NULL;
+
+static const char *natsStreamingServerExe = "nats-streaming-server";
+
+static natsMutex *slMu  = NULL;
+static natsHash  *slMap = NULL;
+
+#define test(s)         { printf("#%02d ", ++tests); printf("%s", (s)); fflush(stdout); }
+#ifdef _WIN32
+#define NATS_INVALID_PID    (NULL)
+#define testCond(c)         if(c) { printf("PASSED\n"); fflush(stdout); } else { printf("FAILED\n"); nats_PrintLastErrorStack(stdout); fflush(stdout); failed=true; return; }
+#define testCondNoReturn(c) if(c) { printf("PASSED\n"); fflush(stdout); } else { printf("FAILED\n"); nats_PrintLastErrorStack(stdout); fflush(stdout); failed=true; }
+#define LOGFILE_NAME    "wserver.log"
+#else
+#define NATS_INVALID_PID    (-1)
+#define testCond(c)         if(c) { printf("\033[0;32mPASSED\033[0;0m\n"); fflush(stdout); } else { printf("\033[0;31mFAILED\033[0;0m\n"); nats_PrintLastErrorStack(stdout); fflush(stdout); failed=true; return; }
+#define testCondNoReturn(c) if(c) { printf("\033[0;32mPASSED\033[0;0m\n"); fflush(stdout); } else { printf("\033[0;31mFAILED\033[0;0m\n"); nats_PrintLastErrorStack(stdout); fflush(stdout); failed=true; }
+#define LOGFILE_NAME    "server.log"
+#endif
+#define FAIL(m)         { printf("@@ %s @@\n", (m)); failed=true; return; }
+
+#define CHECK_SERVER_STARTED(p) if ((p) == NATS_INVALID_PID) FAIL("Unable to start or verify that the server was started!")
+
+static const char *testServers[] = {"nats://127.0.0.1:1222",
+                                    "nats://127.0.0.1:1223",
+                                    "nats://127.0.0.1:1224",
+                                    "nats://127.0.0.1:1225",
+                                    "nats://127.0.0.1:1226",
+                                    "nats://127.0.0.1:1227",
+                                    "nats://127.0.0.1:1228"};
+
+#if defined(NATS_HAS_STREAMING)
+static const char *clusterName = "test-cluster";
+static const char *clientName  = "client";
+#endif
+
+// Forward declaration
+static void _startMockupServerThread(void *closure);
+
+typedef natsStatus (*testCheckInfoCB)(char *buffer);
+
+struct threadArg
+{
+    natsMutex       *m;
+    natsThread      *t;
+    natsCondition   *c;
+    natsCondition   *b;
+    int             control;
+    bool            current;
+    int             sum;
+    int             timerFired;
+    int             timerStopped;
+    natsStrHash     *inboxes;
+    natsStatus      status;
+    const char*     string;
+    bool            connected;
+    bool            disconnected;
+    int64_t         disconnectedAt[4];
+    int64_t         disconnects;
+    bool            closed;
+    bool            reconnected;
+    int64_t         reconnectedAt[4];
+    int             reconnects;
+    bool            msgReceived;
+    bool            done;
+    int             results[10];
+    const char      *tokens[3];
+    int             tokenCallCount;
+    testCheckInfoCB checkInfoCB;
+    natsSock        sock;
+
+    natsSubscription *sub;
+    natsOptions      *opts;
+    natsConnection   *nc;
+    jsCtx            *js;
+    natsBuffer       *buf;
+
+#if defined(NATS_HAS_STREAMING)
+    stanConnection   *sc;
+    int              redelivered;
+    const char*      channel;
+    stanMsg          *sMsg;
+#endif
+
+    int              attached;
+    int              detached;
+    bool             evStop;
+    bool             doRead;
+    bool             doWrite;
+
+};
+
+static bool
+serverVersionAtLeast(int major, int minor, int update)
+{
+    int     ma       = 0;
+    int     mi       = 0;
+    int     up       = 0;
+    char    *version = NULL;
+
+    if (serverVersion == NULL)
+        return false;
+
+    version = strstr(serverVersion, "version ");
+    if (version != NULL)
+    {
+        version += 8;
+    }
+    else
+    {
+        version = strstr(serverVersion, " v");
+        if (version == NULL)
+            return false;
+
+        version += 2;
+    }
+
+    sscanf(version, "%d.%d.%d", &ma, &mi, &up);
+    if ((ma > major) || ((ma == major) && (mi > minor)) || ((ma == major) && (mi == minor) && (up >= update)))
+        return true;
+
+    return false;
+}
+
+static void
+_waitSubPending(natsSubscription *sub, int expected)
+{
+    int mc = 0;
+    do
+    {
+        natsSubscription_GetPending(sub, &mc, NULL);
+        if (mc != expected)
+            nats_Sleep(15);
+        }
+    while (mc != expected);
+}
+
+static natsStatus
+_createDefaultThreadArgsForCbTests(
+    struct threadArg    *arg)
+{
+    natsStatus s;
+
+    memset(arg, 0, sizeof(struct threadArg));
+
+    s = natsMutex_Create(&(arg->m));
+    if (s == NATS_OK)
+        s = natsCondition_Create(&(arg->c));
+
+    return s;
+}
+
+void
+_destroyDefaultThreadArgs(struct threadArg *args)
+{
+    if (valgrind)
+        nats_Sleep(100);
+
+    natsMutex_Destroy(args->m);
+    natsCondition_Destroy(args->c);
+}
+
+static void
+test_natsNowAndSleep(void)
+{
+    int64_t start;
+    int64_t end;
+
+    test("Check now and sleep: ")
+    start = nats_Now();
+    nats_Sleep(1000);
+    end = nats_Now();
+    testCond(((end - start) >= 990) && ((end - start) <= 1010));
+}
+
+static void
+test_natsAllocSprintf(void)
+{
+    char smallStr[20];
+    char mediumStr[256]; // This is the size of the temp buffer in nats_asprintf
+    char largeStr[1024];
+    char *ptr = NULL;
+    int ret;
+
+    memset(smallStr, 'A', sizeof(smallStr) - 1);
+    smallStr[sizeof(smallStr) - 1] = '\0';
+
+    memset(mediumStr, 'B', sizeof(mediumStr) - 1);
+    mediumStr[sizeof(mediumStr) - 1] = '\0';
+
+    memset(largeStr, 'C', sizeof(largeStr) - 1);
+    largeStr[sizeof(largeStr) - 1] = '\0';
+
+    test("Check alloc sprintf with small string: ");
+    ret = nats_asprintf(&ptr, "%s", smallStr);
+    testCond((ret >= 0)
+             && (strcmp(ptr, smallStr) == 0));
+
+    free(ptr);
+    ptr = NULL;
+
+    test("Check alloc sprintf with medium string: ");
+    ret = nats_asprintf(&ptr, "%s", mediumStr);
+    testCond((ret >= 0)
+             && (strcmp(ptr, mediumStr) == 0));
+
+    free(ptr);
+    ptr = NULL;
+
+    test("Check alloc sprintf with large string: ");
+    ret = nats_asprintf(&ptr, "%s", largeStr);
+    testCond((ret >= 0)
+             && (strcmp(ptr, largeStr) == 0));
+
+    free(ptr);
+    ptr = NULL;
+}
+
+static void
+test_natsStrCaseStr(void)
+{
+    const char *s1 = "Hello World!";
+    const char *s2 = "wo";
+    const char *res = NULL;
+
+    test("StrStr case insensitive (equal): ");
+    res = nats_strcasestr(s1, s1);
+    testCond((res != NULL)
+             && (strcmp(res, s1) == 0)
+             && (res == s1));
+
+    test("StrStr case insensitive (match): ");
+    res = nats_strcasestr(s1, s2);
+    testCond((res != NULL)
+             && (strcmp(res, "World!") == 0)
+             && (res == (s1 + 6)));
+
+    test("StrStr case insensitive (no match): ");
+    res = nats_strcasestr(s1, "xx");
+    testCond(res == NULL);
+}
+
+static void
+test_natsSnprintf(void)
+{
+#if _WIN32
+    // This test is specific to older version of Windows
+    // that did not provide snprintf...
+    char buf[5];
+
+    test("snprintf over limit: ");
+    snprintf(buf, sizeof(buf), "%s", "abcdefghijklmnopqrstuvwxyz");
+    testCond(strcmp(buf, "abcd") == 0);
+#else
+    test("Skip when not running on Windows: ");
+    testCond(true);
+#endif
+}
+
+static void test_natsBuffer(void)
+{
+    natsStatus  s;
+    char        backend[10];
+    natsBuffer  *buf = NULL;
+    natsBuffer  stackBuf;
+    int         oldCapacity = 0;
+
+    printf("== Buffer without data ==\n");
+
+    test("Create buffer owning its data: ");
+    s = natsBuf_Create(&buf, 1);
+    testCond((s == NATS_OK)
+             && (natsBuf_Len(buf) == 0)
+             && (natsBuf_Capacity(buf) == 1));
+
+    test("Append less than capacity does not expand buffer: ");
+    s = natsBuf_Append(buf, "a", 1);
+    testCond((s == NATS_OK)
+            && (natsBuf_Len(buf) == 1)
+            && (natsBuf_Capacity(buf) == 1)
+            && (natsBuf_Available(buf) == 0));
+
+    test("Appending one more (AppendByte) increases capacity: ");
+    oldCapacity = natsBuf_Capacity(buf);
+    s = natsBuf_AppendByte(buf, 'b');
+    testCond((s == NATS_OK)
+             && (natsBuf_Len(buf) == 2)
+             && (natsBuf_Capacity(buf) > oldCapacity)
+             && (natsBuf_Available(buf) > 0));
+
+    test("Checking content: ");
+    testCond((s == NATS_OK)
+             && (natsBuf_Data(buf) != NULL)
+             && (strncmp(natsBuf_Data(buf), "ab", 2) == 0));
+
+    natsBuf_Destroy(buf);
+    buf = NULL;
+
+    oldCapacity = 0;
+    test("Appending one more byte increases capacity: ");
+    s = natsBuf_Create(&buf, 1);
+    IFOK(s, natsBuf_Append(buf, "a", 1));
+    if (s == NATS_OK)
+    {
+        oldCapacity = natsBuf_Capacity(buf);
+
+        // Add one more!
+        s = natsBuf_Append(buf, "b", 1);
+    }
+    testCond((s == NATS_OK)
+             && (natsBuf_Len(buf) == 2)
+             && (natsBuf_Capacity(buf) > oldCapacity)
+             && (natsBuf_Available(buf) > 0));
+
+    natsBuf_Destroy(buf);
+    buf = NULL;
+
+    printf("\n== Buffer with data ==\n");
+
+    memset(backend, 0, sizeof(backend));
+
+    test("Create buffer with backend: ");
+    s = natsBuf_CreateWithBackend(&buf, backend, 0, 5);
+    testCond((s == NATS_OK)
+             && (natsBuf_Len(buf) == 0)
+             && (natsBuf_Capacity(buf) == 5));
+
+    test("Check that changes are reflected in backend")
+    s = natsBuf_Append(buf, "abcd", 4);
+    testCond((s == NATS_OK)
+            && (natsBuf_Len(buf) == 4)
+            && (natsBuf_Capacity(buf) == 5)
+            && (natsBuf_Available(buf) > 0)
+            && (strcmp(backend, "abcd") == 0));
+
+    test("Changing backend is reflected in buffer: ");
+    backend[1] = 'x';
+    testCond((s == NATS_OK)
+             && (natsBuf_Data(buf)[1] == 'x'));
+
+    test("Append less than capacity does not expand buffer: ");
+    s = natsBuf_AppendByte(buf, 'e');
+    testCond((s == NATS_OK)
+            && (natsBuf_Len(buf) == 5)
+            && (natsBuf_Capacity(buf) == 5)
+            && (natsBuf_Available(buf) == 0));
+
+    test("Check natsBuf_Expand returns error for invalid arguments: ");
+    {
+        natsStatus ls;
+
+        ls = natsBuf_Expand(buf, -10);
+        if (ls != NATS_OK)
+            ls = natsBuf_Expand(buf, 0);
+        if (ls != NATS_OK)
+            ls = natsBuf_Expand(buf, natsBuf_Capacity(buf));
+        testCond(ls != NATS_OK);
+    }
+
+    test("Adding more causes expand: ");
+    oldCapacity = natsBuf_Capacity(buf);
+    s = natsBuf_Append(buf, "fghij", 5);
+    testCond((s == NATS_OK)
+            && (natsBuf_Len(buf) == 10)
+            && (natsBuf_Capacity(buf) > oldCapacity));
+
+    test("Check that the backend did not change");
+    testCond((s == NATS_OK)
+             && (strcmp(backend, "axcde") == 0));
+
+    test("Checking content: ");
+    testCond((s == NATS_OK)
+             && (natsBuf_Data(buf) != NULL)
+             && (strncmp(natsBuf_Data(buf), "axcdefghij", 10) == 0));
+
+    test("Destroying buffer does not affect backend: ");
+    natsBuf_Destroy(buf);
+    buf = NULL;
+    testCond(strcmp(backend, "axcde") == 0);
+
+    printf("\n== Buffer Init without data ==\n");
+
+    test("Create buffer owning its data: ");
+    s = natsBuf_Init(&stackBuf, 10);
+    testCond((s == NATS_OK)
+             && (buf = &stackBuf)
+             && (natsBuf_Len(buf) == 0)
+             && (natsBuf_Capacity(buf) == 10));
+
+    test("Append less than capacity does not expand buffer: ");
+    s = natsBuf_Append(buf, "abcdefghij", 10);
+    testCond((s == NATS_OK)
+            && (natsBuf_Len(buf) == 10)
+            && (natsBuf_Capacity(buf) == 10)
+            && (natsBuf_Available(buf) == 0));
+
+    test("Appending one more increases capacity: ");
+    oldCapacity = natsBuf_Capacity(buf);
+    s = natsBuf_AppendByte(buf, 'k');
+    testCond((s == NATS_OK)
+              && (natsBuf_Len(buf) == 11)
+              && (natsBuf_Capacity(buf) > oldCapacity)
+              && (natsBuf_Available(buf) > 0));
+
+    test("Checking content: ");
+    testCond((s == NATS_OK)
+             && (natsBuf_Data(buf) != NULL)
+             && (strncmp(natsBuf_Data(buf), "abcdefghijk", 11) == 0));
+
+    test("Destroying buffer: ");
+    natsBuf_Destroy(buf);
+    testCond((natsBuf_Data(buf) == NULL)
+                && (natsBuf_Len(buf) == 0)
+                && (natsBuf_Capacity(buf) == 0)
+                && (natsBuf_Available(buf) == 0));
+    buf = NULL;
+
+    printf("\n== Buffer Init with data ==\n");
+
+    memset(backend, 0, sizeof(backend));
+
+    test("Create buffer with backend: ");
+    s = natsBuf_InitWithBackend(&stackBuf, backend, 0, 5);
+    testCond((s == NATS_OK)
+             && (buf = &stackBuf)
+             && (natsBuf_Len(buf) == 0)
+             && (natsBuf_Capacity(buf) == 5));
+
+    test("Check that changes are reflected in backend: ")
+    s = natsBuf_Append(buf, "abcd", 4);
+    testCond((s == NATS_OK)
+            && (natsBuf_Len(buf) == 4)
+            && (natsBuf_Capacity(buf) == 5)
+            && (natsBuf_Available(buf) > 0)
+            && (strcmp(backend, "abcd") == 0));
+
+    test("Changing backend is reflected in buffer: ");
+    testCond((s == NATS_OK)
+             && (backend[1] = 'x')
+             && (natsBuf_Data(buf)[1] == 'x'));
+
+    test("Append less than capacity does not expand buffer: ");
+    s = natsBuf_AppendByte(buf, 'e');
+    testCond((s == NATS_OK)
+            && (natsBuf_Len(buf) == 5)
+            && (natsBuf_Capacity(buf) == 5)
+            && (natsBuf_Available(buf) == 0));
+
+    test("Adding more causes expand: ");
+    s = natsBuf_Append(buf, "fghij", 5);
+    testCond((s == NATS_OK)
+            && (natsBuf_Len(buf) == 10)
+            && (natsBuf_Capacity(buf) >= 10));
+
+    test("Check that the backend did not change");
+    testCond((s == NATS_OK)
+             && (strcmp(backend, "axcde") == 0));
+
+    test("Checking content: ");
+    testCond((s == NATS_OK)
+             && (natsBuf_Data(buf) != NULL)
+             && (strncmp(natsBuf_Data(buf), "axcdefghij", 10) == 0));
+
+    test("Destroying buffer does not affect backend: ");
+    natsBuf_Destroy(buf);
+    testCond(strcmp(backend, "axcde") == 0);
+
+    test("Destroyed buffer state is clean: ");
+    testCond((s == NATS_OK)
+             && (natsBuf_Data(buf) == NULL)
+             && (natsBuf_Len(buf) == 0)
+             && (natsBuf_Capacity(buf) == 0)
+             && (natsBuf_Available(buf) == 0));
+
+    buf = NULL;
+
+    test("Check maximum size: ");
+    s = natsBuf_Create(&buf, 5);
+    IFOK(s, natsBuf_Append(buf, "abcd", 4));
+    IFOK(s, natsBuf_Append(buf, "fake size that goes over int max size", 0x7FFFFFFC));
+    testCond(s == NATS_NO_MEMORY);
+
+    test("Check maximum size (append byte): ");
+    buf->len = 0x7FFFFFFE;
+    s = natsBuf_Append(buf, "e", 1);
+    testCond(s == NATS_NO_MEMORY);
+
+    natsBuf_Destroy(buf);
+    buf = NULL;
+
+    test("Consume half: ");
+    s = natsBuf_Create(&buf, 10);
+    IFOK(s, natsBuf_Append(buf, "abcdefghij", 10));
+    if (s == NATS_OK)
+        natsBuf_Consume(buf, 5);
+    testCond((s == NATS_OK)
+             && (natsBuf_Len(buf) == 5)
+             && (strncmp(natsBuf_Data(buf), "fghij", 5) == 0)
+             && (natsBuf_Available(buf) == 5)
+             && (*(buf->pos) == 'f'));
+
+    test("Consume rest: ");
+    natsBuf_Consume(buf, 5);
+    testCond((s == NATS_OK)
+             && (natsBuf_Len(buf) == 0)
+             && (natsBuf_Available(buf) == 10)
+             && (*(buf->pos) == 'f'));
+
+    natsBuf_Destroy(buf);
+    buf = NULL;
+
+    test("MoveTo (forward): ");
+    s = natsBuf_Create(&buf, 100);
+    if (s == NATS_OK)
+    {
+        memcpy(natsBuf_Data(buf), "this is a test", 14);
+        natsBuf_MoveTo(buf, 14);
+        memcpy(natsBuf_Data(buf)+14, " of move by", 11);
+        natsBuf_MoveTo(buf, 14+11);
+    }
+    IFOK(s, natsBuf_AppendByte(buf, '\0'));
+    testCond((s == NATS_OK)
+                && (natsBuf_Len(buf) == 26)
+                && (strcmp(natsBuf_Data(buf), "this is a test of move by") == 0));
+
+    test("MoveTo (backward): ");
+    natsBuf_MoveTo(buf, 14);
+    s = natsBuf_AppendByte(buf, '\0');
+    testCond((s == NATS_OK)
+            && (natsBuf_Len(buf) == 15)
+            && (strcmp(natsBuf_Data(buf), "this is a test") == 0));
+
+    natsBuf_Destroy(buf);
+    buf = NULL;
+}
+
+static void
+test_natsParseInt64(void)
+{
+    int64_t n;
+
+    test("Parse with non numeric: ");
+    n = nats_ParseInt64("a", 1);
+    testCond(n == -1);
+
+    test("Parse with NULL buffer: ");
+    n = nats_ParseInt64(NULL, 0);
+    testCond(n == -1);
+
+    test("Parse with 0 buffer size: ");
+    n = nats_ParseInt64("whatever", 0);
+    testCond(n == -1);
+
+    test("Parse with '0': ");
+    n = nats_ParseInt64("0", 1);
+    testCond(n == 0);
+
+    test("Parse with '1': ");
+    n = nats_ParseInt64("1", 1);
+    testCond(n == 1);
+
+    test("Parse with '12': ");
+    n = nats_ParseInt64("12", 2);
+    testCond(n == 12);
+
+    test("Parse with '-12': ");
+    n = nats_ParseInt64("-12", 3);
+    testCond(n == -1);
+
+    test("Parse with trailing spaces: ");
+    n = nats_ParseInt64("12 ", 3);
+    testCond(n == -1);
+
+    test("Parse with leading spaces: ");
+    n = nats_ParseInt64(" 12", 3);
+    testCond(n == -1);
+
+    test("Parse with 'INT64_MAX': ");
+    n = nats_ParseInt64("9223372036854775807", 19);
+    testCond(n == INT64_MAX);
+
+    test("Parse with overflow(1): ");
+    n = nats_ParseInt64("9223372036854775809", 19);
+    testCond(n == -1);
+
+    test("Parse with overflow(2): ");
+    n = nats_ParseInt64("92233720368547758099223372036854775809", 38);
+    testCond(n == -1);
+
+    test("Parse with '12345': ");
+    n = nats_ParseInt64("12345", 5);
+    testCond(n == 12345);
+
+    test("Parse with '123.45': ");
+    n = nats_ParseInt64("123.45", 6);
+    testCond(n == -1);
+}
+
+static void
+test_natsParseControl(void)
+{
+    natsStatus  s;
+    natsControl c;
+
+    c.op   = NULL;
+    c.args = NULL;
+
+    test("Test with NULL line: ");
+    s = nats_ParseControl(&c, NULL);
+    testCond(s == NATS_PROTOCOL_ERROR);
+
+    test("Test line with single op: ");
+    s = nats_ParseControl(&c, "op");
+    testCond((s == NATS_OK)
+             && (c.op != NULL)
+             && (strcmp(c.op, "op") == 0)
+             && (c.args == NULL));
+
+    free(c.op);
+    free(c.args);
+    c.op = NULL;
+    c.args = NULL;
+
+    test("Test line with trailing spaces: ");
+    s = nats_ParseControl(&c, "op   ");
+    testCond((s == NATS_OK)
+             && (c.op != NULL)
+             && (strcmp(c.op, "op") == 0)
+             && (c.args == NULL));
+
+    free(c.op);
+    free(c.args);
+    c.op = NULL;
+    c.args = NULL;
+
+    test("Test line with op and args: ");
+    s = nats_ParseControl(&c, "op    args");
+    testCond((s == NATS_OK)
+             && (c.op != NULL)
+             && (strcmp(c.op, "op") == 0)
+             && (c.args != NULL)
+             && (strcmp(c.args, "args") == 0));
+
+    free(c.op);
+    free(c.args);
+    c.op = NULL;
+    c.args = NULL;
+
+    test("Test line with op and args and trailing spaces: ");
+    s = nats_ParseControl(&c, "op   args  ");
+    testCond((s == NATS_OK)
+             && (c.op != NULL)
+             && (strcmp(c.op, "op") == 0)
+             && (c.args != NULL)
+             && (strcmp(c.args, "args") == 0));
+
+    free(c.op);
+    free(c.args);
+    c.op = NULL;
+    c.args = NULL;
+
+    test("Test line with op and args args: ");
+    s = nats_ParseControl(&c, "op   args  args   ");
+    testCond((s == NATS_OK)
+             && (c.op != NULL)
+             && (strcmp(c.op, "op") == 0)
+             && (c.args != NULL)
+             && (strcmp(c.args, "args  args") == 0));
+
+    free(c.op);
+    free(c.args);
+    c.op = NULL;
+    c.args = NULL;
+}
+
+static void
+test_natsNormalizeErr(void)
+{
+    char error[1024];
+    char expected[256];
+
+    test("Check typical -ERR: ");
+
+    snprintf(expected, sizeof(expected), "%s", "Simple Error");
+    snprintf(error, sizeof(error), "-ERR '%s'", expected);
+    nats_NormalizeErr(error);
+    testCond(strcmp(error, expected) == 0);
+
+    test("Check -ERR without quotes: ");
+    snprintf(expected, sizeof(expected), "%s", "Error Without Quotes");
+    snprintf(error, sizeof(error), "-ERR %s", expected);
+    nats_NormalizeErr(error);
+    testCond(strcmp(error, expected) == 0);
+
+    test("Check -ERR with spaces: ");
+    snprintf(expected, sizeof(expected), "%s", "Error With Surrounding Spaces");
+    snprintf(error, sizeof(error), "-ERR    '%s'    ", expected);
+    nats_NormalizeErr(error);
+    testCond(strcmp(error, expected) == 0);
+
+    test("Check -ERR with spaces and without quotes: ");
+    snprintf(expected, sizeof(expected), "%s", "Error With Surrounding Spaces And Without Quotes");
+    snprintf(error, sizeof(error), "-ERR     %s     ", expected);
+    nats_NormalizeErr(error);
+    testCond(strcmp(error, expected) == 0);
+
+    test("Check -ERR with quote on the left: ");
+    snprintf(expected, sizeof(expected), "%s", "Error With Quote On Left");
+    snprintf(error, sizeof(error), "-ERR '%s", expected);
+    nats_NormalizeErr(error);
+    testCond(strcmp(error, expected) == 0);
+
+    test("Check -ERR with quote on right: ");
+    snprintf(expected, sizeof(expected), "%s", "Error With Quote On Right");
+    snprintf(error, sizeof(error), "-ERR %s'", expected);
+    nats_NormalizeErr(error);
+    testCond(strcmp(error, expected) == 0);
+
+    test("Check -ERR with spaces and single quote: ");
+    snprintf(error, sizeof(error), "%s", "-ERR      '      ");
+    nats_NormalizeErr(error);
+    testCond(error[0] == '\0');
+}
+
+static void
+test_natsMutex(void)
+{
+    natsStatus  s;
+    natsMutex   *m = NULL;
+    bool        locked = false;
+
+    test("Create mutex: ");
+    s = natsMutex_Create(&m);
+    testCond(s == NATS_OK);
+
+    test("Lock: ");
+    natsMutex_Lock(m);
+    testCond(1);
+
+    test("Recursive locking: ");
+    locked = natsMutex_TryLock(m);
+    testCond(locked);
+
+    test("Release recursive lock: ");
+    natsMutex_Unlock(m);
+    testCond(1);
+
+    test("Unlock: ");
+    natsMutex_Unlock(m);
+    testCond(1);
+
+    test("Destroy: ");
+    natsMutex_Destroy(m);
+    testCond(1);
+}
+
+static void
+testThread(void *arg)
+{
+    struct threadArg *tArg = (struct threadArg*) arg;
+
+    natsMutex_Lock(tArg->m);
+
+    tArg->control = 1;
+    tArg->current = natsThread_IsCurrent(tArg->t);
+
+    natsMutex_Unlock(tArg->m);
+}
+
+static void
+sumThread(void *arg)
+{
+    struct threadArg *tArg = (struct threadArg*) arg;
+
+    natsMutex_Lock(tArg->m);
+
+    tArg->sum++;
+
+    natsMutex_Unlock(tArg->m);
+}
+
+static int NUM_THREADS = 1000;
+
+static void
+test_natsThread(void)
+{
+    natsStatus          s  = NATS_OK;
+    natsMutex           *m = NULL;
+    natsThread          *t = NULL;
+    bool                current = false;
+    struct threadArg    tArgs;
+    natsThread          **threads = NULL;
+    int                 i,j;
+
+    if (valgrind)
+        NUM_THREADS = 100;
+
+    test("Create threads array: ");
+    threads = (natsThread**) calloc(NUM_THREADS, sizeof(natsThread*));
+    if (threads == NULL)
+        s = NATS_NO_MEMORY;
+    IFOK(s, natsMutex_Create(&m));
+    testCond(s == NATS_OK);
+
+    natsMutex_Lock(m);
+
+    tArgs.m         = m;
+    tArgs.control   = 0;
+    tArgs.current   = false;
+
+    test("Create thread: ");
+    s = natsThread_Create(&t, testThread, &tArgs);
+    testCond(s == NATS_OK);
+
+    tArgs.t = t;
+
+    test("Check if thread current from other thread: ");
+    current = natsThread_IsCurrent(t);
+    testCond(!current);
+
+    natsMutex_Unlock(m);
+
+    test("Joining thread: ")
+    natsThread_Join(t);
+    testCond(1);
+
+    natsMutex_Lock(m);
+
+    test("Control updated: ");
+    testCond(tArgs.control == 1);
+
+    test("Check thread current works from current thread: ");
+    testCond(tArgs.current);
+
+    test("Destroy thread: ");
+    natsThread_Destroy(t);
+    testCond(1);
+
+    tArgs.sum = 0;
+
+    test("Creating multiple threads: ");
+    for (i=0; (s == NATS_OK) && (i<NUM_THREADS); i++)
+        s = natsThread_Create(&(threads[i]), sumThread, &tArgs);
+    testCond(s == NATS_OK);
+
+    if (s != NATS_OK)
+        i--;
+
+    natsMutex_Unlock(m);
+
+    test("Waiting all done: ");
+    for (j=0; j<i; j++)
+    {
+        natsThread_Join(threads[j]);
+        natsThread_Destroy(threads[j]);
+    }
+    testCond(s == NATS_OK);
+
+    test("Checking sum: ");
+    testCond((s == NATS_OK) && (tArgs.sum == NUM_THREADS));
+
+    natsMutex_Destroy(m);
+
+    free(threads);
+}
+
+static void
+testSignal(void *arg)
+{
+    struct threadArg *tArg = (struct threadArg*) arg;
+
+    natsMutex_Lock(tArg->m);
+
+    tArg->control = 1;
+    natsCondition_Signal(tArg->c);
+
+    natsMutex_Unlock(tArg->m);
+}
+
+static void
+testBroadcast(void *arg)
+{
+    struct threadArg *tArg = (struct threadArg*) arg;
+
+    natsMutex_Lock(tArg->m);
+
+    tArg->sum++;
+    natsCondition_Signal(tArg->c);
+
+    while (tArg->control == 0)
+        natsCondition_Wait(tArg->b, tArg->m);
+
+    tArg->sum--;
+
+    natsMutex_Unlock(tArg->m);
+}
+
+static void
+_unblockLongWait(void *closure)
+{
+    struct threadArg *args = (struct threadArg*) closure;
+
+    nats_Sleep(500);
+    natsMutex_Lock(args->m);
+    natsCondition_Signal(args->c);
+    natsMutex_Unlock(args->m);
+}
+
+static void
+test_natsCondition(void)
+{
+    natsStatus          s;
+    natsMutex           *m  = NULL;
+    natsThread          *t1 = NULL;
+    natsThread          *t2 = NULL;
+    natsCondition       *c1 = NULL;
+    natsCondition       *c2 = NULL;
+    struct threadArg    tArgs;
+    int64_t             before = 0;
+    int64_t             diff   = 0;
+    int64_t             target = 0;
+
+    test("Create mutex: ");
+    s = natsMutex_Create(&m);
+    testCond(s == NATS_OK);
+
+    test("Create condition variables: ");
+    s = natsCondition_Create(&c1);
+    IFOK(s, natsCondition_Create(&c2));
+    testCond(s == NATS_OK);
+
+    natsMutex_Lock(m);
+
+    tArgs.m       = m;
+    tArgs.c       = c1;
+    tArgs.control = 0;
+
+    test("Create thread: ");
+    s = natsThread_Create(&t1, testSignal, &tArgs);
+    testCond(s == NATS_OK);
+
+    test("Wait for signal: ");
+    while (tArgs.control != 1)
+        natsCondition_Wait(c1, m);
+
+    natsThread_Join(t1);
+    natsThread_Destroy(t1);
+    t1 = NULL;
+    testCond(tArgs.control == 1);
+
+    test("Wait timeout: ");
+    before = nats_Now();
+    s = natsCondition_TimedWait(c1, m, 1000);
+    diff = (nats_Now() - before);
+    testCond((s == NATS_TIMEOUT)
+             && (diff >= 985) && (diff <= 1015));
+
+    test("Wait timeout with 0: ");
+    before = nats_Now();
+    s = natsCondition_TimedWait(c1, m, 0);
+    diff = (nats_Now() - before);
+    testCond((s == NATS_TIMEOUT)
+             && (diff >= 0) && (diff <= 10));
+
+    test("Wait timeout with negative: ");
+    before = nats_Now();
+    s = natsCondition_TimedWait(c1, m, -10);
+    diff = (nats_Now() - before);
+    testCond((s == NATS_TIMEOUT)
+             && (diff >= 0) && (diff <= 10));
+
+    test("Wait absolute time: ");
+    before = nats_Now();
+    target = nats_setTargetTime(1000);
+    s = natsCondition_AbsoluteTimedWait(c1, m, target);
+    diff = (nats_Now() - before);
+    testCond((s == NATS_TIMEOUT)
+             && (diff >= 985) && (diff <= 1015));
+
+    test("Wait absolute time in the past: ");
+    before = nats_Now();
+    target = nats_setTargetTime(-1000);
+    s = natsCondition_AbsoluteTimedWait(c1, m, target);
+    diff = (nats_Now() - before);
+    testCond((s == NATS_TIMEOUT)
+             && (diff >= 0) && (diff <= 10));
+
+    test("Wait absolute time with very large value: ");
+    tArgs.control = 0;
+    s = natsThread_Create(&t1, _unblockLongWait, &tArgs);
+    if (s == NATS_OK)
+    {
+        before = nats_Now();
+        target = nats_setTargetTime(0x7FFFFFFFFFFFFFFF);
+        s = natsCondition_AbsoluteTimedWait(c1, m, target);
+        diff = (nats_Now() - before);
+    }
+    testCond((s == NATS_OK)
+             && (diff >= 400) && (diff <= 600));
+
+    natsThread_Join(t1);
+    natsThread_Destroy(t1);
+    t1 = NULL;
+
+    test("Signal before wait: ");
+    tArgs.control = 0;
+
+    test("Create thread: ");
+    s = natsThread_Create(&t1, testSignal, &tArgs);
+    testCond(s == NATS_OK);
+
+    while (tArgs.control == 0)
+    {
+        natsMutex_Unlock(m);
+        nats_Sleep(1000);
+        natsMutex_Lock(m);
+    }
+
+    s = natsCondition_TimedWait(c1, m, 1000);
+    testCond(s == NATS_TIMEOUT);
+
+    natsThread_Join(t1);
+    natsThread_Destroy(t1);
+    t1 = NULL;
+
+    test("Broadcast: ");
+    tArgs.control = 0;
+    tArgs.sum     = 0;
+    tArgs.b       = c2;
+
+    s = natsThread_Create(&t1, testBroadcast, &tArgs);
+    IFOK(s, natsThread_Create(&t2, testBroadcast, &tArgs));
+    if (s != NATS_OK)
+    {
+        natsMutex_Unlock(m);
+        FAIL("Unable to run test_natsCondition because got an error while creating thread!");
+    }
+
+    while (tArgs.sum != 2)
+        natsCondition_Wait(c1, m);
+
+    natsMutex_Unlock(m);
+
+    nats_Sleep(1000);
+
+    natsMutex_Lock(m);
+
+    tArgs.control = 1;
+    natsCondition_Broadcast(c2);
+
+    natsMutex_Unlock(m);
+
+    natsThread_Join(t1);
+    natsThread_Destroy(t1);
+    t1 = NULL;
+
+    natsThread_Join(t2);
+    natsThread_Destroy(t2);
+    t2 = NULL;
+
+    testCond(tArgs.sum == 0);
+
+    test("Destroy condition: ");
+    natsCondition_Destroy(c1);
+    natsCondition_Destroy(c2);
+    testCond(1);
+
+    natsMutex_Destroy(m);
+}
+
+static void
+testTimerCb(natsTimer *timer, void *arg)
+{
+    struct threadArg *tArg = (struct threadArg*) arg;
+
+    natsMutex_Lock(tArg->m);
+
+    tArg->timerFired++;
+    natsCondition_Signal(tArg->c);
+
+    natsMutex_Unlock(tArg->m);
+
+    if (tArg->control == 1)
+        natsTimer_Reset(timer, 500);
+    else if (tArg->control == 2)
+        natsTimer_Stop(timer);
+    else if (tArg->control == 3)
+        nats_Sleep(500);
+
+    natsMutex_Lock(tArg->m);
+
+    natsCondition_Signal(tArg->c);
+
+    natsMutex_Unlock(tArg->m);
+}
+
+static void
+stopTimerCb(natsTimer *timer, void *arg)
+{
+    struct threadArg *tArg = (struct threadArg*) arg;
+
+    natsMutex_Lock(tArg->m);
+
+    tArg->timerStopped++;
+    natsCondition_Signal(tArg->c);
+
+    natsMutex_Unlock(tArg->m);
+}
+
+static void
+_dummyTimerCB(natsTimer *timer, void *arg) {}
+
+static void
+_timerStopCB(natsTimer *timer, void *arg)
+{
+    natsTimer_Release(timer);
+}
+
+#define STOP_TIMER_AND_WAIT_STOPPED \
+        natsTimer_Stop(t); \
+        natsMutex_Lock(tArg.m); \
+        while (tArg.timerStopped == 0) \
+            natsCondition_Wait(tArg.c, tArg.m); \
+        natsMutex_Unlock(tArg.m)
+
+static void
+test_natsTimer(void)
+{
+    natsStatus          s;
+    natsTimer           *t = NULL;
+    struct threadArg    tArg;
+    int                 refs;
+
+    test("Setup test: ");
+    s = _createDefaultThreadArgsForCbTests(&tArg);
+    testCond(s == NATS_OK);
+
+    tArg.control      = 0;
+    tArg.timerFired   = 0;
+    tArg.timerStopped = 0;
+
+    test("Create timer: ");
+    s = natsTimer_Create(&t, testTimerCb, stopTimerCb, 400, &tArg);
+    testCond(s == NATS_OK);
+
+    test("Stop timer: ");
+    tArg.control = 0;
+    natsTimer_Stop(t);
+    nats_Sleep(600);
+    natsMutex_Lock(t->mu);
+    refs = t->refs;
+    natsMutex_Unlock(t->mu);
+    natsMutex_Lock(tArg.m);
+    testCond((tArg.timerFired == 0)
+             && (tArg.timerStopped == 1)
+             && (refs == 1)
+             && (nats_getTimersCount() == 0));
+    natsMutex_Unlock(tArg.m);
+
+    test("Firing of timer: ")
+    tArg.control      = 0;
+    tArg.timerStopped = 0;
+    natsTimer_Reset(t, 200);
+    nats_Sleep(1100);
+    natsTimer_Stop(t);
+    nats_Sleep(600);
+    natsMutex_Lock(t->mu);
+    refs = t->refs;
+    natsMutex_Unlock(t->mu);
+    natsMutex_Lock(tArg.m);
+    testCond((tArg.timerFired > 0)
+             && (tArg.timerFired <= 5)
+             && (tArg.timerStopped == 1)
+             && (refs == 1)
+             && (nats_getTimersCount() == 0));
+    natsMutex_Unlock(tArg.m);
+
+    test("Stop stopped timer: ");
+    tArg.control      = 0;
+    tArg.timerFired   = 0;
+    tArg.timerStopped = 0;
+    natsTimer_Reset(t, 100);
+    nats_Sleep(300);
+    natsTimer_Stop(t);
+    nats_Sleep(100);
+    natsTimer_Stop(t);
+    nats_Sleep(100);
+    natsMutex_Lock(t->mu);
+    refs = t->refs;
+    natsMutex_Unlock(t->mu);
+    natsMutex_Lock(tArg.m);
+    testCond((tArg.timerFired > 0)
+             && (tArg.timerStopped == 1)
+             && (refs == 1)
+             && (nats_getTimersCount() == 0));
+    natsMutex_Unlock(tArg.m);
+
+    tArg.control      = 1;
+    tArg.timerFired   = 0;
+    tArg.timerStopped = 0;
+    test("Reset from callback: ");
+    natsTimer_Reset(t, 250);
+    nats_Sleep(900);
+    natsTimer_Stop(t);
+    nats_Sleep(600);
+    natsMutex_Lock(t->mu);
+    refs = t->refs;
+    natsMutex_Unlock(t->mu);
+    natsMutex_Lock(tArg.m);
+    testCond((tArg.timerFired == 2)
+             && (tArg.timerStopped == 1)
+             && (refs == 1)
+             && nats_getTimersCount() == 0);
+    natsMutex_Unlock(tArg.m);
+
+    tArg.control      = 0;
+    tArg.timerFired   = 0;
+    tArg.timerStopped = 0;
+    test("Multiple Reset: ");
+    natsTimer_Reset(t, 1000);
+    natsTimer_Reset(t, 800);
+    natsTimer_Reset(t, 200);
+    natsTimer_Reset(t, 500);
+    nats_Sleep(600);
+    natsMutex_Lock(t->mu);
+    refs = t->refs;
+    natsMutex_Unlock(t->mu);
+    natsMutex_Lock(tArg.m);
+    testCond((tArg.timerFired == 1)
+             && (tArg.timerStopped == 0)
+             && (refs == 1)
+             && nats_getTimersCount() == 1);
+    natsMutex_Unlock(tArg.m);
+
+    STOP_TIMER_AND_WAIT_STOPPED;
+
+    tArg.control      = 3;
+    tArg.timerFired   = 0;
+    tArg.timerStopped = 0;
+    test("Check refs while in callback: ");
+    natsTimer_Reset(t, 1);
+
+    // Wait that it is in callback
+    natsMutex_Lock(tArg.m);
+    while (tArg.timerFired != 1)
+        natsCondition_Wait(tArg.c, tArg.m);
+    natsMutex_Unlock(tArg.m);
+
+    natsMutex_Lock(t->mu);
+    refs = t->refs;
+    natsMutex_Unlock(t->mu);
+    testCond((refs == 2)
+             && nats_getTimersCountInList() == 0
+             && nats_getTimersCount() == 1);
+
+    STOP_TIMER_AND_WAIT_STOPPED;
+
+    tArg.control        = 2;
+    tArg.timerFired     = 0;
+    tArg.timerStopped   = 0;
+    test("Stop from callback: ");
+    natsTimer_Reset(t, 250);
+    nats_Sleep(500);
+    natsMutex_Lock(t->mu);
+    refs = t->refs;
+    natsMutex_Unlock(t->mu);
+    natsMutex_Lock(tArg.m);
+    testCond((tArg.timerFired == 1)
+             && (tArg.timerStopped == 1)
+             && (refs == 1)
+             && (nats_getTimersCount() == 0));
+    natsMutex_Unlock(tArg.m);
+
+    tArg.control        = 3;
+    tArg.timerFired     = 0;
+    tArg.timerStopped   = 0;
+    test("Slow callback: ");
+    natsTimer_Reset(t, 100);
+    nats_Sleep(800);
+    natsTimer_Stop(t);
+    nats_Sleep(500);
+    natsMutex_Lock(t->mu);
+    refs = t->refs;
+    natsMutex_Unlock(t->mu);
+    natsMutex_Lock(tArg.m);
+    testCond((tArg.timerFired <= 3)
+             && (tArg.timerStopped == 1)
+             && (refs == 1)
+             && (nats_getTimersCount() == 0));
+    natsMutex_Unlock(tArg.m);
+
+    tArg.control        = 3;
+    tArg.timerFired     = 0;
+    tArg.timerStopped   = 0;
+    test("Stopped while in callback: ");
+    natsTimer_Reset(t, 100);
+    nats_Sleep(200);
+    natsTimer_Stop(t);
+    nats_Sleep(700);
+    natsMutex_Lock(t->mu);
+    refs = t->refs;
+    natsMutex_Unlock(t->mu);
+    natsMutex_Lock(tArg.m);
+    testCond((tArg.timerFired == 1)
+             && (tArg.timerStopped == 1)
+             && (refs == 1)
+             && (nats_getTimersCount() == 0));
+    natsMutex_Unlock(tArg.m);
+
+    tArg.control        = 4;
+    tArg.timerFired     = 0;
+    tArg.timerStopped   = 0;
+    test("Use very large timeout: ");
+    natsTimer_Reset(t, 0x7FFFFFFFFFFFFFFF);
+    nats_Sleep(200);
+    natsTimer_Stop(t);
+    natsMutex_Lock(t->mu);
+    refs = t->refs;
+    natsMutex_Unlock(t->mu);
+    natsMutex_Lock(tArg.m);
+    testCond((tArg.timerFired == 0)
+             && (tArg.timerStopped == 1)
+             && (refs == 1)
+             && (nats_getTimersCount() == 0));
+    natsMutex_Unlock(tArg.m);
+
+    test("Destroy timer: ");
+    natsMutex_Lock(t->mu);
+    t->refs++;
+    natsMutex_Unlock(t->mu);
+    natsTimer_Destroy(t);
+    natsMutex_Lock(t->mu);
+    refs = t->refs;
+    natsMutex_Unlock(t->mu);
+    testCond(refs == 1);
+    natsTimer_Release(t);
+
+    _destroyDefaultThreadArgs(&tArg);
+
+    // Create a timer that will not be stopped here to exercise
+    // code that cleans up timers when library is unloaded.
+    test("Create timer: ");
+    s = natsTimer_Create(&t, _dummyTimerCB, _timerStopCB, 1000, NULL);
+    testCond(s == NATS_OK);
+}
+
+static void
+test_natsUrl(void)
+{
+    natsStatus  s;
+    natsUrl     *u = NULL;
+
+    test("NULL: ");
+    s = natsUrl_Create(&u, NULL);
+    testCond((s != NATS_OK) && (u == NULL));
+
+    test("EMPTY: ");
+    s = natsUrl_Create(&u, "");
+    testCond((s != NATS_OK) && (u == NULL));
+
+    nats_clearLastError();
+
+    test("'localhost:':");
+    s = natsUrl_Create(&u, "localhost:");
+    testCond((s == NATS_OK)
+            && (u != NULL)
+            && (u->host != NULL)
+            && (strcmp(u->host, "localhost") == 0)
+            && (u->username == NULL)
+            && (u->password == NULL)
+            && (u->port == 4222)
+            && (strcmp(u->fullUrl, "nats://localhost:4222") == 0));
+    natsUrl_Destroy(u);
+    u = NULL;
+
+    test("'localhost:4223':");
+    s = natsUrl_Create(&u, "localhost:4223");
+    testCond((s == NATS_OK)
+            && (u != NULL)
+            && (u->host != NULL)
+            && (strcmp(u->host, "localhost") == 0)
+            && (u->username == NULL)
+            && (u->password == NULL)
+            && (u->port == 4223)
+            && (strcmp(u->fullUrl, "nats://localhost:4223") == 0));
+    natsUrl_Destroy(u);
+    u = NULL;
+
+    test("'tcp://localhost:4222':");
+    s = natsUrl_Create(&u, "tcp://localhost:4222");
+    testCond((s == NATS_OK)
+            && (u != NULL)
+            && (u->host != NULL)
+            && (strcmp(u->host, "localhost") == 0)
+            && (u->username == NULL)
+            && (u->password == NULL)
+            && (u->port == 4222));
+    natsUrl_Destroy(u);
+    u = NULL;
+
+    test("'tcp://localhost':");
+    s = natsUrl_Create(&u, "tcp://localhost");
+    testCond((s == NATS_OK)
+              && (u != NULL)
+              && (u->host != NULL)
+              && (strcmp(u->host, "localhost") == 0)
+              && (u->username == NULL)
+              && (u->password == NULL)
+              && (u->port == 4222));
+    natsUrl_Destroy(u);
+    u = NULL;
+
+    test("'localhost':");
+    s = natsUrl_Create(&u, "localhost");
+    testCond((s == NATS_OK)
+              && (u != NULL)
+              && (u->host != NULL)
+              && (strcmp(u->host, "localhost") == 0)
+              && (u->username == NULL)
+              && (u->password == NULL)
+              && (u->port == 4222));
+    natsUrl_Destroy(u);
+    u = NULL;
+
+    test("'tcp://[::1]:4222':");
+    s = natsUrl_Create(&u, "tcp://[::1]:4222");
+    testCond((s == NATS_OK)
+            && (u != NULL)
+            && (u->host != NULL)
+            && (strcmp(u->host, "[::1]") == 0)
+            && (u->username == NULL)
+            && (u->password == NULL)
+            && (u->port == 4222));
+    natsUrl_Destroy(u);
+    u = NULL;
+
+    test("'tcp://[::1]:':");
+    s = natsUrl_Create(&u, "tcp://[::1]:");
+    testCond((s == NATS_OK)
+            && (u != NULL)
+            && (u->host != NULL)
+            && (strcmp(u->host, "[::1]") == 0)
+            && (u->username == NULL)
+            && (u->password == NULL)
+            && (u->port == 4222));
+    natsUrl_Destroy(u);
+    u = NULL;
+
+    test("'tcp://[::1]':");
+    s = natsUrl_Create(&u, "tcp://[::1]");
+    testCond((s == NATS_OK)
+            && (u != NULL)
+            && (u->host != NULL)
+            && (strcmp(u->host, "[::1]") == 0)
+            && (u->username == NULL)
+            && (u->password == NULL)
+            && (u->port == 4222));
+    natsUrl_Destroy(u);
+    u = NULL;
+
+    test("'tcp://':");
+    s = natsUrl_Create(&u, "tcp://");
+    testCond((s == NATS_OK)
+              && (u != NULL)
+              && (u->host != NULL)
+              && (strcmp(u->host, "localhost") == 0)
+              && (u->username == NULL)
+              && (u->password == NULL)
+              && (u->port == 4222));
+    natsUrl_Destroy(u);
+    u = NULL;
+
+    test("'tcp://:':");
+    s = natsUrl_Create(&u, "tcp://:");
+    testCond((s == NATS_OK)
+              && (u != NULL)
+              && (u->host != NULL)
+              && (strcmp(u->host, "localhost") == 0)
+              && (u->username == NULL)
+              && (u->password == NULL)
+              && (u->port == 4222));
+    natsUrl_Destroy(u);
+    u = NULL;
+
+    test("'tcp://ivan:localhost:4222':");
+    s = natsUrl_Create(&u, "tcp://ivan:localhost:4222");
+    testCond((s == NATS_OK)
+              && (u != NULL)
+              && (u->host != NULL)
+              && (strcmp(u->host, "ivan:localhost") == 0)
+              && (u->username == NULL)
+              && (u->password == NULL)
+              && (u->port == 4222));
+    natsUrl_Destroy(u);
+    u = NULL;
+
+    test("'tcp://ivan:pwd:localhost:4222':");
+    s = natsUrl_Create(&u, "tcp://ivan:pwd:localhost:4222");
+    testCond((s == NATS_OK)
+              && (u != NULL)
+              && (u->host != NULL)
+              && (strcmp(u->host, "ivan:pwd:localhost") == 0)
+              && (u->username == NULL)
+              && (u->password == NULL)
+              && (u->port == 4222));
+    natsUrl_Destroy(u);
+    u = NULL;
+
+    test("'tcp://ivan@localhost:4222':");
+    s = natsUrl_Create(&u, "tcp://ivan@localhost:4222");
+    testCond((s == NATS_OK)
+              && (u != NULL)
+              && (u->host != NULL)
+              && (strcmp(u->host, "localhost") == 0)
+              && (u->username != NULL)
+              && (strcmp(u->username, "ivan") == 0)
+              && (u->password == NULL)
+              && (u->port == 4222));
+    natsUrl_Destroy(u);
+    u = NULL;
+
+    test("'tcp://ivan:pwd@localhost:4222':");
+    s = natsUrl_Create(&u, "tcp://ivan:pwd@localhost:4222");
+    testCond((s == NATS_OK)
+              && (u != NULL)
+              && (u->host != NULL)
+              && (strcmp(u->host, "localhost") == 0)
+              && (u->username != NULL)
+              && (strcmp(u->username, "ivan") == 0)
+              && (u->password != NULL)
+              && (strcmp(u->password, "pwd") == 0)
+              && (u->port == 4222));
+    natsUrl_Destroy(u);
+    u = NULL;
+
+    test("'tcp://ivan:pwd@localhost':");
+    s = natsUrl_Create(&u, "tcp://ivan:pwd@localhost");
+    testCond((s == NATS_OK)
+              && (u != NULL)
+              && (u->host != NULL)
+              && (strcmp(u->host, "localhost") == 0)
+              && (u->username != NULL)
+              && (strcmp(u->username, "ivan") == 0)
+              && (u->password != NULL)
+              && (strcmp(u->password, "pwd") == 0)
+              && (u->port == 4222));
+    natsUrl_Destroy(u);
+    u = NULL;
+
+    test("'tcp://@localhost:4222':");
+    s = natsUrl_Create(&u, "tcp://@localhost:4222");
+    testCond((s == NATS_OK)
+              && (u != NULL)
+              && (u->host != NULL)
+              && (strcmp(u->host, "localhost") == 0)
+              && (u->username == NULL)
+              && (u->password == NULL)
+              && (u->port == 4222));
+    natsUrl_Destroy(u);
+    u = NULL;
+
+    test("'tcp://@@localhost:4222':");
+    s = natsUrl_Create(&u, "tcp://@@localhost:4222");
+    testCond((s == NATS_OK)
+              && (u != NULL)
+              && (u->host != NULL)
+              && (strcmp(u->host, "localhost") == 0)
+              && (u->username != NULL)
+              && (strcmp(u->username, "@") == 0)
+              && (u->password == NULL)
+              && (u->port == 4222));
+    natsUrl_Destroy(u);
+    u = NULL;
+
+    test("'tcp://a:b:c@localhost:4222':");
+    s = natsUrl_Create(&u, "tcp://a:b:c@localhost:4222");
+    testCond((s == NATS_OK)
+              && (u != NULL)
+              && (u->host != NULL)
+              && (strcmp(u->host, "localhost") == 0)
+              && (u->username != NULL)
+              && (strcmp(u->username, "a") == 0)
+              && (u->password != NULL)
+              && (strcmp(u->password, "b:c") == 0)
+              && (u->port == 4222));
+    natsUrl_Destroy(u);
+    u = NULL;
+
+    test("'tcp://::a:b:c@localhost:4222':");
+    s = natsUrl_Create(&u, "tcp://::a:b:c@localhost:4222");
+    testCond((s == NATS_OK)
+              && (u != NULL)
+              && (u->host != NULL)
+              && (strcmp(u->host, "localhost") == 0)
+              && (u->username == NULL)
+              && (u->password != NULL)
+              && (strcmp(u->password, ":a:b:c") == 0)
+              && (u->port == 4222));
+    natsUrl_Destroy(u);
+    u = NULL;
+
+    test("'tcp://a:b@[::1]:4222':");
+    s = natsUrl_Create(&u, "tcp://a:b@[::1]:4222");
+    testCond((s == NATS_OK)
+              && (u != NULL)
+              && (u->host != NULL)
+              && (strcmp(u->host, "[::1]") == 0)
+              && (u->username != NULL)
+              && (strcmp(u->username, "a") == 0)
+              && (u->password != NULL)
+              && (strcmp(u->password, "b") == 0)
+              && (u->port == 4222));
+    natsUrl_Destroy(u);
+    u = NULL;
+
+    test("'tcp://a@[::1]:4222':");
+    s = natsUrl_Create(&u, "tcp://a@[::1]:4222");
+    testCond((s == NATS_OK)
+              && (u != NULL)
+              && (u->host != NULL)
+              && (strcmp(u->host, "[::1]") == 0)
+              && (u->username != NULL)
+              && (strcmp(u->username, "a") == 0)
+              && (u->password == NULL)
+              && (u->port == 4222));
+    natsUrl_Destroy(u);
+    u = NULL;
+
+    test("'tcp://a:b@[::1]:4222':");
+    s = natsUrl_Create(&u, "tcp://a:b@[::1]:4222");
+    testCond((s == NATS_OK)
+              && (u != NULL)
+              && (u->host != NULL)
+              && (strcmp(u->host, "[::1]") == 0)
+              && (u->username != NULL)
+              && (strcmp(u->username, "a") == 0)
+              && (u->password != NULL)
+              && (strcmp(u->password, "b") == 0)
+              && (u->port == 4222));
+    natsUrl_Destroy(u);
+    u = NULL;
+
+    test("'tcp://a:b@[::1]':");
+    s = natsUrl_Create(&u, "tcp://a:b@[::1]");
+    testCond((s == NATS_OK)
+              && (u != NULL)
+              && (u->host != NULL)
+              && (strcmp(u->host, "[::1]") == 0)
+              && (u->username != NULL)
+              && (strcmp(u->username, "a") == 0)
+              && (u->password != NULL)
+              && (strcmp(u->password, "b") == 0)
+              && (u->port == 4222));
+    natsUrl_Destroy(u);
+    u = NULL;
+
+    test("' tcp://localhost:4222':");
+    s = natsUrl_Create(&u, " tcp://localhost:4222");
+    testCond((s == NATS_OK)
+              && (u != NULL)
+              && (u->host != NULL)
+              && (strcmp(u->host, "localhost") == 0)
+              && (u->username == NULL)
+              && (u->password == NULL)
+              && (u->port == 4222));
+    natsUrl_Destroy(u);
+    u = NULL;
+
+    test("'tcp://localhost:4222 ':");
+    s = natsUrl_Create(&u, "tcp://localhost:4222 ");
+    testCond((s == NATS_OK)
+              && (u != NULL)
+              && (u->host != NULL)
+              && (strcmp(u->host, "localhost") == 0)
+              && (u->username == NULL)
+              && (u->password == NULL)
+              && (u->port == 4222));
+    natsUrl_Destroy(u);
+    u = NULL;
+
+    test("' tcp://localhost:4222 ':");
+    s = natsUrl_Create(&u, " tcp://localhost:4222 ");
+    testCond((s == NATS_OK)
+              && (u != NULL)
+              && (u->host != NULL)
+              && (strcmp(u->host, "localhost") == 0)
+              && (u->username == NULL)
+              && (u->password == NULL)
+              && (u->port == 4222));
+    natsUrl_Destroy(u);
+    u = NULL;
+
+    test("'nats://localhost:4222/subject':");
+    s = natsUrl_Create(&u, " nats://localhost:4222/subject");
+    testCond((s == NATS_OK)
+              && (u != NULL)
+              && (u->host != NULL)
+              && (strcmp(u->host, "localhost") == 0)
+              && (u->username == NULL)
+              && (u->password == NULL)
+              && (u->port == 4222)
+              && (strcmp(u->fullUrl, "nats://localhost:4222/subject") == 0));
+    natsUrl_Destroy(u);
+    u = NULL;
+
+    test("'tcp://localhost: 4222':");
+    s = natsUrl_Create(&u, "tcp://localhost: 4222");
+    testCond((s == NATS_INVALID_ARG)
+              && (u == NULL)
+              && (strstr(nats_GetLastError(NULL), "invalid port ' 4222'") != NULL));
+    nats_clearLastError();
+
+    test("'tcp://localhost:a4222':");
+    s = natsUrl_Create(&u, "tcp://localhost:a4222");
+    testCond((s == NATS_INVALID_ARG)
+              && (u == NULL)
+              && (strstr(nats_GetLastError(NULL), "invalid port 'a4222'") != NULL));
+    nats_clearLastError();
+
+    test("'tcp://localhost:2147483648':");
+    s = natsUrl_Create(&u, "tcp://localhost:2147483648");
+    testCond((s == NATS_INVALID_ARG)
+              && (u == NULL)
+              && (strstr(nats_GetLastError(NULL), "invalid port '2147483648'") != NULL));
+}
+
+static void
+test_natsCreateStringFromBuffer(void)
+{
+    natsStatus  s = NATS_OK;
+    natsBuffer  buf;
+    char        *str = NULL;
+
+    test("NULL buffer: ");
+    s = nats_CreateStringFromBuffer(&str, NULL);
+    testCond((s == NATS_OK)
+             && (str == NULL))
+
+    test("Init buffer: ");
+    s = natsBuf_Init(&buf, 10);
+    testCond(s == NATS_OK);
+
+    test("Empty buffer: ");
+    s = nats_CreateStringFromBuffer(&str, &buf);
+    testCond((s == NATS_OK)
+             && (str == NULL))
+
+    test("Append to buf: ");
+    s = natsBuf_Append(&buf, "123", 3);
+    testCond(s == NATS_OK);
+
+    test("Buffer containing '123': ");
+    s = nats_CreateStringFromBuffer(&str, &buf);
+    testCond((s == NATS_OK)
+             && (str != NULL)
+             && (strlen(str) == 3)
+             && (strcmp(str, "123") == 0));
+
+    test("Destroying the buffer does not affect the created string: ");
+    natsBuf_Cleanup(&buf);
+    testCond((str != NULL)
+             && (strlen(str) == 3)
+             && (strcmp(str, "123") == 0));
+
+    free(str);
+}
+
+#define INBOX_THREADS_COUNT     (10)
+#define INBOX_COUNT_PER_THREAD  (10000)
+#define INBOX_TOTAL             (INBOX_THREADS_COUNT * INBOX_COUNT_PER_THREAD)
+
+static void
+_testInbox(void *closure)
+{
+    struct threadArg    *args = (struct threadArg*) closure;
+    natsStatus          s     = NATS_OK;
+    natsInbox           *inbox;
+    void                *oldValue;
+
+    for (int i=0; (s == NATS_OK) && (i<INBOX_COUNT_PER_THREAD); i++)
+    {
+        inbox    = NULL;
+        oldValue = NULL;
+
+        s = natsInbox_Create(&inbox);
+        if (s == NATS_OK)
+            s = natsStrHash_Set(args->inboxes, inbox, true, (void*) 1, (void**) &oldValue);
+        if ((s == NATS_OK) && (oldValue != NULL))
+        {
+            printf("Duplicate inbox: %s\n", inbox);
+            s = NATS_ERR;
+        }
+
+        natsInbox_Destroy(inbox);
+    }
+
+    args->status = s;
+}
+
+static void
+test_natsInbox(void)
+{
+    natsStatus          s      = NATS_OK;
+    natsThread          *threads[INBOX_THREADS_COUNT];
+    struct threadArg    args[INBOX_THREADS_COUNT];
+    int                 i, j;
+    natsInbox           *key;
+    void                *oldInbox;
+    natsStrHash         *inboxes = NULL;
+    natsStrHashIter     iter;
+
+    test("Test inboxes are unique: ");
+    for (i=0; i<INBOX_THREADS_COUNT; i++)
+    {
+        args[i].status = NATS_OK;
+        args[i].inboxes    = NULL;
+        threads[i]         = NULL;
+    }
+
+    s = natsStrHash_Create(&inboxes, 16);
+
+    for (i=0; (s == NATS_OK) && (i<INBOX_THREADS_COUNT); i++)
+    {
+        s = natsStrHash_Create(&(args[i].inboxes), 16);
+        if (s == NATS_OK)
+            s = natsThread_Create(&(threads[i]), _testInbox, &(args[i]));
+    }
+
+    for (i=0; (i<INBOX_THREADS_COUNT); i++)
+    {
+        natsThread_Join(threads[i]);
+
+        if (s == NATS_OK)
+            s = args[i].status;
+        if (s == NATS_OK)
+        {
+            j = 0;
+
+            natsStrHashIter_Init(&iter, args[i].inboxes);
+            while ((s == NATS_OK)
+                    && natsStrHashIter_Next(&iter, &key, NULL))
+            {
+                j++;
+
+                s = natsStrHash_Set(inboxes, key, true, (void*) 1, &oldInbox);
+
+                natsStrHashIter_RemoveCurrent(&iter);
+            }
+
+            if (j != INBOX_COUNT_PER_THREAD)
+                s = NATS_ERR;
+
+            natsStrHashIter_Done(&iter);
+        }
+
+        natsThread_Destroy(threads[i]);
+    }
+    testCond(s == NATS_OK);
+
+    for (i=0; i<INBOX_THREADS_COUNT; i++)
+        natsStrHash_Destroy(args[i].inboxes);
+
+    natsStrHash_Destroy(inboxes);
+}
+
+static int HASH_ITER = 10000000;
+
+static void
+test_natsHashing(void)
+{
+    const char *keys[] = {"foo",
+                          "bar",
+                          "apcera.continuum.router.foo.bar",
+                          "apcera.continuum.router.foo.bar.baz"};
+    const char *longKey = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@$#%^&*()";
+
+    uint32_t results[] = {1058908168, 1061739001, 4242539713, 3332038527};
+    uint32_t r = 0;
+    uint32_t lr = 0;
+    natsStatus s = NATS_OK;
+    int64_t start, end;
+    int sizeLongKey = (int) strlen(longKey);
+
+    if (valgrind)
+        HASH_ITER = 10000;
+
+    test("Test hashing algo: ");
+    for (int i=0; i<(int)(sizeof(keys)/sizeof(char*)); i++)
+    {
+        r = natsStrHash_Hash(keys[i], (int) strlen(keys[i]));
+        if (r != results[i])
+        {
+            printf("Expected: %u got: %u\n", results[i], r);
+            s = NATS_ERR;
+            break;
+        }
+    }
+    testCond(s == NATS_OK);
+
+    test("Hashing performance: ");
+    s = NATS_OK;
+    start = nats_Now();
+    for (int i=0; i<HASH_ITER; i++)
+    {
+        r = natsStrHash_Hash(longKey, sizeLongKey);
+        if ((i > 0) && (r != lr))
+        {
+            s = NATS_ERR;
+            break;
+        }
+        lr = r;
+    }
+    end = nats_Now();
+    testCond((s == NATS_OK) && ((end - start) < 1000));
+}
+
+static void
+test_natsHash(void)
+{
+    natsStatus  s;
+    natsHash    *hash = NULL;
+    const char  *t1 = "this is a test";
+    const char  *t2 = "this is another test";
+    void        *oldval = NULL;
+    int         lastNumBkts = 0;
+    int         i;
+    int64_t     key;
+    int         values[40];
+    natsHashIter iter;
+
+    for (int i=0; i<40; i++)
+        values[i] = (i+1);
+
+    test("Create hash with invalid 0 size: ");
+    s = natsHash_Create(&hash, 0);
+    testCond((s != NATS_OK) && (hash == NULL));
+
+    test("Create hash with invalid negative size: ");
+    s = natsHash_Create(&hash, -2);
+    testCond((s != NATS_OK) && (hash == NULL));
+
+    nats_clearLastError();
+
+    test("Create hash ok: ");
+    s = natsHash_Create(&hash, 7);
+    testCond((s == NATS_OK) && (hash != NULL) && (hash->used == 0)
+             && (hash->numBkts == 8));
+
+    test("Set: ");
+    s = natsHash_Set(hash, 1234, (void*) t1, &oldval);
+    testCond((s == NATS_OK) && (oldval == NULL) && (hash->used == 1));
+
+    test("Set, get old value: ");
+    s = natsHash_Set(hash, 1234, (void*) t2, &oldval);
+    testCond((s == NATS_OK) && (oldval == t1) && (hash->used == 1))
+
+    test("Get, not found: ");
+    oldval = NULL;
+    oldval = natsHash_Get(hash, 3456);
+    testCond(oldval == NULL);
+
+    test("Get, found: ");
+    oldval = NULL;
+    oldval = natsHash_Get(hash, 1234);
+    testCond(oldval == t2);
+
+    test("Remove, not found: ");
+    oldval = NULL;
+    oldval = natsHash_Remove(hash, 3456);
+    testCond(oldval == NULL);
+
+    test("Remove, found: ");
+    oldval = NULL;
+    oldval = natsHash_Remove(hash, 1234);
+    testCond((oldval == t2) && (hash->used == 0));
+
+    test("Test collision: ");
+    oldval = NULL;
+    s = natsHash_Set(hash, 2, (void*) t1, &oldval);
+    if ((s == NATS_OK) && (oldval == NULL))
+        s = natsHash_Set(hash, 10, (void*) t2, &oldval);
+    testCond((s == NATS_OK)
+             && (oldval == NULL)
+             && (hash->used == 2)
+             && (hash->bkts[2] != NULL)
+             && (hash->bkts[2]->key == 10)
+             && (hash->bkts[2]->next != NULL)
+             && (hash->bkts[2]->next->key == 2));
+
+    test("Remove from collisions (front to back): ");
+    oldval = NULL;
+    oldval = natsHash_Remove(hash, 10);
+    if (oldval != t2)
+        s = NATS_ERR;
+    if (s == NATS_OK)
+    {
+        oldval = natsHash_Remove(hash, 2);
+        if (oldval != t1)
+            s = NATS_ERR;
+    }
+    testCond((s == NATS_OK) && (hash->used == 0));
+
+    test("Remove from collisions (back to front): ");
+    oldval = NULL;
+    s = natsHash_Set(hash, 2, (void*) t1, &oldval);
+    if ((s == NATS_OK) && (oldval == NULL))
+        s = natsHash_Set(hash, 10, (void*) t2, &oldval);
+    if (s == NATS_OK)
+    {
+        oldval = natsHash_Remove(hash, 2);
+        if (oldval != t1)
+            s = NATS_ERR;
+    }
+    if (s == NATS_OK)
+    {
+        oldval = natsHash_Remove(hash, 10);
+        if (oldval != t2)
+            s = NATS_ERR;
+    }
+    testCond((s == NATS_OK) && (hash->used == 0));
+
+    test("Grow: ");
+    for (int i=0; i<40; i++)
+    {
+        s = natsHash_Set(hash, (i+1), &(values[i]), &oldval);
+        if (oldval != NULL)
+            s = NATS_ERR;
+        if (s != NATS_OK)
+            break;
+    }
+    if (s == NATS_OK)
+    {
+        for (int i=0; i<40; i++)
+        {
+            oldval = natsHash_Get(hash, (i+1));
+            if ((oldval == NULL)
+                || ((*(int*)oldval) != values[i]))
+            {
+                s = NATS_ERR;
+                break;
+            }
+        }
+    }
+    testCond((s == NATS_OK)
+             && (hash->used == 40)
+             && (hash->numBkts > 8));
+    lastNumBkts = hash->numBkts;
+
+    test("Shrink: ");
+    for (int i=0; i<31; i++)
+    {
+        oldval = natsHash_Remove(hash, (i+1));
+        if ((oldval == NULL)
+            || ((*(int*)oldval) != values[i]))
+        {
+            s = NATS_ERR;
+            break;
+        }
+    }
+    testCond((s == NATS_OK)
+             && (hash->used == 9)
+             && (hash->numBkts < lastNumBkts));
+
+    test("Iterator: ");
+    natsHashIter_Init(&iter, hash);
+    i = 0;
+    while (natsHashIter_Next(&iter, &key, &oldval))
+    {
+        i++;
+        if (((key < 31) || (key > 40))
+            || (oldval == NULL)
+            || ((*(int*)oldval) != values[key-1]))
+        {
+            s = NATS_ERR;
+            break;
+        }
+    }
+    natsHashIter_Done(&iter);
+    testCond((s == NATS_OK) && (i == natsHash_Count(hash)));
+
+    test("Iterator, remove current: ");
+    natsHashIter_Init(&iter, hash);
+    while (natsHashIter_Next(&iter, &key, NULL))
+    {
+        s = natsHashIter_RemoveCurrent(&iter);
+        if (s != NATS_OK)
+            break;
+    }
+    testCond((s == NATS_OK)
+             && (natsHash_Count(hash) == 0)
+             && (hash->canResize == false)
+             && (hash->numBkts > 8));
+
+    natsHashIter_Done(&iter);
+
+    test("Grow again: ");
+    oldval = NULL;
+    for (int i=0; i<40; i++)
+    {
+        s = natsHash_Set(hash, (i+1), &(values[i]), &oldval);
+        if (oldval != NULL)
+            s = NATS_ERR;
+        if (s != NATS_OK)
+            break;
+    }
+    testCond((s == NATS_OK)
+             && (hash->used == 40)
+             && (hash->numBkts > 8));
+    lastNumBkts = hash->numBkts;
+
+    test("Iterator, remove current, hash does not shrink: ");
+    natsHashIter_Init(&iter, hash);
+    i = 0;
+    while (natsHashIter_Next(&iter, &key, NULL))
+    {
+        s = natsHashIter_RemoveCurrent(&iter);
+        if ((s != NATS_OK) || (++i == 31))
+            break;
+    }
+    testCond((s == NATS_OK)
+             && (natsHash_Count(hash) == 9)
+             && (hash->canResize == false)
+             && (hash->numBkts == lastNumBkts));
+
+    natsHashIter_Done(&iter);
+
+    test("After iterator done, shrink works: ");
+    oldval = NULL;
+    s = natsHash_Set(hash, 100, (void*) "last", &oldval);
+    if ((s == NATS_OK) && (oldval == NULL))
+    {
+        oldval = natsHash_Remove(hash, 100);
+        if ((oldval == NULL)
+            || (strcmp((const char*) oldval, "last") != 0))
+        {
+            s = NATS_ERR;
+        }
+    }
+    testCond((s == NATS_OK)
+             && hash->canResize
+             && (hash->numBkts != lastNumBkts));
+
+    test("Destroy: ");
+    natsHash_Destroy(hash);
+    hash = NULL;
+    testCond(1);
+
+    test("Create new: ");
+    s = natsHash_Create(&hash, 4);
+    testCond(s == NATS_OK);
+
+    test("Populate: ");
+    s = natsHash_Set(hash, 1, (void*) 1, NULL);
+    IFOK(s, natsHash_Set(hash, 2, (void*) 2, NULL));
+    IFOK(s, natsHash_Set(hash, 3, (void*) 3, NULL));
+    testCond(s == NATS_OK);
+
+    test("Remove one: ");
+    s = (natsHash_Remove(hash, 2) == (void*) 2) ? NATS_OK : NATS_ERR;
+    testCond(s == NATS_OK);
+
+    test("RemoveSingle fails if more than one: ");
+    s = natsHash_RemoveSingle(hash, &key, NULL);
+    testCond(s == NATS_ERR);
+    nats_clearLastError();
+
+    test("Remove second: ");
+    s = (natsHash_Remove(hash, 1) == (void*) 1) ? NATS_OK : NATS_ERR;
+    testCond(s == NATS_OK);
+
+    test("Remove single: ");
+    key = 0;
+    oldval = NULL;
+    s = natsHash_RemoveSingle(hash, &key, &oldval);
+    testCond((s == NATS_OK)
+                && (hash->used == 0)
+                && (key == 3)
+                && (oldval == (void*) 3));
+
+    natsHash_Destroy(hash);
+}
+
+static void
+test_natsStrHash(void)
+{
+    natsStatus  s;
+    natsStrHash *hash = NULL;
+    const char  *t1 = "this is a test";
+    const char  *t2 = "this is another test";
+    void        *oldval = NULL;
+    char        *myKey = NULL;
+    int         lastNumBkts = 0;
+    int         i;
+    char        *key;
+    int         values[40];
+    char        k[64];
+    uint32_t    hk;
+    natsStrHashIter iter;
+
+    for (int i=0; i<40; i++)
+        values[i] = (i+1);
+
+    test("Create hash with invalid 0 size: ");
+    s = natsStrHash_Create(&hash, 0);
+    testCond((s != NATS_OK) && (hash == NULL));
+
+    test("Create hash with invalid negative size: ");
+    s = natsStrHash_Create(&hash, -2);
+    testCond((s != NATS_OK) && (hash == NULL));
+
+    nats_clearLastError();
+
+    test("Create hash ok: ");
+    s = natsStrHash_Create(&hash, 7);
+    testCond((s == NATS_OK) && (hash != NULL) && (hash->used == 0)
+             && (hash->numBkts == 8));
+
+    test("Set: ");
+    s = natsStrHash_Set(hash, (char*) "1234", false, (void*) t1, &oldval);
+    testCond((s == NATS_OK) && (oldval == NULL) && (hash->used == 1));
+
+    test("Set, get old value: ");
+    s = natsStrHash_Set(hash, (char*) "1234", false, (void*) t2, &oldval);
+    testCond((s == NATS_OK) && (oldval == t1) && (hash->used == 1))
+
+    test("Get, not found: ");
+    oldval = NULL;
+    oldval = natsStrHash_Get(hash, (char*) "3456");
+    testCond(oldval == NULL);
+
+    test("Get, found: ");
+    oldval = NULL;
+    oldval = natsStrHash_Get(hash, (char*) "1234");
+    testCond(oldval == t2);
+
+    test("Remove, not found: ");
+    oldval = NULL;
+    oldval = natsStrHash_Remove(hash, (char*) "3456");
+    testCond(oldval == NULL);
+
+    test("Remove, found: ");
+    oldval = NULL;
+    oldval = natsStrHash_Remove(hash, (char*) "1234");
+    testCond((oldval == t2) && (hash->used == 0));
+
+    test("Grow: ");
+    for (int i=0; i<40; i++)
+    {
+        snprintf(k, sizeof(k), "%d", (i+1));
+        s = natsStrHash_Set(hash, k, true, &(values[i]), &oldval);
+        if (oldval != NULL)
+            s = NATS_ERR;
+        if (s != NATS_OK)
+            break;
+    }
+    if (s == NATS_OK)
+    {
+        for (int i=0; i<40; i++)
+        {
+            snprintf(k, sizeof(k), "%d", (i+1));
+            oldval = natsStrHash_Get(hash, k);
+            if ((oldval == NULL)
+                || ((*(int*)oldval) != values[i]))
+            {
+                s = NATS_ERR;
+                break;
+            }
+        }
+    }
+    testCond((s == NATS_OK)
+             && (hash->used == 40)
+             && (hash->numBkts > 8));
+    lastNumBkts = hash->numBkts;
+
+    test("Shrink: ");
+    for (int i=0; i<31; i++)
+    {
+        snprintf(k, sizeof(k), "%d", (i+1));
+        oldval = natsStrHash_Remove(hash, k);
+        if ((oldval == NULL)
+            || ((*(int*)oldval) != values[i]))
+        {
+            s = NATS_ERR;
+            break;
+        }
+    }
+    testCond((s == NATS_OK)
+             && (hash->used == 9)
+             && (hash->numBkts < lastNumBkts));
+
+    test("Iterator: ");
+    natsStrHashIter_Init(&iter, hash);
+    i = 0;
+    while (natsStrHashIter_Next(&iter, &key, &oldval))
+    {
+        i++;
+        if (((atoi(key) < 31) || (atoi(key) > 40))
+            || (oldval == NULL)
+            || ((*(int*)oldval) != values[atoi(key)-1]))
+        {
+            s = NATS_ERR;
+            break;
+        }
+    }
+    natsStrHashIter_Done(&iter);
+    testCond((s == NATS_OK) && (i == natsStrHash_Count(hash)));
+
+    test("Iterator, remove current: ");
+    natsStrHashIter_Init(&iter, hash);
+    while (natsStrHashIter_Next(&iter, &key, NULL))
+    {
+        s = natsStrHashIter_RemoveCurrent(&iter);
+        if (s != NATS_OK)
+            break;
+    }
+    testCond((s == NATS_OK)
+             && (natsStrHash_Count(hash) == 0)
+             && (hash->canResize == false)
+             && (hash->numBkts > 8));
+
+    natsStrHashIter_Done(&iter);
+
+    test("Grow again: ");
+    oldval = NULL;
+    for (int i=0; i<40; i++)
+    {
+        snprintf(k, sizeof(k), "%d", (i+1));
+        s = natsStrHash_Set(hash, k, true, &(values[i]), &oldval);
+        if (oldval != NULL)
+            s = NATS_ERR;
+        if (s != NATS_OK)
+            break;
+    }
+    testCond((s == NATS_OK)
+             && (hash->used == 40)
+             && (hash->numBkts > 8));
+    lastNumBkts = hash->numBkts;
+
+    test("Iterator, remove current, hash does not shrink: ");
+    natsStrHashIter_Init(&iter, hash);
+    i = 0;
+    while (natsStrHashIter_Next(&iter, &key, NULL))
+    {
+        s = natsStrHashIter_RemoveCurrent(&iter);
+        if ((s != NATS_OK) || (++i == 31))
+            break;
+    }
+    testCond((s == NATS_OK)
+             && (natsStrHash_Count(hash) == 9)
+             && (hash->canResize == false)
+             && (hash->numBkts == lastNumBkts));
+
+    natsStrHashIter_Done(&iter);
+
+    test("After iterator done, shrink works: ");
+    oldval = NULL;
+    s = natsStrHash_Set(hash, (char*) "100", true, (void*) "last", &oldval);
+    if ((s == NATS_OK) && (oldval == NULL))
+    {
+        oldval = natsStrHash_Remove(hash, (char*) "100");
+        if ((oldval == NULL)
+            || (strcmp((const char*) oldval, "last") != 0))
+        {
+            s = NATS_ERR;
+        }
+    }
+    testCond((s == NATS_OK)
+             && hash->canResize
+             && (hash->numBkts != lastNumBkts));
+
+    test("Copy key: ");
+    snprintf(k, sizeof(k), "%s", "keycopied");
+    hk = natsStrHash_Hash(k, (int) strlen(k));
+    s = natsStrHash_Set(hash, k, true, (void*) t1, &oldval);
+    if (s == NATS_OK)
+    {
+        // Changing the key does not affect the hash
+        snprintf(k, sizeof(k), "%s", "keychanged");
+        if (natsStrHash_Get(hash, (char*) "keycopied") != t1)
+            s = NATS_ERR;
+    }
+    testCond((s == NATS_OK)
+              && (oldval == NULL)
+              && (hash->bkts[hk & hash->mask]->hk == hk)
+              && (hash->bkts[hk & hash->mask]->freeKey == true));
+
+    test("Key referenced: ");
+    snprintf(k, sizeof(k), "%s", "keyreferenced");
+    hk = natsStrHash_Hash(k, (int) strlen(k));
+    s = natsStrHash_Set(hash, k, false, (void*) t2, &oldval);
+    if (s == NATS_OK)
+    {
+        // Changing the key affects the hash
+        snprintf(k, sizeof(k), "%s", "keychanged");
+        if (natsStrHash_Get(hash, (char*) "keyreferenced") == t2)
+            s = NATS_ERR;
+    }
+    testCond((s == NATS_OK)
+              && (oldval == NULL)
+              && (hash->bkts[hk & hash->mask]->hk == hk)
+              && (hash->bkts[hk & hash->mask]->freeKey == false)
+              && (strcmp(hash->bkts[hk & hash->mask]->key, "keychanged") == 0));
+
+    test("Key not copied, but asking to free when destroyed: ");
+    myKey = strdup("mykey");
+    hk = natsStrHash_Hash(myKey, (int) strlen(myKey));
+    s = natsStrHash_SetEx(hash, myKey, false, true, (void*) t1, &oldval);
+    testCond((s == NATS_OK)
+              && (oldval == NULL)
+              && (hash->bkts[hk & hash->mask]->hk == hk)
+              && (hash->bkts[hk & hash->mask]->freeKey == true));
+
+    test("Destroy: ");
+    natsStrHash_Destroy(hash);
+    hash = NULL;
+    testCond(1);
+
+    test("Create new: ");
+    s = natsStrHash_Create(&hash, 4);
+    testCond(s == NATS_OK);
+
+    test("Populate: ");
+    s = natsStrHash_Set(hash, (char*) "1", true, (void*) 1, NULL);
+    IFOK(s, natsStrHash_Set(hash, (char*) "2", true, (void*) 2, NULL));
+    IFOK(s, natsStrHash_Set(hash, (char*) "3", true, (void*) 3, NULL));
+    testCond(s == NATS_OK);
+
+    test("Remove one: ");
+    s = (natsStrHash_Remove(hash, (char*) "2") == (void*) 2) ? NATS_OK : NATS_ERR;
+    testCond(s == NATS_OK);
+
+    test("RemoveSingle fails if more than one: ");
+    s = natsStrHash_RemoveSingle(hash, &key, NULL);
+    testCond(s == NATS_ERR);
+    nats_clearLastError();
+
+    test("Remove second: ");
+    s = (natsStrHash_Remove(hash, (char*) "1") == (void*) 1) ? NATS_OK : NATS_ERR;
+    testCond(s == NATS_OK);
+
+    test("Remove single (copy of key): ");
+    key = NULL;
+    oldval = NULL;
+    s = natsStrHash_RemoveSingle(hash, &key, &oldval);
+    testCond((s == NATS_OK)
+                && (hash->used == 0)
+                && (strcmp(key, "3") == 0)
+                && (oldval == (void*) 3));
+    free(key);
+    key = NULL;
+    oldval = NULL;
+
+    test("Add key without copy: ");
+    s = natsStrHash_Set(hash, (char*) "4", false, (void*) 4, NULL);
+    testCond(s == NATS_OK);
+
+    test("Remove single (no copy of key): ");
+    s = natsStrHash_RemoveSingle(hash, &key, &oldval);
+    testCond((s == NATS_OK)
+                && (hash->used == 0)
+                && (strcmp(key, "4") == 0)
+                && (oldval == (void*) 4));
+
+    natsStrHash_Destroy(hash);
+}
+
+static const char*
+_dummyTokenHandler(void *closure)
+{
+    return "token";
+}
+
+static void
+_dummyErrHandler(natsConnection *nc, natsSubscription *sub, natsStatus err,
+                 void *closure)
+{
+    // do nothing
+}
+
+static void
+_dummyConnHandler(natsConnection *nc, void *closure)
+{
+    // do nothing
+}
+
+static natsStatus
+_dummyUserJWTCb(char **userJWT, char **customErrTxt, void *closure)
+{
+    // do nothing
+    return NATS_OK;
+}
+
+static natsStatus
+_dummySigCb(char **customErrTxt, unsigned char **psig, int *sigLen, const char* nonce, void *closure)
+{
+    // do nothing
+    return NATS_OK;
+}
+
+static void
+test_natsOptions(void)
+{
+    natsStatus  s;
+    natsOptions *opts = NULL;
+    natsOptions *cloned = NULL;
+    const char  *servers[] = {"1", "2", "3"};
+    const char  *servers2[] = {"1", "2", "3", "4"};
+    const char  *servers3[] = {" nats://localhost:4222", "nats://localhost:4223 ", " nats://localhost:4224 "};
+    const char  *servers3t[] = {"nats://localhost:4222", "nats://localhost:4223", "nats://localhost:4224"};
+
+    test("Create options: ");
+    s = natsOptions_Create(&opts);
+    testCond(s == NATS_OK);
+
+    test("Test defaults: ");
+    testCond((opts->allowReconnect == true)
+             && (opts->maxReconnect == 60)
+             && (opts->reconnectWait == 2 * 1000)
+             && (opts->timeout == 2 * 1000)
+             && (opts->pingInterval == 2 * 60 *1000)
+             && (opts->maxPingsOut == 2)
+             && (opts->ioBufSize == 32 * 1024)
+             && (opts->maxPendingMsgs == 65536)
+             && (opts->user == NULL)
+             && (opts->password == NULL)
+             && (opts->token == NULL)
+             && (opts->tokenCb == NULL)
+             && (opts->orderIP == 0)
+             && (opts->writeDeadline == natsLib_defaultWriteDeadline())
+             && !opts->noEcho
+             && !opts->retryOnFailedConnect
+             && !opts->ignoreDiscoveredServers)
+
+    test("Add URL: ");
+    s = natsOptions_SetURL(opts, "test");
+    testCond((s == NATS_OK)
+              && (opts->url != NULL)
+              && (strcmp(opts->url, "test") == 0));
+
+    test("Replace URL: ");
+    s = natsOptions_SetURL(opts, "test2");
+    testCond((s == NATS_OK)
+              && (opts->url != NULL)
+              && (strcmp(opts->url, "test2") == 0));
+
+    test("URL trimmed: ");
+    s = natsOptions_SetURL(opts, "   nats://localhost:4222   ");
+    testCond((s == NATS_OK)
+              && (opts->url != NULL)
+              && (strcmp(opts->url, "nats://localhost:4222") == 0));
+
+    test("Remove URL: ");
+    s = natsOptions_SetURL(opts, NULL);
+    testCond((s == NATS_OK)
+              && (opts->url == NULL));
+
+    test("Set Servers (invalid args): ");
+    s = natsOptions_SetServers(opts, servers, -2);
+    if (s != NATS_OK)
+        s = natsOptions_SetServers(opts, servers, 0);
+    testCond(s != NATS_OK);
+
+    test("Set Servers: ");
+    s = natsOptions_SetServers(opts, servers, 3);
+    testCond((s == NATS_OK)
+             && (opts->servers != NULL)
+             && (opts->serversCount == 3));
+
+    test("Replace Servers: ");
+    s = natsOptions_SetServers(opts, servers2, 4);
+    if ((s == NATS_OK) && (opts->servers != NULL) && (opts->serversCount == 4))
+    {
+        for (int i=0; i<4; i++)
+        {
+            if (strcmp(opts->servers[i], servers2[i]) != 0)
+            {
+                s = NATS_ERR;
+                break;
+            }
+        }
+    }
+    testCond(s == NATS_OK);
+
+    test("Trimmed servers: ")
+    s = natsOptions_SetServers(opts, servers3, 3);
+    if ((s == NATS_OK) && (opts->servers != NULL) && (opts->serversCount == 3))
+    {
+        for (int i=0; i<3; i++)
+        {
+            if (strcmp(opts->servers[i], servers3t[i]) != 0)
+            {
+                s = NATS_ERR;
+                break;
+            }
+        }
+    }
+    testCond(s == NATS_OK);
+
+    test("Remove servers: ");
+    s = natsOptions_SetServers(opts, NULL, 0);
+    testCond((s == NATS_OK)
+             && (opts->servers == NULL)
+             && (opts->serversCount == 0));
+
+    test("Set NoRandomize: ");
+    s = natsOptions_SetNoRandomize(opts, true);
+    testCond((s == NATS_OK) && (opts->noRandomize == true));
+
+    test("Remove NoRandomize: ");
+    s = natsOptions_SetNoRandomize(opts, false);
+    testCond((s == NATS_OK) && (opts->noRandomize == false));
+
+    test("Set Timeout (invalid args): ");
+    s = natsOptions_SetTimeout(opts, -10);
+    testCond(s != NATS_OK);
+
+    test("Set Timeout to zero: ");
+    s = natsOptions_SetTimeout(opts, 0);
+    testCond((s == NATS_OK) && (opts->timeout == 0));
+
+    test("Set Timeout: ");
+    s = natsOptions_SetTimeout(opts, 2000);
+    testCond((s == NATS_OK) && (opts->timeout == 2000));
+
+    test("Set Name: ");
+    s = natsOptions_SetName(opts, "test");
+    testCond((s == NATS_OK) && (opts->name != NULL)
+             && (strcmp(opts->name, "test") == 0));
+
+    test("Remove Name: ");
+    s = natsOptions_SetName(opts, NULL);
+    testCond((s == NATS_OK) && (opts->name == NULL));
+
+    test("Set Verbose: ");
+    s = natsOptions_SetVerbose(opts, true);
+    testCond((s == NATS_OK) && (opts->verbose == true));
+
+    test("Remove Verbose: ");
+    s = natsOptions_SetVerbose(opts, false);
+    testCond((s == NATS_OK) && (opts->verbose == false));
+
+    test("Set NoEcho: ");
+    s = natsOptions_SetNoEcho(opts, true);
+    testCond((s == NATS_OK) && (opts->noEcho == true));
+
+    test("Remove NoEcho: ");
+    s = natsOptions_SetNoEcho(opts, false);
+    testCond((s == NATS_OK) && (opts->noEcho == false));
+
+    test("Set RetryOnFailedConnect: ");
+    s = natsOptions_SetRetryOnFailedConnect(opts, true, _dummyConnHandler, (void*)1);
+    testCond((s == NATS_OK)
+            && (opts->retryOnFailedConnect == true)
+            && (opts->connectedCb == _dummyConnHandler)
+            && (opts->connectedCbClosure == (void*) 1));
+
+    test("Remove RetryOnFailedConnect: ");
+    // If `retry` is false, connect CB and closure are ignored and should
+    // be internally set to NULL.
+    s = natsOptions_SetRetryOnFailedConnect(opts, false, _dummyConnHandler, (void*)1);
+    testCond((s == NATS_OK)
+            && (opts->retryOnFailedConnect == false)
+            && (opts->connectedCb == NULL)
+            && (opts->connectedCbClosure == NULL));
+
+    test("Set Secure: ");
+    s = natsOptions_SetSecure(opts, true);
+#if defined(NATS_HAS_TLS)
+    testCond((s == NATS_OK) && (opts->secure == true));
+#else
+    testCond((s == NATS_ILLEGAL_STATE) && (opts->secure == false));
+#endif
+
+    test("Remove Secure: ");
+    s = natsOptions_SetSecure(opts, false);
+#if defined(NATS_HAS_TLS)
+    testCond((s == NATS_OK) && (opts->secure == false));
+#else
+    testCond((s == NATS_ILLEGAL_STATE) && (opts->secure == false));
+#endif
+
+    test("Set Pedantic: ");
+    s = natsOptions_SetPedantic(opts, true);
+    testCond((s == NATS_OK) && (opts->pedantic == true));
+
+    test("Remove Pedantic: ");
+    s = natsOptions_SetPedantic(opts, false);
+    testCond((s == NATS_OK) && (opts->pedantic == false));
+
+    test("Set Ping Interval (negative or 0 ok): ");
+    s = natsOptions_SetPingInterval(opts, -1000);
+    if ((s == NATS_OK) && (opts->pingInterval != -1000))
+        s = NATS_ERR;
+    IFOK(s, natsOptions_SetPingInterval(opts, 0));
+    if ((s == NATS_OK) && (opts->pingInterval != 0))
+        s = NATS_ERR;
+    IFOK(s, natsOptions_SetPingInterval(opts, 1000));
+    testCond((s == NATS_OK) && (opts->pingInterval == 1000));
+
+    test("Set MaxPingsOut: ");
+    s = natsOptions_SetMaxPingsOut(opts, -2);
+    IFOK(s, natsOptions_SetMaxPingsOut(opts, 0));
+    IFOK(s, natsOptions_SetMaxPingsOut(opts, 1));
+    IFOK(s, natsOptions_SetMaxPingsOut(opts, 10));
+    testCond((s == NATS_OK) && (opts->maxPingsOut == 10));
+
+    test("Set IOBufSize: ");
+    s = natsOptions_SetIOBufSize(opts, -1);
+    if ((s != NATS_OK) && (opts->ioBufSize == NATS_OPTS_DEFAULT_IO_BUF_SIZE))
+        s = natsOptions_SetIOBufSize(opts, 0);
+    if ((s == NATS_OK) && (opts->ioBufSize == 0))
+        s = natsOptions_SetIOBufSize(opts, 1024 * 1024);
+    testCond((s == NATS_OK) && (opts->ioBufSize == 1024 * 1024));
+
+    test("Set AllowReconnect: ");
+    s = natsOptions_SetAllowReconnect(opts, true);
+    testCond((s == NATS_OK) && (opts->allowReconnect == true));
+
+    test("Remove AllowReconnect: ");
+    s = natsOptions_SetAllowReconnect(opts, false);
+    testCond((s == NATS_OK) && (opts->allowReconnect == false));
+
+    test("Set MaxReconnect (negative ok): ");
+    s = natsOptions_SetMaxReconnect(opts, -10);
+    if ((s == NATS_OK) && (opts->maxReconnect != -10))
+        s = NATS_ERR;
+    IFOK(s, natsOptions_SetMaxReconnect(opts, 0));
+    if ((s == NATS_OK) && (opts->maxReconnect != 0))
+        s = NATS_ERR;
+    IFOK(s, natsOptions_SetMaxReconnect(opts, 10));
+    testCond((s == NATS_OK) && (opts->maxReconnect == 10));
+
+    test("Set Reconnect Wait (invalid args: ");
+    s = natsOptions_SetReconnectWait(opts, -1000);
+    testCond(s != NATS_OK);
+
+    test("Set Reconnect Wait: ");
+    s = natsOptions_SetReconnectWait(opts, 1000);
+    testCond((s == NATS_OK) && (opts->reconnectWait == 1000));
+
+    test("Remove Reconnect Wait: ");
+    s = natsOptions_SetReconnectWait(opts, 0);
+    testCond((s == NATS_OK) && (opts->reconnectWait == 0));
+
+    test("Set Max Pending Msgs (invalid args: ");
+    s = natsOptions_SetMaxPendingMsgs(opts, -1000);
+    if (s != NATS_OK)
+        s = natsOptions_SetMaxPendingMsgs(opts, 0);
+    testCond(s != NATS_OK);
+
+    test("Set Max Pending Msgs : ");
+    s = natsOptions_SetMaxPendingMsgs(opts, 10000);
+    testCond((s == NATS_OK) && (opts->maxPendingMsgs == 10000));
+
+    test("Set Error Handler: ");
+    s = natsOptions_SetErrorHandler(opts, _dummyErrHandler, NULL);
+    testCond((s == NATS_OK) && (opts->asyncErrCb == _dummyErrHandler));
+
+    test("Remove Error Handler: ");
+    s = natsOptions_SetErrorHandler(opts, NULL, NULL);
+    testCond((s == NATS_OK) && (opts->asyncErrCb == NULL));
+
+    test("Set ClosedCB: ");
+    s = natsOptions_SetClosedCB(opts, _dummyConnHandler, NULL);
+    testCond((s == NATS_OK) && (opts->closedCb == _dummyConnHandler));
+
+    test("Remove ClosedCB: ");
+    s = natsOptions_SetClosedCB(opts, NULL, NULL);
+    testCond((s == NATS_OK) && (opts->closedCb == NULL));
+
+    test("Set DisconnectedCB: ");
+    s = natsOptions_SetDisconnectedCB(opts, _dummyConnHandler, NULL);
+    testCond((s == NATS_OK) && (opts->disconnectedCb == _dummyConnHandler));
+
+    test("Remove DisconnectedCB: ");
+    s = natsOptions_SetDisconnectedCB(opts, NULL, NULL);
+    testCond((s == NATS_OK) && (opts->disconnectedCb == NULL));
+
+    test("Set ReconnectedCB: ");
+    s = natsOptions_SetReconnectedCB(opts, _dummyConnHandler, NULL);
+    testCond((s == NATS_OK) && (opts->reconnectedCb == _dummyConnHandler));
+
+    test("Remove ReconnectedCB: ");
+    s = natsOptions_SetReconnectedCB(opts, NULL, NULL);
+    testCond((s == NATS_OK) && (opts->reconnectedCb == NULL));
+
+    test("Set UserInfo: ");
+    s = natsOptions_SetUserInfo(opts, "ivan", "pwd");
+    testCond((s == NATS_OK)
+                && (strcmp(opts->user, "ivan") == 0)
+                && (strcmp(opts->password, "pwd") == 0));
+
+    test("Remove UserInfo: ");
+    s = natsOptions_SetUserInfo(opts, NULL, NULL);
+    testCond((s == NATS_OK) && (opts->user == NULL) && (opts->password == NULL));
+
+    test("Set Token: ");
+    s = natsOptions_SetToken(opts, "token");
+    testCond((s == NATS_OK) && (strcmp(opts->token, "token") == 0));
+
+    test("Remove Token: ");
+    s = natsOptions_SetToken(opts, NULL);
+    testCond((s == NATS_OK) && (opts->token == NULL));
+
+    test("Set TokenHandler: ");
+    s = natsOptions_SetTokenHandler(opts, _dummyTokenHandler, NULL);
+    testCond((s == NATS_OK) && (opts->tokenCb == _dummyTokenHandler)
+             && (strcmp(opts->tokenCb(NULL), "token") == 0));
+
+    test("Remove TokenHandler: ");
+    s = natsOptions_SetTokenHandler(opts, NULL, NULL);
+    testCond((s == NATS_OK) && (opts->tokenCb == NULL));
+
+    test("Set write deadline: ");
+    s = natsOptions_SetWriteDeadline(opts, 1000);
+    testCond((s == NATS_OK) && (opts->writeDeadline == 1000));
+
+    test("Remove write deadline: ");
+    s = natsOptions_SetWriteDeadline(opts, 0);
+    testCond((s == NATS_OK) && (opts->writeDeadline == 0));
+
+    test("IP order invalid values: ");
+    s = natsOptions_IPResolutionOrder(opts, -1);
+    if (s != NATS_OK)
+        s = natsOptions_IPResolutionOrder(opts, 1);
+    if (s != NATS_OK)
+        s = natsOptions_IPResolutionOrder(opts, 466);
+    if (s != NATS_OK)
+        s = natsOptions_IPResolutionOrder(opts, 644);
+    testCond(s != NATS_OK);
+
+    test("IP order valid values: ");
+    s = natsOptions_IPResolutionOrder(opts, 0);
+    if ((s == NATS_OK) && (opts->orderIP == 0))
+        s = natsOptions_IPResolutionOrder(opts, 4);
+    if ((s == NATS_OK) && (opts->orderIP == 4))
+        s = natsOptions_IPResolutionOrder(opts, 6);
+    if ((s == NATS_OK) && (opts->orderIP == 6))
+        s = natsOptions_IPResolutionOrder(opts, 46);
+    if ((s == NATS_OK) && (opts->orderIP == 46))
+        s = natsOptions_IPResolutionOrder(opts, 64);
+    testCond((s == NATS_OK) && (opts->orderIP == 64));
+
+    test("Set UseOldRequestStyle: ");
+    s = natsOptions_UseOldRequestStyle(opts, true);
+    testCond((s == NATS_OK) && (opts->useOldRequestStyle == true));
+
+    test("Remove UseOldRequestStyle: ");
+    s = natsOptions_UseOldRequestStyle(opts, false);
+    testCond((s == NATS_OK) && (opts->useOldRequestStyle == false));
+
+    test("Set SendAsap: ");
+    s = natsOptions_SetSendAsap(opts, true);
+    testCond((s == NATS_OK) && (opts->sendAsap == true));
+
+    test("Remove SendAsap: ");
+    s = natsOptions_SetSendAsap(opts, false);
+    testCond((s == NATS_OK) && (opts->sendAsap == false));
+
+    test("Set UserCreds: ");
+    s = natsOptions_SetUserCredentialsCallbacks(opts, _dummyUserJWTCb, (void*) 1, _dummySigCb, (void*) 2);
+    testCond((s == NATS_OK)
+                && (opts->userJWTHandler == _dummyUserJWTCb)
+                && (opts->userJWTClosure == (void*) 1)
+                && (opts->sigHandler == _dummySigCb)
+                && (opts->sigClosure == (void*) 2));
+
+    test("Remove UserCreds: ");
+    s = natsOptions_SetUserCredentialsCallbacks(opts, NULL, NULL, NULL, NULL);
+    testCond((s == NATS_OK)
+                && (opts->userJWTHandler == NULL)
+                && (opts->userJWTClosure == NULL)
+                && (opts->sigHandler == NULL)
+                && (opts->sigClosure == NULL));
+
+    test("Set UserCredsFromFile: ");
+    s = natsOptions_SetUserCredentialsFromFiles(opts, "foo", "bar");
+    testCond((s == NATS_OK)
+                && (opts->userCreds != NULL)
+                && (strcmp(opts->userCreds->userOrChainedFile, "foo") == 0)
+                && (strcmp(opts->userCreds->seedFile, "bar") == 0)
+                && (opts->userJWTHandler == natsConn_userFromFile)
+                && (opts->userJWTClosure == (void*) opts->userCreds)
+                && (opts->sigHandler == natsConn_signatureHandler)
+                && (opts->sigClosure == (void*) opts->userCreds));
+
+    test("Remove UserCredsFromFile: ");
+    s = natsOptions_SetUserCredentialsFromFiles(opts, NULL, NULL);
+    testCond((s == NATS_OK)
+            && (opts->userCreds == NULL)
+            && (opts->userJWTHandler == NULL)
+            && (opts->userJWTClosure == NULL)
+            && (opts->sigHandler == NULL)
+            && (opts->sigClosure == NULL));
+
+    test("Set NKey: ");
+    s = natsOptions_SetNKey(opts, "pubkey", _dummySigCb, (void*) 1);
+    testCond((s == NATS_OK)
+                && (opts->nkey != NULL)
+                && (strcmp(opts->nkey, "pubkey") == 0)
+                && (opts->sigHandler == _dummySigCb)
+                && (opts->sigClosure == (void*) 1));
+
+    test("Remove NKey: ");
+    s = natsOptions_SetNKey(opts, NULL, NULL, NULL);
+    testCond((s == NATS_OK)
+                && (opts->nkey == NULL)
+                && (opts->sigHandler == NULL)
+                && (opts->sigClosure == NULL));
+
+    test("Set NKeyFromSeed: ");
+    s = natsOptions_SetNKeyFromSeed(opts, "pubkey", "seed.file");
+    testCond((s == NATS_OK)
+                && (opts->nkey != NULL)
+                && (strcmp(opts->nkey, "pubkey") == 0)
+                && (opts->sigHandler == natsConn_signatureHandler)
+                && (opts->sigClosure == (void*) opts->userCreds)
+                && (opts->userCreds != NULL)
+                && (opts->userCreds->seedFile != NULL)
+                && (strcmp(opts->userCreds->seedFile, "seed.file") == 0));
+
+    test("Remove NKeyFromSeed: ");
+    s = natsOptions_SetNKeyFromSeed(opts, NULL, NULL);
+    testCond((s == NATS_OK)
+                && (opts->nkey == NULL)
+                && (opts->sigHandler == NULL)
+                && (opts->sigClosure == NULL)
+                && (opts->userCreds == NULL));
+
+    test("Disable no responders: ");
+    s = natsOptions_DisableNoResponders(opts, true);
+    testCond((s == NATS_OK) && opts->disableNoResponders);
+
+    test("Enable no responders: ");
+    s = natsOptions_DisableNoResponders(opts, false);
+    testCond((s == NATS_OK) && !opts->disableNoResponders);
+
+    test("Set custom inbox prefix: ");
+    s = natsOptions_SetCustomInboxPrefix(opts, "my.prefix");
+    testCond((s == NATS_OK)
+                && (opts->inboxPfx != NULL)
+                && (strcmp(opts->inboxPfx, "my.prefix.") == 0));
+
+    test("Clear custom inbox prefix: ");
+    s = natsOptions_SetCustomInboxPrefix(opts, NULL);
+    if ((s == NATS_OK) && (opts->inboxPfx == NULL))
+        s = natsOptions_SetCustomInboxPrefix(opts, "");
+    testCond((s == NATS_OK) && (opts->inboxPfx == NULL));
+
+    test("Set ignore discovered servers: ");
+    s = natsOptions_SetIgnoreDiscoveredServers(opts, true);
+    testCond((s == NATS_OK) && opts->ignoreDiscoveredServers);
+
+    test("Reset ignore discovered servers: ");
+    s = natsOptions_SetIgnoreDiscoveredServers(opts, false);
+    testCond((s == NATS_OK) && !opts->ignoreDiscoveredServers);
+
+    // Prepare some values for the clone check
+    s = natsOptions_SetURL(opts, "url");
+    IFOK(s, natsOptions_SetServers(opts, servers, 3));
+    IFOK(s, natsOptions_SetName(opts, "name"));
+    IFOK(s, natsOptions_SetPingInterval(opts, 3000));
+    IFOK(s, natsOptions_SetErrorHandler(opts, _dummyErrHandler, NULL));
+    IFOK(s, natsOptions_SetUserInfo(opts, "ivan", "pwd"));
+    IFOK(s, natsOptions_SetToken(opts, "token"));
+    IFOK(s, natsOptions_IPResolutionOrder(opts, 46));
+    IFOK(s, natsOptions_SetNoEcho(opts, true));
+    IFOK(s, natsOptions_SetRetryOnFailedConnect(opts, true, _dummyConnHandler, NULL));
+    if (s != NATS_OK)
+        FAIL("Unable to test natsOptions_clone() because of failure while setting");
+
+    test("Cloning: ");
+    s = NATS_OK;
+    cloned = natsOptions_clone(opts);
+    if (cloned == NULL)
+        s = NATS_NO_MEMORY;
+    else if ((cloned->pingInterval != 3000)
+             || (cloned->asyncErrCb != _dummyErrHandler)
+             || (cloned->name == NULL)
+             || (strcmp(cloned->name, "name") != 0)
+             || (cloned->url == NULL)
+             || (strcmp(cloned->url, "url") != 0)
+             || (cloned->servers == NULL)
+             || (cloned->serversCount != 3)
+             || (strcmp(cloned->user, "ivan") != 0)
+             || (strcmp(cloned->password, "pwd") != 0)
+             || (strcmp(cloned->token, "token") != 0)
+             || (cloned->orderIP != 46)
+             || (!cloned->noEcho)
+             || (!cloned->retryOnFailedConnect)
+             || (cloned->connectedCb != _dummyConnHandler))
+    {
+        s = NATS_ERR;
+    }
+    if (s == NATS_OK)
+    {
+        for (int i=0; i<3; i++)
+        {
+            if (strcmp(cloned->servers[i], servers[i]) != 0)
+            {
+                s = NATS_ERR;
+                break;
+            }
+        }
+    }
+    testCond(s == NATS_OK);
+
+    test("Destroy original does not affect clone: ");
+    natsOptions_Destroy(opts);
+    testCond((cloned != NULL)
+             && (cloned->url != NULL)
+             && (strcmp(cloned->url, "url") == 0));
+
+    natsOptions_Destroy(cloned);
+}
+
+static void
+test_natsSock_ReadLine(void)
+{
+    char        buffer[20];
+    natsStatus  s;
+    natsSockCtx ctx;
+
+    memset(&ctx, 0, sizeof(natsSockCtx));
+
+    snprintf(buffer, sizeof(buffer), "%s", "+OK\r\nPONG\r\nFOO\r\nxxx");
+    buffer[3] = '\0';
+
+    test("Read second line from buffer: ");
+    s = natsSock_ReadLine(&ctx, buffer, sizeof(buffer));
+    testCond((s == NATS_OK) && (strcmp(buffer, "PONG") == 0));
+
+    test("Read third line from buffer: ");
+    s = natsSock_ReadLine(&ctx, buffer, sizeof(buffer));
+    testCond((s == NATS_OK) && (strcmp(buffer, "FOO") == 0));
+
+    test("Next call should trigger recv, which is expected to fail: ");
+    s = natsSock_ReadLine(&ctx, buffer, sizeof(buffer));
+    testCond(s != NATS_OK);
+}
+
+static natsStatus
+_dummyJSONCb(void *userInfo, const char *fieldName, nats_JSONField *f)
+{
+    if (userInfo == NULL)
+        return NATS_OK;
+
+    if (strcmp(fieldName, "fail") == 0)
+        return nats_setError(NATS_INVALID_ARG, "%s", "on purpose");
+
+    *(uint64_t*)userInfo = f->value.vuint;
+    return NATS_OK;
+}
+
+static void
+test_natsJSON(void)
+{
+    natsStatus  s;
+    nats_JSON   *json = NULL;
+    char        buf[256];
+    int         i;
+    int         intVal = 0;
+    int64_t     longVal = 0;
+    char        *strVal = NULL;
+    bool        boolVal = false;
+    long double doubleVal = 0;
+    char        **arrVal = NULL;
+    bool        *arrBoolVal = NULL;
+    long double *arrDoubleVal = NULL;
+    int         *arrIntVal = NULL;
+    int64_t     *arrLongVal = NULL;
+    uint64_t    *arrULongVal = NULL;
+    nats_JSON   **arrObjVal = NULL;
+    nats_JSONArray **arrArrVal = NULL;
+    int         arrCount = 0;
+    uint64_t    ulongVal = 0;
+    nats_JSON   *obj1 = NULL;
+    nats_JSON   *obj2 = NULL;
+    nats_JSON   *obj3 = NULL;
+    int32_t     int32Val = 0;
+    uint16_t    uint16Val = 0;
+    const char  *wrong[] = {
+            "{",
+            "}",
+            "{start quote missing\":0}",
+            "{\"end quote missing: 0}",
+            "{\"test\":start quote missing\"}",
+            "{\"test\":\"end quote missing}",
+            "{\"test\":1.2x}",
+            "{\"test\":tRUE}",
+            "{\"test\":true,}",
+            "{\"test\":true}, xxx}",
+            "{\"test\": \"abc\\error here\"}",
+            "{\"test\": \"abc\\u123\"}",
+            "{\"test\": \"abc\\u123g\"}",
+            "{\"test\": \"abc\\u 23f\"}",
+            ("{\"test\": \"abc\\"""),
+            "{\"test\": \"abc\\u1234",
+            "{\"test\": \"abc\\uabc",
+            "{\"test\" \"separator missing\"}",
+            "{\"test\":[1, \"abc\", true]}",
+    };
+    const char  *good[] = {
+            "{}",
+            " {}",
+            " { }",
+            " { } ",
+            "{ \"test\":{}}",
+            "{ \"test\":1.2}",
+            "{ \"test\" :1.2}",
+            "{ \"test\" : 1.2}",
+            "{ \"test\" : 1.2 }",
+            "{ \"test\" : 1.2,\"test2\":1}",
+            "{ \"test\" : 1.2, \"test2\":1}",
+            "{ \"test\":0}",
+            "{ \"test\" :0}",
+            "{ \"test\" : 0}",
+            "{ \"test\" : 0 }",
+            "{ \"test\" : 0,\"test2\":1}",
+            "{ \"test\" : 0, \"test2\":1}",
+            "{ \"test\":true}",
+            "{ \"test\": true}",
+            "{ \"test\": true }",
+            "{ \"test\":true,\"test2\":1}",
+            "{ \"test\": true,\"test2\":1}",
+            "{ \"test\": true ,\"test2\":1}",
+            "{ \"test\":false}",
+            "{ \"test\": false}",
+            "{ \"test\": false }",
+            "{ \"test\":false,\"test2\":1}",
+            "{ \"test\": false,\"test2\":1}",
+            "{ \"test\": false ,\"test2\":1}",
+            "{ \"test\":\"abc\"}",
+            "{ \"test\": \"abc\"}",
+            "{ \"test\": \"abc\" }",
+            "{ \"test\":\"abc\",\"test2\":1}",
+            "{ \"test\": \"abc\",\"test2\":1}",
+            "{ \"test\": \"abc\" ,\"test2\":1}",
+            "{ \"test\": \"a\\\"b\\\"c\" }",
+            "{ \"test\": [\"a\", \"b\", \"c\"]}",
+            "{ \"test\": [\"a\\\"b\\\"c\"]}",
+            "{ \"test\": [\"abc,def\"]}",
+            "{ \"test\": [{\"a\": 1}, {\"b\": \"c\"}]}",
+            "{ \"test\": [[{\"a\": 1}], [{\"b\": \"c\"}]]}",
+            "{ \"test\": []}",
+            "{ \"test\": {\"inner\":\"a\",\"inner2\":2,\"inner3\":false,\"inner4\":{\"inner_inner1\" : 1.234}}}",
+            "{ \"test\": \"a\\\"b\\\"c\"}",
+            "{ \"test\": \"\\\"\\\\/\b\f\n\r\t\\uabcd\"}",
+            "{ \"test\": \"\\ua12f\"}",
+            "{ \"test\": \"\\uA01F\"}",
+            "{ \"test\": null}",
+    };
+    nats_JSONField  *f      = NULL;
+    unsigned char   *bytes  = NULL;
+    int             bl      = 0;
+
+    for (i=0; i<(int)(sizeof(wrong)/sizeof(char*)); i++)
+    {
+        snprintf(buf, sizeof(buf), "Negative test %d: ", (i+1));
+        test(buf);
+        s = nats_JSONParse(&json, wrong[i], -1);
+        testCond((s != NATS_OK) && (json == NULL));
+        json = NULL;
+    }
+    nats_clearLastError();
+
+    for (i=0; i<(int)(sizeof(good)/sizeof(char*)); i++)
+    {
+        snprintf(buf, sizeof(buf), "Positive test %d: ", (i+1));
+        test(buf);
+        s = nats_JSONParse(&json, good[i], -1);
+        testCond((s == NATS_OK) && (json != NULL));
+        nats_JSONDestroy(json);
+        json = NULL;
+    }
+    nats_clearLastError();
+
+    // Check values
+    test("Empty string: ");
+    s = nats_JSONParse(&json, "{}", -1);
+    IFOK(s, nats_JSONGetInt(json, "test", &intVal));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 0)
+                && (intVal == 0));
+    nats_JSONDestroy(json);
+    json = NULL;
+
+    test("Single field, string: ");
+    s = nats_JSONParse(&json, "{\"test\":\"abc\"}", -1);
+    IFOK(s, nats_JSONGetStr(json, "test", &strVal));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (strcmp(strVal, "abc") == 0));
+    nats_JSONDestroy(json);
+    json = NULL;
+    free(strVal);
+    strVal = NULL;
+
+    test("Single field, string with escape chars: ");
+    s = nats_JSONParse(&json, "{\"test\":\"\\\"\\\\\\/\\b\\f\\n\\r\\t\"}", -1);
+    IFOK(s, nats_JSONGetStr(json, "test", &strVal));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (strcmp(strVal, "\"\\/\b\f\n\r\t") == 0));
+    nats_JSONDestroy(json);
+    json = NULL;
+    free(strVal);
+    strVal = NULL;
+
+    test("Single field, string with unicode: ");
+    s = nats_JSONParse(&json, "{\"test\":\"\\u0026\\u003c\\u003e\"}", -1);
+    IFOK(s, nats_JSONGetStr(json, "test", &strVal));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (strcmp(strVal, "&<>") == 0));
+    nats_JSONDestroy(json);
+    json = NULL;
+    free(strVal);
+    strVal = NULL;
+
+    test("Single field, int: ");
+    s = nats_JSONParse(&json, "{\"test\":1234}", -1);
+    IFOK(s, nats_JSONGetInt(json, "test", &intVal));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (intVal == 1234));
+    nats_JSONDestroy(json);
+    json = NULL;
+    intVal = 0;
+
+    test("Single field, int32: ");
+    s = nats_JSONParse(&json, "{\"test\":1234}", -1);
+    IFOK(s, nats_JSONGetInt32(json, "test", &int32Val));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (int32Val == 1234));
+    nats_JSONDestroy(json);
+    json = NULL;
+    int32Val = 0;
+
+    test("Single field, uint16: ");
+    s = nats_JSONParse(&json, "{\"test\":1234}", -1);
+    IFOK(s, nats_JSONGetUInt16(json, "test", &uint16Val));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (uint16Val == 1234));
+    nats_JSONDestroy(json);
+    json = NULL;
+    uint16Val = 0;
+
+    test("Single field, long: ");
+    s = nats_JSONParse(&json, "{\"test\":9223372036854775807}", -1);
+    IFOK(s, nats_JSONGetLong(json, "test", &longVal));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (longVal == 9223372036854775807L));
+    nats_JSONDestroy(json);
+    json = NULL;
+    longVal = 0;
+
+    test("Single field, neg long: ");
+    s = nats_JSONParse(&json, "{\"test\":-9223372036854775808}", -1);
+    IFOK(s, nats_JSONGetLong(json, "test", &longVal));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (longVal == (int64_t) 0x8000000000000000));
+    nats_JSONDestroy(json);
+    json = NULL;
+    longVal = 0;
+
+    test("Single field, neg long as ulong: ");
+    s = nats_JSONParse(&json, "{\"test\":-123456789}", -1);
+    IFOK(s, nats_JSONGetULong(json, "test", &ulongVal));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (ulongVal == 0xFFFFFFFFF8A432EB));
+    nats_JSONDestroy(json);
+    json = NULL;
+    ulongVal = 0;
+
+    test("Single field, ulong: ");
+    s = nats_JSONParse(&json, "{\"test\":18446744073709551615}", -1);
+    IFOK(s, nats_JSONGetULong(json, "test", &ulongVal));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (ulongVal == 0xFFFFFFFFFFFFFFFF));
+    nats_JSONDestroy(json);
+    json = NULL;
+    ulongVal = 0;
+
+    test("Single field, ulong: ");
+    s = nats_JSONParse(&json, "{\"test\":9007199254740993}", -1);
+    IFOK(s, nats_JSONGetULong(json, "test", &ulongVal));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (ulongVal == 9007199254740993));
+    nats_JSONDestroy(json);
+    json = NULL;
+    ulongVal = 0;
+
+    test("Single field, double: ");
+    s = nats_JSONParse(&json, "{\"test\":1234.5e3}", -1);
+    IFOK(s, nats_JSONGetDouble(json, "test", &doubleVal));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (doubleVal == (long double) 1234.5e+3));
+    nats_JSONDestroy(json);
+    json = NULL;
+    doubleVal = 0;
+
+    test("Single field, double negative: ");
+    s = nats_JSONParse(&json, "{\"test\":-1234}", -1);
+    IFOK(s, nats_JSONGetDouble(json, "test", &doubleVal));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (doubleVal == (long double) -1234));
+    nats_JSONDestroy(json);
+    json = NULL;
+    doubleVal = 0;
+
+    test("Single field, double exp negative 1: ");
+    s = nats_JSONParse(&json, "{\"test\":1234e-3}", -1);
+    IFOK(s, nats_JSONGetDouble(json, "test",&doubleVal));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (doubleVal == (long double) 1234.0/1000.0));
+    nats_JSONDestroy(json);
+    json = NULL;
+    doubleVal = 0;
+
+    test("Single field, double exp negative 2: ");
+    s = nats_JSONParse(&json, "{\"test\":1234.5e-3}", -1);
+    IFOK(s, nats_JSONGetDouble(json, "test", &doubleVal));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (doubleVal == (long double) 12345.0/10000.0));
+    nats_JSONDestroy(json);
+    json = NULL;
+    doubleVal = 0;
+
+    test("Single field, double exp negative 3: ");
+    s = nats_JSONParse(&json, "{\"test\":1234.5e-1}", -1);
+    IFOK(s, nats_JSONGetDouble(json, "test", &doubleVal));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (doubleVal == (long double) 12345.0/100.0));
+    nats_JSONDestroy(json);
+    json = NULL;
+    doubleVal = 0;
+
+    test("Single field, double exp negative 4: ");
+    s = nats_JSONParse(&json, "{\"test\":1234.5e-0}", -1);
+    IFOK(s, nats_JSONGetDouble(json, "test", &doubleVal));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (doubleVal == (long double) 12345.0/10.0));
+    nats_JSONDestroy(json);
+    json = NULL;
+    doubleVal = 0;
+
+    test("Single field, double exp positive 1: ");
+    s = nats_JSONParse(&json, "{\"test\":1234e+3}", -1);
+    IFOK(s, nats_JSONGetDouble(json, "test", &doubleVal));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (doubleVal == (long double) 1234.0*1000));
+    nats_JSONDestroy(json);
+    json = NULL;
+    doubleVal = 0;
+
+    test("Single field, double exp positive 2: ");
+    s = nats_JSONParse(&json, "{\"test\":1234.5e+3}", -1);
+    IFOK(s, nats_JSONGetDouble(json, "test", &doubleVal));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (doubleVal == (long double) 12345.0*100.0));
+    nats_JSONDestroy(json);
+    json = NULL;
+    doubleVal = 0;
+
+    test("Single field, double exp positive 3: ");
+    s = nats_JSONParse(&json, "{\"test\":1234.5678e+2}", -1);
+    IFOK(s, nats_JSONGetDouble(json, "test", &doubleVal));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (doubleVal == (long double) 12345678.0/100.0));
+    nats_JSONDestroy(json);
+    json = NULL;
+    doubleVal = 0;
+
+    test("Single field, double exp positive 4: ");
+    s = nats_JSONParse(&json, "{\"test\":1234.5678e+4}", -1);
+    IFOK(s, nats_JSONGetDouble(json, "test", &doubleVal));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (doubleVal == (long double) 12345678.0/10000.0));
+    nats_JSONDestroy(json);
+    json = NULL;
+    doubleVal = 0;
+
+    test("Single field, double exp positive 5: ");
+    s = nats_JSONParse(&json, "{\"test\":1234.5678e+5}", -1);
+    IFOK(s, nats_JSONGetDouble(json, "test", &doubleVal));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (doubleVal == (long double) 12345678.0*10.0));
+    nats_JSONDestroy(json);
+    json = NULL;
+    doubleVal = 0;
+
+    test("Single field, double exp positive 6: ");
+    s = nats_JSONParse(&json, "{\"test\":1234.5678e+0}", -1);
+    IFOK(s, nats_JSONGetDouble(json, "test", &doubleVal));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (doubleVal == (long double) 12345678.0/10000.0));
+    nats_JSONDestroy(json);
+    json = NULL;
+    doubleVal = 0;
+
+    test("Single field, double exp positive 6: ");
+    s = nats_JSONParse(&json, "{\"test\":1234.5678e1}", -1);
+    IFOK(s, nats_JSONGetDouble(json, "test", &doubleVal));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (doubleVal == (long double) 12345678.0/1000.0));
+    nats_JSONDestroy(json);
+    json = NULL;
+    doubleVal = 0;
+
+    test("Single field, bool: ");
+    s = nats_JSONParse(&json, "{\"test\":true}", -1);
+    IFOK(s, nats_JSONGetBool(json, "test", &boolVal));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && boolVal);
+    nats_JSONDestroy(json);
+    json = NULL;
+    boolVal = false;
+
+    test("Single field, string array: ");
+    s = nats_JSONParse(&json, "{\"test\":[\"a\",\"b\",\"c\",\"d\",\"e\"]}", -1);
+    IFOK(s, nats_JSONGetArrayStr(json, "test", &arrVal, &arrCount));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (arrCount == 5)
+                && (strcmp(arrVal[0], "a") == 0)
+                && (strcmp(arrVal[1], "b") == 0)
+                && (strcmp(arrVal[2], "c") == 0)
+                && (strcmp(arrVal[3], "d") == 0)
+                && (strcmp(arrVal[4], "e") == 0));
+    nats_JSONDestroy(json);
+    json = NULL;
+    for (i=0; i<arrCount; i++)
+        free(arrVal[i]);
+    free(arrVal);
+    arrVal = NULL;
+    arrCount = 0;
+
+    test("Single field, null string array: ");
+    s = nats_JSONParse(&json, "{\"test\": null}", -1);
+    IFOK(s, nats_JSONGetArrayStr(json, "test", &arrVal, &arrCount));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (arrVal == NULL)
+                && (arrCount == 0));
+    nats_JSONDestroy(json);
+    json = NULL;
+
+    test("Single field, bool array: ");
+    s = nats_JSONParse(&json, "{\"test\":[true, false, true]}", -1);
+    IFOK(s, nats_JSONGetArrayBool(json, "test", &arrBoolVal, &arrCount));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (arrCount == 3)
+                && arrBoolVal[0]
+                && !arrBoolVal[1]
+                && arrBoolVal[2]);
+    nats_JSONDestroy(json);
+    json = NULL;
+    free(arrBoolVal);
+    arrBoolVal = NULL;
+    arrCount = 0;
+
+    test("Single field, double array: ");
+    s = nats_JSONParse(&json, "{\"test\":[1.0, 2.0, 3.0]}", -1);
+    IFOK(s, nats_JSONGetArrayDouble(json, "test", &arrDoubleVal, &arrCount));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (arrCount == 3)
+                && (arrDoubleVal[0] == 1.0)
+                && (arrDoubleVal[1] == 2.0)
+                && (arrDoubleVal[2] == 3.0));
+    nats_JSONDestroy(json);
+    json = NULL;
+    free(arrDoubleVal);
+    arrDoubleVal = NULL;
+    arrCount = 0;
+
+    test("Single field, int array: ");
+    s = nats_JSONParse(&json, "{\"test\":[1, 2, 3]}", -1);
+    IFOK(s, nats_JSONGetArrayInt(json, "test", &arrIntVal, &arrCount));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (arrCount == 3)
+                && (arrIntVal[0] == 1)
+                && (arrIntVal[1] == 2)
+                && (arrIntVal[2] == 3));
+    nats_JSONDestroy(json);
+    json = NULL;
+    free(arrIntVal);
+    arrIntVal = NULL;
+    arrCount = 0;
+
+    test("Single field, long array: ");
+    s = nats_JSONParse(&json, "{\"test\":[1, 2, 3]}", -1);
+    IFOK(s, nats_JSONGetArrayLong(json, "test", &arrLongVal, &arrCount));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (arrCount == 3)
+                && (arrLongVal[0] == 1)
+                && (arrLongVal[1] == 2)
+                && (arrLongVal[2] == 3));
+    nats_JSONDestroy(json);
+    json = NULL;
+    free(arrLongVal);
+    arrLongVal = NULL;
+    arrCount = 0;
+
+    test("Single field, ulong array: ");
+    s = nats_JSONParse(&json, "{\"test\":[1, 2, 3]}", -1);
+    IFOK(s, nats_JSONGetArrayULong(json, "test", &arrULongVal, &arrCount));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (arrCount == 3)
+                && (arrULongVal[0] == 1)
+                && (arrULongVal[1] == 2)
+                && (arrULongVal[2] == 3));
+    nats_JSONDestroy(json);
+    json = NULL;
+    free(arrULongVal);
+    arrULongVal = NULL;
+    arrCount = 0;
+
+    test("Single field, object array: ");
+    s = nats_JSONParse(&json, "{\"test\":[{\"a\": 1},{\"b\": true}]}", -1);
+    IFOK(s, nats_JSONGetArrayObject(json, "test", &arrObjVal, &arrCount));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (arrCount == 2)
+                && (nats_JSONGetInt(arrObjVal[0], "a", &intVal) == NATS_OK)
+                && (intVal == 1)
+                && (nats_JSONGetBool(arrObjVal[1], "b", &boolVal) == NATS_OK)
+                && boolVal);
+    nats_JSONDestroy(json);
+    json = NULL;
+    free(arrObjVal);
+    arrObjVal = NULL;
+    arrCount = 0;
+    intVal = 0;
+    boolVal = false;
+
+    test("Single field, array null: ");
+    s = nats_JSONParse(&json, "{\"test\":null}", -1);
+    IFOK(s, nats_JSONGetArrayObject(json, "test", &arrObjVal, &arrCount));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (arrObjVal == NULL)
+                && (arrCount == 0));
+    nats_JSONDestroy(json);
+    json = NULL;
+
+    test("Single field, array array: ");
+    s = nats_JSONParse(&json, "{\"test\":[[\"a\", \"b\"],[1, 2, 3],[{\"c\": true}]]}", -1);
+    IFOK(s, nats_JSONGetArrayArray(json, "test", &arrArrVal, &arrCount));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (arrCount == 3)
+                && (nats_JSONArrayAsStrings(arrArrVal[0], &arrVal, &arrCount) == NATS_OK)
+                && (arrCount == 2)
+                && (strcmp(arrVal[0], "a") == 0)
+                && (strcmp(arrVal[1], "b") == 0)
+                && (nats_JSONArrayAsInts(arrArrVal[1], &arrIntVal, &arrCount) == NATS_OK)
+                && (arrCount == 3)
+                && (arrIntVal[0] == 1)
+                && (arrIntVal[1] == 2)
+                && (arrIntVal[2] == 3)
+                && (nats_JSONArrayAsObjects(arrArrVal[2], &arrObjVal, &arrCount) == NATS_OK)
+                && (arrCount == 1)
+                && (nats_JSONGetBool(arrObjVal[0], "c", &boolVal) == NATS_OK)
+                && boolVal);
+    nats_JSONDestroy(json);
+    json = NULL;
+    for (i=0; i<2; i++)
+        free(arrVal[i]);
+    free(arrVal);
+    arrVal = NULL;
+    free(arrIntVal);
+    arrIntVal = NULL;
+    free(arrArrVal);
+    arrArrVal = NULL;
+    free(arrObjVal);
+    arrObjVal = NULL;
+    boolVal = false;
+    arrCount = 0;
+
+    test("Object: ");
+    s = nats_JSONParse(&json, "{\"obj1\":{\"obj2\":{\"obj3\":{\"a\": 1},\"b\":true},\"c\":1.2},\"d\":3}", -1);
+    IFOK(s, nats_JSONGetObject(json, "obj1", &obj1));
+    IFOK(s, nats_JSONGetObject(obj1, "obj2", &obj2));
+    IFOK(s, nats_JSONGetObject(obj2, "obj3", &obj3));
+    IFOK(s, nats_JSONGetInt(obj3, "a", &intVal));
+    IFOK(s, nats_JSONGetBool(obj2, "b", &boolVal));
+    IFOK(s, nats_JSONGetDouble(obj1, "c", &doubleVal));
+    IFOK(s, nats_JSONGetLong(json, "d", &longVal));
+    testCond((s == NATS_OK)
+                && (intVal == 1)
+                && boolVal
+                && (doubleVal == (long double) 12.0/10.0)
+                && (longVal == 3));
+    nats_JSONDestroy(json);
+    json = NULL;
+    intVal = 0;
+    boolVal = false;
+    doubleVal = 0.0;
+    longVal = 0;
+
+    test("Object, null: ");
+    s = nats_JSONParse(&json, "{\"obj\":null}", -1);
+    IFOK(s, nats_JSONGetObject(json, "obj", &obj1));
+    testCond((s == NATS_OK) && (obj1 == NULL));
+    nats_JSONDestroy(json);
+    json = NULL;
+
+    test("All field types: ");
+    s = nats_JSONParse(&json, "{\"bool\":true,\"str\":\"abc\",\"int\":123,\"long\":456,\"double\":123.5,\"array\":[\"a\"]}", -1);
+    IFOK(s, nats_JSONGetBool(json, "bool", &boolVal));
+    IFOK(s, nats_JSONGetStr(json, "str", &strVal));
+    IFOK(s, nats_JSONGetInt(json, "int", &intVal));
+    IFOK(s, nats_JSONGetLong(json, "long", &longVal));
+    IFOK(s, nats_JSONGetDouble(json, "double", &doubleVal));
+    IFOK(s, nats_JSONGetArrayStr(json, "array", &arrVal, &arrCount));
+    testCond((s == NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 6)
+                && boolVal
+                && (strcmp(strVal, "abc") == 0)
+                && (intVal == 123)
+                && (longVal == 456)
+                && (doubleVal == (long double) 1235.0/10.0)
+                && (arrCount == 1)
+                && (strcmp(arrVal[0], "a") == 0));
+    test("Unknown field type: ");
+    if (s == NATS_OK)
+        s = nats_JSONGetField(json, "int", 255, &f);
+    testCond(s != NATS_OK);
+    nats_JSONDestroy(json);
+    json = NULL;
+    free(strVal);
+    strVal = NULL;
+    boolVal = false;
+    intVal = 0;
+    longVal = 0;
+    doubleVal = 0;
+    for (i=0; i<arrCount; i++)
+        free(arrVal[i]);
+    free(arrVal);
+    arrVal = NULL;
+    arrCount = 0;
+
+    test("Ask for wrong type: ");
+    s = nats_JSONParse(&json, "{\"test\":true}", -1);
+    IFOK(s, nats_JSONGetInt(json, "test", &intVal));
+    testCond((s != NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (intVal == 0));
+    nats_JSONDestroy(json);
+    json = NULL;
+
+    test("Ask for wrong type (array): ");
+    s = nats_JSONParse(&json, "{\"test\":[\"a\", \"b\"]}", -1);
+    IFOK(s, nats_JSONGetArrayField(json, "test", TYPE_INT, &f));
+    testCond((s != NATS_OK)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (arrCount == 0)
+                && (arrVal == NULL));
+    nats_JSONDestroy(json);
+    json = NULL;
+
+    test("Ask for unknown type: ");
+    s = nats_JSONParse(&json, "{\"test\":true}", -1);
+    IFOK(s, nats_JSONGetField(json, "test", 9999, &f));
+    testCond((s == NATS_INVALID_ARG)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1));
+    nats_JSONDestroy(json);
+    json = NULL;
+
+    test("Ask for unknown type (array): ");
+    s = nats_JSONParse(&json, "{\"test\":true}", -1);
+    IFOK(s, nats_JSONGetArrayField(json, "test", 9999, &f));
+    testCond((s == NATS_INVALID_ARG)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1));
+    nats_JSONDestroy(json);
+    json = NULL;
+
+    test("Check no error and set to default for vars for unknown fields: ");
+    {
+        const char *initStr = "test";
+        const char *initStrArr[] = {"a", "b"};
+
+        strVal = (char*) initStr;
+        boolVal = true;
+        intVal = 123;
+        longVal = 456;
+        doubleVal = 789;
+        arrVal = (char**)initStrArr;
+        arrCount = 2;
+        s = nats_JSONParse(&json, "{\"test\":true}", -1);
+        IFOK(s, nats_JSONGetStr(json, "str", &strVal));
+        IFOK(s, nats_JSONGetInt(json, "int", &intVal));
+        IFOK(s, nats_JSONGetLong(json, "long", &longVal));
+        IFOK(s, nats_JSONGetBool(json, "bool", &boolVal));
+        IFOK(s, nats_JSONGetDouble(json, "bool", &doubleVal));
+        IFOK(s, nats_JSONGetArrayStr(json, "array", &arrVal, &arrCount));
+        testCond((s == NATS_OK)
+                    && (strVal == NULL)
+                    && (boolVal == false)
+                    && (intVal == 0)
+                    && (longVal == 0)
+                    && (doubleVal == 0)
+                    && (arrCount == 0)
+                    && (arrVal == NULL));
+        nats_JSONDestroy(json);
+        json = NULL;
+    }
+
+    test("Wrong string type: ");
+    strVal = NULL;
+    s = nats_JSONParse(&json, "{\"test\":12345678901112}", -1);
+    IFOK(s, nats_JSONGetStr(json, "test", &strVal));
+    testCond((s == NATS_INVALID_ARG)
+                && (json != NULL)
+                && (json->fields != NULL)
+                && (json->fields->used == 1)
+                && (strVal == NULL));
+    nats_JSONDestroy(json);
+    json = NULL;
+
+    test("NULL string with -1 len: ");
+    s = nats_JSONParse(&json, NULL, -1);
+    testCond((s == NATS_INVALID_ARG) && (json == NULL));
+    nats_clearLastError();
+
+    test("Field reused: ");
+    s = nats_JSONParse(&json, "{\"field\":1,\"field\":2}", -1);
+    IFOK(s, nats_JSONGetInt(json, "field", &intVal));
+    testCond((s == NATS_OK) && (intVal == 2));
+    nats_JSONDestroy(json);
+    json = NULL;
+
+    test("Nested arrays ok: ");
+    jsonMaxNested = 10;
+    s = nats_JSONParse(&json, "{\"test\":[[[1, 2]]]}", -1);
+    testCond(s == NATS_OK);
+    nats_JSONDestroy(json);
+    json = NULL;
+
+    test("Nested arrays not ok: ");
+    jsonMaxNested = 10;
+    s = nats_JSONParse(&json, "{\"test\":[[[[[[[[[[[[[1, 2]]]]]]]]]]]]]}", -1);
+    testCond((s == NATS_ERR) && (json == NULL)
+                && (strstr(nats_GetLastError(NULL), " nested arrays of 10") != NULL));
+    nats_clearLastError();
+
+    test("Nested objects ok: ");
+    s = nats_JSONParse(&json, "{\"test\":{\"a\":{\"b\":{\"c\":1}}}}", -1);
+    testCond(s == NATS_OK);
+    nats_JSONDestroy(json);
+    json = NULL;
+
+    test("Nested arrays not ok: ");
+    jsonMaxNested = 10;
+    s = nats_JSONParse(&json, "{\"test\":{\"a\":{\"b\":{\"c\":{\"d\":{\"e\":{\"f\":{\"g\":{\"h\":{\"i\":{\"j\":{\"k\":{\"l\":{\"m\":1}}}}}}}}}}}}}}", -1);
+    testCond((s == NATS_ERR) && (json == NULL)
+                && (strstr(nats_GetLastError(NULL), " nested objects of 10") != NULL));
+    nats_clearLastError();
+    jsonMaxNested = JSON_MAX_NEXTED;
+
+    // Negative tests
+    {
+        const char *badTimes[] = {
+            "{\"time\":\"too small\"}",
+            "{\"time\":\"2021-06-23T18:22:00.123456789-08:00X\"}",
+            "{\"time\":\"2021-06-23T18:22:00X\"}",
+            "{\"time\":\"2021-06-23T18:22:00-0800\"}",
+            "{\"time\":\"2021-06-23T18:22:00-08.00\"}",
+            "{\"time\":\"2021-06-23T18:22:00.Z\"}",
+            "{\"time\":\"2021-06-23T18:22:00.abcZ\"}",
+            "{\"time\":\"2021-06-23T18:22:00.abc-08:00\"}",
+            "{\"time\":\"2021-06-23T18:22:00.1234567890-08:00\"}",
+            "{\"time\":\"2021-06-23T18:22:00.1234567890Z\"}",
+            "{\"time\":\"2021-06-23T18:22:00.123-0800\"}",
+        };
+        const char *errorsTxt[] = {
+            "too small",
+            "too long",
+            "invalid UTC offset",
+            "invalid UTC offset",
+            "invalid UTC offset",
+            "is invalid",
+            "is invalid",
+            "is invalid",
+            "too long",
+            "second fraction",
+            "invalid UTC offset",
+        };
+        for (i=0; i<(int)(sizeof(errorsTxt)/sizeof(char*)); i++)
+        {
+            longVal = 0;
+            snprintf(buf, sizeof(buf), "Bad time '%s': ", badTimes[i]);
+            test(buf);
+            s = nats_JSONParse(&json, badTimes[i], -1);
+            IFOK(s, nats_JSONGetTime(json, "time", &longVal));
+            testCond((s != NATS_OK)
+                        && (json != NULL)
+                        && (longVal == 0)
+                        && (strstr(nats_GetLastError(NULL), errorsTxt[i]) != NULL));
+            nats_clearLastError();
+            nats_JSONDestroy(json);
+            json = NULL;
+        }
+    }
+
+    // Positive tests
+    {
+        const char *goodTimes[] = {
+            "{\"time\":\"0001-01-01T00:00:00Z\"}",
+            "{\"time\":\"1970-01-01T01:00:00+01:00\"}",
+            "{\"time\":\"2021-06-23T18:22:00Z\"}",
+            "{\"time\":\"2021-06-23T18:22:00.1Z\"}",
+            "{\"time\":\"2021-06-23T18:22:00.12Z\"}",
+            "{\"time\":\"2021-06-23T18:22:00.123Z\"}",
+            "{\"time\":\"2021-06-23T18:22:00.1234Z\"}",
+            "{\"time\":\"2021-06-23T18:22:00.12345Z\"}",
+            "{\"time\":\"2021-06-23T18:22:00.123456Z\"}",
+            "{\"time\":\"2021-06-23T18:22:00.1234567Z\"}",
+            "{\"time\":\"2021-06-23T18:22:00.12345678Z\"}",
+            "{\"time\":\"2021-06-23T18:22:00.123456789Z\"}",
+            "{\"time\":\"2021-06-23T18:22:00-07:00\"}",
+            "{\"time\":\"2021-06-23T18:22:00.1-07:00\"}",
+            "{\"time\":\"2021-06-23T18:22:00.12-07:00\"}",
+            "{\"time\":\"2021-06-23T18:22:00.123-07:00\"}",
+            "{\"time\":\"2021-06-23T18:22:00.1234-07:00\"}",
+            "{\"time\":\"2021-06-23T18:22:00.12345-07:00\"}",
+            "{\"time\":\"2021-06-23T18:22:00.123456-07:00\"}",
+            "{\"time\":\"2021-06-23T18:22:00.1234567-07:00\"}",
+            "{\"time\":\"2021-06-23T18:22:00.12345678-07:00\"}",
+            "{\"time\":\"2021-06-23T18:22:00.123456789-07:00\"}",
+            "{\"time\":\"2021-06-23T18:22:00+01:00\"}",
+            "{\"time\":\"2021-06-23T18:22:00.1+01:00\"}",
+            "{\"time\":\"2021-06-23T18:22:00.12+01:00\"}",
+            "{\"time\":\"2021-06-23T18:22:00.123+01:00\"}",
+            "{\"time\":\"2021-06-23T18:22:00.1234+01:00\"}",
+            "{\"time\":\"2021-06-23T18:22:00.12345+01:00\"}",
+            "{\"time\":\"2021-06-23T18:22:00.123456+01:00\"}",
+            "{\"time\":\"2021-06-23T18:22:00.1234567+01:00\"}",
+            "{\"time\":\"2021-06-23T18:22:00.12345678+01:00\"}",
+            "{\"time\":\"2021-06-23T18:22:00.123456789+01:00\"}",
+        };
+        int64_t results[] = {
+            0,
+            0,
+            1624472520000000000,
+            1624472520100000000,
+            1624472520120000000,
+            1624472520123000000,
+            1624472520123400000,
+            1624472520123450000,
+            1624472520123456000,
+            1624472520123456700,
+            1624472520123456780,
+            1624472520123456789,
+            1624497720000000000,
+            1624497720100000000,
+            1624497720120000000,
+            1624497720123000000,
+            1624497720123400000,
+            1624497720123450000,
+            1624497720123456000,
+            1624497720123456700,
+            1624497720123456780,
+            1624497720123456789,
+            1624468920000000000,
+            1624468920100000000,
+            1624468920120000000,
+            1624468920123000000,
+            1624468920123400000,
+            1624468920123450000,
+            1624468920123456000,
+            1624468920123456700,
+            1624468920123456780,
+            1624468920123456789,
+        };
+        for (i=0; i<(int)(sizeof(results)/sizeof(int64_t)); i++)
+        {
+            longVal = 0;
+            snprintf(buf, sizeof(buf), "Time '%s' -> %" PRId64 ": ", goodTimes[i], results[i]);
+            test(buf);
+            s = nats_JSONParse(&json, goodTimes[i], -1);
+            IFOK(s, nats_JSONGetTime(json, "time", &longVal));
+            testCond((s == NATS_OK)
+                        && (json != NULL)
+                        && (longVal == results[i]));
+            nats_JSONDestroy(json);
+            json = NULL;
+        }
+    }
+
+    test("GetStr bad type: ");
+    s = nats_JSONParse(&json, "{\"test\":true}", -1);
+    IFOK(s, nats_JSONGetStrPtr(json, "test", (const char**) &strVal));
+    testCond((s != NATS_OK) && (strVal == NULL));
+    nats_clearLastError();
+    nats_JSONDestroy(json);
+    json = NULL;
+
+    test("GetStr: ");
+    s = nats_JSONParse(&json, "{\"test\":\"direct\"}", -1);
+    IFOK(s, nats_JSONGetStrPtr(json, "test", (const char**) &strVal));
+    testCond((s == NATS_OK) && (strVal != NULL) && (strcmp(strVal, "direct") == 0));
+    nats_JSONDestroy(json);
+    json = NULL;
+
+    test("GetBytes bad type: ");
+    s = nats_JSONParse(&json, "{\"test\":true}", -1);
+    IFOK(s, nats_JSONGetBytes(json, "test", &bytes, &bl));
+    testCond((s != NATS_OK) && (bytes == NULL) && (bl == 0));
+    nats_clearLastError();
+    nats_JSONDestroy(json);
+    json = NULL;
+
+    test("GetBytes: ");
+    s = nats_JSONParse(&json, "{\"test\":\"dGhpcyBpcyB0ZXN0aW5nIGJhc2U2NCBlbmNvZGluZw==\"}", -1);
+    IFOK(s, nats_JSONGetBytes(json, "test", &bytes, &bl));
+    testCond((s == NATS_OK) && (bytes != NULL) && (bl == 31)
+                && (strncmp((const char*) bytes, "this is testing base64 encoding", bl) == 0));
+    nats_clearLastError();
+    nats_JSONDestroy(json);
+    json = NULL;
+    free(bytes);
+
+    test("Range with wrong type: ");
+    s = nats_JSONParse(&json, "{\"test\":123}", -1);
+    IFOK(s, nats_JSONRange(json, TYPE_STR, 0, _dummyJSONCb, NULL));
+    testCond((s == NATS_ERR)
+                && (strstr(nats_GetLastError(NULL), "expected value type of")));
+    nats_clearLastError();
+
+    test("Range with wrong num type: ");
+    s = nats_JSONRange(json, TYPE_NUM, TYPE_INT, _dummyJSONCb, NULL);
+    testCond((s == NATS_ERR)
+                && (strstr(nats_GetLastError(NULL), "expected numeric type of")));
+    nats_clearLastError();
+
+    test("Range ok: ");
+    ulongVal = 0;
+    s = nats_JSONRange(json, TYPE_NUM, TYPE_UINT, _dummyJSONCb, &ulongVal);
+    testCond((s == NATS_OK) && (ulongVal == 123));
+    nats_JSONDestroy(json);
+    json = NULL;
+
+    test("Range cb returns error: ");
+    ulongVal = 0;
+    s = nats_JSONParse(&json, "{\"fail\":123}", -1);
+    IFOK(s, nats_JSONRange(json, TYPE_NUM, TYPE_UINT, _dummyJSONCb, &ulongVal));
+    testCond((s == NATS_INVALID_ARG)
+                && (strstr(nats_GetLastError(NULL), "on purpose")));
+    nats_clearLastError();
+    nats_JSONDestroy(json);
+    json = NULL;
+
+    test("Parse empty array: ");
+    s = nats_JSONParse(&json, "{\"empty\":[]}", -1);
+    testCond(s == NATS_OK);
+
+    test("Get empty array array: ");
+    s = nats_JSONGetArrayArray(json, "empty", &arrArrVal, &arrCount);
+    testCond((s == NATS_OK) && (arrArrVal == NULL) && (arrCount == 0));
+
+    test("Get empty obj array: ");
+    s = nats_JSONGetArrayObject(json, "empty", &arrObjVal, &arrCount);
+    testCond((s == NATS_OK) && (arrObjVal == NULL) && (arrCount == 0));
+
+    test("Get empty ulong array: ");
+    s = nats_JSONGetArrayULong(json, "empty", &arrULongVal, &arrCount);
+    testCond((s == NATS_OK) && (arrULongVal == NULL) && (arrCount == 0));
+
+    test("Get empty long array: ");
+    s = nats_JSONGetArrayLong(json, "empty", &arrLongVal, &arrCount);
+    testCond((s == NATS_OK) && (arrLongVal == NULL) && (arrCount == 0));
+
+    test("Get empty int array: ");
+    s = nats_JSONGetArrayInt(json, "empty", &arrIntVal, &arrCount);
+    testCond((s == NATS_OK) && (arrIntVal == NULL) && (arrCount == 0));
+
+    test("Get empty double array: ");
+    s = nats_JSONGetArrayDouble(json, "empty", &arrDoubleVal, &arrCount);
+    testCond((s == NATS_OK) && (arrDoubleVal == NULL) && (arrCount == 0));
+
+    test("Get empty bool array: ");
+    s = nats_JSONGetArrayBool(json, "empty", &arrBoolVal, &arrCount);
+    testCond((s == NATS_OK) && (arrBoolVal == NULL) && (arrCount == 0));
+
+    test("Get empty string array: ");
+    s = nats_JSONGetArrayStr(json, "empty", &arrVal, &arrCount);
+    testCond((s == NATS_OK) && (arrVal == NULL) && (arrCount == 0));
+
+    nats_JSONDestroy(json);
+    json = NULL;
+
+}
+
+static void
+test_natsEncodeTimeUTC(void)
+{
+    natsStatus  s;
+    char        buf[36] = {'\0'};
+    int         i;
+    int64_t     times[] = {
+        0,
+        1624472520000000000,
+        1624472520100000000,
+        1624472520120000000,
+        1624472520123000000,
+        1624472520123400000,
+        1624472520123450000,
+        1624472520123456000,
+        1624472520123456700,
+        1624472520123456780,
+        1624472520123456789,
+    };
+    const char  *results[] = {
+        "0001-01-01T00:00:00Z",
+        "2021-06-23T18:22:00Z",
+        "2021-06-23T18:22:00.1Z",
+        "2021-06-23T18:22:00.12Z",
+        "2021-06-23T18:22:00.123Z",
+        "2021-06-23T18:22:00.1234Z",
+        "2021-06-23T18:22:00.12345Z",
+        "2021-06-23T18:22:00.123456Z",
+        "2021-06-23T18:22:00.1234567Z",
+        "2021-06-23T18:22:00.12345678Z",
+        "2021-06-23T18:22:00.123456789Z",
+    };
+
+    test("Buffer too small: ");
+    s = nats_EncodeTimeUTC(buf, 10, 0);
+    testCond((s == NATS_INVALID_ARG)
+                && (strstr(nats_GetLastError(NULL), "too small") != NULL));
+    nats_clearLastError();
+
+    for (i=0; i<(int)(sizeof(times)/sizeof(int64_t)); i++)
+    {
+        char txt[100];
+
+        snprintf(txt, sizeof(txt), "Time %" PRId64 " -> '%s': ", times[i], results[i]);
+        test(txt);
+        s = nats_EncodeTimeUTC(buf, sizeof(buf), times[i]);
+        testCond((s == NATS_OK) && (strcmp(buf, results[i]) == 0));
+    }
+}
+
+static void
+test_natsErrWithLongText(void)
+{
+    natsStatus  s;
+    char        errTxt[300];
+    const char  *output = NULL;
+    int         i;
+
+    nats_clearLastError();
+    for (i=0; i<(int) sizeof(errTxt)-1; i++)
+        errTxt[i] = 'A';
+    errTxt[i-1] = '\0';
+
+    test("nats_setError with long text: ");
+    s = nats_setError(NATS_ERR, "This is the error: %s", errTxt);
+    if (s == NATS_ERR)
+        output = nats_GetLastError(&s);
+    if (output != NULL)
+    {
+        int pos = ((int) strlen(output))-1;
+
+        // End of text should contain `...` to indicate that it was truncated.
+        for (i=0; i<3; i++)
+        {
+            if (output[pos--] != '.')
+            {
+                s = NATS_ILLEGAL_STATE;
+                break;
+            }
+        }
+    }
+    else
+    {
+        s = NATS_ILLEGAL_STATE;
+    }
+    testCond(s == NATS_ERR);
+    nats_clearLastError();
+}
+
+static void
+test_natsErrStackMoreThanMaxFrames(void)
+{
+    int             i;
+    const int       total = MAX_FRAMES+10;
+    char            funcName[MAX_FRAMES+10][64];
+    char            result[(MAX_FRAMES+10)*100];
+    natsStatus      s = NATS_OK;
+
+    test("Check natsUpdateErrStack called more than MAX_FRAMES: ");
+    // When a stack trace is formed, it goes from the most recent
+    // function called to the oldest. We are going to call more than
+    // MAX_FRAMES with function names being numbers from total down
+    // to 0. We expect not to crash and have at least from total to
+    // total-MAX_FRAMES.
+    for (i=total-1;i>=0;i--)
+    {
+        snprintf(funcName[i], sizeof(funcName[i]), "%d", (i+1));
+        nats_updateErrStack(NATS_ERR, funcName[i]);
+    }
+    s = nats_GetLastErrorStack(result, sizeof(result));
+    if (s == NATS_OK)
+    {
+        char *ptr = result;
+        int   funcID;
+        char  expected[64];
+
+        snprintf(expected, sizeof(expected), "%d more...", total-MAX_FRAMES);
+
+        for (i=total;i>total-MAX_FRAMES;i--)
+        {
+            if (sscanf(ptr, "%d", &funcID) != 1)
+            {
+                s = NATS_ERR;
+                break;
+            }
+            if (funcID != i)
+            {
+                s = NATS_ERR;
+                break;
+            }
+            if (funcID > 10)
+                ptr += 3;
+            else
+                ptr +=2;
+        }
+        // The last should be something like: xx more...
+        // where xx is total-MAX_FRAMES
+        if ((s == NATS_OK) && (strcmp(ptr, expected) != 0))
+            s = NATS_ERR;
+    }
+    testCond(s == NATS_OK);
+}
+
+static void
+test_natsMsg(void)
+{
+    natsMsg     *msg = NULL;
+    natsStatus  s    = NATS_OK;
+
+    test("Check invalid subj (NULL): ");
+    s = natsMsg_Create(&msg, NULL, "reply", "data", 4);
+    testCond((msg == NULL) && (s == NATS_INVALID_ARG));
+
+    test("Check invalid subj (empty): ");
+    s = natsMsg_Create(&msg, "", "reply", "data", 4);
+    testCond((msg == NULL) && (s == NATS_INVALID_ARG));
+
+    test("Check invalid reply (empty): ");
+    s = natsMsg_Create(&msg, "foo", "", "data", 4);
+    testCond((msg == NULL) && (s == NATS_INVALID_ARG));
+
+    test("GetSubject with NULL msg: ");
+    testCond(natsMsg_GetSubject(NULL) == NULL);
+
+    test("GetReply with NULL msg: ");
+    testCond(natsMsg_GetReply(NULL) == NULL);
+
+    test("GetData with NULL msg: ");
+    testCond(natsMsg_GetData(NULL) == NULL);
+
+    test("GetDataLength with NULL msg: ");
+    testCond(natsMsg_GetDataLength(NULL) == 0);
+
+    test("Create ok: ");
+    s = natsMsg_Create(&msg, "foo", "reply", "data", 4);
+    testCond((s == NATS_OK) && (msg != NULL));
+
+    natsMsg_Destroy(msg);
+}
+
+static void
+test_natsBase32Decode(void)
+{
+    natsStatus      s;
+    const char      *src       = "KRUGS4ZANFZSA5DIMUQHEZLTOVWHIIDPMYQGCIDCMFZWKMZSEBSGKY3PMRUW4ZY";
+    const char      *expected  = "This is the result of a base32 decoding";
+    char            dst[256];
+    int             dstLen = 0;
+
+    test("Decode: ");
+    s = nats_Base32_DecodeString((char*) src, dst, (int) sizeof(dst), &dstLen);
+    testCond((s == NATS_OK)
+                && (dstLen == (int) strlen(expected))
+                && (memcmp((void*) expected, (void*) dst, dstLen) == 0));
+
+    test("Dest too small: ");
+    s = nats_Base32_DecodeString((char*) src, dst, 10, &dstLen);
+    testCond((s == NATS_INSUFFICIENT_BUFFER) && (dstLen == 0));
+    nats_clearLastError();
+
+    test("Invalid string: ");
+    s = nats_Base32_DecodeString((char*)"This is invalid content", dst, (int) sizeof(dst), &dstLen);
+    testCond((s == NATS_ERR)
+                && (nats_GetLastError(NULL) != NULL)
+                && (strstr(nats_GetLastError(NULL), "invalid") != NULL));
+}
+
+static void
+test_natsBase64Encode(void)
+{
+    natsStatus  s;
+    char        *enc = NULL;
+    int         i;
+    const char  *testStrings[] = {
+            "this is testing base64 encoding",
+            "dfslfdlkjsfdllkjfds dfsjlklkfsda dfsalkjklfdsalkj adfskjllkjfdaslkjfdslk",
+            "This is another with numbers like 12345678.90 and special characters !@#$%^&*()-=+/",
+    };
+    const char  *expectedResults[] = {
+            "dGhpcyBpcyB0ZXN0aW5nIGJhc2U2NCBlbmNvZGluZw",
+            "ZGZzbGZkbGtqc2ZkbGxramZkcyBkZnNqbGtsa2ZzZGEgZGZzYWxramtsZmRzYWxraiBhZGZza2psbGtqZmRhc2xramZkc2xr",
+            "VGhpcyBpcyBhbm90aGVyIHdpdGggbnVtYmVycyBsaWtlIDEyMzQ1Njc4LjkwIGFuZCBzcGVjaWFsIGNoYXJhY3RlcnMgIUAjJCVeJiooKS09Ky8",
+    };
+    const char  *expectedResultsStd[] = {
+            "dGhpcyBpcyB0ZXN0aW5nIGJhc2U2NCBlbmNvZGluZw==",
+            "ZGZzbGZkbGtqc2ZkbGxramZkcyBkZnNqbGtsa2ZzZGEgZGZzYWxramtsZmRzYWxraiBhZGZza2psbGtqZmRhc2xramZkc2xr",
+            "VGhpcyBpcyBhbm90aGVyIHdpdGggbnVtYmVycyBsaWtlIDEyMzQ1Njc4LjkwIGFuZCBzcGVjaWFsIGNoYXJhY3RlcnMgIUAjJCVeJiooKS09Ky8=",
+    };
+    const uint8_t   someBytes[] = {1, 2, 0, 3, 4, 5, 0, 6, 7, 8, 0, 9, 0};
+    const char      *sbe = "AQIAAwQFAAYHCAAJAA==";
+    int             sbl  = 13;
+    int             sl   = 0;
+    int             dl   = 0;
+    unsigned char   *dec = NULL;
+
+    test("EncodeURL nil: ");
+    s = nats_Base64RawURL_EncodeString(NULL, 0, &enc);
+    testCond((s == NATS_OK) && (enc == NULL));
+
+    test("EncodeURL empty: ");
+    s = nats_Base64RawURL_EncodeString((const unsigned char*) "", 0, &enc);
+    testCond((s == NATS_OK) && (enc == NULL));
+
+    test("EncodeURL strings: ");
+    for (i=0; i<(int)(sizeof(testStrings)/sizeof(char*)); i++)
+    {
+        s = nats_Base64RawURL_EncodeString((const unsigned char*) testStrings[i], (int)strlen(testStrings[i]), &enc);
+        if ((s == NATS_OK) && ((enc == NULL) || (strcmp(enc, expectedResults[i]) != 0)))
+            s = NATS_ERR;
+
+        free(enc);
+        enc = NULL;
+        if (s != NATS_OK)
+            break;
+    }
+    testCond(s == NATS_OK);
+
+    test("EncodeURL bytes: ");
+    {
+        s = nats_Base64RawURL_EncodeString((const unsigned char*) &someBytes, sbl, &enc);
+        if ((s == NATS_OK) && ((enc == NULL) || (strcmp(enc, "AQIAAwQFAAYHCAAJAA") != 0)))
+            s = NATS_ERR;
+
+        free(enc);
+        enc = NULL;
+    }
+    testCond(s == NATS_OK);
+
+    test("Encode nil: ");
+    s = nats_Base64_Encode(NULL, 0, &enc);
+    testCond((s == NATS_OK) && (enc == NULL));
+
+    test("Encode empty: ");
+    s = nats_Base64_Encode((const unsigned char*) "", 0, &enc);
+    testCond((s == NATS_OK) && (enc == NULL));
+
+    test("Encode strings: ");
+    for (i=0; i<(int)(sizeof(testStrings)/sizeof(char*)); i++)
+    {
+        s = nats_Base64_Encode((const unsigned char*) testStrings[i], (int)strlen(testStrings[i]), &enc);
+        if ((s == NATS_OK) && ((enc == NULL) || (strcmp(enc, expectedResultsStd[i]) != 0)))
+            s = NATS_ERR;
+
+        free(enc);
+        enc = NULL;
+        if (s != NATS_OK)
+            break;
+    }
+    testCond(s == NATS_OK);
+
+    test("Encode bytes: ");
+    {
+        s = nats_Base64_Encode((const unsigned char*) &someBytes, sbl, &enc);
+        if ((s == NATS_OK) && ((enc == NULL) || (strcmp(enc, sbe) != 0)))
+            s = NATS_ERR;
+
+        free(enc);
+        enc = NULL;
+    }
+    testCond(s == NATS_OK);
+
+    test("DecodeLen src needed: ");
+    s = nats_Base64_DecodeLen(NULL, &sl, &dl);
+    if (s == NATS_INVALID_ARG)
+        s = nats_Base64_DecodeLen("", &sl, &dl);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("DecodeLen bad src len: ");
+    s = nats_Base64_DecodeLen("foo", &sl, &dl);
+    testCond((s == NATS_INVALID_ARG)
+                && (strstr(nats_GetLastError(NULL), "invalid base64 length") != NULL));
+    nats_clearLastError();
+
+    test("DecodeLen bad content: ");
+    s = nats_Base64_DecodeLen("f=oo", &sl, &dl);
+    if (s == NATS_INVALID_ARG)
+        s = nats_Base64_DecodeLen("@!^*.#_$(foo", &sl, &dl);
+    testCond((s == NATS_INVALID_ARG)
+                && (strstr(nats_GetLastError(NULL), "invalid base64 character") != NULL));
+    nats_clearLastError();
+
+    test("DecodeLen: ");
+    s = nats_Base64_DecodeLen(sbe, &sl, &dl);
+    testCond((s == NATS_OK) && (sl == (int) strlen(sbe)) && (dl == sbl));
+
+    test("Decode strings: ");
+    for (i=0; i<(int)(sizeof(expectedResultsStd)/sizeof(char*)); i++)
+    {
+        s = nats_Base64_Decode(expectedResultsStd[i], &dec, &dl);
+        if ((s == NATS_OK)
+                && ((dec == NULL) || (dl != (int) strlen(testStrings[i]))
+                    || (strncmp((const char*) dec, testStrings[i], dl) != 0)))
+        {
+            s = NATS_ERR;
+        }
+        free(dec);
+        dec = NULL;
+        dl = 0;
+    }
+    testCond(s == NATS_OK);
+
+    test("Decode bytes: ");
+    s = nats_Base64_Decode(sbe, &dec, &dl);
+    if ((s == NATS_OK)
+        && ((dec == NULL) || (dl != sbl)
+            || (memcmp((const void*) someBytes, (const void*) dec, sbl) != 0)))
+    {
+        s = NATS_ERR;
+    }
+    testCond(s == NATS_OK);
+    free(dec);
+}
+
+static void
+test_natsCRC16(void)
+{
+    unsigned char   a[] = {153, 209, 36, 74, 103, 32, 65, 34, 111, 68, 104, 156, 50, 14, 164, 140, 144, 230};
+    uint16_t        crc = 0;
+    uint16_t        expected = 10272;
+
+    test("Compute: ");
+    crc = nats_CRC16_Compute(a, (int)sizeof(a));
+    testCond(crc == expected);
+
+    test("Verify: ");
+    testCond(nats_CRC16_Validate(a, (int)sizeof(a), expected));
+
+    test("Expect failure: ");
+    a[3] = 63;
+    testCond(!nats_CRC16_Validate(a, (int)sizeof(a), expected));
+}
+
+static void
+test_natsKeys(void)
+{
+    natsStatus          s;
+    unsigned char       sig[NATS_CRYPTO_SIGN_BYTES];
+    const char          *nonceVal  = "nonce";
+    const unsigned char *nonce     = (const unsigned char*) nonceVal;
+    const unsigned char expected[] = {
+            155, 157,   8, 183,  93, 154,  78,   7,
+            219,  39,  11,  16, 134, 231,  46, 142,
+            168,  87, 110, 202, 187, 180, 179,  62,
+             49, 255, 225,  74,  48,  80, 176, 111,
+            248, 162, 121, 188, 203, 101, 100, 195,
+            162,  70, 213, 182, 220,  14,  71, 113,
+             93, 239, 141, 131,  66, 190, 237, 127,
+            104, 191, 138, 217, 227,   1,  92,  14,
+    };
+
+    test("Invalid key: ");
+    s = natsKeys_Sign("ABC", nonce, 0, sig);
+    testCond((s == NATS_ERR)
+            && (nats_GetLastError(NULL) != NULL)
+            && (strstr(nats_GetLastError(NULL), NKEYS_INVALID_ENCODED_KEY) != NULL));
+    nats_clearLastError();
+
+    // This is generated from XYTHISISNOTAVALIDSEED with correct checksum.
+    // Expect to get invalid seed
+    test("Invalid seed: ");
+    s = natsKeys_Sign("LBMVISCJKNEVGTSPKRAVMQKMJFCFGRKFIQ52C", nonce, 0, sig);
+    testCond((s == NATS_ERR)
+                && (nats_GetLastError(NULL) != NULL)
+                && (strstr(nats_GetLastError(NULL), NKEYS_INVALID_SEED) != NULL));
+    nats_clearLastError();
+
+    test("Invalid prefix: ");
+    s = natsKeys_Sign("SBAUEQ2EIVDEOSCJJJFUYTKOJ5IFCUSTKRKVMV2YLFNECQSDIRCUMR2IJFFEWTCNJZHVAUKSKNKFKVSXLBMVUQKCINCEKRSHJBEUUS2MJVHE6UCRKJJVIVKWK5MFSWV2QA", nonce, 0, sig);
+    testCond((s == NATS_ERR)
+                && (nats_GetLastError(NULL) != NULL)
+                && (strstr(nats_GetLastError(NULL), NKEYS_INVALID_PREFIX) != NULL));
+    nats_clearLastError();
+
+    // This is the valid seed: SUAMK2FG4MI6UE3ACF3FK3OIQBCEIEZV7NSWFFEW63UXMRLFM2XLAXK4GY
+    // Make the checksum incorrect by changing last 2 bytes.
+    test("Invalid checksum: ");
+    s = natsKeys_Sign("SUAMK2FG4MI6UE3ACF3FK3OIQBCEIEZV7NSWFFEW63UXMRLFM2XLAXK4AA", nonce, 0, sig);
+    testCond((s == NATS_ERR)
+                && (nats_GetLastError(NULL) != NULL)
+                && (strstr(nats_GetLastError(NULL), NKEYS_INVALID_CHECKSUM) != NULL));
+    nats_clearLastError();
+
+    // Now use valid SEED
+    test("Sign ok: ");
+    s = natsKeys_Sign("SUAMK2FG4MI6UE3ACF3FK3OIQBCEIEZV7NSWFFEW63UXMRLFM2XLAXK4GY", nonce, 0, sig);
+    testCond((s == NATS_OK)
+                && (memcmp(sig, expected, sizeof(expected)) == 0));
+}
+
+static void
+test_natsReadFile(void)
+{
+    natsStatus      s    = NATS_OK;
+    natsBuffer      *buf = NULL;
+    FILE            *f   = NULL;
+    const char      *fn  = "test_readfile.txt";
+    const char      *content = "This is some content.\nThere are 2 lines in this file.\n";
+
+    test("Invalid arg 1: ");
+    s = nats_ReadFile(&buf, 0, "file.txt");
+    testCond((s == NATS_INVALID_ARG) && (buf == NULL));
+
+    test("Invalid arg 2: ");
+    s = nats_ReadFile(&buf, -1, "file.txt");
+    testCond((s == NATS_INVALID_ARG) && (buf == NULL));
+
+    test("Invalid arg 3: ");
+    s = nats_ReadFile(&buf, 100, NULL);
+    testCond((s == NATS_INVALID_ARG) && (buf == NULL));
+
+    test("Invalid arg 4: ");
+    s = nats_ReadFile(&buf, 100, "");
+    testCond((s == NATS_INVALID_ARG) && (buf == NULL));
+
+    test("File not found: ");
+    s = nats_ReadFile(&buf, 100, "fileNotFound.txt");
+    testCond((s == NATS_ERR)
+                && (strstr(nats_GetLastError(NULL), "fileNotFound.txt") != NULL)
+                && (buf == NULL));
+    nats_clearLastError();
+
+    // Create temp file with some content...
+    f = fopen(fn, "w");
+    if (f == NULL)
+    {
+        FAIL("Unable to create test file");
+    }
+    else
+    {
+        int res = fputs(content, f);
+        if (res < 0)
+            FAIL("Unable to write content of test file");
+
+        fclose(f);
+        f = NULL;
+    }
+
+    test("Read with large buffer: ");
+    s = nats_ReadFile(&buf, 1024, fn);
+    testCond((s == NATS_OK)
+                && (buf != NULL)
+                && (natsBuf_Capacity(buf) == 1024)
+                && (natsBuf_Len(buf) == (int) strlen(content)+1)
+                && (strcmp(natsBuf_Data(buf), content) == 0));
+    natsBuf_Destroy(buf);
+    buf = NULL;
+
+    test("Read with small buffer: ");
+    // The content is 55 bytes. We start with buffer of 10 and x2
+    // when expanding, so capacity should be 10, 20, 40, 80.
+    s = nats_ReadFile(&buf, 10, fn);
+    testCond((s == NATS_OK)
+                && (buf != NULL)
+                && (natsBuf_Capacity(buf) == 80)
+                && (natsBuf_Len(buf) == (int) strlen(content)+1)
+                && (strcmp(natsBuf_Data(buf), content) == 0));
+    natsBuf_Destroy(buf);
+    buf = NULL;
+
+    test("Read with buffer of exact file content: ");
+    // Use a buf capacity that matches exactly the content on file.
+    // But since we need to add the terminating `\0`, then we will
+    // need to expand.
+    s = nats_ReadFile(&buf, (int)strlen(content), fn);
+    testCond((s == NATS_OK)
+                && (buf != NULL)
+                && (natsBuf_Capacity(buf) == (int)strlen(content)*2)
+                && (natsBuf_Len(buf) == (int) strlen(content)+1)
+                && (strcmp(natsBuf_Data(buf), content) == 0));
+    natsBuf_Destroy(buf);
+    buf = NULL;
+
+    s = nats_ReadFile(&buf, (int)strlen(content)+1, fn);
+    testCond((s == NATS_OK)
+                && (buf != NULL)
+                && (natsBuf_Capacity(buf) == (int)strlen(content)+1)
+                && (natsBuf_Len(buf) == (int) strlen(content)+1)
+                && (strcmp(natsBuf_Data(buf), content) == 0));
+    natsBuf_Destroy(buf);
+    buf = NULL;
+
+    remove(fn);
+}
+
+static void
+test_natsGetJWTOrSeed(void)
+{
+    natsStatus  s;
+    char        *val = NULL;
+    char        buf[256];
+    const char  *valids[] = {
+        "--- START JWT ---\nsome value\n--- END JWT ---\n",
+        "--- ---\nsome value\n--- ---\n",
+        "------\nsome value\n------\n",
+        "---\nabc\n--\n---START---\nsome value\n---END---\n----\ndef\n--- ---\n",
+        "nothing first\nthen it starts\n  --- START ---\nsome value\n--- END ---\n---START---\nof something else\n---END---\n",
+        "--- START ---\nsome value\n\n\n--- END ---\n",
+    };
+    const char *invalids[] = {
+        "-- JWT -- START ----\nsome value\n--- END ---\n",
+        "--- START --- \nsome value\n--- END ---\n",
+        "--- START ---\nsome value\n-- END ---\n",
+        "--- START ---\nsome value\n---- END --- \n",
+    };
+    int i;
+    int iter;
+
+    for (iter=0; iter<2; iter++)
+    {
+        for (i=0; i<(int)(sizeof(valids)/sizeof(char*));i++)
+        {
+            snprintf(buf, sizeof(buf), "%s %d: ", (iter==0 ? "JWT" : "Seed"), (i+1));
+            test(buf);
+            snprintf(buf, sizeof(buf), "%s%s", (iter == 0 ? "" : "------\njwt\n------\n"), valids[i]);
+            s = nats_GetJWTOrSeed(&val, buf, iter);
+            testCond((s == NATS_OK) && (val != NULL) && (strcmp(val, "some value") == 0));
+            free(val);
+            val = NULL;
+        }
+
+        for (i=0; i<(int)(sizeof(invalids)/sizeof(char*));i++)
+        {
+            snprintf(buf, sizeof(buf), "%s invalid %d: ", (iter == 0 ? "JWT" : "Seed"), (i+1));
+            test(buf);
+            snprintf(buf, sizeof(buf), "%s%s", (iter == 0 ? "" : "------\njwt\n------\n"), invalids[i]);
+            s = nats_GetJWTOrSeed(&val, buf, iter);
+            testCond((s == NATS_NOT_FOUND) && (val == NULL));
+        }
+    }
+}
+
+static void
+test_natsHostIsIP(void)
+{
+    struct _testHost {
+        const char *host;
+        bool       isIP;
+    };
+    const struct _testHost hosts[] = {
+        { "1.2.3.4", true },
+        { "::1", true },
+        { "localhost", false },
+        { "www.host.name.com", false },
+    };
+    int i;
+
+    for (i=0; i<(int)(sizeof(hosts)/sizeof(struct _testHost)); i++)
+    {
+        char buf[256];
+
+        snprintf(buf, sizeof(buf), "Check '%s': ", hosts[i].host);
+        test(buf);
+        testCond(nats_HostIsIP(hosts[i].host) == hosts[i].isIP)
+    }
+}
+
+static void
+_testWaitReadyServer(void *closure)
+{
+    struct addrinfo     *servinfo = NULL;
+    natsStatus          s         = NATS_OK;
+    natsSock            sock      = NATS_SOCK_INVALID;
+    natsSock            cliSock   = NATS_SOCK_INVALID;
+    struct threadArg    *arg      = (struct threadArg*) closure;
+    struct addrinfo     hints;
+    int                 res;
+
+    memset(&hints,0,sizeof(hints));
+
+    hints.ai_family   = AF_INET;
+    hints.ai_socktype = SOCK_STREAM;
+    hints.ai_protocol = IPPROTO_TCP;
+    hints.ai_flags    = AI_PASSIVE;
+
+    if ((res = getaddrinfo("127.0.0.1", "1234", &hints, &servinfo)) != 0)
+         s = NATS_SYS_ERROR;
+    if (s == NATS_OK)
+    {
+        sock = socket(servinfo->ai_family, servinfo->ai_socktype,
+                      servinfo->ai_protocol);
+        if (sock == NATS_SOCK_INVALID)
+            s = NATS_SYS_ERROR;
+
+        IFOK(s, natsSock_SetCommonTcpOptions(sock));
+        IFOK(s, natsSock_SetBlocking(sock, true));
+    }
+    if ((s == NATS_OK)
+        && (bind(sock, servinfo->ai_addr, (natsSockLen) servinfo->ai_addrlen) == NATS_SOCK_ERROR))
+    {
+        s = NATS_SYS_ERROR;
+    }
+
+    if ((s == NATS_OK) && (listen(sock, 100) == 0))
+    {
+        cliSock = accept(sock, NULL, NULL);
+        if ((cliSock != NATS_SOCK_INVALID)
+                && (natsSock_SetCommonTcpOptions(cliSock) == NATS_OK))
+        {
+            nats_Sleep(500);
+
+            send(cliSock, "*", 1, 0);
+
+            natsMutex_Lock(arg->m);
+            while ((s != NATS_TIMEOUT) && !arg->done)
+                s = natsCondition_TimedWait(arg->c, arg->m, 10000);
+            natsMutex_Unlock(arg->m);
+
+            natsSock_Close(cliSock);
+        }
+    }
+    natsSock_Close(sock);
+    nats_FreeAddrInfo(servinfo);
+}
+
+static void
+_testSockShutdownThread(void *closure)
+{
+    natsSockCtx *ctx = (natsSockCtx*) closure;
+
+    nats_Sleep(500);
+    natsSock_Shutdown(ctx->fd);
+}
+
+static void
+test_natsWaitReady(void)
+{
+    natsStatus          s  = NATS_OK;
+    natsThread          *t = NULL;
+    natsThread          *t2 = NULL;
+    natsSockCtx         ctx;
+    int64_t             start, dur;
+    char                buffer[1];
+    int                 i;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    if (natsThread_Create(&t, _testWaitReadyServer, &arg) != NATS_OK)
+    {
+        _destroyDefaultThreadArgs(&arg);
+        FAIL("Unable to setup test");
+    }
+
+    test("Connect: ");
+    natsSock_Init(&ctx);
+    ctx.orderIP = 4;
+    natsSock_ClearDeadline(&ctx);
+    for (i=0; i<20; i++)
+    {
+        s = natsSock_ConnectTcp(&ctx, "127.0.0.1", 1234);
+        if (s == NATS_OK)
+            break;
+        nats_Sleep(100);
+    }
+    testCond(s == NATS_OK);
+
+    test("Set non blocking: ");
+    s = natsSock_SetCommonTcpOptions(ctx.fd);
+    IFOK(s, natsSock_SetBlocking(ctx.fd, false));
+    testCond(s == NATS_OK);
+
+    // Ensure that we get a would_block on read..
+    while (recv(ctx.fd, buffer, 1, 0) != -1) {}
+
+    test("WaitReady no deadline: ");
+    natsSock_ClearDeadline(&ctx);
+    start = nats_Now();
+    s = natsSock_WaitReady(WAIT_FOR_READ, &ctx);
+    dur = nats_Now()-start;
+    testCond((s == NATS_OK) && (dur >= 450) && (dur <= 600));
+
+    // Ensure that we get a would_block on read..
+    while (recv(ctx.fd, buffer, 1, 0) != -1) {}
+
+    test("WaitReady deadline timeout: ");
+    natsSock_InitDeadline(&ctx, 50);
+    start = nats_Now();
+    s = natsSock_WaitReady(WAIT_FOR_READ, &ctx);
+    dur = nats_Now()-start;
+    testCond((s == NATS_TIMEOUT) && (dur >= 40) && (dur <= 100));
+
+    // Ensure that we get a would_block on read..
+    while (recv(ctx.fd, buffer, 1, 0) != -1) {}
+
+    test("WaitReady kicked out by shutdown: ");
+    natsSock_ClearDeadline(&ctx);
+    start = nats_Now();
+    s = natsThread_Create(&t2, _testSockShutdownThread, &ctx);
+    IFOK(s, natsSock_WaitReady(WAIT_FOR_READ, &ctx));
+    dur = nats_Now()-start;
+    testCond((s == NATS_OK) && (dur <= 3000));
+
+    natsSock_Close(ctx.fd);
+
+    natsMutex_Lock(arg.m);
+    arg.done = true;
+    natsCondition_Signal(arg.c);
+    natsMutex_Unlock(arg.m);
+
+    natsThread_Join(t);
+    natsThread_Destroy(t);
+
+    if (t2 != NULL)
+    {
+        natsThread_Join(t2);
+        natsThread_Destroy(t2);
+    }
+
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+test_natsSign(void)
+{
+    unsigned char   *sig   = NULL;
+    int             sigLen = 0;
+    char            *sig64 = NULL;
+    natsStatus      s;
+
+    test("nats_Sign invalid param 1: ");
+    s = nats_Sign(NULL, "nonce", &sig, &sigLen);
+    testCond(s == NATS_INVALID_ARG);
+
+    test("nats_Sign invalid param 2: ");
+    s = nats_Sign("seed", NULL, &sig, &sigLen);
+    testCond(s == NATS_INVALID_ARG);
+
+    test("nats_Sign invalid param 3: ");
+    s = nats_Sign("seed", "nonce", NULL, &sigLen);
+    testCond(s == NATS_INVALID_ARG);
+
+    test("nats_Sign invalid param 4: ");
+    s = nats_Sign("seed", "nonce", &sig, NULL);
+    testCond(s == NATS_INVALID_ARG);
+
+    nats_clearLastError();
+
+    test("Sign ok: ");
+    s = nats_Sign(
+        "SUACSSL3UAHUDXKFSNVUZRF5UHPMWZ6BFDTJ7M6USDXIEDNPPQYYYCU3VY",
+        "nonce", &sig, &sigLen);
+    IFOK(s, nats_Base64RawURL_EncodeString((const unsigned char*) sig, sigLen, &sig64));
+    testCond((s == NATS_OK)
+        && (sig != NULL)
+        && (sig64 != NULL)
+        && (sigLen == NATS_CRYPTO_SIGN_BYTES)
+        && (memcmp((void*) sig64,
+                   (void*) "AVfpO7Pw3rc56hoO1OJcFxXUCfBmO2qouchBchSlL45Fuur9zS15UzytEI1QC5wwVG7uiHIdqyfmOS6uPrwqCg",
+                   NATS_CRYPTO_SIGN_BYTES) == 0));
+
+    free(sig);
+    free(sig64);
+}
+
+static void
+_testHeader(const char *testName, char *buf, natsStatus expected, const char *errTxt,
+            const char *key, const char *value)
+{
+    natsStatus  s    = NATS_OK;
+    natsMsg     *msg = NULL;
+    const char  *val = NULL;
+    const char  *k   = (key == NULL ? "k" : key);
+
+    test(testName);
+    s = natsMsg_create(&msg, "foo", 3, NULL, 0, buf, (int)strlen(buf), (int) strlen(buf));
+    IFOK(s, natsMsgHeader_Get(msg, k, &val));
+    if (expected == NATS_OK)
+    {
+        testCond((s == NATS_OK) && (val != NULL) && (strcmp(val, value) == 0));
+    }
+    else
+    {
+        const char *le = nats_GetLastError(&s);
+        testCond((s == expected) && (strstr(le, errTxt) != NULL));
+        nats_clearLastError();
+    }
+
+    natsMsg_Destroy(msg);
+}
+
+static void
+_testStatus(const char *testName, char *buf, const char *expectedStatus, const char *expectedDescription)
+{
+    natsStatus  s     = NATS_OK;
+    natsMsg     *msg  = NULL;
+    const char  *sts  = NULL;
+    const char  *desc = NULL;
+
+    test(testName);
+    s = natsMsg_create(&msg, "foo", 3, NULL, 0, buf, (int)strlen(buf), (int) strlen(buf));
+    IFOK(s, natsMsgHeader_Get(msg, STATUS_HDR, &sts));
+    IFOK(s, natsMsgHeader_Get(msg, DESCRIPTION_HDR, &desc));
+    testCond((s == (expectedDescription == NULL ? NATS_NOT_FOUND : NATS_OK)
+            && ((sts != NULL) && (strcmp(sts, expectedStatus) == 0))
+            && (expectedDescription == NULL
+                    ? desc == NULL
+                    : ((desc != NULL) && (strcmp(desc, expectedDescription) == 0)))));
+
+    natsMsg_Destroy(msg);
+}
+
+static void
+test_natsMsgHeadersLift(void)
+{
+    char buf[512];
+
+    snprintf(buf, sizeof(buf), "%sk:v\r\n\r\n", HDR_LINE);
+    _testHeader("Valid simple header: ", buf, NATS_OK, "", "k", "v");
+
+    snprintf(buf, sizeof(buf), "%sk e y:v\r\n\r\n", HDR_LINE);
+    _testHeader("Key with spaces ok: ", buf, NATS_OK, "", "k e y", "v");
+
+    snprintf(buf, sizeof(buf), "%sk e y  :v\r\n\r\n", HDR_LINE);
+    _testHeader("Key with spaces (including traling) ok: ", buf, NATS_OK, "", "k e y  ", "v");
+
+    snprintf(buf, sizeof(buf), "%sk:  v   \r\n\r\n", HDR_LINE);
+    _testHeader("Trim spaces for value: ", buf, NATS_OK, "", "k", "v");
+
+    snprintf(buf, sizeof(buf), "%sk: a\r\n   bc\r\n def\r\n\r\n", HDR_LINE);
+    _testHeader("Multiline values: ", buf, NATS_OK, "", "k", "a bc def");
+
+    snprintf(buf, sizeof(buf), "%s", "NATS\r\nk:v\r\n\r\n");
+    _testHeader("NATS header missing: ", buf, NATS_PROTOCOL_ERROR, "header prefix missing", NULL, NULL);
+
+    snprintf(buf, sizeof(buf), "%s", HDR_LINE);
+    _testHeader("NATS header missing CRLF: ", buf, NATS_PROTOCOL_ERROR, "early termination of headers", NULL, NULL);
+
+    snprintf(buf, sizeof(buf), "%sk:v\r\n\rbad\r\n", HDR_LINE);
+    _testHeader("Invalid key start: ", buf, NATS_PROTOCOL_ERROR, "invalid start of a key", NULL, NULL);
+
+    snprintf(buf, sizeof(buf), "%s k:v\r\n\r\n", HDR_LINE);
+    _testHeader("Space in key name: ", buf, NATS_PROTOCOL_ERROR, "key cannot start with a space", NULL, NULL);
+
+    snprintf(buf, sizeof(buf), "%sk\r\n\r\n", HDR_LINE);
+    _testHeader("Column missing: ", buf, NATS_PROTOCOL_ERROR, "column delimiter not found", NULL, NULL);
+
+    snprintf(buf, sizeof(buf), "%sk:\r\n\r\n", HDR_LINE);
+    _testHeader("No value: ", buf, NATS_PROTOCOL_ERROR, "no value found for key", NULL, NULL);
+
+    snprintf(buf, sizeof(buf), "%sk:       \r\n\r\n", HDR_LINE);
+    _testHeader("No value (extra spaces): ", buf, NATS_PROTOCOL_ERROR, "no value found for key", NULL, NULL);
+
+    // Check status description in header line prefix...
+
+    snprintf(buf, sizeof(buf), "%s 503\r\n\r\n", HDR_LINE_PRE);
+    _testStatus("Status no description: ", buf, "503", NULL);
+
+    snprintf(buf, sizeof(buf), "%s  503 \r\n\r\n", HDR_LINE_PRE);
+    _testStatus("Status no description (extra space): ", buf, "503", NULL);
+
+    snprintf(buf, sizeof(buf), "%s  503  \r\n\r\n", HDR_LINE_PRE);
+    _testStatus("Status no description (extra spaces): ", buf, "503", NULL);
+
+    snprintf(buf, sizeof(buf), "%s 503 No Responders\r\n\r\n", HDR_LINE_PRE);
+    _testStatus("Status with description: ", buf, "503", "No Responders");
+
+    snprintf(buf, sizeof(buf), "%s 404 No Messages \r\n\r\n", HDR_LINE_PRE);
+    _testStatus("Status with description (extra space): ", buf, "404", "No Messages");
+
+    snprintf(buf, sizeof(buf), "%s  404   No Messages   \r\n\r\n", HDR_LINE_PRE);
+    _testStatus("Status with description (extra spaces): ", buf, "404", "No Messages");
+}
+
+static void
+test_natsMsgHeaderAPIs(void)
+{
+    natsStatus  s        = NATS_OK;
+    natsMsg     *msg     = NULL;
+    const char  *val     = NULL;
+    const char* *values  = NULL;
+    const char* *keys    = NULL;
+    int         count    = 0;
+    const char  *longKey = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
+
+    test("Create message: ");
+    s = natsMsg_Create(&msg, "foo", NULL, "body", 4);
+    testCond(s == NATS_OK);
+
+    test("Key cannot be NULL: ");
+    s = natsMsgHeader_Set(msg, NULL, "value");
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Key cannot be empty: ");
+    s = natsMsgHeader_Set(msg, "", "value");
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Set msg cannot be NULL: ");
+    s = natsMsgHeader_Set(NULL, "key", "value");
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Set value: ");
+    s = natsMsgHeader_Set(msg, "my-key", "value1");
+    testCond(s == NATS_OK);
+
+    test("Get msg cannot be NULL: ");
+    s = natsMsgHeader_Get(NULL, "my-key", &val);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Get must provide mem location: ");
+    s = natsMsgHeader_Get(msg, "my-key", NULL);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Get: ");
+    s = natsMsgHeader_Get(msg, "my-key", &val);
+    testCond((s == NATS_OK) &&
+                (val != NULL) &&
+                (strcmp(val, "value1") == 0));
+    val = NULL;
+
+    test("Get value with different case: ");
+    s = natsMsgHeader_Get(msg, "my-Key", &val);
+    testCond((s == NATS_NOT_FOUND) && (val == NULL));
+    val = NULL;
+
+    test("Key not found: ");
+    s = natsMsgHeader_Get(msg, "unknown-key", &val);
+    testCond((s == NATS_NOT_FOUND) && (val == NULL));
+    val = NULL;
+
+    test("Set value replace old: ");
+    s = natsMsgHeader_Set(msg, "my-key", "value2");
+    testCond(s == NATS_OK);
+
+    test("Get value: ");
+    s = natsMsgHeader_Get(msg, "my-key", &val);
+    testCond((s == NATS_OK) &&
+                (val != NULL) &&
+                (strcmp(val, "value2") == 0));
+    val = NULL;
+
+    test("Set NULL value: ");
+    s = natsMsgHeader_Set(msg, "my-key", NULL);
+    testCond(s == NATS_OK);
+
+    test("Get value: ");
+    s = natsMsgHeader_Get(msg, "my-key", &val);
+    testCond((s == NATS_OK) && (val == NULL));
+    val = NULL;
+
+    test("Set empty value: ");
+    s = natsMsgHeader_Set(msg, "my-key", "");
+    testCond(s == NATS_OK);
+
+    test("Get value: ");
+    s = natsMsgHeader_Get(msg, "my-key", &val);
+    testCond((s == NATS_OK) && (val != NULL) && (val[0] == '\0'));
+    val = NULL;
+
+    test("Add msg cannot be NULL: ");
+    s = natsMsgHeader_Add(NULL, "key", "value");
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Add first: ");
+    s = natsMsgHeader_Add(msg, "two-fields", "val1");
+    testCond(s == NATS_OK);
+
+    test("Add second: ");
+    s = natsMsgHeader_Add(msg, "two-fields", "val2");
+    testCond(s == NATS_OK);
+
+    test("Get should return first: ");
+    s = natsMsgHeader_Get(msg, "two-fields", &val);
+    testCond((s == NATS_OK) &&
+                (val != NULL) &&
+                (strcmp(val, "val1") == 0));
+    val = NULL;
+
+    test("Values: ");
+    s = natsMsgHeader_Values(msg, "two-fields", &values, &count);
+    testCond((s == NATS_OK) && (values != NULL) && (count == 2) &&
+                (strcmp(values[0], "val1") == 0) &&
+                (strcmp(values[1], "val2") == 0));
+
+    if (values != NULL)
+        free((void*) values);
+    values = NULL;
+    count  = 0;
+
+    test("Add after a Set: ");
+    s = natsMsgHeader_Set(msg, "my-other-key", "val3");
+    IFOK(s, natsMsgHeader_Add(msg, "my-other-key", "val4"));
+    IFOK(s, natsMsgHeader_Values(msg, "my-other-key", &values, &count));
+    testCond((s == NATS_OK) && (values != NULL) && (count == 2) &&
+                (strcmp(values[0], "val3") == 0) &&
+                (strcmp(values[1], "val4") == 0));
+
+    if (values != NULL)
+        free((void*) values);
+    values = NULL;
+    count  = 0;
+
+    test("Keys msg cannot be NULL: ");
+    s = natsMsgHeader_Keys(NULL, &keys, &count);
+    testCond((s == NATS_INVALID_ARG) && (keys == NULL) && (count == 0));
+    if (s == NATS_INVALID_ARG)
+    {
+        s = NATS_OK;
+        nats_clearLastError();
+    }
+
+    test("Keys keys cannot be NULL: ");
+    s = natsMsgHeader_Keys(msg, NULL, &count);
+    testCond((s == NATS_INVALID_ARG) && (keys == NULL) && (count == 0));
+    nats_clearLastError();
+
+    test("Keys count cannot be NULL: ");
+    s = natsMsgHeader_Keys(msg, &keys, NULL);
+    testCond((s == NATS_INVALID_ARG) && (keys == NULL) && (count == 0));
+    nats_clearLastError();
+
+    test("Keys: ");
+    s = natsMsgHeader_Keys(msg, &keys, &count);
+    if ((s == NATS_OK) && ((keys == NULL) || (count != 3)))
+    {
+        s = NATS_ERR;
+    }
+    else
+    {
+        int i;
+        bool ok1 = false;
+        bool ok2 = false;
+        bool ok3 = false;
+
+        for (i=0; i<count; i++)
+        {
+            if (strcmp(keys[i], "my-key") == 0)
+                ok1 = true;
+            else if (strcmp(keys[i], "two-fields") == 0)
+                ok2 = true;
+            else if (strcmp(keys[i], "my-other-key") == 0)
+                ok3 = true;
+        }
+        if (!ok1 || !ok2 || !ok3)
+            s = NATS_ERR;
+    }
+    testCond(s == NATS_OK);
+    if (keys != NULL)
+        free((void*) keys);
+    count = 0;
+
+    test("Set with long key: ");
+    s = natsMsgHeader_Set(msg, longKey, "val1");
+    testCond(s == NATS_OK);
+
+    test("Add with long key: ");
+    s = natsMsgHeader_Add(msg, longKey, "val2");
+    testCond(s == NATS_OK);
+
+    test("Get with long key: ");
+    s = natsMsgHeader_Get(msg, longKey, &val);
+    testCond((s == NATS_OK) && (val != NULL) && (strcmp(val, "val1") == 0));
+
+    test("Values with long key: ");
+    s = natsMsgHeader_Values(msg, longKey, &values, &count);
+    testCond((s == NATS_OK) && (values != NULL) && (count == 2) &&
+                (strcmp(values[0], "val1") == 0) &&
+                (strcmp(values[1], "val2") == 0));
+    free((void*) values);
+    count = 0;
+
+    test("Delete msg cannot be NULL: ");
+    s = natsMsgHeader_Delete(NULL, "key");
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Delete key cannot be NULL: ");
+    s = natsMsgHeader_Delete(msg, NULL);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Delete key cannot be empty: ");
+    s = natsMsgHeader_Delete(msg, "");
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Delete: ");
+    s = natsMsgHeader_Delete(msg, "my-other-key");
+    testCond(s == NATS_OK);
+
+    test("Should be gone: ");
+    s = natsMsgHeader_Get(msg, "my-other-key", &val);
+    testCond((s == NATS_NOT_FOUND) && (val == NULL));
+
+    natsMsg_Destroy(msg);
+}
+
+static void
+test_natsMsgIsJSCtrl(void)
+{
+    struct testCase {
+        const char  *buf;
+        int         dataLen;
+        bool        isCtrl;
+        int         ct;
+    };
+    const struct testCase cases[] = {
+        {"key:value\r\n\r\n", 0, false, 0},
+        {"data", 4, false, 0},
+        {"NATS/1.0 \r\n\r\n", 0, false, 0},
+        {"NATS/1.0 100 Idle Heartbeat\r\n\r\ndata", 4, false, 0},
+        {"NATS/1.0 200 Some status...\r\n\r\n", 0, false, 0},
+        {"NATS/1.0100 Idle Heartbeat\r\n\r\n", 0,  false, 0},
+        {"NATS/1.0 1000 Some status\r\n\r\n", 0, false, 0},
+        {"NATS/1.0 100-Some status\r\n\r\n", 0, false, 0},
+        {"NATS/1.0 100\r\n\r\n", 0, true, 0},
+        {"NATS/1.0  100\r\n\r\n", 0, true, 0},
+        {"NATS/1.0   100\r\n\r\n", 0, true, 0},
+        {"NATS/1.0   100 \r\n\r\n", 0, true, 0},
+        {"NATS/1.0   100  \r\n\r\n", 0, true, 0},
+        {"NATS/1.0  100  \r\n\r\n", 0, true, 0},
+        {"NATS/1.0 100  \r\n\r\n", 0, true, 0},
+        {"NATS/1.0 100 \r\n\r\n", 0, true, 0},
+        {"NATS/1.0 100\n\r\n", 0, true, 0},
+        {"NATS/1.0 100  Idle Heartbeat\r\n\r\n", 0, true, jsCtrlHeartbeat},
+        {"NATS/1.0 100 Idle Heartbeat\r\n\r\n", 0, true, jsCtrlHeartbeat},
+        {"NATS/1.0 100  FlowControl Request\r\n\r\n", 0, true, jsCtrlFlowControl},
+        {"NATS/1.0 100 FlowControl Request\r\n\r\n", 0, true, jsCtrlFlowControl},
+    };
+    natsStatus  s;
+    natsMsg     *msg = NULL;
+    char        temp[64];
+    int         i;
+
+    for (i=0; i<(int)(sizeof(cases)/sizeof(struct testCase)); i++)
+    {
+        int bufLen;
+
+        snprintf(temp, sizeof(temp), "Case %d - isCtrl=%d: ", (i+1), cases[i].isCtrl);
+        test(temp);
+        bufLen = (int)strlen(cases[i].buf);
+        s = natsMsg_create(&msg, "foo", 3, NULL, 0, cases[i].buf, bufLen, bufLen-cases[i].dataLen);
+        if (s == NATS_OK)
+        {
+            int ctrlType = 0;
+            bool isCtrl  = false;
+
+            isCtrl = natsMsg_isJSCtrl(msg, &ctrlType);
+            s = ((isCtrl == cases[i].isCtrl) && (ctrlType == cases[i].ct) ? NATS_OK : NATS_ERR);
+        }
+        testCond(s == NATS_OK);
+        natsMsg_Destroy(msg);
+        msg = NULL;
+    }
+}
+
+static void
+test_natsSrvVersionAtLeast(void)
+{
+    natsOptions     *opts   = NULL;
+    natsConnection  *nc     = NULL;
+    const char      *infos[]= {
+        "INFO {\"version\":\"2.7.2\"}\r\n",
+        "INFO {\"version\":\"bad.version\"}\r\n",
+        "INFO {\"no_version\":\"2.7.2\"}\r\n",
+        "INFO {\"version\":\"2.7.3-beta01\"}\r\n",
+    };
+    const int res[][3] = {
+        {2, 7, 2},
+        {0, 0, 0},
+        {0, 0, 0},
+        {2, 7, 3},
+    };
+    const int checksOK[][3] = {
+        {1, 0, 0},
+        {1, 1, 4},
+        {1, 8, 0},
+        {1, 8, 4},
+        {2, 7, 3},
+        {2, 6, 4},
+    };
+    const int checksBad[][3] = {
+        {2, 7, 4},
+        {2, 8, 0},
+        {3, 0, 0},
+    };
+    natsStatus s = NATS_OK;
+    int i;
+
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsConn_create(&nc, opts));
+    IFOK(s, natsParser_Create(&(nc->ps)));
+    if (s != NATS_OK)
+        FAIL("Unable to setup the test");
+
+    test("Check version parsing: ");
+    for (i=0; (s == NATS_OK) && (i<(int)(sizeof(infos)/sizeof(char*))); i++)
+    {
+        IFOK(s, natsParser_Parse(nc, (char*) infos[i], (int) strlen(infos[i])));
+        if (s == NATS_OK)
+        {
+            natsConn_Lock(nc);
+            if ((nc->srvVersion.ma != res[i][0]) || (nc->srvVersion.mi != res[i][1])
+                || (nc->srvVersion.up != res[i][2]))
+            {
+                s = NATS_ERR;
+            }
+        }
+    }
+    testCond(s == NATS_OK);
+
+    // Server version is 2.7.3 from last parsing
+
+    test("Check OK: ");
+    for (i=0; (s == NATS_OK) && (i<(int)(sizeof(checksOK)/sizeof(int[3]))); i++)
+        s = natsConn_srvVersionAtLeast(nc, checksOK[i][0], checksOK[i][1], checksOK[i][2]) ? NATS_OK : NATS_ERR;
+    testCond(s == NATS_OK);
+
+    test("Check Bad: ");
+    for (i=0; (s == NATS_OK) && (i<(int)(sizeof(checksBad)/sizeof(int[3]))); i++)
+        s = natsConn_srvVersionAtLeast(nc, checksBad[i][0], checksBad[i][1], checksBad[i][2]) ? NATS_ERR : NATS_OK;
+    testCond(s == NATS_OK);
+
+    natsConnection_Destroy(nc);
+}
+
+static natsStatus
+_checkStart(const char *url, int orderIP, int maxAttempts)
+{
+    natsStatus      s        = NATS_OK;
+    natsUrl         *nUrl    = NULL;
+    int             attempts = 0;
+    natsSockCtx     ctx;
+
+    natsSock_Init(&ctx);
+    ctx.orderIP = orderIP;
+
+    natsDeadline_Init(&(ctx.writeDeadline), 2000);
+
+    s = natsUrl_Create(&nUrl, url);
+    if (s == NATS_OK)
+    {
+        while (((s = natsSock_ConnectTcp(&ctx,
+                                         nUrl->host, nUrl->port)) != NATS_OK)
+               && (attempts++ < maxAttempts))
+        {
+            nats_Sleep(200);
+        }
+
+        natsUrl_Destroy(nUrl);
+
+        if (s == NATS_OK)
+            natsSock_Close(ctx.fd);
+        else
+            s = NATS_NO_SERVER;
+    }
+
+    nats_clearLastError();
+
+    return s;
+}
+
+static natsStatus
+_checkStreamingStart(const char *url, int maxAttempts)
+{
+    natsStatus      s     = NATS_NOT_PERMITTED;
+
+#if defined(NATS_HAS_STREAMING)
+
+    stanConnOptions *opts = NULL;
+    stanConnection  *sc   = NULL;
+    int             attempts = 0;
+
+    s = stanConnOptions_Create(&opts);
+    IFOK(s, stanConnOptions_SetURL(opts, url));
+    IFOK(s, stanConnOptions_SetConnectionWait(opts, 250));
+    if (s == NATS_OK)
+    {
+        while (((s = stanConnection_Connect(&sc, clusterName, "checkStart", opts)) != NATS_OK)
+                && (attempts++ < maxAttempts))
+        {
+            nats_Sleep(200);
+        }
+    }
+
+    stanConnection_Destroy(sc);
+    stanConnOptions_Destroy(opts);
+
+    if (s != NATS_OK)
+        nats_clearLastError();
+#else
+#endif
+    return s;
+}
+
+#ifdef _WIN32
+
+typedef PROCESS_INFORMATION *natsPid;
+
+static HANDLE logHandle = NULL;
+
+static void
+_stopServer(natsPid pid)
+{
+    if (pid == NATS_INVALID_PID)
+        return;
+
+    TerminateProcess(pid->hProcess, 0);
+    WaitForSingleObject(pid->hProcess, INFINITE);
+
+    CloseHandle(pid->hProcess);
+    CloseHandle(pid->hThread);
+
+    natsMutex_Lock(slMu);
+    natsHash_Remove(slMap, (int64_t) pid);
+    natsMutex_Unlock(slMu);
+
+    free(pid);
+}
+
+static natsPid
+_startServerImpl(const char *serverExe, const char *url, const char *cmdLineOpts, bool checkStart)
+{
+    SECURITY_ATTRIBUTES     sa;
+    STARTUPINFO             si;
+    HANDLE                  h;
+    PROCESS_INFORMATION     *pid;
+    DWORD                   flags = 0;
+    BOOL                    createdOk = FALSE;
+    BOOL                    hInheritance = FALSE;
+    char                    *exeAndCmdLine = NULL;
+    int                     ret;
+
+    pid = calloc(1, sizeof(PROCESS_INFORMATION));
+    if (pid == NULL)
+        return NATS_INVALID_PID;
+
+    ZeroMemory(&si, sizeof(si));
+    si.cb = sizeof(si);
+
+    ret = nats_asprintf(&exeAndCmdLine, "%s%s%s", serverExe,
+                        (cmdLineOpts != NULL ? " " : ""),
+                        (cmdLineOpts != NULL ? cmdLineOpts : ""));
+    if (ret < 0)
+    {
+        printf("No memory allocating command line string!\n");
+        free(pid);
+        return NATS_INVALID_PID;
+    }
+
+    if (!keepServerOutput)
+    {
+        ZeroMemory(&sa, sizeof(sa));
+        sa.nLength = sizeof(sa);
+        sa.lpSecurityDescriptor = NULL;
+        sa.bInheritHandle = TRUE;
+
+        h = logHandle;
+        if (h == NULL)
+        {
+            h = CreateFile(LOGFILE_NAME,
+                           GENERIC_WRITE,
+                           FILE_SHARE_WRITE | FILE_SHARE_READ,
+                           &sa,
+                           CREATE_ALWAYS,
+                           FILE_ATTRIBUTE_NORMAL,
+                           NULL);
+        }
+
+        si.dwFlags   |= STARTF_USESTDHANDLES;
+        si.hStdInput  = NULL;
+        si.hStdError  = h;
+        si.hStdOutput = h;
+
+        hInheritance = TRUE;
+        flags        = CREATE_NO_WINDOW;
+
+        if (logHandle == NULL)
+            logHandle = h;
+    }
+
+    // Start the child process.
+    if (!CreateProcess(NULL,
+                       (LPSTR) exeAndCmdLine,
+                       NULL,         // Process handle not inheritable
+                       NULL,         // Thread handle not inheritable
+                       hInheritance, // Set handle inheritance
+                       flags,        // Creation flags
+                       NULL,         // Use parent's environment block
+                       NULL,         // Use parent's starting directory
+                       &si,          // Pointer to STARTUPINFO structure
+                       pid))        // Pointer to PROCESS_INFORMATION structure
+    {
+
+        printf("Unable to start '%s': error (%d).\n",
+               exeAndCmdLine, GetLastError());
+        free(exeAndCmdLine);
+        return NATS_INVALID_PID;
+    }
+
+    free(exeAndCmdLine);
+
+    if (checkStart)
+    {
+        natsStatus s;
+
+        if (strcmp(serverExe, natsServerExe) == 0)
+            s = _checkStart(url, 46, 10);
+        else
+            s = _checkStreamingStart(url, 10);
+
+        if (s != NATS_OK)
+        {
+            _stopServer(pid);
+            return NATS_INVALID_PID;
+        }
+    }
+
+    natsMutex_Lock(slMu);
+    natsHash_Set(slMap, (int64_t) pid, NULL, NULL);
+    natsMutex_Unlock(slMu);
+
+    return (natsPid) pid;
+}
+
+#else
+
+typedef pid_t               natsPid;
+
+static void
+_stopServer(natsPid pid)
+{
+    int status = 0;
+
+    if (pid == NATS_INVALID_PID)
+        return;
+
+    if (kill(pid, SIGINT) < 0)
+    {
+        perror("kill with SIGINT");
+        if (kill(pid, SIGKILL) < 0)
+        {
+            perror("kill with SIGKILL");
+        }
+    }
+
+    waitpid(pid, &status, 0);
+
+    natsMutex_Lock(slMu);
+    natsHash_Remove(slMap, (int64_t) pid);
+    natsMutex_Unlock(slMu);
+}
+
+static natsPid
+_startServerImpl(const char *serverExe, const char *url, const char *cmdLineOpts, bool checkStart)
+{
+    natsPid pid = fork();
+    if (pid == -1)
+    {
+        perror("fork");
+        return NATS_INVALID_PID;
+    }
+
+    if (pid == 0)
+    {
+        char *exeAndCmdLine = NULL;
+        char *argvPtrs[64];
+        char *line = NULL;
+        int index = 0;
+        int ret = 0;
+        bool overrideAddr = false;
+
+        if ((cmdLineOpts == NULL) || (strstr(cmdLineOpts, "-a ") == NULL))
+            overrideAddr = true;
+
+        ret = nats_asprintf(&exeAndCmdLine, "%s%s%s%s%s", serverExe,
+                                (cmdLineOpts != NULL ? " " : ""),
+                                (cmdLineOpts != NULL ? cmdLineOpts : ""),
+                                (overrideAddr ? " -a 127.0.0.1" : ""),
+                                (keepServerOutput ? "" : " -l " LOGFILE_NAME));
+        if (ret < 0)
+        {
+            perror("No memory allocating command line string!\n");
+            exit(1);
+        }
+
+        memset(argvPtrs, 0, sizeof(argvPtrs));
+        line = exeAndCmdLine;
+
+        while (*line != '\0')
+        {
+            while ((*line == ' ') || (*line == '\t') || (*line == '\n'))
+                *line++ = '\0';
+
+            argvPtrs[index++] = line;
+            while ((*line != '\0') && (*line != ' ')
+                   && (*line != '\t') && (*line != '\n'))
+            {
+                line++;
+            }
+        }
+        argvPtrs[index++] = NULL;
+
+        // Child process. Replace with NATS server
+        execvp(argvPtrs[0], argvPtrs);
+        perror("Exec failed: ");
+        exit(1);
+    }
+    else if (checkStart)
+    {
+        natsStatus s;
+
+        if (strcmp(serverExe, natsServerExe) == 0)
+            s = _checkStart(url, 46, 10);
+        else
+            s = _checkStreamingStart(url, 10);
+
+        if (s != NATS_OK)
+        {
+            _stopServer(pid);
+            return NATS_INVALID_PID;
+        }
+    }
+
+    natsMutex_Lock(slMu);
+    natsHash_Set(slMap, (int64_t) pid, NULL, NULL);
+    natsMutex_Unlock(slMu);
+
+    // parent, return the child's PID back.
+    return pid;
+}
+#endif
+
+static natsPid
+_startServer(const char *url, const char *cmdLineOpts, bool checkStart)
+{
+    return _startServerImpl(natsServerExe, url, cmdLineOpts, checkStart);
+}
+
+static natsPid
+_startStreamingServer(const char* url, const char *cmdLineOpts, bool checkStart)
+{
+    return _startServerImpl(natsStreamingServerExe, url, cmdLineOpts, checkStart);
+}
+
+static void
+test_natsSock_IPOrder(void)
+{
+    natsStatus  s;
+    natsPid     serverPid;
+
+    test("Server listen to IPv4: ");
+    serverPid = _startServer("", "-a 127.0.0.1 -p 4222", false);
+    testCond(true);
+    test("IPv4 only: ");
+    s = _checkStart("nats://localhost:4222", 4, 5);
+    testCond(s == NATS_OK);
+    test("IPv4+v6: ");
+    s = _checkStart("nats://localhost:4222", 46, 5);
+    testCond(s == NATS_OK);
+    test("IPv6+v4: ");
+    s = _checkStart("nats://localhost:4222", 64, 5);
+    testCond(s == NATS_OK);
+    test("IP any: ");
+    s = _checkStart("nats://localhost:4222", 0, 5);
+    testCond(s == NATS_OK);
+    // This one should fail.
+    test("IPv6 only: ");
+    s = _checkStart("nats://localhost:4222", 6, 5);
+    testCond(s != NATS_OK);
+    _stopServer(serverPid);
+    serverPid = NATS_INVALID_PID;
+
+    if (!runOnTravis)
+    {
+        test("Server listen to IPv6: ");
+        serverPid = _startServer("", "-a :: -p 4222", false);
+        testCond(true);
+        test("IPv6 only: ");
+        s = _checkStart("nats://localhost:4222", 6, 5);
+        testCond(s == NATS_OK);
+        test("IPv4+v6: ");
+        s = _checkStart("nats://localhost:4222", 46, 5);
+        testCond(s == NATS_OK);
+        test("IPv6+v4: ");
+        s = _checkStart("nats://localhost:4222", 64, 5);
+        testCond(s == NATS_OK);
+        test("IP any: ");
+        s = _checkStart("nats://localhost:4222", 0, 5);
+        testCond(s == NATS_OK);
+        // This one should fail, but the server when listening
+        // to [::] is actually accepting IPv4 connections,
+        // so be tolerant of that.
+        test("IPv4 only: ");
+        s = _checkStart("nats://localhost:4222", 4, 5);
+        if (s == NATS_OK)
+            fprintf(stderr, ">>>> IPv4 to [::] should have failed, but server accepted it\n");
+        else
+            s = NATS_OK;
+        testCond(s == NATS_OK);
+        _stopServer(serverPid);
+    }
+}
+
+static void
+test_natsSock_ConnectTcp(void)
+{
+    natsPid     serverPid = NATS_INVALID_PID;
+
+    test("Check connect tcp: ");
+    serverPid = _startServer("nats://127.0.0.1:4222", "-p 4222", true);
+    testCond(serverPid != NATS_INVALID_PID);
+    _stopServer(serverPid);
+    serverPid = NATS_INVALID_PID;
+
+    test("Check connect tcp hostname: ");
+    serverPid = _startServer("nats://localhost:4222", "-p 4222", true);
+    testCond(serverPid != NATS_INVALID_PID);
+    _stopServer(serverPid);
+    serverPid = NATS_INVALID_PID;
+
+    test("Check connect tcp (force server to listen to IPv4): ");
+    serverPid = _startServer("nats://127.0.0.1:4222", "-a 127.0.0.1 -p 4222", true);
+    testCond(serverPid != NATS_INVALID_PID);
+    _stopServer(serverPid);
+    serverPid = NATS_INVALID_PID;
+}
+
+static bool
+listOrder(struct addrinfo *head, bool ordered)
+{
+    struct addrinfo *p;
+    int i;
+
+    p = head;
+    for (i=0; i<10; i++)
+    {
+        if (ordered && (p->ai_flags != (i+1)))
+            return false;
+        p = p->ai_next;
+    }
+    return true;
+}
+
+static void
+test_natsSock_ShuffleIPs(void)
+{
+    struct addrinfo *tmp[10];
+    struct addrinfo *head = NULL;
+    struct addrinfo *tail = NULL;
+    struct addrinfo *list = NULL;
+    struct addrinfo *p;
+    natsSockCtx     ctx;
+    int i=0;
+
+    // Create a fake list that has `ai_flags` set to 1 to 10.
+    // We will use that to check that the list is shuffled or not.
+    for (i=0; i<10; i++)
+    {
+        p = calloc(1, sizeof(struct addrinfo));
+        p->ai_flags = (i+1);
+        if (head == NULL)
+            head=p;
+        if (tail != NULL)
+            tail->ai_next = p;
+        tail = p;
+    }
+
+    test("No randomize, so no shuffling: ");
+    natsSock_Init(&ctx);
+    ctx.noRandomize = true;
+    list = head;
+    natsSock_ShuffleIPs(&ctx, tmp, sizeof(tmp), &list, 10);
+    testCond((list == head) && listOrder(list, true));
+
+    test("Shuffling bad args 2: ");
+    natsSock_Init(&ctx);
+    list = head;
+    natsSock_ShuffleIPs(&ctx, tmp, sizeof(tmp), NULL, 10);
+    testCond((list == head) && listOrder(list, true));
+
+    test("Shuffling bad args 1: ");
+    natsSock_Init(&ctx);
+    list = head;
+    natsSock_ShuffleIPs(&ctx, tmp, sizeof(tmp), &list, 0);
+    testCond((list == head) && listOrder(list, true));
+
+    test("No shuffling count==1: ");
+    natsSock_Init(&ctx);
+    list = head;
+    natsSock_ShuffleIPs(&ctx, tmp, sizeof(tmp), &list, 1);
+    testCond((list == head) && listOrder(list, true));
+
+    test("Shuffling: ");
+    natsSock_Init(&ctx);
+    list = head;
+    natsSock_ShuffleIPs(&ctx, tmp, sizeof(tmp), &list, 10);
+    testCond(listOrder(list, false));
+
+    // Reorder the list, and we will try with a tmp buffer too small,
+    // so API is going to allocate memory.
+    p = list;
+    for (i=0; i<10; i++)
+        p->ai_flags = (i+1);
+    head = list;
+    test("Shuffling mem alloc: ");
+    natsSock_Init(&ctx);
+    natsSock_ShuffleIPs(&ctx, tmp, 5, &list, 10);
+    testCond(listOrder(list, false));
+
+    for (p = list; p != NULL; p = list)
+    {
+        list = list->ai_next;
+        free(p);
+    }
+}
+
+static natsOptions*
+_createReconnectOptions(void)
+{
+    natsStatus  s;
+    natsOptions *opts = NULL;
+
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_SetURL(opts, "nats://127.0.0.1:22222"));
+    IFOK(s, natsOptions_SetAllowReconnect(opts, true));
+    IFOK(s, natsOptions_SetMaxReconnect(opts, 10));
+    IFOK(s, natsOptions_SetReconnectWait(opts, 100));
+    IFOK(s, natsOptions_SetReconnectJitter(opts, 0, 0));
+    if (s == NATS_OK)
+#ifdef WIN32
+        s = natsOptions_SetTimeout(opts, 500);
+#else
+        s = natsOptions_SetTimeout(opts, NATS_OPTS_DEFAULT_TIMEOUT);
+#endif
+
+    if (s != NATS_OK)
+    {
+        natsOptions_Destroy(opts);
+        opts = NULL;
+    }
+
+    return opts;
+}
+
+static void
+_reconnectedCb(natsConnection *nc, void *closure)
+{
+    struct threadArg    *arg = (struct threadArg*) closure;
+    int64_t             now  = nats_Now();
+
+    natsMutex_Lock(arg->m);
+    arg->reconnected = true;
+    arg->reconnects++;
+    if (arg->control == 9)
+    {
+        if (arg->reconnects <= 4)
+            arg->reconnectedAt[arg->reconnects-1] = now;
+    }
+    natsCondition_Broadcast(arg->c);
+    natsMutex_Unlock(arg->m);
+}
+
+static void
+test_ReconnectServerStats(void)
+{
+    natsStatus      s;
+    natsConnection  *nc       = NULL;
+    natsOptions     *opts     = NULL;
+    natsSrv         *srv      = NULL;
+    natsPid         serverPid = NATS_INVALID_PID;
+    natsStatistics  *stats    = NULL;
+    uint64_t        reconnects= 0;
+    struct threadArg args;
+
+    test("Reconnect Server Stats: ");
+
+    s = _createDefaultThreadArgsForCbTests(&args);
+    if (s == NATS_OK)
+        opts = _createReconnectOptions();
+    if (opts == NULL)
+        FAIL("Unable to create reconnect options!");
+
+    serverPid = _startServer("nats://127.0.0.1:22222", "-p 22222", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    s = natsOptions_SetDisconnectedCB(opts, _reconnectedCb, &args);
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    IFOK(s, natsConnection_Flush(nc));
+
+    _stopServer(serverPid);
+    serverPid = NATS_INVALID_PID;
+
+    if (s == NATS_OK)
+    {
+        serverPid = _startServer("nats://127.0.0.1:22222", "-p 22222", true);
+        CHECK_SERVER_STARTED(serverPid);
+
+        natsMutex_Lock(args.m);
+        while ((s != NATS_TIMEOUT) && !args.reconnected)
+            s = natsCondition_TimedWait(args.c, args.m, 5000);
+        natsMutex_Unlock(args.m);
+
+        IFOK(s, natsConnection_FlushTimeout(nc, 5000));
+    }
+
+    if (s == NATS_OK)
+    {
+        srv = natsSrvPool_GetCurrentServer(nc->srvPool, nc->cur, NULL);
+        if (srv == NULL)
+            s = NATS_ILLEGAL_STATE;
+    }
+
+    testCond((s == NATS_OK) && (srv->reconnects == 0));
+
+    test("Tracking Reconnects stats: ");
+    s = natsStatistics_Create(&stats);
+    IFOK(s, natsConnection_GetStats(nc, stats));
+    IFOK(s, natsStatistics_GetCounts(stats, NULL, NULL, NULL, NULL, &reconnects));
+    testCond((s == NATS_OK) && (reconnects == 1));
+
+    natsStatistics_Destroy(stats);
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+
+    _stopServer(serverPid);
+
+    _destroyDefaultThreadArgs(&args);
+}
+
+static void
+_disconnectedCb(natsConnection *nc, void *closure)
+{
+    struct threadArg    *arg = (struct threadArg*) closure;
+    int64_t             now  = nats_Now();
+
+    natsMutex_Lock(arg->m);
+    arg->disconnected = true;
+    arg->disconnects++;
+    if ((arg->control == 9) && (arg->disconnects > 1))
+    {
+        if (arg->disconnects <= 5)
+            arg->disconnectedAt[arg->disconnects-2] = now;
+    }
+    natsCondition_Broadcast(arg->c);
+    natsMutex_Unlock(arg->m);
+}
+
+static void
+_recvTestString(natsConnection *nc, natsSubscription *sub, natsMsg *msg,
+                void *closure)
+{
+    struct threadArg    *arg = (struct threadArg*) closure;
+    bool                doSignal = true;
+
+    natsMutex_Lock(arg->m);
+
+    switch (arg->control)
+    {
+        case 0:
+        {
+            if (strncmp(arg->string,
+                        natsMsg_GetData(msg),
+                        natsMsg_GetDataLength(msg)) != 0)
+            {
+                arg->status = NATS_ERR;
+            }
+            break;
+        }
+        case 1:
+        {
+            if (sub == NULL)
+                arg->status = NATS_ERR;
+            else if (strncmp(arg->string,
+                    natsMsg_GetData(msg),
+                    natsMsg_GetDataLength(msg)) != 0)
+            {
+                arg->status = NATS_ERR;
+            }
+            break;
+        }
+        case 2:
+        {
+            if (strcmp(arg->string, natsMsg_GetReply(msg)) != 0)
+            {
+                arg->status = NATS_ERR;
+            }
+            break;
+        }
+        case 3:
+        case 9:
+        {
+            doSignal = false;
+            arg->sum++;
+
+            if ((arg->control != 9) && (arg->sum == 10))
+            {
+                arg->status = natsSubscription_Unsubscribe(sub);
+                doSignal = true;
+            }
+            break;
+        }
+        case 11:
+        case 4:
+        {
+            arg->status = natsConnection_PublishString(nc,
+                                                       natsMsg_GetReply(msg),
+                                                       arg->string);
+            if (arg->status == NATS_OK)
+                arg->status = natsConnection_Flush(nc);
+            if (arg->control == 11)
+                arg->sum++;
+            break;
+        }
+        case 5:
+        {
+            arg->status = natsConnection_Flush(nc);
+            break;
+        }
+        case 6:
+        {
+            char seqnoStr[10];
+            int seqno = 0;
+
+            doSignal = false;
+
+            snprintf(seqnoStr, sizeof(seqnoStr), "%.*s", natsMsg_GetDataLength(msg),
+                     natsMsg_GetData(msg));
+
+            seqno = atoi(seqnoStr);
+            if (seqno >= 10)
+                arg->status = NATS_ERR;
+            else
+                arg->results[seqno] = (arg->results[seqno] + 1);
+
+            break;
+        }
+        case 7:
+        {
+            arg->msgReceived = true;
+            natsCondition_Signal(arg->c);
+
+            while (!arg->closed)
+                natsCondition_Wait(arg->c, arg->m);
+
+            break;
+        }
+        case 8:
+        {
+            arg->sum++;
+
+            while (!arg->closed)
+                natsCondition_Wait(arg->c, arg->m);
+
+            break;
+        }
+        case 10:
+        {
+            arg->status = (natsMsg_IsNoResponders(msg) ? NATS_OK : NATS_ERR);
+            break;
+        }
+    }
+
+    natsMsg_Destroy(msg);
+
+    if (doSignal)
+    {
+        arg->msgReceived = true;
+        natsCondition_Broadcast(arg->c);
+    }
+    natsMutex_Unlock(arg->m);
+}
+
+static void
+_closedCb(natsConnection *nc, void *closure)
+{
+    struct threadArg    *arg = (struct threadArg*) closure;
+
+    natsMutex_Lock(arg->m);
+    arg->closed = true;
+    natsCondition_Broadcast(arg->c);
+    natsMutex_Unlock(arg->m);
+}
+
+static natsStatus
+_waitForConnClosed(struct threadArg *arg)
+{
+    natsStatus s = NATS_OK;
+
+    natsMutex_Lock(arg->m);
+    while ((s != NATS_TIMEOUT) && !arg->closed)
+        s = natsCondition_TimedWait(arg->c, arg->m, 2000);
+    arg->closed = false;
+    natsMutex_Unlock(arg->m);
+
+    return s;
+}
+
+static void
+test_ParseStateReconnectFunctionality(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *sub      = NULL;
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    struct threadArg    arg;
+
+    test("Parse State Reconnect Functionality: ");
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s == NATS_OK)
+    {
+        arg.string = "bar";
+        arg.status = NATS_OK;
+    }
+    if (s == NATS_OK)
+        opts = _createReconnectOptions();
+
+    if ((opts == NULL)
+        || (natsOptions_SetDisconnectedCB(opts, _disconnectedCb, &arg) != NATS_OK)
+        || (natsOptions_SetClosedCB(opts, _closedCb, &arg) != NATS_OK))
+    {
+        FAIL("Unable to create reconnect options!");
+    }
+
+    serverPid = _startServer("nats://127.0.0.1:22222", "-p 22222", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    s = natsConnection_Connect(&nc, opts);
+    IFOK(s, natsConnection_Subscribe(&sub, nc, "foo", _recvTestString, &arg));
+    IFOK(s, natsConnection_Flush(nc));
+
+    if (s == NATS_OK)
+    {
+        // Simulate partialState, this needs to be cleared
+        natsConn_Lock(nc);
+        nc->ps->state = OP_PON;
+        natsConn_Unlock(nc);
+    }
+
+    _stopServer(serverPid);
+    serverPid = NATS_INVALID_PID;
+
+    if (s == NATS_OK)
+    {
+        natsMutex_Lock(arg.m);
+        while ((s != NATS_TIMEOUT) && !arg.disconnected)
+            s = natsCondition_TimedWait(arg.c, arg.m, 500);
+        natsMutex_Unlock(arg.m);
+    }
+
+    IFOK(s, natsConnection_PublishString(nc, "foo", arg.string));
+
+    if (s == NATS_OK)
+    {
+        serverPid = _startServer("nats://127.0.0.1:22222", "-p 22222", true);
+        CHECK_SERVER_STARTED(serverPid);
+    }
+
+    IFOK(s, natsConnection_FlushTimeout(nc, 5000));
+
+    if (s == NATS_OK)
+    {
+        natsMutex_Lock(arg.m);
+        while ((s != NATS_TIMEOUT) && !arg.msgReceived)
+            s = natsCondition_TimedWait(arg.c, arg.m, 1500);
+        natsMutex_Unlock(arg.m);
+
+        if (s == NATS_OK)
+            s = arg.status;
+    }
+
+    testCond((s == NATS_OK) && (nc->stats.reconnects == 1));
+
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+
+    _waitForConnClosed(&arg);
+
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_ServersRandomize(void)
+{
+    natsStatus      s;
+    natsOptions     *opts   = NULL;
+    natsConnection  *nc     = NULL;
+    natsPid         pid     = NATS_INVALID_PID;
+    int serversCount;
+
+    serversCount = sizeof(testServers) / sizeof(char *);
+
+    test("Server Pool with Randomize: ");
+
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_SetServers(opts, testServers, serversCount));
+    if (s == NATS_OK)
+    {
+        int same = 0;
+        int allSame = 0;
+
+        for (int iter=0; (s == NATS_OK) && (iter<1000); iter++)
+        {
+            s = natsConn_create(&nc, natsOptions_clone(opts));
+            if (s == NATS_OK)
+            {
+                // In theory, this could happen...
+                for (int i=0; i<serversCount; i++)
+                {
+                    if (strcmp(testServers[i],
+                               nc->srvPool->srvrs[i]->url->fullUrl) == 0)
+                    {
+                        same++;
+                    }
+                }
+                if (same == serversCount)
+                    allSame++;
+            }
+            natsConn_release(nc);
+            nc = NULL;
+        }
+
+        if (allSame > 10)
+            s = NATS_ERR;
+    }
+    testCond(s == NATS_OK);
+
+    // Now test that we do not randomize if proper flag is set.
+    test("Server Pool With NoRandomize: ")
+    s = natsOptions_SetNoRandomize(opts, true);
+    IFOK(s, natsConn_create(&nc, natsOptions_clone(opts)));
+    if (s == NATS_OK)
+    {
+        for (int i=0; i<serversCount; i++)
+            if (strcmp(testServers[i],
+                       nc->srvPool->srvrs[i]->url->fullUrl) != 0)
+            {
+                s = NATS_ERR;
+                break;
+            }
+    }
+    testCond(s == NATS_OK);
+    natsConn_release(nc);
+    nc = NULL;
+
+    // Although the original intent was that if Opts.Url is
+    // set, Opts.Servers is not (and vice versa), the behavior
+    // is that Opts.Url is always first, even when randomization
+    // is enabled. So make sure that this is still the case.
+    test("If Options.URL is set, it should be first: ")
+    s = natsOptions_SetNoRandomize(opts, false);
+    IFOK(s, natsOptions_SetURL(opts, NATS_DEFAULT_URL));
+    IFOK(s, natsConn_create(&nc, natsOptions_clone(opts)));
+    if (s == NATS_OK)
+    {
+        int same = 0;
+        // In theory, this could happen...
+        for (int i=0; i<serversCount; i++)
+        {
+            if (strcmp(testServers[i],
+                       nc->srvPool->srvrs[i+1]->url->fullUrl) == 0)
+            {
+                same++;
+            }
+        }
+        if (same == serversCount)
+            s = NATS_ERR;
+    }
+    if ((s == NATS_OK)
+            && strcmp(nc->srvPool->srvrs[0]->url->fullUrl,
+                      NATS_DEFAULT_URL) != 0)
+    {
+        s = NATS_ERR;
+    }
+    testCond(s == NATS_OK);
+
+    natsConn_release(nc);
+    nc = NULL;
+
+    pid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    test("NoRandomize==true passed to context: ");
+    s = natsOptions_SetNoRandomize(opts, true);
+    IFOK(s, natsOptions_SetURL(opts, NATS_DEFAULT_URL));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    if (s == NATS_OK)
+    {
+        natsConn_Lock(nc);
+        if (!nc->sockCtx.noRandomize)
+            s = NATS_ERR;
+        natsConn_Unlock(nc);
+    }
+    testCond(s == NATS_OK);
+
+    natsConnection_Destroy(nc);
+    nc = NULL;
+
+    test("NoRandomize==false passed to context: ");
+    s = natsOptions_SetNoRandomize(opts, false);
+    IFOK(s, natsOptions_SetURL(opts, NATS_DEFAULT_URL));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    if (s == NATS_OK)
+    {
+        natsConn_Lock(nc);
+        if (nc->sockCtx.noRandomize)
+            s = NATS_ERR;
+        natsConn_Unlock(nc);
+    }
+    testCond(s == NATS_OK);
+
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+    _stopServer(pid);
+}
+
+static void
+test_SelectNextServer(void)
+{
+    natsStatus      s;
+    natsOptions     *opts   = NULL;
+    natsConnection  *nc     = NULL;
+    natsSrv         *srv    = NULL;
+    int             serversCount;
+
+    serversCount = sizeof(testServers) / sizeof(char *);
+
+    test("Test default server pool selection: ");
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_SetServers(opts, testServers, serversCount));
+    IFOK(s, natsOptions_SetNoRandomize(opts, true));
+    IFOK(s, natsConn_create(&nc, natsOptions_clone(opts)));
+    testCond((s == NATS_OK)
+             && (nc->cur->url == nc->srvPool->srvrs[0]->url));
+
+    test("Get next server: ");
+    if (s == NATS_OK)
+    {
+        srv = natsSrvPool_GetNextServer(nc->srvPool, nc->opts, nc->cur);
+        if (srv != NULL)
+            nc->cur = srv;
+    }
+    testCond((s == NATS_OK)
+             && (nc != NULL)
+             && (nc->cur != NULL));
+
+    test("Check list size: ");
+    testCond((s == NATS_OK)
+             && (nc != NULL)
+             && (nc->srvPool != NULL)
+             && (nc->srvPool->size == serversCount));
+
+    test("Check selection: ");
+    testCond((s == NATS_OK)
+             && (nc != NULL)
+             && (nc->cur->url != NULL)
+             && (nc->cur->url->fullUrl != NULL)
+             && (strcmp(nc->cur->url->fullUrl, testServers[1]) == 0));
+
+    test("Check old was pushed to last position: ");
+    testCond((s == NATS_OK)
+             && (nc != NULL)
+             && (nc->srvPool != NULL)
+             && (nc->srvPool->srvrs != NULL)
+             && (nc->srvPool->size > 0)
+             && (nc->srvPool->srvrs[nc->srvPool->size - 1] != NULL)
+             && (nc->srvPool->srvrs[nc->srvPool->size - 1]->url != NULL)
+             && (nc->srvPool->srvrs[nc->srvPool->size - 1]->url->fullUrl != NULL)
+             && (strcmp(nc->srvPool->srvrs[nc->srvPool->size - 1]->url->fullUrl,
+                        testServers[0]) == 0));
+
+    test("Got correct server: ");
+    testCond((s == NATS_OK)
+             && (srv != NULL)
+             && (nc != NULL)
+             && (nc->srvPool != NULL)
+             && (nc->srvPool->srvrs != NULL)
+             && (nc->srvPool->size > 0)
+             && (srv == (nc->srvPool->srvrs[0])));
+
+    // Test that we do not keep servers where we have tried to reconnect past our limit.
+    if (s == NATS_OK)
+    {
+        test("Get next server: ");
+        if ((nc == NULL)
+            || (nc->srvPool == NULL)
+            || (nc->srvPool->srvrs == NULL)
+            || (nc->srvPool->srvrs[0] == NULL))
+        {
+            s = NATS_ERR;
+        }
+        else
+        {
+            nc->srvPool->srvrs[0]->reconnects = nc->opts->maxReconnect;
+        }
+        if (s == NATS_OK)
+        {
+            srv = natsSrvPool_GetNextServer(nc->srvPool, nc->opts, nc->cur);
+            if (srv != NULL)
+                nc->cur = srv;
+        }
+        testCond((s == NATS_OK) && (nc->cur != NULL));
+    }
+
+    // Check that we are now looking at #3, and current is not in the list.
+    test("Check list size: ");
+    testCond((s == NATS_OK)
+             && (nc->srvPool->size == (serversCount - 1)));
+
+    test("Check selection: ");
+    testCond((s == NATS_OK)
+             && (nc != NULL)
+             && (nc->cur != NULL)
+             && (nc->cur->url != NULL)
+             && (nc->cur->url->fullUrl != NULL)
+             && (strcmp(nc->cur->url->fullUrl, testServers[2]) == 0));
+
+    test("Check last server was discarded: ");
+    testCond((s == NATS_OK)
+             && (nc != NULL)
+             && (nc->srvPool != NULL)
+             && (nc->srvPool->srvrs != NULL)
+             && (nc->srvPool->size > 0)
+             && (nc->srvPool->srvrs[nc->srvPool->size - 1] != NULL)
+             && (nc->srvPool->srvrs[nc->srvPool->size - 1]->url != NULL)
+             && (nc->srvPool->srvrs[nc->srvPool->size - 1]->url->fullUrl != NULL)
+             && (strcmp(nc->srvPool->srvrs[nc->srvPool->size - 1]->url->fullUrl,
+                        testServers[1]) != 0));
+
+    natsConn_release(nc);
+    natsOptions_Destroy(opts);
+}
+
+static void
+parserNegTest(int lineNum)
+{
+    char txt[64];
+
+    snprintf(txt, sizeof(txt), "Test line %d: ", lineNum);
+    test(txt);
+}
+
+#define PARSER_START_TEST parserNegTest(__LINE__)
+
+static void
+test_ParserPing(void)
+{
+    natsConnection  *nc = NULL;
+    natsOptions     *opts = NULL;
+    natsStatus      s;
+    char            ping[64];
+
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsConn_create(&nc, opts));
+    IFOK(s, natsParser_Create(&(nc->ps)));
+    IFOK(s, natsBuf_Create(&(nc->pending), 1000));
+    if (s == NATS_OK)
+        nc->usePending = true;
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+
+    PARSER_START_TEST;
+    testCond(nc->ps->state == OP_START);
+
+    snprintf(ping, sizeof(ping), "PING\r\n");
+
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, ping, 1);
+    testCond((s == NATS_OK) && (nc->ps->state == OP_P));
+
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, ping + 1, 1);
+    testCond((s == NATS_OK) && (nc->ps->state == OP_PI));
+
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, ping + 2, 1);
+    testCond((s == NATS_OK) && (nc->ps->state == OP_PIN));
+
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, ping + 3, 1);
+    testCond((s == NATS_OK) && (nc->ps->state == OP_PING));
+
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, ping + 4, 1);
+    testCond((s == NATS_OK) && (nc->ps->state == OP_PING));
+
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, ping + 5, 1);
+    testCond((s == NATS_OK) && (nc->ps->state == OP_START));
+
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, ping, (int)strlen(ping));
+    testCond((s == NATS_OK) && (nc->ps->state == OP_START));
+
+    // Should tolerate spaces
+    snprintf(ping, sizeof(ping), "%s", "PING  \r");
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, ping, (int)strlen(ping));
+    testCond((s == NATS_OK) && (nc->ps->state == OP_PING));
+
+    nc->ps->state = OP_START;
+    snprintf(ping, sizeof(ping), "%s", "PING  \r  \n");
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, ping, (int)strlen(ping));
+    testCond((s == NATS_OK) && (nc->ps->state == OP_START));
+
+    natsConnection_Destroy(nc);
+}
+
+static void
+test_ParserErr(void)
+{
+    natsConnection  *nc = NULL;
+    natsOptions     *opts = NULL;
+    natsStatus      s;
+    char            errProto[1024];
+    char            expected[256];
+    int             len;
+
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsConn_create(&nc, opts));
+    IFOK(s, natsParser_Create(&(nc->ps)));
+    IFOK(s, natsBuf_Create(&(nc->pending), 1000));
+    if (s == NATS_OK)
+    {
+        nc->usePending = true;
+        nc->status = NATS_CONN_STATUS_CLOSED;
+    }
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    // This test focuses on the parser only, not how the error is
+    // actually processed by the upper layer.
+
+    PARSER_START_TEST;
+    testCond(nc->ps->state == OP_START);
+
+    snprintf(expected, sizeof(expected), "%s", "'Any kind of error'");
+    snprintf(errProto, sizeof(errProto), "-ERR  %s\r\n", expected);
+    len = (int) strlen(errProto);
+
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, errProto, 1);
+    testCond((s == NATS_OK) && (nc->ps->state == OP_MINUS));
+
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, errProto + 1, 1);
+    testCond((s == NATS_OK) && (nc->ps->state == OP_MINUS_E));
+
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, errProto + 2, 1);
+    testCond((s == NATS_OK) && (nc->ps->state == OP_MINUS_ER));
+
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, errProto + 3, 1);
+    testCond((s == NATS_OK) && (nc->ps->state == OP_MINUS_ERR));
+
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, errProto + 4, 1);
+    testCond((s == NATS_OK) && (nc->ps->state == OP_MINUS_ERR_SPC));
+
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, errProto + 5, 1);
+    testCond((s == NATS_OK) && (nc->ps->state == OP_MINUS_ERR_SPC));
+
+    // Check with split arg buffer
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, errProto + 6, 1);
+    testCond((s == NATS_OK) && (nc->ps->state == MINUS_ERR_ARG));
+
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, errProto + 7, 3);
+    testCond((s == NATS_OK) && (nc->ps->state == MINUS_ERR_ARG));
+
+    // Verify content
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, errProto + 10, len - 10 - 2);
+    testCond((s == NATS_OK)
+             && (nc->ps->state == MINUS_ERR_ARG)
+             && (nc->ps->argBuf != NULL)
+             && (strncmp(nc->ps->argBuf->data, expected, nc->ps->argBuf->len) == 0));
+
+    // Finish parsing
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, errProto + len - 1, 1);
+    testCond((s == NATS_OK) && (nc->ps->state == OP_START));
+
+    // Check without split arg buffer
+    snprintf(errProto, sizeof(errProto), "-ERR '%s'\r\n", "Any Error");
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, errProto, (int)strlen(errProto));
+    testCond((s == NATS_OK) && (nc->ps->state == OP_START));
+
+    natsConnection_Destroy(nc);
+}
+
+static void
+test_ParserOK(void)
+{
+    natsConnection  *nc = NULL;
+    natsOptions     *opts = NULL;
+    natsStatus      s;
+    char            okProto[256];
+
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsConn_create(&nc, opts));
+    IFOK(s, natsParser_Create(&(nc->ps)));
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    PARSER_START_TEST;
+    testCond(nc->ps->state == OP_START);
+
+    snprintf(okProto, sizeof(okProto), "+OKay\r\n");
+
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, okProto, 1);
+    testCond((s == NATS_OK) && (nc->ps->state == OP_PLUS));
+
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, okProto + 1, 1);
+    testCond((s == NATS_OK) && (nc->ps->state == OP_PLUS_O));
+
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, okProto + 2, 1);
+    testCond((s == NATS_OK) && (nc->ps->state == OP_PLUS_OK));
+
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, okProto + 3, (int)strlen(okProto) - 3);
+    testCond((s == NATS_OK) && (nc->ps->state == OP_START));
+
+    natsConnection_Destroy(nc);
+}
+
+static void
+test_ParseINFO(void)
+{
+    natsConnection  *nc = NULL;
+    natsOptions     *opts = NULL;
+    natsStatus      s;
+    char            infoProto[256];
+
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsConn_create(&nc, opts));
+    IFOK(s, natsParser_Create(&(nc->ps)));
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    PARSER_START_TEST;
+    testCond(nc->ps->state == OP_START);
+
+    snprintf(infoProto, sizeof(infoProto), "INFO \t{\"server_id\": \"abc\"}\r\n");
+
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, infoProto, 7);
+    testCond((s == NATS_OK) && (nc->ps->state == INFO_ARG) && (infoProto[nc->ps->afterSpace] == '{'));
+
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, infoProto +7, (int)strlen(infoProto) - 7);
+    testCond((s == NATS_OK)
+                && (nc->ps->state == OP_START)
+                && (nc->info.id != NULL) && (strcmp(nc->info.id, "abc") == 0));
+
+    natsConnection_Destroy(nc);
+}
+
+static void
+test_ParserShouldFail(void)
+{
+    natsConnection  *nc = NULL;
+    natsOptions     *opts = NULL;
+    natsStatus      s;
+    char            buf[64];
+
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsConn_create(&nc, opts));
+    IFOK(s, natsParser_Create(&(nc->ps)));
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    // Negative tests:
+
+    PARSER_START_TEST;
+    snprintf(buf, sizeof(buf), "%s", " PING");
+    s = natsParser_Parse(nc, buf, (int)strlen(buf));
+    testCond(s != NATS_OK);
+
+    PARSER_START_TEST;
+    nc->ps->state = OP_START;
+    snprintf(buf, sizeof(buf), "%s", "POO");
+    s = natsParser_Parse(nc, buf, (int)strlen(buf));
+    testCond(s != NATS_OK);
+
+    PARSER_START_TEST;
+    nc->ps->state = OP_START;
+    snprintf(buf, sizeof(buf), "%s", "Px");
+    s = natsParser_Parse(nc, buf, (int)strlen(buf));
+    testCond(s != NATS_OK);
+
+    PARSER_START_TEST;
+    nc->ps->state = OP_START;
+    snprintf(buf, sizeof(buf), "%s", "PIx");
+    s = natsParser_Parse(nc, buf, (int)strlen(buf));
+    testCond(s != NATS_OK);
+
+    PARSER_START_TEST;
+    nc->ps->state = OP_START;
+    snprintf(buf, sizeof(buf), "%s", "PINx");
+    s = natsParser_Parse(nc, buf, (int)strlen(buf));
+    testCond(s != NATS_OK);
+    // Stop here because 'PING' protos are tolerant for anything between PING and \n
+
+    PARSER_START_TEST;
+    nc->ps->state = OP_START;
+    snprintf(buf, sizeof(buf), "%s", "POx");
+    s = natsParser_Parse(nc, buf, (int)strlen(buf));
+    testCond(s != NATS_OK);
+
+    PARSER_START_TEST;
+    nc->ps->state = OP_START;
+    snprintf(buf, sizeof(buf), "%s", "PONx");
+    s = natsParser_Parse(nc, buf, (int)strlen(buf));
+    testCond(s != NATS_OK);
+    // Stop here because 'PONG' protos are tolerant for anything between PONG and \n
+
+    PARSER_START_TEST;
+    nc->ps->state = OP_START;
+    snprintf(buf, sizeof(buf), "%s", "ZOO");
+    s = natsParser_Parse(nc, buf, (int)strlen(buf));
+    testCond(s != NATS_OK);
+
+    PARSER_START_TEST;
+    nc->ps->state = OP_START;
+    snprintf(buf, sizeof(buf), "%s", "Mx\r\n");
+    s = natsParser_Parse(nc, buf, (int)strlen(buf));
+    testCond(s != NATS_OK);
+
+    PARSER_START_TEST;
+    nc->ps->state = OP_START;
+    snprintf(buf, sizeof(buf), "%s", "MSx\r\n");
+    s = natsParser_Parse(nc, buf, (int)strlen(buf));
+    testCond(s != NATS_OK);
+
+    PARSER_START_TEST;
+    nc->ps->state = OP_START;
+    snprintf(buf, sizeof(buf), "%s", "MSGx\r\n");
+    s = natsParser_Parse(nc, buf, (int)strlen(buf));
+    testCond(s != NATS_OK);
+
+    PARSER_START_TEST;
+    nc->ps->state = OP_START;
+    snprintf(buf, sizeof(buf), "%s", "MSG  foo\r\n");
+    s = natsParser_Parse(nc, buf, (int)strlen(buf));
+    testCond(s != NATS_OK);
+
+    PARSER_START_TEST;
+    nc->ps->state = OP_START;
+    snprintf(buf, sizeof(buf), "%s", "MSG \r\n");
+    s = natsParser_Parse(nc, buf, (int)strlen(buf));
+    testCond(s != NATS_OK);
+
+    PARSER_START_TEST;
+    nc->ps->state = OP_START;
+    snprintf(buf, sizeof(buf), "%s", "MSG foo 1\r\n");
+    s = natsParser_Parse(nc, buf, (int)strlen(buf));
+    testCond(s != NATS_OK);
+
+    PARSER_START_TEST;
+    nc->ps->state = OP_START;
+    snprintf(buf, sizeof(buf), "%s", "MSG foo bar 1\r\n");
+    s = natsParser_Parse(nc, buf, (int)strlen(buf));
+    testCond(s != NATS_OK);
+
+    PARSER_START_TEST;
+    nc->ps->state = OP_START;
+    snprintf(buf, sizeof(buf), "%s", "MSG foo bar 1 baz\r\n");
+    s = natsParser_Parse(nc, buf, (int)strlen(buf));
+    testCond(s != NATS_OK);
+
+    PARSER_START_TEST;
+    nc->ps->state = OP_START;
+    snprintf(buf, sizeof(buf), "%s", "MSG foo 1 bar baz\r\n");
+    s = natsParser_Parse(nc, buf, (int)strlen(buf));
+    testCond(s != NATS_OK);
+
+    PARSER_START_TEST;
+    nc->ps->state = OP_START;
+    snprintf(buf, sizeof(buf), "%s", "+x\r\n");
+    s = natsParser_Parse(nc, buf, (int)strlen(buf));
+    testCond(s != NATS_OK);
+
+    PARSER_START_TEST;
+    nc->ps->state = OP_START;
+    snprintf(buf, sizeof(buf), "%s", "+Ox\r\n");
+    s = natsParser_Parse(nc, buf, (int)strlen(buf));
+    testCond(s != NATS_OK);
+
+    PARSER_START_TEST;
+    nc->ps->state = OP_START;
+    snprintf(buf, sizeof(buf), "%s", "-x\r\n");
+    s = natsParser_Parse(nc, buf, (int)strlen(buf));
+    testCond(s != NATS_OK);
+
+    PARSER_START_TEST;
+    nc->ps->state = OP_START;
+    snprintf(buf, sizeof(buf), "%s", "-Ex\r\n");
+    s = natsParser_Parse(nc, buf, (int)strlen(buf));
+    testCond(s != NATS_OK);
+
+    PARSER_START_TEST;
+    nc->ps->state = OP_START;
+    snprintf(buf, sizeof(buf), "%s", "-ERx\r\n");
+    s = natsParser_Parse(nc, buf, (int)strlen(buf));
+    testCond(s != NATS_OK);
+
+    PARSER_START_TEST;
+    nc->ps->state = OP_START;
+    snprintf(buf, sizeof(buf), "%s", "-ERRx\r\n");
+    s = natsParser_Parse(nc, buf, (int)strlen(buf));
+    testCond(s != NATS_OK);
+
+    natsConnection_Destroy(nc);
+}
+
+static void
+test_ParserSplitMsg(void)
+{
+    natsConnection  *nc = NULL;
+    natsOptions     *opts = NULL;
+    natsStatus      s;
+    char            buf[2*MAX_CONTROL_LINE_SIZE];
+    uint64_t        expectedCount;
+    uint64_t        expectedSize;
+    int             msgSize, start, i;
+
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsConn_create(&nc, opts));
+    IFOK(s, natsParser_Create(&(nc->ps)));
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    expectedCount = 1;
+    expectedSize = 3;
+
+    snprintf(buf, sizeof(buf), "%s", "MSG a 1 3\r\nfoo\r\n");
+
+    // parsing: 'MSG a'
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, buf, 5);
+    testCond((s == NATS_OK) && (nc->ps->argBuf != NULL));
+
+    // parsing: ' 1 3\r\nf'
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, buf + 5, 7);
+    testCond((s == NATS_OK)
+             && (nc->ps->ma.size == 3)
+             && (nc->ps->ma.sid == 1)
+             && (nc->ps->ma.subject->len == 1)
+             && (strncmp(nc->ps->ma.subject->data, "a", 1) == 0)
+             && (nc->ps->msgBuf != NULL));
+
+    // parsing: 'oo\r\n'
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, buf + 12, (int)strlen(buf) - 12);
+    testCond((s == NATS_OK)
+             && (nc->stats.inMsgs == expectedCount)
+             && (nc->stats.inBytes == expectedSize)
+             && (nc->ps->argBuf == NULL)
+             && (nc->ps->msgBuf == NULL)
+             && (nc->ps->state == OP_START));
+
+    // parsing: 'MSG a 1 3\r\nfo'
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, buf, 13);
+    testCond((s == NATS_OK)
+             && (nc->ps->ma.size == 3)
+             && (nc->ps->ma.sid == 1)
+             && (nc->ps->ma.subject->len == 1)
+             && (strncmp(nc->ps->ma.subject->data, "a", 1) == 0)
+             && (nc->ps->argBuf != NULL)
+             && (nc->ps->msgBuf != NULL));
+
+    expectedCount++;
+    expectedSize += 3;
+
+    // parsing: 'o\r\n'
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, buf + 13, (int)strlen(buf) - 13);
+    testCond((s == NATS_OK)
+             && (nc->stats.inMsgs == expectedCount)
+             && (nc->stats.inBytes == expectedSize)
+             && (nc->ps->argBuf == NULL)
+             && (nc->ps->msgBuf == NULL)
+             && (nc->ps->state == OP_START));
+
+    snprintf(buf, sizeof(buf), "%s", "MSG a 1 6\r\nfoobar\r\n");
+
+    // parsing: 'MSG a 1 6\r\nfo'
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, buf, 13);
+    testCond((s == NATS_OK)
+             && (nc->ps->ma.size == 6)
+             && (nc->ps->ma.sid == 1)
+             && (nc->ps->ma.subject->len == 1)
+             && (strncmp(nc->ps->ma.subject->data, "a", 1) == 0)
+             && (nc->ps->argBuf != NULL)
+             && (nc->ps->msgBuf != NULL));
+
+    // parsing: 'ob'
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, buf + 13, 2);
+    testCond(s == NATS_OK)
+
+    expectedCount++;
+    expectedSize += 6;
+
+    // parsing: 'ar\r\n'
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, buf + 15, (int)strlen(buf) - 15);
+    testCond((s == NATS_OK)
+             && (nc->stats.inMsgs == expectedCount)
+             && (nc->stats.inBytes == expectedSize)
+             && (nc->ps->argBuf == NULL)
+             && (nc->ps->msgBuf == NULL)
+             && (nc->ps->state == OP_START));
+
+    // Let's have a msg that is bigger than the parser's scratch size.
+    // Since we prepopulate the msg with 'foo', adding 3 to the size.
+    msgSize = sizeof(nc->ps->scratch) + 100 + 3;
+
+    snprintf(buf, sizeof(buf), "MSG a 1 b %d\r\nfoo", msgSize);
+    start = (int)strlen(buf);
+    for (i=0; i<msgSize - 3; i++)
+        buf[start + i] = 'a' + (i % 26);
+    buf[start + i++] = '\r';
+    buf[start + i++] = '\n';
+    buf[start + i++] = '\0';
+
+    // parsing: 'MSG a 1 b <size>\r\nfoo'
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, buf, start);
+    testCond((s == NATS_OK)
+             && (nc->ps->ma.size == msgSize)
+             && (nc->ps->ma.sid == 1)
+             && (nc->ps->ma.subject->len == 1)
+             && (strncmp(nc->ps->ma.subject->data, "a", 1) == 0)
+             && (nc->ps->ma.reply->len == 1)
+             && (strncmp(nc->ps->ma.reply->data, "b", 1) == 0)
+             && (nc->ps->argBuf != NULL)
+             && (nc->ps->msgBuf != NULL));
+
+    expectedCount++;
+    expectedSize += (uint64_t)msgSize;
+
+    // parsing: 'abcde...'
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, buf + start, (int)strlen(buf) - start - 2);
+    testCond((s == NATS_OK)
+             && (nc->ps->argBuf != NULL)
+             && (nc->ps->msgBuf != NULL)
+             && (nc->ps->state == MSG_PAYLOAD));
+
+    // Verify content
+    PARSER_START_TEST;
+    s = ((strncmp(nc->ps->msgBuf->data, "foo", 3) == 0) ? NATS_OK : NATS_ERR);
+    if (s == NATS_OK)
+    {
+        int k;
+
+        for (k=3; (s == NATS_OK) && (k<nc->ps->ma.size); k++)
+            s = (nc->ps->msgBuf->data[k] == (char)('a' + ((k-3) % 26)) ? NATS_OK : NATS_ERR);
+    }
+    testCond(s == NATS_OK)
+
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, buf + (int)strlen(buf) - 2, 2);
+    testCond((s == NATS_OK)
+             && (nc->stats.inMsgs == expectedCount)
+             && (nc->stats.inBytes == expectedSize)
+             && (nc->ps->argBuf == NULL)
+             && (nc->ps->msgBuf == NULL)
+             && (nc->ps->state == OP_START));
+
+    natsConnection_Destroy(nc);
+}
+
+#define RECREATE_PARSER \
+    natsParser_Destroy(nc->ps); \
+    s = natsParser_Create(&(nc->ps)); \
+    if (s != NATS_OK) \
+        FAIL("Unable to setup test"); \
+
+static void
+test_ProcessMsgArgs(void)
+{
+    natsConnection  *nc = NULL;
+    natsOptions     *opts = NULL;
+    natsStatus      s;
+    char            buf[2048];
+    const char*     le = NULL;
+
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsConn_create(&nc, opts));
+    IFOK(s, natsParser_Create(&(nc->ps)));
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    snprintf(buf, sizeof(buf), "%s", "MSG a b c d e\r\n");
+
+    test("Parsing MSG with too many arguments: ")
+    // parsing: 'MSG a'
+    natsParser_Parse(nc, buf, 5);
+    // parse the rest..
+    natsParser_Parse(nc, buf + 5, 10);
+    s = natsConnection_GetLastError(nc, &le);
+    testCond((s == NATS_PROTOCOL_ERROR)
+                && (nc->ps->argBuf == NULL)
+                && (nc->ps->msgBuf == NULL)
+                && (nc->ps->ma.subject == NULL)
+                && (nc->ps->ma.reply == NULL)
+                && (le != NULL)
+                && (strstr(le, "wrong number of arguments") != NULL));
+
+    RECREATE_PARSER;
+
+    snprintf(buf, sizeof(buf), "%s", "MSG foo 1\r\n");
+    test("Parsing MSG with not enough arguments: ")
+    natsParser_Parse(nc, buf, (int) strlen(buf));
+    s = natsConnection_GetLastError(nc, &le);
+    testCond((s == NATS_PROTOCOL_ERROR)
+                && (nc->ps->argBuf == NULL)
+                && (nc->ps->msgBuf == NULL)
+                && (nc->ps->ma.subject == NULL)
+                && (nc->ps->ma.reply == NULL)
+                && (le != NULL)
+                && (strstr(le, "wrong number of arguments") != NULL));
+
+    RECREATE_PARSER;
+
+    snprintf(buf, sizeof(buf), "%s", "MSG foo abc 2\r\n");
+    test("Parsing MSG with bad sid: ")
+    natsParser_Parse(nc, buf, (int) strlen(buf));
+    s = natsConnection_GetLastError(nc, &le);
+    testCond((s == NATS_PROTOCOL_ERROR)
+                && (nc->ps->argBuf == NULL)
+                && (nc->ps->msgBuf == NULL)
+                && (nc->ps->ma.subject == NULL)
+                && (nc->ps->ma.reply == NULL)
+                && (le != NULL)
+                && (strstr(le, "Bad or Missing Sid") != NULL));
+
+    RECREATE_PARSER;
+
+    snprintf(buf, sizeof(buf), "%s", "MSG foo 1 abc\r\n");
+    test("Parsing MSG with bad size: ")
+    natsParser_Parse(nc, buf, (int) strlen(buf));
+    s = natsConnection_GetLastError(nc, &le);
+    testCond((s == NATS_PROTOCOL_ERROR)
+                && (nc->ps->argBuf == NULL)
+                && (nc->ps->msgBuf == NULL)
+                && (nc->ps->ma.subject == NULL)
+                && (nc->ps->ma.reply == NULL)
+                && (le != NULL)
+                && (strstr(le, "Bad or Missing Size") != NULL));
+
+    snprintf(buf, sizeof(buf), "%s", "MSG foo 1 bar abc\r\n");
+    test("Parsing MSG with bad size (with reply): ")
+    natsParser_Parse(nc, buf, (int) strlen(buf));
+    s = natsConnection_GetLastError(nc, &le);
+    testCond((s == NATS_PROTOCOL_ERROR)
+                && (nc->ps->argBuf == NULL)
+                && (nc->ps->msgBuf == NULL)
+                && (nc->ps->ma.subject == NULL)
+                && (nc->ps->ma.reply == NULL)
+                && (le != NULL)
+                && (strstr(le, "Bad or Missing Size") != NULL));
+
+    // Test extra spaces first without reply
+
+    RECREATE_PARSER;
+
+    snprintf(buf, sizeof(buf), "%s", "MSG foo  1 2\r\n");
+    test("Parsing MSG with extra space before sid: ")
+    s = natsParser_Parse(nc, buf, (int) strlen(buf));
+    testCond((s == NATS_OK)
+                && (natsBuf_Len(nc->ps->ma.subject) == 3)
+                && (strncmp(natsBuf_Data(nc->ps->ma.subject), "foo", 3) == 0)
+                && (nc->ps->ma.sid == 1)
+                && (nc->ps->ma.reply == NULL)
+                && (nc->ps->ma.size == 2));
+
+    RECREATE_PARSER;
+
+    snprintf(buf, sizeof(buf), "%s", "MSG bar 1  2\r\n");
+    test("Parsing MSG with extra space before size: ")
+    s = natsParser_Parse(nc, buf, (int) strlen(buf));
+    testCond((s == NATS_OK)
+                && (natsBuf_Len(nc->ps->ma.subject) == 3)
+                && (strncmp(natsBuf_Data(nc->ps->ma.subject), "bar", 3) == 0)
+                && (nc->ps->ma.sid == 1)
+                && (nc->ps->ma.reply == NULL)
+                && (nc->ps->ma.size == 2));
+
+    // Test extra spaces first with reply
+
+    RECREATE_PARSER;
+
+    snprintf(buf, sizeof(buf), "%s", "MSG baz  3 bat 4\r\n");
+    test("Parsing MSG with extra space before sid: ")
+    s = natsParser_Parse(nc, buf, (int) strlen(buf));
+    testCond((s == NATS_OK)
+                && (natsBuf_Len(nc->ps->ma.subject) == 3)
+                && (strncmp(natsBuf_Data(nc->ps->ma.subject), "baz", 3) == 0)
+                && (nc->ps->ma.sid == 3)
+                && (natsBuf_Len(nc->ps->ma.reply) == 3)
+                && (strncmp(natsBuf_Data(nc->ps->ma.reply), "bat", 3) == 0)
+                && (nc->ps->ma.size == 4));
+
+    RECREATE_PARSER;
+
+    snprintf(buf, sizeof(buf), "%s", "MSG boo 5  baa 6\r\n");
+    test("Parsing MSG with extra space before reply: ")
+    s = natsParser_Parse(nc, buf, (int) strlen(buf));
+    testCond((s == NATS_OK)
+                && (natsBuf_Len(nc->ps->ma.subject) == 3)
+                && (strncmp(natsBuf_Data(nc->ps->ma.subject), "boo", 3) == 0)
+                && (nc->ps->ma.sid == 5)
+                && (natsBuf_Len(nc->ps->ma.reply) == 3)
+                && (strncmp(natsBuf_Data(nc->ps->ma.reply), "baa", 3) == 0)
+                && (nc->ps->ma.size == 6));
+
+    RECREATE_PARSER;
+
+    snprintf(buf, sizeof(buf), "%s", "MSG coo 7 caa  8\r\n");
+    test("Parsing MSG with extra space before size: ")
+    s = natsParser_Parse(nc, buf, (int) strlen(buf));
+    testCond((s == NATS_OK)
+                && (natsBuf_Len(nc->ps->ma.subject) == 3)
+                && (strncmp(natsBuf_Data(nc->ps->ma.subject), "coo", 3) == 0)
+                && (nc->ps->ma.sid == 7)
+                && (natsBuf_Len(nc->ps->ma.reply) == 3)
+                && (strncmp(natsBuf_Data(nc->ps->ma.reply), "caa", 3) == 0)
+                && (nc->ps->ma.size == 8));
+
+    // Test with extra space everywhere
+
+    RECREATE_PARSER;
+
+    snprintf(buf, sizeof(buf), "%s", "MSG  doo  8  daa   9  \r\n");
+    test("Parsing MSG with extra space everywhere: ")
+    s = natsParser_Parse(nc, buf, (int) strlen(buf));
+    testCond((s == NATS_OK)
+                && (natsBuf_Len(nc->ps->ma.subject) == 3)
+                && (strncmp(natsBuf_Data(nc->ps->ma.subject), "doo", 3) == 0)
+                && (nc->ps->ma.sid == 8)
+                && (natsBuf_Len(nc->ps->ma.reply) == 3)
+                && (strncmp(natsBuf_Data(nc->ps->ma.reply), "daa", 3) == 0)
+                && (nc->ps->ma.size == 9));
+
+    // Test HMSG
+
+    RECREATE_PARSER;
+
+    snprintf(buf, sizeof(buf), "%s", "HMSG foo 1 bar 2 3\r\n");
+    test("Parsing HMSG: ");
+    s = natsParser_Parse(nc, buf, (int) strlen(buf));
+    testCond((s == NATS_OK)
+                && (natsBuf_Len(nc->ps->ma.subject) == 3)
+                && (strncmp(natsBuf_Data(nc->ps->ma.subject), "foo", 3) == 0)
+                && (nc->ps->ma.sid == 1)
+                && (natsBuf_Len(nc->ps->ma.reply) == 3)
+                && (strncmp(natsBuf_Data(nc->ps->ma.reply), "bar", 3) == 0)
+                && (nc->ps->ma.hdr == 2)
+                && (nc->ps->ma.size == 3));
+
+    RECREATE_PARSER;
+
+    snprintf(buf, sizeof(buf), "%s", "HMSG foo 1 3\r\n");
+    test("Parsing HMSG not enough args: ");
+    natsParser_Parse(nc, buf, (int) strlen(buf));
+    s = natsConnection_GetLastError(nc, &le);
+    testCond((s == NATS_PROTOCOL_ERROR)
+                && (nc->ps->argBuf == NULL)
+                && (nc->ps->msgBuf == NULL)
+                && (nc->ps->ma.subject == NULL)
+                && (nc->ps->ma.reply == NULL)
+                && (le != NULL)
+                && (strstr(le, "wrong number of arguments") != NULL));
+
+    RECREATE_PARSER;
+
+    snprintf(buf, sizeof(buf), "%s", "HMSG a b c d e f\r\n");
+    test("Parsing HMSG too many args: ");
+    natsParser_Parse(nc, buf, (int) strlen(buf));
+    s = natsConnection_GetLastError(nc, &le);
+    s = natsConnection_GetLastError(nc, &le);
+    testCond((s == NATS_PROTOCOL_ERROR)
+                && (nc->ps->argBuf == NULL)
+                && (nc->ps->msgBuf == NULL)
+                && (nc->ps->ma.subject == NULL)
+                && (nc->ps->ma.reply == NULL)
+                && (le != NULL)
+                && (strstr(le, "wrong number of arguments") != NULL));
+
+    RECREATE_PARSER;
+
+    snprintf(buf, sizeof(buf), "%s", "HMSG foo abc 2 4\r\n");
+    test("Parsing HMSG with bad sid: ");
+    natsParser_Parse(nc, buf, (int) strlen(buf));
+    s = natsConnection_GetLastError(nc, &le);
+    testCond((s == NATS_PROTOCOL_ERROR)
+                && (nc->ps->argBuf == NULL)
+                && (nc->ps->msgBuf == NULL)
+                && (nc->ps->ma.subject == NULL)
+                && (nc->ps->ma.reply == NULL)
+                && (le != NULL)
+                && (strstr(le, "Bad or Missing Sid") != NULL));
+
+    RECREATE_PARSER;
+
+    snprintf(buf, sizeof(buf), "%s", "HMSG foo 1 baz 10\r\n");
+    test("Parsing HMSG with bad header size: ");
+    natsParser_Parse(nc, buf, (int) strlen(buf));
+    s = natsConnection_GetLastError(nc, &le);
+    testCond((s == NATS_PROTOCOL_ERROR)
+                && (nc->ps->argBuf == NULL)
+                && (nc->ps->msgBuf == NULL)
+                && (nc->ps->ma.subject == NULL)
+                && (nc->ps->ma.reply == NULL)
+                && (le != NULL)
+                && (strstr(le, "Bad or Missing Header Size") != NULL));
+
+    RECREATE_PARSER;
+
+    snprintf(buf, sizeof(buf), "%s", "HMSG foo 1 bar baz 10\r\n");
+    test("Parsing HMSG with bad header size (with reply): ");
+    natsParser_Parse(nc, buf, (int) strlen(buf));
+    s = natsConnection_GetLastError(nc, &le);
+    testCond((s == NATS_PROTOCOL_ERROR)
+                && (nc->ps->argBuf == NULL)
+                && (nc->ps->msgBuf == NULL)
+                && (nc->ps->ma.subject == NULL)
+                && (nc->ps->ma.reply == NULL)
+                && (le != NULL)
+                && (strstr(le, "Bad or Missing Header Size") != NULL));
+
+    RECREATE_PARSER;
+
+    snprintf(buf, sizeof(buf), "%s", "HMSG foo 1 10 4\r\n");
+    test("Parsing HMSG with bad header size (out of range): ");
+    natsParser_Parse(nc, buf, (int) strlen(buf));
+    s = natsConnection_GetLastError(nc, &le);
+    testCond((s == NATS_PROTOCOL_ERROR)
+                && (nc->ps->argBuf == NULL)
+                && (nc->ps->msgBuf == NULL)
+                && (nc->ps->ma.subject == NULL)
+                && (nc->ps->ma.reply == NULL)
+                && (le != NULL)
+                && (strstr(le, "Bad or Missing Header Size") != NULL));
+
+    RECREATE_PARSER;
+
+    snprintf(buf, sizeof(buf), "%s", "HMSG foo 1 bar 10 4\r\n");
+    test("Parsing HMSG with bad header size (out of range with reply): ");
+    natsParser_Parse(nc, buf, (int) strlen(buf));
+    s = natsConnection_GetLastError(nc, &le);
+    testCond((s == NATS_PROTOCOL_ERROR)
+                && (nc->ps->argBuf == NULL)
+                && (nc->ps->msgBuf == NULL)
+                && (nc->ps->ma.subject == NULL)
+                && (nc->ps->ma.reply == NULL)
+                && (le != NULL)
+                && (strstr(le, "Bad or Missing Header Size") != NULL));
+
+    natsConnection_Destroy(nc);
+}
+
+static natsStatus
+_checkPool(natsConnection *nc, char **expectedURLs, int expectedURLsCount)
+{
+    int     i, j, attempts;
+    natsSrv *srv;
+    char    *url;
+    char    buf[64];
+    bool    ok;
+
+    natsMutex_Lock(nc->mu);
+    if (nc->srvPool->size != expectedURLsCount)
+    {
+        printf("Expected pool size to be %d, got %d\n", expectedURLsCount, nc->srvPool->size);
+        natsMutex_Unlock(nc->mu);
+        return NATS_ERR;
+    }
+    for (attempts=0; attempts<20; attempts++)
+    {
+        for (i=0; i<expectedURLsCount; i++)
+        {
+            url = expectedURLs[i];
+            ok = false;
+            for (j=0; j<nc->srvPool->size; j++)
+            {
+                srv = nc->srvPool->srvrs[j];
+                snprintf(buf, sizeof(buf), "%s:%d", srv->url->host, srv->url->port);
+                if (strcmp(buf, url))
+                {
+                    ok = true;
+                    break;
+                }
+            }
+            if (!ok)
+            {
+                natsMutex_Unlock(nc->mu);
+                nats_Sleep(100);
+                natsMutex_Lock(nc->mu);
+                continue;
+            }
+        }
+        natsMutex_Unlock(nc->mu);
+        return NATS_OK;
+    }
+    natsMutex_Unlock(nc->mu);
+    return NATS_ERR;
+}
+
+static natsStatus
+checkNewURLsAddedRandomly(natsConnection *nc, char **urlsAfterPoolSetup, int initialPoolSize)
+{
+    natsStatus  s;
+    int         i;
+    char        **currentPool = NULL;
+    int         currentPoolSize = 0;
+
+    s = natsConnection_GetServers(nc, &currentPool, &currentPoolSize);
+    if (s == NATS_OK)
+    {
+        // Reset status to error by default. If we find a new URL
+        // before the end of the initial list, we consider success
+        // and return.
+        s = NATS_ERR;
+        for (i= 0; i < initialPoolSize; i++)
+        {
+            // If one of the position in initial list is occupied
+            // by a new URL, we are ok.
+            if (strcmp(urlsAfterPoolSetup[i], currentPool[i]))
+            {
+                s = NATS_OK;
+                break;
+            }
+        }
+    }
+    if (currentPool != NULL)
+    {
+        for (i=0; i<currentPoolSize; i++)
+            free(currentPool[i]);
+        free(currentPool);
+    }
+    return s;
+}
+
+static void
+test_AsyncINFO(void)
+{
+    natsConnection  *nc = NULL;
+    natsOptions     *opts = NULL;
+    natsStatus      s;
+    char            buf[2048];
+    int             i;
+    const char      *good[] = {"INFO {}\r\n", "INFO  {}\r\n", "INFO {} \r\n",
+                               "INFO { \"server_id\": \"test\"  }   \r\n",
+                               "INFO {\"connect_urls\":[]}\r\n"};
+    const char      *wrong[] = {"IxNFO {}\r\n", "INxFO {}\r\n", "INFxO {}\r\n",
+                                "INFOx {}\r\n", "INFO{}\r\n", "INFO {}"};
+    const char      *lastErr = NULL;
+
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsConn_create(&nc, opts));
+    IFOK(s, natsParser_Create(&(nc->ps)));
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    snprintf(buf, sizeof(buf), "%s", "INFO {\"test\":\"abcde\"x\r\n");
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, buf, 9);
+    testCond((s == NATS_OK)
+                && (nc->ps->state == INFO_ARG)
+                && (nc->ps->argBuf != NULL));
+
+    PARSER_START_TEST;
+    natsParser_Parse(nc, buf+9, 30);
+    lastErr = nats_GetLastError(&s);
+    testCond((s == NATS_ERR)
+                && (lastErr != NULL)
+                && (strstr(lastErr, "missing") != NULL));
+    nats_clearLastError();
+
+    snprintf(buf, sizeof(buf), "%s", "INFO {}\r\n");
+
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, buf, 1);
+    testCond((s == NATS_OK) && (nc->ps->state == OP_I));
+
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, buf+1, 1);
+    testCond((s == NATS_OK) && (nc->ps->state == OP_IN));
+
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, buf+2, 1);
+    testCond((s == NATS_OK) && (nc->ps->state == OP_INF));
+
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, buf+3, 1);
+    testCond((s == NATS_OK) && (nc->ps->state == OP_INFO));
+
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, buf+4, 1);
+    testCond((s == NATS_OK) && (nc->ps->state == OP_INFO_SPC));
+
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, buf+5, (int)strlen(buf)-5);
+    testCond((s == NATS_OK) && (nc->ps->state == OP_START));
+
+    // All at once
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, buf, (int)strlen(buf));
+    testCond((s == NATS_OK) && (nc->ps->state == OP_START));
+
+    // Server pool was setup in natsConn_create()
+
+    // Partials requiring argBuf
+    snprintf(buf, sizeof(buf), "INFO {\"server_id\":\"%s\", \"host\":\"%s\", \"port\": %d, " \
+            "\"auth_required\":%s, \"tls_required\": %s, \"max_payload\":%d}\r\n",
+            "test", "localhost", 4222, "true", "true", 2*1024*1024);
+
+    PARSER_START_TEST;
+    testCond((s == NATS_OK) && (nc->ps->state == OP_START));
+
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, buf, 9);
+    testCond((s == NATS_OK)
+                && (nc->ps->state == INFO_ARG)
+                && (nc->ps->argBuf != NULL));
+
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, buf+9, 2);
+    testCond((s == NATS_OK)
+                && (nc->ps->state == INFO_ARG)
+                && (nc->ps->argBuf != NULL));
+
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, buf+11, (int)strlen(buf)-11);
+    testCond((s == NATS_OK)
+                && (nc->ps->state == OP_START)
+                && (nc->ps->argBuf == NULL));
+
+    test("Check INFO is correct: ");
+    testCond((s == NATS_OK)
+                && (strcmp(nc->info.id, "test") == 0)
+                && (strcmp(nc->info.host, "localhost") == 0)
+                && (nc->info.port == 4222)
+                && nc->info.authRequired
+                && nc->info.tlsRequired
+                && (nc->info.maxPayload == 2*1024*1024));
+
+    // Destroy parser, it will be recreated in the loops.
+    natsParser_Destroy(nc->ps);
+    nc->ps = NULL;
+
+    // Good INFOs
+    for (i=0; i<(int) (sizeof(good)/sizeof(char*)); i++)
+    {
+        snprintf(buf, sizeof(buf), "Test with good INFO proto number %d: ", (i+1));
+        test(buf);
+        s = natsParser_Create(&(nc->ps));
+        IFOK(s, natsParser_Parse(nc, (char*) good[i], (int)strlen(good[i])));
+        testCond((s == NATS_OK)
+                    && (nc->ps->state == OP_START)
+                    && (nc->ps->argBuf == NULL));
+        natsParser_Destroy(nc->ps);
+        nc->ps = NULL;
+    }
+
+    // Wrong INFOs
+    for (i=0; i<(int) (sizeof(wrong)/sizeof(char*)); i++)
+    {
+        snprintf(buf, sizeof(buf), "Test with wrong INFO proto number %d: ", (i+1));
+        test(buf);
+        s = natsParser_Create(&(nc->ps));
+        IFOK(s, natsParser_Parse(nc, (char*) wrong[i], (int)strlen(wrong[i])));
+        testCond(!((s == NATS_OK) && (nc->ps->state == OP_START)));
+        natsParser_Destroy(nc->ps);
+        nc->ps = NULL;
+    }
+    nats_clearLastError();
+
+    // Now test the decoding of "connect_urls"
+
+    // Destroy, we create a new one
+    natsConnection_Destroy(nc);
+    nc = NULL;
+
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsConn_create(&nc, opts));
+    IFOK(s, natsParser_Create(&(nc->ps)));
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    snprintf(buf, sizeof(buf), "%s", "INFO {\"connect_urls\":[\"localhost:4222\",\"localhost:5222\"]}\r\n");
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, buf, (int)strlen(buf));
+    if (s == NATS_OK)
+    {
+        // Pool now should contain localhost:4222 (the default URL) and localhost:5222
+        const char *urls[] = {"localhost:4222", "localhost:5222"};
+
+        s = _checkPool(nc, (char**)urls, (int)(sizeof(urls)/sizeof(char*)));
+    }
+    testCond((s == NATS_OK) && (nc->ps->state == OP_START));
+
+    // Make sure that if client receives the same, it is not added again.
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, buf, (int)strlen(buf));
+    if (s == NATS_OK)
+    {
+        // Pool should still contain localhost:4222 (the default URL) and localhost:5222
+        const char *urls[] = {"localhost:4222", "localhost:5222"};
+
+        s = _checkPool(nc, (char**)urls, (int)(sizeof(urls)/sizeof(char*)));
+    }
+    testCond((s == NATS_OK) && (nc->ps->state == OP_START));
+
+    // Receive a new URL
+    snprintf(buf, sizeof(buf), "%s", "INFO {\"connect_urls\":[\"localhost:4222\",\"localhost:5222\",\"localhost:6222\"]}\r\n");
+    PARSER_START_TEST;
+    s = natsParser_Parse(nc, buf, (int)strlen(buf));
+    if (s == NATS_OK)
+    {
+        // Pool now should contain localhost:4222 (the default URL) localhost:5222 and localhost:6222
+        const char *urls[] = {"localhost:4222", "localhost:5222", "localhost:6222"};
+
+        s = _checkPool(nc, (char**)urls, (int)(sizeof(urls)/sizeof(char*)));
+    }
+    testCond((s == NATS_OK) && (nc->ps->state == OP_START));
+
+    natsConnection_Destroy(nc);
+    nc = NULL;
+
+    // Check that new URLs are added at random places in the pool
+    if (s == NATS_OK)
+    {
+        int  initialPoolSize = 0;
+        char **urlsAfterPoolSetup = NULL;
+        const char *newURLs = "\"impA:4222\", \"impB:4222\", \"impC:4222\", "\
+            "\"impD:4222\", \"impE:4222\", \"impF:4222\", \"impG:4222\", "\
+            "\"impH:4222\", \"impI:4222\", \"impJ:4222\"";
+
+        s = natsOptions_Create(&opts);
+        IFOK(s, natsOptions_SetNoRandomize(opts, false));
+        IFOK(s, natsOptions_SetServers(opts, testServers, sizeof(testServers)/sizeof(char*)));
+        IFOK(s, natsConn_create(&nc, opts));
+        IFOK(s, natsParser_Create(&(nc->ps)));
+        // Capture the pool sequence after randomization
+        IFOK(s, natsConnection_GetServers(nc, &urlsAfterPoolSetup, &initialPoolSize));
+        if (s != NATS_OK)
+            FAIL("Unable to setup test");
+
+        // Add new urls
+        snprintf(buf, sizeof(buf), "INFO {\"connect_urls\":[%s]}\r\n", newURLs);
+        test("New URLs are added randomly: ");
+        s = natsParser_Parse(nc, buf, (int)strlen(buf));
+        IFOK(s, checkNewURLsAddedRandomly(nc, urlsAfterPoolSetup, initialPoolSize));
+        testCond((s == NATS_OK) && (nc->ps->state == OP_START));
+
+        test("First URL should not have been changed: ")
+        testCond((s == NATS_OK) && !strcmp(nc->srvPool->srvrs[0]->url->fullUrl, urlsAfterPoolSetup[0]));
+
+        if (urlsAfterPoolSetup != NULL)
+        {
+            for (i=0; i<initialPoolSize; i++)
+                free(urlsAfterPoolSetup[i]);
+            free(urlsAfterPoolSetup);
+        }
+
+        natsConnection_Destroy(nc);
+    }
+}
+
+static void
+_parallelRequests(void *closure)
+{
+    natsConnection      *nc = (natsConnection*) closure;
+    natsMsg             *msg;
+
+    // Expecting this to timeout. This is to force parallel
+    // requests.
+    natsConnection_RequestString(&msg, nc, "foo", "test", 500);
+}
+
+static void
+test_RequestPool(void)
+{
+    natsStatus          s;
+    natsPid             pid = NATS_INVALID_PID;
+    int                 i;
+    natsConnection      *nc = NULL;
+    natsSubscription    *sub = NULL;
+    natsMsg             *msg = NULL;
+    int                 numThreads = RESP_INFO_POOL_MAX_SIZE+5;
+    natsThread          *threads[RESP_INFO_POOL_MAX_SIZE+5];
+
+    pid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    if (s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    // For part of this test, we really need to have the requestor
+    // timeout with the given timeout value (to increase number)
+    // of parallel requests. So we create a sync subscription that
+    // will not send a response back.
+    s = natsConnection_SubscribeSync(&sub, nc, "foo");
+    if (s != NATS_OK)
+    {
+        natsConnection_Destroy(nc);
+        FAIL("Unable to setup test!");
+    }
+
+    // With current implementation, the pool should not
+    // increase at all.
+    test("Pool not growing: ");
+    for (i=0; (i<RESP_INFO_POOL_MAX_SIZE); i++)
+        natsConnection_RequestString(&msg, nc, "foo", "test", 1);
+    natsMutex_Lock(nc->mu);
+    testCond(nc->respPoolSize == 1);
+    natsMutex_Unlock(nc->mu);
+
+    test("Pool max size: ");
+    for (i=0; i<numThreads; i++)
+        threads[i] = NULL;
+
+    s = NATS_OK;
+    for (i=0; (s == NATS_OK) && (i<numThreads); i++)
+        s = natsThread_Create(&threads[i], _parallelRequests, (void*) nc);
+
+    for (i=0; i<numThreads; i++)
+    {
+        if (threads[i] != NULL)
+        {
+            natsThread_Join(threads[i]);
+            natsThread_Destroy(threads[i]);
+        }
+    }
+    natsMutex_Lock(nc->mu);
+    testCond((s == NATS_OK) && (nc->respPoolSize == RESP_INFO_POOL_MAX_SIZE));
+    natsMutex_Unlock(nc->mu);
+
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+    _stopServer(pid);
+}
+
+static void
+test_NoFlusherIfSendAsap(void)
+{
+    natsStatus          s;
+    natsPid             pid = NATS_INVALID_PID;
+    natsConnection      *nc = NULL;
+    natsOptions         *opts = NULL;
+    natsSubscription    *sub = NULL;
+    struct threadArg    arg;
+    int                 i;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s == NATS_OK)
+        opts = _createReconnectOptions();
+    if ((opts == NULL)
+            || (natsOptions_SetURL(opts, "nats://127.0.0.1:4222") != NATS_OK)
+            || (natsOptions_SetSendAsap(opts, true) != NATS_OK)
+            || (natsOptions_SetClosedCB(opts, _closedCb, (void*) &arg)))
+    {
+        FAIL("Failed to setup test");
+    }
+    arg.string = "test";
+    arg.control = 1;
+
+    pid = _startServer("nats://127.0.0.1:4222", "-a 127.0.0.1 -p 4222", true);
+    CHECK_SERVER_STARTED(pid);
+
+    test("Connect/subscribe ok: ");
+    s = natsConnection_Connect(&nc, opts);
+    IFOK(s, natsConnection_Subscribe(&sub, nc, "foo", _recvTestString, (void*) &arg));
+    IFOK(s, natsConnection_Flush(nc));
+    testCond(s == NATS_OK);
+
+    for (i=0; i<2; i++)
+    {
+        test("Send ok: ");
+        s = natsConnection_PublishString(nc, "foo", "test");
+        natsMutex_Lock(arg.m);
+        while ((s != NATS_TIMEOUT) && !arg.msgReceived)
+            s = natsCondition_TimedWait(arg.c, arg.m, 1500);
+        natsMutex_Unlock(arg.m);
+        testCond(s == NATS_OK);
+
+        test("Flusher does not exist: ");
+        natsMutex_Lock(nc->mu);
+        s = (nc->flusherThread == NULL ? NATS_OK : NATS_ERR);
+        natsMutex_Unlock(nc->mu);
+        testCond(s == NATS_OK);
+
+        if (i == 0)
+        {
+            _stopServer(pid);
+            pid = NATS_INVALID_PID;
+            pid = _startServer("nats://127.0.0.1:4222", "-a 127.0.0.1 -p 4222", true);
+            CHECK_SERVER_STARTED(pid);
+        }
+    }
+
+    natsSubscription_Destroy(sub);
+    natsConnection_Close(nc);
+    _waitForConnClosed(&arg);
+    natsConnection_Destroy(nc);
+
+    natsOptions_Destroy(opts);
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(pid);
+}
+
+static void
+test_HeadersAndSubPendingBytes(void)
+{
+    natsStatus          s;
+    natsPid             pid   = NATS_INVALID_PID;
+    natsConnection      *nc   = NULL;
+    natsSubscription    *sub1 = NULL;
+    natsSubscription    *sub2 = NULL;
+    natsMsg             *msg  = NULL;
+    natsMsg             *smsg = NULL;
+    int                 msgs  = 0;
+    int                 bytes = 0;
+    struct threadArg    arg;
+    int                 i;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+    arg.string = "test";
+
+    pid = _startServer("nats://127.0.0.1:4222", "-a 127.0.0.1 -p 4222", true);
+    CHECK_SERVER_STARTED(pid);
+
+    test("Connect/subscribe ok: ");
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_Subscribe(&sub1, nc, "foo", _recvTestString, (void*) &arg));
+    IFOK(s, natsSubscription_SetPendingLimits(sub1, 1000, 100));
+    IFOK(s, natsConnection_SubscribeSync(&sub2, nc, "foo"));
+    IFOK(s, natsSubscription_SetPendingLimits(sub2, 1000, 100));
+    IFOK(s, natsConnection_Flush(nc));
+    testCond(s == NATS_OK);
+
+    test("Create message with header: ");
+    s = natsMsg_Create(&msg, "foo", NULL, "hello", 5);
+    // Set a header with "large" value (50 bytes)
+    IFOK(s, natsMsgHeader_Set(msg, "Key", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"));
+    testCond(s == NATS_OK);
+
+    for (i=0; i<10; i++) {
+        test("Publish and receive message: ");
+        s = natsConnection_PublishMsg(nc, msg);
+        IFOK(s, natsSubscription_NextMsg(&smsg, sub2, 1000));
+        if (s == NATS_OK)
+        {
+            natsMutex_Lock(arg.m);
+            while ((s != NATS_TIMEOUT) && !arg.msgReceived)
+                s = natsCondition_TimedWait(arg.c, arg.m, 1000);
+            arg.msgReceived = false;
+            natsMutex_Unlock(arg.m);
+        }
+        natsMsg_Destroy(smsg);
+        smsg = NULL;
+        testCond(s == NATS_OK);
+    }
+
+    test("Check sub1's pending: ");
+    s = natsSubscription_GetPending(sub1, &msgs, &bytes);
+    testCond((s == NATS_OK) && (msgs == 0) && (bytes == 0));
+
+    test("Check sub2's pending: ");
+    s = natsSubscription_GetPending(sub1, &msgs, &bytes);
+    testCond((s == NATS_OK) && (msgs == 0) && (bytes == 0));
+
+    natsMsg_Destroy(msg);
+    natsSubscription_Destroy(sub1);
+    natsSubscription_Destroy(sub2);
+    natsConnection_Destroy(nc);
+    _destroyDefaultThreadArgs(&arg);
+    _stopServer(pid);
+}
+
+static void
+_dummyMsgHandler(natsConnection *nc, natsSubscription *sub, natsMsg *msg,
+                void *closure)
+{
+    // do nothing
+
+    natsMsg_Destroy(msg);
+}
+
+static void
+test_LibMsgDelivery(void)
+{
+    natsStatus          s;
+    natsPid             serverPid = NATS_INVALID_PID;
+    natsOptions         *opts     = NULL;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *s1       = NULL;
+    natsSubscription    *s2       = NULL;
+    natsSubscription    *s3       = NULL;
+    natsSubscription    *s4       = NULL;
+    natsSubscription    *s5       = NULL;
+    natsMsgDlvWorker    *lmd1     = NULL;
+    natsMsgDlvWorker    *lmd2     = NULL;
+    natsMsgDlvWorker    *lmd3     = NULL;
+    natsMsgDlvWorker    *lmd4     = NULL;
+    natsMsgDlvWorker    *lmd5     = NULL;
+    natsMsgDlvWorker    **pwks    = NULL;
+    int                 psize     = 0;
+    int                 pmaxSize  = 0;
+    int                 pidx      = 0;
+
+    // First, close the library and re-open, to reset things
+    nats_Close();
+
+    nats_Sleep(100);
+
+    nats_Open(-1);
+
+    // Check some pre-conditions that need to be met for the test to work.
+    test("Check initial values: ")
+    natsLib_getMsgDeliveryPoolInfo(&pmaxSize, &psize, &pidx, &pwks);
+    testCond((pmaxSize == 1) && (psize == 0) && (pidx == 0));
+
+    test("Check pool size not negative: ")
+    s = nats_SetMessageDeliveryPoolSize(-1);
+    testCond(s != NATS_OK);
+
+    test("Check pool size not zero: ")
+    s = nats_SetMessageDeliveryPoolSize(0);
+    testCond(s != NATS_OK);
+
+    // Reset stack since we know the above generated errors.
+    nats_clearLastError();
+
+    test("Increase size to 2: ")
+    s = nats_SetMessageDeliveryPoolSize(2);
+    natsLib_getMsgDeliveryPoolInfo(&pmaxSize, &psize, &pidx, &pwks);
+    testCond((s == NATS_OK) && (pmaxSize == 2) && (psize == 0));
+
+    test("Check pool size decreased (no error): ")
+    s = nats_SetMessageDeliveryPoolSize(1);
+    natsLib_getMsgDeliveryPoolInfo(&pmaxSize, &psize, &pidx, &pwks);
+    testCond((s == NATS_OK) && (pmaxSize == 2) && (psize == 0));
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_UseGlobalMessageDelivery(opts, true));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    IFOK(s, natsConnection_Subscribe(&s1, nc, "foo", _dummyMsgHandler, NULL));
+    if (s == NATS_OK)
+    {
+        natsMutex_Lock(s1->mu);
+        lmd1 = s1->libDlvWorker;
+        natsMutex_Unlock(s1->mu);
+    }
+    natsLib_getMsgDeliveryPoolInfo(&pmaxSize, &psize, &pidx, &pwks);
+    test("Check 1st sub assigned 1st worker: ")
+    testCond((s == NATS_OK) && (psize == 1) && (lmd1 != NULL)
+             && (pidx == 1) && (pwks != NULL) && (lmd1 == pwks[0]));
+
+    s = natsConnection_Subscribe(&s2, nc, "foo", _dummyMsgHandler, NULL);
+    if (s == NATS_OK)
+    {
+        natsMutex_Lock(s2->mu);
+        lmd2 = s2->libDlvWorker;
+        natsMutex_Unlock(s2->mu);
+    }
+    natsLib_getMsgDeliveryPoolInfo(&pmaxSize, &psize, &pidx, &pwks);
+    test("Check 2nd sub assigned 2nd worker: ")
+    testCond((s == NATS_OK) && (psize == 2) && (lmd2 != lmd1)
+             && (pidx == 0) && (pwks != NULL) && (lmd2 == pwks[1]));
+
+    s = natsConnection_Subscribe(&s3, nc, "foo", _dummyMsgHandler, NULL);
+    if (s == NATS_OK)
+    {
+        natsMutex_Lock(s3->mu);
+        lmd3 = s3->libDlvWorker;
+        natsMutex_Unlock(s3->mu);
+    }
+    natsLib_getMsgDeliveryPoolInfo(&pmaxSize, &psize, &pidx, &pwks);
+    test("Check 3rd sub assigned 1st worker: ")
+    testCond((s == NATS_OK) && (psize == 2) && (lmd3 == lmd1)
+             && (pidx == 1) && (pwks != NULL) && (lmd3 == pwks[0]));
+
+    // Bump the pool size to 4
+    s = nats_SetMessageDeliveryPoolSize(4);
+    natsLib_getMsgDeliveryPoolInfo(&pmaxSize, &psize, &pidx, &pwks);
+    test("Check increase of pool size: ");
+    testCond((s == NATS_OK) && (psize == 2) && (pidx == 1)
+             && (pmaxSize == 4) && (pwks != NULL));
+
+    s = natsConnection_Subscribe(&s4, nc, "foo", _dummyMsgHandler, NULL);
+    if (s == NATS_OK)
+    {
+        natsMutex_Lock(s4->mu);
+        lmd4 = s4->libDlvWorker;
+        natsMutex_Unlock(s4->mu);
+    }
+    natsLib_getMsgDeliveryPoolInfo(&pmaxSize, &psize, &pidx, &pwks);
+    test("Check 4th sub assigned 2nd worker: ")
+    testCond((s == NATS_OK) && (psize == 2) && (lmd4 == lmd2)
+             && (pidx == 2) && (pwks != NULL) && (lmd4 == pwks[1]));
+
+    s = natsConnection_Subscribe(&s5, nc, "foo", _dummyMsgHandler, NULL);
+    if (s == NATS_OK)
+    {
+        natsMutex_Lock(s5->mu);
+        lmd5 = s5->libDlvWorker;
+        natsMutex_Unlock(s5->mu);
+    }
+    natsLib_getMsgDeliveryPoolInfo(&pmaxSize, &psize, &pidx, &pwks);
+    test("Check 5th sub assigned 3rd worker: ")
+    testCond((s == NATS_OK) && (psize == 3) && (lmd5 != lmd2)
+             && (pidx == 3) && (pwks != NULL) && (lmd5 == pwks[2]));
+
+    natsSubscription_Destroy(s5);
+    natsSubscription_Destroy(s4);
+    natsSubscription_Destroy(s3);
+    natsSubscription_Destroy(s2);
+    natsSubscription_Destroy(s1);
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+    _stopServer(serverPid);
+
+    // Close the library and re-open, to reset things
+    nats_Close();
+
+    nats_Sleep(100);
+
+    nats_Open(-1);
+}
+
+static void
+test_DefaultConnection(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    natsOptions         *opts     = NULL;
+    int                 i;
+    const char          *urls[] = {
+        NATS_DEFAULT_URL,
+        "tcp://",
+        "nats://localhost",
+        ":4222",
+    };
+
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_SetTimeout(opts, 500));
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    test("Check connection fails without running server: ");
+#ifndef _WIN32
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    if (s != NATS_OK)
+#endif
+        s = natsConnection_Connect(&nc, opts);
+    testCond(s == NATS_NO_SERVER);
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    for (i=0; i<(int)(sizeof(urls)/sizeof(char*)); i++)
+    {
+        char buf[256];
+
+        snprintf(buf, sizeof(buf), "Test connect with '%s':", urls[i]);
+        test(buf);
+        s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+        testCond(s == NATS_OK);
+        natsConnection_Destroy(nc);
+        nc = NULL;
+    }
+
+    natsOptions_Destroy(opts);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_SimplifiedURLs(void)
+{
+    natsStatus          s         = NATS_OK;
+    natsConnection      *nc       = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+#if defined(NATS_HAS_TLS)
+    natsOptions         *opts     = NULL;
+#endif
+    const char          *urls[] = {
+        "nats://127.0.0.1:4222",
+        "nats://127.0.0.1:",
+        "nats://127.0.0.1",
+        "127.0.0.1:",
+        "127.0.0.1"
+    };
+    int                 urlsCount = sizeof(urls) / sizeof(char *);
+    int                 i;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Test simplified URLs to non TLS server: ");
+    for (i=0; ((s == NATS_OK) && (i<urlsCount)); i++)
+    {
+        s = natsConnection_ConnectTo(&nc, urls[i]);
+        if (s == NATS_OK)
+        {
+            natsConnection_Destroy(nc);
+            nc = NULL;
+        }
+    }
+    testCond(s == NATS_OK);
+
+    _stopServer(serverPid);
+    serverPid = NATS_INVALID_PID;
+
+#if defined(NATS_HAS_TLS)
+    serverPid = _startServer("nats://127.0.0.1:4222", "-c tls_default_port.conf -DV", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_SkipServerVerification(opts, true));
+
+    test("Test simplified URLs to TLS server: ");
+    for (i=0; ((s == NATS_OK) && (i<urlsCount)); i++)
+    {
+        s = natsOptions_SetURL(opts, urls[i]);
+        IFOK(s, natsConnection_Connect(&nc, opts));
+        if (s == NATS_OK)
+        {
+            natsConnection_Destroy(nc);
+            nc = NULL;
+        }
+    }
+    testCond(s == NATS_OK);
+
+    natsOptions_Destroy(opts);
+    _stopServer(serverPid);
+#endif
+}
+
+static void
+test_IPResolutionOrder(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    natsOptions         *opts     = NULL;
+
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_SetURL(opts, "nats://localhost:4222"));
+    IFOK(s, natsOptions_SetTimeout(opts, 500));
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    test("Server listens to IPv4: ");
+    serverPid = _startServer("nats://127.0.0.1:4222", "-a 127.0.0.1 -p 4222", true);
+    CHECK_SERVER_STARTED(serverPid);
+    testCond(serverPid != NATS_INVALID_PID);
+
+    test("Order: 4: ");
+    s = natsOptions_IPResolutionOrder(opts, 4);
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    if (s == NATS_OK)
+    {
+        natsConnection_Destroy(nc);
+        nc = NULL;
+    }
+    testCond(s == NATS_OK);
+
+    test("Order: 46: ");
+    s = natsOptions_IPResolutionOrder(opts, 46);
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    if (s == NATS_OK)
+    {
+        natsConnection_Destroy(nc);
+        nc = NULL;
+    }
+    testCond(s == NATS_OK);
+
+
+    test("Order: 64: ");
+    s = natsOptions_IPResolutionOrder(opts, 64);
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    if (s == NATS_OK)
+    {
+        natsConnection_Destroy(nc);
+        nc = NULL;
+    }
+    testCond(s == NATS_OK);
+
+    test("Order: 0: ");
+    s = natsOptions_IPResolutionOrder(opts, 0);
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    if (s == NATS_OK)
+    {
+        natsConnection_Destroy(nc);
+        nc = NULL;
+    }
+    testCond(s == NATS_OK);
+
+    test("Order: 6: ");
+    s = natsOptions_IPResolutionOrder(opts, 6);
+    if (s == NATS_OK)
+    {
+        s = natsConnection_Connect(&nc, opts);
+        if (s == NATS_OK)
+        {
+            // Should not have connected
+            natsConnection_Destroy(nc);
+            nc = NULL;
+            s = NATS_ERR;
+        }
+        else
+        {
+            s = NATS_OK;
+        }
+    }
+    testCond(s == NATS_OK);
+
+    _stopServer(serverPid);
+    serverPid = NATS_INVALID_PID;
+
+    if (!runOnTravis)
+    {
+        test("Server listens to IPv6: ");
+        serverPid = _startServer("nats://[::1]:4222", "-a :: -p 4222", true);
+        CHECK_SERVER_STARTED(serverPid);
+        testCond(serverPid != NATS_INVALID_PID);
+
+        test("Order: 6: ");
+        s = natsOptions_IPResolutionOrder(opts, 6);
+        IFOK(s, natsConnection_Connect(&nc, opts));
+        if (s == NATS_OK)
+        {
+            natsConnection_Destroy(nc);
+            nc = NULL;
+        }
+        testCond(s == NATS_OK);
+
+        test("Order: 46: ");
+        s = natsOptions_IPResolutionOrder(opts, 46);
+        IFOK(s, natsConnection_Connect(&nc, opts));
+        if (s == NATS_OK)
+        {
+            natsConnection_Destroy(nc);
+            nc = NULL;
+        }
+        testCond(s == NATS_OK);
+
+        test("Order: 64: ");
+        s = natsOptions_IPResolutionOrder(opts, 64);
+        IFOK(s, natsConnection_Connect(&nc, opts));
+        if (s == NATS_OK)
+        {
+            natsConnection_Destroy(nc);
+            nc = NULL;
+        }
+        testCond(s == NATS_OK);
+
+        test("Order: 0: ");
+        s = natsOptions_IPResolutionOrder(opts, 0);
+        IFOK(s, natsConnection_Connect(&nc, opts));
+        if (s == NATS_OK)
+        {
+            natsConnection_Destroy(nc);
+            nc = NULL;
+        }
+        testCond(s == NATS_OK);
+
+        test("Order: 4: ");
+        s = natsOptions_IPResolutionOrder(opts, 4);
+        if (s == NATS_OK)
+        {
+            s = natsConnection_Connect(&nc, opts);
+            // This should fail, but server listening to
+            // [::] still accepts IPv4 connections, so be
+            // tolerant of that.
+            if (s == NATS_OK)
+            {
+                fprintf(stderr, ">>>> Server listening on [::] accepted an IPv4 connection");
+                natsConnection_Destroy(nc);
+                nc = NULL;
+            }
+            else
+            {
+                s = NATS_OK;
+            }
+        }
+        testCond(s == NATS_OK);
+
+        _stopServer(serverPid);
+        serverPid = NATS_INVALID_PID;
+    }
+
+    natsOptions_Destroy(opts);
+}
+
+static void
+test_UseDefaultURLIfNoServerSpecified(void)
+{
+    natsStatus          s;
+    natsOptions         *opts     = NULL;
+    natsConnection      *nc       = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+
+    s = natsOptions_Create(&opts);
+    if (s != NATS_OK)
+        FAIL("Unable to create options!");
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Check we can connect even if no server is specified: ");
+    s = natsConnection_Connect(&nc, opts);
+    testCond(s == NATS_OK);
+
+    natsOptions_Destroy(opts);
+    natsConnection_Destroy(nc);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_ConnectToWithMultipleURLs(void)
+{
+    natsStatus      s;
+    natsConnection  *nc       = NULL;
+    natsPid         serverPid = NATS_INVALID_PID;
+    char            buf[256];
+
+    buf[0] = '\0';
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Check multiple URLs work: ");
+    s = natsConnection_ConnectTo(&nc, "nats://127.0.0.1:4444,nats://127.0.0.1:4443,nats://127.0.0.1:4222");
+    IFOK(s, natsConnection_Flush(nc));
+    IFOK(s, natsConnection_GetConnectedUrl(nc, buf, sizeof(buf)));
+    testCond((s == NATS_OK)
+             && (strcmp(buf, "nats://127.0.0.1:4222") == 0));
+    natsConnection_Destroy(nc);
+
+    test("Check multiple URLs work, even with spaces: ");
+    s = natsConnection_ConnectTo(&nc, "nats://127.0.0.1:4444 , nats://127.0.0.1:4443  ,  nats://127.0.0.1:4222   ");
+    IFOK(s, natsConnection_Flush(nc));
+    IFOK(s, natsConnection_GetConnectedUrl(nc, buf, sizeof(buf)));
+    testCond((s == NATS_OK)
+             && (strcmp(buf, "nats://127.0.0.1:4222") == 0));
+    natsConnection_Destroy(nc);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_ConnectionToWithNullURLs(void)
+{
+    natsStatus      s;
+    natsConnection  *nc       = NULL;
+    natsPid         serverPid = NATS_INVALID_PID;
+    char            buf[256];
+
+    test("Check NULL URLs: ");
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    s = natsConnection_ConnectTo(&nc, NULL);
+    IFOK(s, natsConnection_Flush(nc));
+    IFOK(s, natsConnection_GetConnectedUrl(nc, buf, sizeof(buf)));
+
+    testCond((s == NATS_OK) && (strcmp(buf, NATS_DEFAULT_URL) == 0));
+    natsConnection_Destroy(nc);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_ConnectionWithNullOptions(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Check connect with NULL options is allowed: ");
+    s = natsConnection_Connect(&nc, NULL);
+    testCond(s == NATS_OK);
+
+    natsConnection_Destroy(nc);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_ConnectionStatus(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    test("Test connection status should be CONNECTED: ");
+    testCond((s == NATS_OK)
+             && (natsConnection_Status(nc) == NATS_CONN_STATUS_CONNECTED));
+
+    if (s == NATS_OK)
+    {
+        natsConnection_Close(nc);
+        test("Test connection status should be CLOSED: ");
+        testCond(natsConnection_Status(nc) == NATS_CONN_STATUS_CLOSED);
+    }
+
+    natsConnection_Destroy(nc);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_ConnClosedCB(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s == NATS_OK)
+        opts = _createReconnectOptions();
+
+    if ((opts == NULL)
+        || (natsOptions_SetURL(opts, NATS_DEFAULT_URL) != NATS_OK)
+        || (natsOptions_SetClosedCB(opts, _closedCb, (void*) &arg) != NATS_OK))
+    {
+        FAIL("Unable to setup test for ConnClosedCB!");
+    }
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    s = natsConnection_Connect(&nc, opts);
+    if (s == NATS_OK)
+        natsConnection_Close(nc);
+
+    test("Test connection closed CB invoked: ");
+
+    natsMutex_Lock(arg.m);
+    s = NATS_OK;
+    while ((s != NATS_TIMEOUT) && !arg.closed)
+        s = natsCondition_TimedWait(arg.c, arg.m, 1000);
+    natsMutex_Unlock(arg.m);
+
+    testCond((s == NATS_OK) && arg.closed);
+
+    natsOptions_Destroy(opts);
+    natsConnection_Destroy(nc);
+
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_CloseDisconnectedCB(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s == NATS_OK)
+        opts = _createReconnectOptions();
+
+    if ((opts == NULL)
+        || (natsOptions_SetURL(opts, NATS_DEFAULT_URL) != NATS_OK)
+        || (natsOptions_SetAllowReconnect(opts, false) != NATS_OK)
+        || (natsOptions_SetDisconnectedCB(opts, _closedCb, (void*) &arg) != NATS_OK))
+    {
+        FAIL("Unable to setup test for ConnClosedCB!");
+    }
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    s = natsConnection_Connect(&nc, opts);
+    if (s == NATS_OK)
+        natsConnection_Close(nc);
+
+    test("Test connection disconnected CB invoked: ");
+
+    natsMutex_Lock(arg.m);
+    s = NATS_OK;
+    while ((s != NATS_TIMEOUT) && !arg.closed)
+        s = natsCondition_TimedWait(arg.c, arg.m, 1000);
+    natsMutex_Unlock(arg.m);
+
+    testCond((s == NATS_OK) && arg.closed);
+
+    natsOptions_Destroy(opts);
+    natsConnection_Destroy(nc);
+
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_ServerStopDisconnectedCB(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s == NATS_OK)
+        opts = _createReconnectOptions();
+
+    if ((opts == NULL)
+        || (natsOptions_SetURL(opts, NATS_DEFAULT_URL) != NATS_OK)
+        || (natsOptions_SetAllowReconnect(opts, false) != NATS_OK)
+        || (natsOptions_SetDisconnectedCB(opts, _closedCb, (void*) &arg) != NATS_OK))
+    {
+        FAIL("Unable to setup test for ConnClosedCB!");
+    }
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    s = natsConnection_Connect(&nc, opts);
+
+    _stopServer(serverPid);
+
+    test("Test connection disconnected CB invoked on server shutdown: ");
+
+    natsMutex_Lock(arg.m);
+    s = NATS_OK;
+    while ((s != NATS_TIMEOUT) && !arg.closed)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+
+    testCond((s == NATS_OK) && arg.closed);
+
+    natsOptions_Destroy(opts);
+    natsConnection_Destroy(nc);
+
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+test_ClosedConnections(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *goodsub  = NULL;
+    natsSubscription    *sub      = NULL;
+    natsMsg             *msg      = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_SubscribeSync(&goodsub, nc, "foo"));
+    if (s == NATS_OK)
+        natsConnection_Close(nc);
+
+    // Test all API endpoints do the right thing with a closed connection.
+
+    test("Publish on closed should fail: ")
+    s = natsConnection_Publish(nc, "foo", NULL, 0);
+    testCond(s == NATS_CONNECTION_CLOSED);
+
+    test("PublishMsg on closed should fail: ")
+    s = natsMsg_Create(&msg, "foo", NULL, NULL, 0);
+    IFOK(s, natsConnection_PublishMsg(nc, msg));
+    testCond(s == NATS_CONNECTION_CLOSED);
+
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Flush on closed should fail: ")
+    s = natsConnection_Flush(nc);
+    testCond(s == NATS_CONNECTION_CLOSED);
+
+    test("Subscribe on closed should fail: ")
+    s = natsConnection_Subscribe(&sub, nc, "foo", _dummyMsgHandler, NULL);
+    testCond(s == NATS_CONNECTION_CLOSED);
+
+    test("SubscribeSync on closed should fail: ")
+    s = natsConnection_SubscribeSync(&sub, nc, "foo");
+    testCond(s == NATS_CONNECTION_CLOSED);
+
+    test("QueueSubscribe on closed should fail: ")
+    s = natsConnection_QueueSubscribe(&sub, nc, "foo", "bar", _dummyMsgHandler, NULL);
+    testCond(s == NATS_CONNECTION_CLOSED);
+
+    test("QueueSubscribeSync on closed should fail: ")
+    s = natsConnection_QueueSubscribeSync(&sub, nc, "foo", "bar");
+    testCond(s == NATS_CONNECTION_CLOSED);
+
+    test("Request on closed should fail: ")
+    s = natsConnection_Request(&msg, nc, "foo", NULL, 0, 10);
+    testCond(s == NATS_CONNECTION_CLOSED);
+
+    test("NextMsg on closed should fail: ")
+    s = natsSubscription_NextMsg(&msg, goodsub, 10);
+    testCond(s == NATS_CONNECTION_CLOSED);
+
+    test("Unsubscribe on closed should fail: ")
+    s = natsSubscription_Unsubscribe(goodsub);
+    testCond(s == NATS_CONNECTION_CLOSED);
+
+    natsSubscription_Destroy(goodsub);
+    natsConnection_Destroy(nc);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_ConnectVerboseOption(void)
+{
+    natsStatus          s         = NATS_OK;
+    natsConnection      *nc       = NULL;
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    struct threadArg    args;
+
+    s = _createDefaultThreadArgsForCbTests(&args);
+    if (s == NATS_OK)
+    {
+        opts = _createReconnectOptions();
+        if (opts == NULL)
+            s = NATS_ERR;
+    }
+    IFOK(s, natsOptions_SetVerbose(opts, true));
+    IFOK(s, natsOptions_SetReconnectedCB(opts, _reconnectedCb, &args));
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    serverPid = _startServer("nats://127.0.0.1:22222", "-p 22222", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Check connect OK with Verbose option: ");
+
+    s = natsConnection_Connect(&nc, opts);
+    IFOK(s, natsConnection_Flush(nc));
+
+    testCond(s == NATS_OK)
+
+    _stopServer(serverPid);
+    serverPid = _startServer("nats://127.0.0.1:22222", "-p 22222", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Check reconnect OK with Verbose option: ");
+
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && !args.reconnected)
+        s = natsCondition_TimedWait(args.c, args.m, 5000);
+    natsMutex_Unlock(args.m);
+
+    IFOK(s, natsConnection_Flush(nc));
+
+    testCond(s == NATS_OK);
+
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+
+    _destroyDefaultThreadArgs(&args);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_ReconnectThreadLeak(void)
+{
+    natsStatus          s;
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    natsConnection      *nc       = NULL;
+    int                 i;
+    struct threadArg    arg;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", "-a 127.0.0.1 -p 4222", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+
+    opts = _createReconnectOptions();
+    if ((opts == NULL)
+            || (natsOptions_SetURL(opts, "nats://127.0.0.1:4222") != NATS_OK)
+            || (natsOptions_SetDisconnectedCB(opts, _disconnectedCb, (void*) &arg) != NATS_OK)
+            || (natsOptions_SetReconnectedCB(opts, _reconnectedCb, (void*) &arg) != NATS_OK)
+            || (natsOptions_SetClosedCB(opts, _closedCb, (void*) &arg) != NATS_OK))
+    {
+        FAIL("Unable to setup test");
+    }
+
+    test("Connect ok: ");
+    s = natsConnection_Connect(&nc, opts);
+    testCond(s == NATS_OK);
+
+    for (i=0; i<10; i++)
+    {
+        natsMutex_Lock(nc->mu);
+        natsSock_Shutdown(nc->sockCtx.fd);
+        natsMutex_Unlock(nc->mu);
+
+        test("Waiting for disconnect: ");
+        natsMutex_Lock(arg.m);
+        while ((s != NATS_TIMEOUT) && !arg.disconnected)
+            s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+        arg.disconnected = false;
+        natsMutex_Unlock(arg.m);
+        testCond(s == NATS_OK);
+
+        test("Waiting for reconnect: ");
+        natsMutex_Lock(arg.m);
+        while ((s != NATS_TIMEOUT) && !arg.reconnected)
+            s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+        arg.reconnected = false;
+        natsMutex_Unlock(arg.m);
+        testCond(s == NATS_OK);
+    }
+
+    natsConnection_Close(nc);
+    _waitForConnClosed(&arg);
+
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_ReconnectTotalTime(void)
+{
+    natsStatus  s;
+    natsOptions *opts = NULL;
+
+    test("Check reconnect time: ");
+    s = natsOptions_Create(&opts);
+    testCond((s == NATS_OK)
+             && ((opts->maxReconnect * opts->reconnectWait) >= (2 * 60 * 1000)));
+
+    natsOptions_Destroy(opts);
+}
+
+static void
+test_ReconnectDisallowedFlags(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    struct threadArg    arg;
+
+    serverPid = _startServer("nats://127.0.0.1:22222", "-p 22222", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Connect: ");
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    IFOK(s, natsOptions_Create(&opts));
+    IFOK(s, natsOptions_SetURL(opts, "nats://127.0.0.1:22222"));
+    IFOK(s, natsOptions_SetAllowReconnect(opts, false));
+    IFOK(s, natsOptions_SetClosedCB(opts, _closedCb, (void*) &arg));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    testCond(s == NATS_OK);
+
+    _stopServer(serverPid);
+
+    test("Test connection closed CB invoked: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.closed)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    natsOptions_Destroy(opts);
+    natsConnection_Destroy(nc);
+
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+test_ReconnectAllowedFlags(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    struct threadArg    arg;
+
+    serverPid = _startServer("nats://127.0.0.1:22222", "-p 22222", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Create options and connect: ");
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    IFOK(s, natsOptions_Create(&opts));
+    IFOK(s, natsOptions_SetURL(opts, "nats://127.0.0.1:22222"));
+    IFOK(s, natsOptions_SetAllowReconnect(opts, true));
+    IFOK(s, natsOptions_SetMaxReconnect(opts, 2));
+    IFOK(s, natsOptions_SetReconnectWait(opts, 1000));
+    IFOK(s, natsOptions_SetReconnectJitter(opts, 0, 0));
+    IFOK(s, natsOptions_SetClosedCB(opts, _closedCb, (void*) &arg));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    testCond(s == NATS_OK);
+
+    _stopServer(serverPid);
+
+    test("Test reconnecting in progress: ");
+
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.closed)
+        s = natsCondition_TimedWait(arg.c, arg.m, 500);
+    natsMutex_Unlock(arg.m);
+
+    testCond((s == NATS_TIMEOUT)
+             && !arg.disconnected
+             && natsConnection_IsReconnecting(nc));
+
+    natsConnection_Close(nc);
+    natsMutex_Lock(arg.m);
+    s = NATS_OK;
+    while ((s != NATS_TIMEOUT) && !arg.closed)
+        s = natsCondition_TimedWait(arg.c, arg.m, 500);
+    natsMutex_Unlock(arg.m);
+
+    natsOptions_Destroy(opts);
+    natsConnection_Destroy(nc);
+
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+_closeConn(void *arg)
+{
+    natsConnection *nc = (natsConnection*) arg;
+
+    natsConnection_Close(nc);
+}
+
+static void
+test_ConnCloseBreaksReconnectLoop(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsOptions         *opts     = NULL;
+    natsThread          *t        = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s == NATS_OK)
+    {
+        opts = _createReconnectOptions();
+        if (opts == NULL)
+            s = NATS_NO_MEMORY;
+    }
+    IFOK(s, natsOptions_SetMaxReconnect(opts, 1000));
+    IFOK(s, natsOptions_SetClosedCB(opts, _closedCb, &arg));
+    IFOK(s, natsOptions_SetDisconnectedCB(opts, _disconnectedCb, &arg));
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    serverPid = _startServer("nats://127.0.0.1:22222", "-p 22222", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Connection close breaks out reconnect loop: ");
+    s = natsConnection_Connect(&nc, opts);
+    IFOK(s, natsConnection_Flush(nc));
+
+    // Shutdown the server
+    _stopServer(serverPid);
+
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.disconnected)
+        s = natsCondition_TimedWait(arg.c, arg.m, 3000);
+    natsMutex_Unlock(arg.m);
+
+    // Wait a bit before trying to close the connection to make sure
+    // that the reconnect loop has started.
+    nats_Sleep(1000);
+
+    // Close the connection, this should break the reconnect loop.
+    // Do this in a go routine since the issue was that Close()
+    // would block until the reconnect loop is done.
+    s = natsThread_Create(&t, _closeConn, (void*) nc);
+
+    // Even on Windows (where a createConn takes more than a second)
+    // we should be able to break the reconnect loop with the following
+    // timeout.
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.closed)
+        s = natsCondition_TimedWait(arg.c, arg.m, 3000);
+    natsMutex_Unlock(arg.m);
+
+    testCond((s == NATS_OK) && arg.closed);
+
+    if (t != NULL)
+    {
+        natsThread_Join(t);
+        natsThread_Destroy(t);
+    }
+
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+test_BasicReconnectFunctionality(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *sub      = NULL;
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s == NATS_OK)
+    {
+        arg.string = "bar";
+        arg.status = NATS_OK;
+    }
+    if (s == NATS_OK)
+        opts = _createReconnectOptions();
+
+    if ((opts == NULL)
+        || (natsOptions_SetDisconnectedCB(opts, _disconnectedCb, &arg) != NATS_OK)
+        || (natsOptions_SetClosedCB(opts, _closedCb, &arg) != NATS_OK))
+    {
+        FAIL("Unable to create reconnect options!");
+    }
+
+    serverPid = _startServer("nats://127.0.0.1:22222", "-p 22222", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    s = natsConnection_Connect(&nc, opts);
+    IFOK(s, natsConnection_Subscribe(&sub, nc, "foo", _recvTestString, &arg));
+    IFOK(s, natsConnection_Flush(nc));
+
+    _stopServer(serverPid);
+    serverPid = NATS_INVALID_PID;
+
+    test("Disconnected CB invoked: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.disconnected)
+        s = natsCondition_TimedWait(arg.c, arg.m, 500);
+    natsMutex_Unlock(arg.m);
+    testCond((s == NATS_OK) && arg.disconnected);
+
+    test("Publish message: ");
+    s = natsConnection_PublishString(nc, "foo", arg.string);
+    if (s == NATS_OK)
+    {
+        serverPid = _startServer("nats://127.0.0.1:22222", "-p 22222", true);
+        CHECK_SERVER_STARTED(serverPid);
+    }
+    IFOK(s, natsConnection_FlushTimeout(nc, 5000));
+    testCond(s == NATS_OK);
+
+    test("Check message received after reconnect: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.msgReceived)
+        s = natsCondition_TimedWait(arg.c, arg.m, 1500);
+    natsMutex_Unlock(arg.m);
+
+    if (s == NATS_OK)
+        s = arg.status;
+    testCond((s == NATS_OK) && (nc->stats.reconnects == 1));
+
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+
+    _waitForConnClosed(&arg);
+
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(serverPid);
+}
+
+static void
+_doneCb(natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure)
+{
+    struct threadArg *arg = (struct threadArg*) closure;
+
+    natsMutex_Lock(arg->m);
+    arg->done = true;
+    natsCondition_Signal(arg->c);
+    natsMutex_Unlock(arg->m);
+
+    natsMsg_Destroy(msg);
+}
+
+static void
+test_ExtendedReconnectFunctionality(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *sub      = NULL;
+    natsSubscription    *sub2     = NULL;
+    natsSubscription    *sub3     = NULL;
+    natsSubscription    *sub4     = NULL;
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s == NATS_OK)
+    {
+        arg.string = "bar";
+        arg.status = NATS_OK;
+        arg.control=3;
+    }
+    if (s == NATS_OK)
+        opts = _createReconnectOptions();
+
+    if ((opts == NULL)
+        || (natsOptions_SetReconnectedCB(opts, _reconnectedCb, &arg) != NATS_OK)
+        || (natsOptions_SetDisconnectedCB(opts, _disconnectedCb, &arg) != NATS_OK)
+        || (natsOptions_SetClosedCB(opts, _closedCb, &arg) != NATS_OK))
+    {
+        FAIL("Unable to create reconnect options!");
+    }
+
+    serverPid = _startServer("nats://127.0.0.1:22222", "-p 22222", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Setup: ");
+    s = natsConnection_Connect(&nc, opts);
+    IFOK(s, natsConnection_Subscribe(&sub, nc, "foo", _recvTestString, &arg));
+    IFOK(s, natsConnection_Subscribe(&sub2, nc, "foobar", _recvTestString, &arg));
+    IFOK(s, natsConnection_PublishString(nc, "foo", arg.string));
+    IFOK(s, natsConnection_Flush(nc));
+    testCond(s == NATS_OK);
+
+    _stopServer(serverPid);
+    serverPid = NATS_INVALID_PID;
+
+    test("Disconnected CB invoked: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.disconnected)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+    testCond((s == NATS_OK) && arg.disconnected);
+
+    test("Some protos while disconnected: ");
+    // Sub while disconnected
+    s = natsConnection_Subscribe(&sub3, nc, "bar", _recvTestString, &arg);
+
+    // Unsubscribe foo and bar while disconnected
+    IFOK(s, natsSubscription_Unsubscribe(sub2));
+    IFOK(s, natsConnection_PublishString(nc, "foo", arg.string));
+    IFOK(s, natsConnection_PublishString(nc, "bar", arg.string));
+    testCond(s == NATS_OK);
+
+    serverPid = _startServer("nats://127.0.0.1:22222", "-p 22222", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    // Server is restarted, wait for reconnect
+    test("Check reconnected: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.reconnected)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+    testCond((s == NATS_OK) && arg.reconnected);
+
+    test("Publish more: ");
+    s = natsConnection_PublishString(nc, "foobar", arg.string);
+    IFOK(s, natsConnection_PublishString(nc, "foo", arg.string));
+    IFOK(s, natsConnection_Subscribe(&sub4, nc, "done", _doneCb, &arg));
+    IFOK(s, natsConnection_PublishString(nc, "done", "done"));
+    testCond(s == NATS_OK);
+
+    test("Done msg received: ")
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.done)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+    testCond((s == NATS_OK) && arg.done);
+
+    nats_Sleep(50);
+
+    test("All msgs were received: ");
+    testCond(arg.sum == 4);
+
+    natsSubscription_Destroy(sub);
+    natsSubscription_Destroy(sub2);
+    natsSubscription_Destroy(sub3);
+    natsSubscription_Destroy(sub4);;
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+
+    _waitForConnClosed(&arg);
+
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_QueueSubsOnReconnect(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *sub1     = NULL;
+    natsSubscription    *sub2     = NULL;
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s == NATS_OK)
+    {
+        arg.string = "bar";
+        arg.status = NATS_OK;
+        arg.control= 6;
+    }
+    if (s == NATS_OK)
+        opts = _createReconnectOptions();
+
+    if ((opts == NULL)
+        || (natsOptions_SetReconnectedCB(opts, _reconnectedCb, &arg) != NATS_OK))
+    {
+        FAIL("Unable to create reconnect options!");
+    }
+
+    serverPid = _startServer("nats://127.0.0.1:22222", "-p 22222", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    s = natsConnection_Connect(&nc, opts);
+    IFOK(s, natsConnection_QueueSubscribe(&sub1, nc, "foo.bar", "workers",
+                                          _recvTestString, &arg));
+    IFOK(s, natsConnection_QueueSubscribe(&sub2, nc, "foo.bar", "workers",
+                                          _recvTestString, &arg));
+    IFOK(s, natsConnection_Flush(nc));
+
+    for (int i=0; (s == NATS_OK) && (i < 10); i++)
+    {
+        char seq[20];
+
+        snprintf(seq, sizeof(seq), "%d", i);
+        s = natsConnection_PublishString(nc, "foo.bar", seq);
+    }
+
+    IFOK(s, natsConnection_Flush(nc));
+
+    nats_Sleep(50);
+
+    natsMutex_Lock(arg.m);
+    for (int i=0; (s == NATS_OK) && (i<10); i++)
+    {
+        if (arg.results[i] != 1)
+            s = NATS_ERR;
+    }
+    IFOK(s, arg.status);
+
+    memset(&arg.results, 0, sizeof(arg.results));
+    natsMutex_Unlock(arg.m);
+
+    test("Base results: ");
+    testCond(s == NATS_OK);
+
+    _stopServer(serverPid);
+    serverPid = NATS_INVALID_PID;
+
+    serverPid = _startServer("nats://127.0.0.1:22222", "-p 22222", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Reconnects: ")
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.reconnected)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+    testCond((s == NATS_OK) && arg.reconnected);
+
+    for (int i=0; (s == NATS_OK) && (i < 10); i++)
+    {
+        char seq[20];
+
+        snprintf(seq, sizeof(seq), "%d", i);
+        s = natsConnection_PublishString(nc, "foo.bar", seq);
+    }
+
+    IFOK(s, natsConnection_Flush(nc));
+
+    nats_Sleep(50);
+
+    natsMutex_Lock(arg.m);
+    for (int i=0; (s == NATS_OK) && (i<10); i++)
+    {
+        if (arg.results[i] != 1)
+            s = NATS_ERR;
+    }
+    IFOK(s, arg.status);
+
+    memset(&arg.results, 0, sizeof(arg.results));
+    natsMutex_Unlock(arg.m);
+
+    test("Reconnect results: ");
+    testCond(s == NATS_OK);
+
+    natsSubscription_Destroy(sub1);
+    natsSubscription_Destroy(sub2);
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_IsClosed(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+
+    serverPid = _startServer("nats://127.0.0.1:22222", "-p 22222", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    s = natsConnection_ConnectTo(&nc, "nats://127.0.0.1:22222");
+    test("Check IsClosed is correct: ");
+    testCond((s == NATS_OK) && !natsConnection_IsClosed(nc));
+
+    _stopServer(serverPid);
+    serverPid = NATS_INVALID_PID;
+
+    test("Check IsClosed after server shutdown: ");
+    testCond((s == NATS_OK) && !natsConnection_IsClosed(nc));
+
+    serverPid = _startServer("nats://127.0.0.1:22222", "-p 22222", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Check IsClosed after server restart: ");
+    testCond((s == NATS_OK) && !natsConnection_IsClosed(nc));
+
+    natsConnection_Close(nc);
+    test("Check IsClosed after connection closed: ");
+    testCond((s == NATS_OK) && natsConnection_IsClosed(nc));
+
+    natsConnection_Destroy(nc);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_IsReconnectingAndStatus(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    struct threadArg    arg;
+
+    serverPid = _startServer("nats://127.0.0.1:22222", "-p 22222", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Check reconnecting state: ");
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    IFOK(s, natsOptions_Create(&opts));
+    IFOK(s, natsOptions_SetURL(opts, "nats://127.0.0.1:22222"));
+    IFOK(s, natsOptions_SetAllowReconnect(opts, true));
+    IFOK(s, natsOptions_SetMaxReconnect(opts, 10000));
+    IFOK(s, natsOptions_SetReconnectWait(opts, 100));
+    IFOK(s, natsOptions_SetReconnectJitter(opts, 0, 0));
+    IFOK(s, natsOptions_SetDisconnectedCB(opts, _disconnectedCb, (void*) &arg));
+    IFOK(s, natsOptions_SetReconnectedCB(opts, _reconnectedCb, (void*) &arg));
+    IFOK(s, natsOptions_SetClosedCB(opts, _closedCb, (void*) &arg));
+
+    // Connect, verify initial reconnecting state check, then stop the server
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    testCond((s == NATS_OK) && !natsConnection_IsReconnecting(nc));
+
+    test("Check status: ");
+    testCond((s == NATS_OK) && (natsConnection_Status(nc) == NATS_CONN_STATUS_CONNECTED));
+
+    _stopServer(serverPid);
+    serverPid = NATS_INVALID_PID;
+
+    // Wait until we get the disconnected callback
+    test("Check we are disconnected: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.disconnected)
+        s = natsCondition_TimedWait(arg.c, arg.m, 1000);
+    natsMutex_Unlock(arg.m);
+    testCond((s == NATS_OK) && arg.disconnected);
+
+    test("Check IsReconnecting is correct: ");
+    testCond(natsConnection_IsReconnecting(nc));
+
+    test("Check Status is correct: ");
+    testCond(natsConnection_Status(nc) == NATS_CONN_STATUS_RECONNECTING);
+
+    serverPid = _startServer("nats://127.0.0.1:22222", "-p 22222", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    // Wait until we get the reconnect callback
+    test("Check we are reconnected: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.reconnected)
+        s = natsCondition_TimedWait(arg.c, arg.m, 1000);
+    natsMutex_Unlock(arg.m);
+    testCond((s == NATS_OK) && arg.reconnected);
+
+    test("Check IsReconnecting is correct: ");
+    testCond(!natsConnection_IsReconnecting(nc));
+
+    test("Check Status is correct: ");
+    testCond(natsConnection_Status(nc) == NATS_CONN_STATUS_CONNECTED);
+
+    // Close the connection, reconnecting should still be false
+    natsConnection_Close(nc);
+
+    test("Check IsReconnecting is correct: ");
+    testCond(!natsConnection_IsReconnecting(nc));
+
+    test("Check Status is correct: ");
+    testCond(natsConnection_Status(nc) == NATS_CONN_STATUS_CLOSED);
+
+    natsMutex_Lock(arg.m);
+    while (!arg.closed)
+        natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+
+    natsOptions_Destroy(opts);
+    natsConnection_Destroy(nc);
+
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_ReconnectBufSize(void)
+{
+    natsStatus          s         = NATS_OK;
+    natsConnection      *nc       = NULL;
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s == NATS_OK)
+    {
+        opts = _createReconnectOptions();
+        if (opts == NULL)
+            s = NATS_ERR;
+    }
+    if (s == NATS_OK)
+        s = natsOptions_SetDisconnectedCB(opts, _disconnectedCb, &arg);
+
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    test("Option invalid settings. NULL options: ");
+    s = natsOptions_SetReconnectBufSize(NULL, 1);
+    testCond(s != NATS_OK);
+
+    test("Option invalid settings. Negative value: ");
+    s = natsOptions_SetReconnectBufSize(opts, -1);
+    testCond(s != NATS_OK);
+
+    test("Option valid settings. Zero: ");
+    s = natsOptions_SetReconnectBufSize(opts, 0);
+    testCond(s == NATS_OK);
+
+    serverPid = _startServer("nats://127.0.0.1:22222", "-p 22222", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    // For this test, set to a low value.
+    s = natsOptions_SetReconnectBufSize(opts, 32);
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    IFOK(s, natsConnection_Flush(nc));
+
+    _stopServer(serverPid);
+
+    // Wait until we get the disconnected callback
+    test("Check we are disconnected: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.disconnected)
+        s = natsCondition_TimedWait(arg.c, arg.m, 1000);
+    natsMutex_Unlock(arg.m);
+    testCond((s == NATS_OK) && arg.disconnected);
+
+    // Publish 2 messages, they should be accepted
+    test("Can publish while server is down: ");
+    s = natsConnection_PublishString(nc, "foo", "abcd");
+    IFOK(s, natsConnection_PublishString(nc, "foo", "abcd"));
+    testCond(s == NATS_OK);
+
+    // This publish should fail
+    test("Exhausted buffer should return an error: ");
+    s = natsConnection_PublishString(nc, "foo", "abcd");
+    testCond(s == NATS_INSUFFICIENT_BUFFER);
+
+    natsOptions_Destroy(opts);
+    natsConnection_Destroy(nc);
+
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+_startServerForRetryOnConnect(void *closure)
+{
+    struct threadArg *arg = (struct threadArg*) closure;
+    natsPid           pid = NATS_INVALID_PID;
+
+    // Delay start a bit...
+    nats_Sleep(300);
+
+    pid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    natsMutex_Lock(arg->m);
+    while (!arg->done)
+        natsCondition_Wait(arg->c, arg->m);
+    natsMutex_Unlock(arg->m);
+
+    _stopServer(pid);
+}
+
+static void
+_connectedCb(natsConnection *nc, void* closure)
+{
+    struct threadArg *arg = (struct threadArg*) closure;
+
+    natsMutex_Lock(arg->m);
+    arg->connected = true;
+    natsCondition_Broadcast(arg->c);
+    natsMutex_Unlock(arg->m);
+}
+
+static int64_t
+_testCustomReconnectDelayOnInitialConnect(natsConnection *nc, int attempts, void *closure)
+{
+    if (attempts == 10)
+        natsConnection_Close(nc);
+    return 50;
+}
+
+static void
+test_RetryOnFailedConnect(void)
+{
+    natsStatus          s;
+    natsConnection      *nc   = NULL;
+    natsOptions         *opts = NULL;
+    int64_t             start = 0;
+    int64_t             end   = 0;
+    natsThread          *t    = NULL;
+    natsSubscription    *sub  = NULL;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    IFOK(s, natsOptions_Create(&opts));
+    IFOK(s, natsOptions_SetRetryOnFailedConnect(opts, true, NULL, NULL));
+    IFOK(s, natsOptions_SetMaxReconnect(opts, 10));
+    IFOK(s, natsOptions_SetReconnectWait(opts, 100));
+    IFOK(s, natsOptions_SetReconnectJitter(opts, 0, 0));
+#ifdef _WIN32
+    // Windows takes the full timeout to report connect failure, so reduce
+    // timeout here.
+    IFOK(s, natsOptions_SetTimeout(opts, 100));
+#endif
+    if (s != NATS_OK)
+    {
+        natsOptions_Destroy(opts);
+        _destroyDefaultThreadArgs(&arg);
+        FAIL("Unable to setup test");
+    }
+
+    start = nats_Now();
+    test("Connect failed: ");
+    s = natsConnection_Connect(&nc, opts);
+    end = nats_Now();
+    testCond(s == NATS_NO_SERVER);
+
+    test("Retried: ")
+#ifdef _WIN32
+    testCond((((end-start) >= 1000) && ((end-start) <= 2800)));
+#else
+    testCond((((end-start) >= 300) && ((end-start) <= 1500)));
+#endif
+
+    test("Connects ok: ");
+    s = natsOptions_SetMaxReconnect(opts, 20);
+    IFOK(s, natsThread_Create(&t, _startServerForRetryOnConnect, (void*) &arg));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    testCond(s == NATS_OK);
+
+    // close to avoid reconnect when shutting down server.
+    natsConnection_Close(nc);
+
+    natsMutex_Lock(arg.m);
+    arg.done = true;
+    natsCondition_Signal(arg.c);
+    natsMutex_Unlock(arg.m);
+
+    natsThread_Join(t);
+    natsThread_Destroy(t);
+    t = NULL;
+
+    natsConnection_Destroy(nc);
+    nc = NULL;
+
+    // Try with async connect
+    test("Connect does not block: ");
+    s = natsOptions_SetRetryOnFailedConnect(opts, true, _connectedCb, (void*)&arg);
+    // Set disconnected/reconnected to make sure that these are not
+    // invoked as part of async connect.
+    IFOK(s, natsOptions_SetDisconnectedCB(opts, _disconnectedCb, (void*) &arg));
+    IFOK(s, natsOptions_SetReconnectedCB(opts, _reconnectedCb, (void*) &arg));
+    IFOK(s, natsOptions_SetMaxReconnect(opts, -1));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    testCond((s == NATS_NOT_YET_CONNECTED) && (nc != NULL));
+    nats_clearLastError();
+
+    test("Subscription ok: ");
+    arg.control = 99;
+    s = natsConnection_Subscribe(&sub, nc, "foo", _recvTestString, (void*)&arg);
+    testCond(s == NATS_OK);
+
+    test("Publish ok: ");
+    s = natsConnection_Publish(nc, "foo", (const void*) "hello", 5);
+    testCond(s == NATS_OK);
+
+    // Start server
+    arg.done = false;
+    s = natsThread_Create(&t, _startServerForRetryOnConnect, (void*) &arg);
+
+    test("Connected: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.connected)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    test("No disconnected and reconnected callbacks: ");
+    natsMutex_Lock(arg.m);
+    s = ((arg.disconnected || arg.reconnected) ? NATS_ERR : NATS_OK);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    test("Message received: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.msgReceived)
+        s = natsCondition_TimedWait(arg.c, arg.m, 5000);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    // Close nc to avoid reconnect when shutting down server
+    natsConnection_Close(nc);
+
+    natsMutex_Lock(arg.m);
+    arg.done = true;
+    natsCondition_Broadcast(arg.c);
+    natsMutex_Unlock(arg.m);
+
+    natsThread_Join(t);
+    natsThread_Destroy(t);
+
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+    nc = NULL;
+
+    // Try the custom reconnect handler and close the connection after
+    // certain number of attempts.
+    test("Close in custom reconnect delay: ")
+    s = natsOptions_SetClosedCB(opts, _closedCb, (void*) &arg);
+    IFOK(s, natsOptions_SetCustomReconnectDelay(opts, _testCustomReconnectDelayOnInitialConnect, NULL));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    if (s == NATS_NOT_YET_CONNECTED)
+        s = NATS_OK;
+
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.closed)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+_closeConnWithDelay(void *arg)
+{
+    natsConnection *nc = (natsConnection*) arg;
+
+    nats_Sleep(200);
+    natsConnection_Close(nc);
+}
+
+static void
+_connectToMockupServer(void *closure)
+{
+    struct threadArg    *arg = (struct threadArg *) closure;
+    natsConnection      *nc = NULL;
+    natsOptions         *opts = arg->opts;
+    natsStatus          s = NATS_OK;
+    int                 control;
+
+    // Make sure that the server is ready to accept our connection.
+    nats_Sleep(100);
+
+    if (opts == NULL)
+    {
+        s = natsOptions_Create(&opts);
+        IFOK(s, natsOptions_SetAllowReconnect(opts, false));
+    }
+    IFOK(s, natsConnection_Connect(&nc, opts));
+
+    natsOptions_Destroy(opts);
+
+    natsMutex_Lock(arg->m);
+    control = arg->control;
+    natsMutex_Unlock(arg->m);
+
+    if (control == 2)
+    {
+        int64_t payload = 0;
+
+        if (s == NATS_OK)
+        {
+            test("Check expected max payload: ")
+            payload = natsConnection_GetMaxPayload(nc);
+            if (payload != 10)
+                s = NATS_ERR;
+            testCondNoReturn(s == NATS_OK);
+        }
+        if (s == NATS_OK)
+        {
+            test("Expect getting an error when publish more than max payload: ");
+            s = natsConnection_PublishString(nc, "hello", "Hello World!");
+            testCondNoReturn(s != NATS_OK);
+
+            // reset status
+            s = NATS_OK;
+        }
+        if (s == NATS_OK)
+        {
+            test("Expect success if publishing less than max payload: ");
+            s = natsConnection_PublishString(nc, "hello", "a");
+            testCondNoReturn(s == NATS_OK);
+        }
+
+        natsMutex_Lock(arg->m);
+        arg->closed = true;
+        natsCondition_Signal(arg->c);
+        natsMutex_Unlock(arg->m);
+    }
+    else if (control == 3)
+    {
+        natsThread *t = NULL;
+
+        s = natsThread_Create(&t, _closeConnWithDelay, (void*) nc);
+        if (s == NATS_OK)
+        {
+            s = natsConnection_Flush(nc);
+
+            natsThread_Join(t);
+            natsThread_Destroy(t);
+        }
+    }
+    else if (control == 4)
+    {
+        s = natsConnection_Flush(nc);
+    }
+    else if ((control == 5) || (control == 6))
+    {
+        // Wait for disconnect Cb
+        natsMutex_Lock(arg->m);
+        while ((s != NATS_TIMEOUT) && !arg->disconnected)
+            s = natsCondition_TimedWait(arg->c, arg->m, 5000);
+        natsMutex_Unlock(arg->m);
+
+        if ((s == NATS_OK) && (control == 5))
+        {
+            // Should reconnect
+            natsMutex_Lock(arg->m);
+            while ((s != NATS_TIMEOUT) && !arg->reconnected)
+                s = natsCondition_TimedWait(arg->c, arg->m, 5000);
+            natsMutex_Unlock(arg->m);
+
+            natsConnection_Close(nc);
+        }
+        else if (s == NATS_OK)
+        {
+            // Wait that we are closed, then check nc's last error.
+            natsMutex_Lock(arg->m);
+            while ((s != NATS_TIMEOUT) && !arg->closed)
+                s = natsCondition_TimedWait(arg->c, arg->m, 5000);
+            natsMutex_Unlock(arg->m);
+            if (s == NATS_OK)
+            {
+                const char* lastErr = NULL;
+
+                s = natsConnection_GetLastError(nc, &lastErr);
+                if (strcmp(lastErr, arg->string) != 0)
+                    s = NATS_ILLEGAL_STATE;
+            }
+        }
+    }
+    else if (control == 7)
+    {
+        natsMutex_Lock(arg->m);
+        while ((s != NATS_TIMEOUT) && !arg->done)
+            s = natsCondition_TimedWait(arg->c, arg->m, 5000);
+        natsMutex_Unlock(arg->m);
+    }
+
+    natsConnection_Destroy(nc);
+
+    natsMutex_Lock(arg->m);
+    arg->status = s;
+    natsCondition_Signal(arg->c);
+    natsMutex_Unlock(arg->m);
+}
+
+static natsStatus
+_startMockupServer(natsSock *serverSock, const char *host, const char *port)
+{
+    struct addrinfo     hints;
+    struct addrinfo     *servinfo = NULL;
+    int                 res;
+    natsStatus          s = NATS_OK;
+    natsSock            sock = NATS_SOCK_INVALID;
+
+    memset(&hints,0,sizeof(hints));
+
+    hints.ai_family   = AF_INET;
+    hints.ai_socktype = SOCK_STREAM;
+    hints.ai_protocol = IPPROTO_TCP;
+    hints.ai_flags    = AI_PASSIVE;
+
+    if ((res = getaddrinfo(host, port, &hints, &servinfo)) != 0)
+    {
+         hints.ai_family = AF_INET6;
+
+         if ((res = getaddrinfo(host, port, &hints, &servinfo)) != 0)
+             s = NATS_SYS_ERROR;
+    }
+    if (s == NATS_OK)
+    {
+        sock = socket(servinfo->ai_family, servinfo->ai_socktype,
+                      servinfo->ai_protocol);
+        if (sock == NATS_SOCK_INVALID)
+            s = NATS_SYS_ERROR;
+
+        IFOK(s, natsSock_SetCommonTcpOptions(sock));
+        IFOK(s, natsSock_SetBlocking(sock, true));
+    }
+    if ((s == NATS_OK)
+        && (bind(sock, servinfo->ai_addr, (natsSockLen) servinfo->ai_addrlen) == NATS_SOCK_ERROR))
+    {
+        s = NATS_SYS_ERROR;
+    }
+
+    if ((s == NATS_OK) && (listen(sock, 100) == NATS_SOCK_ERROR))
+        s = NATS_SYS_ERROR;
+
+    if (s == NATS_OK)
+        *serverSock = sock;
+    else
+        natsSock_Close(sock);
+
+    nats_FreeAddrInfo(servinfo);
+
+    return s;
+}
+
+static void
+test_ErrOnConnectAndDeadlock(void)
+{
+    natsStatus          s = NATS_OK;
+    natsSock            sock = NATS_SOCK_INVALID;
+    natsThread          *t = NULL;
+    struct threadArg    arg;
+    natsSockCtx         ctx;
+
+    memset(&ctx, 0, sizeof(natsSockCtx));
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s != NATS_OK)
+        FAIL("@@ Unable to setup test!");
+
+    arg.control = 1;
+
+    test("Verify that bad INFO does not cause deadlock in client: ");
+
+    // We will hand run a fake server that will timeout and not return a proper
+    // INFO proto. This is to test that we do not deadlock.
+
+    s = _startMockupServer(&sock, "localhost", "4222");
+
+    // Start the thread that will try to connect to our server...
+    IFOK(s, natsThread_Create(&t, _connectToMockupServer, (void*) &arg));
+
+    if ((s == NATS_OK)
+        && (((ctx.fd = accept(sock, NULL, NULL)) == NATS_SOCK_INVALID)
+            || (natsSock_SetCommonTcpOptions(ctx.fd) != NATS_OK)))
+    {
+        s = NATS_SYS_ERROR;
+    }
+
+    if (s == NATS_OK)
+    {
+        const char* badInfo = "INFOZ \r\n";
+
+        // Send back a mal-formed INFO.
+        s = natsSock_WriteFully(&ctx, badInfo, (int) strlen(badInfo));
+    }
+
+    if (s == NATS_OK)
+    {
+        natsMutex_Lock(arg.m);
+
+        while ((s != NATS_TIMEOUT) && (arg.status == NATS_OK))
+            s = natsCondition_TimedWait(arg.c, arg.m, 3000);
+
+        natsMutex_Unlock(arg.m);
+    }
+
+    if (t != NULL)
+    {
+        natsThread_Join(t);
+        natsThread_Destroy(t);
+    }
+
+    testCond((s == NATS_OK) && (arg.status != NATS_OK));
+
+    _destroyDefaultThreadArgs(&arg);
+
+    natsSock_Close(ctx.fd);
+    natsSock_Close(sock);
+}
+
+static void
+test_ErrOnMaxPayloadLimit(void)
+{
+    natsStatus          s = NATS_OK;
+    natsSock            sock = NATS_SOCK_INVALID;
+    natsThread          *t = NULL;
+    int                 expectedMaxPayLoad = 10;
+    struct threadArg    arg;
+    natsSockCtx         ctx;
+
+    memset(&ctx, 0, sizeof(natsSockCtx));
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s != NATS_OK)
+        FAIL("@@ Unable to setup test!");
+
+    arg.control = 2;
+
+    s = _startMockupServer(&sock, "localhost", "4222");
+
+    if ((s == NATS_OK) && (listen(sock, 100) == NATS_SOCK_ERROR))
+        s = NATS_SYS_ERROR;
+
+    // Start the thread that will try to connect to our server...
+    IFOK(s, natsThread_Create(&t, _connectToMockupServer, (void*) &arg));
+
+    if ((s == NATS_OK)
+        && (((ctx.fd = accept(sock, NULL, NULL)) == NATS_SOCK_INVALID)
+            || (natsSock_SetCommonTcpOptions(ctx.fd) != NATS_OK)))
+    {
+        s = NATS_SYS_ERROR;
+    }
+    if (s == NATS_OK)
+    {
+        char info[1024];
+
+        snprintf(info, sizeof(info),
+                 "INFO {\"server_id\":\"foobar\",\"version\":\"latest\",\"go\":\"latest\",\"host\":\"localhost\",\"port\":4222,\"auth_required\":false,\"tls_required\":false,\"max_payload\":%d}\r\n",
+                 expectedMaxPayLoad);
+
+        // Send INFO.
+        s = natsSock_WriteFully(&ctx, info, (int) strlen(info));
+        if (s == NATS_OK)
+        {
+            char buffer[1024];
+
+            memset(buffer, 0, sizeof(buffer));
+
+            // Read connect and ping commands sent from the client
+            s = natsSock_ReadLine(&ctx, buffer, sizeof(buffer));
+            IFOK(s, natsSock_ReadLine(&ctx, buffer, sizeof(buffer)));
+        }
+        // Send PONG
+        IFOK(s, natsSock_WriteFully(&ctx, _PONG_PROTO_, _PONG_PROTO_LEN_));
+    }
+
+    // Wait for the client to be about to close the connection.
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.closed)
+        s = natsCondition_TimedWait(arg.c, arg.m, 3000);
+    natsMutex_Unlock(arg.m);
+
+    natsSock_Close(ctx.fd);
+    natsSock_Close(sock);
+
+    // Wait for the client to finish.
+    if (t != NULL)
+    {
+        natsThread_Join(t);
+        natsThread_Destroy(t);
+    }
+
+    test("Test completed ok: ");
+    testCond(s == NATS_OK);
+
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+test_Auth(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    natsOptions         *opts     = NULL;
+
+    test("Server with auth on, client without should fail: ");
+
+    serverPid = _startServer("nats://127.0.0.1:8232", "--user ivan --pass foo -p 8232", false);
+    CHECK_SERVER_STARTED(serverPid);
+
+    nats_Sleep(1000);
+
+    s = natsConnection_ConnectTo(&nc, "nats://127.0.0.1:8232");
+    testCond((s == NATS_CONNECTION_AUTH_FAILED)
+             && (nats_strcasestr(nats_GetLastError(NULL), "Authorization Violation") != NULL));
+
+    test("Server with auth on, client with proper auth should succeed: ");
+
+    s = natsConnection_ConnectTo(&nc, "nats://ivan:foo@127.0.0.1:8232");
+    testCond(s == NATS_OK);
+
+    natsConnection_Destroy(nc);
+    nc = NULL;
+
+    // Use Options
+    test("Connect using SetUserInfo: ");
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_SetURL(opts, "nats://127.0.0.1:8232"));
+    IFOK(s, natsOptions_SetUserInfo(opts, "ivan", "foo"));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    testCond(s == NATS_OK);
+    natsConnection_Destroy(nc);
+    nc = NULL;
+
+    // Verify that credentials in URL take precedence.
+    test("URL takes precedence: ");
+    s = natsOptions_SetURL(opts, "nats://ivan:foo@127.0.0.1:8232");
+    IFOK(s, natsOptions_SetUserInfo(opts, "foo", "bar"));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    testCond(s == NATS_OK);
+
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_AuthFailNoDisconnectCB(void)
+{
+    natsStatus          s;
+    natsOptions         *opts     = NULL;
+    natsConnection      *nc       = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    serverPid = _startServer("nats://127.0.0.1:8232", "--user ivan --pass foo -p 8232", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    opts = _createReconnectOptions();
+    if (opts == NULL)
+        FAIL("Unable to create options!");
+
+    test("Connect should fail: ");
+    s = natsOptions_SetDisconnectedCB(opts, _disconnectedCb, &arg);
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    testCond(s != NATS_OK);
+
+    test("DisconnectCb should not be invoked on auth failure: ");
+    natsMutex_Lock(arg.m);
+    s = NATS_OK;
+    while ((s != NATS_TIMEOUT) && !arg.disconnected)
+        s = natsCondition_TimedWait(arg.c, arg.m, 1000);
+    natsMutex_Unlock(arg.m);
+    testCond((s == NATS_TIMEOUT) && !arg.disconnected);
+
+    natsOptions_Destroy(opts);
+    natsConnection_Destroy(nc);
+
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_AuthToken(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    natsOptions         *opts     = NULL;
+
+    serverPid = _startServer("nats://testSecret@127.0.0.1:8232", "-auth testSecret -p 8232", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Server with token authorization, client without should fail: ");
+    s = natsConnection_ConnectTo(&nc, "nats://127.0.0.1:8232");
+    testCond(s != NATS_OK);
+
+    test("Server with token authorization, client with proper auth should succeed: ");
+    s = natsConnection_ConnectTo(&nc, "nats://testSecret@127.0.0.1:8232");
+    testCond(s == NATS_OK);
+
+    natsConnection_Destroy(nc);
+    nc = NULL;
+
+    // Use Options
+    test("Connect using SetUserInfo: ");
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_SetURL(opts, "nats://127.0.0.1:8232"));
+    IFOK(s, natsOptions_SetToken(opts, "testSecret"));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    testCond(s == NATS_OK);
+    natsConnection_Destroy(nc);
+    nc = NULL;
+
+    // Verify that token in URL take precedence.
+    test("URL takes precedence: ");
+    s = natsOptions_SetURL(opts, "nats://testSecret@127.0.0.1:8232");
+    IFOK(s, natsOptions_SetToken(opts, "badtoken"));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    testCond(s == NATS_OK);
+
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+
+    _stopServer(serverPid);
+}
+
+static const char*
+_tokenHandler(void* closure)
+{
+    return (char*) closure;
+}
+
+static void
+test_AuthTokenHandler(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    natsOptions         *opts     = NULL;
+
+    serverPid = _startServer("nats://testSecret@127.0.0.1:8232", "-auth testSecret -p 8232", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Connect using SetTokenHandler: ");
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_SetURL(opts, "nats://127.0.0.1:8232"));
+    IFOK(s, natsOptions_SetTokenHandler(opts, _tokenHandler, (char*) "testSecret"));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    testCond(s == NATS_OK);
+    natsConnection_Destroy(nc);
+    nc = NULL;
+
+    test("cannot set a tokenHandler when token set: ");
+    s = natsOptions_SetTokenHandler(opts, NULL, NULL);
+    IFOK(s, natsOptions_SetToken(opts, "token"));
+    IFOK(s, natsOptions_SetTokenHandler(opts, _tokenHandler, (char*) "testSecret"));
+    testCond(s == NATS_ILLEGAL_STATE);
+
+    test("cannot set a token when tokenHandler set: ");
+    s = natsOptions_SetToken(opts, NULL);
+    IFOK(s, natsOptions_SetTokenHandler(opts, _tokenHandler, (char*) "testSecret"));
+    IFOK(s, natsOptions_SetToken(opts, "token"));
+    testCond(s == NATS_ILLEGAL_STATE);
+
+    test("token in URL not valid with tokenHandler: ");
+    s = natsOptions_SetURL(opts, "nats://testSecret@127.0.0.1:8232");
+    IFOK(s, natsOptions_SetTokenHandler(opts, _dummyTokenHandler, NULL));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    testCond(s == NATS_ILLEGAL_STATE);
+
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+
+    _stopServer(serverPid);
+}
+
+static void
+_permsViolationHandler(natsConnection *nc, natsSubscription *sub, natsStatus err, void *closure)
+{
+    struct threadArg *args      = (struct threadArg*) closure;
+    const char       *lastError = NULL;
+
+    // Technically, there is no guarantee that the connection's last error
+    // be still the one that is given to this callback.
+    if (err == NATS_NOT_PERMITTED)
+    {
+        bool ok = true;
+
+        // So consider ok if currently not the same or if the same, the
+        // error string is as expected.
+        if (natsConnection_GetLastError(nc, &lastError) == NATS_NOT_PERMITTED)
+            ok = (nats_strcasestr(lastError, args->string) != NULL ? true : false);
+
+        if (ok)
+        {
+            natsMutex_Lock(args->m);
+            args->done = true;
+            natsCondition_Broadcast(args->c);
+            natsMutex_Unlock(args->m);
+        }
+    }
+}
+
+static void
+test_PermViolation(void)
+{
+    natsStatus          s;
+    natsConnection      *conn = NULL;
+    natsSubscription    *sub  = NULL;
+    natsOptions         *opts = NULL;
+    natsPid             pid   = NATS_INVALID_PID;
+    int                 i;
+    bool                cbCalled;
+    struct threadArg    args;
+
+    s = _createDefaultThreadArgsForCbTests(&args);
+    if (s == NATS_OK)
+    {
+        args.string = PERMISSIONS_ERR;
+        s = natsOptions_Create(&opts);
+    }
+    IFOK(s, natsOptions_SetURL(opts, "nats://ivan:pwd@127.0.0.1:8232"));
+    IFOK(s, natsOptions_SetErrorHandler(opts, _permsViolationHandler, &args));
+    if (s != NATS_OK)
+        FAIL("Error setting up test");
+
+    pid = _startServer("nats://127.0.0.1:8232", "-c permissions.conf -a 127.0.0.1 -p 8232", false);
+    CHECK_SERVER_STARTED(pid);
+    s = _checkStart("nats://ivan:pwd@127.0.0.1:8232", 4, 10);
+    if (s != NATS_OK)
+    {
+        _stopServer(pid);
+        FAIL("Error starting server!");
+    }
+    test("Check connection created: ");
+    s = natsConnection_Connect(&conn, opts);
+    testCond(s == NATS_OK);
+
+    for (i=0; i<2; i++)
+    {
+        cbCalled = false;
+
+        test("Should get perm violation: ");
+        if (i == 0)
+            s = natsConnection_PublishString(conn, "bar", "fail");
+        else
+            s = natsConnection_Subscribe(&sub, conn, "foo", _dummyMsgHandler, NULL);
+
+        if (s == NATS_OK)
+        {
+            natsMutex_Lock(args.m);
+            while (!args.done && s == NATS_OK)
+                s = natsCondition_TimedWait(args.c, args.m, 2000);
+            cbCalled = args.done;
+            args.done = false;
+            natsMutex_Unlock(args.m);
+        }
+        testCond((s == NATS_OK) && cbCalled);
+    }
+
+    test("Connection not closed: ");
+    testCond((s == NATS_OK) && !natsConnection_IsClosed(conn));
+
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(conn);
+    natsOptions_Destroy(opts);
+
+    _destroyDefaultThreadArgs(&args);
+
+    _stopServer(pid);
+}
+
+static void
+_authViolationHandler(natsConnection *nc, natsSubscription *sub, natsStatus err, void *closure)
+{
+    struct threadArg *args      = (struct threadArg*) closure;
+    const char       *lastError = NULL;
+
+    // Technically, there is no guarantee that the connection's last error
+    // be still the one that is given to this callback.
+    if (err == NATS_CONNECTION_AUTH_FAILED)
+    {
+        bool ok = true;
+
+        // So consider ok if currently not the same or if the same, the
+        // error string is as expected.
+        if (natsConnection_GetLastError(nc, &lastError) == NATS_CONNECTION_AUTH_FAILED)
+            ok = (nats_strcasestr(nc->errStr, AUTHORIZATION_ERR) != NULL ? true : false);
+        if (ok)
+        {
+            natsMutex_Lock(args->m);
+            args->results[0]++;
+            args->done = true;
+            natsCondition_Broadcast(args->c);
+            natsMutex_Unlock(args->m);
+        }
+    }
+}
+
+static void
+test_AuthViolation(void)
+{
+    natsStatus          s = NATS_OK;
+    natsSock            sock = NATS_SOCK_INVALID;
+    natsThread          *t = NULL;
+    struct threadArg    arg;
+    natsSockCtx         ctx;
+
+    memset(&ctx, 0, sizeof(natsSockCtx));
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    IFOK(s, natsOptions_Create(&(arg.opts)));
+    IFOK(s, natsOptions_SetAllowReconnect(arg.opts, false));
+    IFOK(s, natsOptions_SetErrorHandler(arg.opts, _authViolationHandler, &arg));
+    IFOK(s, natsOptions_SetClosedCB(arg.opts, _closedCb, &arg));
+    if (s != NATS_OK)
+        FAIL("@@ Unable to setup test!");
+
+    arg.control = 7;
+    arg.string  = AUTHORIZATION_ERR;
+
+    test("Behavior of connection on Server Error: ")
+
+    s = _startMockupServer(&sock, "localhost", "4222");
+
+    // Start the thread that will try to connect to our server...
+    IFOK(s, natsThread_Create(&t, _connectToMockupServer, (void*) &arg));
+
+    if ((s == NATS_OK)
+        && (((ctx.fd = accept(sock, NULL, NULL)) == NATS_SOCK_INVALID)
+            || (natsSock_SetCommonTcpOptions(ctx.fd) != NATS_OK)))
+    {
+        s = NATS_SYS_ERROR;
+    }
+    if (s == NATS_OK)
+    {
+        char info[1024];
+
+        strncpy(info,
+                "INFO {\"server_id\":\"foobar\",\"version\":\"latest\",\"go\":\"latest\",\"host\":\"localhost\",\"port\":4222,\"auth_required\":false,\"tls_required\":false,\"max_payload\":1048576}\r\n",
+                sizeof(info));
+
+        // Send INFO.
+        s = natsSock_WriteFully(&ctx, info, (int) strlen(info));
+        if (s == NATS_OK)
+        {
+            char buffer[1024];
+
+            memset(buffer, 0, sizeof(buffer));
+
+            // Read connect and ping commands sent from the client
+            s = natsSock_ReadLine(&ctx, buffer, sizeof(buffer));
+            IFOK(s, natsSock_ReadLine(&ctx, buffer, sizeof(buffer)));
+        }
+        // Send PONG
+        IFOK(s, natsSock_WriteFully(&ctx,
+                                    _PONG_PROTO_, _PONG_PROTO_LEN_));
+
+        if (s == NATS_OK)
+        {
+            // Wait a tiny, and simulate an error sent by the server
+            nats_Sleep(50);
+
+            snprintf(info, sizeof(info), "-ERR '%s'\r\n", arg.string);
+            s = natsSock_WriteFully(&ctx, info, (int)strlen(info));
+        }
+    }
+    if (s == NATS_OK)
+    {
+        // Wait for the client to process the async err
+        natsMutex_Lock(arg.m);
+        while ((s != NATS_TIMEOUT) && !arg.done)
+            s = natsCondition_TimedWait(arg.c, arg.m, 5000);
+        natsMutex_Unlock(arg.m);
+
+        natsSock_Close(ctx.fd);
+    }
+
+    natsSock_Close(sock);
+
+    // Wait for the client to finish.
+    if (t != NULL)
+    {
+        natsThread_Join(t);
+        natsThread_Destroy(t);
+    }
+
+    // Wait for closed CB
+    if (s == NATS_OK)
+    {
+        natsMutex_Lock(arg.m);
+        while ((s != NATS_TIMEOUT) && !arg.closed)
+            s = natsCondition_TimedWait(arg.c, arg.m, 5000);
+        if ((s == NATS_OK) && arg.reconnects != 0)
+            s = NATS_ERR;
+        natsMutex_Unlock(arg.m);
+    }
+    testCond(s == NATS_OK);
+
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+_startServerSendErrThread(void *closure)
+{
+    natsStatus          s = NATS_OK;
+    natsSock            sock = NATS_SOCK_INVALID;
+    struct threadArg    *arg = (struct threadArg*) closure;
+    natsSockCtx         ctx;
+    char                buffer[1024];
+    int                 connect = 0;
+
+    memset(&ctx, 0, sizeof(natsSockCtx));
+
+    _startMockupServer(&sock, "localhost", "4222");
+
+    for (connect=1; connect<4; connect++)
+    {
+        if (((ctx.fd = accept(sock, NULL, NULL)) == NATS_SOCK_INVALID)
+                || (natsSock_SetCommonTcpOptions(ctx.fd) != NATS_OK))
+        {
+            s = NATS_SYS_ERROR;
+        }
+        if (s == NATS_OK)
+        {
+            const char info[] = "INFO {\"server_id\":\"22\",\"version\":\"latest\",\"go\":\"latest\",\"port\":4222,\"max_payload\":1048576}\r\n";
+
+            natsMutex_Lock(arg->m);
+            arg->control++;
+            natsMutex_Unlock(arg->m);
+
+            // Send INFO.
+            s = natsSock_WriteFully(&ctx, info, (int) strlen(info));
+            if (s == NATS_OK)
+            {
+                memset(buffer, 0, sizeof(buffer));
+
+                // Read connect and ping commands sent from the client
+                s = natsSock_ReadLine(&ctx, buffer, sizeof(buffer));
+                IFOK(s, natsSock_ReadLine(&ctx, buffer, sizeof(buffer)));
+            }
+        }
+        if ((s == NATS_OK) && connect == 1)
+        {
+            // Send PONG
+            s = natsSock_WriteFully(&ctx, _PONG_PROTO_, _PONG_PROTO_LEN_);
+            nats_Sleep(500);
+            snprintf(buffer, sizeof(buffer), "-ERR '%s'\r\n", AUTHENTICATION_EXPIRED_ERR);
+        }
+        else if (s == NATS_OK)
+        {
+            snprintf(buffer, sizeof(buffer), "-ERR '%s'\r\n", AUTHORIZATION_ERR);
+        }
+        if (s == NATS_OK)
+        {
+            s = natsSock_WriteFully(&ctx, buffer, (int)strlen(buffer));
+            nats_Sleep(200);
+        }
+        natsSock_Close(ctx.fd);
+    }
+
+    natsMutex_Lock(arg->m);
+    while ((s != NATS_TIMEOUT) && !arg->disconnected)
+        s = natsCondition_TimedWait(arg->c, arg->m, 5000);
+    natsMutex_Unlock(arg->m);
+
+    natsSock_Close(sock);
+}
+
+static void
+_authExpiredHandler(natsConnection *nc, natsSubscription *sub, natsStatus err, void *closure)
+{
+    struct threadArg *args      = (struct threadArg*) closure;
+    const char       *lastError = NULL;
+
+    // Technically, there is no guarantee that the connection's last error
+    // be still the one that is given to this callback.
+    if (err == NATS_CONNECTION_AUTH_FAILED)
+    {
+        bool ok = true;
+
+        natsMutex_Lock(args->m);
+
+        // So consider ok if currently not the same or if the same, the
+        // error string is as expected.
+        if (natsConnection_GetLastError(nc, &lastError) == NATS_CONNECTION_AUTH_FAILED)
+        {
+            if (args->control == 1)
+                ok = (nats_strcasestr(nc->errStr, AUTHENTICATION_EXPIRED_ERR) != NULL ? true : false);
+            else
+                ok = (nats_strcasestr(nc->errStr, AUTHORIZATION_ERR) != NULL ? true : false);
+        }
+        if (ok)
+        {
+            args->results[0]++;
+            args->done = true;
+            natsCondition_Broadcast(args->c);
+        }
+
+        natsMutex_Unlock(args->m);
+    }
+}
+
+static void
+test_AuthenticationExpired(void)
+{
+    natsStatus          s    = NATS_OK;
+    natsConnection      *nc  = NULL;
+    natsOptions         *opts= NULL;
+    natsThread          *t   = NULL;
+    struct threadArg    arg;
+    natsSockCtx         ctx;
+    int                 i;
+
+    memset(&ctx, 0, sizeof(natsSockCtx));
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    IFOK(s, natsOptions_Create(&opts));
+    IFOK(s, natsOptions_SetMaxReconnect(opts, -1));
+    IFOK(s, natsOptions_SetReconnectWait(opts, 25));
+    IFOK(s, natsOptions_SetReconnectJitter(opts, 0, 0));
+    IFOK(s, natsOptions_SetErrorHandler(opts, _authExpiredHandler, &arg));
+    IFOK(s, natsOptions_SetClosedCB(opts, _closedCb, &arg));
+    if (s != NATS_OK)
+        FAIL("@@ Unable to setup test!");
+
+    s = natsThread_Create(&t, _startServerSendErrThread, (void*) &arg);
+    if (s != NATS_OK)
+    {
+        _destroyDefaultThreadArgs(&arg);
+        FAIL("Unable to setup test");
+    }
+
+    test("Should connect ok: ");
+    for (i=0; i<10; i++)
+    {
+        s = natsConnection_Connect(&nc, opts);
+        if (s == NATS_OK)
+            break;
+        nats_Sleep(100);
+    }
+    testCond(s == NATS_OK);
+
+    test("Should have been closed: ");
+    s = _waitForConnClosed(&arg);
+    testCond(s == NATS_OK);
+
+    // First we would have gotten the async authentication expired error,
+    // then 2 consecutive auth violations that causes the lib to stop
+    // trying to reconnect.
+    test("Should have posted 3 errors: ");
+    if (s == NATS_OK)
+    {
+        natsMutex_Lock(arg.m);
+        s = (((arg.results[0] == 3) && arg.done) ? NATS_OK : NATS_ERR);
+        natsMutex_Unlock(arg.m);
+    }
+    testCond(s == NATS_OK);
+
+    natsConnection_Destroy(nc);
+    nc = NULL;
+
+    natsMutex_Lock(arg.m);
+    arg.disconnected = true;
+    natsCondition_Signal(arg.c);
+    natsMutex_Unlock(arg.m);
+
+    natsThread_Join(t);
+    natsThread_Destroy(t);
+
+    natsOptions_Destroy(opts);
+
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+_startServerSendErr2Thread(void *closure)
+{
+    natsStatus          s = NATS_OK;
+    natsSock            sock = NATS_SOCK_INVALID;
+    struct threadArg    *arg = (struct threadArg*) closure;
+    natsSockCtx         ctx;
+    char                buffer[1024];
+    int                 connect = 0;
+    bool                done = false;
+
+    memset(&ctx, 0, sizeof(natsSockCtx));
+
+    _startMockupServer(&sock, "localhost", "4222");
+
+    for (connect=1; !done; connect++)
+    {
+        if (((ctx.fd = accept(sock, NULL, NULL)) == NATS_SOCK_INVALID)
+                || (natsSock_SetCommonTcpOptions(ctx.fd) != NATS_OK))
+        {
+            s = NATS_SYS_ERROR;
+        }
+        if (s == NATS_OK)
+        {
+            const char info[] = "INFO {\"server_id\":\"22\",\"version\":\"latest\",\"go\":\"latest\",\"port\":4222,\"max_payload\":1048576}\r\n";
+
+            natsMutex_Lock(arg->m);
+            arg->control++;
+            natsMutex_Unlock(arg->m);
+
+            // Send INFO.
+            s = natsSock_WriteFully(&ctx, info, (int) strlen(info));
+            if (s == NATS_OK)
+            {
+                memset(buffer, 0, sizeof(buffer));
+
+                // Read connect and ping commands sent from the client
+                s = natsSock_ReadLine(&ctx, buffer, sizeof(buffer));
+                IFOK(s, natsSock_ReadLine(&ctx, buffer, sizeof(buffer)));
+            }
+            if (s == NATS_OK)
+            {
+                // Send PONG
+                s = natsSock_WriteFully(&ctx, _PONG_PROTO_, _PONG_PROTO_LEN_);
+            }
+        }
+        if ((s == NATS_OK) && connect == 1)
+        {
+            nats_Sleep(500);
+            snprintf(buffer, sizeof(buffer), "-ERR '%s'\r\n", AUTHENTICATION_EXPIRED_ERR);
+            s = natsSock_WriteFully(&ctx, buffer, (int)strlen(buffer));
+            nats_Sleep(200);
+        }
+        else if (s == NATS_OK)
+        {
+            natsMutex_Lock(arg->m);
+            while ((s != NATS_TIMEOUT) && !arg->disconnected)
+                s = natsCondition_TimedWait(arg->c, arg->m, 5000);
+            natsMutex_Unlock(arg->m);
+            done = true;
+        }
+        natsSock_Close(ctx.fd);
+    }
+    natsSock_Close(sock);
+}
+
+static void
+test_AuthenticationExpiredReconnect(void)
+{
+    natsStatus          s    = NATS_OK;
+    natsConnection      *nc  = NULL;
+    natsOptions         *opts= NULL;
+    natsThread          *t   = NULL;
+    struct threadArg    arg;
+    natsSockCtx         ctx;
+    int                 i;
+    const char          *lastErr = NULL;
+
+    memset(&ctx, 0, sizeof(natsSockCtx));
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    IFOK(s, natsOptions_Create(&opts));
+    IFOK(s, natsOptions_SetMaxReconnect(opts, 2));
+    IFOK(s, natsOptions_SetReconnectWait(opts, 25));
+    IFOK(s, natsOptions_SetReconnectJitter(opts, 0, 0));
+    IFOK(s, natsOptions_SetErrorHandler(opts, _authExpiredHandler, &arg));
+    IFOK(s, natsOptions_SetReconnectedCB(opts, _reconnectedCb, &arg));
+    IFOK(s, natsOptions_SetClosedCB(opts, _closedCb, &arg));
+    if (s != NATS_OK)
+        FAIL("@@ Unable to setup test!");
+
+    s = natsThread_Create(&t, _startServerSendErr2Thread, (void*) &arg);
+    if (s != NATS_OK)
+    {
+        _destroyDefaultThreadArgs(&arg);
+        FAIL("Unable to setup test");
+    }
+
+    test("Should connect ok: ");
+    for (i=0; i<10; i++)
+    {
+        s = natsConnection_Connect(&nc, opts);
+        if (s == NATS_OK)
+            break;
+        nats_Sleep(100);
+    }
+    testCond(s == NATS_OK);
+
+    test("Should have posted 1 error: ");
+    if (s == NATS_OK)
+    {
+        // Waiting for the err handler to fire
+        natsMutex_Lock(arg.m);
+        while ((s != NATS_TIMEOUT) && !arg.done && arg.results[0] != 1)
+            s = natsCondition_TimedWait(arg.c, arg.m, 5000);
+        natsMutex_Unlock(arg.m);
+    }
+    testCond(s == NATS_OK);
+
+    test("Should have reconnected: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.reconnected)
+        s = natsCondition_TimedWait(arg.c, arg.m, 5000);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    // Wait a tiny bit and make sure connection is still connected
+    nats_Sleep(100);
+    test("Still connected: ");
+    testCond(!natsConnection_IsClosed(nc));
+
+    // Check last error is cleared
+    test("Check last error cleared: ");
+    s = natsConnection_GetLastError(nc, &lastErr);
+    testCond((s == NATS_OK) && (lastErr[0] == '\0'));
+
+    test("Close: ");
+    natsConnection_Destroy(nc);
+    s = _waitForConnClosed(&arg);
+    testCond(s == NATS_OK);
+    nc = NULL;
+
+    natsMutex_Lock(arg.m);
+    arg.disconnected = true;
+    natsCondition_Signal(arg.c);
+    natsMutex_Unlock(arg.m);
+
+    natsThread_Join(t);
+    natsThread_Destroy(t);
+
+    natsOptions_Destroy(opts);
+
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+test_ConnectedServer(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    char                buffer[128];
+
+    buffer[0] = '\0';
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Verify ConnectedUrl is correct: ")
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_GetConnectedUrl(nc, buffer, sizeof(buffer)));
+    testCond((s == NATS_OK)
+             && (buffer[0] != '\0')
+             && (strcmp(buffer, NATS_DEFAULT_URL) == 0));
+
+    buffer[0] = '\0';
+
+    test("Verify ConnectedServerId is not null: ")
+    s = natsConnection_GetConnectedServerId(nc, buffer, sizeof(buffer));
+    testCond((s == NATS_OK)  && (buffer[0] != '\0'));
+
+    buffer[0] = '\0';
+
+    test("Verify ConnectedUrl is empty after disconnect: ")
+    natsConnection_Close(nc);
+    s = natsConnection_GetConnectedUrl(nc, buffer, sizeof(buffer));
+    testCond((s == NATS_OK) && (buffer[0] == '\0'));
+
+    buffer[0] = '\0';
+
+    test("Verify ConnectedServerId is empty after disconnect: ")
+    s = natsConnection_GetConnectedServerId(nc, buffer, sizeof(buffer));
+    testCond((s == NATS_OK)  && (buffer[0] == '\0'));
+
+    natsConnection_Destroy(nc);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_MultipleClose(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsThread          *threads[10];
+    natsPid             serverPid = NATS_INVALID_PID;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Test that multiple Close are fine: ")
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    for (int i=0; (s == NATS_OK) && (i<10); i++)
+        s = natsThread_Create(&(threads[i]), _closeConn, (void*) nc);
+
+    for (int i=0; (s == NATS_OK) && (i<10); i++)
+    {
+        natsThread_Join(threads[i]);
+        natsThread_Destroy(threads[i]);
+    }
+    testCond((s == NATS_OK)
+             && (nc->status == NATS_CONN_STATUS_CLOSED)
+             && (nc->refs == 1));
+
+    natsConnection_Destroy(nc);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_SimplePublish(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Test simple publish: ")
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_PublishString(nc, "foo", "Hello world!"));
+    IFOK(s, natsConnection_Publish(nc, "foo", (const void*) "Hello world!",
+                                   (int) strlen("Hello world!")));
+    testCond(s == NATS_OK);
+
+    natsConnection_Destroy(nc);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_SimplePublishNoData(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Test simple publish with no data: ")
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_PublishString(nc, "foo", NULL));
+    IFOK(s, natsConnection_PublishString(nc, "foo", ""));
+    IFOK(s, natsConnection_Publish(nc, "foo", NULL, 0));
+    testCond(s == NATS_OK);
+
+    natsConnection_Destroy(nc);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_PublishMsg(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *sub      = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s == NATS_OK)
+    {
+        arg.string = "hello!";
+        arg.status = NATS_OK;
+    }
+    if ( s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Test simple publishMsg: ")
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_Subscribe(&sub, nc, "foo", _recvTestString, &arg));
+    IFOK(s, natsConnection_Flush(nc));
+    if (s == NATS_OK)
+    {
+        const char  data[] = {104, 101, 108, 108, 111, 33};
+        natsMsg     *msg   = NULL;
+
+        s = natsMsg_Create(&msg, "foo", NULL, data, sizeof(data));
+        IFOK(s, natsConnection_PublishMsg(nc, msg));
+
+        natsMsg_Destroy(msg);
+    }
+    IFOK(s, natsConnection_Flush(nc));
+
+    if (s == NATS_OK)
+    {
+        natsMutex_Lock(arg.m);
+        while ((s != NATS_TIMEOUT) && !arg.msgReceived)
+            s = natsCondition_TimedWait(arg.c, arg.m, 1500);
+        natsMutex_Unlock(arg.m);
+    }
+    testCond(s == NATS_OK);
+
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+
+    _stopServer(serverPid);
+
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+test_InvalidSubsArgs(void)
+{
+    natsStatus          s;
+    natsConnection      *nc = NULL;
+    natsSubscription    *sub = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    // ASYNC Subscription
+
+    test("Test async subscriber, invalid connection: ")
+    s = natsConnection_Subscribe(&sub, NULL, "foo", _recvTestString, NULL);
+    testCond(s != NATS_OK);
+
+    test("Test async subscriber, invalid subject: ")
+    s = natsConnection_Subscribe(&sub, nc, NULL, _recvTestString, NULL);
+    testCond(s != NATS_OK);
+
+    test("Test async subscriber, invalid subject (empty string): ")
+    s = natsConnection_Subscribe(&sub, nc, "", _recvTestString, NULL);
+    testCond(s != NATS_OK);
+
+    test("Test async subscriber, invalid cb: ")
+    s = natsConnection_Subscribe(&sub, nc, "foo", NULL, NULL);
+    testCond(s != NATS_OK);
+
+    test("Test async queue subscriber, invalid connection: ")
+    s = natsConnection_QueueSubscribe(&sub, NULL, "foo", "group", _recvTestString, NULL);
+    testCond(s != NATS_OK);
+
+    // Async Subscription Timeout
+
+    test("Test async subscriber timeout, invalid connection: ")
+    s = natsConnection_SubscribeTimeout(&sub, NULL, "foo", 100, _recvTestString, NULL);
+    testCond(s != NATS_OK);
+
+    test("Test async subscriber timeout, invalid subject: ")
+    s = natsConnection_SubscribeTimeout(&sub, nc, NULL, 100, _recvTestString, NULL);
+    testCond(s != NATS_OK);
+
+    test("Test async subscriber timeout, invalid subject (empty string): ")
+    s = natsConnection_SubscribeTimeout(&sub, nc, "", 100, _recvTestString, NULL);
+    testCond(s != NATS_OK);
+
+    test("Test async subscriber timeout, invalid cb: ")
+    s = natsConnection_SubscribeTimeout(&sub, nc, "foo", 100, NULL, NULL);
+    testCond(s != NATS_OK);
+
+    test("Test async subscriber timeout, invalid timeout (<0): ")
+    s = natsConnection_SubscribeTimeout(&sub, nc, "foo", -100, _recvTestString, NULL);
+    testCond(s != NATS_OK);
+
+    test("Test async subscriber timeout, invalid timeout (0): ")
+    s = natsConnection_SubscribeTimeout(&sub, nc, "foo", 0, _recvTestString, NULL);
+    testCond(s != NATS_OK);
+
+    // ASYNC Queue Subscription
+
+    test("Test async queue subscriber timeout, invalid connection: ")
+    s = natsConnection_QueueSubscribe(&sub, NULL, "foo", "group", _recvTestString, NULL);
+    testCond(s != NATS_OK);
+
+    test("Test async queue subscriber, invalid subject: ")
+    s = natsConnection_QueueSubscribe(&sub, nc, NULL, "group", _recvTestString, NULL);
+    testCond(s != NATS_OK);
+
+    test("Test async queue subscriber, invalid subject (empty string): ")
+    s = natsConnection_QueueSubscribe(&sub, nc, "", "group", _recvTestString, NULL);
+    testCond(s != NATS_OK);
+
+    test("Test async queue subscriber, invalid group name: ")
+    s = natsConnection_QueueSubscribe(&sub, nc, "foo", NULL, _recvTestString, NULL);
+    testCond(s != NATS_OK);
+
+    test("Test async queue subscriber, invalid group name (empty): ")
+    s = natsConnection_QueueSubscribe(&sub, nc, "foo", "", _recvTestString, NULL);
+    testCond(s != NATS_OK);
+
+    test("Test async queue subscriber, invalid cb: ")
+    s = natsConnection_QueueSubscribe(&sub, nc, "foo", "group", NULL, NULL);
+    testCond(s != NATS_OK);
+
+    // ASYNC Queue Subscription Timeout
+
+    test("Test async queue subscriber timeout, invalid connection: ")
+    s = natsConnection_QueueSubscribeTimeout(&sub, NULL, "foo", "group", 100, _recvTestString, NULL);
+    testCond(s != NATS_OK);
+
+    test("Test async queue subscriber timeout, invalid subject: ")
+    s = natsConnection_QueueSubscribeTimeout(&sub, nc, NULL, "group", 100, _recvTestString, NULL);
+    testCond(s != NATS_OK);
+
+    test("Test async queue subscriber timeout, invalid subject (empty string): ")
+    s = natsConnection_QueueSubscribeTimeout(&sub, nc, "", "group", 100, _recvTestString, NULL);
+    testCond(s != NATS_OK);
+
+    test("Test async queue subscriber timeout, invalid group name: ")
+    s = natsConnection_QueueSubscribeTimeout(&sub, nc, "foo", NULL, 100, _recvTestString, NULL);
+    testCond(s != NATS_OK);
+
+    test("Test async queue subscriber timeout, invalid group name (empty): ")
+    s = natsConnection_QueueSubscribeTimeout(&sub, nc, "foo", "", 100, _recvTestString, NULL);
+    testCond(s != NATS_OK);
+
+    test("Test async queue subscriber timeout, invalid cb: ")
+    s = natsConnection_QueueSubscribeTimeout(&sub, nc, "foo", "group", 100, NULL, NULL);
+    testCond(s != NATS_OK);
+
+    test("Test async queue subscriber timeout, invalid timeout (<0): ")
+    s = natsConnection_QueueSubscribeTimeout(&sub, nc, "foo", "group", -100, _recvTestString, NULL);
+    testCond(s != NATS_OK);
+
+    test("Test async queue subscriber timeout, invalid timeout (0): ")
+    s = natsConnection_QueueSubscribeTimeout(&sub, nc, "foo", "group", 0, _recvTestString, NULL);
+    testCond(s != NATS_OK);
+
+    // SYNC Subscription
+
+    test("Test sync subscriber, invalid connection: ")
+    s = natsConnection_SubscribeSync(&sub, NULL, "foo");
+    testCond(s != NATS_OK);
+
+    test("Test sync subscriber, invalid subject: ")
+    s = natsConnection_SubscribeSync(&sub, nc, NULL);
+    testCond(s != NATS_OK);
+
+    test("Test sync subscriber, invalid subject (empty string): ")
+    s = natsConnection_SubscribeSync(&sub, nc, "");
+    testCond(s != NATS_OK);
+
+    // SYNC Queue Subscription
+
+    test("Test sync queue subscriber, invalid connection: ")
+    s = natsConnection_QueueSubscribeSync(&sub, NULL, "foo", "group");
+    testCond(s != NATS_OK);
+
+    test("Test sync queue subscriber, invalid subject: ")
+    s = natsConnection_QueueSubscribeSync(&sub, nc, NULL, "group");
+    testCond(s != NATS_OK);
+
+    test("Test sync queue subscriber, invalid subject (empty string): ")
+    s = natsConnection_QueueSubscribeSync(&sub, nc, "", "group");
+    testCond(s != NATS_OK);
+
+    test("Test sync queue subscriber, invalid group name: ")
+    s = natsConnection_QueueSubscribeSync(&sub, nc, "foo", NULL);
+    testCond(s != NATS_OK);
+
+    test("Test sync queue subscriber, invalid group name (empty): ")
+    s = natsConnection_QueueSubscribeSync(&sub, nc, "foo", "");
+    testCond(s != NATS_OK);
+
+    natsConnection_Destroy(nc);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_AsyncSubscribe(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *sub      = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if ( s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    arg.string = "Hello World";
+    arg.status = NATS_OK;
+    arg.control= 1;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Test async subscriber: ")
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_Subscribe(&sub, nc, "foo", _recvTestString,
+                                     (void*) &arg));
+    IFOK(s, natsConnection_PublishString(nc, "foo", arg.string));
+
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.msgReceived)
+        s = natsCondition_TimedWait(arg.c, arg.m, 1500);
+    natsMutex_Unlock(arg.m);
+
+    IFOK(s, arg.status);
+    testCond(s == NATS_OK);
+
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(serverPid);
+}
+
+typedef struct __asyncTimeoutInfo
+{
+    struct threadArg    *arg;
+    int64_t             timeout;
+    int64_t             timeAfterFirstMsg;
+    int64_t             timeSecondMsg;
+    int64_t             timeFirstTimeout;
+    int64_t             timeSecondTimeout;
+
+} _asyncTimeoutInfo;
+
+static void
+_asyncTimeoutCb(natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure)
+{
+   _asyncTimeoutInfo *ai = (_asyncTimeoutInfo*) closure;
+
+   natsMutex_Lock(ai->arg->m);
+   if (msg != NULL)
+   {
+       ai->arg->sum++;
+       switch (ai->arg->sum)
+       {
+           case 1:
+           {
+               // Release lock for sleep...
+               natsMutex_Unlock(ai->arg->m);
+
+               // Sleep for 1.5x the timeout value
+               nats_Sleep(ai->timeout+ai->timeout/2);
+
+               natsMutex_Lock(ai->arg->m);
+               ai->timeAfterFirstMsg = nats_Now();
+               break;
+           }
+           case 2: ai->timeSecondMsg = nats_Now(); break;
+           case 3:
+           {
+               ai->arg->done = true;
+               natsSubscription_Destroy(sub);
+               natsCondition_Signal(ai->arg->c);
+               break;
+           }
+           default:
+           {
+               ai->arg->status = NATS_ERR;
+               break;
+           }
+       }
+       natsMsg_Destroy(msg);
+   }
+   else
+   {
+       ai->arg->timerFired++;
+       switch (ai->arg->timerFired)
+       {
+           case 1:
+           {
+               ai->timeFirstTimeout = nats_Now();
+               // Notify the main thread to send the second message
+               // after waiting 1/2 of the timeout period.
+               natsCondition_Signal(ai->arg->c);
+               break;
+           }
+           case 2:
+           {
+               ai->timeSecondTimeout = nats_Now();
+               // Signal that we timed-out for the 2nd time.
+               ai->arg->timerStopped = 1;
+               natsCondition_Signal(ai->arg->c);
+               break;
+           }
+           default:
+           {
+               ai->arg->status = NATS_ERR;
+               break;
+           }
+       }
+    }
+    natsMutex_Unlock(ai->arg->m);
+}
+
+static void
+test_AsyncSubscribeTimeout(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *sub      = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    natsOptions         *opts     = NULL;
+    struct threadArg    arg;
+    bool                useLibDlv = false;
+    int                 i;
+    char                testText[128];
+    int64_t             timeout   = 100;
+    _asyncTimeoutInfo   ai;
+
+    for (i=0; i<4; i++)
+    {
+        memset(&ai, 0, sizeof(_asyncTimeoutInfo));
+        memset(&arg, 0, sizeof(struct threadArg));
+
+        s = natsOptions_Create(&opts);
+        IFOK(s, natsOptions_UseGlobalMessageDelivery(opts, useLibDlv));
+        IFOK(s, _createDefaultThreadArgsForCbTests(&arg));
+        if ( s != NATS_OK)
+            FAIL("Unable to setup test!");
+
+        ai.arg = &arg;
+        ai.timeout = timeout;
+        arg.status = NATS_OK;
+
+        serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+        CHECK_SERVER_STARTED(serverPid);
+
+        snprintf(testText, sizeof(testText), "Test async %ssubscriber timeout%s: ",
+                 ((i == 1 || i == 3) ? "queue " : ""),
+                 (i > 1 ? " (lib msg delivery)" : ""));
+        test(testText);
+        s = natsConnection_Connect(&nc, opts);
+        if (s == NATS_OK)
+        {
+            if (i == 0 || i == 2)
+                s = natsConnection_SubscribeTimeout(&sub, nc, "foo", timeout,
+                                                    _asyncTimeoutCb, (void*) &ai);
+            else
+                s = natsConnection_QueueSubscribeTimeout(&sub, nc, "foo", "group",
+                                                         timeout, _asyncTimeoutCb, (void*) &ai);
+        }
+        IFOK(s, natsConnection_PublishString(nc, "foo", "msg1"));
+
+        // Wait to be notified that sub timed-out 2 times
+        natsMutex_Lock(arg.m);
+        while ((s != NATS_TIMEOUT) && (arg.timerFired != 1))
+            s = natsCondition_TimedWait(arg.c, arg.m, 5000);
+        natsMutex_Unlock(arg.m);
+
+        // Wait half the timeout
+        nats_Sleep(timeout/2);
+
+        // Send the second message. This should reset the timeout timer.
+        IFOK(s, natsConnection_PublishString(nc, "foo", "msg2"));
+        IFOK(s, natsConnection_Flush(nc));
+
+        // Wait for 2nd timeout
+        natsMutex_Lock(arg.m);
+        while ((s != NATS_TIMEOUT) && (arg.timerStopped == 0))
+            s = natsCondition_TimedWait(arg.c, arg.m, 5000);
+        natsMutex_Unlock(arg.m);
+
+        // Send two more messages, only one should be received since the
+        // subscription will be unsubscribed/closed when receiving the
+        // first.
+        IFOK(s, natsConnection_PublishString(nc, "foo", "msg3"));
+        IFOK(s, natsConnection_PublishString(nc, "foo", "msg4"));
+        IFOK(s, natsConnection_Flush(nc));
+
+        // Wait for end of test
+        natsMutex_Lock(arg.m);
+        while ((s != NATS_TIMEOUT) && !arg.done)
+            s = natsCondition_TimedWait(arg.c, arg.m, 5000);
+        natsMutex_Unlock(arg.m);
+
+        // Wait more than the timeout time to see if extra timeout callbacks
+        // incorrectly fire
+        nats_Sleep(timeout+timeout/2);
+
+        // Check for success
+        natsMutex_Lock(arg.m);
+        testCond((s == NATS_OK) && (arg.status == NATS_OK)
+                    && (arg.sum == 3) && (arg.timerFired == 2)
+                    && (ai.timeFirstTimeout >= ai.timeAfterFirstMsg + timeout - 50)
+                    && (ai.timeFirstTimeout <= ai.timeAfterFirstMsg + timeout + 50)
+                    && (ai.timeSecondTimeout >= ai.timeSecondMsg + timeout - 50)
+                    && (ai.timeSecondTimeout <= ai.timeSecondMsg + timeout + 50))
+        natsMutex_Unlock(arg.m);
+
+        natsConnection_Destroy(nc);
+        natsOptions_Destroy(opts);
+
+        _destroyDefaultThreadArgs(&arg);
+
+        _stopServer(serverPid);
+
+        if (i >= 1)
+            useLibDlv = true;
+    }
+}
+
+static void
+test_SyncSubscribe(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *sub      = NULL;
+    natsMsg             *msg      = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    const char          *string   = "Hello World";
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Test sync subscriber: ")
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_SubscribeSync(&sub, nc, "foo"));
+    IFOK(s, natsConnection_PublishString(nc, "foo", string));
+    IFOK(s, natsSubscription_NextMsg(&msg, sub, 1000));
+    testCond((s == NATS_OK)
+             && (msg != NULL)
+             && (strncmp(string, natsMsg_GetData(msg), natsMsg_GetDataLength(msg)) == 0));
+
+    natsMsg_Destroy(msg);
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_PubSubWithReply(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *sub      = NULL;
+    natsMsg             *msg      = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    const char          *string   = "Hello World";
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Test PubSub with reply: ")
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_SubscribeSync(&sub, nc, "foo"));
+    IFOK(s, natsConnection_PublishRequestString(nc, "foo", "bar", string));
+    IFOK(s, natsSubscription_NextMsg(&msg, sub, 1000));
+    testCond((s == NATS_OK)
+             && (msg != NULL)
+             && (strncmp(string, natsMsg_GetData(msg), natsMsg_GetDataLength(msg)) == 0)
+             && (strncmp(natsMsg_GetReply(msg), "bar", 3) == 0));
+
+    natsMsg_Destroy(msg);
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_NoResponders(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *sub      = NULL;
+    natsMsg             *msg      = NULL;
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    const char          *string   = "Hello World";
+    struct threadArg    arg;
+
+    if (!serverVersionAtLeast(2,2,0))
+    {
+        char txt[200];
+
+        snprintf(txt, sizeof(txt), "Skipping since requires server version of at least 2.2.0, got %s: ", serverVersion);
+        test(txt);
+        testCond(true);
+        return;
+    }
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if ( s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("No responders on NextMsg: ");
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_SubscribeSync(&sub, nc, "foo"));
+    IFOK(s, natsConnection_PublishRequestString(nc, "bar", "foo", string));
+    IFOK(s, natsSubscription_NextMsg(&msg, sub, 1000));
+    testCond(NATS_NO_RESPONDERS);
+
+    natsMsg_Destroy(msg);
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    arg.status  = NATS_ERR;
+    arg.control = 10;
+
+    test("No responders in callback: ");
+    s = natsConnection_Subscribe(&sub, nc, "bar", _recvTestString, (void*)&arg);
+    IFOK(s, natsConnection_PublishRequestString(nc, "foo", "bar", string));
+    if (s == NATS_OK)
+    {
+        natsMutex_Lock(arg.m);
+        while ((s != NATS_TIMEOUT) && !arg.msgReceived)
+            s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+        if (s == NATS_OK)
+            s = arg.status;
+        natsMutex_Unlock(arg.m);
+    }
+    testCond(s == NATS_OK);
+
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+    natsConnection_Destroy(nc);
+    nc = NULL;
+
+    test("Disable no responders: ");
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_DisableNoResponders(opts, true));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    IFOK(s, natsConnection_RequestString(&msg, nc, "foo", string, 500));
+    testCond((s == NATS_TIMEOUT) && (msg == NULL));
+
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(serverPid);
+}
+
+struct flushArg
+{
+    natsConnection      *nc;
+    natsStatus          s;
+    int                 count;
+    int64_t             timeout;
+    int64_t             initialSleep;
+    int64_t             loopSleep;
+};
+
+static void
+_doFlush(void *arg)
+{
+    struct flushArg     *p = (struct flushArg*) arg;
+    int                 i;
+
+    nats_Sleep(p->initialSleep);
+
+    for (i = 0; (p->s == NATS_OK) && (i < p->count); i++)
+    {
+        p->s = natsConnection_FlushTimeout(p->nc, p->timeout);
+        if ((p->s == NATS_OK) && (p->loopSleep > 0))
+            nats_Sleep(p->loopSleep);
+    }
+}
+
+static void
+test_Flush(void)
+{
+    natsStatus          s;
+    natsOptions         *opts     = NULL;
+    natsConnection      *nc       = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    const char          *string   = "Hello World";
+    natsThread          *threads[3] = { NULL, NULL, NULL };
+    struct flushArg     args[3];
+    int64_t             start = 0;
+    int64_t             elapsed = 0;
+
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_SetURL(opts, "nats://127.0.0.1:4222"));
+    IFOK(s, natsOptions_SetReconnectWait(opts, 100));
+    IFOK(s, natsOptions_SetReconnectJitter(opts, 0, 0));
+    IFOK(s, natsOptions_SetPingInterval(opts, 100));
+
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Test Flush empties buffer: ")
+    s = natsConnection_Connect(&nc, opts);
+    for (int i=0; (s == NATS_OK) && (i < 1000); i++)
+        s = natsConnection_PublishString(nc, "flush", string);
+    IFOK(s, natsConnection_Flush(nc));
+    testCond((s == NATS_OK)
+             && natsConnection_Buffered(nc) == 0);
+
+    test("Check parallel Flush: ")
+    for (int i=0; (s == NATS_OK) && (i < 3); i++)
+    {
+        args[i].nc           = nc;
+        args[i].s            = NATS_OK;
+        args[i].timeout      = 5000;
+#ifdef _WIN32
+        args[i].count        = 100;
+#else
+        args[i].count        = 1000;
+#endif
+        args[i].initialSleep = 500;
+        args[i].loopSleep    = 1;
+        s = natsThread_Create(&(threads[i]), _doFlush, (void*) &(args[i]));
+    }
+
+    for (int i=0; (s == NATS_OK) && (i < 10000); i++)
+        s = natsConnection_PublishString(nc, "flush", "Hello world");
+
+    for (int i=0; (i < 3); i++)
+    {
+        if (threads[i] == NULL)
+            continue;
+
+        natsThread_Join(threads[i]);
+        natsThread_Destroy(threads[i]);
+
+        if (args[i].s != NATS_OK)
+            s = args[i].s;
+    }
+    testCond(s == NATS_OK);
+
+    natsConnection_Destroy(nc);
+    nc = NULL;
+
+    test("Check Flush while in doReconnect: ")
+    s = natsOptions_SetReconnectWait(opts, 3000);
+    IFOK(s, natsOptions_SetReconnectJitter(opts, 0, 0));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    if (s == NATS_OK)
+    {
+        // Capture the moment we connected
+        start = nats_Now();
+
+        // Stop the server
+        _stopServer(serverPid);
+        serverPid = NATS_INVALID_PID;
+
+        // We can restart right away, since the client library will wait 3 sec
+        // before reconnecting.
+        serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+        CHECK_SERVER_STARTED(serverPid);
+
+        // Attempt to Flush. This should wait for the reconnect to occur, then
+        // proceed.
+        for (int i=0; (s == NATS_OK) && (i < 3); i++)
+        {
+            args[i].nc           = nc;
+            args[i].s            = NATS_OK;
+            args[i].timeout      = 5000;
+            args[i].count        = 1;
+            args[i].initialSleep = 1000;
+            args[i].loopSleep    = 0;
+            s = natsThread_Create(&(threads[i]), _doFlush, (void*) &(args[i]));
+        }
+    }
+    for (int i=0; (i < 3); i++)
+    {
+        if (threads[i] == NULL)
+            continue;
+
+        natsThread_Join(threads[i]);
+        natsThread_Destroy(threads[i]);
+
+        if ((s == NATS_OK) && (args[i].s != NATS_OK))
+        {
+            s = args[i].s;
+            printf("t=%d s=%u\n", i, s);
+        }
+    }
+    if (s == NATS_OK)
+        elapsed = (nats_Now() - start);
+
+    testCond((s == NATS_OK) && (elapsed >= 2500) && (elapsed <= 3200));
+
+    natsOptions_Destroy(opts);
+    natsConnection_Destroy(nc);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_ConnCloseDoesFlush(void)
+{
+    natsStatus          s    = NATS_OK;
+    natsPid             pid  = NATS_INVALID_PID;
+    natsConnection      *nc1 = NULL;
+    natsConnection      *nc2 = NULL;
+    natsSubscription    *sub = NULL;
+    int                 tc   = 100000;
+    int                 i, iter;
+
+    pid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    if (valgrind)
+        tc = 1000;
+
+    test("Connection close flushes: ");
+    for (iter=0; (s == NATS_OK) && (iter<10); iter++)
+    {
+        s = natsConnection_ConnectTo(&nc1, NATS_DEFAULT_URL);
+        IFOK(s, natsConnection_SubscribeSync(&sub, nc1, "foo"));
+        IFOK(s, natsSubscription_SetPendingLimits(sub, -1, -1));
+        IFOK(s, natsConnection_Flush(nc1));
+
+        IFOK(s, natsConnection_ConnectTo(&nc2, NATS_DEFAULT_URL));
+
+        for (i=0; (s == NATS_OK) && (i<tc); i++)
+            s = natsConnection_PublishString(nc2, "foo", "hello");
+        if (s == NATS_OK)
+            natsConnection_Close(nc2);
+
+        for (i=0; (s == NATS_OK) && (i<tc); i++)
+        {
+            natsMsg *msg = NULL;
+            s = natsSubscription_NextMsg(&msg, sub, 1000);
+            natsMsg_Destroy(msg);
+        }
+
+        natsConnection_Destroy(nc2);
+        nc2 = NULL;
+        natsSubscription_Destroy(sub);
+        sub = NULL;
+        natsConnection_Destroy(nc1);
+        nc1 = NULL;
+    }
+    testCond(s == NATS_OK);
+
+    _stopServer(pid);
+}
+
+static void
+test_QueueSubscriber(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *s1       = NULL;
+    natsSubscription    *s2       = NULL;
+    natsMsg             *msg      = NULL;
+    uint64_t            r1        = 0;
+    uint64_t            r2        = 0;
+    float               v         = 1000.0 * 0.15;
+    int64_t             d1;
+    int64_t             d2;
+    natsPid             serverPid = NATS_INVALID_PID;
+    const char          *string   = "Hello World";
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Test QueueSubscriber receive correct amount: ");
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_QueueSubscribeSync(&s1, nc, "foo", "bar"));
+    IFOK(s, natsConnection_QueueSubscribeSync(&s2, nc, "foo", "bar"));
+    IFOK(s, natsConnection_PublishString(nc, "foo", string));
+    IFOK(s, natsConnection_Flush(nc));
+    IFOK(s, natsSubscription_QueuedMsgs(s1, &r1));
+    IFOK(s, natsSubscription_QueuedMsgs(s2, &r2));
+    testCond((s == NATS_OK)
+             && (r1 + r2 == 1));
+
+    (void)natsSubscription_NextMsg(&msg, s1, 0);
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    (void)natsSubscription_NextMsg(&msg, s2, 0);
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Test correct amount when more messages are sent: ");
+    for (int i=0; (s == NATS_OK) && (i<1000); i++)
+        s = natsConnection_PublishString(nc, "foo", string);
+
+    IFOK(s, natsConnection_Flush(nc));
+
+    r1 = r2 = 0;
+
+    IFOK(s, natsSubscription_QueuedMsgs(s1, &r1));
+    IFOK(s, natsSubscription_QueuedMsgs(s2, &r2));
+
+    testCond((s == NATS_OK) && (r1 + r2 == 1000));
+
+    test("Variance acceptable: ");
+    d1 = 500 - r1;
+    if (d1 < 0)
+        d1 *= -1;
+
+    d2 = 500 - r1;
+    if (d2 < 0)
+        d2 *= -1;
+
+    testCond((d1 <= v) && (d2 <= v));
+
+    natsSubscription_Destroy(s1);
+    natsSubscription_Destroy(s2);
+    natsConnection_Destroy(nc);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_ReplyArg(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *sub      = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if ( s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    arg.string = "bar";
+    arg.status = NATS_OK;
+    arg.control= 2;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Test for correct Reply arg in callback: ")
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_Subscribe(&sub, nc, "foo", _recvTestString,
+                                     (void*) &arg));
+    IFOK(s, natsConnection_PublishRequestString(nc, "foo", "bar", "hello"));
+
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.msgReceived)
+        s = natsCondition_TimedWait(arg.c, arg.m, 1500);
+    natsMutex_Unlock(arg.m);
+
+    IFOK(s, arg.status);
+
+    testCond(s == NATS_OK);
+
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_SyncReplyArg(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *sub      = NULL;
+    natsMsg             *msg      = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Test for correct Reply arg in msg: ")
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_SubscribeSync(&sub, nc, "foo"));
+    IFOK(s, natsConnection_PublishRequestString(nc, "foo", "bar", "hello"));
+    IFOK(s, natsSubscription_NextMsg(&msg, sub, 1000));
+
+    testCond((s == NATS_OK)
+             && (msg != NULL)
+             && (natsMsg_GetReply(msg) != NULL)
+             && (strcmp("bar", natsMsg_GetReply(msg)) == 0));
+
+    natsMsg_Destroy(msg);
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_Unsubscribe(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *sub      = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if ( s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    arg.string = "bar";
+    arg.status = NATS_OK;
+    arg.control= 3;
+    arg.sum    = 0;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Connect and create sub: ")
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_Subscribe(&sub, nc, "foo", _recvTestString, (void*) &arg));
+    testCond(s == NATS_OK);
+
+    test("Send messages and flush: ");
+    for (int i=0; (s == NATS_OK) && (i<20); i++)
+        s = natsConnection_PublishString(nc, "foo", "hello");
+    IFOK(s, natsConnection_Flush(nc));
+    testCond(s == NATS_OK);
+
+    test("Unsubscribe from callback: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.msgReceived)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+    IFOK(s, arg.status);
+    testCond(s == NATS_OK);
+
+    test("No more callback: ");
+    nats_Sleep(250);
+    natsMutex_Lock(arg.m);
+    testCond((s == NATS_OK) && (arg.sum == 10));
+    natsMutex_Unlock(arg.m);
+
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("Create new sub: ");
+    s = natsConnection_Subscribe(&sub, nc, "foo", _recvTestString, (void*) &arg);
+    testCond(s == NATS_OK);
+
+    test("Unsubscribe after connection close: ");
+    natsConnection_Destroy(nc);
+    s = natsSubscription_Unsubscribe(sub);
+    testCond(s == NATS_CONNECTION_CLOSED);
+
+    natsSubscription_Destroy(sub);
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_DoubleUnsubscribe(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *sub      = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Connect and create subscription: ");
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_SubscribeSync(&sub, nc, "foo"));
+    testCond(s == NATS_OK);
+
+    test("Unsubscribe: ");
+    s = natsSubscription_Unsubscribe(sub);
+    testCond(s == NATS_OK);
+
+    test("Double Unsubscribe: ");
+    s = natsSubscription_Unsubscribe(sub);
+    testCond(s == NATS_INVALID_SUBSCRIPTION);
+
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_SubRemovedWhileProcessingMsg(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsOptions         *opts     = NULL;
+    natsSubscription    *sub      = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Connect and create sub: ")
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_SubscribeSync(&sub, nc, "foo"));
+    testCond(s == NATS_OK);
+
+    // Lock the sub so that we can remove while the connection
+    // readLoop is trying to push to the sub.
+    natsSub_Lock(sub);
+
+    test("Send message: ");
+    s = natsConnection_PublishString(nc, "foo", "hello");
+    testCond(s == NATS_OK);
+
+    test("Close sub: ");
+    natsSub_Unlock(sub);
+    natsSub_close(sub, false);
+    testCond(s == NATS_OK);
+
+    test("Check msg not given: ");
+    natsSub_Lock(sub);
+    testCond(sub->msgList.msgs == 0);
+    natsSub_Unlock(sub);
+
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+    natsConnection_Destroy(nc);
+    nc = NULL;
+
+    // Repeat with global message delivery option.
+    test("Set global delivery option: ");
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_UseGlobalMessageDelivery(opts, true));
+    testCond(s == NATS_OK);
+
+    test("Connect and create sub: ");
+    s = natsConnection_Connect(&nc, opts);
+    IFOK(s, natsConnection_Subscribe(&sub, nc, "foo", _dummyMsgHandler, NULL));
+    testCond(s == NATS_OK);
+
+    natsSub_Lock(sub);
+    natsMutex_Lock(sub->libDlvWorker->lock);
+    test("Send message: ");
+    s = natsConnection_PublishString(nc, "foo", "hello");
+    testCond(s == NATS_OK);
+
+    test("Close sub: ");
+    natsMutex_Unlock(sub->libDlvWorker->lock);
+    natsSub_Unlock(sub);
+    natsSub_close(sub, false);
+    testCond(s == NATS_OK);
+
+    test("Check msg not given: ");
+    natsSub_Lock(sub);
+    natsMutex_Lock(sub->libDlvWorker->lock);
+    testCond(sub->msgList.msgs == 0);
+    natsMutex_Unlock(sub->libDlvWorker->lock);
+    natsSub_Unlock(sub);
+
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_RequestTimeout(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsMsg             *msg      = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Test Request should timeout: ")
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_RequestString(&msg, nc, "foo", "bar", 500));
+    testCond(serverVersionAtLeast(2, 2, 0) ? (s == NATS_NO_RESPONDERS) : (s == NATS_TIMEOUT));
+
+    natsConnection_Destroy(nc);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_Request(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *sub      = NULL;
+    natsMsg             *msg      = NULL;
+    natsMsg             *req      = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    struct threadArg    arg;
+    int                 i;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if ( s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    arg.string = "I will help you";
+    arg.status = NATS_OK;
+    arg.control= 4;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Connect and subscribe: ");
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_Subscribe(&sub, nc, "foo", _recvTestString, (void*) &arg));
+    testCond(s == NATS_OK);
+
+    test("Test Request: ")
+    s = natsConnection_RequestString(&msg, nc, "foo", "help", 500);
+
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.msgReceived)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    IFOK(s, arg.status);
+    natsMutex_Unlock(arg.m);
+
+    testCond((s == NATS_OK)
+             && (msg != NULL)
+             && (strncmp(arg.string,
+                         natsMsg_GetData(msg),
+                         natsMsg_GetDataLength(msg)) == 0));
+
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Create req message: ");
+    s = natsMsg_Create(&req, "foo", NULL, "help", 4);
+    testCond(s == NATS_OK);
+
+    test("Test RequestMsg: ");
+    s = natsConnection_RequestMsg(&msg, nc, req, 500);
+
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.msgReceived)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    IFOK(s, arg.status);
+    natsMutex_Unlock(arg.m);
+
+    testCond((s == NATS_OK)
+             && (msg != NULL)
+             && (strncmp(arg.string,
+                         natsMsg_GetData(msg),
+                         natsMsg_GetDataLength(msg)) == 0));
+
+    natsMsg_Destroy(msg);
+    msg = NULL;
+    natsMsg_Destroy(req);
+    req = NULL;
+
+    natsMutex_Lock(arg.m);
+    arg.control = 11;
+    natsMutex_Unlock(arg.m);
+
+    test("Race on timeout: ");
+    for (i=0; (s == NATS_OK) && (i<100); i++)
+    {
+        s = natsConnection_Request(&msg, nc, "foo", "help!", 5, 1);
+        // Make sure that we get either OK with msg != NULL
+        // or TIMEOUT but with msg == NULL
+        if (s == NATS_OK)
+        {
+            if (msg == NULL)
+                s = NATS_ERR;
+            else
+            {
+                natsMsg_Destroy(msg);
+                msg = NULL;
+            }
+        }
+        else if ((s == NATS_TIMEOUT) && (msg == NULL))
+        {
+            s = NATS_OK;
+            nats_clearLastError();
+        }
+        // else if timeout and msg != NULL, that is a bug!
+    }
+    testCond(s == NATS_OK);
+
+    // Ensure the last callback returns to avoid accessing data that has been freed.
+    natsMutex_Lock(arg.m);
+    s = NATS_OK;
+    while ((s != NATS_TIMEOUT) && (arg.sum != 100))
+        natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_RequestNoBody(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *sub      = NULL;
+    natsMsg             *msg      = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if ( s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    arg.string = "I will help you";
+    arg.status = NATS_OK;
+    arg.control= 4;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Connect and subscribe: ");
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_Subscribe(&sub, nc, "foo", _recvTestString, (void*) &arg));
+    testCond(s == NATS_OK);
+
+    test("Test Request with no body content: ")
+    s = natsConnection_RequestString(&msg, nc, "foo", NULL, 500);
+
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT)
+           && !arg.msgReceived)
+    {
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    }
+    natsMutex_Unlock(arg.m);
+
+    IFOK(s, arg.status);
+
+    testCond((s == NATS_OK)
+             && (msg != NULL)
+             && (strncmp(arg.string,
+                         natsMsg_GetData(msg),
+                         natsMsg_GetDataLength(msg)) == 0));
+
+    natsMsg_Destroy(msg);
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(serverPid);
+}
+
+static void
+_serverForMuxWithMappedSubject(void *closure)
+{
+    natsStatus          s = NATS_OK;
+    natsSock            sock = NATS_SOCK_INVALID;
+    struct threadArg    *arg = (struct threadArg*) closure;
+    natsSockCtx         ctx;
+
+    memset(&ctx, 0, sizeof(natsSockCtx));
+
+    s = _startMockupServer(&sock, "127.0.0.1", "4222");
+    natsMutex_Lock(arg->m);
+    arg->status = s;
+    natsCondition_Signal(arg->c);
+    natsMutex_Unlock(arg->m);
+
+    if (((ctx.fd = accept(sock, NULL, NULL)) == NATS_SOCK_INVALID)
+            || (natsSock_SetCommonTcpOptions(ctx.fd) != NATS_OK))
+    {
+        s = NATS_SYS_ERROR;
+    }
+    if (s == NATS_OK)
+    {
+        char info[1024];
+
+        snprintf(info, sizeof(info), "%s", "INFO {\"server_id\":\"22\",\"version\":\"latest\",\"go\":\"latest\",\"port\":4222,\"max_payload\":1048576}\r\n");
+
+        // Send INFO.
+        s = natsSock_WriteFully(&ctx, info, (int) strlen(info));
+    }
+    if (s == NATS_OK)
+    {
+        char buffer[1024];
+
+        memset(buffer, 0, sizeof(buffer));
+
+        // Read connect and ping commands sent from the client
+        s = natsSock_ReadLine(&ctx, buffer, sizeof(buffer));
+        IFOK(s, natsSock_ReadLine(&ctx, buffer, sizeof(buffer)));
+
+        // Send PONG
+        IFOK(s, natsSock_WriteFully(&ctx, _PONG_PROTO_, _PONG_PROTO_LEN_));
+
+        // Now wait for the SUB proto and the Request
+        IFOK(s, natsSock_ReadLine(&ctx, buffer, sizeof(buffer)));
+        IFOK(s, natsSock_ReadLine(&ctx, buffer, sizeof(buffer)));
+
+        // Send the reply on a different subject
+        IFOK(s, natsSock_WriteFully(&ctx, "MSG bar 1 2\r\nok\r\n", 17));
+        if (s == NATS_OK)
+        {
+            // Wait for client to tell us it is done
+            natsMutex_Lock(arg->m);
+            while ((s != NATS_TIMEOUT) && !(arg->done))
+                s = natsCondition_TimedWait(arg->c, arg->m, 10000);
+            natsMutex_Unlock(arg->m);
+        }
+        natsSock_Close(ctx.fd);
+    }
+    natsSock_Close(sock);
+}
+
+static void
+test_RequestMuxWithMappedSubject(void)
+{
+    natsStatus          s;
+    natsConnection      *nc  = NULL;
+    natsMsg             *msg = NULL;
+    natsThread          *t   = NULL;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if ( s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    test("Start server: ");
+    arg.status = NATS_ERR;
+    s = natsThread_Create(&t, _serverForMuxWithMappedSubject, (void*) &arg);
+    if (s == NATS_OK)
+    {
+        // Wait for server to be ready
+        natsMutex_Lock(arg.m);
+        while ((s != NATS_TIMEOUT) && (arg.status != NATS_OK))
+            s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+        s = arg.status;
+        natsMutex_Unlock(arg.m);
+    }
+    testCond(s == NATS_OK);
+
+    test("Connect: ");
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    testCond(s == NATS_OK);
+
+    test("Request: ");
+    s = natsConnection_RequestString(&msg, nc, "foo", "help", 1000);
+    testCond(s == NATS_OK);
+
+    natsMsg_Destroy(msg);
+    natsConnection_Destroy(nc);
+
+    // Notify mock server we are done
+    natsMutex_Lock(arg.m);
+    arg.done = true;
+    natsCondition_Signal(arg.c);
+    natsMutex_Unlock(arg.m);
+
+    natsThread_Join(t);
+    natsThread_Destroy(t);
+
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+test_OldRequest(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsOptions         *opts     = NULL;
+    natsSubscription    *sub      = NULL;
+    natsMsg             *msg      = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if ( s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    arg.string = "I will help you";
+    arg.status = NATS_OK;
+    arg.control= 4;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Setup: ");
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_UseOldRequestStyle(opts, true));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    IFOK(s, natsConnection_Subscribe(&sub, nc, "foo", _recvTestString, (void*) &arg));
+    testCond(s == NATS_OK);
+
+    test("Test Old Request Style: ")
+    s = natsConnection_RequestString(&msg, nc, "foo", "help", 500);
+
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT)
+           && !arg.msgReceived)
+    {
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    }
+    natsMutex_Unlock(arg.m);
+
+    IFOK(s, arg.status);
+
+    testCond((s == NATS_OK)
+             && (msg != NULL)
+             && (strncmp(arg.string,
+                         natsMsg_GetData(msg),
+                         natsMsg_GetDataLength(msg)) == 0));
+
+    natsMsg_Destroy(msg);
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(serverPid);
+}
+
+static void
+_sendRequest(void *closure)
+{
+    struct threadArg    *arg = (struct threadArg*) closure;
+    natsStatus          s;
+    natsMsg             *msg = NULL;
+
+    nats_Sleep(250);
+
+    s = natsConnection_RequestString(&msg, arg->nc, "foo", "Help!", 2000);
+    natsMutex_Lock(arg->m);
+    if ((s == NATS_OK)
+            && (msg != NULL)
+            && strncmp(arg->string,
+                       natsMsg_GetData(msg),
+                       natsMsg_GetDataLength(msg)) == 0)
+    {
+        arg->sum++;
+    }
+    else
+    {
+        arg->status = NATS_ERR;
+    }
+    natsMutex_Unlock(arg->m);
+    natsMsg_Destroy(msg);
+}
+
+static void
+test_SimultaneousRequest(void)
+{
+    natsStatus          s;
+     natsConnection      *nc       = NULL;
+     natsSubscription    *sub      = NULL;
+     natsThread          *threads[10];
+     natsPid             serverPid = NATS_INVALID_PID;
+     struct threadArg    arg;
+     int                 i;
+
+     s = _createDefaultThreadArgsForCbTests(&arg);
+     if ( s != NATS_OK)
+         FAIL("Unable to setup test!");
+
+     arg.string = "ok";
+     arg.status = NATS_OK;
+     arg.control= 4;
+
+     serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+     CHECK_SERVER_STARTED(serverPid);
+
+     s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+     if (s == NATS_OK)
+     {
+         arg.nc = nc;
+         s = natsConnection_Subscribe(&sub, nc, "foo", _recvTestString, (void*) &arg);
+     }
+
+     for (i=0; i<10; i++)
+         threads[i] = NULL;
+
+     test("Test simultaneous requests: ")
+     for (i=0; (s == NATS_OK) && (i<10); i++)
+         s = natsThread_Create(&(threads[i]), _sendRequest, (void*) &arg);
+
+     for (i=0; i<10; i++)
+     {
+         if (threads[i] != NULL)
+         {
+             natsThread_Join(threads[i]);
+             natsThread_Destroy(threads[i]);
+         }
+     }
+
+     natsMutex_Lock(arg.m);
+     if ((s != NATS_OK)
+             || ((s = arg.status) != NATS_OK)
+             || (arg.sum != 10))
+     {
+         s = NATS_ERR;
+     }
+     natsMutex_Unlock(arg.m);
+
+     testCond(s == NATS_OK);
+
+     natsSubscription_Destroy(sub);
+     natsConnection_Destroy(nc);
+
+     _destroyDefaultThreadArgs(&arg);
+
+     _stopServer(serverPid);
+}
+
+static void
+test_RequestClose(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *sub      = NULL;
+    natsMsg             *msg      = NULL;
+    natsThread          *t        = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    // Because of no responders, we would get an immediate timeout.
+    // So we need to create a sync subscriber that is simply not
+    // going to send a reply back.
+
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    test("Test Request is kicked out with a connection close: ")
+    IFOK(s, natsThread_Create(&t, _closeConnWithDelay, (void*) nc));
+    IFOK(s, natsConnection_SubscribeSync(&sub, nc, "foo"));
+    IFOK(s, natsConnection_RequestString(&msg, nc, "foo", "help", 2000));
+
+    if (t != NULL)
+    {
+        natsThread_Join(t);
+        natsThread_Destroy(t);
+    }
+    testCond((s == NATS_CONNECTION_CLOSED) && (msg == NULL));
+
+    natsMsg_Destroy(msg);
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+
+    _stopServer(serverPid);
+}
+
+
+static void
+test_CustomInbox(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsOptions         *opts     = NULL;
+    natsSubscription    *sub1     = NULL;
+    natsSubscription    *sub2     = NULL;
+    natsMsg             *msg      = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    const char          *badPfx[] = {"bad prefix", "bad\tprefix", "bad..prefix", "bad.*.prefix",
+                                     "bad.>.prefix", "bad.prefix.*", "bad.prefix.>",
+                                     "bad.prefix.", "bad.prefix.."};
+    struct threadArg    arg;
+    int                 i;
+    int                 mode;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Create options: ");
+    s = natsOptions_Create(&opts);
+    testCond(s == NATS_OK);
+
+    for (i = 0; i<(int)(sizeof(badPfx)/sizeof(char*)); i++)
+    {
+        char tmp[128];
+
+        snprintf(tmp, sizeof(tmp), "Bad prefix '%s': ", badPfx[i]);
+        test(tmp);
+        s = natsOptions_SetCustomInboxPrefix(opts, badPfx[i]);
+        testCond((s == NATS_INVALID_ARG) && (opts->inboxPfx == NULL));
+        nats_clearLastError();
+    }
+
+    test("Good prefix: ");
+    s = natsOptions_SetCustomInboxPrefix(opts, "my.prefix");
+    testCond((s == NATS_OK) && (opts->inboxPfx != NULL)
+                && (strcmp(opts->inboxPfx, "my.prefix.") == 0));
+
+    arg.string = "I will help you";
+    arg.control= 4;
+
+    for (mode=0; mode<2; mode++)
+    {
+        test("Set old request style: ");
+        s = natsOptions_UseOldRequestStyle(opts, true);
+        testCond(s == NATS_OK);
+
+        test("Connect and setup sub: ");
+        s = natsConnection_Connect(&nc, opts);
+        IFOK(s, natsConnection_SubscribeSync(&sub1, nc, "my.prefix.>"));
+        IFOK(s, natsConnection_Subscribe(&sub2, nc, "foo", _recvTestString, (void*) &arg));
+        testCond(s == NATS_OK);
+
+        test("Send request: ");
+        s = natsConnection_RequestString(&msg, nc, "foo", "help", 1000);
+        testCond((s == NATS_OK) && (msg != NULL));
+        natsMsg_Destroy(msg);
+        msg = NULL;
+
+        test("Check custom inbox: ");
+        s = natsSubscription_NextMsg(&msg, sub1, 500);
+        testCond((s == NATS_OK) && (msg != NULL)
+                    && (strstr(natsMsg_GetSubject(msg), "my.prefix.") == natsMsg_GetSubject(msg)));
+        natsMsg_Destroy(msg);
+        msg = NULL;
+
+        natsSubscription_Destroy(sub1);
+        sub1 = NULL;
+        natsSubscription_Destroy(sub2);
+        sub2 = NULL;
+        natsConnection_Destroy(nc);
+        nc = NULL;
+    }
+
+    for (mode = 0; mode < 2; mode++)
+    {
+        test("Set option: ");
+        s = natsOptions_SetCustomInboxPrefix(opts, (mode == 0 ? NULL : "my.prefix"));
+        testCond(s == NATS_OK);
+
+        test("Connect: ");
+        s = natsConnection_Connect(&nc, opts);
+        testCond(s == NATS_OK);
+
+        test("Inbox init: ");
+        {
+            char inboxBuf[NATS_DEFAULT_INBOX_PRE_LEN+NUID_BUFFER_LEN+1];
+            char *inbox = NULL;
+            bool allocated = false;
+
+            s = natsConn_initInbox(nc, inboxBuf, sizeof(inboxBuf), &inbox, &allocated);
+            if (s == NATS_OK)
+            {
+                if (mode == 0)
+                {
+                    if (allocated || (inbox != inboxBuf) ||
+                            (strstr(inbox, NATS_DEFAULT_INBOX_PRE) != inbox))
+                    {
+                        s = NATS_ERR;
+                    }
+                }
+                else
+                {
+                    // Since the custom prefix "my.prefix." is more than "_INBOX.",
+                    // init should have allocated memory
+                    if (!allocated || (inbox == inboxBuf) ||
+                            (strstr(inbox, "my.prefix.") != inbox))
+                    {
+                        s = NATS_ERR;
+                    }
+                    else if (allocated)
+                        free(inbox);
+                }
+            }
+        }
+        testCond(s == NATS_OK);
+
+        natsConnection_Destroy(nc);
+        nc = NULL;
+    }
+
+    natsOptions_Destroy(opts);
+    _destroyDefaultThreadArgs(&arg);
+    _stopServer(serverPid);
+}
+
+static void
+test_FlushInCb(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *sub      = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if ( s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    arg.status = NATS_OK;
+    arg.control= 5;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Test Flush in callback: ")
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_Subscribe(&sub, nc, "foo", _recvTestString, (void*) &arg));
+    IFOK(s, natsConnection_PublishString(nc, "foo", "hello"));
+
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT)
+           && !arg.msgReceived)
+    {
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    }
+    natsMutex_Unlock(arg.m);
+
+    IFOK(s, arg.status);
+
+    testCond(s == NATS_OK);
+
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_ReleaseFlush(void)
+{
+    natsStatus          s = NATS_OK;
+    natsSock            sock = NATS_SOCK_INVALID;
+    natsThread          *t = NULL;
+    struct threadArg    arg;
+    natsSockCtx         ctx;
+
+    memset(&ctx, 0, sizeof(natsSockCtx));
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s != NATS_OK)
+        FAIL("@@ Unable to setup test!");
+
+    test("Check that Flush() release on connection close: ")
+
+    arg.control = 3;
+
+    // We will hand run a fake server that will to reply to the second PING
+
+    s = _startMockupServer(&sock, "localhost", "4222");
+
+    // Start the thread that will try to connect to our server...
+    IFOK(s, natsThread_Create(&t, _connectToMockupServer, (void*) &arg));
+
+    if ((s == NATS_OK)
+        && (((ctx.fd = accept(sock, NULL, NULL)) == NATS_SOCK_INVALID)
+            || natsSock_SetCommonTcpOptions(ctx.fd) != NATS_OK))
+    {
+        s = NATS_SYS_ERROR;
+    }
+
+    if (s == NATS_OK)
+    {
+        char buffer[1024];
+        char info[1024];
+
+        strncpy(info,
+                "INFO {\"server_id\":\"foobar\",\"version\":\"latest\",\"go\":\"latest\",\"host\":\"localhost\",\"port\":4222,\"auth_required\":false,\"tls_required\":false,\"max_payload\":1048576}\r\n",
+                sizeof(info));
+
+        // Send INFO.
+        s = natsSock_WriteFully(&ctx, info, (int) strlen(info));
+        if (s == NATS_OK)
+        {
+            memset(buffer, 0, sizeof(buffer));
+
+            // Read connect and ping commands sent from the client
+            s = natsSock_ReadLine(&ctx, buffer, sizeof(buffer));
+            IFOK(s, natsSock_ReadLine(&ctx, buffer, sizeof(buffer)));
+        }
+        // Send PONG
+        IFOK(s, natsSock_WriteFully(&ctx, _PONG_PROTO_, _PONG_PROTO_LEN_));
+
+        // Get the PING
+        IFOK(s, natsSock_ReadLine(&ctx, buffer, sizeof(buffer)));
+    }
+
+    // Now wait for the client to close the connection...
+    nats_Sleep(500);
+
+    // Need to close those for the client side to unblock.
+    natsSock_Close(ctx.fd);
+    natsSock_Close(sock);
+
+    // Wait for the client to finish.
+    if (t != NULL)
+    {
+        natsThread_Join(t);
+        natsThread_Destroy(t);
+    }
+
+    testCond((s == NATS_OK) && (arg.status != NATS_OK));
+
+    _destroyDefaultThreadArgs(&arg);
+}
+
+
+static void
+test_FlushErrOnDisconnect(void)
+{
+    natsStatus          s = NATS_OK;
+    natsSock            sock = NATS_SOCK_INVALID;
+    natsThread          *t = NULL;
+    struct threadArg    arg;
+    natsSockCtx         ctx;
+
+    memset(&ctx, 0, sizeof(natsSockCtx));
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s != NATS_OK)
+        FAIL("@@ Unable to setup test!");
+
+    test("Check that Flush() returns an error during a disconnect: ");
+
+    arg.control = 4;
+
+    // We will hand run a fake server that will to reply to the second PING
+
+    s = _startMockupServer(&sock, "localhost", "4222");
+
+    // Start the thread that will try to connect to our server...
+    IFOK(s, natsThread_Create(&t, _connectToMockupServer, (void*) &arg));
+
+    if ((s == NATS_OK)
+        && (((ctx.fd = accept(sock, NULL, NULL)) == NATS_SOCK_INVALID)
+            || (natsSock_SetCommonTcpOptions(ctx.fd) != NATS_OK)))
+    {
+        s = NATS_SYS_ERROR;
+    }
+    if (s == NATS_OK)
+    {
+        char info[1024];
+
+        strncpy(info,
+                "INFO {\"server_id\":\"foobar\",\"version\":\"latest\",\"go\":\"latest\",\"host\":\"localhost\",\"port\":4222,\"auth_required\":false,\"tls_required\":false,\"max_payload\":1048576}\r\n",
+                sizeof(info));
+
+        // Send INFO.
+        s = natsSock_WriteFully(&ctx, info, (int) strlen(info));
+        if (s == NATS_OK)
+        {
+            char buffer[1024];
+
+            memset(buffer, 0, sizeof(buffer));
+
+            // Read connect and ping commands sent from the client
+            s = natsSock_ReadLine(&ctx, buffer, sizeof(buffer));
+            IFOK(s, natsSock_ReadLine(&ctx, buffer, sizeof(buffer)));
+        }
+        // Send PONG
+        IFOK(s, natsSock_WriteFully(&ctx, _PONG_PROTO_, _PONG_PROTO_LEN_));
+    }
+
+    // Wait a bit and kill the server.
+    nats_Sleep(500);
+    natsSock_Close(ctx.fd);
+    natsSock_Close(sock);
+
+    // Wait for the client to finish.
+    if (t != NULL)
+    {
+        natsThread_Join(t);
+        natsThread_Destroy(t);
+    }
+
+    testCond(arg.status != NATS_OK);
+
+    if (valgrind)
+        nats_Sleep(900);
+
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+test_Inbox(void)
+{
+    natsStatus  s;
+    natsInbox   *inbox = NULL;
+
+    test("Inbox starts with correct prefix: ");
+    s = natsInbox_Create(&inbox);
+    testCond((s == NATS_OK)
+             && (inbox != NULL)
+             && (strncmp(inbox, "_INBOX.", 7) == 0));
+
+    natsInbox_Destroy(inbox);
+}
+
+static void
+test_Stats(void)
+{
+    natsStatus          s;
+    natsConnection      *nc     = NULL;
+    natsStatistics      *stats  = NULL;
+    natsSubscription    *s1     = NULL;
+    natsSubscription    *s2     = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    const char          *data = "The quick brown fox jumped over the lazy dog";
+    int                 iter  = 10;
+    uint64_t            outMsgs = 0;
+    uint64_t            outBytes = 0;
+    uint64_t            inMsgs = 0;
+    uint64_t            inBytes = 0;
+
+    test("Check invalid arg: ");
+    s = natsStatistics_GetCounts(NULL, NULL, NULL, NULL, NULL, NULL);
+    testCond(s == NATS_INVALID_ARG);
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+
+    for (int i=0; (s == NATS_OK) && (i<iter); i++)
+        s = natsConnection_PublishString(nc, "foo", data);
+
+    IFOK(s, natsStatistics_Create(&stats));
+    IFOK(s, natsConnection_GetStats(nc, stats));
+    IFOK(s, natsStatistics_GetCounts(stats, NULL, NULL, &outMsgs, &outBytes, NULL));
+
+    test("Tracking OutMsgs properly: ");
+    testCond((s == NATS_OK) && (outMsgs == (uint64_t) iter));
+
+    test("Tracking OutBytes properly: ");
+    testCond((s == NATS_OK) && (outBytes == (uint64_t) (iter * strlen(data))));
+
+    // Test both sync and async versions of subscribe.
+    s = natsConnection_Subscribe(&s1, nc, "foo", _dummyMsgHandler, NULL);
+    IFOK(s, natsConnection_SubscribeSync(&s2, nc, "foo"));
+
+    for (int i=0; (s == NATS_OK) && (i<iter); i++)
+        s = natsConnection_PublishString(nc, "foo", data);
+
+    IFOK(s, natsConnection_Flush(nc));
+
+    IFOK(s, natsConnection_GetStats(nc, stats));
+    IFOK(s, natsStatistics_GetCounts(stats, &inMsgs, &inBytes, NULL, NULL, NULL));
+
+    test("Tracking inMsgs properly: ");
+    testCond((s == NATS_OK) && (inMsgs == (uint64_t)(2 * iter)));
+
+    test("Tracking inBytes properly: ");
+    testCond((s == NATS_OK) && (inBytes == (uint64_t)(2 * (iter * strlen(data)))));
+
+    natsStatistics_Destroy(stats);
+    natsSubscription_Destroy(s1);
+    natsSubscription_Destroy(s2);
+    natsConnection_Destroy(nc);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_BadSubject(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Connect: ");
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    testCond(s == NATS_OK);
+
+    test("Should get an error with empty subject: ");
+    s = natsConnection_PublishString(nc, "", "hello");
+    testCond(s != NATS_OK);
+
+    test("Error should be NATS_INVALID_SUBJECT: ");
+    testCond(s == NATS_INVALID_SUBJECT);
+
+    natsConnection_Destroy(nc);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_SubBadSubjectAndQueueName(void)
+{
+    natsStatus          s;
+    natsConnection      *nc         = NULL;
+    natsSubscription    *sub        = NULL;
+    natsPid             pid         = NATS_INVALID_PID;
+    const char          *badSubjs[] = {NULL, "", "foo bar", "foo..bar", ".foo", "bar.baz.", "baz\t.foo"};
+    const char          *goodSubjs[]= {"foo.bar", "a.bcd", "abc.d"};
+    const char          *wcSubjs[]  = {"*", "*.*", "*.foo.bar", "foo.*.bar", "foo.bar.*", ">", "foo.bar.>"};
+    const char          *badWCs[]   = {">.foo", "foo.>.bar", ">.>"};
+    const char          *badQueues[]= {"queue name", "queue.name ", " queue.name",
+                                       "queue\tname", "\tqueue.name", "\t.queue.name", "queue.name\t", "queue.name.\t",
+                                       "queue\rname", "\rqueue.name", "\r.queue.name", "queue.name\r", "queue.name.\r",
+                                       "queue\nname", "\nqueue.name", "\n.queue.name", "queue.name\n", "queue.name.\n"};
+    char                buf[256];
+    int                 i;
+
+    pid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    test("Connect ok: ");
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    testCond(s == NATS_OK);
+
+    for (i=0; i<(int) (sizeof(badSubjs)/sizeof(char*)); i++)
+    {
+        snprintf(buf, sizeof(buf), "test subject '%s': ", badSubjs[i]);
+        test(buf)
+        s = (nats_IsSubjectValid(badSubjs[i], true) ? NATS_ERR : NATS_OK);
+        testCond(s == NATS_OK);
+    }
+
+    for (i=0; i<(int) (sizeof(goodSubjs)/sizeof(char*)); i++)
+    {
+        snprintf(buf, sizeof(buf), "test subject '%s': ", goodSubjs[i]);
+        test(buf)
+        s = (nats_IsSubjectValid(goodSubjs[i], true) ? NATS_OK : NATS_ERR);
+        testCond(s == NATS_OK);
+    }
+
+    for (i=0; i<(int) (sizeof(badQueues)/sizeof(char*)); i++)
+    {
+        snprintf(buf, sizeof(buf), "test queue '%s': ", badQueues[i]);
+        test(buf)
+        s = natsConnection_QueueSubscribeSync(&sub, nc, "foo", badQueues[i]);
+        testCond((s == NATS_INVALID_QUEUE_NAME) && (sub == NULL));
+        nats_clearLastError();
+    }
+
+    for (i=0; i<(int) (sizeof(wcSubjs)/sizeof(char*)); i++)
+    {
+        snprintf(buf, sizeof(buf), "test wildcard ok '%s': ", wcSubjs[i]);
+        test(buf)
+        s = (nats_IsSubjectValid(wcSubjs[i], true) ? NATS_OK : NATS_ERR);
+        testCond(s == NATS_OK);
+    }
+
+    for (i=0; i<(int) (sizeof(wcSubjs)/sizeof(char*)); i++)
+    {
+        snprintf(buf, sizeof(buf), "test no wildcard allowed '%s': ", wcSubjs[i]);
+        test(buf)
+        s = (nats_IsSubjectValid(wcSubjs[i], false) ? NATS_ERR : NATS_OK);
+        testCond(s == NATS_OK);
+    }
+
+    for (i=0; i<(int) (sizeof(badWCs)/sizeof(char*)); i++)
+    {
+        snprintf(buf, sizeof(buf), "bad wildcard '%s': ", badWCs[i]);
+        test(buf)
+        s = (nats_IsSubjectValid(badWCs[i], true) ? NATS_ERR : NATS_OK);
+        testCond(s == NATS_OK);
+    }
+
+    natsConnection_Destroy(nc);
+
+    _stopServer(pid);
+}
+
+static void
+_subComplete(void *closure)
+{
+    struct threadArg    *arg = (struct threadArg*) closure;
+
+    natsMutex_Lock(arg->m);
+    arg->done = true;
+    natsCondition_Signal(arg->c);
+    natsMutex_Unlock(arg->m);
+}
+
+static void
+test_ClientAsyncAutoUnsub(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *sub      = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    struct threadArg    arg;
+    int                 checks;
+    int64_t             nd = 0;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if ( s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    arg.status = NATS_OK;
+    arg.control= 9;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_Subscribe(&sub, nc, "foo", _recvTestString, (void*) &arg));
+    IFOK(s, natsSubscription_AutoUnsubscribe(sub, 10));
+
+    for (int i=0; (s == NATS_OK) && (i<100); i++)
+        s = natsConnection_PublishString(nc, "foo", "hello");
+
+    IFOK(s, natsConnection_Flush(nc));
+
+    // Wait for the subscription to become invalid
+    checks = 0;
+    while (natsSubscription_IsValid(sub)
+           && (checks++ < 10))
+    {
+        nats_Sleep(100);
+    }
+    test("IsValid should be false: ");
+    testCond((sub != NULL) && !natsSubscription_IsValid(sub));
+
+    test("Received no more than max: ");
+    testCond(arg.sum == 10);
+
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("Subscribe and publish 100 msgs: ");
+    s = natsConnection_Subscribe(&sub, nc, "foo", _recvTestString, (void*) &arg);
+    IFOK(s, natsSubscription_SetOnCompleteCB(sub, _subComplete, (void*) &arg));
+    for (int i=0; (s == NATS_OK) && (i<100); i++)
+        s = natsConnection_PublishString(nc, "foo", "hello");
+    IFOK(s, natsConnection_Flush(nc));
+    checks = 0;
+    while ((natsSubscription_GetDelivered(sub, &nd) == NATS_OK)
+           && (checks++ < 10))
+    {
+        nats_Sleep(100);
+    }
+    testCond((s == NATS_OK) && (nd == 100));
+
+    test("Auto-unsub with 10, should close the sub right away: ");
+    s = natsSubscription_AutoUnsubscribe(sub, 10);
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.done)
+        s = natsCondition_TimedWait(arg.c, arg.m, 1000);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_ClientSyncAutoUnsub(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *sub      = NULL;
+    natsMsg             *msg      = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    int                 received  = 0;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_SubscribeSync(&sub, nc, "foo"));
+    IFOK(s, natsSubscription_AutoUnsubscribe(sub, 10));
+
+    for (int i=0; (s == NATS_OK) && (i<100); i++)
+        s = natsConnection_PublishString(nc, "foo", "hello");
+
+    IFOK(s, natsConnection_Flush(nc));
+
+    test("Get correct error: ");
+    for (int i=0; (s == NATS_OK) && (i<100); i++)
+    {
+        s = natsSubscription_NextMsg(&msg, sub, 10);
+        if (s == NATS_OK)
+        {
+            received++;
+            natsMsg_Destroy(msg);
+        }
+    }
+    testCond(s == NATS_MAX_DELIVERED_MSGS);
+
+    test("Received no more than max: ");
+    testCond(received == 10);
+
+    test("IsValid should be false: ");
+    testCond((sub != NULL) && !natsSubscription_IsValid(sub));
+
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("Subscribe and publish 100 msgs: ");
+    s = natsConnection_SubscribeSync(&sub, nc, "foo");
+    for (int i=0; (s == NATS_OK) && (i<100); i++)
+        s = natsConnection_PublishString(nc, "foo", "hello");
+    IFOK(s, natsConnection_Flush(nc));
+    for (int i=0; (s == NATS_OK) && (i<100); i++)
+    {
+        s = natsSubscription_NextMsg(&msg, sub, 1000);
+        received++;
+        natsMsg_Destroy(msg);
+    }
+    testCond(s == NATS_OK);
+
+    test("Auto-unsub with 10, should close the sub right away: ");
+    s = natsSubscription_AutoUnsubscribe(sub, 10);
+    testCond(!natsSubscription_IsValid(sub));
+
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_ClientAutoUnsubAndReconnect(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsOptions         *opts     = NULL;
+    natsSubscription    *sub      = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    struct threadArg    arg;
+
+    opts = _createReconnectOptions();
+    if ((opts == NULL)
+        || ((s = _createDefaultThreadArgsForCbTests(&arg)) != NATS_OK))
+    {
+        FAIL("Unable to setup test!");
+    }
+
+    arg.status = NATS_OK;
+    arg.control= 9;
+
+    s = natsOptions_SetReconnectedCB(opts, _reconnectedCb, &arg);
+    if (s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    serverPid = _startServer("nats://127.0.0.1:22222", "-p 22222", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    s = natsConnection_Connect(&nc, opts);
+    IFOK(s, natsConnection_Subscribe(&sub, nc, "foo", _recvTestString, (void*) &arg));
+    IFOK(s, natsSubscription_AutoUnsubscribe(sub, 10));
+
+    // Send less than the max
+    for (int i=0; (s == NATS_OK) && (i<5); i++)
+        s = natsConnection_PublishString(nc, "foo", "hello");
+    IFOK(s, natsConnection_Flush(nc));
+
+    // Restart the server
+    _stopServer(serverPid);
+    serverPid = _startServer("nats://127.0.0.1:22222", "-p 22222", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    // Wait for reconnect
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.reconnected)
+        s = natsCondition_TimedWait(arg.c, arg.m, 5000);
+    natsMutex_Unlock(arg.m);
+
+    // Now send more than the max
+    for (int i=0; (s == NATS_OK) && (i<50); i++)
+        s = natsConnection_PublishString(nc, "foo", "hello");
+    IFOK(s, natsConnection_Flush(nc));
+
+    nats_Sleep(10);
+
+    test("Received no more than max: ");
+    testCond((s == NATS_OK) && (arg.sum == 10));
+
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(serverPid);
+}
+
+static void
+_autoUnsub(natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure)
+{
+    struct threadArg *args = (struct threadArg*) closure;
+
+    natsMsg_Destroy(msg);
+    natsSubscription_Destroy(sub);
+    natsMutex_Lock(args->m);
+    args->done = true;
+    natsCondition_Signal(args->c);
+    natsMutex_Unlock(args->m);
+}
+
+
+static void
+test_AutoUnsubNoUnsubOnDestroy(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *sub      = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    natsBuffer          *buf      = NULL;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if ( s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    arg.status = NATS_OK;
+    arg.control= 9;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", "-DV", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Auto-unsub: ");
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_Subscribe(&sub, nc, "foo", _autoUnsub, (void*) &arg));
+    IFOK(s, natsSubscription_AutoUnsubscribe(sub, 1));
+    IFOK(s, natsConnection_PublishString(nc, "foo", "hello"));
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.done)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    testCond(s == NATS_OK);
+
+    natsConnection_Destroy(nc);
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(serverPid);
+
+    test("Read logfile: ");
+    s = nats_ReadFile(&buf, 1024, LOGFILE_NAME);
+    testCond(s == NATS_OK);
+
+    test("Check UNSUB not sent: ");
+    s = (strstr(natsBuf_Data(buf), "[UNSUB 1 ]") == NULL ? NATS_OK : NATS_ERR);
+    testCond(s == NATS_OK);
+
+    natsBuf_Destroy(buf);
+}
+
+static void
+test_NextMsgOnClosedSub(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *sub      = NULL;
+    natsMsg             *msg      = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Setup: ");
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_SubscribeSync(&sub, nc, "foo"));
+    IFOK(s, natsSubscription_Unsubscribe(sub));
+    testCond(s == NATS_OK);
+
+    test("Get correct error: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    testCond(s == NATS_INVALID_SUBSCRIPTION);
+
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+
+    _stopServer(serverPid);
+}
+
+static void
+_nextMsgKickedOut(void *closure)
+{
+    natsSubscription    *sub = (natsSubscription*) closure;
+    natsMsg             *msg = NULL;
+
+    (void) natsSubscription_NextMsg(&msg, sub, 10000);
+}
+
+static void
+test_CloseSubRelease(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *sub      = NULL;
+    natsThread          *t        = NULL;
+    natsThread          *subs[3];
+    natsPid             serverPid = NATS_INVALID_PID;
+    int64_t             start, end;
+    int                 i;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_SubscribeSync(&sub, nc, "foo"));
+
+    for (i=0; i<3; i++)
+        s = natsThread_Create(&(subs[i]), _nextMsgKickedOut, (void*) sub);
+
+    start = nats_Now();
+
+    IFOK(s, natsThread_Create(&t, _closeConnWithDelay, (void*) nc));
+
+    for (i=0; i<3; i++)
+    {
+        if (subs[i] != NULL)
+        {
+            natsThread_Join(subs[i]);
+            natsThread_Destroy(subs[i]);
+        }
+    }
+
+    end = nats_Now();
+
+    test("Test that NexMsg was kicked out properly: ");
+    testCond((s != NATS_TIMEOUT)
+             && ((end - start) <= 1000));
+
+    natsThread_Join(t);
+    natsThread_Destroy(t);
+
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_IsValidSubscriber(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *sub      = NULL;
+    natsMsg             *msg      = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_SubscribeSync(&sub, nc, "foo"));
+
+    test("Sub is valid: ");
+    testCond((s == NATS_OK) && natsSubscription_IsValid(sub));
+
+    test("Publish some msgs: ");
+    for (int i=0; (s == NATS_OK) && (i<10); i++)
+        s = natsConnection_PublishString(nc, "foo", "hello");
+
+    IFOK(s, natsConnection_Flush(nc));
+    testCond(s == NATS_OK);
+
+    test("Received msg ok: ")
+    s = natsSubscription_NextMsg(&msg, sub, 200);
+    testCond((s == NATS_OK) && (msg != NULL));
+
+    natsMsg_Destroy(msg);
+
+    test("Unsub: ");
+    s = natsSubscription_Unsubscribe(sub);
+    testCond(s == NATS_OK);
+
+    test("Received msg should fail after unsubscribe: ")
+    s = natsSubscription_NextMsg(&msg, sub, 200);
+    testCond(s != NATS_OK);
+
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_SlowSubscriber(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *sub      = NULL;
+    natsOptions         *opts     = NULL;
+    natsMsg             *msg      = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    int                 total     = 100;
+    int64_t             start, end;
+
+    s = natsOptions_Create(&opts);
+    if (s == NATS_OK)
+        s = natsOptions_SetMaxPendingMsgs(opts, total);
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Setup: ");
+    s = natsConnection_Connect(&nc, opts);
+    IFOK(s, natsConnection_SubscribeSync(&sub, nc, "foo"));
+
+    for (int i=0;
+        (s == NATS_OK) && (i < total + 100); i++)
+    {
+        s = natsConnection_PublishString(nc, "foo", "hello");
+    }
+    testCond(s == NATS_OK);
+
+    test("Check flush returns before timeout: ");
+    start = nats_Now();
+
+    (void) natsConnection_FlushTimeout(nc, 5000);
+
+    end = nats_Now();
+
+    testCond((end - start) < 5000);
+
+    test("NextMsg should report error: ");
+    // Make sure NextMsg returns an error to indicate slow consumer
+    s = natsSubscription_NextMsg(&msg, sub, 200);
+    testCond(s != NATS_OK);
+
+    natsMsg_Destroy(msg);
+    natsSubscription_Destroy(sub);
+    natsOptions_Destroy(opts);
+    natsConnection_Destroy(nc);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_SlowAsyncSubscriber(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *sub      = NULL;
+    natsOptions         *opts     = NULL;
+    const char          *lastErr  = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    int                 total     = 100;
+    int64_t             start, end;
+    struct threadArg    arg;
+
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_SetMaxPendingMsgs(opts, total));
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if ( s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    arg.status = NATS_OK;
+    arg.control= 7;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    s = natsConnection_Connect(&nc, opts);
+    IFOK(s, natsConnection_Subscribe(&sub, nc, "foo", _recvTestString, (void*) &arg));
+
+    for (int i=0;
+        (s == NATS_OK) && (i < (total + 100)); i++)
+    {
+        s = natsConnection_PublishString(nc, "foo", "hello");
+    }
+
+    test("Check Publish does not fail due to SlowConsumer: ");
+    testCond(s == NATS_OK);
+
+    test("Check flush returns before timeout: ");
+    start = nats_Now();
+
+    s = natsConnection_FlushTimeout(nc, 5000);
+
+    end = nats_Now();
+
+    testCond((end - start) < 5000);
+
+    test("Flush should not report an error: ");
+    testCond(s == NATS_OK);
+
+    // Make sure the callback blocks before checking for slow consumer
+    natsMutex_Lock(arg.m);
+
+    while ((s != NATS_TIMEOUT) && !(arg.msgReceived))
+        s = natsCondition_TimedWait(arg.c, arg.m, 5000);
+
+    natsMutex_Unlock(arg.m);
+
+    test("Last Error should be SlowConsumer: ");
+    testCond((s == NATS_OK)
+             && natsConnection_GetLastError(nc, &lastErr) == NATS_SLOW_CONSUMER);
+
+    // Release the sub
+    natsMutex_Lock(arg.m);
+
+    // Unblock the wait
+    arg.closed = true;
+
+    // And destroy the subscription here so that the next msg callback
+    // is not invoked.
+    natsSubscription_Destroy(sub);
+
+    natsCondition_Signal(arg.c);
+    arg.msgReceived = false;
+    natsMutex_Unlock(arg.m);
+
+    // Let the callback finish
+    natsMutex_Lock(arg.m);
+    while (!arg.msgReceived)
+        natsCondition_TimedWait(arg.c, arg.m, 5000);
+    natsMutex_Unlock(arg.m);
+
+    natsOptions_Destroy(opts);
+    natsConnection_Destroy(nc);
+
+    if (valgrind)
+        nats_Sleep(900);
+
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(serverPid);
+}
+
+static void
+_slowConsErrCB(natsConnection *nc, natsSubscription *sub, natsStatus err, void *closure)
+{
+    struct threadArg *arg    = (struct threadArg*) closure;
+
+    natsMutex_Lock(arg->m);
+    if (err == NATS_SLOW_CONSUMER)
+    {
+        arg->sum++;
+        natsCondition_Signal(arg->c);
+    }
+    natsMutex_Unlock(arg->m);
+}
+
+static void
+test_SlowConsumerCB(void)
+{
+    natsStatus          s;
+    natsConnection      *nc     = NULL;
+    natsSubscription    *sub    = NULL;
+    natsOptions         *opts   = NULL;
+    natsPid             pid     = NATS_INVALID_PID;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    IFOK(s, natsOptions_Create(&opts));
+    IFOK(s, natsOptions_SetMaxPendingMsgs(opts, 1));
+    IFOK(s, natsOptions_SetErrorHandler(opts, _slowConsErrCB, (void*) &arg));
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    pid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    test("Connect: ");
+    s = natsConnection_Connect(&nc, opts);
+    testCond(s == NATS_OK);
+
+    test("Create sub: ")
+    IFOK(s, natsConnection_SubscribeSync(&sub, nc, "foo"))
+    testCond(s == NATS_OK);
+
+    test("Publish 2 messages: ");
+    IFOK(s, natsConnection_PublishString(nc, "foo", "msg1"));
+    IFOK(s, natsConnection_PublishString(nc, "foo", "msg2"));
+    testCond(s == NATS_OK);
+
+    test("Error handler invoked: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && (arg.sum != 1))
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    test("Produce 1 message: ");
+    IFOK(s, natsConnection_PublishString(nc, "foo", "msg3"));
+    testCond(s == NATS_OK);
+
+    test("Check handler is not invoked: ");
+    nats_Sleep(50);
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && (arg.sum != 1))
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    natsConnection_Destroy(nc);
+    natsSubscription_Destroy(sub);
+    natsOptions_Destroy(opts);
+    _stopServer(pid);
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+test_PendingLimitsDeliveredAndDropped(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *sub      = NULL;
+    const char          *lastErr  = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    int                 total     = 100;
+    int                 sent      = total + 20;
+    int                 msgsLimit = 0;
+    int                 bytesLimit= 0;
+    int                 msgs      = 0;
+    int                 bytes     = 0;
+    int64_t             dropped   = 0;
+    int64_t             delivered = 0;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    arg.status = NATS_OK;
+    arg.control= 7;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_Subscribe(&sub, nc, "foo", _recvTestString, (void*) &arg));
+
+    if (s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    test("Settings, invalid args, NULL sub: ");
+    s = natsSubscription_SetPendingLimits(NULL, 1, 1);
+    testCond(s != NATS_OK);
+
+    test("Settings, invalid args, zero msgs: ");
+    s = natsSubscription_SetPendingLimits(sub, 0, 1);
+    testCond(s != NATS_OK);
+
+    test("Settings, invalid args, zero bytes: ");
+    s = natsSubscription_SetPendingLimits(sub, 1, 0);
+    testCond(s != NATS_OK);
+
+    test("Check pending limits, NULL sub: ");
+    s = natsSubscription_GetPendingLimits(NULL, &msgsLimit, &bytesLimit);
+    testCond(s != NATS_OK);
+
+    test("Check pending limits, other params NULL are OK: ");
+    s = natsSubscription_GetPendingLimits(sub, NULL, NULL);
+    testCond(s == NATS_OK);
+
+    test("Check pending limits, msgsLimit NULL is OK: ");
+    s = natsSubscription_GetPendingLimits(sub, NULL, &bytesLimit);
+    testCond((s == NATS_OK) && (bytesLimit == NATS_OPTS_DEFAULT_MAX_PENDING_MSGS * 1024));
+
+    test("Check pending limits, msgsLibytesLimitmit NULL is OK: ");
+    s = natsSubscription_GetPendingLimits(sub, &msgsLimit, NULL);
+    testCond((s == NATS_OK) && (msgsLimit == NATS_OPTS_DEFAULT_MAX_PENDING_MSGS));
+
+    test("Set negative value for msgs OK: ");
+    s = natsSubscription_SetPendingLimits(sub, -1, 100);
+    testCond(s == NATS_OK);
+
+    test("Set negative value for bytes OK: ");
+    s = natsSubscription_SetPendingLimits(sub, 100, -1);
+    testCond(s == NATS_OK);
+
+    test("Set negative values OK: ");
+    s = natsSubscription_SetPendingLimits(sub, -10, -10);
+    testCond(s == NATS_OK);
+
+    test("Get pending with negative values returned OK: ");
+    s = natsSubscription_GetPendingLimits(sub, &msgsLimit, &bytesLimit);
+    testCond((s == NATS_OK) && (msgsLimit == -10) && (bytesLimit == -10));
+
+    msgsLimit = 0;
+    bytesLimit = 0;
+
+    test("Set valid values: ");
+    s = natsSubscription_SetPendingLimits(sub, total, total * 1024);
+    testCond(s == NATS_OK);
+
+    test("Check pending limits: ");
+    s = natsSubscription_GetPendingLimits(sub, &msgsLimit, &bytesLimit);
+    testCond((s == NATS_OK) && (msgsLimit == total) && (bytesLimit == total * 1024));
+
+    for (int i=0;
+        (s == NATS_OK) && (i < sent); i++)
+    {
+        s = natsConnection_PublishString(nc, "foo", "hello");
+    }
+    IFOK(s, natsConnection_Flush(nc));
+
+    // Make sure the callback blocks before checking for slow consumer
+    natsMutex_Lock(arg.m);
+
+    while ((s != NATS_TIMEOUT) && !arg.msgReceived)
+        s = natsCondition_TimedWait(arg.c, arg.m, 5000);
+
+    natsMutex_Unlock(arg.m);
+
+    test("Last Error should be SlowConsumer: ");
+    testCond((s == NATS_OK)
+             && natsConnection_GetLastError(nc, &lastErr) == NATS_SLOW_CONSUMER);
+
+    // Check the pending values
+    test("Check pending values, NULL sub: ");
+    s = natsSubscription_GetPending(NULL, &msgs, &bytes);
+    testCond(s != NATS_OK);
+
+    test("Check pending values, NULL msgs: ");
+    s = natsSubscription_GetPending(sub, NULL, &bytes);
+    testCond(s == NATS_OK);
+
+    test("Check pending values, NULL bytes: ");
+    s = natsSubscription_GetPending(sub, &msgs, NULL);
+    testCond(s == NATS_OK);
+
+    msgs = 0;
+    bytes = 0;
+
+    test("Check pending values: ");
+    s = natsSubscription_GetPending(sub, &msgs, &bytes);
+    testCond((s == NATS_OK)
+             && ((msgs == total) || (msgs == total - 1))
+             && ((bytes == total * 5) || (bytes == (total - 1) * 5)));
+
+    test("Check dropped: NULL sub: ");
+    s = natsSubscription_GetDropped(NULL, &dropped);
+    testCond(s != NATS_OK);
+
+    test("Check dropped, NULL msgs: ");
+    s = natsSubscription_GetDropped(sub, NULL);
+    testCond(s != NATS_OK);
+
+    msgs = 0;
+    test("Check dropped: ");
+    s = natsSubscription_GetDropped(sub, &dropped);
+    testCond((s == NATS_OK)
+            && ((dropped == (int64_t)(sent - total))
+                || (dropped == (int64_t)(sent - total - 1))));
+
+    test("Check delivered: NULL sub: ");
+    s = natsSubscription_GetDelivered(NULL, &delivered);
+    testCond(s != NATS_OK);
+
+    test("Check delivered: NULL msgs: ");
+    s = natsSubscription_GetDelivered(sub, NULL);
+    testCond(s != NATS_OK);
+
+    msgs = 0;
+    test("Check delivered: ");
+    s = natsSubscription_GetDelivered(sub, &delivered);
+    testCond((s == NATS_OK) && (delivered == 1));
+
+    test("Check get stats pending: ");
+    s = natsSubscription_GetStats(sub, &msgs, &bytes, NULL, NULL, NULL, NULL);
+    testCond((s == NATS_OK)
+              && ((msgs == total) || (msgs == total - 1))
+              && ((bytes == total * 5) || (bytes == (total - 1) * 5)));
+
+    test("Check get stats max pending: ");
+    s = natsSubscription_GetStats(sub, NULL, NULL, &msgs, &bytes, NULL, NULL);
+    testCond((s == NATS_OK)
+             && (msgs >= total - 1) && (msgs <= total)
+             && (bytes >= (total - 1) * 5) && (bytes <= total * 5));
+
+    test("Check get stats delivered: ");
+    s = natsSubscription_GetStats(sub, NULL, NULL, NULL, NULL, &delivered, NULL);
+    testCond((s == NATS_OK) && (delivered == 1));
+
+    test("Check get stats dropped: ");
+    s = natsSubscription_GetStats(sub, NULL, NULL, NULL, NULL, NULL, &dropped);
+    testCond((s == NATS_OK)
+             && ((dropped == (int64_t) (sent - total))
+                 || (dropped == (int64_t) (sent - total - 1))));
+
+    test("Check get stats all NULL: ");
+    s = natsSubscription_GetStats(sub, NULL, NULL, NULL, NULL, NULL, NULL);
+    testCond(s == NATS_OK);
+
+    // Release the sub
+    natsMutex_Lock(arg.m);
+
+    // Unblock the wait
+    arg.closed = true;
+
+    // And close the subscription here so that the next msg callback
+    // is not invoked.
+    natsSubscription_Unsubscribe(sub);
+
+    natsCondition_Signal(arg.c);
+    natsMutex_Unlock(arg.m);
+
+    // All these calls should fail with a closed subscription
+    test("SetPendingLimit on closed sub: ");
+    s = natsSubscription_SetPendingLimits(sub, 1, 1);
+    testCond(s != NATS_OK);
+
+    test("GetPendingLimit on closed sub: ");
+    s = natsSubscription_GetPendingLimits(sub, NULL, NULL);
+    testCond(s != NATS_OK);
+
+    test("GetPending on closed sub: ");
+    s = natsSubscription_GetPending(sub, &msgs, &bytes);
+    testCond(s != NATS_OK);
+
+    test("GetDelivered on closed sub: ");
+    s = natsSubscription_GetDelivered(sub, &delivered);
+    testCond(s != NATS_OK);
+
+    test("GetDropped on closed sub: ");
+    s = natsSubscription_GetDropped(sub, &dropped);
+    testCond(s != NATS_OK);
+
+    test("Check get stats on closed sub: ");
+    s = natsSubscription_GetStats(sub, NULL, NULL, NULL, NULL, NULL, NULL);
+    testCond(s != NATS_OK);
+
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_PendingLimitsWithSyncSub(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *sub      = NULL;
+    natsMsg             *msg      = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    int                 msgsLimit = 0;
+    int                 bytesLimit= 0;
+    int                 msgs      = 0;
+    int                 bytes     = 0;
+    int64_t             dropped   = 0;
+    int64_t             delivered = 0;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_SubscribeSync(&sub, nc, "foo"));
+    IFOK(s, natsSubscription_SetPendingLimits(sub, 10000, 10));
+
+    if (s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    test("Check pending limits: ");
+    s = natsSubscription_GetPendingLimits(sub, &msgsLimit, &bytesLimit);
+    testCond((s == NATS_OK) && (msgsLimit == 10000) && (bytesLimit == 10));
+
+    test("Can publish: ");
+    s = natsConnection_PublishString(nc, "foo", "abcde");
+    IFOK(s, natsConnection_PublishString(nc, "foo", "abcdefghijklmnopqrstuvwxyz"));
+    IFOK(s, natsConnection_Flush(nc));
+    testCond(s == NATS_OK);
+
+    // Check the pending values
+    test("Check pending values: ");
+    s = natsSubscription_GetPending(sub, &msgs, &bytes);
+    testCond((s == NATS_OK) && (msgs == 1) && (bytes == 5));
+
+    msgs = 0;
+    test("Check dropped: ");
+    s = natsSubscription_GetDropped(sub, &dropped);
+    testCond((s == NATS_OK) && (dropped == 1));
+
+    test("Can publish small: ");
+    s = natsConnection_PublishString(nc, "foo", "abc");
+    IFOK(s, natsConnection_Flush(nc));
+    testCond(s == NATS_OK);
+
+    test("Receive first msg: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    testCond((s == NATS_OK)
+             && (msg != NULL)
+             && (strcmp(natsMsg_GetData(msg), "abcde") == 0));
+
+    msgs = 0;
+    test("Check delivered: ");
+    s = natsSubscription_GetDelivered(sub, &delivered);
+    testCond((s == NATS_OK) && (delivered == 1));
+
+    natsMsg_Destroy(msg);
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_AsyncSubscriptionPending(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *sub      = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    int                 total     = 100;
+    int                 msgs      = 0;
+    int                 bytes     = 0;
+    int                 mlen      = 10;
+    int                 totalSize = total * mlen;
+    uint64_t            queuedMsgs= 0;
+    int                 i;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    arg.status = NATS_OK;
+    arg.control= 7;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_Subscribe(&sub, nc, "foo", _recvTestString, (void*) &arg));
+
+    if (s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    // Check with invalid args
+    test("Call MaxPending with invalid args: NULL sub: ");
+    s = natsSubscription_GetMaxPending(NULL, &msgs, &bytes);
+    testCond(s != NATS_OK);
+
+    test("Call MaxPending with invalid args: other NULL params OK: ");
+    s = natsSubscription_GetMaxPending(sub, NULL, &bytes);
+    IFOK(s, natsSubscription_GetMaxPending(sub, &msgs, NULL));
+    IFOK(s, natsSubscription_GetMaxPending(sub, NULL, NULL));
+    testCond(s == NATS_OK);
+
+    for (i = 0; (s == NATS_OK) && (i < total); i++)
+        s = natsConnection_PublishString(nc, "foo", "0123456789");
+
+    IFOK(s, natsConnection_Flush(nc));
+
+    // Wait that a message is received, so checks are safe
+    natsMutex_Lock(arg.m);
+
+    while ((s != NATS_TIMEOUT) && !arg.msgReceived)
+        s = natsCondition_TimedWait(arg.c, arg.m, 5000);
+
+    natsMutex_Unlock(arg.m);
+
+    // Test old way
+    test("Test queued msgs old way: ");
+    s = natsSubscription_QueuedMsgs(sub, &queuedMsgs);
+    testCond((s == NATS_OK)
+            && (((int)queuedMsgs == total) || ((int)queuedMsgs == total - 1)));
+
+    // New way, make sure the same and check bytes.
+    test("Test new way: ");
+    s = natsSubscription_GetPending(sub, &msgs, &bytes);
+    testCond((s == NATS_OK)
+             && ((msgs == total) || (msgs == total - 1))
+             && ((bytes == totalSize) || (bytes == totalSize - mlen)));
+
+
+    // Make sure max has been set. Since we block after the first message is
+    // received, MaxPending should be >= total - 1 and <= total
+    test("Check max pending: ");
+    s = natsSubscription_GetMaxPending(sub, &msgs, &bytes);
+    testCond((s == NATS_OK)
+             && ((msgs <= total) && (msgs >= total-1))
+             && ((bytes <= totalSize) && (bytes >= totalSize-mlen)));
+
+    test("Check ClearMaxPending: ");
+    s = natsSubscription_ClearMaxPending(sub);
+    if (s == NATS_OK)
+        s = natsSubscription_GetMaxPending(sub, &msgs, &bytes);
+    testCond((s == NATS_OK) && (msgs == 0) && (bytes == 0));
+
+    natsMutex_Lock(arg.m);
+    arg.closed = true;
+    natsSubscription_Unsubscribe(sub);
+    natsCondition_Signal(arg.c);
+    arg.msgReceived = false;
+    natsMutex_Unlock(arg.m);
+
+    // These calls should fail once the subscription is closed.
+    test("Check MaxPending on closed sub: ");
+    s = natsSubscription_GetMaxPending(sub, &msgs, &bytes);
+    testCond(s != NATS_OK);
+
+    test("Check ClearMaxPending on closed sub: ");
+    s = natsSubscription_ClearMaxPending(sub);
+    testCond(s != NATS_OK);
+
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+
+    natsMutex_Lock(arg.m);
+    while (!arg.msgReceived)
+        natsCondition_TimedWait(arg.c, arg.m, 5000);
+    natsMutex_Unlock(arg.m);
+
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_AsyncSubscriptionPendingDrain(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *sub      = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    int                 total     = 100;
+    int                 msgs      = 0;
+    int                 bytes     = 0;
+    int64_t             delivered = 0;
+    int                 i;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    arg.status = NATS_OK;
+    arg.string = "0123456789";
+    arg.control= 1;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_Subscribe(&sub, nc, "foo", _recvTestString, (void*) &arg));
+
+    if (s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    for (i = 0; (s == NATS_OK) && (i < total); i++)
+        s = natsConnection_PublishString(nc, "foo", arg.string);
+
+    IFOK(s, natsConnection_Flush(nc));
+
+    test("Wait for all delivered: ");
+    msgs = 0;
+    for (i=0; (s == NATS_OK) && (i<500); i++)
+    {
+        s = natsSubscription_GetDelivered(sub, &delivered);
+        if ((s == NATS_OK) && (delivered == (int64_t) total))
+            break;
+
+        nats_Sleep(10);
+    }
+    testCond((s == NATS_OK) && (delivered == (int64_t) total));
+
+    test("Check pending: ");
+    s = natsSubscription_GetPending(sub, &msgs, &bytes);
+    testCond((s == NATS_OK) && (msgs == 0) && (bytes == 0));
+
+    natsSubscription_Unsubscribe(sub);
+
+    test("Check Delivered on closed sub: ");
+    s = natsSubscription_GetDelivered(sub, &delivered);
+    testCond(s != NATS_OK);
+
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_SyncSubscriptionPending(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsMsg             *msg      = NULL;
+    natsSubscription    *sub      = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    int                 total     = 100;
+    int                 msgs      = 0;
+    int                 bytes     = 0;
+    int                 mlen      = 10;
+    int                 totalSize = total * mlen;
+    uint64_t            queuedMsgs= 0;
+    int                 i;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_SubscribeSync(&sub, nc, "foo"));
+
+    if (s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    // Check with invalid args
+    test("Call MaxPending with invalid args: NULL sub: ");
+    s = natsSubscription_GetMaxPending(NULL, &msgs, &bytes);
+    testCond(s != NATS_OK);
+
+    test("Call MaxPending with invalid args: other NULL params OK: ");
+    s = natsSubscription_GetMaxPending(sub, NULL, &bytes);
+    IFOK(s, natsSubscription_GetMaxPending(sub, &msgs, NULL));
+    IFOK(s, natsSubscription_GetMaxPending(sub, NULL, NULL));
+    testCond(s == NATS_OK);
+
+    for (i = 0; (s == NATS_OK) && (i < total); i++)
+        s = natsConnection_PublishString(nc, "foo", "0123456789");
+
+    IFOK(s, natsConnection_Flush(nc));
+
+    // Test old way
+    test("Test queued msgs old way: ");
+    s = natsSubscription_QueuedMsgs(sub, &queuedMsgs);
+    testCond((s == NATS_OK)
+            && (((int)queuedMsgs == total) || ((int)queuedMsgs == total - 1)));
+
+    // New way, make sure the same and check bytes.
+    test("Test new way: ");
+    s = natsSubscription_GetPending(sub, &msgs, &bytes);
+    testCond((s == NATS_OK)
+             && ((msgs == total) || (msgs == total - 1))
+             && ((bytes == totalSize) || (bytes == totalSize - mlen)));
+
+
+    // Make sure max has been set. Since we block after the first message is
+    // received, MaxPending should be >= total - 1 and <= total
+    test("Check max pending: ");
+    s = natsSubscription_GetMaxPending(sub, &msgs, &bytes);
+    testCond((s == NATS_OK)
+             && ((msgs <= total) && (msgs >= total-1))
+             && ((bytes <= totalSize) && (bytes >= totalSize-mlen)));
+
+    test("Check ClearMaxPending: ");
+    s = natsSubscription_ClearMaxPending(sub);
+    IFOK(s, natsSubscription_GetMaxPending(sub, &msgs, &bytes));
+    testCond((s == NATS_OK) && (msgs == 0) && (bytes == 0));
+
+    // Drain all but one
+    for (i=0; (s == NATS_OK) && (i<total-1); i++)
+    {
+        s = natsSubscription_NextMsg(&msg, sub, 1000);
+        if (s == NATS_OK)
+            natsMsg_Destroy(msg);
+    }
+
+    test("Check pending: ");
+    s = natsSubscription_GetPending(sub, &msgs, &bytes);
+    testCond((s == NATS_OK) && (msgs == 1) && (bytes == mlen));
+
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_SyncSubscriptionPendingDrain(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsMsg             *msg      = NULL;
+    natsSubscription    *sub      = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    int                 total     = 100;
+    int                 msgs      = 0;
+    int                 bytes     = 0;
+    int64_t             delivered = 0;
+    int                 i;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_SubscribeSync(&sub, nc, "foo"));
+
+    if (s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    for (i = 0; (s == NATS_OK) && (i < total); i++)
+        s = natsConnection_PublishString(nc, "foo", "0123456789");
+
+    IFOK(s, natsConnection_Flush(nc));
+
+    test("Wait for all delivered: ");
+    do
+    {
+        do
+        {
+            s = natsSubscription_NextMsg(&msg, sub, 10);
+            if (s == NATS_OK)
+                natsMsg_Destroy(msg);
+        }
+        while (s == NATS_OK);
+
+        s = natsSubscription_GetDelivered(sub, &delivered);
+        if ((s == NATS_OK) && (delivered == (int64_t) total))
+            break;
+
+        nats_Sleep(100);
+        i++;
+    }
+    while ((s == NATS_OK) && (i < 50));
+    testCond((s == NATS_OK) && (delivered == (int64_t) total));
+
+    test("Check pending: ");
+    s = natsSubscription_GetPending(sub, &msgs, &bytes);
+    testCond((s == NATS_OK) && (msgs == 0) && (bytes == 0));
+
+    natsSubscription_Unsubscribe(sub);
+
+    test("Check Delivered on closed sub: ");
+    s = natsSubscription_GetDelivered(sub, &delivered);
+    testCond(s != NATS_OK);
+
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+
+    _stopServer(serverPid);
+}
+
+static void
+_asyncErrCb(natsConnection *nc, natsSubscription *sub, natsStatus err, void* closure)
+{
+    struct threadArg    *arg = (struct threadArg*) closure;
+
+    natsMutex_Lock(arg->m);
+
+    if (arg->sum == 1)
+    {
+        natsMutex_Unlock(arg->m);
+        return;
+    }
+
+    arg->sum = 1;
+
+    if (sub != arg->sub)
+        arg->status = NATS_ERR;
+
+    if ((arg->status == NATS_OK) && (err != NATS_SLOW_CONSUMER))
+        arg->status = NATS_ERR;
+
+    arg->closed = true;
+    arg->done = true;
+    natsCondition_Signal(arg->c);
+
+    natsMutex_Unlock(arg->m);
+}
+
+static void
+test_AsyncErrHandler(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsOptions         *opts     = NULL;
+    natsSubscription    *sub      = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    arg.status = NATS_OK;
+    arg.control= 7;
+
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_SetURL(opts, NATS_DEFAULT_URL));
+    IFOK(s, natsOptions_SetMaxPendingMsgs(opts, 10));
+    IFOK(s, natsOptions_SetErrorHandler(opts, _asyncErrCb, (void*) &arg));
+
+    if (s != NATS_OK)
+        FAIL("Unable to create options for test AsyncErrHandler");
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    s = natsConnection_Connect(&nc, opts);
+    IFOK(s, natsConnection_Subscribe(&sub, nc, "async_test", _recvTestString, (void*) &arg));
+
+    natsMutex_Lock(arg.m);
+    arg.sub = sub;
+    natsMutex_Unlock(arg.m);
+
+    for (int i=0;
+        (s == NATS_OK) && (i < (opts->maxPendingMsgs + 100)); i++)
+    {
+        s = natsConnection_PublishString(nc, "async_test", "hello");
+    }
+    IFOK(s, natsConnection_Flush(nc));
+
+    // Wait for async err callback
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.done)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+
+    test("Aync fired properly, and all checks are good: ");
+    testCond((s == NATS_OK)
+             && arg.done
+             && arg.closed
+             && (arg.status == NATS_OK));
+
+    natsOptions_Destroy(opts);
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(serverPid);
+}
+
+static void
+_responseCb(natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure)
+{
+    struct threadArg    *arg = (struct threadArg*) closure;
+
+    natsMutex_Lock(arg->m);
+
+    arg->closed = true;
+    arg->done = true;
+    natsCondition_Signal(arg->c);
+
+    natsMutex_Unlock(arg->m);
+
+    natsMsg_Destroy(msg);
+}
+
+static void
+_startCb(natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure)
+{
+    struct threadArg    *arg = (struct threadArg*) closure;
+    natsInbox           *response = NULL;
+    natsStatus          s;
+
+    natsMutex_Lock(arg->m);
+
+    s = natsInbox_Create(&response);
+    IFOK(s, natsConnection_Subscribe(&(arg->sub), nc, response, _responseCb, (void*) arg));
+    IFOK(s, natsConnection_PublishRequestString(nc, "helper", response, "Help Me!"));
+
+    if (s != NATS_OK)
+        arg->status = s;
+
+    // We need to destroy the inbox. It has been copied by the
+    // natsConnection_Subscribe() call.
+    natsInbox_Destroy(response);
+
+    natsMutex_Unlock(arg->m);
+
+    natsMsg_Destroy(msg);
+}
+
+static void
+test_AsyncSubscriberStarvation(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *sub      = NULL;
+    natsSubscription    *sub2     = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    arg.status = NATS_OK;
+    arg.control= 4;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_Subscribe(&sub, nc, "helper",
+                                     _recvTestString, (void*) &arg));
+    IFOK(s, natsConnection_Subscribe(&sub2, nc, "start",
+                                     _startCb, (void*) &arg));
+
+    IFOK(s, natsConnection_PublishString(nc, "start", "Begin"));
+    IFOK(s, natsConnection_Flush(nc));
+
+    // Wait for end of test
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.done)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+
+    test("Test not stalled in cb waiting for other cb: ");
+    testCond((s == NATS_OK)
+             && arg.done
+             && (arg.status == NATS_OK));
+
+    natsSubscription_Destroy(arg.sub);
+    natsSubscription_Destroy(sub);
+    natsSubscription_Destroy(sub2);
+    natsConnection_Destroy(nc);
+
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_AsyncSubscriberOnClose(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *sub      = NULL;
+    natsSubscription    *sub2     = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    int                 seen      = 0;
+    int                 checks    = 0;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    arg.status = NATS_OK;
+    arg.control= 8;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_Subscribe(&sub, nc, "foo",
+                                     _recvTestString, (void*) &arg));
+
+    for (int i=0; (s == NATS_OK) && (i < 10); i++)
+        s = natsConnection_PublishString(nc, "foo", "Hello World");
+
+    IFOK(s, natsConnection_Flush(nc));
+
+    // Wait to receive the first message
+    test("Wait for first message: ");
+    natsMutex_Lock(arg.m);
+    while ((s == NATS_OK) && (arg.sum != 1))
+    {
+        natsMutex_Unlock(arg.m);
+        nats_Sleep(100);
+        natsMutex_Lock(arg.m);
+        if (checks++ > 10)
+            s = NATS_ILLEGAL_STATE;
+    }
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    natsConnection_Close(nc);
+
+    // Release callbacks
+    natsMutex_Lock(arg.m);
+    arg.closed = true;
+    natsCondition_Broadcast(arg.c);
+    natsMutex_Unlock(arg.m);
+
+    // Wait for some time
+    nats_Sleep(100);
+
+    natsMutex_Lock(arg.m);
+    seen = arg.sum;
+    natsMutex_Unlock(arg.m);
+
+    test("Make sure only one callback fired: ");
+    testCond(seen == 1);
+
+    natsSubscription_Destroy(sub);
+    natsSubscription_Destroy(sub2);
+    natsConnection_Destroy(nc);
+
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_NextMsgCallOnAsyncSub(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *sub      = NULL;
+    natsMsg             *msg      = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Setup: ");
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_Subscribe(&sub, nc, "foo", _recvTestString, NULL))
+    testCond(s == NATS_OK);
+
+    test("NextMsg should fail for async sub: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    testCond((s != NATS_OK) && (msg == NULL));
+
+    natsSubscription_Destroy(sub);
+
+    natsConnection_Destroy(nc);
+
+    _stopServer(serverPid);
+}
+
+static void
+testSubOnComplete(void *closure)
+{
+    struct threadArg *arg = (struct threadArg*) closure;
+
+    natsMutex_Lock(arg->m);
+    arg->status = (arg->control == 2 ? NATS_OK : NATS_ERR);
+    arg->done = true;
+    natsCondition_Signal(arg->c);
+    natsMutex_Unlock(arg->m);
+}
+
+static void
+testOnCompleteMsgHandler(natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure)
+{
+    struct threadArg *arg = (struct threadArg*) closure;
+
+    natsMutex_Lock(arg->m);
+    arg->control = 1;
+    natsCondition_Signal(arg->c);
+    natsMutex_Unlock(arg->m);
+
+    // Sleep here so that main thread invokes Unsubscribe() and we make sure that the
+    // onComplete is not invoked until this function returns.
+    nats_Sleep(500);
+
+    natsMutex_Lock(arg->m);
+    arg->control = 2;
+    natsMutex_Unlock(arg->m);
+
+    natsMsg_Destroy(msg);
+}
+
+static void
+test_SubOnComplete(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsSubscription    *sub      = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Invalid arg: ");
+    s = natsSubscription_SetOnCompleteCB(NULL, testSubOnComplete, NULL);
+    testCond(s == NATS_INVALID_ARG);
+
+    test("Connect + sub: ");
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_SubscribeSync(&sub, nc, "foo"));
+    testCond(s == NATS_OK);
+
+    test("Invalid sub (NULL): ");
+    s= natsSubscription_SetOnCompleteCB(sub, testSubOnComplete, NULL);
+    testCond(s == NATS_INVALID_SUBSCRIPTION);
+
+    natsSubscription_Unsubscribe(sub);
+    test("Invalid sub (sync): ");
+    s = natsSubscription_SetOnCompleteCB(sub, testSubOnComplete, NULL);
+    testCond(s == NATS_INVALID_SUBSCRIPTION);
+
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+    arg.status = NATS_ERR;
+    test("SetOnCompleteCB ok: ");
+    s = natsConnection_Subscribe(&sub, nc, "foo", testOnCompleteMsgHandler, &arg);
+    IFOK(s, natsSubscription_SetOnCompleteCB(sub, testSubOnComplete, &arg));
+    testCond(s == NATS_OK);
+    test("SetOnCompleteCB to NULL ok: ");
+    s = natsSubscription_SetOnCompleteCB(sub, NULL, NULL);
+    if (s == NATS_OK)
+    {
+        natsSub_Lock(sub);
+        s = (((sub->onCompleteCB == NULL) && (sub->onCompleteCBClosure == NULL)) ? NATS_OK : NATS_ERR);
+        natsSub_Unlock(sub);
+    }
+    testCond(s == NATS_OK);
+    test("OnComplete invoked after last message: ");
+    s = natsSubscription_SetOnCompleteCB(sub, testSubOnComplete, &arg);
+    IFOK(s, natsConnection_PublishString(nc, "foo", "hello"));
+    IFOK(s, natsConnection_Flush(nc));
+    if (s == NATS_OK)
+    {
+        // Wait for message handler to be invoked
+        natsMutex_Lock(arg.m);
+        while ((s != NATS_TIMEOUT) && (arg.control != 1))
+            s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+        natsMutex_Unlock(arg.m);
+    }
+    IFOK(s, natsSubscription_Unsubscribe(sub));
+    if (s == NATS_OK)
+    {
+        // Now wait for the onComplete to return.
+        natsMutex_Lock(arg.m);
+        while ((s != NATS_TIMEOUT) && !arg.done)
+            s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+
+        // This will be OK if complete callback was invoked after msg handler returned,
+        // otherwise will be NATS_ERR;
+        s = arg.status;
+        natsMutex_Unlock(arg.m);
+    }
+    testCond(s == NATS_OK);
+
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_ServersOption(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    char                buffer[128];
+    int                 serversCount;
+
+    serversCount = sizeof(testServers) / sizeof(char *);
+
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_SetNoRandomize(opts, true));
+#if _WIN32
+    IFOK(s, natsOptions_SetTimeout(opts, 250));
+#endif
+
+    if (s != NATS_OK)
+        FAIL("Unable to create options for test ServerOptions");
+
+    test("Connect should fail with NATS_NO_SERVER: ");
+    s = natsConnection_Connect(&nc, opts);
+    testCond((nc == NULL) && (s == NATS_NO_SERVER));
+
+    test("Connect with list of servers should fail with NATS_NO_SERVER: ");
+    s = natsOptions_SetServers(opts, testServers, serversCount);
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    testCond((nc == NULL) && (s == NATS_NO_SERVER));
+
+    serverPid = _startServer("nats://127.0.0.1:1222", "-p 1222", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    buffer[0] = '\0';
+    test("Can connect to first: ")
+    s = natsConnection_Connect(&nc, opts);
+    IFOK(s, natsConnection_GetConnectedUrl(nc, buffer, sizeof(buffer)));
+    testCond((s == NATS_OK)
+             && (buffer[0] != '\0')
+             && (strcmp(buffer, testServers[0]) == 0));
+
+    natsConnection_Destroy(nc);
+    nc = NULL;
+
+    _stopServer(serverPid);
+    serverPid = NATS_INVALID_PID;
+
+    // Make sure we can connect to a non first server if running
+    serverPid = _startServer("nats://127.0.0.1:1223", "-p 1223", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    buffer[0] = '\0';
+    test("Can connect to second: ")
+    s = natsConnection_Connect(&nc, opts);
+    IFOK(s, natsConnection_GetConnectedUrl(nc, buffer, sizeof(buffer)));
+    testCond((s == NATS_OK)
+             && (buffer[0] != '\0')
+             && (strcmp(buffer, testServers[1]) == 0));
+
+    natsOptions_Destroy(opts);
+    natsConnection_Destroy(nc);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_AuthServers(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid1= NATS_INVALID_PID;
+    natsPid             serverPid2= NATS_INVALID_PID;
+    char                buffer[128];
+    const char          *plainServers[] = {"nats://127.0.0.1:1222",
+                                           "nats://127.0.0.1:1224"};
+    const char          *authServers[] = {"nats://127.0.0.1:1222",
+                                          "nats://ivan:foo@127.0.0.1:1224"};
+    int serversCount = 2;
+
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_SetNoRandomize(opts, true));
+    IFOK(s, natsOptions_SetServers(opts, plainServers, serversCount));
+
+    if (s != NATS_OK)
+        FAIL("Unable to create options for test ServerOptions");
+
+    serverPid1 = _startServer("nats://127.0.0.1:1222", "-p 1222 --user ivan --pass foo", false);
+    CHECK_SERVER_STARTED(serverPid1);
+
+    serverPid2 = _startServer("nats://127.0.0.1:1224", "-p 1224 --user ivan --pass foo", false);
+    if (serverPid2 == NATS_INVALID_PID)
+        _stopServer(serverPid1);
+    CHECK_SERVER_STARTED(serverPid2);
+
+    nats_Sleep(500);
+
+    test("Connect fails due to auth error: ");
+    s = natsConnection_Connect(&nc, opts);
+    testCond((s == NATS_CONNECTION_AUTH_FAILED) && (nc == NULL));
+
+    buffer[0] = '\0';
+    test("Connect succeeds with correct servers list: ")
+    s = natsOptions_SetServers(opts, authServers, serversCount);
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    testCond((s == NATS_OK)
+             && (nc != NULL)
+             && (natsConnection_GetConnectedUrl(nc, buffer, sizeof(buffer)) == NATS_OK)
+             // Even though we are using the url nats://127.0.0.1:1222, the library
+             // will use the user/pwd info found in the second url. So we should have
+             // connected OK to the first (no randomization option set at beginning of test).
+             && (strcmp(buffer, authServers[0]) == 0));
+
+    natsOptions_Destroy(opts);
+    natsConnection_Destroy(nc);
+
+    _stopServer(serverPid1);
+    _stopServer(serverPid2);
+}
+
+static void
+test_AuthFailToReconnect(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid1= NATS_INVALID_PID;
+    natsPid             serverPid2= NATS_INVALID_PID;
+    natsPid             serverPid3= NATS_INVALID_PID;
+    char                buffer[64];
+    const char          *servers[] = {"nats://127.0.0.1:22222",
+                                      "nats://127.0.0.1:22223",
+                                      "nats://127.0.0.1:22224"};
+    struct threadArg    args;
+
+    int serversCount = 3;
+
+    s = _createDefaultThreadArgsForCbTests(&args);
+    IFOK(s, natsOptions_Create(&opts));
+    IFOK(s, natsOptions_SetNoRandomize(opts, true));
+    IFOK(s, natsOptions_SetServers(opts, servers, serversCount));
+    IFOK(s, natsOptions_SetReconnectedCB(opts, _reconnectedCb, (void*) &args));
+    IFOK(s, natsOptions_SetMaxReconnect(opts, 10));
+    IFOK(s, natsOptions_SetReconnectWait(opts, 100));
+    IFOK(s, natsOptions_SetReconnectJitter(opts, 0, 0));
+
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    serverPid1 = _startServer("nats://127.0.0.1:22222", "-p 22222", false);
+    CHECK_SERVER_STARTED(serverPid1);
+
+    serverPid2 = _startServer("nats://127.0.0.1:22223", "-p 22223 --user ivan --pass foo", false);
+    if (serverPid2 == NATS_INVALID_PID)
+        _stopServer(serverPid1);
+    CHECK_SERVER_STARTED(serverPid2);
+
+    serverPid3 = _startServer("nats://127.0.0.1:22224", "-p 22224", false);
+    if (serverPid3 == NATS_INVALID_PID)
+    {
+        _stopServer(serverPid1);
+        _stopServer(serverPid2);
+    }
+    CHECK_SERVER_STARTED(serverPid3);
+
+    nats_Sleep(1000);
+
+    test("Connect should succeed: ");
+    s = natsConnection_Connect(&nc, opts);
+    testCond(s == NATS_OK);
+
+    // Stop the server which will trigger the reconnect
+    _stopServer(serverPid1);
+    serverPid1 = NATS_INVALID_PID;
+
+
+    // The client will try to connect to the second server, and that
+    // should fail. It should then try to connect to the third and succeed.
+
+    // Wait for the reconnect CB.
+    test("Reconnect callback should be triggered: ")
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT)
+           && !(args.reconnected))
+    {
+        s = natsCondition_TimedWait(args.c, args.m, 5000);
+    }
+    natsMutex_Unlock(args.m);
+    testCond((s == NATS_OK) && args.reconnected);
+
+    test("Connection should not be closed: ");
+    testCond(natsConnection_IsClosed(nc) == false);
+
+    buffer[0] = '\0';
+    test("Should have connected to third server: ");
+    s = natsConnection_GetConnectedUrl(nc, buffer, sizeof(buffer));
+    testCond((s == NATS_OK) && (buffer[0] != '\0')
+             && (strcmp(buffer, servers[2]) == 0));
+
+    natsOptions_Destroy(opts);
+    natsConnection_Destroy(nc);
+
+    _destroyDefaultThreadArgs(&args);
+
+    _stopServer(serverPid2);
+    _stopServer(serverPid3);
+}
+
+static void
+test_BasicClusterReconnect(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid1= NATS_INVALID_PID;
+    natsPid             serverPid2= NATS_INVALID_PID;
+    char                buffer[128];
+    int                 serversCount;
+    int64_t             reconnectTimeStart, reconnectTime;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    serversCount = sizeof(testServers) / sizeof(char*);
+
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_IPResolutionOrder(opts, 4));
+    IFOK(s, natsOptions_SetTimeout(opts, 500));
+    IFOK(s, natsOptions_SetNoRandomize(opts, true));
+    IFOK(s, natsOptions_SetServers(opts, testServers, serversCount));
+    IFOK(s, natsOptions_SetDisconnectedCB(opts, _disconnectedCb, (void*) &arg));
+    IFOK(s, natsOptions_SetReconnectedCB(opts, _reconnectedCb, (void*) &arg));
+    IFOK(s, natsOptions_SetClosedCB(opts, _closedCb, (void*) &arg));
+    IFOK(s, natsOptions_SetReconnectWait(opts, 100));
+    IFOK(s, natsOptions_SetReconnectJitter(opts, 0, 0));
+
+    if (s != NATS_OK)
+        FAIL("Unable to create options for test ServerOptions");
+
+    serverPid1 = _startServer("nats://127.0.0.1:1222", "-p 1222", true);
+    CHECK_SERVER_STARTED(serverPid1);
+
+    serverPid2 = _startServer("nats://127.0.0.1:1224", "-p 1224", true);
+    if (serverPid2 == NATS_INVALID_PID)
+        _stopServer(serverPid1);
+    CHECK_SERVER_STARTED(serverPid2);
+
+    test("Check connected to the right server: ");
+    s = natsConnection_Connect(&nc, opts);
+
+    _stopServer(serverPid1);
+
+    // wait for disconnect
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.disconnected)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+
+    reconnectTimeStart = nats_Now();
+
+    // wait for reconnect
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.reconnected)
+        s = natsCondition_TimedWait(arg.c, arg.m, 3000);
+    natsMutex_Unlock(arg.m);
+
+    testCond((s == NATS_OK)
+             && (natsConnection_GetConnectedUrl(nc, buffer, sizeof(buffer)) == NATS_OK)
+             && (strcmp(buffer, testServers[2]) == 0));
+
+    // Make sure we did not wait on reconnect for default time.
+    // Reconnect should be fast since it will be a switch to the
+    // second server and not be dependent on server restart time.
+    reconnectTime = nats_Now() - reconnectTimeStart;
+
+    test("Check reconnect time did not take too long: ");
+#if _WIN32
+    testCond(reconnectTime <= 1300);
+#else
+    testCond(reconnectTime <= 100);
+#endif
+    natsOptions_Destroy(opts);
+    natsConnection_Destroy(nc);
+
+    _waitForConnClosed(&arg);
+
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(serverPid2);
+}
+
+static const char*
+_reconnectTokenHandler(void* closure)
+{
+    const char *token;
+    struct threadArg *args      = (struct threadArg*) closure;
+
+    natsMutex_Lock(args->m);
+    token = args->tokens[args->tokenCallCount % (sizeof(args->tokens)/sizeof(char*))];
+    args->tokenCallCount++;
+    natsMutex_Unlock(args->m);
+
+    return token;
+}
+
+static void
+test_ReconnectWithTokenHandler(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid1= NATS_INVALID_PID;
+    natsPid             serverPid2= NATS_INVALID_PID;
+    natsPid             serverPid3= NATS_INVALID_PID;
+    char                buffer[64];
+    const char          *servers[] = {"nats://127.0.0.1:22222",
+                                      "nats://127.0.0.1:22223",
+                                      "nats://127.0.0.1:22224"};
+    struct threadArg    args;
+
+    int serversCount = 3;
+
+    s = _createDefaultThreadArgsForCbTests(&args);
+    args.tokenCallCount = 0;
+    args.tokens[0] = "token1";
+    args.tokens[1] = "badtoken";
+    args.tokens[2] = "token3";
+
+    IFOK(s, natsOptions_Create(&opts));
+    IFOK(s, natsOptions_SetNoRandomize(opts, true));
+    IFOK(s, natsOptions_SetServers(opts, servers, serversCount));
+    IFOK(s, natsOptions_SetTokenHandler(opts, _reconnectTokenHandler, (void*) &args));
+    IFOK(s, natsOptions_SetReconnectedCB(opts, _reconnectedCb, (void*) &args));
+    IFOK(s, natsOptions_SetMaxReconnect(opts, 10));
+    IFOK(s, natsOptions_SetReconnectWait(opts, 100));
+    IFOK(s, natsOptions_SetReconnectJitter(opts, 0, 0));
+
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    serverPid1 = _startServer("nats://token1@127.0.0.1:22222", "-p 22222 --auth token1", true);
+    CHECK_SERVER_STARTED(serverPid1);
+
+    serverPid2 = _startServer("nats://user:foo@127.0.0.1:22223", "-p 22223 --user ivan --pass foo", true);
+    if (serverPid2 == NATS_INVALID_PID)
+        _stopServer(serverPid1);
+    CHECK_SERVER_STARTED(serverPid2);
+
+    serverPid3 = _startServer("nats://token3@127.0.0.1:22224", "-p 22224 --auth token3", true);
+    if (serverPid3 == NATS_INVALID_PID)
+    {
+        _stopServer(serverPid1);
+        _stopServer(serverPid2);
+    }
+    CHECK_SERVER_STARTED(serverPid3);
+
+    test("Connect should succeed: ");
+    s = natsConnection_Connect(&nc, opts);
+    testCond(s == NATS_OK);
+
+    // Stop the server which will trigger the reconnect
+    _stopServer(serverPid1);
+    serverPid1 = NATS_INVALID_PID;
+
+
+    // The client will try to connect to the second server, and that
+    // should fail. It should then try to connect to the third and succeed.
+
+    // Wait for the reconnect CB.
+    test("Reconnect callback should be triggered: ")
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT)
+           && !(args.reconnected))
+    {
+        s = natsCondition_TimedWait(args.c, args.m, 5000);
+    }
+    natsMutex_Unlock(args.m);
+    testCond((s == NATS_OK) && args.reconnected);
+
+    test("Connection should not be closed: ");
+    testCond(natsConnection_IsClosed(nc) == false);
+
+    buffer[0] = '\0';
+    test("Should have connected to third server: ");
+    s = natsConnection_GetConnectedUrl(nc, buffer, sizeof(buffer));
+    testCond((s == NATS_OK) && (buffer[0] != '\0')
+             && (strcmp(buffer, servers[2]) == 0));
+
+    natsOptions_Destroy(opts);
+    natsConnection_Destroy(nc);
+
+    _destroyDefaultThreadArgs(&args);
+
+    _stopServer(serverPid2);
+    _stopServer(serverPid3);
+}
+
+#define NUM_CLIENTS (100)
+
+struct hashCount
+{
+    int count;
+
+};
+
+static void
+test_HotSpotReconnect(void)
+{
+    natsStatus          s;
+    natsConnection      *nc[NUM_CLIENTS];
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid1= NATS_INVALID_PID;
+    natsPid             serverPid2= NATS_INVALID_PID;
+    natsPid             serverPid3= NATS_INVALID_PID;
+    char                buffer[128];
+    int                 serversCount;
+    natsStrHash         *cs = NULL;
+    struct threadArg    arg;
+    struct hashCount    *count = NULL;
+
+#if _WIN32
+    test("Skip when running on Windows: ");
+    testCond(true);
+    return;
+#endif
+
+    memset(nc, 0, sizeof(nc));
+
+    s = natsStrHash_Create(&cs, 4);
+    IFOK(s, _createDefaultThreadArgsForCbTests(&arg));
+    if (s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    serversCount = sizeof(testServers) / sizeof(char*);
+
+    serverPid1 = _startServer("nats://127.0.0.1:1222", "-p 1222", true);
+    CHECK_SERVER_STARTED(serverPid1);
+
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_SetServers(opts, testServers, serversCount))
+    IFOK(s, natsOptions_SetReconnectedCB(opts, _reconnectedCb, (void*) &arg));
+    if (s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    for (int i=0; (s == NATS_OK) && (i<NUM_CLIENTS); i++)
+    {
+        s = natsConnection_Connect(&(nc[i]), opts);
+        IFOK(s, natsConnection_GetConnectedUrl(nc[i], buffer, sizeof(buffer)));
+        if ((s == NATS_OK)
+            && (strcmp(buffer, testServers[0]) != 0))
+        {
+            s = NATS_ERR;
+        }
+    }
+    if (s == NATS_OK)
+    {
+        serverPid2 = _startServer("nats://127.0.0.1:1224", "-p 1224", true);
+        serverPid3 = _startServer("nats://127.0.0.1:1226", "-p 1226", true);
+
+        if ((serverPid2 == NATS_INVALID_PID)
+            || (serverPid3 == NATS_INVALID_PID))
+        {
+            _stopServer(serverPid1);
+            _stopServer(serverPid2);
+            _stopServer(serverPid3);
+            FAIL("Unable to start or verify that the server was started!");
+        }
+    }
+
+    _stopServer(serverPid1);
+
+    // Wait on all reconnects
+    test("Check all reconnected: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && (arg.reconnects != NUM_CLIENTS))
+        s = natsCondition_TimedWait(arg.c, arg.m, 10000);
+    natsMutex_Unlock(arg.m);
+    testCond((s == NATS_OK) && arg.reconnects == NUM_CLIENTS);
+
+    // Walk the clients and calculate how many of each..
+    for (int i=0; (s == NATS_OK) && (i<NUM_CLIENTS); i++)
+    {
+        if (nc[i] == NULL)
+        {
+            s = NATS_ERR;
+            break;
+        }
+
+        buffer[0] = '\0';
+        s = natsConnection_GetConnectedUrl(nc[i], buffer, sizeof(buffer));
+        if (s == NATS_OK)
+        {
+            count = (struct hashCount*) natsStrHash_Get(cs, buffer);
+            if (count == NULL)
+            {
+                count = (struct hashCount*) calloc(1, sizeof(struct hashCount));
+                if (count == NULL)
+                    s = NATS_NO_MEMORY;
+            }
+
+            if (s == NATS_OK)
+            {
+                count->count++;
+                s = natsStrHash_Set(cs, buffer, true, (void*) count, NULL);
+            }
+        }
+
+        natsConnection_Close(nc[i]);
+    }
+
+    test("Check correct number of servers: ");
+    testCond((s == NATS_OK) && (natsStrHash_Count(cs) == 2));
+
+    if (s == NATS_OK)
+    {
+        // numClients  = 100
+        // numServers  = 2
+        // expected    = numClients / numServers
+        // v           = expected * 0.3
+
+        natsStrHashIter     iter;
+        struct hashCount    *val;
+        int                 total;
+        int                 delta;
+        int                 v = (int) (((float)NUM_CLIENTS / 2) * 0.30);
+        void                *p = NULL;
+
+        natsStrHashIter_Init(&iter, cs);
+        while (natsStrHashIter_Next(&iter, NULL, &p))
+        {
+            val = (struct hashCount*) p;
+            total = val->count;
+
+            delta = ((NUM_CLIENTS / 2) - total);
+            if (delta < 0)
+                delta *= -1;
+
+            if (delta > v)
+                s = NATS_ERR;
+
+            free(val);
+        }
+
+        test("Check variance: ");
+        testCond(s == NATS_OK);
+    }
+
+    for (int i=0; i<NUM_CLIENTS; i++)
+        natsConnection_Destroy(nc[i]);
+
+    natsStrHash_Destroy(cs);
+    natsOptions_Destroy(opts);
+
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(serverPid2);
+    _stopServer(serverPid3);
+}
+
+static void
+test_ProperReconnectDelay(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    int                 serversCount;
+    struct threadArg    arg;
+
+#if _WIN32
+    test("Skip when running on Windows: ");
+    testCond(true);
+    return;
+#endif
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    serversCount = sizeof(testServers) / sizeof(char*);
+
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_SetNoRandomize(opts, true));
+    IFOK(s, natsOptions_SetServers(opts, testServers, serversCount));
+    IFOK(s, natsOptions_SetDisconnectedCB(opts, _disconnectedCb, (void*) &arg));
+    IFOK(s, natsOptions_SetClosedCB(opts, _closedCb, (void*) &arg));
+
+    if (s != NATS_OK)
+        FAIL("Unable to create options for test ServerOptions");
+
+    serverPid = _startServer("nats://127.0.0.1:1222", "-p 1222", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Connect: ");
+    s = natsConnection_Connect(&nc, opts);
+    testCond(s == NATS_OK);
+
+    _stopServer(serverPid);
+
+    // wait for disconnect
+    test("Wait for disconnect: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.disconnected)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+    testCond((s == NATS_OK) && arg.disconnected);
+
+    // Wait, want to make sure we don't spin on reconnect to non-existent servers.
+    nats_Sleep(1000);
+
+    // Make sure we are still reconnecting..
+    test("ClosedCB should not be invoked: ")
+    natsMutex_Lock(arg.m);
+    testCond(arg.closed == false);
+    natsMutex_Unlock(arg.m);
+
+    test("Should still be reconnecting: ");
+    testCond(natsConnection_Status(nc) == NATS_CONN_STATUS_RECONNECTING);
+
+    natsOptions_Destroy(opts);
+    natsConnection_Destroy(nc);
+
+    // Now that the connection is destroyed, the callback will be invoked.
+    // Make sure that we wait until then before destroying 'arg'.
+    _waitForConnClosed(&arg);
+
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+test_ProperFalloutAfterMaxAttempts(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    int                 serversCount;
+    struct threadArg    arg;
+
+#if _WIN32
+    test("Skip when running on Windows: ");
+    testCond(true);
+    return;
+#endif
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    serversCount = sizeof(testServers) / sizeof(char*);
+
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_SetNoRandomize(opts, true));
+    IFOK(s, natsOptions_SetMaxReconnect(opts, 5));
+    IFOK(s, natsOptions_SetReconnectWait(opts, 25));
+    IFOK(s, natsOptions_SetReconnectJitter(opts, 0, 0));
+    IFOK(s, natsOptions_SetServers(opts, testServers, serversCount));
+    IFOK(s, natsOptions_SetDisconnectedCB(opts, _disconnectedCb, (void*) &arg));
+    IFOK(s, natsOptions_SetClosedCB(opts, _closedCb, (void*) &arg));
+
+    if (s != NATS_OK)
+        FAIL("Unable to create options for test ServerOptions");
+
+    serverPid = _startServer("nats://127.0.0.1:1222", "-p 1222", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Connect: ");
+    s = natsConnection_Connect(&nc, opts);
+    testCond(s == NATS_OK);
+
+    _stopServer(serverPid);
+
+    // wait for disconnect
+    test("Wait for disconnected: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.disconnected)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+    testCond((s == NATS_OK) && arg.disconnected);
+
+    // wait for closed
+    test("Wait for closed: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.closed)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+    testCond((s == NATS_OK) && arg.closed);
+
+    test("Disconnected should have been called only once: ");
+    testCond((s == NATS_OK) && arg.disconnects == 1);
+
+    test("Connection should be closed: ")
+    testCond((s == NATS_OK)
+             && natsConnection_IsClosed(nc));
+
+    natsOptions_Destroy(opts);
+    natsConnection_Destroy(nc);
+
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+test_StopReconnectAfterTwoAuthErr(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    natsPid             serverPid2= NATS_INVALID_PID;
+    const char          *servers[]= {"nats://127.0.0.1:1222", "nats://127.0.0.1:1223"};
+    natsStatistics      *stats    = NULL;
+    int                 serversCount;
+    struct threadArg    arg;
+
+//#if _WIN32
+//    test("Skip when running on Windows: ");
+//    testCond(true);
+//    return;
+//#endif
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    serversCount = sizeof(servers) / sizeof(char*);
+
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_SetNoRandomize(opts, true));
+    IFOK(s, natsOptions_SetMaxReconnect(opts, -1));
+    IFOK(s, natsOptions_SetReconnectWait(opts, 25));
+    IFOK(s, natsOptions_SetReconnectJitter(opts, 0, 0));
+    IFOK(s, natsOptions_SetServers(opts, servers, serversCount));
+    IFOK(s, natsOptions_SetDisconnectedCB(opts, _disconnectedCb, (void*) &arg));
+    IFOK(s, natsOptions_SetClosedCB(opts, _closedCb, (void*) &arg));
+#if _WIN32
+    IFOK(s, natsOptions_SetTimeout(opts, 500));
+#endif
+    IFOK(s, natsStatistics_Create(&stats));
+
+    if (s != NATS_OK)
+        FAIL("Unable to create options for test ServerOptions");
+
+    serverPid = _startServer("nats://127.0.0.1:1222", "-p 1222", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    serverPid2 = _startServer("nats://127.0.0.1:1223", "-p 1223 -user ivan -pass secret", true);
+    if (serverPid == NATS_INVALID_PID)
+        _stopServer(serverPid);
+    CHECK_SERVER_STARTED(serverPid2);
+
+    test("Connect: ");
+    s = natsConnection_Connect(&nc, opts);
+    testCond(s == NATS_OK);
+
+    _stopServer(serverPid);
+
+    // wait for disconnect
+    test("Wait for disconnected: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.disconnected)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+    testCond((s == NATS_OK) && arg.disconnected);
+
+    // wait for closed
+    test("Wait for closed: ");
+    s = _waitForConnClosed(&arg);
+    testCond(s == NATS_OK);
+
+    // Make sure we have not exceeded MaxReconnect
+    test("Check reconnect twice: ");
+    s = natsConnection_GetStats(nc, stats);
+    testCond((s == NATS_OK)
+             && (stats != NULL)
+             && (stats->reconnects == 2));
+
+    // Disconnect CB only from disconnect from server 1.
+    test("Disconnected should have been called once: ");
+    testCond((s == NATS_OK) && arg.disconnects == 1);
+
+    test("Connection should be closed: ")
+    testCond((s == NATS_OK)
+             && natsConnection_IsClosed(nc));
+
+    natsOptions_Destroy(opts);
+    natsConnection_Destroy(nc);
+    natsStatistics_Destroy(stats);
+
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(serverPid2);
+}
+
+static void
+test_TimeoutOnNoServer(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    int                 serversCount;
+    int64_t             startWait, timedWait;
+    struct threadArg    arg;
+
+#if _WIN32
+    test("Skip when running on Windows: ");
+    testCond(true);
+    return;
+#endif
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    serversCount = sizeof(testServers) / sizeof(char*);
+
+    // 1000 milliseconds total time wait
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_SetNoRandomize(opts, true));
+    IFOK(s, natsOptions_SetMaxReconnect(opts, 10));
+    IFOK(s, natsOptions_SetReconnectWait(opts, 100));
+    IFOK(s, natsOptions_SetReconnectJitter(opts, 0, 0));
+    IFOK(s, natsOptions_SetServers(opts, testServers, serversCount));
+    IFOK(s, natsOptions_SetDisconnectedCB(opts, _disconnectedCb, (void*) &arg));
+    IFOK(s, natsOptions_SetClosedCB(opts, _closedCb, (void*) &arg));
+
+    if (s != NATS_OK)
+        FAIL("Unable to create options for test ServerOptions");
+
+    serverPid = _startServer("nats://127.0.0.1:1222", "-p 1222", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Connect: ");
+    s = natsConnection_Connect(&nc, opts);
+    testCond(s == NATS_OK);
+
+    _stopServer(serverPid);
+
+    // wait for disconnect
+    test("Wait for disconnected: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.disconnected)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+    testCond((s == NATS_OK) && arg.disconnected);
+
+    startWait = nats_Now();
+
+    // wait for closed
+    test("Wait for closed: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.closed)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000 + serversCount*50);
+    natsMutex_Unlock(arg.m);
+    testCond((s == NATS_OK) && arg.closed);
+
+    timedWait = nats_Now() - startWait;
+
+    // The client will try to reconnect to serversCount servers.
+    // It will do that for MaxReconnects==10 times.
+    // For a server that has been already tried, it should sleep
+    // ReconnectWait==100ms. When a server is not running, the connect
+    // failure on UNIXes should be fast, still account for that.
+    test("Check wait time for closed cb: ");
+    testCond(timedWait <= ((opts->maxReconnect * opts->reconnectWait) + serversCount*opts->maxReconnect*50));
+
+    natsOptions_Destroy(opts);
+    natsConnection_Destroy(nc);
+
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+test_PingReconnect(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    int                 serversCount;
+    int64_t             disconnectedAt, reconnectedAt, pingCycle;
+    struct threadArg    arg;
+
+#if _WIN32
+    test("Skip when running on Windows: ");
+    testCond(true);
+    return;
+#endif
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    arg.control = 9;
+
+    serversCount = sizeof(testServers) / sizeof(char*);
+
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_SetNoRandomize(opts, true));
+    IFOK(s, natsOptions_SetReconnectWait(opts, 200));
+    IFOK(s, natsOptions_SetReconnectJitter(opts, 0, 0));
+    IFOK(s, natsOptions_SetPingInterval(opts, 50));
+    IFOK(s, natsOptions_SetMaxPingsOut(opts, -1));
+    IFOK(s, natsOptions_SetServers(opts, testServers, serversCount));
+    IFOK(s, natsOptions_SetDisconnectedCB(opts, _disconnectedCb, (void*) &arg));
+    IFOK(s, natsOptions_SetReconnectedCB(opts, _reconnectedCb, (void*) &arg));
+    IFOK(s, natsOptions_SetClosedCB(opts, _closedCb, (void*) &arg));
+
+    if (s != NATS_OK)
+        FAIL("Unable to create options for test ServerOptions");
+
+    serverPid = _startServer("nats://127.0.0.1:1222", "-p 1222", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Connect: ");
+    s = natsConnection_Connect(&nc, opts);
+    testCond(s == NATS_OK);
+
+    test("Pings cause reconnects: ")
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && (arg.reconnects != 4))
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+    testCond((s == NATS_OK) && (arg.reconnects == 4));
+
+    natsConnection_Destroy(nc);
+
+    for (int i=0; i<(4-1); i++)
+    {
+        disconnectedAt = arg.disconnectedAt[i];
+        reconnectedAt = arg.reconnectedAt[i];
+
+        pingCycle = reconnectedAt - disconnectedAt;
+        if (pingCycle > 2 * opts->pingInterval)
+        {
+            s = NATS_ERR;
+            break;
+        }
+    }
+
+    test("Reconnect due to ping cycle correct: ");
+    testCond(s == NATS_OK);
+
+    // Wait for connection closed before destroying arg.
+    natsMutex_Lock(arg.m);
+    while (!arg.closed)
+        natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+
+    natsOptions_Destroy(opts);
+
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(serverPid);
+
+}
+
+static void
+test_GetServers(void)
+{
+    natsStatus          s;
+    natsConnection      *conn = NULL;
+    natsPid             s1Pid = NATS_INVALID_PID;
+    natsPid             s2Pid = NATS_INVALID_PID;
+    natsPid             s3Pid = NATS_INVALID_PID;
+    char                **servers = NULL;
+    int                 count     = 0;
+
+    s1Pid = _startServer("nats://127.0.0.1:4222", "-a 127.0.0.1 -p 4222 -cluster nats://127.0.0.1:5222 -cluster_name abc", true);
+    CHECK_SERVER_STARTED(s1Pid);
+
+    s2Pid = _startServer("nats://127.0.0.1:4223", "-a 127.0.0.1 -p 4223 -cluster nats://127.0.0.1:5223 -cluster_name abc -routes nats://127.0.0.1:5222", true);
+    if (s2Pid == NATS_INVALID_PID)
+        _stopServer(s1Pid);
+    CHECK_SERVER_STARTED(s2Pid);
+
+    s3Pid = _startServer("nats://127.0.0.1:4224", "-a 127.0.0.1 -p 4224 -cluster nats://127.0.0.1:5224 -cluster_name abc -routes nats://127.0.0.1:5222", true);
+    if (s3Pid == NATS_INVALID_PID)
+    {
+        _stopServer(s1Pid);
+        _stopServer(s2Pid);
+    }
+    CHECK_SERVER_STARTED(s3Pid);
+
+    test("Get Servers: ");
+    s = natsConnection_ConnectTo(&conn, "nats://127.0.0.1:4222");
+    IFOK(s, natsConnection_GetServers(conn, &servers, &count));
+    if (s == NATS_OK)
+    {
+        int i;
+
+        // Be tolerant that if we were to connect to an older
+        // server, we would just get 1 url back.
+        if ((count != 1) && (count != 3))
+            s = nats_setError(NATS_ERR, "Unexpected number of servers: %d instead of 1 or 3", count);
+
+        for (i=0; (s == NATS_OK) && (i < count); i++)
+        {
+            if ((strcmp(servers[i], "nats://127.0.0.1:4222") != 0)
+                    && (strcmp(servers[i], "nats://127.0.0.1:4223") != 0)
+                    && (strcmp(servers[i], "nats://127.0.0.1:4224") != 0))
+            {
+                s = nats_setError(NATS_ERR, "Unexpected server URL: %s", servers[i]);
+            }
+        }
+
+        for (i=0; i<count; i++)
+            free(servers[i]);
+        free(servers);
+    }
+    testCond(s == NATS_OK);
+
+    natsConnection_Destroy(conn);
+    conn = NULL;
+
+    _stopServer(s3Pid);
+    _stopServer(s2Pid);
+    _stopServer(s1Pid);
+
+    s1Pid = NATS_INVALID_PID;
+    s1Pid = _startServer("nats://ivan:password@127.0.0.1:4222", "-a 127.0.0.1 -p 4222 -user ivan -pass password", true);
+    CHECK_SERVER_STARTED(s1Pid);
+
+    test("Get Servers does not return credentials: ");
+    s = natsConnection_ConnectTo(&conn, "nats://ivan:password@127.0.0.1:4222");
+    IFOK(s, natsConnection_GetServers(conn, &servers, &count));
+    if (s == NATS_OK)
+    {
+        if (count != 1)
+            s = nats_setError(NATS_ERR, "Unexpected number of servers: %d instead of 1", count);
+        else if (strcmp(servers[0], "nats://127.0.0.1:4222") != 0)
+            s = nats_setError(NATS_ERR, "Unexpected server URL: %s", servers[0]);
+
+        free(servers[0]);
+        free(servers);
+    }
+    testCond(s == NATS_OK);
+
+    natsConnection_Destroy(conn);
+    _stopServer(s1Pid);
+}
+
+static void
+test_GetDiscoveredServers(void)
+{
+    natsStatus          s;
+    natsConnection      *conn = NULL;
+    natsPid             s1Pid = NATS_INVALID_PID;
+    natsPid             s2Pid = NATS_INVALID_PID;
+    char                **servers = NULL;
+    int                 count     = 0;
+
+    s1Pid = _startServer("nats://127.0.0.1:4222", "-a 127.0.0.1 -p 4222 -cluster nats://127.0.0.1:5222 -cluster_name abc", true);
+    CHECK_SERVER_STARTED(s1Pid);
+
+    s2Pid = _startServer("nats://127.0.0.1:4223", "-a 127.0.0.1 -p 4223 -cluster nats://127.0.0.1:5223 -cluster_name abc -routes nats://127.0.0.1:5222", true);
+    if (s2Pid == NATS_INVALID_PID)
+        _stopServer(s1Pid);
+    CHECK_SERVER_STARTED(s2Pid);
+
+    test("GetDiscoveredServers: ");
+    s = natsConnection_ConnectTo(&conn, "nats://127.0.0.1:4222");
+    IFOK(s, natsConnection_GetDiscoveredServers(conn, &servers, &count));
+    if (s == NATS_OK)
+    {
+        int i;
+
+        // Be tolerant that if we were to connect to an older
+        // server, we would get nothing
+        if (count > 1)
+            s = nats_setError(NATS_ERR, "Unexpected number of servers: %d instead of 1 or 0", count);
+
+        for (i=0; (s == NATS_OK) && (i < count); i++)
+        {
+            if (strcmp(servers[i], "nats://127.0.0.1:4223") != 0)
+                s = nats_setError(NATS_ERR, "Unexpected server URL: %s", servers[i]);
+        }
+
+        for (i=0; i<count; i++)
+            free(servers[i]);
+        free(servers);
+    }
+    testCond(s == NATS_OK);
+
+    natsConnection_Destroy(conn);
+    conn = NULL;
+
+    _stopServer(s2Pid);
+    _stopServer(s1Pid);
+}
+
+static void
+_discoveredServersCb(natsConnection *nc, void *closure)
+{
+    struct threadArg    *arg = (struct threadArg*) closure;
+
+    natsMutex_Lock(arg->m);
+    arg->sum++;
+    natsCondition_Signal(arg->c);
+    natsMutex_Unlock(arg->m);
+}
+
+static void
+test_DiscoveredServersCb(void)
+{
+    natsStatus          s;
+    natsConnection      *conn = NULL;
+    natsPid             s1Pid = NATS_INVALID_PID;
+    natsPid             s2Pid = NATS_INVALID_PID;
+    natsPid             s3Pid = NATS_INVALID_PID;
+    natsOptions         *opts = NULL;
+    struct threadArg    arg;
+    int                 invoked = 0;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    IFOK(s, natsOptions_Create(&opts));
+    IFOK(s, natsOptions_SetURL(opts, "nats://127.0.0.1:4222"));
+    IFOK(s, natsOptions_SetDiscoveredServersCB(opts, _discoveredServersCb, &arg));
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    s1Pid = _startServer("nats://127.0.0.1:4222", "-a 127.0.0.1 -p 4222 -cluster nats-route://127.0.0.1:5222 -cluster_name abc", true);
+    CHECK_SERVER_STARTED(s1Pid);
+
+    s2Pid = _startServer("nats://127.0.0.1:4223", "-a 127.0.0.1 -p 4223 -cluster nats-route://127.0.0.1:5223 -cluster_name abc -routes nats-route://127.0.0.1:5222", true);
+    if (s2Pid == NATS_INVALID_PID)
+        _stopServer(s1Pid);
+    CHECK_SERVER_STARTED(s2Pid);
+
+    test("DiscoveredServersCb not triggered on initial connect: ");
+    s = natsConnection_Connect(&conn, opts);
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && (arg.sum == 0))
+        s = natsCondition_TimedWait(arg.c, arg.m, 500);
+    invoked = arg.sum;
+    natsMutex_Unlock(arg.m);
+    testCond((s == NATS_TIMEOUT) && (invoked == 0));
+    s = NATS_OK;
+
+    s3Pid = _startServer("nats://127.0.0.1:4224", "-a 127.0.0.1 -p 4224 -cluster nats-route://127.0.0.1:5224 -cluster_name abc -routes nats-route://127.0.0.1:5222", true);
+    if (s3Pid == NATS_INVALID_PID)
+    {
+        _stopServer(s1Pid);
+        _stopServer(s2Pid);
+    }
+    CHECK_SERVER_STARTED(s3Pid);
+
+    test("DiscoveredServersCb triggered on new server joining the cluster: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && (arg.sum == 0))
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    invoked = arg.sum;
+    natsMutex_Unlock(arg.m);
+    testCond((s == NATS_OK) && (invoked == 1));
+
+    natsConnection_Destroy(conn);
+    natsOptions_Destroy(opts);
+
+    _stopServer(s3Pid);
+    _stopServer(s2Pid);
+    _stopServer(s1Pid);
+
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+test_IgnoreDiscoveredServers(void)
+{
+   natsStatus          s;
+    natsConnection      *conn = NULL;
+    natsPid             s1Pid = NATS_INVALID_PID;
+    natsPid             s2Pid = NATS_INVALID_PID;
+    natsOptions         *opts = NULL;
+    struct threadArg    arg;
+    int                 invoked = 0;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    IFOK(s, natsOptions_Create(&opts));
+    IFOK(s, natsOptions_SetURL(opts, "nats://127.0.0.1:4222"));
+    IFOK(s, natsOptions_SetIgnoreDiscoveredServers(opts, true));
+    IFOK(s, natsOptions_SetDiscoveredServersCB(opts, _discoveredServersCb, &arg));
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    s1Pid = _startServer("nats://127.0.0.1:4222", "-a 127.0.0.1 -p 4222 -cluster nats-route://127.0.0.1:5222 -cluster_name abc", true);
+    CHECK_SERVER_STARTED(s1Pid);
+
+    test("Connect: ");
+    s = natsConnection_Connect(&conn, opts);
+    testCond(s == NATS_OK);
+
+    test("Start new server: ");
+    s2Pid = _startServer("nats://127.0.0.1:4223", "-a 127.0.0.1 -p 4223 -cluster nats-route://127.0.0.1:5223 -cluster_name abc -routes nats-route://127.0.0.1:5222", true);
+    CHECK_SERVER_STARTED(s2Pid);
+    testCond(true);
+
+    test("Check discovered ignored: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && (arg.sum == 0))
+        s = natsCondition_TimedWait(arg.c, arg.m, 1000);
+    invoked = arg.sum;
+    natsMutex_Unlock(arg.m);
+    testCond((s == NATS_TIMEOUT) && (invoked == 0));
+    nats_clearLastError();
+
+    test("Check server pool: ");
+    natsConn_Lock(conn);
+    s = (natsSrvPool_GetSize(conn->srvPool) == 1 ? NATS_OK : NATS_ERR);
+    natsConn_Unlock(conn);
+    testCond(s == NATS_OK);
+
+    natsConnection_Destroy(conn);
+    natsOptions_Destroy(opts);
+
+    _stopServer(s2Pid);
+    _stopServer(s1Pid);
+
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+_serverSendsINFOAfterPONG(void *closure)
+{
+    struct threadArg    *arg    = (struct threadArg*) closure;
+    natsStatus          s       = NATS_OK;
+    natsSock            sock    = NATS_SOCK_INVALID;
+    natsSockCtx         ctx;
+
+    memset(&ctx, 0, sizeof(natsSockCtx));
+
+    // We will hand run a fake server that will send an INFO protocol
+    // right after sending the initial PONG.
+
+    s = _startMockupServer(&sock, "127.0.0.1", "4222");
+
+    natsMutex_Lock(arg->m);
+    arg->status = s;
+    arg->done = true;
+    natsCondition_Signal(arg->c);
+    natsMutex_Unlock(arg->m);
+
+    if ((s == NATS_OK)
+            && (((ctx.fd = accept(sock, NULL, NULL)) == NATS_SOCK_INVALID)
+                    || (natsSock_SetCommonTcpOptions(ctx.fd) != NATS_OK)))
+    {
+        s = NATS_SYS_ERROR;
+    }
+    if (s == NATS_OK)
+    {
+        const char* info = "INFO {}\r\n";
+
+        s = natsSock_WriteFully(&ctx, info, (int) strlen(info));
+    }
+    if (s == NATS_OK)
+    {
+        char buffer[1024];
+
+        memset(buffer, 0, sizeof(buffer));
+
+        // Read connect and ping commands sent from the client
+        s = natsSock_ReadLine(&ctx, buffer, sizeof(buffer));
+        IFOK(s, natsSock_ReadLine(&ctx, buffer, sizeof(buffer)));
+    }
+    // Send PONG + INFO
+    if (s == NATS_OK)
+    {
+        char buffer[1024];
+
+        snprintf(buffer, sizeof(buffer), "PONG\r\nINFO {\"connect_urls\":[\"127.0.0.1:4222\",\"me:1\"]}\r\n");
+
+        s = natsSock_WriteFully(&ctx, buffer, (int) strlen(buffer));
+    }
+
+    // Wait for a signal from the client thread.
+    natsMutex_Lock(arg->m);
+    while (!arg->closed)
+        natsCondition_Wait(arg->c, arg->m);
+    arg->status = s;
+    natsMutex_Unlock(arg->m);
+
+    natsSock_Close(ctx.fd);
+    natsSock_Close(sock);
+}
+
+static void
+test_ReceiveINFORightAfterFirstPONG(void)
+{
+    natsStatus          s       = NATS_OK;
+    natsThread          *t      = NULL;
+    natsConnection      *nc     = NULL;
+    natsOptions         *opts   = NULL;
+    struct threadArg arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    IFOK(s, natsOptions_Create(&opts));
+    IFOK(s, natsOptions_SetURL(opts, "nats://127.0.0.1:4222"));
+    IFOK(s, natsOptions_SetAllowReconnect(opts, false));
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    test("Verify that INFO right after PONG is ok: ");
+
+    s = natsThread_Create(&t, _serverSendsINFOAfterPONG, (void*) &arg);
+    if (s == NATS_OK)
+    {
+        natsMutex_Lock(arg.m);
+        while (!arg.done)
+            natsCondition_Wait(arg.c, arg.m);
+        s = arg.status;
+        natsMutex_Unlock(arg.m);
+    }
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    if (s == NATS_OK)
+    {
+        int     i, j;
+        char    **servers    = NULL;
+        int     serversCount = 0;
+        bool    ok           = false;
+
+        for (i = 0; i < 100; i++)
+        {
+            s = natsConnection_GetDiscoveredServers(nc, &servers, &serversCount);
+            if (s != NATS_OK)
+                break;
+
+            ok = ((serversCount == 1)
+                    && (strcmp(servers[0], "nats://me:1") == 0));
+
+            for (j = 0; j < serversCount; j++)
+                free(servers[j]);
+            free(servers);
+
+            if (ok)
+                break;
+
+            nats_Sleep(15);
+            s = NATS_ERR;
+        }
+    }
+    if (t != NULL)
+    {
+        natsMutex_Lock(arg.m);
+        arg.closed = true;
+        natsCondition_Signal(arg.c);
+        natsMutex_Unlock(arg.m);
+
+        natsThread_Join(t);
+        natsThread_Destroy(t);
+
+        natsMutex_Lock(arg.m);
+        if ((s == NATS_OK) && (arg.status != NATS_OK))
+            s = arg.status;
+        natsMutex_Unlock(arg.m);
+    }
+    testCond(s == NATS_OK);
+
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+test_ServerPoolUpdatedOnClusterUpdate(void)
+{
+    natsStatus          s;
+    natsConnection      *conn = NULL;
+    natsPid             s1Pid = NATS_INVALID_PID;
+    natsPid             s2Pid = NATS_INVALID_PID;
+    natsPid             s3Pid = NATS_INVALID_PID;
+    natsOptions         *opts = NULL;
+    struct threadArg    arg;
+    int                 invoked = 0;
+    bool                restartS2 = false;
+
+    if (!serverVersionAtLeast(1,0,7))
+    {
+        char txt[200];
+
+        snprintf(txt, sizeof(txt), "Skipping since requires server version of at least 1.0.7, got %s: ", serverVersion);
+        test(txt);
+        testCond(true);
+        return;
+    }
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s == NATS_OK)
+        opts = _createReconnectOptions();
+    if ((opts == NULL)
+            || (natsOptions_SetURL(opts, "nats://127.0.0.1:4222") != NATS_OK)
+            || (natsOptions_SetDiscoveredServersCB(opts, _discoveredServersCb, &arg))
+            || (natsOptions_SetReconnectedCB(opts, _reconnectedCb, &arg) != NATS_OK)
+            || (natsOptions_SetClosedCB(opts, _closedCb, &arg) != NATS_OK))
+    {
+        FAIL("Unable to create reconnect options!");
+    }
+
+    s1Pid = _startServer("nats://127.0.0.1:4222", "-a 127.0.0.1 -p 4222 -cluster nats://127.0.0.1:6222 -cluster_name abc -routes nats://127.0.0.1:6223,nats://127.0.0.1:6224", true);
+    CHECK_SERVER_STARTED(s1Pid);
+
+    test("Connect ok: ");
+    s = natsConnection_Connect(&conn, opts);
+    testCond(s == NATS_OK);
+
+    s2Pid = _startServer("nats://127.0.0.1:4223", "-a 127.0.0.1 -p 4223 -cluster nats://127.0.0.1:6223 -cluster_name abc -routes nats://127.0.0.1:6222,nats://127.0.0.1:6224", true);
+    if (s2Pid == NATS_INVALID_PID)
+        _stopServer(s1Pid);
+    CHECK_SERVER_STARTED(s2Pid);
+
+    test("DiscoveredServersCb triggered: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && (arg.sum == 0))
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    invoked = arg.sum;
+    arg.sum = 0;
+    natsMutex_Unlock(arg.m);
+    testCond((s == NATS_OK) && (invoked == 1));
+
+    {
+        const char *urls[] = {"127.0.0.1:4222", "127.0.0.1:4223"};
+
+        test("Check pool: ");
+        s = _checkPool(conn, (char**)urls, (int)(sizeof(urls)/sizeof(char*)));
+        testCond(s == NATS_OK);
+    }
+
+    s3Pid = _startServer("nats://127.0.0.1:4224", "-a 127.0.0.1 -p 4224 -cluster nats://127.0.0.1:6224 -cluster_name abc -routes nats://127.0.0.1:6222,nats://127.0.0.1:6223", true);
+    if (s3Pid == NATS_INVALID_PID)
+    {
+        _stopServer(s1Pid);
+        _stopServer(s2Pid);
+    }
+    CHECK_SERVER_STARTED(s3Pid);
+
+    test("DiscoveredServersCb triggered: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && (arg.sum == 0))
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    invoked = arg.sum;
+    arg.sum = 0;
+    natsMutex_Unlock(arg.m);
+    testCond((s == NATS_OK) && (invoked == 1));
+
+    {
+        const char *urls[] = {"127.0.0.1:4222", "127.0.0.1:4223", "127.0.0.1:4224"};
+        test("Check pool: ");
+        s = _checkPool(conn, (char**)urls, (int)(sizeof(urls)/sizeof(char*)));
+        testCond(s == NATS_OK);
+    }
+
+    // Stop s1. Since this was passed to the Connect() call, this one should
+    // still be present.
+    _stopServer(s1Pid);
+    s1Pid = NATS_INVALID_PID;
+
+    test("Wait for reconnect: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.reconnected)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    arg.reconnected = false;
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    {
+        const char *urls[] = {"127.0.0.1:4222", "127.0.0.1:4223", "127.0.0.1:4224"};
+
+        test("Check pool: ");
+        s = _checkPool(conn, (char**)urls, (int)(sizeof(urls)/sizeof(char*)));
+        testCond(s == NATS_OK);
+    }
+
+    {
+        const char *urls[] = {"127.0.0.1:4222", ""};
+        int port = 0;
+
+        // Check the server we reconnected to.
+        natsMutex_Lock(conn->mu);
+        port = conn->cur->url->port;
+        natsMutex_Unlock(conn->mu);
+
+        if (port == 4223)
+        {
+            urls[1] = "127.0.0.1:4224";
+            _stopServer(s2Pid);
+            s2Pid = NATS_INVALID_PID;
+            restartS2 = true;
+        }
+        else
+        {
+            urls[1] = "127.0.0.1:4223";
+            _stopServer(s3Pid);
+            s3Pid = NATS_INVALID_PID;
+        }
+
+        test("Wait for reconnect: ");
+        natsMutex_Lock(arg.m);
+        while ((s != NATS_TIMEOUT) && !arg.reconnected)
+            s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+        arg.reconnected = false;
+        natsMutex_Unlock(arg.m);
+        testCond(s == NATS_OK);
+
+        // The implicit server that we just shutdown should have been removed from the pool
+        if (s == NATS_OK)
+        {
+            test("Check pool: ");
+            s = _checkPool(conn, (char**)urls, (int)(sizeof(urls)/sizeof(char*)));
+            testCond(s == NATS_OK);
+        }
+    }
+
+    {
+        const char *urls[] = {"127.0.0.1:4222", "127.0.0.1:4223", "127.0.0.1:4224"};
+
+        if (restartS2)
+        {
+            s2Pid = _startServer("nats://127.0.0.1:4223", "-a 127.0.0.1 -p 4223 -cluster nats://127.0.0.1:6223 -cluster_name abc -routes nats://127.0.0.1:6222,nats://127.0.0.1:6224", true);
+            if (s2Pid == NATS_INVALID_PID)
+                _stopServer(s3Pid);
+            CHECK_SERVER_STARTED(s2Pid);
+        }
+        else
+        {
+            s3Pid = _startServer("nats://127.0.0.1:4224", "-a 127.0.0.1 -p 4224 -cluster nats://127.0.0.1:6224 -cluster_name abc -routes nats://127.0.0.1:6222,nats://127.0.0.1:6223", true);
+            if (s3Pid == NATS_INVALID_PID)
+                _stopServer(s2Pid);
+            CHECK_SERVER_STARTED(s3Pid);
+        }
+        // Since this is not a "new" server, the DiscoveredServersCB won't be invoked.
+
+        // Checking the pool may fail for a while.
+        test("Check pool: ");
+        s = _checkPool(conn, (char**)urls, (int)(sizeof(urls)/sizeof(char*)));
+        testCond(s == NATS_OK);
+    }
+
+    natsConnection_Close(conn);
+    _waitForConnClosed(&arg);
+    natsConnection_Destroy(conn);
+    conn = NULL;
+
+    // Restart s1
+    s1Pid = _startServer("nats://127.0.0.1:4222", "-a 127.0.0.1 -p 4222 -cluster nats://127.0.0.1:6222 -cluster_name abc -routes nats://127.0.0.1:6223,nats://127.0.0.1:6224", true);
+    if (s1Pid == NATS_INVALID_PID)
+    {
+        _stopServer(s2Pid);
+        _stopServer(s3Pid);
+    }
+    CHECK_SERVER_STARTED(s1Pid);
+
+    // We should have all 3 servers running now...
+    test("Connect ok: ");
+    s = natsConnection_Connect(&conn, opts);
+    testCond(s == NATS_OK);
+
+    {
+        int     i;
+        natsSrv *srvrs[3];
+
+        test("Server pool size should be 3: ");
+        natsMutex_Lock(conn->mu);
+        s = (conn->srvPool->size == 3 ? NATS_OK : NATS_ERR);
+        natsMutex_Unlock(conn->mu);
+        testCond(s == NATS_OK);
+
+        // Save references to servers from pool
+        natsMutex_Lock(conn->mu);
+        for (i=0; i<3; i++)
+            srvrs[i] = conn->srvPool->srvrs[i];
+        natsMutex_Unlock(conn->mu);
+
+        for (i=0; (s == NATS_OK) && (i<9); i++)
+        {
+            natsMutex_Lock(conn->mu);
+            natsSock_Shutdown(conn->sockCtx.fd);
+            natsMutex_Unlock(conn->mu);
+
+            test("Wait for reconnect: ");
+            natsMutex_Lock(arg.m);
+            while ((s != NATS_TIMEOUT) && !arg.reconnected)
+                s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+            arg.reconnected = false;
+            natsMutex_Unlock(arg.m);
+            testCond(s == NATS_OK);
+        }
+
+        {
+            int j;
+
+            natsMutex_Lock(conn->mu);
+            test("Server pool size should be 3: ");
+            s = (conn->srvPool->size == 3 ? NATS_OK : NATS_ERR);
+            natsMutex_Unlock(conn->mu);
+            testCond(s == NATS_OK);
+
+            test("Servers in pool have not been replaced: ");
+            natsMutex_Lock(conn->mu);
+            for (i=0; (s == NATS_OK) && (i<3); i++)
+            {
+                natsSrv *srv = conn->srvPool->srvrs[i];
+
+                s = NATS_ERR;
+                for (j=0; j<3; j++)
+                {
+                    if (srvrs[j] == srv)
+                    {
+                        s = NATS_OK;
+                        break;
+                    }
+                }
+            }
+            natsMutex_Unlock(conn->mu);
+            testCond(s == NATS_OK);
+        }
+
+        natsConnection_Close(conn);
+        _waitForConnClosed(&arg);
+    }
+
+    natsConnection_Destroy(conn);
+    natsOptions_Destroy(opts);
+
+    _stopServer(s3Pid);
+    _stopServer(s2Pid);
+    _stopServer(s1Pid);
+
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+test_ReconnectJitter(void)
+{
+    natsStatus          s       = NATS_OK;
+    natsConnection      *nc     = NULL;
+    natsOptions         *opts   = NULL;
+    natsPid             pid     = NATS_INVALID_PID;
+    int64_t             start   = 0;
+    int64_t             dur     = 0;
+    struct threadArg arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    IFOK(s, natsOptions_Create(&opts));
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    test("Default jitter values: ");
+    natsMutex_Lock(opts->mu);
+    s = (((opts->reconnectJitter == NATS_OPTS_DEFAULT_RECONNECT_JITTER)
+            && (opts->reconnectJitterTLS == NATS_OPTS_DEFAULT_RECONNECT_JITTER_TLS)) ? NATS_OK : NATS_ERR);
+    natsMutex_Unlock(opts->mu);
+    testCond(s == NATS_OK);
+
+    s = natsOptions_SetURL(opts, "nats://127.0.0.1:4222");
+    IFOK(s, natsOptions_SetMaxReconnect(opts, -1));
+    IFOK(s, natsOptions_SetReconnectWait(opts, 50));
+    IFOK(s, natsOptions_SetReconnectJitter(opts, 500, 0));
+    IFOK(s, natsOptions_SetReconnectedCB(opts, _reconnectedCb, (void*) &arg));
+
+    pid = _startServer("nats://127.0.0.1:4222", "-p 4222", true);
+    CHECK_SERVER_STARTED(pid);
+
+    test("Connect: ");
+    s = natsConnection_Connect(&nc, opts);
+    testCond(s == NATS_OK);
+
+    // Shutdown server
+    _stopServer(pid);
+    pid = NATS_INVALID_PID;
+
+    // Wait for several iterations of failed attempts and make
+    // sure that overall wait time is a bit more than just
+    // the number of reconnect attempts.
+    start = nats_Now();
+    nats_Sleep(400);
+    pid = _startServer("nats://127.0.0.1:4222", "-p 4222", true);
+    CHECK_SERVER_STARTED(pid);
+
+    test("Check jitter: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.reconnected)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    if (s == NATS_OK)
+        dur = nats_Now() - start;
+    natsMutex_Unlock(arg.m);
+    testCond((s == NATS_OK) && (dur >=500));
+
+    natsConnection_Destroy(nc);
+    nc = NULL;
+
+    // Use a long reconnect wait
+    s = natsOptions_SetReconnectWait(opts, 10*60*1000); // 10 minutes
+    IFOK(s, natsOptions_SetClosedCB(opts, _closedCb, (void*) &arg));
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    test("Connect: ");
+    s = natsConnection_Connect(&nc, opts);
+    testCond(s == NATS_OK);
+
+    // Cause a disconnect
+    _stopServer(pid);
+    pid = NATS_INVALID_PID;
+    // Wait a bit for the reconnect loop to go into wait mode.
+    nats_Sleep(50);
+    pid = _startServer("nats://127.0.0.1:4222", "-p 4222", true);
+    CHECK_SERVER_STARTED(pid);
+    // Now close and expect the reconnect thread to return..
+    natsConnection_Close(nc);
+
+    test("Wait for closed: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.closed)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    test("Check reconnect thread done: ");
+    natsConn_Lock(nc);
+    s = (nc->reconnectThread == NULL ? NATS_OK : NATS_ERR);
+    natsConn_Unlock(nc);
+    testCond(s == NATS_OK)
+
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+    _stopServer(pid);
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static int64_t
+_customReconnectDelayCB(natsConnection *nc, int attempts, void *closure)
+{
+    struct threadArg *arg  = (struct threadArg*) closure;
+    int64_t          delay = 0;
+
+    natsMutex_Lock(arg->m);
+    if (attempts != arg->control)
+    {
+        arg->status = NATS_ERR;
+        natsCondition_Signal(arg->c);
+    }
+    else
+    {
+        arg->control++;
+        if (attempts <= 4)
+            delay = 100;
+        else
+            natsConnection_Close(nc);
+    }
+    natsMutex_Unlock(arg->m);
+    return delay;
+}
+
+static void
+test_CustomReconnectDelay(void)
+{
+    natsStatus          s       = NATS_OK;
+    natsConnection      *nc     = NULL;
+    natsOptions         *opts   = NULL;
+    natsPid             pid     = NATS_INVALID_PID;
+    int64_t             start   = 0;
+    int64_t             dur     = 0;
+    struct threadArg arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    IFOK(s, natsOptions_Create(&opts));
+    IFOK(s, natsOptions_SetURL(opts, "nats://127.0.0.1:4222"));
+#if _WIN32
+    IFOK(s, natsOptions_SetTimeout(opts, 100));
+#endif
+    IFOK(s, natsOptions_SetMaxReconnect(opts, -1));
+    IFOK(s, natsOptions_SetCustomReconnectDelay(opts, _customReconnectDelayCB, (void*) &arg));
+    IFOK(s, natsOptions_SetClosedCB(opts, _closedCb, (void*) &arg));
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    arg.control = 1;
+    arg.status  = NATS_OK;
+
+    pid = _startServer("nats://127.0.0.1:4222", "-p 4222", true);
+    CHECK_SERVER_STARTED(pid);
+
+    test("Connect: ");
+    s = natsConnection_Connect(&nc, opts);
+    testCond(s == NATS_OK);
+
+    // Cause disconnect
+    _stopServer(pid);
+    pid = NATS_INVALID_PID;
+
+    // We should be trying to reconnect 4 times
+    start = nats_Now();
+
+    // Wait on error or completion of test.
+    test("Check custom delay cb: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.closed && (arg.status == NATS_OK))
+        s = natsCondition_TimedWait(arg.c, arg.m, 5000);
+    IFOK(s, arg.status);
+    if (s == NATS_OK)
+        dur = nats_Now()-start;
+    natsMutex_Unlock(arg.m);
+#if _WIN32
+    testCond((s == NATS_OK) && (dur <= 1000));
+#else
+    testCond((s == NATS_OK) && (dur <= 600));
+#endif
+
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+_lameDuckDiscoveredCb(natsConnection *nc, void *closure)
+{
+    struct threadArg    *arg = (struct threadArg*) closure;
+    natsStatus          s;
+    char                **servers = NULL;
+    int                 count     = 0;
+
+    natsMutex_Lock(arg->m);
+    s = natsConnection_GetDiscoveredServers(nc, &servers, &count);
+    if (s == NATS_OK)
+    {
+        int i;
+
+        if ((count != 1) || (strcmp(servers[0], "nats://127.0.0.1:1234") != 0))
+            arg->status = NATS_ERR;
+
+        for (i=0; i<count; i++)
+            free(servers[i]);
+        free(servers);
+    }
+    // Use this flag to indicate that discovered cb was invoked.
+    arg->done = true;
+    natsCondition_Signal(arg->c);
+    natsMutex_Unlock(arg->m);
+}
+
+static void
+_lameDuckCb(natsConnection *nc, void *closure)
+{
+    struct threadArg    *arg = (struct threadArg*) closure;
+
+    natsMutex_Lock(arg->m);
+    // Use this flag to indicate that LDM cb was invoked.
+    arg->disconnected = true;
+    natsCondition_Signal(arg->c);
+    natsMutex_Unlock(arg->m);
+}
+
+static void
+_lameDuckMockupServerThread(void *closure)
+{
+    natsStatus          s = NATS_OK;
+    natsSock            sock = NATS_SOCK_INVALID;
+    struct threadArg    *arg = (struct threadArg*) closure;
+    char                buffer[1024];
+    const char          *ldm[] = {"INFO {\"ldm\":true}\r\n", "INFO {\"connect_urls\":[\"127.0.0.1:1234\"],\"ldm\":true}\r\n"};
+    natsSockCtx         ctx;
+    int                 i;
+
+    memset(&ctx, 0, sizeof(natsSockCtx));
+
+    s = _startMockupServer(&sock, "127.0.0.1", "4222");
+    natsMutex_Lock(arg->m);
+    arg->status = s;
+    natsCondition_Signal(arg->c);
+    natsMutex_Unlock(arg->m);
+
+    for (i=0; (s == NATS_OK) && (i<2); i++)
+    {
+        if (((ctx.fd = accept(sock, NULL, NULL)) == NATS_SOCK_INVALID)
+                || (natsSock_SetCommonTcpOptions(ctx.fd) != NATS_OK))
+        {
+            s = NATS_SYS_ERROR;
+        }
+        if (s == NATS_OK)
+        {
+            const char *info = "INFO {\"server_id\":\"foobar\"}\r\n";
+
+            // Send INFO.
+            s = natsSock_WriteFully(&ctx, info, (int) strlen(info));
+            if (s == NATS_OK)
+            {
+                memset(buffer, 0, sizeof(buffer));
+
+                // Read connect and ping commands sent from the client
+                s = natsSock_ReadLine(&ctx, buffer, sizeof(buffer));
+                IFOK(s, natsSock_ReadLine(&ctx, buffer, sizeof(buffer)));
+            }
+            // Send PONG
+            IFOK(s, natsSock_WriteFully(&ctx,_PONG_PROTO_, _PONG_PROTO_LEN_));
+            if (s == NATS_OK)
+            {
+                // Wait a bit and then send a INFO with LDM
+                nats_Sleep(100);
+                s = natsSock_WriteFully(&ctx, ldm[i], (int) strlen(ldm[i]));
+                // Wait for client to close
+                if (s == NATS_OK)
+                    natsSock_ReadLine(&ctx, buffer, sizeof(buffer));
+            }
+            natsSock_Close(ctx.fd);
+        }
+    }
+
+    natsSock_Close(sock);
+}
+
+static void
+test_LameDuckMode(void)
+{
+    natsStatus          s       = NATS_OK;
+    natsConnection      *nc     = NULL;
+    natsOptions         *opts   = NULL;
+    natsThread          *t      = NULL;
+    int                 i;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    IFOK(s, natsOptions_Create(&opts));
+    IFOK(s, natsOptions_SetURL(opts, "nats://127.0.0.1:4222"));
+    IFOK(s, natsOptions_SetMaxReconnect(opts, -1));
+    IFOK(s, natsOptions_SetDiscoveredServersCB(opts, _lameDuckDiscoveredCb, (void*) &arg));
+    IFOK(s, natsOptions_SetLameDuckModeCB(opts, _lameDuckCb, (void*) &arg));
+    // IFOK(s, natsOptions_SetClosedCB(opts, _closedCb, (void*) &arg));
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    // Set this to error, the mock server should set it to OK
+    // if it can start successfully.
+    arg.status = NATS_ERR;
+    s = natsThread_Create(&t, _lameDuckMockupServerThread, (void*) &arg);
+    if (s == NATS_OK)
+    {
+        // Wait for server to be ready
+        natsMutex_Lock(arg.m);
+        while ((s != NATS_TIMEOUT) && (arg.status != NATS_OK))
+            s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+        natsMutex_Unlock(arg.m);
+    }
+
+    for (i=0; i<2; i++)
+    {
+        test("Connect: ");
+        s = natsConnection_Connect(&nc, opts);
+        testCond(s == NATS_OK);
+
+        test("Lame duck callback invoked: ");
+        natsMutex_Lock(arg.m);
+        while ((s != NATS_TIMEOUT) && !arg.disconnected)
+            s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+        natsMutex_Unlock(arg.m);
+        testCond(s == NATS_OK);
+
+        if (i == 0)
+        {
+            test("Discovered not invoked: ");
+            natsMutex_Lock(arg.m);
+            while ((s != NATS_TIMEOUT) && !arg.done)
+                s = natsCondition_TimedWait(arg.c, arg.m, 200);
+            if ((arg.status == NATS_OK) && (s == NATS_TIMEOUT))
+                s = NATS_OK;
+            natsMutex_Unlock(arg.m);
+            testCond(s == NATS_OK);
+        }
+        else
+        {
+            test("Discovered servers ok: ");
+            natsMutex_Lock(arg.m);
+            while ((s != NATS_TIMEOUT) && !arg.done)
+                s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+            IFOK(s, arg.status);
+            natsMutex_Unlock(arg.m);
+            testCond(s == NATS_OK);
+        }
+
+        natsConnection_Destroy(nc);
+        nc = NULL;
+    }
+
+    if (t != NULL)
+    {
+        natsThread_Join(t);
+        natsThread_Destroy(t);
+    }
+
+    natsOptions_Destroy(opts);
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+test_Version(void)
+{
+    const char *str = NULL;
+
+    test("Compatibility: ");
+    testCond(nats_CheckCompatibility() == true);
+
+    test("Version string: ");
+    str = nats_GetVersion();
+    testCond((str != NULL)
+             && (strcmp(str, LIB_NATS_VERSION_STRING) == 0));
+
+    test("Version number: ");
+    testCond(nats_GetVersionNumber() == LIB_NATS_VERSION_NUMBER);
+}
+
+static void
+test_VersionMatchesTag(void)
+{
+    natsStatus  s = NATS_OK;
+    const char  *tag;
+
+    tag = getenv("TRAVIS_TAG");
+    if ((tag == NULL) || (tag[0] == '\0'))
+    {
+        test("Skipping test since no tag detected: ");
+        testCond(true);
+        return;
+    }
+    test("Check tag and version match: ");
+    // We expect a tag of the form vX.Y.Z. If that's not the case,
+    // we need someone to have a look. So fail if first letter is not
+    // a `v`
+    if (tag[0] != 'v')
+        s = NATS_ERR;
+    else
+    {
+        // Strip the `v` from the tag for the version comparison.
+        s = (strcmp(nats_GetVersion(), tag+1) == 0 ? NATS_OK : NATS_ERR);
+    }
+    testCond(s == NATS_OK);
+}
+
+static void
+_openCloseAndWaitMsgCB(natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure)
+{
+    struct threadArg *arg = (struct threadArg*) closure;
+
+    nats_Sleep(300);
+    natsMsg_Destroy(msg);
+    natsMutex_Lock(arg->m);
+    arg->results[0]++;
+    natsMutex_Unlock(arg->m);
+}
+
+static void
+_openCloseAndWaitConnClosedCB(natsConnection *nc, void *closure)
+{
+    struct threadArg *arg = (struct threadArg*) closure;
+
+    natsMutex_Lock(arg->m);
+    arg->sum++;
+    natsMutex_Unlock(arg->m);
+}
+
+static void
+_openCloseAndWaitCloseFromThread(void *closure)
+{
+    struct threadArg *arg = (struct threadArg*) closure;
+
+    natsMutex_Lock(arg->m);
+    arg->status = nats_CloseAndWait(0);
+    arg->done   = true;
+    natsCondition_Signal(arg->c);
+    natsMutex_Unlock(arg->m);
+}
+
+static void
+_openCloseAndWaitThread(void *closure)
+{
+    nats_Sleep(300);
+    natsLib_Release();
+}
+
+static void
+test_OpenCloseAndWait(void)
+{
+    natsStatus          s;
+    natsConnection      *nc  = NULL;
+    natsOptions         *opts= NULL;
+    natsSubscription    *sub = NULL;
+    natsPid             pid  = NATS_INVALID_PID;
+    int                 i;
+    natsThread          *t   = NULL;
+    struct threadArg    arg;
+
+    pid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    if (_createDefaultThreadArgsForCbTests(&arg) != NATS_OK)
+        FAIL("Unable to setup test");
+
+    // First close the library since it is opened in main
+    test("Close to prepare for test: ");
+    s = nats_CloseAndWait(0);
+    testCond(s == NATS_OK);
+
+    test("Open/Close in loop: ");
+    for (i=0;i<2;i++)
+    {
+        s = nats_Open(-1);
+        IFOK(s, natsOptions_Create(&opts));
+        IFOK(s, natsOptions_SetClosedCB(opts, _openCloseAndWaitConnClosedCB, (void*)&arg));
+        IFOK(s, natsConnection_Connect(&nc, opts));
+        IFOK(s, natsConnection_Subscribe(&sub, nc, "foo", _openCloseAndWaitMsgCB, (void*)&arg));
+        IFOK(s, natsConnection_PublishString(nc, "foo", "hello"));
+        IFOK(s, natsConnection_Flush(nc));
+        if (s == NATS_OK)
+        {
+            for (;;)
+            {
+                natsMutex_Lock(arg.m);
+                if (arg.results[0] == (i+1))
+                {
+                    natsMutex_Unlock(arg.m);
+                    break;
+                }
+                natsMutex_Unlock(arg.m);
+                nats_Sleep(100);
+            }
+
+            natsSubscription_Destroy(sub);
+            natsConnection_Destroy(nc);
+            natsOptions_Destroy(opts);
+            nats_CloseAndWait(0);
+        }
+    }
+    testCond(s == NATS_OK);
+
+    test("Check async cb count: ");
+    natsMutex_Lock(arg.m);
+    testCond(arg.sum == 2);
+    natsMutex_Unlock(arg.m);
+
+    test("Check msgs count: ");
+    natsMutex_Lock(arg.m);
+    testCond(arg.results[0] == 2);
+    natsMutex_Unlock(arg.m);
+
+    test("Close while not opened returns error: ");
+    s = nats_CloseAndWait(0);
+    testCond(s == NATS_NOT_INITIALIZED);
+
+    // Re-open for rest of test
+    nats_Open(-1);
+
+    test("Check Close from thread returns error: ");
+    s = natsThread_Create(&t, _openCloseAndWaitCloseFromThread, (void*)&arg);
+    if (s == NATS_OK)
+    {
+        natsMutex_Lock(arg.m);
+        while ((s != NATS_TIMEOUT) && !arg.done)
+            s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+        s = (arg.status == NATS_ILLEGAL_STATE ? NATS_OK : NATS_ERR);
+        natsMutex_Unlock(arg.m);
+
+        natsThread_Join(t);
+        natsThread_Destroy(t);
+        t = NULL;
+    }
+    testCond(s == NATS_OK);
+
+    test("No timeout: ");
+    natsLib_Retain();
+    s = natsThread_Create(&t, _openCloseAndWaitThread, NULL);
+    IFOK(s, nats_CloseAndWait(0));
+    testCond(s == NATS_OK);
+
+    natsThread_Join(t);
+    natsThread_Destroy(t);
+    t = NULL;
+    nats_Open(-1);
+
+    test("Timeout: ");
+    natsLib_Retain();
+    s = natsThread_Create(&t, _openCloseAndWaitThread, NULL);
+    IFOK(s, nats_CloseAndWait(100));
+    testCond(s == NATS_TIMEOUT);
+
+    // Now wait for thread to exit
+    natsThread_Join(t);
+    natsThread_Destroy(t);
+
+    _destroyDefaultThreadArgs(&arg);
+    _stopServer(pid);
+}
+
+static void
+_testGetLastErrInThread(void *arg)
+{
+    natsStatus  getLastErrSts;
+    natsOptions *opts = NULL;
+    const char  *getLastErr = NULL;
+
+    test("Check that new thread has get last err clear: ");
+    getLastErr = nats_GetLastError(&getLastErrSts);
+    testCond((getLastErr == NULL) && (getLastErrSts == NATS_OK));
+
+    natsOptions_Destroy(opts);
+}
+
+static void
+test_GetLastError(void)
+{
+    natsStatus  s, getLastErrSts;
+    natsOptions *opts = NULL;
+    const char  *getLastErr = NULL;
+    natsThread  *t = NULL;
+    char        stackBuf[256];
+    FILE        *stackFile = NULL;
+
+    stackBuf[0] = '\0';
+
+    test("Check GetLastError returns proper status: ");
+    s = natsOptions_SetAllowReconnect(NULL, false);
+
+    getLastErr = nats_GetLastError(&getLastErrSts);
+
+    testCond((s == getLastErrSts)
+             && (getLastErr != NULL)
+             && (strstr(getLastErr, "Invalid") != NULL));
+
+    test("Check GetLastErrorStack with invalid args: ");
+    s = nats_GetLastErrorStack(NULL, 10);
+    if (s != NATS_OK)
+        s = nats_GetLastErrorStack(stackBuf, 0);
+    testCond(s == NATS_INVALID_ARG);
+
+    test("Check GetLastErrorStack returns proper insufficient buffer: ");
+    s = nats_GetLastErrorStack(stackBuf, 10);
+    testCond(s == NATS_INSUFFICIENT_BUFFER);
+
+    test("Check GetLastErrorStack: ");
+    s = nats_GetLastErrorStack(stackBuf, sizeof(stackBuf));
+    testCond((s == NATS_OK)
+             && (strlen(stackBuf) > 0)
+             && (strstr(stackBuf, "natsOptions_SetAllowReconnect") != NULL));
+
+    test("Check PrintStack: ");
+    stackBuf[0] = '\0';
+    stackFile = fopen("stack.txt", "w");
+    if (stackFile == NULL)
+        FAIL("Unable to create a file for print stack test");
+
+    s = NATS_OK;
+    nats_PrintLastErrorStack(stackFile);
+    fclose(stackFile);
+    stackFile = fopen("stack.txt", "r");
+    s = (fgets(stackBuf, sizeof(stackBuf), stackFile) == NULL ? NATS_ERR : NATS_OK);
+    if ((s == NATS_OK)
+        && ((strlen(stackBuf) == 0)
+            || (strstr(stackBuf, "Invalid Argument") == NULL)))
+    {
+        s = NATS_ERR;
+    }
+    s = (fgets(stackBuf, sizeof(stackBuf), stackFile) == NULL ? NATS_ERR : NATS_OK);
+    if (s == NATS_OK)
+        s = (fgets(stackBuf, sizeof(stackBuf), stackFile) == NULL ? NATS_ERR : NATS_OK);
+    if ((s == NATS_OK)
+        && ((strlen(stackBuf) == 0)
+            || (strstr(stackBuf, "natsOptions_SetAllowReconnect") == NULL)))
+    {
+        s = NATS_ERR;
+    }
+    testCond(s == NATS_OK);
+    fclose(stackFile);
+    remove("stack.txt");
+
+    test("Check the error not cleared until next error occurs: ");
+    s = natsOptions_Create(&opts);
+
+    getLastErr = nats_GetLastError(&getLastErrSts);
+
+    testCond((s == NATS_OK)
+             && (getLastErrSts != NATS_OK)
+             && (getLastErr != NULL)
+             && (strstr(getLastErr, "Invalid") != NULL));
+
+    s = natsThread_Create(&t, _testGetLastErrInThread, NULL);
+    if (s == NATS_OK)
+    {
+        natsThread_Join(t);
+        natsThread_Destroy(t);
+    }
+
+    natsOptions_Destroy(opts);
+
+    nats_clearLastError();
+    stackBuf[0] = '\0';
+
+    test("Check stack not updated when asked: ");
+    nats_doNotUpdateErrStack(true);
+    s = natsConnection_Publish(NULL, NULL, NULL, 0);
+    nats_GetLastErrorStack(stackBuf, sizeof(stackBuf));
+    testCond((s != NATS_OK)
+             && (stackBuf[0] == '\0'));
+
+    test("Check call reentrant: ");
+    nats_doNotUpdateErrStack(true);
+    nats_doNotUpdateErrStack(false);
+    s = natsConnection_Publish(NULL, NULL, NULL, 0);
+    nats_GetLastErrorStack(stackBuf, sizeof(stackBuf));
+    testCond((s != NATS_OK)
+             && (stackBuf[0] == '\0'));
+
+    nats_doNotUpdateErrStack(false);
+
+    test("Check stack updates again: ");
+    s = natsConnection_Publish(NULL, NULL, NULL, 0);
+    nats_GetLastErrorStack(stackBuf, sizeof(stackBuf));
+    testCond((s != NATS_OK)
+             && (stackBuf[0] != '\0'));
+
+    nats_clearLastError();
+}
+
+static void
+test_StaleConnection(void)
+{
+    natsStatus          s = NATS_OK;
+    natsSock            sock = NATS_SOCK_INVALID;
+    natsThread          *t = NULL;
+    struct threadArg    arg;
+    natsSockCtx         ctx;
+    int                 i;
+    const char          *stale_conn_err = "-ERR 'Stale Connection'\r\n";
+
+    memset(&ctx, 0, sizeof(natsSockCtx));
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    IFOK(s, natsOptions_Create(&(arg.opts)));
+    IFOK(s, natsOptions_SetReconnectWait(arg.opts, 20));
+    IFOK(s, natsOptions_SetReconnectJitter(arg.opts, 0, 0));
+    IFOK(s, natsOptions_SetMaxReconnect(arg.opts, 100));
+    IFOK(s, natsOptions_SetDisconnectedCB(arg.opts, _disconnectedCb, &arg));
+    IFOK(s, natsOptions_SetReconnectedCB(arg.opts, _reconnectedCb, &arg));
+    IFOK(s, natsOptions_SetClosedCB(arg.opts, _closedCb, &arg));
+    if (s != NATS_OK)
+        FAIL("@@ Unable to setup test!");
+
+    arg.control = 5;
+
+    test("Behavior of connection on Stale Connection: ")
+
+    s = _startMockupServer(&sock, "localhost", "4222");
+
+    // Start the thread that will try to connect to our server...
+    IFOK(s, natsThread_Create(&t, _connectToMockupServer, (void*) &arg));
+
+    for (i = 0; (i < 2) && (s == NATS_OK); i++)
+    {
+        if (((ctx.fd = accept(sock, NULL, NULL)) == NATS_SOCK_INVALID)
+                || (natsSock_SetCommonTcpOptions(ctx.fd) != NATS_OK))
+        {
+            s = NATS_SYS_ERROR;
+        }
+        if (s == NATS_OK)
+        {
+            char info[1024];
+
+            strncpy(info,
+                    "INFO {\"server_id\":\"foobar\",\"version\":\"latest\",\"go\":\"latest\",\"host\":\"localhost\",\"port\":4222,\"auth_required\":false,\"tls_required\":false,\"max_payload\":1048576}\r\n",
+                    sizeof(info));
+
+            // Send INFO.
+            s = natsSock_WriteFully(&ctx, info, (int) strlen(info));
+            if (s == NATS_OK)
+            {
+                char buffer[1024];
+
+                memset(buffer, 0, sizeof(buffer));
+
+                // Read connect and ping commands sent from the client
+                s = natsSock_ReadLine(&ctx, buffer, sizeof(buffer));
+                IFOK(s, natsSock_ReadLine(&ctx, buffer, sizeof(buffer)));
+            }
+            // Send PONG
+            IFOK(s, natsSock_WriteFully(&ctx, _PONG_PROTO_, _PONG_PROTO_LEN_));
+
+            if ((s == NATS_OK) && (i == 0))
+            {
+                // Wait a tiny, and simulate a Stale Connection
+                nats_Sleep(50);
+                s = natsSock_WriteFully(&ctx, stale_conn_err,
+                                        (int)strlen(stale_conn_err));
+
+                // The client should try to reconnect. When getting the
+                // disconnected callback, wait for the disconnect cb
+                natsMutex_Lock(arg.m);
+                while ((s != NATS_TIMEOUT) && !(arg.disconnected))
+                    s = natsCondition_TimedWait(arg.c, arg.m, 5000);
+                natsMutex_Unlock(arg.m);
+            }
+            else if (s == NATS_OK)
+            {
+                natsMutex_Lock(arg.m);
+                // We should check on !arg.closed here, but unfortunately,
+                // on Windows, the thread calling natsConnection_Close()
+                // would be blocked waiting for the readLoop thread to
+                // exit, which it would not because fd shutdown is not
+                // causing a socket error if the server is not closing
+                // its side.
+                while ((s != NATS_TIMEOUT) && (arg.disconnects != 2))
+                    s = natsCondition_TimedWait(arg.c, arg.m, 5000);
+                natsMutex_Unlock(arg.m);
+            }
+
+            natsSock_Close(ctx.fd);
+        }
+    }
+    natsSock_Close(sock);
+
+    // Wait for the client to finish.
+    if (t != NULL)
+    {
+        natsThread_Join(t);
+        natsThread_Destroy(t);
+    }
+
+    natsMutex_Lock(arg.m);
+    IFOK(s, arg.status);
+    if (s == NATS_OK)
+    {
+        // Wait for closed CB
+        while ((s != NATS_TIMEOUT) && !(arg.closed))
+            s = natsCondition_TimedWait(arg.c, arg.m, 5000);
+        IFOK(s, arg.status);
+    }
+    natsMutex_Unlock(arg.m);
+
+    testCond((s == NATS_OK)
+             && (arg.disconnects == 2)
+             && (arg.reconnects == 1)
+             && (arg.closed));
+
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+test_ServerErrorClosesConnection(void)
+{
+    natsStatus          s = NATS_OK;
+    natsSock            sock = NATS_SOCK_INVALID;
+    natsThread          *t = NULL;
+    struct threadArg    arg;
+    natsSockCtx         ctx;
+
+    memset(&ctx, 0, sizeof(natsSockCtx));
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    IFOK(s, natsOptions_Create(&(arg.opts)));
+    IFOK(s, natsOptions_SetReconnectWait(arg.opts, 20));
+    IFOK(s, natsOptions_SetReconnectJitter(arg.opts, 0, 0));
+    IFOK(s, natsOptions_SetMaxReconnect(arg.opts, 100));
+    IFOK(s, natsOptions_SetDisconnectedCB(arg.opts, _disconnectedCb, &arg));
+    IFOK(s, natsOptions_SetReconnectedCB(arg.opts, _reconnectedCb, &arg));
+    IFOK(s, natsOptions_SetClosedCB(arg.opts, _closedCb, &arg));
+    if (s != NATS_OK)
+        FAIL("@@ Unable to setup test!");
+
+    arg.control = 6;
+    arg.string  = "Any Error";
+
+    test("Behavior of connection on Server Error: ")
+
+    s = _startMockupServer(&sock, "localhost", "4222");
+
+    // Start the thread that will try to connect to our server...
+    IFOK(s, natsThread_Create(&t, _connectToMockupServer, (void*) &arg));
+
+    if ((s == NATS_OK)
+        && (((ctx.fd = accept(sock, NULL, NULL)) == NATS_SOCK_INVALID)
+            || (natsSock_SetCommonTcpOptions(ctx.fd) != NATS_OK)))
+    {
+        s = NATS_SYS_ERROR;
+    }
+    if (s == NATS_OK)
+    {
+        char info[1024];
+
+        strncpy(info,
+                "INFO {\"server_id\":\"foobar\",\"version\":\"latest\",\"go\":\"latest\",\"host\":\"localhost\",\"port\":4222,\"auth_required\":false,\"tls_required\":false,\"max_payload\":1048576}\r\n",
+                sizeof(info));
+
+        // Send INFO.
+        s = natsSock_WriteFully(&ctx, info, (int) strlen(info));
+        if (s == NATS_OK)
+        {
+            char buffer[1024];
+
+            memset(buffer, 0, sizeof(buffer));
+
+            // Read connect and ping commands sent from the client
+            s = natsSock_ReadLine(&ctx, buffer, sizeof(buffer));
+            IFOK(s, natsSock_ReadLine(&ctx, buffer, sizeof(buffer)));
+        }
+        // Send PONG
+        IFOK(s, natsSock_WriteFully(&ctx, _PONG_PROTO_, _PONG_PROTO_LEN_));
+
+        if (s == NATS_OK)
+        {
+            // Wait a tiny, and simulate an error sent by the server
+            nats_Sleep(50);
+
+            snprintf(info, sizeof(info), "-ERR '%s'\r\n", arg.string);
+            s = natsSock_WriteFully(&ctx, info, (int)strlen(info));
+        }
+
+        // Wait for the client to be done.
+        natsMutex_Lock(arg.m);
+        while ((s != NATS_TIMEOUT) && !(arg.closed))
+            s = natsCondition_TimedWait(arg.c, arg.m, 5000);
+        natsMutex_Unlock(arg.m);
+
+        natsSock_Close(ctx.fd);
+    }
+    natsSock_Close(sock);
+
+    // Wait for the client to finish.
+    if (t != NULL)
+    {
+        natsThread_Join(t);
+        natsThread_Destroy(t);
+    }
+
+    natsMutex_Lock(arg.m);
+    if (s == NATS_OK)
+    {
+        // Wait for closed CB
+        while ((s != NATS_TIMEOUT) && !(arg.closed))
+            s = natsCondition_TimedWait(arg.c, arg.m, 5000);
+        IFOK(s, arg.status);
+    }
+    natsMutex_Unlock(arg.m);
+
+    testCond((s == NATS_ERR)
+             && (arg.disconnects == 1)
+             && (arg.reconnects == 0)
+             && (arg.closed));
+
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+test_NoEcho(void)
+{
+    natsStatus          s;
+    natsOptions         *opts = NULL;
+    natsConnection      *conn = NULL;
+    natsSubscription    *sub  = NULL;
+    natsPid             pid   = NATS_INVALID_PID;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    IFOK(s, natsOptions_Create(&opts));
+    IFOK(s, natsOptions_SetURL(opts, "nats://127.0.0.1:4222"));
+    IFOK(s, natsOptions_SetNoEcho(opts, true));
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    pid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    arg.control = 0;
+    arg.string = "test";
+    test("Setup: ");
+    s = natsConnection_Connect(&conn, opts);
+    IFOK(s, natsConnection_Subscribe(&sub, conn, "foo", _recvTestString, (void*)&arg));
+    IFOK(s, natsConnection_PublishString(conn, "foo", arg.string));
+    IFOK(s, natsConnection_Flush(conn));
+    // repeat
+    IFOK(s, natsConnection_Flush(conn));
+    testCond(s == NATS_OK);
+
+    test("NoEcho: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.msgReceived)
+        s = natsCondition_TimedWait(arg.c, arg.m, 500);
+    natsMutex_Unlock(arg.m);
+    // Message should not be received.
+    testCond(s == NATS_TIMEOUT);
+
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(conn);
+    natsOptions_Destroy(opts);
+
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(pid);
+}
+
+static void
+_startMockupServerThread(void *closure)
+{
+    natsStatus          s = NATS_OK;
+    natsSock            sock = NATS_SOCK_INVALID;
+    struct threadArg    *arg = (struct threadArg*) closure;
+    natsSockCtx         ctx;
+    testCheckInfoCB     checkInfoCB = NULL;
+
+    memset(&ctx, 0, sizeof(natsSockCtx));
+
+    s = _startMockupServer(&sock, "localhost", "4222");
+    natsMutex_Lock(arg->m);
+    arg->status = s;
+    natsCondition_Signal(arg->c);
+    checkInfoCB = arg->checkInfoCB;
+    natsMutex_Unlock(arg->m);
+
+    if (((ctx.fd = accept(sock, NULL, NULL)) == NATS_SOCK_INVALID)
+            || (natsSock_SetCommonTcpOptions(ctx.fd) != NATS_OK))
+    {
+        s = NATS_SYS_ERROR;
+    }
+    if (s == NATS_OK)
+    {
+        char info[1024];
+
+        snprintf(info, sizeof(info), "%s", arg->string);
+
+        // Send INFO.
+        s = natsSock_WriteFully(&ctx, info, (int) strlen(info));
+        if (s == NATS_OK)
+        {
+            char buffer[1024];
+
+            memset(buffer, 0, sizeof(buffer));
+
+            // Read connect and ping commands sent from the client
+            s = natsSock_ReadLine(&ctx, buffer, sizeof(buffer));
+            if ((s == NATS_OK) && (checkInfoCB != NULL))
+                s = (*checkInfoCB)(buffer);
+            IFOK(s, natsSock_ReadLine(&ctx, buffer, sizeof(buffer)));
+        }
+        // Send PONG
+        IFOK(s, natsSock_WriteFully(&ctx, _PONG_PROTO_, _PONG_PROTO_LEN_));
+
+        if (s == NATS_OK)
+        {
+            // Wait for client to tell us it is done
+            natsMutex_Lock(arg->m);
+            while ((s != NATS_TIMEOUT) && !(arg->done))
+                s = natsCondition_TimedWait(arg->c, arg->m, 10000);
+            natsMutex_Unlock(arg->m);
+        }
+        natsSock_Close(ctx.fd);
+    }
+
+    natsSock_Close(sock);
+}
+
+static void
+test_NoEchoOldServer(void)
+{
+    natsStatus          s;
+    natsConnection      *conn = NULL;
+    natsOptions         *opts = NULL;
+    natsThread          *t    = NULL;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    IFOK(s, natsOptions_Create(&opts));
+    IFOK(s, natsOptions_SetNoEcho(opts, true));
+    if (s == NATS_OK)
+    {
+        // Set this to error, the mock server should set it to OK
+        // if it can start successfully.
+        arg.status = NATS_ERR;
+        arg.string = "INFO {\"server_id\":\"22\",\"version\":\"latest\",\"go\":\"latest\",\"port\":4222,\"max_payload\":1048576}\r\n";
+        s = natsThread_Create(&t, _startMockupServerThread, (void*) &arg);
+    }
+    if (s == NATS_OK)
+    {
+        // Wait for server to be ready
+        natsMutex_Lock(arg.m);
+        while ((s != NATS_TIMEOUT) && (arg.status != NATS_OK))
+            s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+        natsMutex_Unlock(arg.m);
+    }
+    if (s != NATS_OK)
+    {
+        if (t != NULL)
+        {
+            natsThread_Join(t);
+            natsThread_Destroy(t);
+        }
+        natsOptions_Destroy(opts);
+        _destroyDefaultThreadArgs(&arg);
+        FAIL("Unable to setup test");
+    }
+
+    test("NoEcho with old server: ");
+    s = natsConnection_Connect(&conn, opts);
+    testCond(s == NATS_NO_SERVER_SUPPORT);
+
+    // Notify mock server we are done
+    natsMutex_Lock(arg.m);
+    arg.done = true;
+    natsCondition_Signal(arg.c);
+    natsMutex_Unlock(arg.m);
+
+    natsOptions_Destroy(opts);
+    natsThread_Join(t);
+    natsThread_Destroy(t);
+
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+test_DrainSub(void)
+{
+    natsStatus          s;
+    natsConnection      *nc = NULL;
+    natsSubscription    *sub= NULL;
+    natsSubscription    *sub2 = NULL;
+    natsSubscription    *sub3 = NULL;
+    natsOptions         *opts = NULL;
+    natsPid             pid = NATS_INVALID_PID;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    arg.control = 8;
+
+    pid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    test("Connect and create subscriptions: ");
+    s = natsConnection_ConnectTo(&nc, "nats://127.0.0.1:4222");
+    IFOK(s, natsConnection_Subscribe(&sub, nc, "foo", _recvTestString, (void*) &arg));
+    IFOK(s, natsConnection_SubscribeSync(&sub2, nc, "foo"));
+    IFOK(s, natsConnection_SubscribeSync(&sub3, nc, "foo"));
+    IFOK(s, natsSubscription_AutoUnsubscribe(sub3, 2));
+    testCond(s == NATS_OK);
+
+    test("WaitForDrainCompletion returns invalid arg: ");
+    s = natsSubscription_WaitForDrainCompletion(NULL, 2000);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("WaitForDrainCompletion returns illegal state: ");
+    s = natsSubscription_WaitForDrainCompletion(sub, 2000);
+    testCond(s == NATS_ILLEGAL_STATE);
+    nats_clearLastError();
+
+    test("Send 2 messages: ");
+    s = natsConnection_PublishString(nc, "foo", "msg");
+    IFOK(s, natsConnection_PublishString(nc, "foo", "msg"));
+    IFOK(s, natsConnection_Flush(nc));
+    testCond(s == NATS_OK);
+
+    test("Call Drain on subscription: ");
+    // Pass 0 or negative value to represent "for ever" timeout.
+    s = natsSubscription_DrainTimeout(sub, -1);
+    testCond(s == NATS_OK);
+
+    test("Call Drain a second time is ok: ");
+    s = natsSubscription_Drain(sub);
+    testCond(s == NATS_OK);
+
+    test("Drain sync subs: ");
+    s = natsSubscription_Drain(sub2);
+    IFOK(s, natsSubscription_Drain(sub3));
+    testCond(s == NATS_OK);
+
+    test("Wait for Drain times out: ");
+    s = natsSubscription_WaitForDrainCompletion(sub, 10);
+    if (s == NATS_TIMEOUT)
+        s = natsSubscription_WaitForDrainCompletion(sub2, 10);
+    testCond(s == NATS_TIMEOUT);
+    nats_clearLastError();
+
+    test("Send 1 more message: ");
+    s = natsConnection_PublishString(nc, "foo", "msg");
+    testCond(s == NATS_OK);
+
+    // Unblock the callback.
+    natsMutex_Lock(arg.m);
+    arg.closed = true;
+    natsCondition_Signal(arg.c);
+    natsMutex_Unlock(arg.m);
+
+    test("Wait for Drain to complete: ");
+    s = natsSubscription_WaitForDrainCompletion(sub, -1);
+    testCond(s == NATS_OK);
+
+    // Wait a bit and make sure that we did not receive the 3rd msg
+    test("Third message not received: ");
+    nats_Sleep(100);
+    natsMutex_Lock(arg.m);
+    if ((s == NATS_OK) && (arg.sum != 2))
+        s = NATS_ERR;
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    test("Drain on closed sub fails: ");
+    s = natsSubscription_Drain(sub);
+    testCond(s == NATS_INVALID_SUBSCRIPTION);
+    nats_clearLastError();
+
+    test("Consume sync messages: ");
+    {
+        natsMsg *msg = NULL;
+        int     i;
+
+        s = NATS_OK;
+        for (i=0; (s == NATS_OK) && (i<2); i++)
+        {
+            s = natsSubscription_NextMsg(&msg, sub2, 2000);
+            natsMsg_Destroy(msg);
+            msg = NULL;
+        }
+        for (i=0; (s == NATS_OK) && (i<2); i++)
+        {
+            s = natsSubscription_NextMsg(&msg, sub3, 2000);
+            natsMsg_Destroy(msg);
+            msg = NULL;
+        }
+    }
+    testCond(s == NATS_OK);
+
+    test("Wait for drain to complete: ");
+    s = natsSubscription_WaitForDrainCompletion(sub2, 1000);
+    IFOK(s, natsSubscription_WaitForDrainCompletion(sub3, 1000));
+    testCond(s == NATS_OK);
+
+    // Repeat async test with auto-unsubscribe
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+    natsMutex_Lock(arg.m);
+    arg.sum    = 0;
+    arg.closed = false;
+    natsMutex_Unlock(arg.m);
+
+    test("Async sub with auto-unsub: ");
+    s = natsConnection_Subscribe(&sub, nc, "foo", _recvTestString, (void*)&arg);
+    IFOK(s, natsSubscription_AutoUnsubscribe(sub, 2));
+    testCond(s == NATS_OK);
+
+    test("Send 2 messages: ");
+    s = natsConnection_PublishString(nc, "foo", "msg");
+    IFOK(s, natsConnection_PublishString(nc, "foo", "msg"));
+    IFOK(s, natsConnection_Flush(nc));
+    testCond(s == NATS_OK);
+
+    test("Check drain status with invalid arg: ");
+    s = natsSubscription_DrainCompletionStatus(NULL);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Check drain status fails: ");
+    s = natsSubscription_DrainCompletionStatus(sub);
+    testCond(s == NATS_ILLEGAL_STATE);
+
+    test("Call Drain on subscription: ");
+    s = natsSubscription_Drain(sub);
+    testCond(s == NATS_OK);
+
+    test("Send 1 more message: ");
+    s = natsConnection_PublishString(nc, "foo", "msg");
+    testCond(s == NATS_OK);
+
+    // Unblock the callback.
+    natsMutex_Lock(arg.m);
+    arg.closed = true;
+    natsCondition_Signal(arg.c);
+    natsMutex_Unlock(arg.m);
+
+    test("Wait for Drain to complete: ");
+    s = natsSubscription_WaitForDrainCompletion(sub, -1);
+    testCond(s == NATS_OK);
+
+    test("Check drain status: ");
+    s = natsSubscription_DrainCompletionStatus(sub);
+    testCond(s == NATS_OK);
+
+    // Wait a bit and make sure that we did not receive the 3rd msg
+    test("Third message not received: ");
+    nats_Sleep(100);
+    natsMutex_Lock(arg.m);
+    s = (arg.sum == 2 ? NATS_OK : NATS_ERR);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    // Close connection
+    natsConnection_Close(nc);
+
+    test("Drain on closed conn fails: ");
+    s = natsSubscription_Drain(sub);
+    if (s == NATS_CONNECTION_CLOSED)
+        s = natsSubscription_Drain(sub2);
+    if (s == NATS_CONNECTION_CLOSED)
+        s = natsSubscription_Drain(sub3);
+    testCond(s == NATS_CONNECTION_CLOSED);
+
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+    natsSubscription_Destroy(sub2);
+    sub2 = NULL;
+    natsSubscription_Destroy(sub3);
+    sub3 = NULL;
+    natsConnection_Destroy(nc);
+    nc = NULL;
+
+    natsMutex_Lock(arg.m);
+    arg.sum    = 0;
+    arg.closed = false;
+    natsMutex_Unlock(arg.m);
+
+    test("Connect and create sub: ");
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_SetDisconnectedCB(opts, _disconnectedCb, (void*) &arg));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    IFOK(s, natsConnection_Subscribe(&sub, nc, "foo", _recvTestString, (void*) &arg));
+    testCond(s == NATS_OK);
+
+    test("Send 2 messages: ");
+    s = natsConnection_PublishString(nc, "foo", "msg");
+    IFOK(s, natsConnection_PublishString(nc, "foo", "msg"));
+    IFOK(s, natsConnection_Flush(nc));
+    testCond(s == NATS_OK);
+
+    test("Disconnect: ");
+    _stopServer(pid);
+    testCond(s == NATS_OK);
+
+    test("Wait for disconnect: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.disconnected)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    test("Call Drain on subscriptions: ");
+    s = natsSubscription_DrainTimeout(sub, 500);
+    testCond(s == NATS_OK);
+
+    // Unblock the callback.
+    natsMutex_Lock(arg.m);
+    arg.closed = true;
+    natsCondition_Signal(arg.c);
+    natsMutex_Unlock(arg.m);
+
+    test("Wait for Drain to complete: ");
+    s = natsSubscription_WaitForDrainCompletion(sub, -1);
+    testCond(s == NATS_OK);
+
+    test("Check drain status: ");
+    s = natsSubscription_DrainCompletionStatus(sub);
+    // Since the flush has timed-out, this is what the status will be.
+    testCond(s == NATS_TIMEOUT);
+    s = NATS_OK;
+
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+    natsConnection_Destroy(nc);
+    nc = NULL;
+    natsOptions_Destroy(opts);
+    opts = NULL;
+
+    pid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    natsMutex_Lock(arg.m);
+    arg.sum    = 0;
+    arg.closed = false;
+    natsMutex_Unlock(arg.m);
+
+    test("Create options for global msg delivery: ");
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_UseGlobalMessageDelivery(opts, true));
+    testCond(s == NATS_OK);
+
+    test("Connect and create sub: ");
+    s = natsConnection_Connect(&nc, opts);
+    IFOK(s, natsConnection_Subscribe(&sub, nc, "foo", _recvTestString, (void*)&arg));
+    IFOK(s, natsConnection_Subscribe(&sub2, nc, "foo", _recvTestString, (void*)&arg));
+    IFOK(s, natsSubscription_AutoUnsubscribe(sub, 2));
+    testCond(s == NATS_OK);
+
+    test("Send 2 messages: ");
+    s = natsConnection_PublishString(nc, "foo", "msg");
+    IFOK(s, natsConnection_PublishString(nc, "foo", "msg"));
+    IFOK(s, natsConnection_Flush(nc));
+    testCond(s == NATS_OK);
+
+    test("Call Drain on subscriptions: ");
+    s = natsSubscription_Drain(sub);
+    IFOK(s, natsSubscription_Drain(sub2));
+    testCond(s == NATS_OK);
+
+    // Unblock the callback.
+    nats_Sleep(250);
+    natsMutex_Lock(arg.m);
+    arg.closed = true;
+    natsCondition_Signal(arg.c);
+    natsMutex_Unlock(arg.m);
+
+    test("Wait for Drain to complete: ");
+    s = natsSubscription_WaitForDrainCompletion(sub, -1);
+    testCond(s == NATS_OK);
+
+    test("Check drain status: ");
+    s = natsSubscription_DrainCompletionStatus(sub);
+    testCond(s == NATS_OK);
+
+    natsSubscription_Destroy(sub);
+    natsSubscription_Destroy(sub2);
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(pid);
+}
+
+static void
+_msgCBForDrainSubTest(natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure)
+{
+    struct threadArg    *arg = (struct threadArg*) closure;
+
+    natsMsg_Destroy(msg);
+    natsMutex_Lock(arg->m);
+    if (++arg->sum == 1)
+    {
+        // Signal that we got the message
+        natsCondition_Signal(arg->c);
+
+        // Wait for main thread to switch to drain mode
+        while (!arg->done)
+            natsCondition_Wait(arg->c, arg->m);
+
+        // Report unsubscribe status
+        arg->status = natsSubscription_Unsubscribe(sub);
+    }
+    natsMutex_Unlock(arg->m);
+}
+
+static void
+_drainSubCompleteCB(void *closure)
+{
+    struct threadArg *arg = (struct threadArg*) closure;
+
+    natsMutex_Lock(arg->m);
+    if (arg->sum == 1)
+    {
+        arg->closed = true;
+        natsCondition_Signal(arg->c);
+    }
+    natsMutex_Unlock(arg->m);
+}
+
+static void
+test_DrainSubStops(void)
+{
+    natsStatus          s;
+    natsConnection      *nc = NULL;
+    natsSubscription    *sub= NULL;
+    natsPid             pid = NATS_INVALID_PID;
+    struct threadArg    arg;
+    int                 i;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    pid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    test("Connect and create subscriptions: ");
+    s = natsConnection_ConnectTo(&nc, "nats://127.0.0.1:4222");
+    IFOK(s, natsConnection_Subscribe(&sub, nc, "foo", _msgCBForDrainSubTest, (void*) &arg));
+    IFOK(s, natsSubscription_SetOnCompleteCB(sub, _drainSubCompleteCB, (void*) &arg))
+    testCond(s == NATS_OK);
+
+    test("Send 10 messages: ");
+    for (i=0; (s == NATS_OK) && (i<10); i++)
+        s = natsConnection_PublishString(nc, "foo", "msg");
+    IFOK(s, natsConnection_Flush(nc));
+    testCond(s == NATS_OK);
+
+    test("Wait for 1st message to be received: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && (arg.sum != 1))
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    test("Drain subscription: ");
+    s = natsSubscription_Drain(sub);
+    natsMutex_Lock(arg.m);
+    arg.done = true;
+    natsCondition_Signal(arg.c);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    test("Wait for drain completion: ");
+    s = natsSubscription_WaitForDrainCompletion(sub, 0);
+    testCond(s == NATS_OK);
+
+    test("Check drain status: ");
+    s = natsSubscription_DrainCompletionStatus(sub);
+    testCond(s == NATS_INVALID_SUBSCRIPTION);
+
+    test("Check that drain stopped on unsubscribe: ");
+    natsMutex_Lock(arg.m);
+    s = NATS_OK;
+    while ((s != NATS_TIMEOUT) && !arg.closed)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    // Get the status from unsubscribe in the callback
+    IFOK(s, arg.status);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    natsMutex_Lock(arg.m);
+    arg.done    = false;
+    arg.closed  = false;
+    arg.sum     = 0;
+    natsMutex_Unlock(arg.m);
+
+    test("Create subscription: ");
+    s = natsConnection_Subscribe(&sub, nc, "foo", _msgCBForDrainSubTest, (void*) &arg);
+    IFOK(s, natsSubscription_SetOnCompleteCB(sub, _drainSubCompleteCB, (void*) &arg))
+    testCond(s == NATS_OK);
+
+    test("Send 10 messages: ");
+    for (i=0; (s == NATS_OK) && (i<10); i++)
+        s = natsConnection_PublishString(nc, "foo", "msg");
+    IFOK(s, natsConnection_Flush(nc));
+    testCond(s == NATS_OK);
+
+    test("Wait for 1st message to be received: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && (arg.sum != 1))
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    test("Drain connection: ");
+    s = natsConnection_Drain(nc);
+    natsMutex_Lock(arg.m);
+    arg.done = true;
+    natsCondition_Signal(arg.c);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    test("Wait for Drain to complete: ");
+    s = natsSubscription_WaitForDrainCompletion(sub, 0);
+    testCond(s == NATS_OK);
+
+    test("Check that drain stopped on unsubscribe: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.closed)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    // Get the status from unsubscribe in the callback
+    IFOK(s, arg.status);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(pid);
+}
+
+static void
+test_DrainSubRaceOnAutoUnsub(void)
+{
+    natsStatus          s;
+    natsConnection      *nc = NULL;
+    natsSubscription    *sub= NULL;
+    natsPid             pid = NATS_INVALID_PID;
+    int                 i;
+
+    pid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    test("Connect: ");
+    s = natsConnection_ConnectTo(&nc, "nats://127.0.0.1:4222");
+    testCond(s == NATS_OK);
+
+    testDrainAutoUnsubRace = true;
+
+    test("Drain with auto-unsub race: ");
+    for (i=0; (s == NATS_OK) && (i<500); i++)
+    {
+        s = natsConnection_Subscribe(&sub, nc, "foo", _dummyMsgHandler, NULL);
+        IFOK(s, natsSubscription_AutoUnsubscribe(sub, 1));
+        IFOK(s, natsConnection_PublishString(nc, "foo", "msg"));
+        nats_Sleep(1);
+        if (s == NATS_OK)
+        {
+            s = natsSubscription_Drain(sub);
+            // Here, it is possible that the subscription is already
+            // invalid. In which case, don't attempt to wait for completion.
+            if (s == NATS_INVALID_SUBSCRIPTION)
+            {
+                s = NATS_OK;
+                nats_clearLastError();
+            }
+            else
+            {
+                IFOK(s, natsSubscription_WaitForDrainCompletion(sub, -1));
+                IFOK(s, natsSubscription_DrainCompletionStatus(sub));
+            }
+        }
+        natsSubscription_Destroy(sub);
+        sub = NULL;
+    }
+    testCond(s == NATS_OK);
+
+    testDrainAutoUnsubRace = false;
+
+    natsConnection_Destroy(nc);
+    _stopServer(pid);
+}
+
+static void
+test_DrainSubNotResentOnReconnect(void)
+{
+    natsStatus          s;
+    natsConnection      *nc   = NULL;
+    natsSubscription    *sub  = NULL;
+    natsOptions         *opts = NULL;
+    natsPid             pid   = NATS_INVALID_PID;
+    natsStatistics      stats;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    IFOK(s, natsOptions_Create(&opts));
+    IFOK(s, natsOptions_SetReconnectedCB(opts, _reconnectedCb, (void*) &arg));
+    IFOK(s, natsOptions_SetMaxReconnect(opts, -1));
+    IFOK(s, natsOptions_SetReconnectWait(opts, 10));
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    pid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    natsMutex_Lock(arg.m);
+    arg.control = 8;
+    natsMutex_Unlock(arg.m);
+
+    test("Connect and create subscription: ");
+    s = natsConnection_Connect(&nc, opts);
+    IFOK(s, natsConnection_Subscribe(&sub, nc, "foo", _recvTestString, (void*) &arg));
+    testCond(s == NATS_OK);
+
+    test("Send 1 message: ");
+    s = natsConnection_PublishString(nc, "foo", "msg");
+    IFOK(s, natsConnection_Flush(nc));
+    testCond(s == NATS_OK);
+
+    test("Wait for message to be received: ");
+    nats_Sleep(150);
+    testCond(s == NATS_OK);
+
+    test("Drain subscription: ");
+    s = natsSubscription_Drain(sub);
+    testCond(s == NATS_OK);
+
+    test("Disconnect: ");
+    nats_Sleep(250);
+    _stopServer(pid);
+    testCond(s == NATS_OK);
+
+    test("Restart server: ");
+    pid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+    testCond(s == NATS_OK);
+
+    test("Wait for reconnect: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.reconnected)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    test("Release cb: ");
+    natsMutex_Lock(arg.m);
+    arg.closed = true;
+    natsCondition_Signal(arg.c);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    test("Wait for drain completion: ");
+    s = natsSubscription_WaitForDrainCompletion(sub, 0);
+    testCond(s == NATS_OK);
+
+    test("Check drain status: ");
+    s = natsSubscription_DrainCompletionStatus(sub);
+    testCond(s == NATS_OK);
+
+    test("Send new message: ");
+    s = natsConnection_PublishString(nc, "foo", "msg");
+    IFOK(s, natsConnection_Flush(nc));
+    testCond(s == NATS_OK);
+
+    test("Msg not received by connection: ");
+    s = natsConnection_GetStats(nc, &stats);
+    IFOK(s, (stats.inMsgs == 1 ? NATS_OK : NATS_ERR));
+    testCond(s == NATS_OK);
+
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+    _destroyDefaultThreadArgs(&arg);
+    _stopServer(pid);
+}
+
+static void
+_drainConnBarSub(natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure)
+{
+    struct threadArg *args = (struct threadArg*) closure;
+
+    natsMutex_Lock(args->m);
+    args->results[1]++;
+    if (args->results[1] == args->results[0])
+    {
+        args->done = true;
+        natsCondition_Broadcast(args->c);
+    }
+    natsMutex_Unlock(args->m);
+    natsMsg_Destroy(msg);
+}
+
+static void
+_drainConnFooSub(natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure)
+{
+    struct threadArg *args = (struct threadArg*) closure;
+
+    nats_Sleep(10);
+    natsMutex_Lock(args->m);
+    args->sum++;
+    if (args->status == NATS_OK)
+        args->status = natsConnection_PublishString(nc, natsMsg_GetReply(msg), "Stop bugging me");
+    natsMutex_Unlock(args->m);
+    natsMsg_Destroy(msg);
+}
+
+static void
+_drainConnErrHandler(natsConnection *nc, natsSubscription *sub, natsStatus err, void *closure)
+{
+    struct threadArg *args = (struct threadArg*) closure;
+    const char       *lastError = NULL;
+    natsStatus       s = NATS_OK;
+
+    natsMutex_Lock(args->m);
+    // Since error handler is async, there is no guarantee that
+    // natsConnection_GetLastError() returns the error we expect.
+    // Only check if the error matches `err`.
+    if (err == NATS_TIMEOUT)
+    {
+        s = natsConnection_GetLastError(nc, &lastError);
+        if ((s != NATS_TIMEOUT)
+                || (strstr(lastError, args->string) != NULL))
+        {
+            args->done = true;
+            natsCondition_Broadcast(args->c);
+        }
+    }
+    natsMutex_Unlock(args->m);
+}
+
+static void
+test_DrainConn(void)
+{
+    natsStatus          s;
+    natsConnection      *nc     = NULL;
+    natsOptions         *opts   = NULL;
+    natsSubscription    *sub    = NULL;
+    natsConnection      *nc2    = NULL;
+    natsSubscription    *sub2   = NULL;
+    natsSubscription    *sub3   = NULL;
+    natsPid             pid     = NATS_INVALID_PID;
+    int                 expected= 50;
+    int64_t             start   = 0;
+    int                 i;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    IFOK(s, natsOptions_Create(&opts));
+    IFOK(s, natsOptions_SetClosedCB(opts, _closedCb, (void*)&arg));
+    IFOK(s, natsOptions_SetErrorHandler(opts, _drainConnErrHandler, (void*) &arg));
+    if (s != NATS_OK)
+    {
+        _destroyDefaultThreadArgs(&arg);
+        natsOptions_Destroy(opts);
+        FAIL("Unable to setup test");
+    }
+
+    arg.results[0] = expected;
+    arg.string = "Drain error";
+
+    pid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    test("Drain with invalid NULL: ");
+    s = natsConnection_Drain(NULL);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Connect: ");
+    s = natsConnection_Connect(&nc, opts);
+    testCond(s == NATS_OK);
+
+    test("Drain with no sub/pub ok: ");
+    s = natsConnection_Drain(nc);
+    testCond(s == NATS_OK);
+
+    test("Closed CB invoked: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.closed)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    arg.closed = false;
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    test("No async error reported: ");
+    natsMutex_Lock(arg.m);
+    s = (arg.done == false ? NATS_OK : NATS_ERR);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    natsConnection_Destroy(nc);
+    nc = NULL;
+
+    test("Connect: ");
+    s = natsConnection_Connect(&nc, opts);
+    IFOK(s, natsConnection_ConnectTo(&nc2, "nats://127.0.0.1:4222"));
+    testCond(s == NATS_OK);
+
+    test("Create listener for responses on bar: ");
+    s = natsConnection_Subscribe(&sub2, nc2, "bar", _drainConnBarSub, (void*) &arg);
+    testCond(s == NATS_OK);
+
+    test("Create slow consumer for responder: ");
+    s = natsConnection_Subscribe(&sub, nc, "foo", _drainConnFooSub, (void*) &arg);
+    testCond(s == NATS_OK);
+
+    test("Send messages: ");
+    for (i=0; (s == NATS_OK) && (i<expected); i++)
+        s = natsConnection_PublishRequestString(nc, "foo", "bar", "Slow Slow");
+    IFOK(s, natsConnection_Flush(nc));
+    testCond(s == NATS_OK);
+
+    test("Drain connection: ");
+    start = nats_Now();
+    // 0 or Negative means "wait for ever".
+    s = natsConnection_DrainTimeout(nc, -1);
+    testCond(s == NATS_OK);
+
+    test("Check IsDraining: ");
+    s = (natsConnection_IsDraining(nc) ? NATS_OK : NATS_ERR);
+    testCond(s == NATS_OK);
+
+    test("Second drain ok: ");
+    s = natsConnection_Drain(nc);
+    testCond(s == NATS_OK);
+
+    test("Cannot create new subs: ");
+    s = natsConnection_Subscribe(&sub3, nc, "foo", _dummyMsgHandler, NULL);
+    testCond(s == NATS_DRAINING);
+    nats_clearLastError();
+
+    test("Publish should be ok: ");
+    s = natsConnection_PublishString(nc, "baz", "should work");
+    testCond(s == NATS_OK);
+
+    test("Closed CB should be invoked: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.closed)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    test("Drain took as expected: ");
+    s = ((nats_Now() - start) >= 10*expected ? NATS_OK : NATS_ERR);
+    testCond(s == NATS_OK);
+
+    test("Received all messages: ");
+    natsMutex_Lock(arg.m);
+    s = ((arg.sum == expected) ? NATS_OK : NATS_ERR);
+    if (s == NATS_OK)
+        s = arg.status;
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    test("All responses received: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.done)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    if ((s == NATS_OK) && (arg.results[1] != expected))
+        s = NATS_ERR;
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    test("Check sub drain status: ");
+    s = natsSubscription_DrainCompletionStatus(sub);
+    testCond(s == NATS_OK);
+
+    test("Check IsDraining: ");
+    s = (natsConnection_IsDraining(nc) ? NATS_ERR : NATS_OK);
+    testCond(s == NATS_OK);
+
+    test("Drain after closed should fail: ");
+    s = natsConnection_DrainTimeout(nc, 1);
+    testCond(s == NATS_CONNECTION_CLOSED);
+    nats_clearLastError();
+
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+    natsConnection_Destroy(nc);
+    nc = NULL;
+
+    natsMutex_Lock(arg.m);
+    arg.done   = false;
+    arg.sum    = 0;
+    arg.string = "timeout";
+    natsMutex_Unlock(arg.m);
+
+    test("Connect and subscribe: ");
+    s = natsConnection_Connect(&nc, opts);
+    IFOK(s, natsConnection_Subscribe(&sub, nc, "foo", _drainConnFooSub, (void*) &arg));
+    testCond(s == NATS_OK);
+
+    test("Publish: ");
+    for (i=0;(s==NATS_OK) && i<25;i++)
+        s = natsConnection_PublishString(nc, "foo", "hello");
+    IFOK(s, natsConnection_Flush(nc));
+    testCond(s == NATS_OK);
+
+    test("Drain timeout: ");
+    s = natsConnection_DrainTimeout(nc, 10);
+    if (s == NATS_OK)
+    {
+        natsMutex_Lock(arg.m);
+        while ((s != NATS_TIMEOUT) && !arg.done)
+            s = natsCondition_TimedWait(arg.c, arg.m, 1000);
+        natsMutex_Unlock(arg.m);
+    }
+    testCond(s == NATS_OK);
+
+    test("Wait for subscription to drain: ");
+    s = natsSubscription_WaitForDrainCompletion(sub, -1);
+    testCond(s == NATS_OK);
+
+    test("Check sub drain status: ");
+    s = natsSubscription_DrainCompletionStatus(sub);
+    // Since the connection drain timed-out, we should report as a timeout,
+    // not as the connection closed.
+    testCond(s == NATS_TIMEOUT);
+
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+    natsSubscription_Destroy(sub2);
+    natsSubscription_Destroy(sub3);
+    natsConnection_Destroy(nc);
+    nc = NULL;
+    natsConnection_Destroy(nc2);
+    nc2 = NULL;
+    natsOptions_Destroy(opts);
+
+    natsMutex_Lock(arg.m);
+    arg.closed = false;
+    arg.sum    = 0;
+    arg.control= 8;
+    natsMutex_Unlock(arg.m);
+
+    test("Connect and create sub: ");
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_Subscribe(&sub, nc, "foo", _recvTestString, (void*) &arg));
+    IFOK(s, natsConnection_ConnectTo(&nc2, NATS_DEFAULT_URL));
+    testCond(s == NATS_OK);
+
+    test("Send messages: ");
+    s = natsConnection_PublishString(nc, "foo", "msg1");
+    IFOK(s, natsConnection_PublishString(nc, "foo", "msg2"));
+    IFOK(s, natsConnection_Flush(nc));
+    testCond(s == NATS_OK);
+
+    test("Drain: ");
+    s = natsConnection_DrainTimeout(nc, 10000);
+    testCond(s == NATS_OK);
+
+    test("Drain sub directly should fail: ");
+    s = natsSubscription_Drain(sub);
+    testCond(s == NATS_DRAINING);
+    nats_clearLastError();
+    s = NATS_OK;
+
+    test("Disconnect: ");
+    _stopServer(pid);
+    testCond(s == NATS_OK);
+
+    nats_Sleep(100);
+
+    test("Drain while disconnected fails: ");
+    s = natsConnection_Drain(nc2);
+    testCond(s == NATS_ILLEGAL_STATE);
+    nats_clearLastError();
+    s = NATS_OK;
+
+    test("Release cb: ");
+    natsMutex_Lock(arg.m);
+    arg.closed = true;
+    natsCondition_Signal(arg.c);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    test("Wait for completion: ");
+    s = natsSubscription_WaitForDrainCompletion(sub, 1000);
+    testCond(s == NATS_OK);
+
+    test("Check drain status: ");
+    s = natsSubscription_DrainCompletionStatus(sub);
+    testCond(s == NATS_CONNECTION_CLOSED);
+
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+    natsConnection_Destroy(nc2);
+
+    // Since the drain timed-out and closed the connection,
+    // the subscription will be closed but there is no guarantee
+    // that the callback is not in the middle of execution at that
+    // time. So to avoid valgrind reports, sleep a bit before
+    // destroying sub's closure.
+    nats_Sleep(100);
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+_noDoubleCloseCb(natsConnection *nc, void *closure)
+{
+    struct threadArg    *arg = (struct threadArg*) closure;
+
+    natsMutex_Lock(arg->m);
+    arg->sum++;
+    arg->closed = true;
+    natsCondition_Signal(arg->c);
+    natsMutex_Unlock(arg->m);
+}
+
+static void
+_noDoubleCbSubCb(natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure)
+{
+    nats_Sleep(200);
+    natsMsg_Destroy(msg);
+}
+
+static void
+test_NoDoubleConnClosedOnDrain(void)
+{
+    natsStatus          s;
+    natsConnection      *nc     = NULL;
+    natsOptions         *opts   = NULL;
+    natsSubscription    *sub    = NULL;
+    natsPid             pid     = NATS_INVALID_PID;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    IFOK(s, natsOptions_Create(&opts));
+    IFOK(s, natsOptions_SetClosedCB(opts, _noDoubleCloseCb, (void*)&arg));
+    if (s != NATS_OK)
+    {
+        _destroyDefaultThreadArgs(&arg);
+        natsOptions_Destroy(opts);
+        FAIL("Unable to setup test");
+    }
+
+    pid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    test("Connect: ");
+    s = natsConnection_Connect(&nc, opts);
+    testCond(s == NATS_OK);
+
+    test("Create sub: ");
+    s = natsConnection_Subscribe(&sub, nc, "foo", _noDoubleCbSubCb, (void*)&arg);
+    testCond(s == NATS_OK);
+
+    test("Publish msg: ");
+    s = natsConnection_PublishString(nc, "foo", "hello");
+    IFOK(s, natsConnection_Flush(nc));
+    testCond(s == NATS_OK);
+
+    test("Drain: ");
+    s = natsConnection_Drain(nc);
+    testCond(s == NATS_OK);
+
+    nats_Sleep(200);
+    test("Closing: ");
+    natsConnection_Close(nc);
+    testCond(s == NATS_OK);
+
+    test("Wait for close CB: ");
+    s = _waitForConnClosed(&arg);
+    testCond(s == NATS_OK);
+
+    // Now wait for connection close and make sure it was invoked once.
+    test("Check closeCb invoked once: ")
+    nats_Sleep(300);
+    natsMutex_Lock(arg.m);
+    s = (arg.sum == 1 ? NATS_OK : NATS_ERR);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+    _destroyDefaultThreadArgs(&arg);
+    _stopServer(pid);
+}
+
+static void
+test_GetClientID(void)
+{
+    natsStatus          s;
+    natsPid             pid1    = NATS_INVALID_PID;
+    natsPid             pid2    = NATS_INVALID_PID;
+    natsConnection      *nc1    = NULL;
+    natsConnection      *nc2    = NULL;
+    natsOptions         *opts   = NULL;
+    uint64_t            cid     = 0;
+    uint64_t            newcid  = 0;
+    natsThread          *t      = NULL;
+    struct threadArg    arg;
+
+    if (!serverVersionAtLeast(1,2,0))
+    {
+        char txt[200];
+
+        snprintf(txt, sizeof(txt), "Skipping since requires server version of at least 1.2.0, got %s: ", serverVersion);
+        test(txt);
+        testCond(true);
+        return;
+    }
+    pid1 = _startServer("nats://127.0.0.1:4222", "-cluster nats://127.0.0.1:6222 -cluster_name abc", true);
+    CHECK_SERVER_STARTED(pid1);
+
+    test("Create nc1: ");
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    IFOK(s, natsOptions_Create(&opts));
+    IFOK(s, natsOptions_SetURL(opts, "nats://127.0.0.1:4222"));
+    IFOK(s, natsOptions_SetReconnectWait(opts, 50));
+    IFOK(s, natsOptions_SetTimeout(opts, 250));
+    IFOK(s, natsOptions_SetDiscoveredServersCB(opts, _discoveredServersCb, (void*)&arg));
+    IFOK(s, natsOptions_SetReconnectedCB(opts, _reconnectedCb, (void*)&arg));
+    IFOK(s, natsConnection_Connect(&nc1, opts));
+    testCond(s == NATS_OK);
+
+    test("GetClientID for nc1: ");
+    s = natsConnection_GetClientID(nc1, &cid);
+    testCond((s == NATS_OK) && (cid != 0));
+
+    test("Wait for discovered callback: ");
+    pid2 = _startServer("nats://127.0.0.1:4223", "-p 4223 -cluster nats://127.0.0.1:6223 -cluster_name abc -routes nats://127.0.0.1:6222", true);
+    CHECK_SERVER_STARTED(pid2);
+
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && (arg.sum != 1))
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    s = (arg.sum == 1 ? NATS_OK: NATS_ERR);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    test("Check CID same: ");
+    s = natsConnection_GetClientID(nc1, &newcid);
+    testCond((s == NATS_OK) && (newcid == cid));
+
+    test("Connect to server 2: ");
+    s = natsConnection_ConnectTo(&nc2, "nats://127.0.0.1:4223");
+    testCond(s == NATS_OK);
+
+    test("Stop server 1: ");
+    _stopServer(pid1);
+    testCond(s == NATS_OK);
+
+    test("Wait for nc1 to reconnect: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.reconnected)
+        s = natsCondition_TimedWait(arg.c, arg.m, 4000);
+    s = (arg.reconnected ? NATS_OK : NATS_ERR);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    test("Check CID is different: ");
+    s = natsConnection_GetClientID(nc1, &newcid);
+    testCond((s == NATS_OK) && (newcid != cid));
+
+    // Stop clients and remaining server
+    natsConnection_Destroy(nc1);
+    natsConnection_Destroy(nc2);
+    natsOptions_Destroy(opts);
+    _stopServer(pid2);
+
+    // Now have dummy server that returns no CID and check we get expected error.
+    nc1 = NULL;
+    arg.status = NATS_ERR;
+    arg.string = "INFO {\"server_id\":\"22\",\"version\":\"latest\",\"go\":\"latest\",\"port\":4222,\"max_payload\":1048576}\r\n";
+    s = natsThread_Create(&t, _startMockupServerThread, (void*) &arg);
+    if (s == NATS_OK)
+    {
+        // Wait for server to be ready
+        natsMutex_Lock(arg.m);
+        while ((s != NATS_TIMEOUT) && (arg.status != NATS_OK))
+            s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+        s = arg.status;
+        natsMutex_Unlock(arg.m);
+    }
+    if (s != NATS_OK)
+    {
+        if (t != NULL)
+        {
+            natsThread_Join(t);
+            natsThread_Destroy(t);
+        }
+        natsOptions_Destroy(opts);
+        _destroyDefaultThreadArgs(&arg);
+        FAIL("Unable to setup test");
+    }
+
+    test("CID not supported: ");
+    s = natsConnection_ConnectTo(&nc1, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_GetClientID(nc1, &cid));
+    testCond((s == NATS_NO_SERVER_SUPPORT) && (cid == 0));
+
+    // Notify mock server we are done
+    natsMutex_Lock(arg.m);
+    arg.done = true;
+    natsCondition_Signal(arg.c);
+    natsMutex_Unlock(arg.m);
+
+    natsConnection_Destroy(nc1);
+
+    natsThread_Join(t);
+    natsThread_Destroy(t);
+
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+test_GetClientIP(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    char                *ip       = NULL;
+    natsThread          *t    = NULL;
+    struct threadArg    arg;
+
+    test("Check server version: ");
+    if (!serverVersionAtLeast(2,1,6))
+    {
+        char txt[200];
+
+        snprintf(txt, sizeof(txt), "Skipping since requires server version of at least 2.1.6, got %s: ", serverVersion);
+        test(txt);
+        testCond(true);
+        return;
+    }
+    testCond(true);
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Connect: ");
+    s = natsConnection_ConnectTo(&nc, "nats://127.0.0.1:4222");
+    testCond(s == NATS_OK);
+
+    test("Get client IP - no conn: ");
+    s = natsConnection_GetClientIP(NULL, &ip);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Get client IP - no ip loc: ");
+    s = natsConnection_GetClientIP(nc, NULL);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Get client IP: ");
+    s = natsConnection_GetClientIP(nc, &ip);
+    testCond((s == NATS_OK) && (strcmp(ip, "127.0.0.1")==0));
+    free(ip);
+    ip = NULL;
+
+    natsConnection_Close(nc);
+    test("Get client IP after conn closed: ");
+    s = natsConnection_GetClientIP(nc, &ip);
+    testCond((s == NATS_CONNECTION_CLOSED) && (ip == NULL));
+    nats_clearLastError();
+
+    natsConnection_Destroy(nc);
+    nc = NULL;
+
+    _stopServer(serverPid);
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s == NATS_OK)
+    {
+        // Set this to error, the mock server should set it to OK
+        // if it can start successfully.
+        arg.status = NATS_ERR;
+        arg.string = "INFO {\"server_id\":\"22\",\"version\":\"latest\",\"go\":\"latest\",\"port\":4222,\"max_payload\":1048576}\r\n";
+        s = natsThread_Create(&t, _startMockupServerThread, (void*) &arg);
+    }
+    if (s == NATS_OK)
+    {
+        // Wait for server to be ready
+        natsMutex_Lock(arg.m);
+        while ((s != NATS_TIMEOUT) && (arg.status != NATS_OK))
+            s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+        natsMutex_Unlock(arg.m);
+    }
+    if (s != NATS_OK)
+    {
+        if (t != NULL)
+        {
+            natsThread_Join(t);
+            natsThread_Destroy(t);
+        }
+        _destroyDefaultThreadArgs(&arg);
+        FAIL("Unable to setup test");
+    }
+
+    test("Connect: ");
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    testCond(s == NATS_OK);
+
+    test("Get client IP with old server: ");
+    s = natsConnection_GetClientIP(nc, &ip);
+    testCond ((s == NATS_NO_SERVER_SUPPORT) && (ip == NULL));
+    nats_clearLastError();
+
+    // Notify mock server we are done
+    natsMutex_Lock(arg.m);
+    arg.done = true;
+    natsCondition_Signal(arg.c);
+    natsMutex_Unlock(arg.m);
+
+    natsConnection_Close(nc);
+    natsConnection_Destroy(nc);
+
+    natsThread_Join(t);
+    natsThread_Destroy(t);
+
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+test_GetRTT(void)
+{
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    int64_t             rtt       = 0;
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Connect: ");
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_SetReconnectWait(opts, 10));
+    IFOK(s, natsOptions_SetReconnectJitter(opts, 0, 0));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    testCond(s == NATS_OK);
+
+    test("Get RTT - no conn: ");
+    s = natsConnection_GetRTT(NULL, &rtt);
+    testCond(s == NATS_INVALID_ARG);
+
+    test("Get RTT - no rtt loc: ");
+    s = natsConnection_GetRTT(nc, NULL);
+    testCond(s == NATS_INVALID_ARG);
+
+    test("Get RTT: ");
+    s = natsConnection_GetRTT(nc, &rtt);
+    // Check that it is below 500ms...
+    testCond((s == NATS_OK) && (rtt/1000000 <= 500));
+
+    _stopServer(serverPid);
+
+    test("Get RTT while not connected: ");
+    s = natsConnection_GetRTT(nc, &rtt);
+    testCond(s == NATS_CONNECTION_DISCONNECTED);
+
+    natsConnection_Close(nc);
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+}
+
+static void
+test_GetLocalIPAndPort(void)
+{
+    natsStatus          s;
+    natsConnection      *nc     = NULL;
+    natsOptions         *opts   = NULL;
+    natsPid             pid     = NATS_INVALID_PID;
+    char                *ip     = NULL;
+    int                 port    = 0;
+    struct threadArg    arg;
+
+    pid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    test("Connect: ");
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    IFOK(s, natsOptions_Create(&opts));
+    IFOK(s, natsOptions_SetURL(opts, "nats://127.0.0.1:4222"));
+    IFOK(s, natsOptions_SetDisconnectedCB(opts, _disconnectedCb, &arg));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    testCond(s == NATS_OK);
+
+    test("Get Local IP and Port - no conn: ");
+    s = natsConnection_GetLocalIPAndPort(NULL, &ip, &port);
+    testCond(s == NATS_INVALID_ARG);
+
+    test("Get Local IP and Port - no ip loc: ");
+    s = natsConnection_GetLocalIPAndPort(nc, NULL, &port);
+    testCond(s == NATS_INVALID_ARG);
+
+    test("Get Local IP and Port - no port loc: ");
+    s = natsConnection_GetLocalIPAndPort(nc, &ip, NULL);
+    testCond(s == NATS_INVALID_ARG);
+
+    nats_clearLastError();
+    test("Get Local IP and Port: ");
+    s = natsConnection_GetLocalIPAndPort(nc, &ip, &port);
+    testCond((s == NATS_OK)
+                && ((ip != NULL) && (strcmp(ip, "127.0.0.1") == 0))
+                && (port != 0));
+    free(ip);
+
+    test("Wait for disconnect: ");
+    s = NATS_OK;
+    _stopServer(pid);
+    natsMutex_Lock(arg.m);
+    while ((s == NATS_OK) && !arg.disconnected)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    test("Get Local IP and Port while disconnected: ");
+    s = natsConnection_GetLocalIPAndPort(nc, &ip, &port);
+    testCond(s == NATS_CONNECTION_DISCONNECTED);
+    nats_clearLastError();
+
+    // Close connection
+    natsConnection_Close(nc);
+    test("Get Local IP and Port with closed connection: ");
+    s = natsConnection_GetLocalIPAndPort(nc, &ip, &port);
+    testCond(s == NATS_CONNECTION_CLOSED);
+
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static natsStatus
+_userJWTCB(char **userJWT, char **customErrTxt, void *closure)
+{
+    struct threadArg *arg = (struct threadArg*) closure;
+
+    if (closure != NULL)
+    {
+        bool done = true;
+
+        natsMutex_Lock(arg->m);
+        if (arg->string != NULL)
+            *customErrTxt = strdup(arg->string);
+        else if (arg->nc != NULL)
+            natsConnection_Destroy(arg->nc);
+        else
+            done = false;
+        natsMutex_Unlock(arg->m);
+
+        if (done)
+        {
+            if (*customErrTxt != NULL)
+                return NATS_ERR;
+            return NATS_OK;
+        }
+    }
+
+    *userJWT = strdup("some user jwt");
+
+    return NATS_OK;
+}
+
+static natsStatus
+_sigCB(char **customErrTxt, unsigned char **psig, int *sigLen, const char* nonce, void *closure)
+{
+    const unsigned char correctSign[] = {
+            155, 157,   8, 183,  93, 154,  78,   7,
+            219,  39,  11,  16, 134, 231,  46, 142,
+            168,  87, 110, 202, 187, 180, 179,  62,
+             49, 255, 225,  74,  48,  80, 176, 111,
+            248, 162, 121, 188, 203, 101, 100, 195,
+            162,  70, 213, 182, 220,  14,  71, 113,
+             93, 239, 141, 131,  66, 190, 237, 127,
+            104, 191, 138, 217, 227,   1,  92,  14,
+    };
+    unsigned char *sig = NULL;
+
+    if (closure != NULL)
+    {
+        struct threadArg *arg = (struct threadArg*) closure;
+        bool             done = true;
+
+        natsMutex_Lock(arg->m);
+        if (arg->string != NULL)
+            *customErrTxt = strdup(arg->string);
+        else if (arg->nc != NULL)
+            natsConnection_Destroy(arg->nc);
+        else
+            done = false;
+        natsMutex_Unlock(arg->m);
+
+        if (done)
+        {
+            if (*customErrTxt != NULL)
+                return NATS_ERR;
+
+            return NATS_OK;
+        }
+    }
+
+    sig = malloc(NATS_CRYPTO_SIGN_BYTES);
+    memcpy(sig, correctSign, NATS_CRYPTO_SIGN_BYTES);
+    *psig = sig;
+    if (sigLen != NULL)
+        *sigLen = NATS_CRYPTO_SIGN_BYTES;
+
+    return NATS_OK;
+}
+
+static natsStatus
+_checkJWTAndSigCB(char *buffer)
+{
+    // UserJWT callback should have returned this...
+    if (strstr(buffer, "some user jwt") == NULL)
+        return NATS_ERR;
+
+    // The server is sending the nonce "nonce" and we
+    // use a seed that should have produced a signature
+    // that converted to base64 should be:
+    if (strstr(buffer, "m50It12aTgfbJwsQhucujqhXbsq7tLM-Mf_hSjBQsG_4onm8y2Vkw6JG1bbcDkdxXe-Ng0K-7X9ov4rZ4wFcDg") == NULL)
+        return NATS_ERR;
+
+    return NATS_OK;
+}
+
+static void
+test_UserCredsCallbacks(void)
+{
+    natsStatus          s;
+    natsConnection      *nc     = NULL;
+    natsOptions         *opts   = NULL;
+    natsOptions         *opts2  = NULL;
+    natsPid             pid     = NATS_INVALID_PID;
+    natsThread          *t      = NULL;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    IFOK(s, natsOptions_Create(&opts));
+    if (s != NATS_OK)
+        FAIL("Unable to create options for test UserCredsCallbacks");
+
+    test("Invalid arg 1: ");
+    s = natsOptions_SetUserCredentialsCallbacks(NULL, _dummyUserJWTCb, NULL, _dummySigCb, NULL);
+    testCond(s == NATS_INVALID_ARG);
+
+    test("Invalid arg 2: ");
+    s = natsOptions_SetUserCredentialsCallbacks(opts, NULL, NULL, _dummySigCb, NULL);
+    testCond(s == NATS_INVALID_ARG);
+
+    test("Clone: ");
+    s = natsOptions_SetUserCredentialsCallbacks(opts, _dummyUserJWTCb, (void*) 1, _dummySigCb, (void*) 2);
+    if (s == NATS_OK)
+    {
+        opts2 = natsOptions_clone(opts);
+        if (opts2 == NULL)
+            s = NATS_NO_MEMORY;
+    }
+    IFOK(s, natsOptions_SetUserCredentialsCallbacks(opts, NULL, NULL, NULL, NULL));
+    testCond((s == NATS_OK)
+                && (opts2->userJWTHandler == _dummyUserJWTCb)
+                && (opts2->userJWTClosure == (void*) 1)
+                && (opts2->sigHandler == _dummySigCb)
+                && (opts2->sigClosure == (void*) 2));
+
+    natsOptions_Destroy(opts2);
+
+    // We first check that we get error when callbacks do return error.
+    // For that part, we don't need that the server sends the nonce.
+
+    pid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    // Create a connection. The user JWT callback is going to return
+    // an error, ensure connection fails.
+    test("UserJWTCB returns error: ");
+    natsMutex_Lock(arg.m);
+    arg.string = "some jwt error";
+    arg.nc = NULL;
+    natsMutex_Unlock(arg.m);
+    s = natsOptions_SetUserCredentialsCallbacks(opts, _userJWTCB, (void*) &arg, _sigCB, NULL);
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    testCond((s == NATS_ERR)
+                && (strstr(nats_GetLastError(NULL), "some jwt error") != NULL));
+
+    s = NATS_OK;
+    nats_clearLastError();
+    test("SignatureCB returns error: ");
+    natsMutex_Lock(arg.m);
+    arg.string = "some sig error";
+    arg.nc = NULL;
+    natsMutex_Unlock(arg.m);
+    s = natsOptions_SetUserCredentialsCallbacks(opts, _userJWTCB, NULL, _sigCB, (void*) &arg);
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    testCond((s == NATS_ERR)
+                && (strstr(nats_GetLastError(NULL), "some sig error") != NULL));
+
+    s = NATS_OK;
+    nats_clearLastError();
+    test("UserJWTCB destroys connection: ");
+    natsMutex_Lock(arg.m);
+    arg.string = NULL;
+    arg.nc = NULL;
+    arg.closed = false;
+    natsMutex_Unlock(arg.m);
+    s = natsOptions_SetUserCredentialsCallbacks(opts, _userJWTCB, (void*) &arg, _sigCB, NULL);
+    IFOK(s, natsOptions_SetReconnectWait(opts, 100));
+    IFOK(s, natsOptions_SetReconnectJitter(opts, 0, 0));
+    IFOK(s, natsOptions_SetClosedCB(opts, _closedCb, (void*) &arg));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    if (s == NATS_OK)
+    {
+        natsMutex_Lock(arg.m);
+        arg.nc = nc;
+        natsMutex_Unlock(arg.m);
+
+        _stopServer(pid);
+        pid = _startServer("nats://127.0.0.1:4222", NULL, true);
+        CHECK_SERVER_STARTED(pid);
+    }
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && (!arg.closed))
+        s = natsCondition_TimedWait(arg.c, arg.m, 5000);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    nc = NULL;
+
+    s = NATS_OK;
+    nats_clearLastError();
+    test("SigCB destroys connection: ");
+    natsMutex_Lock(arg.m);
+    arg.string = NULL;
+    arg.nc = NULL;
+    arg.closed = false;
+    natsMutex_Unlock(arg.m);
+    s = natsOptions_SetUserCredentialsCallbacks(opts, _userJWTCB, NULL, _sigCB, (void*) &arg);
+    IFOK(s, natsOptions_SetReconnectWait(opts, 100));
+    IFOK(s, natsOptions_SetReconnectJitter(opts, 0, 0));
+    IFOK(s, natsOptions_SetClosedCB(opts, _closedCb, (void*) &arg));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    if (s == NATS_OK)
+    {
+        natsMutex_Lock(arg.m);
+        arg.nc = nc;
+        natsMutex_Unlock(arg.m);
+
+        _stopServer(pid);
+        pid = _startServer("nats://127.0.0.1:4222", NULL, true);
+        CHECK_SERVER_STARTED(pid);
+    }
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && (!arg.closed))
+        s = natsCondition_TimedWait(arg.c, arg.m, 5000);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    nc = NULL;
+
+    _stopServer(pid);
+
+    // Start fake server that will send predefined "nonce" so we can check
+    // that connection is sending appropriate jwt and signature.
+
+    // Set this to error, the mock server should set it to OK
+    // if it can start successfully.
+    arg.status = NATS_ERR;
+    arg.checkInfoCB = _checkJWTAndSigCB;
+    arg.string = "INFO {\"server_id\":\"22\",\"version\":\"latest\",\"go\":\"latest\",\"port\":4222,\"max_payload\":1048576,\"nonce\":\"nonce\"}\r\n";
+    s = natsThread_Create(&t, _startMockupServerThread, (void*) &arg);
+    if (s == NATS_OK)
+    {
+        // Wait for server to be ready
+        natsMutex_Lock(arg.m);
+        while ((s != NATS_TIMEOUT) && (arg.status != NATS_OK))
+            s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+        natsMutex_Unlock(arg.m);
+    }
+    if (s != NATS_OK)
+    {
+        if (t != NULL)
+        {
+            natsThread_Join(t);
+            natsThread_Destroy(t);
+        }
+        natsOptions_Destroy(opts);
+        _destroyDefaultThreadArgs(&arg);
+        FAIL("Unable to setup test");
+    }
+
+    test("Connect sends proper JWT and Signature: ");
+    natsOptions_Destroy(opts);
+    opts = NULL;
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_SetUserCredentialsCallbacks(opts, _userJWTCB, NULL, _sigCB, NULL));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    testCond(s == NATS_OK);
+
+    // Notify mock server we are done
+    natsMutex_Lock(arg.m);
+    arg.done = true;
+    natsCondition_Signal(arg.c);
+    natsMutex_Unlock(arg.m);
+
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+    natsThread_Join(t);
+    natsThread_Destroy(t);
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+test_UserCredsFromFiles(void)
+{
+    natsStatus          s       = NATS_OK;
+    natsConnection      *nc     = NULL;
+    natsOptions         *opts   = NULL;
+    natsOptions         *opts2  = NULL;
+    natsPid             pid     = NATS_INVALID_PID;
+    natsThread          *t      = NULL;
+    int                 i;
+    struct threadArg    arg;
+    const char          *ucfn   = "user.creds";
+    const char          *sfn    = "seed.txt";
+    const char          *snhfn  = "seednh.txt";
+    const char          *nusfn  = "nouors.txt";
+    FILE                *f      = NULL;
+
+    f = fopen(ucfn, "w");
+    if (f == NULL)
+        s = NATS_ERR;
+    else
+    {
+        int res = fputs("-----BEGIN NATS USER JWT----\nsome user jwt\n-----END NATS USER JWT-----\n\n-----BEGIN USER NKEY SEED-----\nSUAMK2FG4MI6UE3ACF3FK3OIQBCEIEZV7NSWFFEW63UXMRLFM2XLAXK4GY\n-----END USER NKEY SEED-----\n", f);
+        if (res < 0)
+            s = NATS_ERR;
+
+        if (fclose(f) != 0)
+            s = NATS_ERR;
+        f = NULL;
+    }
+    if (s == NATS_OK)
+    {
+        f = fopen(sfn, "w");
+        if (f == NULL)
+            s = NATS_ERR;
+        else
+        {
+            int res = fputs("-----BEGIN USER NKEY SEED-----\nSUAMK2FG4MI6UE3ACF3FK3OIQBCEIEZV7NSWFFEW63UXMRLFM2XLAXK4GY\n-----END USER NKEY SEED-----\n", f);
+            if (res < 0)
+                s = NATS_ERR;
+
+            if (fclose(f) != 0)
+                s = NATS_ERR;
+            f = NULL;
+        }
+    }
+    if (s == NATS_OK)
+    {
+        f = fopen(snhfn, "w");
+        if (f == NULL)
+            s = NATS_ERR;
+        else
+        {
+            int res = fputs("This file does not have the proper header\nand also has spaces before the seed:\n  \tSUAMK2FG4MI6UE3ACF3FK3OIQBCEIEZV7NSWFFEW63UXMRLFM2XLAXK4GY\nthis should work\n", f);
+            if (res < 0)
+                s = NATS_ERR;
+
+            if (fclose(f) != 0)
+                s = NATS_ERR;
+            f = NULL;
+        }
+    }
+    if (s == NATS_OK)
+    {
+        f = fopen(nusfn, "w");
+        if (f == NULL)
+            s = NATS_ERR;
+        else
+        {
+            int res = fputs("This file does not have a jwt\nnor a valid seed\n", f);
+            if (res < 0)
+                s = NATS_ERR;
+
+            if (fclose(f) != 0)
+                s = NATS_ERR;
+            f = NULL;
+        }
+    }
+    if (s != NATS_OK)
+        FAIL("Unable to create creds test files");
+
+    s = natsOptions_Create(&opts);
+    if (s != NATS_OK)
+        FAIL("Unable to create options for test UserCredsFromFiles");
+
+    test("Invalid arg 1: ");
+    s = natsOptions_SetUserCredentialsFromFiles(NULL, "foo", "bar");
+    testCond(s == NATS_INVALID_ARG);
+
+    test("Invalid arg 2: ");
+    s = natsOptions_SetUserCredentialsFromFiles(opts, NULL, "bar");
+    testCond(s == NATS_INVALID_ARG);
+
+    test("Invalid arg 3: ");
+    s = natsOptions_SetUserCredentialsFromFiles(opts, "", "bar");
+    testCond(s == NATS_INVALID_ARG);
+
+    test("Clone: ");
+    s = natsOptions_SetUserCredentialsFromFiles(opts, "foo", "bar");
+    if (s == NATS_OK)
+    {
+        opts2 = natsOptions_clone(opts);
+        if (opts2 == NULL)
+            s = NATS_NO_MEMORY;
+    }
+    IFOK(s, natsOptions_SetUserCredentialsFromFiles(opts, NULL, NULL));
+    testCond((s == NATS_OK)
+                && (opts2->userCreds != NULL)
+                && (opts2->userJWTHandler == natsConn_userFromFile)
+                && (opts2->userJWTClosure == (void*) opts2->userCreds)
+                && (opts2->sigHandler == natsConn_signatureHandler)
+                && (opts2->sigClosure == (void*) opts2->userCreds));
+    natsOptions_Destroy(opts2);
+
+    pid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    test("UserOrChainedFile not found: ");
+    s = natsOptions_SetUserCredentialsFromFiles(opts, "userCredsNotFound", NULL);
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    testCond((s == NATS_ERR)
+                && (strstr(nats_GetLastError(NULL), "error opening file 'userCredsNotFound'") != NULL));
+
+    // Use a file that contains no userJWT..
+    test("UserOrChainedFile has no JWT: ");
+    s = natsOptions_SetUserCredentialsFromFiles(opts, "list.txt", NULL);
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    // Since we return the whole content of the file when we don't find
+    // the key for the user, but we don't for seed, the error we'll get
+    // is about no user seed found.
+    testCond((s == NATS_ERR)
+                && (strstr(nats_GetLastError(NULL), "no nkey user seed found") != NULL));
+
+    test("SeedFile not found: ");
+    s = natsOptions_SetUserCredentialsFromFiles(opts, ucfn, "seedFileNotFound");
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    testCond((s == NATS_ERR)
+                && (strstr(nats_GetLastError(NULL), "error opening file 'seedFileNotFound'") != NULL));
+
+    // Use a seed file that contains no seed..
+    test("SeedFile has no seed: ");
+    s = natsOptions_SetUserCredentialsFromFiles(opts, ucfn, "list.txt");
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    testCond((s == NATS_ERR)
+                && (strstr(nats_GetLastError(NULL), "no nkey user seed found") != NULL));
+
+    _stopServer(pid);
+
+    for (i=0; i<3; i++)
+    {
+        // Start fake server that will send predefined "nonce" so we can check
+        // that connection is sending appropriate jwt and signature.
+        s = _createDefaultThreadArgsForCbTests(&arg);
+        if (s == NATS_OK)
+        {
+            // Set this to error, the mock server should set it to OK
+            // if it can start successfully.
+            arg.done = false;
+            arg.status = NATS_ERR;
+            arg.checkInfoCB = _checkJWTAndSigCB;
+            arg.string = "INFO {\"server_id\":\"22\",\"version\":\"latest\",\"go\":\"latest\",\"port\":4222,\"max_payload\":1048576,\"nonce\":\"nonce\"}\r\n";
+            s = natsThread_Create(&t, _startMockupServerThread, (void*) &arg);
+        }
+        if (s == NATS_OK)
+        {
+            // Wait for server to be ready
+            natsMutex_Lock(arg.m);
+            while ((s != NATS_TIMEOUT) && (arg.status != NATS_OK))
+                s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+            natsMutex_Unlock(arg.m);
+        }
+        if (s != NATS_OK)
+        {
+            if (t != NULL)
+            {
+                natsThread_Join(t);
+                natsThread_Destroy(t);
+            }
+            natsOptions_Destroy(opts);
+            _destroyDefaultThreadArgs(&arg);
+            FAIL("Unable to setup test");
+        }
+
+        s = NATS_OK;
+        if (i == 0)
+        {
+            test("Connect with chained file: ");
+            s = natsOptions_SetUserCredentialsFromFiles(opts, ucfn, NULL);
+        }
+        else if (i == 1)
+        {
+            test("Connect with user and seed files: ");
+            s = natsOptions_SetUserCredentialsFromFiles(opts, ucfn, sfn);
+        }
+        else if (i == 2)
+        {
+            test("Connect with user and seed files (seed does not contain header): ");
+            s = natsOptions_SetUserCredentialsFromFiles(opts, ucfn, snhfn);
+        }
+        IFOK(s, natsConnection_Connect(&nc, opts));
+        testCond(s == NATS_OK);
+
+        // Notify mock server we are done
+        natsMutex_Lock(arg.m);
+        arg.done = true;
+        natsCondition_Signal(arg.c);
+        natsMutex_Unlock(arg.m);
+
+        natsConnection_Destroy(nc);
+        nc = NULL;
+
+        natsThread_Join(t);
+        natsThread_Destroy(t);
+        t = NULL;
+
+        _destroyDefaultThreadArgs(&arg);
+    }
+    natsOptions_Destroy(opts);
+
+    remove(ucfn);
+    remove(sfn);
+    remove(snhfn);
+    remove(nusfn);
+}
+
+static natsStatus
+_checkNKeyAndSig(char *buffer)
+{
+    // NKey should have been included
+    if (strstr(buffer, "pubKey") == NULL)
+        return NATS_ERR;
+
+    // The server is sending the nonce "nonce" and we
+    // use a seed that should have produced a signature
+    // that converted to base64 should be:
+    if (strstr(buffer, "m50It12aTgfbJwsQhucujqhXbsq7tLM-Mf_hSjBQsG_4onm8y2Vkw6JG1bbcDkdxXe-Ng0K-7X9ov4rZ4wFcDg") == NULL)
+        return NATS_ERR;
+
+    return NATS_OK;
+}
+
+static void
+test_NKey(void)
+{
+    natsStatus          s;
+    natsOptions         *opts  = NULL;
+    natsOptions         *opts2 = NULL;
+    natsConnection      *nc    = NULL;
+    natsThread          *t     = NULL;
+    struct threadArg    arg;
+
+    s = natsOptions_Create(&opts);
+    if (s != NATS_OK)
+        FAIL("Failed to setup test");
+
+    test("Invalid arg 1: ");
+    s = natsOptions_SetNKey(NULL, "pubkey", _dummySigCb, (void*) 1);
+    testCond(s == NATS_INVALID_ARG);
+
+    test("Invalid arg 2: ");
+    s = natsOptions_SetNKey(opts, "pubkey", NULL, NULL);
+    testCond(s == NATS_INVALID_ARG);
+
+    test("Clone: ");
+    s = natsOptions_SetNKey(opts, "pubkey", _dummySigCb, (void*) 1);
+    if (s == NATS_OK)
+    {
+        opts2 = natsOptions_clone(opts);
+        if (opts2 == NULL)
+            s = NATS_NO_MEMORY;
+    }
+    IFOK(s, natsOptions_SetNKey(opts, NULL, NULL, NULL));
+    testCond((s == NATS_OK)
+                && (opts2->nkey != NULL)
+                && (strcmp(opts2->nkey, "pubkey") == 0)
+                && (opts2->sigHandler == _dummySigCb)
+                && (opts2->sigClosure == (void*) 1));
+    natsOptions_Destroy(opts2);
+
+    test("NKey erase JWT: ");
+    s = natsOptions_SetUserCredentialsFromFiles(opts, "foo", "bar");
+    IFOK(s, natsOptions_SetNKey(opts, "pubkey2", _dummySigCb, (void*) 2));
+    testCond((s == NATS_OK)
+                && (opts->nkey != NULL)
+                && (strcmp(opts->nkey, "pubkey2") == 0)
+                && (opts->userJWTHandler == NULL)
+                && (opts->userJWTClosure == NULL)
+                && (opts->sigHandler == _dummySigCb)
+                && (opts->sigClosure == (void*) 2));
+
+    test("UserCreds erase NKey: ");
+    s = natsOptions_SetUserCredentialsFromFiles(opts, "foo", "bar");
+    testCond((s == NATS_OK)
+                && (opts->nkey == NULL)
+                && (opts->userJWTHandler == natsConn_userFromFile)
+                && (opts->userJWTClosure == (void*) opts->userCreds)
+                && (opts->sigHandler == natsConn_signatureHandler)
+                && (opts->sigClosure == (void*) opts->userCreds));
+
+    // Start fake server that will send predefined "nonce" so we can check
+    // that connection is sending appropriate jwt and signature.
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s == NATS_OK)
+    {
+        // Set this to error, the mock server should set it to OK
+        // if it can start successfully.
+        arg.done = false;
+        arg.status = NATS_ERR;
+        arg.checkInfoCB = _checkNKeyAndSig;
+        arg.string = "INFO {\"server_id\":\"22\",\"version\":\"latest\",\"go\":\"latest\",\"port\":4222,\"max_payload\":1048576,\"nonce\":\"nonce\"}\r\n";
+        s = natsThread_Create(&t, _startMockupServerThread, (void*) &arg);
+    }
+    if (s == NATS_OK)
+    {
+        // Wait for server to be ready
+        natsMutex_Lock(arg.m);
+        while ((s != NATS_TIMEOUT) && (arg.status != NATS_OK))
+            s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+        natsMutex_Unlock(arg.m);
+    }
+    if (s != NATS_OK)
+    {
+        if (t != NULL)
+        {
+            natsThread_Join(t);
+            natsThread_Destroy(t);
+        }
+        natsOptions_Destroy(opts);
+        _destroyDefaultThreadArgs(&arg);
+        FAIL("Unable to setup test");
+    }
+
+    test("NKey works ok: ");
+    s = natsOptions_SetNKey(opts, "pubKey", _sigCB, NULL);
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    testCond(s == NATS_OK);
+
+    // Notify mock server we are done
+    natsMutex_Lock(arg.m);
+    arg.done = true;
+    natsCondition_Signal(arg.c);
+    natsMutex_Unlock(arg.m);
+
+    natsConnection_Destroy(nc);
+    nc = NULL;
+
+    natsThread_Join(t);
+    natsThread_Destroy(t);
+    t = NULL;
+
+    _destroyDefaultThreadArgs(&arg);
+
+    natsOptions_Destroy(opts);
+}
+
+static natsStatus
+_checkNKeyFromSeed(char *buffer)
+{
+    // NKey should have been included
+    if (strstr(buffer, "UDXU4RCSJNZOIQHZNWXHXORDPRTGNJAHAHFRGZNEEJCPQTT2M7NLCNF4") == NULL)
+        return NATS_ERR;
+
+    // The server is sending the nonce "nonce" and we
+    // use a seed that should have produced a signature
+    // that converted to base64 should be:
+    if (strstr(buffer, "AVfpO7Pw3rc56hoO1OJcFxXUCfBmO2qouchBchSlL45Fuur9zS15UzytEI1QC5wwVG7uiHIdqyfmOS6uPrwqCg") == NULL)
+        return NATS_ERR;
+
+    return NATS_OK;
+}
+
+static void
+test_NKeyFromSeed(void)
+{
+    natsStatus          s;
+    natsOptions         *opts  = NULL;
+    natsOptions         *opts2 = NULL;
+    natsConnection      *nc    = NULL;
+    natsThread          *t     = NULL;
+    FILE                *f     = NULL;
+    struct threadArg    arg;
+
+    s = natsOptions_Create(&opts);
+    if (s != NATS_OK)
+        FAIL("Failed to setup test");
+
+    test("Invalid arg 1: ");
+    s = natsOptions_SetNKeyFromSeed(NULL, "pubkey", "seed.file");
+    testCond(s == NATS_INVALID_ARG);
+
+    test("Invalid arg 2: ");
+    s = natsOptions_SetNKeyFromSeed(opts, "pubkey", NULL);
+    testCond(s == NATS_INVALID_ARG);
+
+    nats_clearLastError();
+
+    test("Clone: ");
+    s = natsOptions_SetNKeyFromSeed(opts, "pubkey", "seed.file");
+    if (s == NATS_OK)
+    {
+        opts2 = natsOptions_clone(opts);
+        if (opts2 == NULL)
+            s = NATS_NO_MEMORY;
+    }
+    IFOK(s, natsOptions_SetNKeyFromSeed(opts, NULL, NULL));
+    testCond((s == NATS_OK)
+                && (opts2->nkey != NULL)
+                && (strcmp(opts2->nkey, "pubkey") == 0)
+                && (opts2->sigHandler == natsConn_signatureHandler)
+                && (opts2->sigClosure == (void*) opts2->userCreds)
+                && (opts2->userCreds != NULL)
+                && (opts2->userCreds->seedFile != NULL)
+                && (strcmp(opts2->userCreds->seedFile, "seed.file") == 0));
+    natsOptions_Destroy(opts2);
+
+    test("NKeyFromSeed erase JWT: ");
+    s = natsOptions_SetUserCredentialsFromFiles(opts, "foo", "bar");
+    IFOK(s, natsOptions_SetNKeyFromSeed(opts, "pubkey2", "seed.file"));
+    testCond((s == NATS_OK)
+                && (opts->nkey != NULL)
+                && (strcmp(opts->nkey, "pubkey2") == 0)
+                && (opts->userJWTHandler == NULL)
+                && (opts->userJWTClosure == NULL)
+                && (opts->sigHandler == natsConn_signatureHandler)
+                && (opts->sigClosure == (void*) opts->userCreds)
+                && (opts->userCreds != NULL)
+                && (opts->userCreds->seedFile != NULL)
+                && (strcmp(opts->userCreds->seedFile, "seed.file") == 0));
+
+    test("UserCreds erase NKeyFromSeed: ");
+    s = natsOptions_SetUserCredentialsFromFiles(opts, "foo", NULL);
+    testCond((s == NATS_OK)
+                && (opts->nkey == NULL)
+                && (opts->userJWTHandler == natsConn_userFromFile)
+                && (opts->userJWTClosure == (void*) opts->userCreds)
+                && (opts->sigHandler == natsConn_signatureHandler)
+                && (opts->sigClosure == (void*) opts->userCreds)
+                && (opts->userCreds != NULL)
+                && (opts->userCreds->seedFile == NULL));
+
+    // Start fake server that will send predefined "nonce" so we can check
+    // that connection is sending appropriate jwt and signature.
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s == NATS_OK)
+    {
+        // Set this to error, the mock server should set it to OK
+        // if it can start successfully.
+        arg.done = false;
+        arg.status = NATS_ERR;
+        arg.checkInfoCB = _checkNKeyFromSeed;
+        arg.string = "INFO {\"server_id\":\"22\",\"version\":\"latest\",\"go\":\"latest\",\"port\":4222,\"max_payload\":1048576,\"nonce\":\"nonce\"}\r\n";
+        s = natsThread_Create(&t, _startMockupServerThread, (void*) &arg);
+    }
+    if (s == NATS_OK)
+    {
+        // Wait for server to be ready
+        natsMutex_Lock(arg.m);
+        while ((s != NATS_TIMEOUT) && (arg.status != NATS_OK))
+            s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+        natsMutex_Unlock(arg.m);
+    }
+    if (s != NATS_OK)
+    {
+        if (t != NULL)
+        {
+            natsThread_Join(t);
+            natsThread_Destroy(t);
+        }
+        natsOptions_Destroy(opts);
+        _destroyDefaultThreadArgs(&arg);
+        FAIL("Unable to setup test");
+    }
+
+    test("NKeyFromSeed works ok: ");
+    f = fopen("seed.file", "w");
+    if (f == NULL)
+        s = NATS_ERR;
+    else
+    {
+        fputs("SUACSSL3UAHUDXKFSNVUZRF5UHPMWZ6BFDTJ7M6USDXIEDNPPQYYYCU3VY\n", f);
+        fclose(f);
+        f = NULL;
+    }
+    IFOK(s, natsOptions_SetNKeyFromSeed(opts, "UDXU4RCSJNZOIQHZNWXHXORDPRTGNJAHAHFRGZNEEJCPQTT2M7NLCNF4", "seed.file"));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    testCond(s == NATS_OK);
+
+    // Notify mock server we are done
+    natsMutex_Lock(arg.m);
+    arg.done = true;
+    natsCondition_Signal(arg.c);
+    natsMutex_Unlock(arg.m);
+
+    natsConnection_Destroy(nc);
+    nc = NULL;
+
+    natsThread_Join(t);
+    natsThread_Destroy(t);
+    t = NULL;
+
+    _destroyDefaultThreadArgs(&arg);
+
+    natsOptions_Destroy(opts);
+
+    remove("seed.file");
+}
+
+static void
+test_ConnSign(void)
+{
+    natsStatus          s;
+    natsConnection      *nc     = NULL;
+    natsOptions         *opts   = NULL;
+    natsPid             pid     = NATS_INVALID_PID;
+    const char          *ucfn   = "user.creds";
+    FILE                *f      = NULL;
+    unsigned char       sig[64];
+    const unsigned char expected[] = {
+            155, 157,   8, 183,  93, 154,  78,   7,
+            219,  39,  11,  16, 134, 231,  46, 142,
+            168,  87, 110, 202, 187, 180, 179,  62,
+             49, 255, 225,  74,  48,  80, 176, 111,
+            248, 162, 121, 188, 203, 101, 100, 195,
+            162,  70, 213, 182, 220,  14,  71, 113,
+             93, 239, 141, 131,  66, 190, 237, 127,
+            104, 191, 138, 217, 227,   1,  92,  14,
+    };
+
+    pid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    test("Connect ok: ");
+    s = natsConnection_ConnectTo(&nc, "nats://127.0.0.1:4222");
+    testCond(s == NATS_OK);
+
+    test("Can't sign without user creds: ");
+    s = natsConnection_Sign(nc, (const unsigned char*) "payload", 7, sig);
+    testCond((s == NATS_ERR)
+                && (nats_GetLastError(NULL) != NULL)
+                && (strstr(nats_GetLastError(NULL), "unable to sign") != NULL));
+
+    natsConnection_Destroy(nc);
+    nc = NULL;
+
+    s = NATS_OK;
+    test("Set proper option: ");
+    f = fopen(ucfn, "w");
+    if (f == NULL)
+        s = NATS_ERR;
+    else
+    {
+        int res = fputs("SUAMK2FG4MI6UE3ACF3FK3OIQBCEIEZV7NSWFFEW63UXMRLFM2XLAXK4GY\n", f);
+        if (res < 0)
+            s = NATS_ERR;
+
+        if (fclose(f) != 0)
+            s = NATS_ERR;
+        f = NULL;
+    }
+    IFOK(s, natsOptions_Create(&opts));
+    IFOK(s, natsOptions_SetUserCredentialsFromFiles(opts, ucfn, ucfn));
+    testCond(s == NATS_OK);
+
+    test("Connect ok: ");
+    s = natsConnection_Connect(&nc, opts);
+    testCond(s == NATS_OK);
+
+    test("Sign with NULL message: ");
+    s = natsConnection_Sign(nc, NULL, 0, sig);
+    testCond(s == NATS_OK);
+
+    test("Sign message: ");
+    s = natsConnection_Sign(nc, (const unsigned char*) "nonce", 5, sig);
+    testCond((s == NATS_OK)
+                && (sig != NULL)
+                && (memcmp((void*) sig, expected, sizeof(expected)) == 0));
+
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+
+    _stopServer(pid);
+
+    remove(ucfn);
+}
+
+static void
+test_WriteDeadline(void)
+{
+    natsStatus          s;
+    natsOptions         *opts = NULL;
+    natsConnection      *nc   = NULL;
+    natsThread          *t    = NULL;
+    char                data[1024] = {0};
+    struct threadArg    arg;
+
+    test("Create options: ");
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_SetAllowReconnect(opts, false));
+    testCond(s == NATS_OK);
+
+    test("Set invalid write deadline: ");
+    s = natsOptions_SetWriteDeadline(opts, -1);
+    testCond(s == NATS_INVALID_ARG);
+
+    test("Start mock server: ");
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s == NATS_OK)
+    {
+        arg.status = NATS_ERR;
+        arg.string = "INFO {\"server_id\":\"22\",\"version\":\"latest\",\"go\":\"latest\",\"port\":4222,\"max_payload\":1048576}\r\n";
+        s = natsThread_Create(&t, _startMockupServerThread, (void*) &arg);
+    }
+    if (s == NATS_OK)
+    {
+        // Wait for server to be ready
+        natsMutex_Lock(arg.m);
+        while ((s != NATS_TIMEOUT) && (arg.status != NATS_OK))
+            s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+        natsMutex_Unlock(arg.m);
+    }
+    testCond(s == NATS_OK);
+
+    test("Write deadline kicks publish out: ");
+    s = natsOptions_SetIOBufSize(opts, 100);
+    IFOK(s, natsOptions_SetClosedCB(opts, _closedCb, &arg));
+    IFOK(s, natsOptions_SetWriteDeadline(opts, 1));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    while (s == NATS_OK)
+        s = natsConnection_Publish(nc, "foo", data, sizeof(data));
+    testCond(s == NATS_TIMEOUT);
+
+    test("Caused a disconnect: ");
+    // Since we are not allowing for reconnect, we should
+    // get the closed CB.
+    natsMutex_Lock(arg.m);
+    s = NATS_OK;
+    while ((s != NATS_TIMEOUT) && !arg.closed)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    natsMutex_Lock(arg.m);
+    arg.done = true;
+    natsCondition_Signal(arg.c);
+    natsMutex_Unlock(arg.m);
+
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+
+    natsThread_Join(t);
+    natsThread_Destroy(t);
+
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+_publish(void *arg)
+{
+    natsConnection  *nc = (natsConnection*) arg;
+    char            data[1024] = {0};
+    int             i;
+    natsStatus      s = NATS_OK;
+
+    for (i=0; ((s == NATS_OK) && (i<1000)); i++)
+        s = natsConnection_Publish(nc, "foo", data, sizeof(data));
+
+}
+
+static void
+test_NoPartialOnReconnect(void)
+{
+    natsStatus          s;
+    natsOptions         *opts = NULL;
+    natsConnection      *nc   = NULL;
+    natsThread          *t    = NULL;
+    natsThread          *t2   = NULL;
+    natsPid             pid   = NATS_INVALID_PID;
+    struct threadArg    arg;
+    const char          *servers[2] = {"nats://127.0.0.1:4222", "nats://127.0.0.1:4223"};
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s != NATS_OK)
+        FAIL("unable to setup test");
+
+    test("Create options: ");
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_SetAllowReconnect(opts, true));
+    IFOK(s, natsOptions_SetReconnectWait(opts, 10));
+    IFOK(s, natsOptions_SetReconnectJitter(opts, 0, 0));
+    IFOK(s, natsOptions_SetMaxReconnect(opts, 10000));
+    IFOK(s, natsOptions_SetServers(opts, servers, 2));
+    IFOK(s, natsOptions_SetNoRandomize(opts, true));
+    IFOK(s, natsOptions_SetReconnectedCB(opts, _reconnectedCb, &arg));
+    testCond(s == NATS_OK);
+
+    test("Start real backup server: ");
+    pid = _startServer("nats://127.0.0.1:4223", "-p 4223", true);
+    CHECK_SERVER_STARTED(pid);
+    testCond(true);
+
+    test("Start mock server: ");
+    if (s == NATS_OK)
+    {
+        arg.status = NATS_ERR;
+        arg.string = "INFO {\"server_id\":\"22\",\"version\":\"latest\",\"go\":\"latest\",\"port\":4222,\"max_payload\":1048576}\r\n";
+        s = natsThread_Create(&t, _startMockupServerThread, (void*) &arg);
+    }
+    if (s == NATS_OK)
+    {
+        // Wait for server to be ready
+        natsMutex_Lock(arg.m);
+        while ((s != NATS_TIMEOUT) && (arg.status != NATS_OK))
+            s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+        natsMutex_Unlock(arg.m);
+    }
+    testCond(s == NATS_OK);
+
+    test("Connect: ");
+    s = natsConnection_Connect(&nc, opts);
+    testCond(s == NATS_OK)
+
+    test("Start Publish: ");
+    s = natsThread_Create(&t2, _publish, (void*) nc);
+    testCond(s == NATS_OK);
+
+    nats_Sleep(1000);
+
+    test("Kill server: ");
+    natsMutex_Lock(arg.m);
+    arg.done = true;
+    natsCondition_Signal(arg.c);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    test("Wait for reconnect: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !(arg.reconnected))
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    if (t2 != NULL)
+    {
+        natsThread_Join(t2);
+        natsThread_Destroy(t2);
+    }
+
+    test("Check no proto error: ");
+    {
+        const char *le = NULL;
+        s = natsConnection_GetLastError(nc, &le);
+    }
+    testCond(s == NATS_OK);
+
+    if (t != NULL)
+    {
+        natsThread_Join(t);
+        natsThread_Destroy(t);
+    }
+
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(pid);
+}
+
+static void
+_stopServerInThread(void *closure)
+{
+    natsPid pid = *((natsPid*) closure);
+
+    nats_Sleep(150);
+    _stopServer(pid);
+}
+
+static void
+test_ReconnectFailsPendingRequest(void)
+{
+    natsStatus          s;
+    natsOptions         *opts = NULL;
+    natsConnection      *nc   = NULL;
+    natsSubscription    *sub  = NULL;
+    natsMsg             *msg  = NULL;
+    natsThread          *t    = NULL;
+    natsPid             pid   = NATS_INVALID_PID;
+    bool                failr = false;
+    int                 iter;
+
+    for (iter=1; iter<=2; iter++)
+    {
+        failr = (iter == 2 ? true : false);
+
+        test("Create options: ");
+        s = natsOptions_Create(&opts);
+        IFOK(s, natsOptions_SetFailRequestsOnDisconnect(opts, failr));
+        testCond(s == NATS_OK);
+
+        test("Start server: ");
+        pid = _startServer("nats://127.0.0.1:4222", "-p 4222", true);
+        CHECK_SERVER_STARTED(pid);
+        testCond(true);
+
+        test("Connect: ");
+        s = natsConnection_Connect(&nc, opts);
+        testCond(s == NATS_OK);
+
+        test("Create service provider: ");
+        s = natsConnection_SubscribeSync(&sub, nc, "requests");
+        testCond(s == NATS_OK);
+
+        test("Start thread that will stop server: ");
+        s = natsThread_Create(&t, _stopServerInThread, (void*) &pid);
+        testCond(s == NATS_OK);
+
+        test((failr ? "Fails due to disconnect: " : "Fails due to timeout: "));
+        s = natsConnection_RequestString(&msg, nc, "requests", "help", 300);
+        testCond(s == (failr ? NATS_CONNECTION_DISCONNECTED : NATS_TIMEOUT));
+
+        natsThread_Join(t);
+        natsThread_Destroy(t);
+        t = NULL;
+        natsSubscription_Destroy(sub);
+        sub = NULL;
+        natsConnection_Destroy(nc);
+        nc = NULL;
+        natsOptions_Destroy(opts);
+        opts = NULL;
+    }
+}
+
+static void
+test_HeadersNotSupported(void)
+{
+    natsStatus          s;
+    natsConnection      *conn = NULL;
+    natsMsg             *msg  = NULL;
+    natsMsg             *reply= NULL;
+    natsThread          *t    = NULL;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s == NATS_OK)
+    {
+        // Set this to error, the mock server should set it to OK
+        // if it can start successfully.
+        arg.status = NATS_ERR;
+        arg.string = "INFO {\"server_id\":\"22\",\"version\":\"latest\",\"go\":\"latest\",\"port\":4222,\"max_payload\":1048576}\r\n";
+        s = natsThread_Create(&t, _startMockupServerThread, (void*) &arg);
+    }
+    if (s == NATS_OK)
+    {
+        // Wait for server to be ready
+        natsMutex_Lock(arg.m);
+        while ((s != NATS_TIMEOUT) && (arg.status != NATS_OK))
+            s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+        natsMutex_Unlock(arg.m);
+    }
+    if (s != NATS_OK)
+    {
+        if (t != NULL)
+        {
+            natsThread_Join(t);
+            natsThread_Destroy(t);
+        }
+        _destroyDefaultThreadArgs(&arg);
+        FAIL("Unable to setup test");
+    }
+
+    test("Headers not supported with old server: ");
+    s = natsConnection_ConnectTo(&conn, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_HasHeaderSupport(conn));
+    testCond(s == NATS_NO_SERVER_SUPPORT);
+
+    test("Create msg with heades: ");
+    s = natsMsg_Create(&msg, "foo", NULL, "body", 4);
+    IFOK(s, natsMsgHeader_Set(msg, "Header", "Hello Headers!"));
+    testCond(s == NATS_OK);
+
+    test("Publish fails: ");
+    s = natsConnection_PublishMsg(conn, msg);
+    testCond(s == NATS_NO_SERVER_SUPPORT);
+
+    test("Request fails: ");
+    s = natsConnection_RequestMsg(&reply, conn, msg, 1000);
+    testCond((s == NATS_NO_SERVER_SUPPORT) && (reply == NULL));
+
+    natsConnection_Destroy(conn);
+
+    // Notify mock server we are done
+    natsMutex_Lock(arg.m);
+    arg.done = true;
+    natsCondition_Signal(arg.c);
+    natsMutex_Unlock(arg.m);
+
+    natsThread_Join(t);
+    natsThread_Destroy(t);
+
+    natsMsg_Destroy(msg);
+    natsMsg_Destroy(reply);
+
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+test_HeadersBasic(void)
+{
+    natsStatus          s;
+    natsConnection      *nc     = NULL;
+    natsPid             pid     = NATS_INVALID_PID;
+    natsMsg             *msg    = NULL;
+    natsMsg             *rmsg   = NULL;
+    natsSubscription    *sub    = NULL;
+    const char          *val    = NULL;
+
+    if (!serverVersionAtLeast(2, 2, 0))
+    {
+        char txt[200];
+
+        snprintf(txt, sizeof(txt), "Skipping since requires server version of at least 2.2.0, got %s: ", serverVersion);
+        test(txt);
+        testCond(true);
+        return;
+    }
+
+    pid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    test("Connect ok: ");
+    s = natsConnection_ConnectTo(&nc, "nats://127.0.0.1:4222");
+    testCond(s == NATS_OK);
+
+    test("Headers supported: ");
+    s = natsConnection_HasHeaderSupport(nc);
+    testCond(s == NATS_OK);
+
+    test("Create sub: ");
+    s = natsConnection_SubscribeSync(&sub, nc, "foo");
+    testCond(s == NATS_OK);
+
+    test("Create msg with headers: ");
+    s = natsMsg_Create(&msg, "foo", NULL, "body", 4);
+    IFOK(s, natsMsgHeader_Set(msg, "Headers", "Hello Headers!"))
+    testCond(s == NATS_OK);
+
+    test("Publish with headers ok: ");
+    s = natsConnection_PublishMsg(nc, msg);
+    testCond(s == NATS_OK);
+
+    test("Receive msg: ")
+    s = natsSubscription_NextMsg(&rmsg, sub, 1000);
+    testCond((s == NATS_OK) && (rmsg != NULL));
+
+    test("Resend msg without lift: ");
+    s = natsConnection_PublishMsg(nc, rmsg);
+    testCond(s == NATS_OK);
+    natsMsg_Destroy(rmsg);
+    rmsg = NULL;
+
+    test("Receive msg: ")
+    s = natsSubscription_NextMsg(&rmsg, sub, 1000);
+    testCond((s == NATS_OK) && (rmsg != NULL));
+
+    test("Check headers: ");
+    s = natsMsgHeader_Get(rmsg, "Headers", &val);
+    testCond((s == NATS_OK)
+                && (val != NULL) && (strcmp(val, "Hello Headers!") == 0)
+                && (natsMsg_GetDataLength(rmsg) == 4)
+                && (strncmp(natsMsg_GetData(msg), "body", 4) == 0));
+
+    natsMsg_Destroy(rmsg);
+    rmsg = NULL;
+    test("Value with CRLFs replaced with spaces: ");
+    s = natsMsgHeader_Set(msg, "Headers", "value1\r\nvalue2\r\nvalue3");
+    IFOK(s, natsConnection_PublishMsg(nc, msg));
+    IFOK(s, natsSubscription_NextMsg(&rmsg, sub, 1000));
+    IFOK(s, natsMsgHeader_Get(rmsg, "Headers", &val));
+    testCond((s == NATS_OK)
+                && (val != NULL) && (strcmp(val, "value1  value2  value3") == 0)
+                && (natsMsg_GetDataLength(rmsg) == 4)
+                && (strncmp(natsMsg_GetData(msg), "body", 4) == 0));
+
+    natsMsg_Destroy(msg);
+    natsMsg_Destroy(rmsg);
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+    _stopServer(pid);
+}
+
+static void
+_msgFilterNoOp(natsConnection *nc, natsMsg **msg, void *closure) { }
+
+static void
+_msgFilterAlterMsg(natsConnection *nc, natsMsg **msg, void *closure)
+{
+    natsStatus  s;
+    natsMsg     *nm = NULL;
+
+    s = natsMsg_Create(&nm, natsMsg_GetSubject(*msg), NULL, "replaced", 8);
+    if (s != NATS_OK)
+        nats_PrintLastErrorStack(stderr);
+
+    natsMsg_Destroy(*msg);
+    *msg = nm;
+}
+
+static void
+_msgFilterDropMsg(natsConnection *nc, natsMsg **msg, void *closure)
+{
+    natsMsg_Destroy(*msg);
+    *msg = NULL;
+    natsConn_setFilter(nc, NULL);
+}
+
+static void
+test_natsMsgsFilter(void)
+{
+    natsStatus          s;
+    natsConnection      *nc     = NULL;
+    natsPid             pid     = NATS_INVALID_PID;
+    natsMsg             *msg    = NULL;
+    natsSubscription    *sub    = NULL;
+
+    pid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    test("Connect ok: ");
+    s = natsConnection_ConnectTo(&nc, "nats://127.0.0.1:4222");
+    testCond(s == NATS_OK);
+
+    test("Create sub: ");
+    s = natsConnection_SubscribeSync(&sub, nc, "foo");
+    testCond(s == NATS_OK);
+
+    test("Add no-op filter: ");
+    natsConn_setFilter(nc, _msgFilterNoOp);
+    s = natsConnection_PublishString(nc, "foo", "original");
+    IFOK(s, natsSubscription_NextMsg(&msg, sub, 1000));
+    testCond((s == NATS_OK) && (msg != NULL)
+                && (strcmp(natsMsg_GetData(msg), "original") == 0));
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Add alter-msg filter: ");
+    natsConn_setFilter(nc, _msgFilterAlterMsg);
+    s = natsConnection_PublishString(nc, "foo", "original");
+    IFOK(s, natsSubscription_NextMsg(&msg, sub, 1000));
+    testCond((s == NATS_OK) && (msg != NULL)
+                && (strcmp(natsMsg_GetData(msg), "replaced") == 0));
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Add drop-msg filter: ");
+    natsConn_setFilter(nc, _msgFilterDropMsg);
+    s = natsConnection_PublishString(nc, "foo", "will be dropped");
+    IFOK(s, natsSubscription_NextMsg(&msg, sub, 100));
+    testCond((s == NATS_TIMEOUT) && (msg == NULL));
+    nats_clearLastError();
+
+    test("Filter is removed from previous filter: ");
+    s = natsConnection_PublishString(nc, "foo", "got it");
+    IFOK(s, natsSubscription_NextMsg(&msg, sub, 1000));
+    testCond((s == NATS_OK) && (msg != NULL)
+                && (strcmp(natsMsg_GetData(msg), "got it") == 0));
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+    _stopServer(pid);
+}
+
+static natsStatus
+_evLoopAttach(void **userData, void *loop, natsConnection *nc, natsSock socket)
+{
+    struct threadArg *arg = (struct threadArg *) loop;
+
+    natsMutex_Lock(arg->m);
+    *userData = arg;
+    arg->nc = nc;
+    arg->sock = socket;
+    arg->attached++;
+    arg->doRead = true;
+    natsCondition_Broadcast(arg->c);
+    natsMutex_Unlock(arg->m);
+
+    return NATS_OK;
+}
+
+static natsStatus
+_evLoopRead(void *userData, bool add)
+{
+    struct threadArg *arg = (struct threadArg *) userData;
+
+    natsMutex_Lock(arg->m);
+    arg->doRead = add;
+    natsCondition_Broadcast(arg->c);
+    natsMutex_Unlock(arg->m);
+
+    return NATS_OK;
+}
+
+static natsStatus
+_evLoopWrite(void *userData, bool add)
+{
+    struct threadArg *arg = (struct threadArg *) userData;
+
+    natsMutex_Lock(arg->m);
+    arg->doWrite = add;
+    natsCondition_Broadcast(arg->c);
+    natsMutex_Unlock(arg->m);
+
+    return NATS_OK;
+}
+
+static natsStatus
+_evLoopDetach(void *userData)
+{
+    struct threadArg *arg = (struct threadArg *) userData;
+
+    natsMutex_Lock(arg->m);
+    arg->detached++;
+    natsCondition_Broadcast(arg->c);
+    natsMutex_Unlock(arg->m);
+
+    return NATS_OK;
+}
+
+static void
+_eventLoop(void *closure)
+{
+    struct threadArg *arg = (struct threadArg *) closure;
+    natsSock         sock = NATS_SOCK_INVALID;
+    natsConnection   *nc  = NULL;
+    bool             read = false;
+    bool             write= false;
+    bool             stop = false;
+
+    while (!stop)
+    {
+        nats_Sleep(100);
+        natsMutex_Lock(arg->m);
+        while (!arg->evStop && ((sock = arg->sock) == NATS_SOCK_INVALID))
+            natsCondition_Wait(arg->c, arg->m);
+        stop = arg->evStop;
+        nc = arg->nc;
+        read = arg->doRead;
+        write = arg->doWrite;
+        natsMutex_Unlock(arg->m);
+
+        if (!stop)
+        {
+            if (read)
+                natsConnection_ProcessReadEvent(nc);
+            if (write)
+                natsConnection_ProcessWriteEvent(nc);
+        }
+    }
+}
+
+static void
+test_EventLoop(void)
+{
+    natsStatus          s;
+    natsConnection      *nc         = NULL;
+    natsOptions         *opts       = NULL;
+    natsSubscription    *sub        = NULL;
+    natsMsg             *msg        = NULL;
+    natsPid             pid         = NATS_INVALID_PID;
+    struct threadArg    arg;
+
+    test("Set options: ");
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    IFOK(s, natsOptions_Create(&opts));
+    IFOK(s, natsOptions_SetMaxReconnect(opts, 100));
+    IFOK(s, natsOptions_SetReconnectWait(opts, 50));
+    IFOK(s, natsOptions_SetEventLoop(opts, (void*) &arg,
+                                     _evLoopAttach,
+                                     _evLoopRead,
+                                     _evLoopWrite,
+                                     _evLoopDetach));
+    IFOK(s, natsOptions_SetDisconnectedCB(opts, _disconnectedCb, (void*) &arg));
+    IFOK(s, natsOptions_SetReconnectedCB(opts, _reconnectedCb, (void*) &arg));
+    IFOK(s, natsOptions_SetClosedCB(opts, _closedCb, (void*) &arg));
+    testCond(s == NATS_OK);
+
+    pid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    test("Start event loop: ");
+    natsMutex_Lock(arg.m);
+    arg.sock = NATS_SOCK_INVALID;
+    natsMutex_Unlock(arg.m);
+    s = natsThread_Create(&arg.t, _eventLoop, (void*) &arg);
+    testCond(s == NATS_OK);
+
+    test("Connect: ");
+    s = natsConnection_Connect(&nc, opts);
+    testCond(s == NATS_OK)
+
+    test("Create sub: ");
+    s = natsConnection_SubscribeSync(&sub, nc, "foo");
+    testCond(s == NATS_OK);
+
+    test("Stop server and wait for disconnect: ");
+    _stopServer(pid);
+    pid = NATS_INVALID_PID;
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.disconnected)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    test("Restart server: ");
+    pid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+    testCond(s == NATS_OK);
+
+    test("Wait for reconnect: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.reconnected)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    test("Publish: ");
+    s = natsConnection_PublishString(nc, "foo", "bar");
+    testCond(s == NATS_OK);
+
+    test("Check msg received: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    testCond(s == NATS_OK);
+    natsMsg_Destroy(msg);
+
+    test("Close and wait for close cb: ");
+    natsConnection_Close(nc);
+    _waitForConnClosed(&arg);
+    testCond(s == NATS_OK);
+
+    natsMutex_Lock(arg.m);
+    arg.evStop = true;
+    natsCondition_Broadcast(arg.c);
+    natsMutex_Unlock(arg.m);
+
+    natsThread_Join(arg.t);
+    natsThread_Destroy(arg.t);
+
+    test("Check ev loop: ");
+    natsMutex_Lock(arg.m);
+    if (arg.attached != 2 || !arg.detached)
+        s = NATS_ERR;
+    testCond(s == NATS_OK);
+
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(pid);
+}
+
+static void
+test_EventLoopRetryOnFailedConnect(void)
+{
+    natsStatus          s;
+    natsConnection      *nc         = NULL;
+    natsOptions         *opts       = NULL;
+    natsSubscription    *sub        = NULL;
+    natsMsg             *msg        = NULL;
+    natsPid             pid         = NATS_INVALID_PID;
+    struct threadArg    arg;
+
+    test("Set options: ");
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    IFOK(s, natsOptions_Create(&opts));
+    IFOK(s, natsOptions_SetMaxReconnect(opts, 100));
+    IFOK(s, natsOptions_SetReconnectWait(opts, 50));
+    IFOK(s, natsOptions_SetRetryOnFailedConnect(opts,
+                                                true,
+                                                _connectedCb,
+                                                (void*) &arg));
+    IFOK(s, natsOptions_SetClosedCB(opts, _closedCb, (void*) &arg));
+    IFOK(s, natsOptions_SetEventLoop(opts, (void*) &arg,
+                                     _evLoopAttach,
+                                     _evLoopRead,
+                                     _evLoopWrite,
+                                     _evLoopDetach));
+    testCond(s == NATS_OK);
+
+    test("Start event loop: ");
+    natsMutex_Lock(arg.m);
+    arg.sock = NATS_SOCK_INVALID;
+    natsMutex_Unlock(arg.m);
+    s = natsThread_Create(&arg.t, _eventLoop, (void*) &arg);
+    testCond(s == NATS_OK);
+
+    test("Start connect: ");
+    s = natsConnection_Connect(&nc, opts);
+    testCond(s == NATS_NOT_YET_CONNECTED);
+    if (s == NATS_NOT_YET_CONNECTED)
+        s = NATS_OK;
+
+    test("Create sub: ");
+    s = natsConnection_SubscribeSync(&sub, nc, "foo");
+    testCond(s == NATS_OK);
+
+    test("Start server: ");
+    pid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+    testCond(s == NATS_OK);
+
+    test("Check connected: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.connected)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    test("Publish: ");
+    s = natsConnection_PublishString(nc, "foo", "bar");
+    testCond(s == NATS_OK);
+
+    test("Check msg received: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    testCond(s == NATS_OK);
+    natsMsg_Destroy(msg);
+
+    test("Close and wait for close cb: ");
+    natsConnection_Close(nc);
+    s = _waitForConnClosed(&arg);
+    testCond(s == NATS_OK);
+
+    natsMutex_Lock(arg.m);
+    arg.evStop = true;
+    natsCondition_Broadcast(arg.c);
+    natsMutex_Unlock(arg.m);
+
+    natsThread_Join(arg.t);
+    natsThread_Destroy(arg.t);
+
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(pid);
+}
+
+static void
+test_EventLoopTLS(void)
+{
+#if defined(NATS_HAS_TLS)
+    natsStatus          s;
+    natsConnection      *nc         = NULL;
+    natsOptions         *opts       = NULL;
+    natsPid             pid         = NATS_INVALID_PID;
+    struct threadArg    arg;
+
+    test("Set options: ");
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    IFOK(s, natsOptions_Create(&opts));
+    IFOK(s, natsOptions_SetURL(opts, "nats://localhost:4443"));
+    IFOK(s, natsOptions_SkipServerVerification(opts, true));
+    IFOK(s, natsOptions_SetSecure(opts, true));
+    IFOK(s, natsOptions_SetMaxReconnect(opts, 100));
+    IFOK(s, natsOptions_SetReconnectWait(opts, 50));
+    IFOK(s, natsOptions_SetDisconnectedCB(opts, _disconnectedCb, (void*) &arg));
+    IFOK(s, natsOptions_SetReconnectedCB(opts, _reconnectedCb, (void*) &arg));
+    IFOK(s, natsOptions_SetClosedCB(opts, _closedCb, (void*) &arg));
+    IFOK(s, natsOptions_SetEventLoop(opts, (void*) &arg,
+                                     _evLoopAttach,
+                                     _evLoopRead,
+                                     _evLoopWrite,
+                                     _evLoopDetach));
+    testCond(s == NATS_OK);
+
+    test("Start server: ");
+    pid = _startServer("nats://127.0.0.1:4443", "-config tls.conf -DV", true);
+    CHECK_SERVER_STARTED(pid);
+    testCond(s == NATS_OK);
+
+    test("Start event loop: ");
+    natsMutex_Lock(arg.m);
+    arg.sock = NATS_SOCK_INVALID;
+    natsMutex_Unlock(arg.m);
+    s = natsThread_Create(&arg.t, _eventLoop, (void*) &arg);
+    testCond(s == NATS_OK);
+
+    test("Connect: ");
+    s = natsConnection_Connect(&nc, opts);
+    testCond(s == NATS_OK);
+
+    test("Disconnect: ");
+    _stopServer(pid);
+    pid = NATS_INVALID_PID;
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.disconnected)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    test("Restart server: ");
+    pid = _startServer("nats://127.0.0.1:4443", "-config tls.conf", true);
+    CHECK_SERVER_STARTED(pid);
+    testCond(s == NATS_OK);
+
+    test("Check reconnected: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.reconnected)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    test("Shutdown evLoop: ");
+    natsMutex_Lock(arg.m);
+    arg.evStop = true;
+    natsCondition_Broadcast(arg.c);
+    natsMutex_Unlock(arg.m);
+    natsThread_Join(arg.t);
+    natsThread_Destroy(arg.t);
+    testCond(s == NATS_OK);
+
+    test("Close and wait for close cb: ");
+    natsConnection_Close(nc);
+    s = _waitForConnClosed(&arg);
+    testCond(s == NATS_OK);
+
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+
+    _destroyDefaultThreadArgs(&arg);
+
+    _stopServer(pid);
+#else
+    test("Skipped when built with no SSL support: ");
+    testCond(true);
+#endif
+}
+
+static void
+test_SSLBasic(void)
+{
+#if defined(NATS_HAS_TLS)
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    struct threadArg    args;
+
+    s = _createDefaultThreadArgsForCbTests(&args);
+    if (s == NATS_OK)
+        opts = _createReconnectOptions();
+    if (opts == NULL)
+        FAIL("Unable to setup test!");
+
+    serverPid = _startServer("nats://127.0.0.1:4443", "-config tls.conf", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Check that connect switches to TLS automatically: ");
+    s = natsOptions_SetURL(opts, "nats://localhost:4443");
+    // For this test skip server verification
+    IFOK(s, natsOptions_SkipServerVerification(opts, true));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    testCond(s == NATS_OK);
+
+    natsConnection_Destroy(nc);
+    nc = NULL;
+
+    test("Check connects OK with SSL options: ");
+    s = natsOptions_SetSecure(opts, true);
+    IFOK(s, natsOptions_SetReconnectedCB(opts, _reconnectedCb, &args));
+
+    // For test purposes, we provide the CA trusted certs
+    IFOK(s, natsOptions_LoadCATrustedCertificates(opts, "certs/ca.pem"));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    IFOK(s, natsConnection_PublishString(nc, "foo", "test"));
+    IFOK(s, natsConnection_Flush(nc));
+    testCond(s == NATS_OK)
+
+    test("Check reconnects OK: ");
+    _stopServer(serverPid);
+
+    nats_Sleep(100);
+
+    serverPid = _startServer("nats://127.0.0.1:4443", "-config tls.conf", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && !(args.reconnected))
+        s = natsCondition_TimedWait(args.c, args.m, 2000);
+    natsMutex_Unlock(args.m);
+
+    IFOK(s, natsConnection_PublishString(nc, "foo", "test"));
+    IFOK(s, natsConnection_Flush(nc));
+    testCond(s == NATS_OK)
+
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+
+    _destroyDefaultThreadArgs(&args);
+
+    _stopServer(serverPid);
+#else
+    test("Skipped when built with no SSL support: ");
+    testCond(true);
+#endif
+}
+
+static void
+test_SSLVerify(void)
+{
+#if defined(NATS_HAS_TLS)
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    struct threadArg    args;
+
+    s = _createDefaultThreadArgsForCbTests(&args);
+    if (s == NATS_OK)
+        opts = _createReconnectOptions();
+    if (opts == NULL)
+        FAIL("Unable to create reconnect options!");
+
+    serverPid = _startServer("nats://127.0.0.1:4443", "-config tlsverify.conf", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Check that connect fails if no SSL certs: ");
+    s = natsOptions_SetURL(opts, "nats://localhost:4443");
+    IFOK(s, natsOptions_SetSecure(opts, true));
+    // For test purposes, we provide the CA trusted certs
+    IFOK(s, natsOptions_LoadCATrustedCertificates(opts, "certs/ca.pem"));
+    IFOK(s, natsOptions_SetReconnectedCB(opts, _reconnectedCb, &args));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    testCond(s != NATS_OK);
+
+    test("Check that connect succeeds with proper certs: ");
+    s = natsOptions_LoadCertificatesChain(opts,
+                                          "certs/client-cert.pem",
+                                          "certs/client-key.pem");
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    IFOK(s, natsConnection_PublishString(nc, "foo", "test"));
+    IFOK(s, natsConnection_Flush(nc));
+    testCond(s == NATS_OK);
+
+    test("Check reconnects OK: ");
+    _stopServer(serverPid);
+
+    nats_Sleep(100);
+
+    serverPid = _startServer("nats://127.0.0.1:4443", "-config tlsverify.conf", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && !(args.reconnected))
+        s = natsCondition_TimedWait(args.c, args.m, 2000);
+    natsMutex_Unlock(args.m);
+
+    IFOK(s, natsConnection_PublishString(nc, "foo", "test"));
+    IFOK(s, natsConnection_Flush(nc));
+    testCond(s == NATS_OK)
+
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+
+    _destroyDefaultThreadArgs(&args);
+
+    _stopServer(serverPid);
+#else
+    test("Skipped when built with no SSL support: ");
+    testCond(true);
+#endif
+}
+
+static void
+test_SSLLoadCAFromMemory(void)
+{
+#if defined(NATS_HAS_TLS)
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    natsBuffer          *certBuf  = NULL;
+    struct threadArg    args;
+
+    s = nats_ReadFile(&certBuf, 10000, "certs/ca.pem");
+    IFOK(s, _createDefaultThreadArgsForCbTests(&args));
+    if (s == NATS_OK)
+        opts = _createReconnectOptions();
+    if (opts == NULL)
+        FAIL("Unable to create reconnect options!");
+
+    test("Check NULL certs: ");
+    s = natsOptions_SetCATrustedCertificates(opts, NULL);
+    testCond(s == NATS_INVALID_ARG);
+
+    test("Check empty certs: ");
+    s = natsOptions_SetCATrustedCertificates(opts, "");
+    testCond(s == NATS_INVALID_ARG);
+
+    test("Check invalid cert: ");
+    s = natsOptions_SetCATrustedCertificates(opts, "invalid");
+    testCond(s == NATS_SSL_ERROR);
+
+    serverPid = _startServer("nats://127.0.0.1:4443", "-config tlsverify.conf", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Check that connect succeeds with proper certs: ");
+    s = natsOptions_SetReconnectedCB(opts, _reconnectedCb, &args);
+    IFOK(s, natsOptions_SetURL(opts, "nats://localhost:4443"));
+    IFOK(s, natsOptions_SetSecure(opts, true));
+    // For test purposes, we provide the CA trusted certs
+    if (s == NATS_OK)
+    {
+        s = natsOptions_SetCATrustedCertificates(opts, (const char*) natsBuf_Data(certBuf));
+        // Demonstrate that we can free the memory after this call..
+        natsBuf_Destroy(certBuf);
+    }
+    IFOK(s, natsOptions_LoadCertificatesChain(opts,
+                                              "certs/client-cert.pem",
+                                              "certs/client-key.pem"));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    IFOK(s, natsConnection_PublishString(nc, "foo", "test"));
+    IFOK(s, natsConnection_Flush(nc));
+    testCond(s == NATS_OK);
+
+    test("Check reconnects OK: ");
+    _stopServer(serverPid);
+
+    nats_Sleep(100);
+
+    serverPid = _startServer("nats://127.0.0.1:4443", "-config tlsverify.conf", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && !(args.reconnected))
+        s = natsCondition_TimedWait(args.c, args.m, 2000);
+    natsMutex_Unlock(args.m);
+
+    IFOK(s, natsConnection_PublishString(nc, "foo", "test"));
+    IFOK(s, natsConnection_Flush(nc));
+    testCond(s == NATS_OK)
+
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+
+    _destroyDefaultThreadArgs(&args);
+
+    _stopServer(serverPid);
+#else
+    test("Skipped when built with no SSL support: ");
+    testCond(true);
+#endif
+}
+
+static void
+test_SSLCertAndKeyFromMemory(void)
+{
+#if defined(NATS_HAS_TLS)
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    natsBuffer          *certBuf  = NULL;
+    natsBuffer          *keyBuf   = NULL;
+    struct threadArg    args;
+
+    s = nats_ReadFile(&certBuf, 10000, "certs/client-cert.pem");
+    IFOK(s, nats_ReadFile(&keyBuf, 10000, "certs/client-key.pem"));
+    IFOK(s, _createDefaultThreadArgsForCbTests(&args));
+    if (s == NATS_OK)
+        opts = _createReconnectOptions();
+    if (opts == NULL)
+        FAIL("Unable to create reconnect options!");
+
+    test("Check NULL cert: ");
+    s = natsOptions_SetCertificatesChain(opts, NULL, (const char*) natsBuf_Data(keyBuf));
+    testCond(s == NATS_INVALID_ARG);
+
+    test("Check empty cert: ");
+    s = natsOptions_SetCertificatesChain(opts, "", (const char*) natsBuf_Data(keyBuf));
+    testCond(s == NATS_INVALID_ARG);
+
+    test("Check NULL key: ");
+    s = natsOptions_SetCertificatesChain(opts, (const char*) natsBuf_Data(certBuf), NULL);
+    testCond(s == NATS_INVALID_ARG);
+
+    test("Check empty key: ");
+    s = natsOptions_SetCertificatesChain(opts, (const char*) natsBuf_Data(certBuf), "");
+    testCond(s == NATS_INVALID_ARG);
+
+    test("Check invalid cert: ");
+    s = natsOptions_SetCertificatesChain(opts, "invalid", (const char*) natsBuf_Data(keyBuf));
+    testCond(s == NATS_SSL_ERROR);
+
+    test("Check invalid key: ");
+    s = natsOptions_SetCertificatesChain(opts, (const char*) natsBuf_Data(certBuf), "invalid");
+    testCond(s == NATS_SSL_ERROR);
+
+    serverPid = _startServer("nats://127.0.0.1:4443", "-config tlsverify.conf", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Check that connect succeeds with proper certs: ");
+    s = natsOptions_SetReconnectedCB(opts, _reconnectedCb, &args);
+    IFOK(s, natsOptions_SetURL(opts, "nats://localhost:4443"));
+    IFOK(s, natsOptions_SetSecure(opts, true));
+    // For test purposes, we provide the CA trusted certs
+    IFOK(s, natsOptions_LoadCATrustedCertificates(opts, "certs/ca.pem"));
+    IFOK(s, natsOptions_SetCertificatesChain(opts,
+                                             (const char*) natsBuf_Data(certBuf),
+                                             (const char*) natsBuf_Data(keyBuf)));
+    // Demonstrate that we can free the memory after this call..
+    natsBuf_Destroy(certBuf);
+    natsBuf_Destroy(keyBuf);
+
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    IFOK(s, natsConnection_PublishString(nc, "foo", "test"));
+    IFOK(s, natsConnection_Flush(nc));
+    testCond(s == NATS_OK);
+
+    test("Check reconnects OK: ");
+    _stopServer(serverPid);
+
+    nats_Sleep(100);
+
+    serverPid = _startServer("nats://127.0.0.1:4443", "-config tlsverify.conf", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && !(args.reconnected))
+        s = natsCondition_TimedWait(args.c, args.m, 2000);
+    natsMutex_Unlock(args.m);
+
+    IFOK(s, natsConnection_PublishString(nc, "foo", "test"));
+    IFOK(s, natsConnection_Flush(nc));
+    testCond(s == NATS_OK)
+
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+
+    _destroyDefaultThreadArgs(&args);
+
+    _stopServer(serverPid);
+#else
+    test("Skipped when built with no SSL support: ");
+    testCond(true);
+#endif
+}
+
+static void
+test_SSLVerifyHostname(void)
+{
+#if defined(NATS_HAS_TLS)
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    struct threadArg    args;
+
+    s = _createDefaultThreadArgsForCbTests(&args);
+    if (s == NATS_OK)
+        opts = _createReconnectOptions();
+    if (opts == NULL)
+        FAIL("Unable to create reconnect options!");
+
+    serverPid = _startServer("nats://127.0.0.1:4443", "-config tls.conf", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Check that connect fails if url is IP: ");
+    s = natsOptions_SetURL(opts, "nats://127.0.0.1:4443");
+    IFOK(s, natsOptions_SetSecure(opts, true));
+    // For test purposes, we provide the CA trusted certs
+    IFOK(s, natsOptions_LoadCATrustedCertificates(opts, "certs/ca.pem"));
+    IFOK(s, natsOptions_SetReconnectedCB(opts, _reconnectedCb, &args));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    testCond(s == NATS_SSL_ERROR);
+
+    test("Check that connect fails if wrong expected hostname: ");
+    s = natsOptions_SetURL(opts, "nats://localhost:4443");
+    IFOK(s, natsOptions_SetExpectedHostname(opts, "foo"));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    testCond(s == NATS_SSL_ERROR);
+
+    test("Check that connect succeeds if hostname ok and no expected hostname set: ");
+    s = natsOptions_SetURL(opts, "nats://localhost:4443");
+    IFOK(s, natsOptions_SetExpectedHostname(opts, NULL));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    testCond(s == NATS_OK)
+    natsConnection_Destroy(nc);
+    nc = NULL;
+
+    test("Check that connect succeeds with proper expected hostname: ");
+    s = natsOptions_SetURL(opts, "nats://127.0.0.1:4443");
+    IFOK(s, natsOptions_SetExpectedHostname(opts, "localhost"));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    IFOK(s, natsConnection_PublishString(nc, "foo", "test"));
+    IFOK(s, natsConnection_Flush(nc));
+    testCond(s == NATS_OK);
+
+    test("Check reconnects OK: ");
+    _stopServer(serverPid);
+
+    nats_Sleep(100);
+
+    serverPid = _startServer("nats://127.0.0.1:4443", "-config tls.conf", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && !(args.reconnected))
+        s = natsCondition_TimedWait(args.c, args.m, 2000);
+    natsMutex_Unlock(args.m);
+
+    IFOK(s, natsConnection_PublishString(nc, "foo", "test"));
+    IFOK(s, natsConnection_Flush(nc));
+    testCond(s == NATS_OK)
+
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+
+    _destroyDefaultThreadArgs(&args);
+
+    _stopServer(serverPid);
+#else
+    test("Skipped when built with no SSL support: ");
+    testCond(true);
+#endif
+}
+
+static void
+test_SSLSkipServerVerification(void)
+{
+#if defined(NATS_HAS_TLS)
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    struct threadArg    args;
+
+    s = _createDefaultThreadArgsForCbTests(&args);
+    if (s == NATS_OK)
+        opts = _createReconnectOptions();
+    if (opts == NULL)
+        FAIL("Unable to create reconnect options!");
+
+    serverPid = _startServer("nats://127.0.0.1:4443", "-config tls.conf", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Check that connect fails due to server verification: ");
+    s = natsOptions_SetURL(opts, "nats://127.0.0.1:4443");
+    IFOK(s, natsOptions_SetSecure(opts, true));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    testCond(s == NATS_SSL_ERROR);
+
+    test("Check that connect succeeds with server verification disabled: ");
+    s = natsOptions_SkipServerVerification(opts, true);
+    IFOK(s, natsOptions_SetReconnectedCB(opts, _reconnectedCb, &args));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    testCond(s == NATS_OK);
+
+    test("Check reconnects OK: ");
+    _stopServer(serverPid);
+
+    nats_Sleep(100);
+
+    serverPid = _startServer("nats://127.0.0.1:4443", "-config tls.conf", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && !(args.reconnected))
+        s = natsCondition_TimedWait(args.c, args.m, 2000);
+    natsMutex_Unlock(args.m);
+
+    IFOK(s, natsConnection_PublishString(nc, "foo", "test"));
+    IFOK(s, natsConnection_Flush(nc));
+    testCond(s == NATS_OK)
+
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+
+    _destroyDefaultThreadArgs(&args);
+
+    _stopServer(serverPid);
+#else
+    test("Skipped when built with no SSL support: ");
+    testCond(true);
+#endif
+}
+
+static void
+test_SSLCiphers(void)
+{
+#if defined(NATS_HAS_TLS)
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    struct threadArg    args;
+
+    s = _createDefaultThreadArgsForCbTests(&args);
+    if (s == NATS_OK)
+        opts = _createReconnectOptions();
+    if (opts == NULL)
+        FAIL("Unable to setup test!");
+
+    serverPid = _startServer("nats://127.0.0.1:4443", "-config tls.conf", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("SetCipherSuites requires OpenSSL 1.1: ");
+    s = natsOptions_SetCipherSuites(opts, "TLS_AES_128_GCM_SHA256");
+#if defined(NATS_USE_OPENSSL_1_1)
+    testCond(s == NATS_OK);
+#else
+    testCond(s == NATS_ERR);
+#endif
+
+    test("Check that connect fails if improper ciphers: ");
+    s = natsOptions_SetURL(opts, "nats://localhost:4443");
+    IFOK(s, natsOptions_SetReconnectedCB(opts, _reconnectedCb, &args));
+    IFOK(s, natsOptions_SetSecure(opts, true));
+    // For test purposes, we provide the CA trusted certs
+    IFOK(s, natsOptions_LoadCATrustedCertificates(opts, "certs/ca.pem"));
+    IFOK(s, natsOptions_SetCiphers(opts, "-ALL:RSA"));
+#if defined(NATS_USE_OPENSSL_1_1)
+    IFOK(s, natsOptions_SetCipherSuites(opts, ""));
+#endif
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    testCond(s != NATS_OK);
+
+    test("Check connects OK with proper ciphers: ");
+    s = natsOptions_SetCiphers(opts, "-ALL:HIGH");
+#if defined(NATS_USE_OPENSSL_1_1)
+    IFOK(s, natsOptions_SetCipherSuites(opts, "TLS_AES_128_GCM_SHA256"));
+#endif
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    IFOK(s, natsConnection_PublishString(nc, "foo", "test"));
+    IFOK(s, natsConnection_Flush(nc));
+    testCond(s == NATS_OK)
+
+    test("Check reconnects OK: ");
+    _stopServer(serverPid);
+
+    nats_Sleep(100);
+
+    serverPid = _startServer("nats://127.0.0.1:4443", "-config tls.conf", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && !(args.reconnected))
+        s = natsCondition_TimedWait(args.c, args.m, 2000);
+    natsMutex_Unlock(args.m);
+
+    IFOK(s, natsConnection_PublishString(nc, "foo", "test"));
+    IFOK(s, natsConnection_Flush(nc));
+    testCond(s == NATS_OK)
+
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+
+    _destroyDefaultThreadArgs(&args);
+
+    _stopServer(serverPid);
+#else
+    test("Skipped when built with no SSL support: ");
+    testCond(true);
+#endif
+}
+
+#if defined(NATS_HAS_TLS)
+static void
+_sslMT(void *closure)
+{
+    struct threadArg    *args = (struct threadArg*) closure;
+    natsStatus          s = NATS_OK;
+    natsConnection      *nc = NULL;
+    natsSubscription    *sub = NULL;
+    natsMsg             *msg = NULL;
+    char                subj[64];
+    int                 i;
+    const char          *msgPayload = "this is a test payload";
+    int                 count = 50;
+
+    natsMutex_Lock(args->m);
+    snprintf(subj, sizeof(subj), "foo.%d", ++(args->sum));
+    while (!(args->current) && (s == NATS_OK))
+        s = natsCondition_TimedWait(args->c, args->m, 2000);
+    natsMutex_Unlock(args->m);
+
+    if (valgrind)
+        count = 10;
+
+    for (i=0; (s == NATS_OK) && (i < count); i++)
+    {
+        s = natsConnection_Connect(&nc, args->opts);
+        IFOK(s, natsConnection_SubscribeSync(&sub, nc, subj));
+        IFOK(s, natsConnection_PublishString(nc, subj, msgPayload));
+        IFOK(s, natsSubscription_NextMsg(&msg, sub, 2000));
+        if (s == NATS_OK)
+        {
+            if (strcmp(natsMsg_GetData(msg), msgPayload) != 0)
+                s = NATS_ERR;
+        }
+
+        natsMsg_Destroy(msg);
+        msg = NULL;
+        natsSubscription_Destroy(sub);
+        sub = NULL;
+        natsConnection_Destroy(nc);
+        nc = NULL;
+    }
+
+    if (s != NATS_OK)
+    {
+        natsMutex_Lock(args->m);
+        if (args->status == NATS_OK)
+            args->status = s;
+        natsMutex_Unlock(args->m);
+    }
+}
+
+#define SSL_THREADS (3)
+#endif
+
+static void
+test_SSLMultithreads(void)
+{
+#if defined(NATS_HAS_TLS)
+    natsStatus          s;
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    natsThread          *t[SSL_THREADS];
+    int                 i;
+    struct threadArg    args;
+
+    s = _createDefaultThreadArgsForCbTests(&args);
+    if (s == NATS_OK)
+        s = natsOptions_Create(&opts);
+    if (opts == NULL)
+        FAIL("Unable to setup test!");
+
+    serverPid = _startServer("nats://127.0.0.1:4443", "-config tls.conf", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Create options: ");
+    s = natsOptions_SetURL(opts, "nats://127.0.0.1:4443");
+    IFOK(s, natsOptions_SetSecure(opts, true));
+    // For test purposes, we provide the CA trusted certs
+    IFOK(s, natsOptions_LoadCATrustedCertificates(opts, "certs/ca.pem"));
+    IFOK(s, natsOptions_SetExpectedHostname(opts, "localhost"));
+    testCond(s == NATS_OK);
+
+    args.opts = opts;
+
+    for (i=0; (s == NATS_OK) && (i<SSL_THREADS); i++)
+        s = natsThread_Create(&t[i], _sslMT, &args);
+
+    test("Create connections from multiple threads using same ssl ctx: ");
+    natsMutex_Lock(args.m);
+    args.current = true;
+    natsCondition_Broadcast(args.c);
+    natsMutex_Unlock(args.m);
+
+    for (i=0; i<SSL_THREADS; i++)
+    {
+        if (t[i] == NULL)
+            continue;
+
+        natsThread_Join(t[i]);
+        natsThread_Destroy(t[i]);
+    }
+
+    natsMutex_Lock(args.m);
+    IFOK(s, args.status);
+    natsMutex_Unlock(args.m);
+
+    testCond(s == NATS_OK);
+
+    natsOptions_Destroy(opts);
+
+    if (valgrind)
+        nats_Sleep(900);
+
+    _destroyDefaultThreadArgs(&args);
+
+    _stopServer(serverPid);
+#else
+    test("Skipped when built with no SSL support: ");
+    testCond(true);
+#endif
+}
+
+static void
+test_SSLConnectVerboseOption(void)
+{
+#if defined(NATS_HAS_TLS)
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+    struct threadArg    args;
+
+    s = _createDefaultThreadArgsForCbTests(&args);
+    if (s == NATS_OK)
+    {
+        opts = _createReconnectOptions();
+        if (opts == NULL)
+            s = NATS_ERR;
+    }
+    IFOK(s, natsOptions_SetVerbose(opts, true));
+    IFOK(s, natsOptions_SetReconnectedCB(opts, _reconnectedCb, &args));
+    if (s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    serverPid = _startServer("nats://127.0.0.1:4443", "-config tls.conf", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    s = natsOptions_SetURL(opts, "nats://127.0.0.1:4443");
+    IFOK(s, natsOptions_SetSecure(opts, true));
+    // For test purposes, we provide the CA trusted certs
+    IFOK(s, natsOptions_LoadCATrustedCertificates(opts, "certs/ca.pem"));
+    IFOK(s, natsOptions_SetExpectedHostname(opts, "localhost"));
+
+    test("Check that SSL connect OK when Verbose set: ");
+
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    IFOK(s, natsConnection_Flush(nc));
+
+    testCond(s == NATS_OK);
+
+    _stopServer(serverPid);
+    serverPid = _startServer("nats://127.0.0.1:4443", "-config tls.conf", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Check that SSL reconnect OK when Verbose set: ");
+
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && !args.reconnected)
+        s = natsCondition_TimedWait(args.c, args.m, 5000);
+    natsMutex_Unlock(args.m);
+
+    IFOK(s, natsConnection_Flush(nc));
+
+    testCond(s == NATS_OK);
+
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+
+    if (valgrind)
+        nats_Sleep(900);
+
+    _destroyDefaultThreadArgs(&args);
+
+    _stopServer(serverPid);
+#else
+    test("Skipped when built with no SSL support: ");
+    testCond(true);
+#endif
+}
+
+#if defined(NATS_HAS_TLS)
+static natsStatus
+_elDummyAttach(void **userData, void *loop, natsConnection *nc, natsSock socket) { return NATS_OK; }
+
+static natsStatus
+_elDummyRead(void *userData, bool add) { return NATS_OK; }
+
+static natsStatus
+_elDummyWrite(void *userData, bool add) { return NATS_OK; }
+
+static natsStatus
+_elDummyDetach(void *userData) { return NATS_OK; }
+#endif
+
+static void
+test_SSLSocketLeakWithEventLoop(void)
+{
+#if defined(NATS_HAS_TLS)
+    natsStatus          s;
+    natsConnection      *nc       = NULL;
+    natsOptions         *opts     = NULL;
+    natsPid             serverPid = NATS_INVALID_PID;
+
+    s = natsOptions_Create(&opts);
+    if (s == NATS_OK)
+    {
+        // Not really using a real event loop, just setting the option.
+        s = natsOptions_SetEventLoop(opts, (void*) 1,
+                                     _elDummyAttach,
+                                     _elDummyRead,
+                                     _elDummyWrite,
+                                     _elDummyDetach);
+    }
+    IFOK(s, natsOptions_SetURL(opts, "nats://127.0.0.1:4443"));
+    IFOK(s, natsOptions_SetSecure(opts, true));
+    if (s != NATS_OK)
+        FAIL("Unable to setup test!");
+
+    serverPid = _startServer("nats://127.0.0.1:4443", "-config tls.conf", true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    // The options have not been set properly for a successful TLS connection.
+    test("Check that SSL fails: ");
+    s = natsConnection_Connect(&nc, opts);
+    testCond(s != NATS_OK);
+
+    // Valgrind will tell us if we have leaked socket.
+
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+
+    _stopServer(serverPid);
+#else
+    test("Skipped when built with no SSL support: ");
+    testCond(true);
+#endif
+}
+
+static void
+test_SSLReconnectWithAuthError(void)
+{
+#if defined(NATS_HAS_TLS)
+    natsStatus          s;
+    natsConnection      *nc     = NULL;
+    natsOptions         *opts   = NULL;
+    natsPid             pid1    = NATS_INVALID_PID;
+    natsPid             pid2    = NATS_INVALID_PID;
+    struct threadArg    args;
+
+    s = _createDefaultThreadArgsForCbTests(&args);
+    IFOK(s, natsOptions_Create(&opts));
+    IFOK(s, natsOptions_SetSecure(opts, true));
+    IFOK(s, natsOptions_SkipServerVerification(opts, true));
+    IFOK(s, natsOptions_SetTimeout(opts, 250));
+    IFOK(s, natsOptions_SetMaxReconnect(opts, 1000));
+    IFOK(s, natsOptions_SetReconnectWait(opts, 100));
+    IFOK(s, natsOptions_SetClosedCB(opts, _closedCb, (void*) &args));
+    IFOK(s, natsOptions_SetServers(opts, (const char*[2]){"tls://user:pwd@127.0.0.1:4443", "tls://bad:pwd@127.0.0.1:4444"}, 2));
+    if (opts == NULL)
+        FAIL("Unable to create reconnect options!");
+
+    pid1 = _startServer("nats://127.0.0.1:4443", "-p 4443 -cluster_name abc -cluster nats://127.0.0.1:6222 -tls -tlscert certs/server-cert.pem -tlskey certs/server-key.pem -tlscacert certs/ca.pem -user user -pass pwd", true);
+    CHECK_SERVER_STARTED(pid1);
+
+    pid2 = _startServer("nats://127.0.0.1:4444", "-p 4444 -cluster_name abc -cluster nats://127.0.0.1:6223 -routes nats://127.0.0.1:6222 -tls -tlscert certs/server-cert.pem -tlskey certs/server-key.pem -tlscacert certs/ca.pem -user user -pass pwd", true);
+    CHECK_SERVER_STARTED(pid2);
+
+    test("Connect to server1: ");
+    s = natsConnection_Connect(&nc, opts);
+    testCond(s == NATS_OK);
+
+    test("Stop server1: ");
+    _stopServer(pid1);
+    testCond(true);
+
+    test("Check that client stops after auth errors: ");
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && !args.closed)
+        s = natsCondition_TimedWait(args.c, args.m, 5000);
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_OK);
+
+    natsConnection_Destroy(nc);
+    natsOptions_Destroy(opts);
+
+    _destroyDefaultThreadArgs(&args);
+
+    _stopServer(pid2);
+#else
+    test("Skipped when built with no SSL support: ");
+    testCond(true);
+#endif
+}
+
+static void
+rmtree(const char *path)
+{
+#ifdef _WIN32
+    WIN32_FIND_DATA ffd;
+    HANDLE          hFind = INVALID_HANDLE_VALUE;
+    char            *dir  = NULL;
+
+    if (nats_asprintf(&dir, "%s\\*", path) < 0)
+        abort();
+
+    hFind = FindFirstFile(dir, &ffd);
+    if (hFind == INVALID_HANDLE_VALUE)
+    {
+        free(dir);
+        return;
+    }
+
+    do
+    {
+        char *fullPath = NULL;
+
+        if (!strcmp(ffd.cFileName, ".") || !strcmp(ffd.cFileName, ".."))
+            continue;
+
+        if (nats_asprintf(&fullPath, "%s\\%s", path, ffd.cFileName) < 0)
+            abort();
+
+        if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
+            rmtree(fullPath);
+        else
+            DeleteFile(fullPath);
+        free(fullPath);
+    }
+    while (FindNextFile(hFind, &ffd) != 0);
+
+    FindClose(hFind);
+    RemoveDirectory(path);
+    free(dir);
+
+#else
+    DIR             *dir;
+    struct stat     statPath, statEntry;
+    struct dirent   *entry;
+
+    memset(&statPath, 0, sizeof(struct stat));
+
+    stat(path, &statPath);
+    if (S_ISDIR(statPath.st_mode) == 0)
+        return;
+
+    if ((dir = opendir(path)) == NULL)
+        return;
+
+    while ((entry = readdir(dir)) != NULL)
+    {
+        char *fullPath = NULL;
+
+        if (!strcmp(entry->d_name, ".") || !strcmp(entry->d_name, ".."))
+            continue;
+
+        if (nats_asprintf(&fullPath, "%s/%s", path, entry->d_name) < 0)
+            abort();
+
+        memset(&statEntry, 0, sizeof(struct stat));
+        stat(fullPath, &statEntry);
+
+        if (S_ISDIR(statEntry.st_mode) != 0)
+            rmtree(fullPath);
+        else
+            unlink(fullPath);
+
+        free(fullPath);
+    }
+
+    closedir(dir);
+    rmdir(path);
+#endif
+}
+
+static void
+_makeUniqueDir(char *buf, int bufLen, const char *path)
+{
+    int n;
+
+    if ((int) strlen(path) + 1 + NUID_BUFFER_LEN + 1 > bufLen)
+        abort();
+
+    n = snprintf(buf, bufLen, "%s", path);
+    natsNUID_Next(buf+n, NUID_BUFFER_LEN+1);
+    buf[n+NUID_BUFFER_LEN+1] = '\0';
+}
+
+static void
+_createConfFile(char *buf, int bufLen, const char *content)
+{
+    FILE *f = NULL;
+
+    if (5 + NUID_BUFFER_LEN + 1 > bufLen)
+        abort();
+
+    memcpy(buf, "conf_", 5);
+    natsNUID_Next(buf+5, NUID_BUFFER_LEN+1);
+    buf[5+NUID_BUFFER_LEN+1] = '\0';
+
+    f = fopen(buf, "w");
+    if (f == NULL)
+        abort();
+
+    fputs(content, f);
+    fclose(f);
+}
+
+static void
+test_ReconnectImplicitUserInfo(void)
+{
+    natsStatus          s;
+    natsPid             pid1    = NATS_INVALID_PID;
+    natsPid             pid2    = NATS_INVALID_PID;
+    natsOptions         *o1     = NULL;
+    natsConnection      *nc1 = NULL;
+    natsSubscription    *sub = NULL;
+    natsConnection      *nc2 = NULL;
+    natsMsg             *msg = NULL;
+    char conf[256];
+    char cmdLine[1024];
+    struct threadArg args;
+
+    _createConfFile(conf, sizeof(conf),
+    "accounts { "\
+    "   A { "\
+    "       users: [{user: a, password: pwd}] "\
+    "   }\n"\
+    "   B { "\
+    "       users: [{user: b, password: pwd}] "\
+    "   }\n"\
+    "}\n"\
+    "no_auth_user: b\n");
+    test("Start server1: ");
+    snprintf(cmdLine, sizeof(cmdLine), "-cluster_name \"local\" -cluster nats://127.0.0.1:6222 -c %s", conf);
+    pid1 = _startServer("nats://127.0.0.1:4222", cmdLine, true);
+    CHECK_SERVER_STARTED(pid1);
+    testCond(true);
+
+    test("Connect1: ");
+    s = _createDefaultThreadArgsForCbTests(&args);
+    IFOK(s, natsOptions_Create(&o1));
+    IFOK(s, natsOptions_SetDiscoveredServersCB(o1, _discoveredServersCb, (void*) &args));
+    IFOK(s, natsOptions_SetURL(o1, "nats://a:pwd@127.0.0.1:4222"));
+    IFOK(s, natsOptions_SetReconnectWait(o1, 100));
+    IFOK(s, natsOptions_SetReconnectedCB(o1, _reconnectedCb, (void*) &args));
+    IFOK(s, natsConnection_Connect(&nc1, o1));
+    testCond(s == NATS_OK);
+
+    test("Start server2: ");
+    snprintf(cmdLine, sizeof(cmdLine), "-p 4223 -cluster_name \"local\" -cluster nats://127.0.0.1:6223 -routes nats://127.0.0.1:6222 -c %s", conf);
+    pid2 = _startServer("nats://127.0.0.1:4223", cmdLine, true);
+    CHECK_SERVER_STARTED(pid2);
+    testCond(true);
+
+    test("Check s2 discovered: ");
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && (args.sum == 0))
+        s = natsCondition_TimedWait(args.c, args.m, 2000);
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_OK);
+
+    test("Stop srv1: ");
+    _stopServer(pid1);
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && !args.reconnected)
+        s = natsCondition_TimedWait(args.c, args.m, 2000);
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_OK);
+
+    test("Create sub: ");
+    s = natsConnection_SubscribeSync(&sub, nc1, "foo");
+    testCond(s == NATS_OK);
+
+    test("Flush: ");
+    s = natsConnection_Flush(nc1);
+    testCond(s == NATS_OK);
+
+    test("Connect 2: ");
+    s = natsConnection_ConnectTo(&nc2, "nats://a:pwd@127.0.0.1:4223");
+    testCond(s == NATS_OK);
+
+    test("Publish: ");
+    s = natsConnection_PublishString(nc2, "foo", "msg");
+    testCond(s == NATS_OK);
+
+    test("Check received: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    testCond(s == NATS_OK);
+    natsMsg_Destroy(msg);
+
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc1);
+    natsOptions_Destroy(o1);
+    natsConnection_Destroy(nc2);
+    _stopServer(pid2);
+    _destroyDefaultThreadArgs(&args);
+    remove(conf);
+}
+
+static void
+test_JetStreamUnmarshalAccountInfo(void)
+{
+    natsStatus          s;
+    nats_JSON           *json = NULL;
+    jsAccountInfo       *ai   = NULL;
+    jsTier              *r    = NULL;
+    const char          *bad[] = {
+        "{\"memory\":\"abc\"}",
+        "{\"storage\":\"abc\"}",
+        "{\"streams\":\"abc\"}",
+        "{\"consumers\":\"abc\"}",
+        "{\"domain\":123}",
+        "{\"api\":123}",
+        "{\"api\":{\"total\":\"abc\"}}",
+        "{\"api\":{\"errors\":\"abc\"}}",
+        "{\"limits\":123}",
+        "{\"limits\":{\"max_memory\":\"abc\"}}",
+        "{\"limits\":{\"max_storage\":\"abc\"}}",
+        "{\"limits\":{\"max_streams\":\"abc\"}}",
+        "{\"limits\":{\"max_consumers\":\"abc\"}}",
+        "{\"limits\":{\"max_ack_pending\":\"abc\"}}",
+        "{\"limits\":{\"memory_max_stream_bytes\":\"abc\"}}",
+        "{\"limits\":{\"storage_max_stream_bytes\":\"abc\"}}",
+        "{\"limits\":{\"max_bytes_required\":\"abc\"}}",
+        "{\"tier\":123}",
+        "{\"tier\":{1, 2}}",
+        "{\"tier\":{\"R1\":123}}",
+        "{\"tier\":{\"R1\":{\"memory\":\"abc\"}}}",
+    };
+    char tmp[2048];
+    int i;
+
+    for (i=0; i<(int)(sizeof(bad)/sizeof(char*)); i++)
+    {
+        test("Bad fields: ");
+        s = nats_JSONParse(&json, bad[i], (int) strlen(bad[i]));
+        IFOK(s, js_unmarshalAccountInfo(json, &ai));
+        testCond((s != NATS_OK) && (ai == NULL));
+        nats_JSONDestroy(json);
+        json = NULL;
+        nats_clearLastError();
+    }
+
+    test("Account info complete: ");
+    snprintf(tmp, sizeof(tmp), "{\"memory\":1000,\"storage\":2000,\"streams\":5,\"consumers\":7,"\
+        "\"domain\":\"MyDomain\","\
+        "\"api\":{\"total\":8,\"errors\":2},"\
+        "\"limits\":{\"max_memory\":3000,\"max_storage\":4000,\"max_streams\":10,\"max_consumers\":20,"\
+        "\"max_ack_pending\":100,\"memory_max_stream_bytes\":1000000,\"storage_max_stream_bytes\":2000000,\"max_bytes_required\":true},"\
+        "\"tier\":{\"R1\":{\"memory\":1000,\"storage\":2000,\"streams\":5,\"consumers\":7,"\
+        "\"limits\":{\"max_memory\":3000,\"max_storage\":4000,\"max_streams\":10,\"max_consumers\":20,"\
+        "\"max_ack_pending\":100,\"memory_max_stream_bytes\":1000000,\"storage_max_stream_bytes\":2000000,\"max_bytes_required\":true}},"\
+        "\"R2\":{\"memory\":2000,\"storage\":3000,\"streams\":8,\"consumers\":9,"\
+        "\"limits\":{\"max_memory\":4000,\"max_storage\":5000,\"max_streams\":20,\"max_consumers\":30,"\
+        "\"max_ack_pending\":200,\"memory_max_stream_bytes\":2000000,\"storage_max_stream_bytes\":3000000}}}}");
+    s = nats_JSONParse(&json, tmp, (int) strlen(tmp));
+    IFOK(s, js_unmarshalAccountInfo(json, &ai));
+    testCond((s == NATS_OK) && (ai != NULL)
+                && (ai->Memory == 1000)
+                && (ai->Store == 2000)
+                && (ai->Streams == 5)
+                && (ai->Consumers == 7)
+                && (ai->Domain != NULL)
+                && (strcmp(ai->Domain, "MyDomain") == 0)
+                && (ai->API.Total == 8)
+                && (ai->API.Errors == 2)
+                && (ai->Limits.MaxMemory == 3000)
+                && (ai->Limits.MaxStore == 4000)
+                && (ai->Limits.MaxStreams == 10)
+                && (ai->Limits.MaxConsumers == 20)
+                && (ai->Limits.MaxAckPending == 100)
+                && (ai->Limits.MemoryMaxStreamBytes == 1000000)
+                && (ai->Limits.StoreMaxStreamBytes == 2000000)
+                && (ai->Limits.MaxBytesRequired)
+                && (ai->Tiers != NULL)
+                && (ai->TiersLen == 2));
+
+    test("Check tier R1: ");
+    if (strcmp(ai->Tiers[0]->Name, "R1") == 0)
+        r = ai->Tiers[0];
+    else if (strcmp(ai->Tiers[1]->Name, "R1") == 0)
+        r = ai->Tiers[1];
+    else
+        s = NATS_ERR;
+    testCond((s == NATS_OK)
+                && (r->Memory == 1000)
+                && (r->Store == 2000)
+                && (r->Streams == 5)
+                && (r->Consumers == 7)
+                && (r->Limits.MaxMemory == 3000)
+                && (r->Limits.MaxStore == 4000)
+                && (r->Limits.MaxStreams == 10)
+                && (r->Limits.MaxConsumers == 20)
+                && (r->Limits.MaxAckPending == 100)
+                && (r->Limits.MemoryMaxStreamBytes == 1000000)
+                && (r->Limits.StoreMaxStreamBytes == 2000000)
+                && r->Limits.MaxBytesRequired);
+
+    test("Check tier R2: ");
+    if (strcmp(ai->Tiers[0]->Name, "R2") == 0)
+        r = ai->Tiers[0];
+    else if (strcmp(ai->Tiers[1]->Name, "R2") == 0)
+        r = ai->Tiers[1];
+    else
+        s = NATS_ERR;
+    testCond((s == NATS_OK)
+                && (r->Memory == 2000)
+                && (r->Store == 3000)
+                && (r->Streams == 8)
+                && (r->Consumers == 9)
+                && (r->Limits.MaxMemory == 4000)
+                && (r->Limits.MaxStore == 5000)
+                && (r->Limits.MaxStreams == 20)
+                && (r->Limits.MaxConsumers == 30)
+                && (r->Limits.MaxAckPending == 200)
+                && (r->Limits.MemoryMaxStreamBytes == 2000000)
+                && (r->Limits.StoreMaxStreamBytes == 3000000)
+                && (!r->Limits.MaxBytesRequired));
+
+    nats_JSONDestroy(json);
+    jsAccountInfo_Destroy(ai);
+}
+
+static void
+test_JetStreamUnmarshalStreamState(void)
+{
+    natsStatus          s;
+    nats_JSON           *json = NULL;
+    jsStreamState       state;
+    const char          *bad[] = {
+        "{\"state\":{\"messages\":\"abc\"}}",
+        "{\"state\":{\"bytes\":\"abc\"}}",
+        "{\"state\":{\"first_seq\":\"abc\"}}",
+        "{\"state\":{\"first_ts\":123}}",
+        "{\"state\":{\"last_seq\":\"abc\"}}",
+        "{\"state\":{\"last_ts\":123}}",
+        "{\"state\":{\"num_deleted\":\"abc\"}}",
+        "{\"state\":{\"deleted\":\"abc\"}}",
+        "{\"state\":{\"lost\":\"abc\"}}",
+        "{\"state\":{\"lost\":{\"msgs\":\"abc\"}}}",
+        "{\"state\":{\"lost\":{\"bytes\":\"abc\"}}}",
+        "{\"state\":{\"consumer_count\":\"abc\"}}",
+        "{\"state\":{\"num_subjects\":\"abc\"}}",
+    };
+    int i;
+
+    for (i=0; i<(int)(sizeof(bad)/sizeof(char*)); i++)
+    {
+        test("Bad fields: ");
+        memset(&state, 0, sizeof(jsStreamState));
+        s = nats_JSONParse(&json, bad[i], (int) strlen(bad[i]));
+        IFOK(s, js_unmarshalStreamState(json, "state", &state));
+        testCond(s != NATS_OK);
+        nats_JSONDestroy(json);
+        json = NULL;
+        nats_clearLastError();
+    }
+
+    test("Unmarshal: ");
+    memset(&state, 0, sizeof(jsStreamState));
+    s = nats_JSONParse(&json, "{\"state\":{\"messages\":1,\"bytes\":2,"\
+        "\"first_seq\":3,\"first_ts\":\"2021-06-23T18:22:00.123Z\","\
+        "\"last_seq\":4,\"last_ts\":\"2021-06-23T18:22:00.123456789Z\","\
+        "\"num_deleted\":5,\"deleted\":[6,7,8,9,10],"\
+        "\"lost\":{\"msgs\":[11,12,13],\"bytes\":14},"\
+        "\"consumer_count\":15,\"num_subjects\":3}}", -1);
+    IFOK(s, js_unmarshalStreamState(json, "state", &state));
+    testCond((s == NATS_OK) && (json != NULL)
+                && (state.Msgs == 1)
+                && (state.Bytes == 2)
+                && (state.FirstSeq == 3)
+                && (state.FirstTime == 1624472520123000000)
+                && (state.LastSeq == 4)
+                && (state.LastTime == 1624472520123456789)
+                && (state.NumDeleted == 5)
+                && (state.Deleted != NULL)
+                && (state.DeletedLen == 5)
+                && (state.Deleted[0] == 6)
+                && (state.Deleted[1] == 7)
+                && (state.Deleted[2] == 8)
+                && (state.Deleted[3] == 9)
+                && (state.Deleted[4] == 10)
+                && (state.Lost != NULL)
+                && (state.Lost->MsgsLen == 3)
+                && (state.Lost->Msgs != NULL)
+                && (state.Lost->Msgs[0] == 11)
+                && (state.Lost->Msgs[1] == 12)
+                && (state.Lost->Msgs[2] == 13)
+                && (state.Lost->Bytes == 14)
+                && (state.Consumers == 15)
+                && (state.NumSubjects == 3));
+
+    test("Cleanup: ");
+    js_cleanStreamState(&state);
+    testCond(true);
+    // Check that this is fine
+    js_cleanStreamState(NULL);
+
+    nats_JSONDestroy(json);
+}
+
+static void
+test_JetStreamUnmarshalStreamConfig(void)
+{
+    natsStatus          s;
+    nats_JSON           *json = NULL;
+    jsStreamConfig      *sc   = NULL;
+    const char          *missing[] = {
+        "{\"name\":\"TEST\"}",
+        "{\"name\":\"TEST\",\"retention\":\"limits\"}",
+        "{\"name\":\"TEST\",\"retention\":\"limits\",\"max_consumers\":5}",
+        "{\"name\":\"TEST\",\"retention\":\"limits\",\"max_consumers\":5,\"max_msgs\":10}",
+        "{\"name\":\"TEST\",\"retention\":\"limits\",\"max_consumers\":5,\"max_msgs\":10,\"max_bytes\":1000}",
+        "{\"name\":\"TEST\",\"retention\":\"limits\",\"max_consumers\":5,\"max_msgs\":10,\"max_bytes\":1000,\"max_age\":20000000}",
+        "{\"name\":\"TEST\",\"retention\":\"limits\",\"max_consumers\":5,\"max_msgs\":10,\"max_bytes\":1000,\"max_age\":20000000,\"discard\":\"new\"}",
+        "{\"name\":\"TEST\",\"retention\":\"limits\",\"max_consumers\":5,\"max_msgs\":10,\"max_bytes\":1000,\"max_age\":20000000,\"discard\":\"new\",\"storage\":\"memory\"}",
+    };
+    char tmp[2048];
+    int i;
+
+    for (i=0; i<(int)(sizeof(missing)/sizeof(char*)); i++)
+    {
+        test("Missing fields: ");
+        s = nats_JSONParse(&json, missing[i], (int) strlen(missing[i]));
+        IFOK(s, js_unmarshalStreamConfig(json, NULL, &sc));
+        testCond((s == NATS_OK) && (sc != NULL));
+        js_destroyStreamConfig(sc);
+        sc = NULL;
+        nats_JSONDestroy(json);
+        json = NULL;
+    }
+
+    test("Stream config with all required: ");
+    snprintf(tmp, sizeof(tmp), "{\"name\":\"TEST\",\"retention\":\"workqueue\","\
+        "\"max_consumers\":5,\"max_msgs\":10,\"max_bytes\":1000,\"max_msgs_per_subject\":1,\"max_age\":20000000,"\
+        "\"discard\":\"new\",\"storage\":\"memory\",\"num_replicas\":3}");
+    s = nats_JSONParse(&json, tmp, (int) strlen(tmp));
+    IFOK(s, js_unmarshalStreamConfig(json, NULL, &sc));
+    testCond((s == NATS_OK) && (sc != NULL)
+                && (strcmp(sc->Name, "TEST") == 0)
+                && (sc->Retention == js_WorkQueuePolicy)
+                && (sc->MaxConsumers == 5)
+                && (sc->MaxMsgs == 10)
+                && (sc->MaxBytes == 1000)
+                && (sc->MaxAge == 20000000)
+                && (sc->MaxMsgsPerSubject == 1)
+                && (sc->Discard == js_DiscardNew)
+                && (sc->Storage == js_MemoryStorage)
+                && (sc->Replicas == 3));
+    js_destroyStreamConfig(sc);
+    sc = NULL;
+    nats_JSONDestroy(json);
+    json = NULL;
+
+    test("Stream config with all: ");
+    if (snprintf(tmp, sizeof(tmp), "{\"name\":\"TEST\",\"description\":\"this is my stream\",\"subjects\":[\"foo\",\"bar\"],"\
+        "\"retention\":\"workqueue\",\"max_consumers\":5,\"max_msgs\":10,\"max_bytes\":1000,"\
+        "\"max_age\":20000000,\"max_msg_size\":1024,\"max_msgs_per_subject\":1,\"discard\":\"new\",\"storage\":\"memory\","\
+        "\"num_replicas\":3,\"no_ack\":true,\"template_owner\":\"owner\","\
+        "\"duplicate_window\":100000000000,\"placement\":{\"cluster\":\"cluster\",\"tags\":[\"tag1\",\"tag2\"]},"\
+        "\"mirror\":{\"name\":\"TEST2\",\"opt_start_seq\":10,\"filter_subject\":\"foo\",\"external\":{\"api\":\"my_prefix\",\"deliver\":\"deliver_prefix\"}},"\
+        "\"sources\":[{\"name\":\"TEST3\",\"opt_start_seq\":20,\"filter_subject\":\"bar\",\"external\":{\"api\":\"my_prefix2\",\"deliver\":\"deliver_prefix2\"}}],"\
+        "\"sealed\":true,\"deny_delete\":true,\"deny_purge\":true,\"allow_rollup_hdrs\":true,\"republish\":{\"src\":\"foo\",\"dest\":\"bar\"},"\
+        "\"allow_direct\":true,\"mirror_direct\":true}") >= (int) sizeof(tmp))
+    {
+        abort();
+    }
+    s = nats_JSONParse(&json, tmp, (int) strlen(tmp));
+    IFOK(s, js_unmarshalStreamConfig(json, NULL, &sc));
+    testCond((s == NATS_OK) && (sc != NULL)
+                && (sc->Name != NULL)
+                && (strcmp(sc->Name, "TEST") == 0)
+                && (sc->Description != NULL)
+                && (strcmp(sc->Description, "this is my stream") == 0)
+                && (sc->Subjects != NULL)
+                && (sc->SubjectsLen == 2)
+                && (strcmp(sc->Subjects[0], "foo") == 0)
+                && (strcmp(sc->Subjects[1], "bar") == 0)
+                && (sc->MaxMsgsPerSubject == 1)
+                && (sc->MaxMsgSize == 1024)
+                && (sc->NoAck)
+                && (strcmp(sc->Template, "owner") == 0)
+                && (sc->Duplicates == 100000000000)
+                && (sc->Placement != NULL)
+                && (strcmp(sc->Placement->Cluster, "cluster") == 0)
+                && (sc->Placement->TagsLen == 2)
+                && (strcmp(sc->Placement->Tags[0], "tag1") == 0)
+                && (strcmp(sc->Placement->Tags[1], "tag2") == 0)
+                && (sc->Mirror != NULL)
+                && (strcmp(sc->Mirror->Name, "TEST2") == 0)
+                && (sc->Mirror->OptStartSeq == 10)
+                && (strcmp(sc->Mirror->FilterSubject, "foo") == 0)
+                && (sc->Mirror->External != NULL)
+                && (strcmp(sc->Mirror->External->APIPrefix, "my_prefix") == 0)
+                && (strcmp(sc->Mirror->External->DeliverPrefix, "deliver_prefix") == 0)
+                && (sc->SourcesLen == 1)
+                && (strcmp(sc->Sources[0]->Name, "TEST3") == 0)
+                && (sc->Sources[0]->OptStartSeq == 20)
+                && (strcmp(sc->Sources[0]->FilterSubject, "bar") == 0)
+                && (sc->Sources[0]->External != NULL)
+                && (strcmp(sc->Sources[0]->External->APIPrefix, "my_prefix2") == 0)
+                && (strcmp(sc->Sources[0]->External->DeliverPrefix, "deliver_prefix2") == 0)
+                && sc->Sealed && sc->DenyDelete && sc->DenyPurge && sc->AllowRollup
+                && ((sc->RePublish != NULL)
+                    && (sc->RePublish->Source != NULL)
+                    && (strcmp(sc->RePublish->Source, "foo") == 0)
+                    && (sc->RePublish->Destination != NULL)
+                    && (strcmp(sc->RePublish->Destination, "bar") == 0))
+                && sc->AllowDirect && sc->MirrorDirect);
+    js_destroyStreamConfig(sc);
+    sc = NULL;
+    nats_JSONDestroy(json);
+    json = NULL;
+}
+
+static void
+test_JetStreamUnmarshalStreamInfo(void)
+{
+    natsStatus          s;
+    nats_JSON           *json = NULL;
+    jsStreamInfo        *si   = NULL;
+    const char          *good[] = {
+        "{\"cluster\":{\"name\":\"S1\",\"leader\":\"S2\"}}",
+        "{\"cluster\":{\"name\":\"S1\",\"leader\":\"S2\",\"replicas\":[{\"name\":\"S1\",\"current\":true,\"offline\":false,\"active\":123,\"lag\":456},{\"name\":\"S1\",\"current\":false,\"offline\":true,\"active\":123,\"lag\":456}]}}",
+        "{\"mirror\":{\"name\":\"M\",\"lag\":123,\"active\":456}}",
+        "{\"mirror\":{\"name\":\"M\",\"external\":{\"api\":\"MyApi\",\"deliver\":\"deliver.prefix\"},\"lag\":123,\"active\":456}}",
+        "{\"sources\":[{\"name\":\"S1\",\"lag\":123,\"active\":456},{\"name\":\"S2\",\"lag\":123,\"active\":456}]}",
+        "{\"sources\":[{\"name\":\"S1\",\"external\":{\"api\":\"MyApi\",\"deliver\":\"deliver.prefix\"},\"lag\":123,\"active\":456},{\"name\":\"S2\",\"lag\":123,\"active\":456}]}",
+    };
+    const char          *bad[] = {
+        "{\"config\":123}",
+        "{\"config\":{\"retention\":\"bad_policy\"}}",
+        "{\"config\":{\"discard\":\"bad_policy\"}}",
+        "{\"config\":{\"storage\":\"bad_policy\"}}",
+        "{\"config\":{\"placement\":{\"cluster\":123}}}",
+        "{\"config\":{\"placement\":{\"tags\":123}}}",
+        "{\"config\":{\"mirror\":{\"name\":123}}}",
+        "{\"config\":{\"mirror\":{\"opt_start_seq\":\"abc\"}}}",
+        "{\"config\":{\"mirror\":{\"opt_start_time\":123}}}",
+        "{\"config\":{\"mirror\":{\"filter_subject\":123}}}",
+        "{\"config\":{\"mirror\":{\"external\":123}}}",
+        "{\"config\":{\"mirror\":{\"external\":{\"api\":123}}}}",
+        "{\"config\":{\"mirror\":{\"external\":{\"deliver\":123}}}}",
+        "{\"state\":123}",
+        "{\"state\":{\"messages\":\"abc\"}}",
+        "{\"state\":{\"bytes\":\"abc\"}}",
+        "{\"state\":{\"first_seq\":\"abc\"}}",
+        "{\"state\":{\"first_ts\":\"abc\"}}",
+        "{\"state\":{\"last_seq\":\"abc\"}}",
+        "{\"state\":{\"last_ts\":\"abc\"}}",
+        "{\"state\":{\"num_deleted\":\"abc\"}}",
+        "{\"state\":{\"deleted\":\"abc\"}}",
+        "{\"state\":{\"deleted\":[\"abc\",\"def\"]}}",
+        "{\"state\":{\"lost\":\"abc\"}}",
+        "{\"state\":{\"lost\":{\"msgs\":\"abc\"}}}",
+        "{\"state\":{\"lost\":{\"msgs\":[\"abc\",\"def\"]}}}",
+        "{\"state\":{\"lost\":{\"bytes\":\"abc\"}}}",
+        "{\"state\":{\"consumer_count\":\"abc\"}}",
+        "{\"state\":{\"num_subjects\":\"abc\"}}",
+        "{\"state\":{\"subjects\":\"abc\"}}",
+        "{\"state\":{\"subjects\":{\"abc\"}}}",
+        "{\"state\":{\"subjects\":{\"abc\":1,\"def\":\"ghi\"}}}",
+        "{\"cluster\":123}",
+        "{\"cluster\":{\"name\":123}}",
+        "{\"cluster\":{\"name\":\"S1\",\"leader\":123}}",
+        "{\"cluster\":{\"name\":\"S1\",\"leader\":\"S2\",\"replicas\":123}}",
+        "{\"cluster\":{\"name\":\"S1\",\"leader\":\"S2\",\"replicas\":[{\"name\":123}]}}",
+        "{\"mirror\":123}",
+        "{\"mirror\":{\"name\":123}}",
+        "{\"mirror\":{\"name\":\"S1\",\"external\":123}}",
+        "{\"mirror\":{\"name\":\"S1\",\"external\":{\"api\":123}}}",
+        "{\"sources\":123}",
+        "{\"sources\":[{\"name\":123}]}",
+        "{\"sources\":[{\"name\":\"S1\",\"external\":123}]}",
+        "{\"sources\":[{\"name\":\"S1\",\"external\":{\"deliver\":123}}]}",
+    };
+    int i;
+    char tmp[64];
+
+    for (i=0; i<(int)(sizeof(good)/sizeof(char*)); i++)
+    {
+        snprintf(tmp, sizeof(tmp), "Positive case %d: ", i+1);
+        test(tmp);
+        s = nats_JSONParse(&json, good[i], (int) strlen(good[i]));
+        IFOK(s, js_unmarshalStreamInfo(json, &si));
+        testCond((s == NATS_OK) && (si != NULL));
+        jsStreamInfo_Destroy(si);
+        si = NULL;
+        nats_JSONDestroy(json);
+        json = NULL;
+    }
+
+    for (i=0; i<(int)(sizeof(bad)/sizeof(char*)); i++)
+    {
+        snprintf(tmp, sizeof(tmp), "Negative case %d: ", i+1);
+        test(tmp);
+        s = nats_JSONParse(&json, bad[i], (int) strlen(bad[i]));
+        IFOK(s, js_unmarshalStreamInfo(json, &si));
+        testCond((s != NATS_OK) && (si == NULL));
+        nats_JSONDestroy(json);
+        json = NULL;
+        nats_clearLastError();
+    }
+}
+
+static void
+test_JetStreamMarshalStreamConfig(void)
+{
+    natsStatus          s;
+    jsStreamConfig      sc;
+    jsPlacement         p;
+    jsStreamSource      m;
+    jsExternalStream    esm;
+    jsStreamSource      s1;
+    jsExternalStream    esmS1;
+    jsStreamSource      s2;
+    jsExternalStream    esmS2;
+    natsBuffer          *buf           = NULL;
+    nats_JSON           *json          = NULL;
+    jsStreamConfig      *rsc           = NULL;
+    int64_t             optStartTime   = 1624583232123456000;
+    jsRePublish         rp;
+
+    test("init bad args: ");
+    s = jsStreamConfig_Init(NULL);
+    if (s == NATS_INVALID_ARG)
+        s = jsPlacement_Init(NULL);
+    if (s == NATS_INVALID_ARG)
+        s = jsStreamSource_Init(NULL);
+    if (s == NATS_INVALID_ARG)
+        s = jsExternalStream_Init(NULL);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    jsStreamConfig_Init(&sc);
+    sc.Name = "MyStream";
+    sc.Description = "this is my stream";
+    sc.Subjects = (const char*[2]){"foo", "bar"};
+    sc.SubjectsLen = 2;
+    sc.Retention = js_InterestPolicy;
+    sc.MaxConsumers = 1;
+    sc.MaxMsgs = 2;
+    sc.MaxBytes = 3;
+    sc.MaxAge = 4;
+    sc.MaxMsgSize = 5;
+    sc.Duplicates = 6;
+    sc.MaxMsgsPerSubject = 1;
+    sc.Discard = js_DiscardNew;
+    sc.Storage = js_MemoryStorage;
+    sc.Replicas = 3;
+    sc.NoAck = true;
+    sc.Template = "template";
+
+    jsPlacement_Init(&p);
+    p.Cluster = "MyCluster";
+    p.Tags = (const char*[2]){"tag1", "tag2"};
+    p.TagsLen = 2;
+    sc.Placement = &p;
+
+    jsStreamSource_Init(&m);
+    m.Name = "AStream";
+    m.OptStartSeq = 100;
+    m.OptStartTime = optStartTime;
+    m.FilterSubject = "foo";
+    jsExternalStream_Init(&esm);
+    esm.APIPrefix = "mirror.prefix";
+    esm.DeliverPrefix = "deliver.prefix";
+    m.External = &esm;
+    sc.Mirror = &m;
+
+    jsStreamSource_Init(&s1);
+    s1.Name = "StreamOne";
+    s1.OptStartSeq = 10;
+    s1.FilterSubject = "stream.one";
+    jsExternalStream_Init(&esmS1);
+    esmS1.APIPrefix = "source1.prefix";
+    esmS1.DeliverPrefix = "source1.deliver.prefix";
+    s1.External = &esmS1;
+
+    jsStreamSource_Init(&s2);
+    s2.Name = "StreamTwo";
+    s2.OptStartSeq = 20;
+    s2.FilterSubject = "stream.two";
+    jsExternalStream_Init(&esmS2);
+    esmS2.APIPrefix = "source2.prefix";
+    esmS2.DeliverPrefix = "source2.deliver.prefix";
+    s2.External = &esmS2;
+
+    sc.Sources = (jsStreamSource *[2]){&s1, &s2};
+    sc.SourcesLen = 2;
+
+    // Seal, deny purge, etc..
+    sc.Sealed = true;
+    sc.DenyDelete = true;
+    sc.DenyPurge = true;
+    sc.AllowRollup = true;
+    sc.AllowDirect = true;
+    sc.MirrorDirect = true;
+    sc.DiscardNewPerSubject = true;
+
+    test("RePublish init err: ");
+    s = jsRePublish_Init(NULL);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+    s = NATS_OK;
+
+    // Republish
+    jsRePublish_Init(&rp);
+    rp.Source = ">";
+    rp.Destination = "RP.>";
+    rp.HeadersOnly = true;
+    sc.RePublish = &rp;
+
+    test("Marshal stream config: ");
+    s = js_marshalStreamConfig(&buf, &sc);
+    testCond((s == NATS_OK) && (buf != NULL) && (natsBuf_Len(buf) > 0));
+
+    test("Verify with unmarshal: ");
+    s = nats_JSONParse(&json, natsBuf_Data(buf), natsBuf_Len(buf));
+    IFOK(s, js_unmarshalStreamConfig(json, NULL, &rsc));
+    testCond((s == NATS_OK) && (rsc != NULL)
+                && (rsc->Name != NULL)
+                && (strcmp(rsc->Name, "MyStream") == 0)
+                && (rsc->Description != NULL)
+                && (strcmp(rsc->Description, "this is my stream") == 0)
+                && (rsc->SubjectsLen == 2)
+                && (rsc->Subjects != NULL)
+                && (strcmp(rsc->Subjects[0], "foo") == 0)
+                && (strcmp(rsc->Subjects[1], "bar") == 0)
+                && (rsc->Retention == js_InterestPolicy)
+                && (rsc->MaxConsumers == 1)
+                && (rsc->MaxMsgs == 2)
+                && (rsc->MaxBytes == 3)
+                && (rsc->MaxAge == 4)
+                && (rsc->MaxMsgSize == 5)
+                && (rsc->MaxMsgsPerSubject == 1)
+                && (rsc->Duplicates == 6)
+                && (rsc->Discard == js_DiscardNew)
+                && (rsc->Storage == js_MemoryStorage)
+                && (rsc->Replicas == 3)
+                && rsc->NoAck
+                && (strcmp(rsc->Template, "template") == 0)
+                && (rsc->Placement != NULL)
+                && (strcmp(rsc->Placement->Cluster, "MyCluster") == 0)
+                && (rsc->Placement->TagsLen == 2)
+                && (rsc->Placement->Tags != NULL)
+                && (strcmp(rsc->Placement->Tags[0], "tag1") == 0)
+                && (strcmp(rsc->Placement->Tags[1], "tag2") == 0)
+                && (rsc->Mirror != NULL)
+                && (strcmp(rsc->Mirror->Name, "AStream") == 0)
+                && (rsc->Mirror->OptStartSeq == 100)
+                && (rsc->Mirror->OptStartTime == optStartTime)
+                && (strcmp(rsc->Mirror->FilterSubject, "foo") == 0)
+                && (rsc->Mirror->External != NULL)
+                && (strcmp(rsc->Mirror->External->APIPrefix, "mirror.prefix") == 0)
+                && (strcmp(rsc->Mirror->External->DeliverPrefix, "deliver.prefix") == 0)
+                && (rsc->SourcesLen == 2)
+                && (rsc->Sources != NULL)
+                && (strcmp(rsc->Sources[0]->Name, "StreamOne") == 0)
+                && (rsc->Sources[0]->OptStartSeq == 10)
+                && (strcmp(rsc->Sources[0]->FilterSubject, "stream.one") == 0)
+                && (rsc->Sources[0]->External != NULL)
+                && (strcmp(rsc->Sources[0]->External->APIPrefix, "source1.prefix") == 0)
+                && (strcmp(rsc->Sources[0]->External->DeliverPrefix, "source1.deliver.prefix") == 0)
+                && (strcmp(rsc->Sources[1]->Name, "StreamTwo") == 0)
+                && (rsc->Sources[1]->OptStartSeq == 20)
+                && (strcmp(rsc->Sources[1]->FilterSubject, "stream.two") == 0)
+                && (rsc->Sources[1]->External != NULL)
+                && (strcmp(rsc->Sources[1]->External->APIPrefix, "source2.prefix") == 0)
+                && (strcmp(rsc->Sources[1]->External->DeliverPrefix, "source2.deliver.prefix") == 0)
+                && rsc->Sealed
+                && rsc->DenyDelete
+                && rsc->DenyPurge
+                && rsc->AllowRollup
+                && (rsc->RePublish != NULL)
+                && (rsc->RePublish->Source != NULL)
+                && (strcmp(rsc->RePublish->Source, ">") == 0)
+                && (rsc->RePublish->Destination != NULL)
+                && (strcmp(rsc->RePublish->Destination, "RP.>") == 0)
+                && rsc->RePublish->HeadersOnly
+                && rsc->AllowDirect
+                && rsc->MirrorDirect
+                && rsc->DiscardNewPerSubject);
+    js_destroyStreamConfig(rsc);
+    rsc = NULL;
+    // Check that this does not crash
+    js_destroyStreamConfig(NULL);
+    natsBuf_Destroy(buf);
+    buf = NULL;
+    nats_JSONDestroy(json);
+    json = NULL;
+
+    test("WorkQueue policy: ");
+    jsStreamConfig_Init(&sc);
+    sc.Name = "TEST";
+    sc.Retention = js_WorkQueuePolicy;
+    s = js_marshalStreamConfig(&buf, &sc);
+    testCond((s == NATS_OK) && (buf != NULL) && (natsBuf_Len(buf) > 0));
+
+    test("Verify with unmarshal: ");
+    s = nats_JSONParse(&json, natsBuf_Data(buf), natsBuf_Len(buf));
+    IFOK(s, js_unmarshalStreamConfig(json, NULL, &rsc));
+    testCond((s == NATS_OK) && (rsc != NULL) && (rsc->Retention == js_WorkQueuePolicy));
+    js_destroyStreamConfig(rsc);
+    rsc = NULL;
+    natsBuf_Destroy(buf);
+    buf = NULL;
+    nats_JSONDestroy(json);
+    json = NULL;
+
+    test("Bad retention: ");
+    jsStreamConfig_Init(&sc);
+    sc.Name = "TEST";
+    sc.Retention = (jsRetentionPolicy) 100;
+    s = js_marshalStreamConfig(&buf, &sc);
+    testCond((s == NATS_INVALID_ARG) && (buf == NULL));
+
+    test("Bad discard: ");
+    jsStreamConfig_Init(&sc);
+    sc.Name = "TEST";
+    sc.Discard = (jsDiscardPolicy) 100;
+    s = js_marshalStreamConfig(&buf, &sc);
+    testCond((s == NATS_INVALID_ARG) && (buf == NULL));
+
+    test("Bad storage: ");
+    jsStreamConfig_Init(&sc);
+    sc.Name = "TEST";
+    sc.Storage = (jsStorageType) 100;
+    s = js_marshalStreamConfig(&buf, &sc);
+    testCond((s == NATS_INVALID_ARG) && (buf == NULL));
+}
+
+static void
+test_JetStreamUnmarshalConsumerInfo(void)
+{
+    natsStatus          s;
+    jsConsumerInfo      *ci     = NULL;
+    nats_JSON           *json   = NULL;
+    const char          *good[] = {
+        "{\"stream_name\":\"TEST\"}",
+        "{\"name\":\"abc\"}",
+        "{\"created\":\"2021-06-23T18:22:00.123456789Z\"}",
+        "{\"delivered\":{\"consumer_seq\":1,\"stream_seq\":1,\"last_active\":\"2021-08-21T11:49:00.123456789Z\"}}",
+        "{\"ack_floor\":{\"consumer_seq\":1,\"stream_seq\":1,\"last_active\":\"2021-08-21T11:49:00.123456789Z\"}}",
+        "{\"num_ack_pending\":1}",
+        "{\"num_redelivered\":1}",
+        "{\"num_waiting\":1}",
+        "{\"num_pending\":1}",
+        "{\"push_bound\":true}",
+        "{\"config\":{\"deliver_policy\":\"" jsDeliverAllStr "\"}}",
+        "{\"config\":{\"deliver_policy\":\"" jsDeliverLastStr "\"}}",
+        "{\"config\":{\"deliver_policy\":\"" jsDeliverNewStr "\"}}",
+        "{\"config\":{\"deliver_policy\":\"" jsDeliverBySeqStr "\"}}",
+        "{\"config\":{\"deliver_policy\":\"" jsDeliverByTimeStr "\"}}",
+        "{\"config\":{\"deliver_policy\":\"" jsDeliverLastPerSubjectStr "\"}}",
+        "{\"config\":{\"ack_policy\":\"" jsAckNoneStr "\"}}",
+        "{\"config\":{\"ack_policy\":\"" jsAckAllStr "\"}}",
+        "{\"config\":{\"ack_policy\":\"" jsAckExplictStr "\"}}",
+        "{\"config\":{\"replay_policy\":\"" jsReplayInstantStr "\"}}",
+        "{\"config\":{\"replay_policy\":\"" jsReplayOriginalStr "\"}}",
+        "{\"config\":{\"deliver_group\":\"queue_name\"}}",
+        "{\"config\":{\"headers_only\":true}}",
+        "{\"config\":{\"max_batch\":1}}",
+        "{\"config\":{\"max_expires\":123456789}}",
+        "{\"config\":{\"max_bytes\":1024}}",
+        "{\"config\":{\"inactive_threshold\":123456789}}",
+        "{\"config\":{\"backoff\":[50000000,250000000]}}",
+        "{\"config\":{\"num_replicas\":1}}",
+        "{\"config\":{\"mem_storage\":true}}",
+        "{\"config\":{\"name\":\"my_name\"}}",
+    };
+    const char          *bad[] = {
+        "{\"stream_name\":123}",
+        "{\"name\":123}",
+        "{\"created\":123}",
+        "{\"config\":123}",
+        "{\"config\":{\"durable_name\":123}}",
+        "{\"config\":{\"description\":123}}",
+        "{\"config\":{\"deliver_subject\":123}}",
+        "{\"config\":{\"deliver_policy\":\"bad_policy\"}}",
+        "{\"config\":{\"opt_start_seq\":\"abc\"}}",
+        "{\"config\":{\"opt_start_time\":123}}",
+        "{\"config\":{\"ack_policy\":\"bad_policy\"}}",
+        "{\"config\":{\"ack_wait\":\"abc\"}}",
+        "{\"config\":{\"max_deliver\":\"abc\"}}",
+        "{\"config\":{\"filter_subject\":123}}",
+        "{\"config\":{\"replay_policy\":\"bad_policy\"}}",
+        "{\"config\":{\"rate_limit_bps\":\"abc\"}}",
+        "{\"config\":{\"sample_freq\":123}}",
+        "{\"config\":{\"max_waiting\":\"abc\"}}",
+        "{\"config\":{\"max_ack_pending\":\"abc\"}}",
+        "{\"config\":{\"flow_control\":\"abc\"}}",
+        "{\"config\":{\"idle_heartbeat\":\"abc\"}}",
+        "{\"config\":{\"deliver_group\":123}}",
+        "{\"config\":{\"headers_only\":123}}",
+        "{\"config\":{\"max_batch\":\"1\"}}",
+        "{\"config\":{\"max_expires\":\"123456789\"}}",
+        "{\"config\":{\"max_bytes\":\"123456789\"}}",
+        "{\"config\":{\"inactive_threshold\":\"123456789\"}}",
+        "{\"config\":{\"backoff\":true}}",
+        "{\"config\":{\"max_batch\":\"abc\"}}",
+        "{\"config\":{\"max_expires\":false}}",
+        "{\"config\":{\"max_bytes\":false}}",
+        "{\"config\":{\"mem_storage\":\"abc\"}}",
+        "{\"delivered\":123}",
+        "{\"delivered\":{\"consumer_seq\":\"abc\"}}",
+        "{\"delivered\":{\"stream_seq\":\"abc\"}}",
+        "{\"delivered\":{\"last_active\":123}}",
+        "{\"ack_floor\":123}",
+        "{\"ack_floor\":{\"consumer_seq\":\"abc\"}}",
+        "{\"ack_floor\":{\"stream_seq\":\"abc\"}}",
+        "{\"ack_floor\":{\"last_active\":123}}",
+        "{\"num_ack_pending\":\"abc\"}",
+        "{\"num_redelivered\":\"abc\"}",
+        "{\"num_waiting\":\"abc\"}",
+        "{\"num_pending\":\"abc\"}",
+        "{\"cluster\":123}",
+        "{\"cluster\":{\"name\":123}}",
+        "{\"push_bound\":123}",
+    };
+    int i;
+    char tmp[64];
+
+    for (i=0; i<(int)(sizeof(good)/sizeof(char*)); i++)
+    {
+        snprintf(tmp, sizeof(tmp), "Positive case %d: ", i+1);
+        test(tmp);
+        s = nats_JSONParse(&json, good[i], (int) strlen(good[i]));
+        IFOK(s, js_unmarshalConsumerInfo(json, &ci));
+        testCond((s == NATS_OK) && (ci != NULL));
+        jsConsumerInfo_Destroy(ci);
+        ci = NULL;
+        nats_JSONDestroy(json);
+        json = NULL;
+    }
+
+    for (i=0; i<(int)(sizeof(bad)/sizeof(char*)); i++)
+    {
+        snprintf(tmp, sizeof(tmp), "Negative case %d: ", i+1);
+        test(tmp);
+        s = nats_JSONParse(&json, bad[i], (int) strlen(bad[i]));
+        IFOK(s, js_unmarshalConsumerInfo(json, &ci));
+        testCond((s != NATS_OK) && (ci == NULL));
+        nats_JSONDestroy(json);
+        json = NULL;
+        nats_clearLastError();
+    }
+}
+
+static void
+testRespParsing(void)
+{
+    natsStatus          s;
+    nats_JSON           *json = NULL;
+    natsMsg             *msg  = NULL;
+    const char          *bad[] = {
+        "not a JSON",
+        "{\"error\":123}",
+        "{\"error\":{\"code\":\"abc\"}}",
+        "{\"error\":{\"err_code\":\"abc\"}}",
+        "{\"error\":{\"description\":123}}",
+    };
+    const char          *good[] = {
+        "{\"not_an_error\":123}",
+        "{\"error\":{\"code\":100}}",
+        "{\"error\":{\"code\":404,\"description\":\"not found\"}}",
+        "{\"error\":{\"code\":404,\"err_code\":10014,\"description\":\"not found\"}}",
+    };
+    struct _good {
+        bool        isErr;
+        int         code;
+        uint16_t    err_code;
+        const char  *desc;
+    };
+    const struct _good  goodRes[] = {
+        { false, 0, 0, NULL },
+        { true, 100, 0, NULL },
+        { true, 404, 0, "not found" },
+        { true, 404, JSConsumerNotFoundErr, "not found" },
+    };
+    char                tmp[64];
+    int                 i;
+    jsApiResponse       ar;
+
+    for (i=0; i<(int)(sizeof(bad)/sizeof(char*)); i++)
+    {
+        snprintf(tmp, sizeof(tmp), "Negative test %d: ", i+1);
+        test(tmp);
+        s = natsMsg_Create(&msg, "foo", NULL, bad[i], (int)strlen(bad[i]));
+        IFOK(s, js_unmarshalResponse(&ar, &json, msg));
+        testCond((s != NATS_OK) && (json == NULL));
+        natsMsg_Destroy(msg);
+        msg = NULL;
+        js_freeApiRespContent(&ar);
+    }
+    for (i=0; i<(int)(sizeof(good)/sizeof(char*)); i++)
+    {
+        snprintf(tmp, sizeof(tmp), "Positive test %d: ", i+1);
+        test(tmp);
+        s = natsMsg_Create(&msg, "foo", NULL, good[i], (int)strlen(good[i]));
+        IFOK(s, js_unmarshalResponse(&ar, &json, msg));
+        if (s == NATS_OK)
+        {
+            if (!goodRes[i].isErr)
+            {
+                if (js_apiResponseIsErr(&ar) || (ar.Error.Code != 0)
+                    || (ar.Error.ErrCode != 0)
+                    || !nats_IsStringEmpty(ar.Error.Description))
+                {
+                    s = NATS_ERR;
+                }
+            }
+            else
+            {
+                if ((goodRes[i].code != ar.Error.Code)
+                    || (goodRes[i].err_code != ar.Error.ErrCode)
+                    || ((goodRes[i].desc == NULL) && !nats_IsStringEmpty(ar.Error.Description))
+                    || ((goodRes[i].desc != NULL) && nats_IsStringEmpty(ar.Error.Description))
+                    || ((goodRes[i].desc != NULL) && strcmp(goodRes[i].desc, ar.Error.Description) != 0))
+                {
+                    s = NATS_ERR;
+                }
+            }
+        }
+        testCond((s == NATS_OK) && (json != NULL));
+        natsMsg_Destroy(msg);
+        msg = NULL;
+        nats_JSONDestroy(json);
+        json = NULL;
+        js_freeApiRespContent(&ar);
+    }
+    // Check that this is ok
+    js_freeApiRespContent(NULL);
+}
+
+#define ENSURE_JS_VERSION(major, minor, update) \
+if (!serverVersionAtLeast((major), (minor), (update))) \
+{ \
+    char txt[200]; \
+    snprintf(txt, sizeof(txt), "Skipping since requires server version of at least %d.%d.%d, got %s: ", \
+             (major), (minor), (update), serverVersion); \
+    test(txt); \
+    testCond(true); \
+    return; \
+}
+
+#define JS_SETUP(major, minor, update) \
+natsConnection  *nc = NULL; \
+jsCtx           *js = NULL; \
+natsPid         pid = NATS_INVALID_PID;  \
+char            datastore[256] = {'\0'}; \
+char            cmdLine[1024] = {'\0'};  \
+\
+ENSURE_JS_VERSION((major), (minor), (update)); \
+\
+_makeUniqueDir(datastore, sizeof(datastore), "datastore_"); \
+test("Start JS Server: ");                                  \
+snprintf(cmdLine, sizeof(cmdLine), "-js -sd %s", datastore);\
+pid = _startServer("nats://127.0.0.1:4222", cmdLine, true); \
+CHECK_SERVER_STARTED(pid);                                  \
+testCond(true);                                             \
+\
+test("Connect: ");                                      \
+s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);    \
+testCond(s == NATS_OK);                                 \
+\
+test("Get context: ");                          \
+s = natsConnection_JetStream(&js, nc, NULL);    \
+testCond(s == NATS_OK);
+
+#define JS_TEARDOWN \
+jsCtx_Destroy(js);          \
+natsConnection_Destroy(nc); \
+_stopServer(pid);           \
+rmtree(datastore);
+
+static void
+test_JetStreamContext(void)
+{
+    natsStatus          s;
+    natsConnection      *nc = NULL;
+    jsCtx               *js = NULL;
+    natsPid             pid = NATS_INVALID_PID;
+    jsOptions           o;
+    jsAccountInfo       *ai = NULL;
+    jsErrCode           jerr = 0;
+    char                datastore[256] = {'\0'};
+    char                cmdLine[1024] = {'\0'};
+    char                confFile[256] = {'\0'};
+
+    ENSURE_JS_VERSION(2, 3, 3);
+
+    test("Check response parsing:\n");
+    testRespParsing();
+    testCond(true);
+
+    _makeUniqueDir(datastore, sizeof(datastore), "datastore_");
+
+    pid = _startServer("nats://127.0.0.1:4222", "", true);
+    CHECK_SERVER_STARTED(pid);
+
+    test("Connect: ");
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    testCond(s == NATS_OK);
+
+    test("Check JS context invalid args: ")
+    s = natsConnection_JetStream(NULL, nc, NULL);
+    if (s == NATS_INVALID_ARG)
+        s = natsConnection_JetStream(&js, NULL, NULL);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Init options (bad args): ");
+    s = jsOptions_Init(NULL);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Check JS context with negative wait: ")
+    jsOptions_Init(&o);
+    o.Wait = -10;
+    s = natsConnection_JetStream(&js, nc, &o);
+    testCond((s == NATS_INVALID_ARG)
+                && (strstr(nats_GetLastError(NULL), "negative") != NULL));
+    o.Wait = 0;
+    nats_clearLastError();
+
+    test("Get context: ");
+    s = natsConnection_JetStream(&js, nc, NULL);
+    testCond(s == NATS_OK);
+
+    test("Get account info (bad args): ");
+    s = js_GetAccountInfo(NULL, js, NULL, NULL);
+        s = js_GetAccountInfo(&ai, NULL, NULL, NULL);
+    testCond((s == NATS_INVALID_ARG) && (ai == NULL));
+    nats_clearLastError();
+
+    test("Get account fail: ");
+    s = js_GetAccountInfo(&ai, js, NULL, &jerr);
+    testCond((s == NATS_NO_RESPONDERS) && (ai == NULL) && (jerr == JSNotEnabledErr));
+    nats_clearLastError();
+    jerr = 0;
+
+    jsCtx_Destroy(js);
+    js = NULL;
+    // Check this is ok
+    jsCtx_Destroy(NULL);
+    natsConnection_Destroy(nc);
+    nc = NULL;
+
+    // Restart the server with JS enabled
+    _stopServer(pid);
+    pid = NATS_INVALID_PID;
+    test("Start JS server: ");
+    snprintf(cmdLine, sizeof(cmdLine), "-js -sd %s", datastore);
+    pid = _startServer("nats://127.0.0.1:4222", cmdLine, true);
+    CHECK_SERVER_STARTED(pid);
+    testCond(true);
+
+    test("Connect: ");
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    testCond(s == NATS_OK);
+
+    test("Get context set unknown prefix: ");
+    o.Prefix = "MyPrefix";
+    s = natsConnection_JetStream(&js, nc, &o);
+    testCond(s == NATS_OK);
+
+    test("Get account info with unknown prefix: ");
+    s = js_GetAccountInfo(&ai, js, NULL, &jerr);
+    testCond((s == NATS_NO_RESPONDERS) && (ai == NULL) && (jerr == JSNotEnabledErr));
+    nats_clearLastError();
+    jerr = 0;
+
+    test("Get account info override prefix: ");
+    o.Prefix = jsDefaultAPIPrefix;
+    s = js_GetAccountInfo(&ai, js, &o, &jerr);
+    testCond((s == NATS_OK)
+                && (jerr == 0)
+                && (ai != NULL)
+                && (ai->Limits.MaxMemory == -1)
+                && (ai->Limits.MaxStore == -1));
+    jsAccountInfo_Destroy(ai);
+    ai = NULL;
+
+    test("Prefix with trailing '.' works: ");
+    o.Prefix = "$JS.API.";
+    s = js_GetAccountInfo(&ai, js, &o, &jerr);
+    testCond((s == NATS_OK)
+                && (jerr == 0)
+                && (ai != NULL)
+                && (ai->Limits.MaxMemory == -1)
+                && (ai->Limits.MaxStore == -1));
+    jsAccountInfo_Destroy(ai);
+    ai = NULL;
+
+    jsCtx_Destroy(js);
+    js = NULL;
+
+    test("Create context with prefix with traling '.': ");
+    s = natsConnection_JetStream(&js, nc, &o);
+    IFOK(s, js_GetAccountInfo(&ai, js, NULL, &jerr));
+    testCond((s == NATS_OK)
+                && (jerr == 0)
+                && (js != NULL)
+                // Verify we don't touch the provided prefix
+                && (strcmp(o.Prefix, "$JS.API.") == 0)
+                && (ai != NULL)
+                && (ai->Limits.MaxMemory == -1)
+                && (ai->Limits.MaxStore == -1));
+    jsAccountInfo_Destroy(ai);
+    ai = NULL;
+    // Check this does not crash
+    jsAccountInfo_Destroy(NULL);
+    jsCtx_Destroy(js);
+    js = NULL;
+    natsConnection_Destroy(nc);
+    nc = NULL;
+    _stopServer(pid);
+    pid = NATS_INVALID_PID;
+
+    _createConfFile(confFile, sizeof(confFile),
+        " accounts { "\
+        "   NOJS { "\
+        "     users: [ "\
+        "       {user: ivan, pass: pwd} "\
+        "     ] "\
+        "   } "\
+        " }\n"
+    );
+    test("Start JS server: ");
+    snprintf(cmdLine, sizeof(cmdLine), "-js -sd %s -c %s", datastore, confFile);
+    pid = _startServer("nats://127.0.0.1:4222", cmdLine, true);
+    CHECK_SERVER_STARTED(pid);
+    testCond(true);
+
+    test("Connect: ");
+    s = natsConnection_ConnectTo(&nc, "nats://ivan:pwd@127.0.0.1:4222");
+    testCond(s == NATS_OK);
+
+    test("Get context: ");
+    s = natsConnection_JetStream(&js, nc, NULL);
+    testCond(s == NATS_OK);
+
+    test("Get account info error: ");
+    s = js_GetAccountInfo(&ai, js, NULL, &jerr);
+    testCond((s == NATS_ERR) && (ai == NULL) && (jerr == JSNotEnabledForAccountErr)
+                && (strstr(nats_GetLastError(NULL), "not enabled") != NULL));
+    nats_clearLastError();
+
+    JS_TEARDOWN;
+    remove(confFile);
+}
+
+static void
+test_JetStreamContextDomain(void)
+{
+    natsStatus          s;
+    natsConnection      *nc = NULL;
+    jsCtx               *js = NULL;
+    natsPid             pid = NATS_INVALID_PID;
+    jsOptions           o;
+    jsAccountInfo       *ai = NULL;
+    jsErrCode           jerr = 0;
+    char                datastore[256] = {'\0'};
+    char                cmdLine[1024] = {'\0'};
+    char                confFile[256] = {'\0'};
+
+    ENSURE_JS_VERSION(2, 3, 3);
+
+    _makeUniqueDir(datastore, sizeof(datastore), "datastore_");
+    _createConfFile(confFile, sizeof(confFile),
+        " jetstream: { domain: ABC }\n"
+    );
+
+    test("Start JS server: ");
+    snprintf(cmdLine, sizeof(cmdLine), "-js -sd %s -c %s", datastore, confFile);
+    pid = _startServer("nats://127.0.0.1:4222", cmdLine, true);
+    CHECK_SERVER_STARTED(pid);
+    testCond(true);
+
+    test("Connect: ");
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    testCond(s == NATS_OK);
+
+    test("Create context with domain: ");
+    jsOptions_Init(&o);
+    o.Domain = "ABC";
+    s = natsConnection_JetStream(&js, nc, &o);
+    if (s == NATS_OK)
+    {
+        js_lock(js);
+        // The option "Domain" should create the following prefix.
+        // The JS internal option should not have domain set.
+        if ((strcmp(js->opts.Prefix, "$JS.ABC.API") != 0)
+            || (js->opts.Domain != NULL))
+        {
+            s = NATS_ERR;
+        }
+        js_unlock(js);
+    }
+    testCond((s == NATS_OK) && (js != NULL));
+
+    test("Get account: ");
+    s = js_GetAccountInfo(&ai, js, NULL, &jerr);
+    testCond((s == NATS_OK)
+                && (jerr == 0)
+                && (ai != NULL)
+                && (strcmp(ai->Domain, "ABC") == 0)
+                && (ai->Limits.MaxMemory == -1)
+                && (ai->Limits.MaxStore == -1));
+    jsAccountInfo_Destroy(ai);
+    ai = NULL;
+
+    test("Get account with wrong domain override: ");
+    o.Domain = "DEF";
+    s = js_GetAccountInfo(&ai, js, &o, &jerr);
+    testCond((s == NATS_NO_RESPONDERS) && (ai == NULL) && (jerr == JSNotEnabledErr));
+    nats_clearLastError();
+    jerr = 0;
+
+    jsCtx_Destroy(js);
+    js = NULL;
+
+    test("Create context with mix prefix/domain: ");
+    jsOptions_Init(&o);
+    o.Prefix = "should.not.be.used";
+    o.Domain = "ABC";
+    s = natsConnection_JetStream(&js, nc, &o);
+    testCond((s == NATS_OK) && (js != NULL));
+
+    test("Get account: ");
+    s = js_GetAccountInfo(&ai, js, NULL, &jerr);
+    testCond((s == NATS_OK)
+                && (jerr == 0)
+                && (ai != NULL)
+                && (strcmp(ai->Domain, "ABC") == 0)
+                && (ai->Limits.MaxMemory == -1)
+                && (ai->Limits.MaxStore == -1));
+    jsAccountInfo_Destroy(ai);
+    ai = NULL;
+
+    jsCtx_Destroy(js);
+    js = NULL;
+
+    test("Create context without domain: ");
+    jsOptions_Init(&o);
+    s = natsConnection_JetStream(&js, nc, &o);
+    testCond((s == NATS_OK) && (js != NULL));
+
+    test("Get account with domain override: ");
+    o.Domain = "ABC";
+    s = js_GetAccountInfo(&ai, js, &o, &jerr);
+    testCond((s == NATS_OK)
+                && (jerr == 0)
+                && (ai != NULL)
+                && (strcmp(ai->Domain, "ABC") == 0)
+                && (ai->Limits.MaxMemory == -1)
+                && (ai->Limits.MaxStore == -1));
+    jsAccountInfo_Destroy(ai);
+    ai = NULL;
+
+    test("Get account with domain override (prefix option ignored): ");
+    o.Prefix = "should.not.be.used";
+    o.Domain = "ABC";
+    s = js_GetAccountInfo(&ai, js, &o, &jerr);
+    testCond((s == NATS_OK)
+                && (jerr == 0)
+                && (ai != NULL)
+                && (strcmp(ai->Domain, "ABC") == 0)
+                && (ai->Limits.MaxMemory == -1)
+                && (ai->Limits.MaxStore == -1));
+    jsAccountInfo_Destroy(ai);
+    ai = NULL;
+
+    JS_TEARDOWN;
+    remove(confFile);
+}
+
+static void
+_streamsInfoListReq(natsConnection *nc, natsMsg **msg, void *closure)
+{
+    int         *count      = (int*) closure;
+    const char  *payload    = NULL;
+    natsMsg     *newMsg     = NULL;
+
+    if (strstr(natsMsg_GetData(*msg), "stream_list_response") == NULL)
+        return;
+
+    (*count)++;
+    if (*count == 1)
+    {
+        // Pretend limit is 2 and send 2 simplified stream infos
+        payload = "{\"type\":\"io.nats.jetstream.api.v1.stream_list_response\",\"total\":5,\"offset\":0,\"limit\":2,"\
+            "\"streams\":[{\"config\":{\"name\":\"S1\"}},{\"config\":{\"name\":\"S2\"}}]}";
+    }
+    else if (*count == 2)
+    {
+        // Pretend that there is a repeat of a stream name to check
+        // that we are properly replacing and not leaking memory.
+        payload = "{\"type\":\"io.nats.jetstream.api.v1.stream_list_response\",\"total\":5,\"offset\":2,\"limit\":2,"\
+            "\"streams\":[{\"config\":{\"name\":\"S2\"}},{\"config\":{\"name\":\"S3\"}}]}";
+    }
+    else if (*count == 3)
+    {
+        // Pretend that our next page was over the limit (say streams were removed)
+        // and therefore the server returned no streams (but set offset to total)
+        payload = "{\"type\":\"io.nats.jetstream.api.v1.stream_list_response\",\"total\":3,\"offset\":3,\"limit\":2,"\
+            "\"streams\":[]}";
+    }
+    else
+    {
+        // Use original message
+        return;
+    }
+    if (natsMsg_create(&newMsg, (*msg)->subject, (int) strlen((*msg)->subject), NULL, 0,
+                        payload, (int) strlen(payload), 0) == NATS_OK)
+    {
+        natsMsg_Destroy(*msg);
+        *msg = newMsg;
+    }
+}
+
+static void
+_streamsNamesListReq(natsConnection *nc, natsMsg **msg, void *closure)
+{
+    int         *count      = (int*) closure;
+    const char  *payload    = NULL;
+    natsMsg     *newMsg     = NULL;
+
+    if (strstr(natsMsg_GetData(*msg), "stream_names_response") == NULL)
+        return;
+
+    (*count)++;
+    if (*count == 1)
+    {
+        // Pretend limit is 2 and send 2 stream names
+        payload = "{\"type\":\"io.nats.jetstream.api.v1.stream_names_response\",\"total\":5,\"offset\":0,\"limit\":2,"\
+            "\"streams\":[\"S1\",\"S2\"]}";
+    }
+    else if (*count == 2)
+    {
+        // Pretend that there is a repeat of a stream name to check
+        // that we are properly replacing and not leaking memory.
+        payload = "{\"type\":\"io.nats.jetstream.api.v1.stream_names_response\",\"total\":5,\"offset\":2,\"limit\":2,"\
+            "\"streams\":[\"S2\",\"S3\"]}";
+    }
+    else if (*count == 3)
+    {
+        // Pretend that our next page was over the limit (say streams were removed)
+        // and therefore the server returned no streams (but set offset to total)
+        payload = "{\"type\":\"io.nats.jetstream.api.v1.stream_names_response\",\"total\":3,\"offset\":3,\"limit\":2,"\
+            "\"streams\":null}";
+    }
+    else
+    {
+        // Use original message
+        return;
+    }
+    if (natsMsg_create(&newMsg, (*msg)->subject, (int) strlen((*msg)->subject), NULL, 0,
+                        payload, (int) strlen(payload), 0) == NATS_OK)
+    {
+        natsMsg_Destroy(*msg);
+        *msg = newMsg;
+    }
+}
+
+static void
+test_JetStreamMgtStreams(void)
+{
+    natsStatus          s;
+    jsCtx               *js2= NULL;
+    jsStreamInfo        *si = NULL;
+    jsStreamConfig      cfg;
+    jsErrCode           jerr = 0;
+    natsMsg             *resp = NULL;
+    natsMsg             *msg  = NULL;
+    natsSubscription    *sub  = NULL;
+    char                *desc = NULL;
+    jsStreamInfoList    *siList = NULL;
+    jsStreamNamesList   *snList = NULL;
+    int                 count   = 0;
+    jsOptions           o;
+    int                 i;
+
+    JS_SETUP(2, 3, 3);
+
+    test("Get context 2: ");
+    // Set some purge options that will be saved in the context.
+    // They can be overridden when invoking Purge API.
+    jsOptions_Init(&o);
+    o.Stream.Purge.Subject = "baz";
+    o.Stream.Purge.Sequence = 10;
+    s = natsConnection_JetStream(&js2, nc, &o);
+    testCond(s == NATS_OK);
+
+    test("Stream config init, bad args: ");
+    s = jsStreamConfig_Init(NULL);
+    testCond(s == NATS_INVALID_ARG);
+
+    test("Stream config init: ");
+    s = jsStreamConfig_Init(&cfg);
+    testCond(s == NATS_OK);
+
+    test("Add stream, bad args: ");
+    s = js_AddStream(&si, NULL, &cfg, NULL, NULL);
+    testCond((s == NATS_INVALID_ARG) && (si == NULL));
+    nats_clearLastError();
+
+    test("Stream name required: ");
+    s = js_AddStream(&si, js, NULL, NULL, NULL);
+    if (s == NATS_INVALID_ARG)
+        s = js_AddStream(&si, js, &cfg, NULL, NULL);
+    testCond((s == NATS_INVALID_ARG)
+                && (si == NULL)
+                && (strstr(nats_GetLastError(NULL), jsErrStreamNameRequired) != NULL));
+    nats_clearLastError();
+
+    test("Invalid stream name: ");
+    cfg.Name = "invalid.stream.name";
+    s = js_AddStream(&si, js, &cfg, NULL, NULL);
+    testCond((s == NATS_INVALID_ARG)
+                && (si == NULL)
+                && (strstr(nats_GetLastError(NULL), "invalid stream name") != NULL));
+    nats_clearLastError();
+
+    test("Create basic: ");
+    cfg.Name = "TEST";
+    s = js_AddStream(&si, js, &cfg, NULL, &jerr);
+    testCond((s == NATS_OK)
+                && (si != NULL)
+                && (si->Config != NULL)
+                && (strcmp(si->Config->Name, "TEST") == 0)
+                && (jerr == 0));
+    jsStreamInfo_Destroy(si);
+    si = NULL;
+
+    test("Destroy null stream info ok: ");
+    jsStreamInfo_Destroy(NULL);
+    testCond(true);
+
+    test("Create failed because already used: ");
+    cfg.Subjects = (const char*[2]){"foo", "bar"};
+    cfg.SubjectsLen = 2;
+    s = js_AddStream(&si, js, &cfg, NULL, &jerr);
+    testCond((s == NATS_ERR)
+                && (si == NULL)
+                && (strstr(nats_GetLastError(NULL), "already in use") != NULL)
+                && ((jerr == 0) || (jerr == JSStreamNameExistErr)));
+    nats_clearLastError();
+
+    jerr = 0;
+    // Reset config
+    jsStreamConfig_Init(&cfg);
+    test("Add stream without getting stream info back: ");
+    cfg.Name = "TEST2";
+    s = js_AddStream(NULL, js, &cfg, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0) && (si == NULL));
+
+    test("Update stream config missing: ");
+    s = js_UpdateStream(&si, js, NULL, NULL, &jerr);
+    testCond((s == NATS_INVALID_ARG)
+                && (strstr(nats_GetLastError(NULL), jsErrStreamConfigRequired) != NULL));
+    nats_clearLastError();
+
+    test("Update stream stream name missing: ");
+    cfg.Name = "";
+    s = js_UpdateStream(&si, js, &cfg, NULL, &jerr);
+    testCond((s == NATS_INVALID_ARG)
+                && (strstr(nats_GetLastError(NULL), jsErrStreamNameRequired) != NULL));
+    nats_clearLastError();
+
+    test("Update stream stream name invalid: ");
+    cfg.Name = "bad.stream.name";
+    s = js_UpdateStream(&si, js, &cfg, NULL, &jerr);
+    testCond((s == NATS_INVALID_ARG)
+                && (strstr(nats_GetLastError(NULL), jsErrInvalidStreamName) != NULL));
+    nats_clearLastError();
+    cfg.Name = "TEST";
+
+    test("Update stream: ");
+    cfg.MaxMsgs = 1000;
+    s = js_UpdateStream(&si, js, &cfg, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0)
+                && (si != NULL)
+                && (si->Config != NULL)
+                && (si->Config->MaxMsgs == 1000));
+    jsStreamInfo_Destroy(si);
+    si = NULL;
+
+    test("Update stream (not found): ");
+    cfg.Name = "NOT_FOUND";
+    s = js_UpdateStream(&si, js, &cfg, NULL, &jerr);
+    testCond((s == NATS_NOT_FOUND)
+                && (jerr == JSStreamNotFoundErr)
+                && (si == NULL));
+    nats_clearLastError();
+
+    test("Send 1 message: ");
+    s = natsConnection_Request(&resp, nc, "TEST2", "hello", 5, 1000);
+    testCond(s == NATS_OK);
+    natsMsg_Destroy(resp);
+    resp = NULL;
+
+    test("Get stream info (bad args): ");
+    s = js_GetStreamInfo(NULL, NULL, "TEST2", NULL, NULL);
+    if (s == NATS_INVALID_ARG)
+        s = js_GetStreamInfo(NULL, js, "TEST2", NULL, NULL);
+    testCond(s == NATS_INVALID_ARG);
+
+    test("Get stream info (stream name missing): ");
+    s = js_GetStreamInfo(&si, js, NULL, NULL, NULL);
+    testCond((s == NATS_INVALID_ARG)
+                && (si == NULL)
+                && (strstr(nats_GetLastError(NULL), jsErrStreamNameRequired) != NULL));
+    nats_clearLastError();
+
+    test("Get stream info (invalid stream name): ");
+    s = js_GetStreamInfo(&si, js, "bad.stream.name", NULL, NULL);
+    testCond((s == NATS_INVALID_ARG)
+                && (si == NULL)
+                && (strstr(nats_GetLastError(NULL), jsErrInvalidStreamName) != NULL));
+    nats_clearLastError();
+
+    test("Get stream info: ");
+    s = js_GetStreamInfo(&si, js, "TEST2", NULL, &jerr);
+    testCond((s == NATS_OK)
+                && (jerr == 0)
+                && (si != NULL)
+                && (si->Config != NULL)
+                && (strcmp(si->Config->Subjects[0], "TEST2") == 0)
+                && (si->State.Msgs == 1));
+    jsStreamInfo_Destroy(si);
+    si = NULL;
+
+    test("Get stream info (not found): ");
+    s = js_GetStreamInfo(&si, js, "NOT_FOUND", NULL, &jerr);
+    testCond((s == NATS_NOT_FOUND)
+                && (jerr == JSStreamNotFoundErr)
+                && (si == NULL)
+                && (nats_GetLastError(NULL) == NULL));
+
+    test("Purge stream (bad args): ");
+    s = js_PurgeStream(NULL, "TEST2", NULL, &jerr);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Purge stream (stream name missing): ");
+    s = js_PurgeStream(js, NULL, NULL, &jerr);
+    if (s == NATS_INVALID_ARG)
+        s = js_PurgeStream(js, "", NULL, &jerr);
+    testCond((s == NATS_INVALID_ARG)
+                && (jerr == 0)
+                && (strstr(nats_GetLastError(NULL), jsErrStreamNameRequired) != NULL));
+    nats_clearLastError();
+
+    test("Purge stream (stream name invalid): ");
+    s = js_PurgeStream(js, "bad.stream.name", NULL, &jerr);
+    testCond((s == NATS_INVALID_ARG)
+                && (jerr == 0)
+                && (strstr(nats_GetLastError(NULL), jsErrInvalidStreamName) != NULL));
+    nats_clearLastError();
+
+    test("Purge stream: ");
+    s = js_PurgeStream(js, "TEST2", NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Purge stream (not found): ");
+    s = js_PurgeStream(js, "NOT_FOUND", NULL, &jerr);
+    testCond((s == NATS_NOT_FOUND)
+                && (jerr == JSStreamNotFoundErr));
+    nats_clearLastError();
+
+    test("Get stream info (verify purged): ");
+    s = js_GetStreamInfo(&si, js, "TEST2", NULL, &jerr);
+    testCond((s == NATS_OK)
+                && (jerr == 0)
+                && (si != NULL)
+                && (si->Config != NULL)
+                && (strcmp(si->Config->Subjects[0], "TEST2") == 0)
+                && (si->State.Msgs == 0));
+    jsStreamInfo_Destroy(si);
+    si = NULL;
+
+    test("Create sub to check requests: ");
+    s = natsConnection_SubscribeSync(&sub, nc, "$JS.API.STREAM.MSG.DELETE.TEST_MSG_DELETE");
+    testCond((s == NATS_OK) && (sub != NULL));
+
+    test("Create stream for delete msg: ");
+    jsStreamConfig_Init(&cfg);
+    cfg.Name = "TEST_MSG_DELETE";
+    cfg.Subjects = (const char*[1]){"delete.msg"};
+    cfg.SubjectsLen = 1;
+    cfg.Storage = js_MemoryStorage;
+    s = js_AddStream(NULL, js, &cfg, NULL, &jerr);
+    testCond(s == NATS_OK);
+
+    test("Send 1 message: ");
+    s = natsConnection_Request(&resp, nc, "delete.msg", "hello", 5, 1000);
+    testCond(s == NATS_OK);
+    natsMsg_Destroy(resp);
+    resp = NULL;
+
+    test("Delete msg (stream missing): ");
+    s = js_DeleteMsg(js, NULL, 2, NULL, &jerr);
+    if (s == NATS_INVALID_ARG)
+        s = js_DeleteMsg(js, "", 2, NULL, &jerr);
+    testCond((s == NATS_INVALID_ARG) && (jerr == 0));
+    nats_clearLastError();
+
+    test("Delete msg: ");
+    s = js_DeleteMsg(js, "TEST_MSG_DELETE", 1, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Check no_erase present: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    IFOK(s, (strstr(natsMsg_GetData(msg), "no_erase") != NULL ? NATS_OK : NATS_ERR));
+    testCond(s == NATS_OK);
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Delete msg (not found): ");
+    s = js_DeleteMsg(js, "TEST_MSG_DELETE", 2, NULL, &jerr);
+    testCond((s == NATS_ERR) && (jerr == JSSequenceNotFoundErr));
+    nats_clearLastError();
+
+    test("Check no_erase present: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    IFOK(s, (strstr(natsMsg_GetData(msg), "no_erase") != NULL ? NATS_OK : NATS_ERR));
+    testCond(s == NATS_OK);
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Send 1 message: ");
+    s = natsConnection_Request(&resp, nc, "delete.msg", "hello", 5, 1000);
+    testCond(s == NATS_OK);
+    natsMsg_Destroy(resp);
+    resp = NULL;
+
+    test("Erase msg: ");
+    s = js_EraseMsg(js, "TEST_MSG_DELETE", 2, &o, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Check no_erase absent: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    IFOK(s, (strstr(natsMsg_GetData(msg), "no_erase") != NULL ? NATS_ERR : NATS_OK));
+    testCond(s == NATS_OK);
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Erase msg (not found): ");
+    s = js_EraseMsg(js, "TEST_MSG_DELETE", 3, &o, &jerr);
+    testCond((s == NATS_ERR) && (jerr == JSSequenceNotFoundErr));
+    nats_clearLastError();
+
+    test("Check no_erase absent: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    IFOK(s, (strstr(natsMsg_GetData(msg), "no_erase") != NULL ? NATS_ERR : NATS_OK));
+    testCond(s == NATS_OK);
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Get stream info (verify deleted): ");
+    s = js_GetStreamInfo(&si, js, "TEST_MSG_DELETE", NULL, &jerr);
+    testCond((s == NATS_OK)
+                && (jerr == 0)
+                && (si != NULL)
+                && (si->Config != NULL)
+                && (strcmp(si->Config->Subjects[0], "delete.msg") == 0)
+                && (si->State.Msgs == 0));
+    jsStreamInfo_Destroy(si);
+    si = NULL;
+
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("Create stream: ");
+    jsStreamConfig_Init(&cfg);
+    cfg.Name = "TEST3";
+    cfg.Subjects = (const char*[2]){"foo", "bar"};
+    cfg.SubjectsLen = 2;
+    s = js_AddStream(NULL, js, &cfg, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Create sub to check purge req: ");
+    s = natsConnection_SubscribeSync(&sub, nc, "$JS.API.STREAM.PURGE.TEST3");
+    testCond(s == NATS_OK);
+
+    test("Purge with options (subj+seq): ");
+    jsOptions_Init(&o);
+    // Will purge only messages from "foo"
+    o.Stream.Purge.Subject = "foo";
+    // Purge up-to but do not include this sequence.
+    o.Stream.Purge.Sequence = 4;
+    // We care only on the outbound request, not the result of the API call.
+    js_PurgeStream(js, "TEST3", &o, NULL);
+    nats_clearLastError();
+    s = natsSubscription_NextMsg(&resp, sub, 1000);
+    testCond((s == NATS_OK)
+                && (resp != NULL)
+                && (strncmp("{\"filter\":\"foo\",\"seq\":4}",
+                            natsMsg_GetData(resp),
+                            natsMsg_GetDataLength(resp)) == 0));
+    natsMsg_Destroy(resp);
+    resp = NULL;
+
+    test("Purge without options and check context used: ");
+    js_PurgeStream(js2, "TEST3", NULL, NULL);
+    nats_clearLastError();
+    s = natsSubscription_NextMsg(&resp, sub, 1000);
+    testCond((s == NATS_OK)
+                && (resp != NULL)
+                && (strncmp("{\"filter\":\"baz\",\"seq\":10}",
+                            natsMsg_GetData(resp),
+                            natsMsg_GetDataLength(resp)) == 0));
+    natsMsg_Destroy(resp);
+    resp = NULL;
+
+    test("Purge with options (seq and keep mutually exclusive): ");
+    jsOptions_Init(&o);
+    o.Stream.Purge.Subject = "bar";
+    o.Stream.Purge.Sequence = 8;
+    o.Stream.Purge.Keep = 2;
+    s = js_PurgeStream(js, "TEST3", &o, &jerr);
+    testCond((s == NATS_INVALID_ARG)
+                && (jerr == 0)
+                && (strstr(nats_GetLastError(NULL), "exclusive") != NULL));
+    nats_clearLastError();
+
+    test("Check no request was sent: ");
+    s = natsSubscription_NextMsg(&resp, sub, 500);
+    testCond((s == NATS_TIMEOUT) && (resp == NULL));
+    nats_clearLastError();
+
+    test("Purge with options (subj+keep): ");
+    jsOptions_Init(&o);
+    o.Stream.Purge.Subject = "bar";
+    // Keep 2 messages in the stream's bar subject space.
+    o.Stream.Purge.Keep = 2;
+    // We care only on the outbound request, not the result of the API call.
+    js_PurgeStream(js, "TEST3", &o, NULL);
+    nats_clearLastError();
+    s = natsSubscription_NextMsg(&resp, sub, 1000);
+    testCond((s == NATS_OK)
+                && (resp != NULL)
+                && (strncmp("{\"filter\":\"bar\",\"keep\":2}",
+                            natsMsg_GetData(resp),
+                            natsMsg_GetDataLength(resp)) == 0));
+    natsMsg_Destroy(resp);
+    resp = NULL;
+
+    test("Delete stream (bad args): ");
+    s = js_DeleteStream(NULL, "TEST2", NULL, &jerr);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Delete stream (stream name missing): ");
+    s = js_DeleteStream(js, NULL, NULL, &jerr);
+    if (s == NATS_INVALID_ARG)
+        s = js_DeleteStream(js, "", NULL, &jerr);
+    testCond((s == NATS_INVALID_ARG)
+                && (jerr == 0)
+                && (strstr(nats_GetLastError(NULL), jsErrStreamNameRequired) != NULL));
+    nats_clearLastError();
+
+    test("Delete stream (stream name invalid): ");
+    s = js_DeleteStream(js, "bad.stream.name", NULL, &jerr);
+    testCond((s == NATS_INVALID_ARG)
+                && (jerr == 0)
+                && (strstr(nats_GetLastError(NULL), jsErrInvalidStreamName) != NULL));
+    nats_clearLastError();
+
+    test("Delete stream (not found): ");
+    s = js_DeleteStream(js, "NOT_FOUND", NULL, &jerr);
+    testCond((s == NATS_NOT_FOUND)
+                && (jerr == JSStreamNotFoundErr));
+    nats_clearLastError();
+
+    test("Delete stream: ");
+    s = js_DeleteStream(js, "TEST2", NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Get stream info (not found): ");
+    s = js_GetStreamInfo(&si, js, "TEST2", NULL, &jerr);
+    testCond((s == NATS_NOT_FOUND)
+                && (jerr == JSStreamNotFoundErr)
+                && (si == NULL));
+    nats_clearLastError();
+
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+    test("Create sub to check stream info req: ");
+    s = natsConnection_SubscribeSync(&sub, nc, "$JS.API.STREAM.INFO.TEST3");
+    testCond(s == NATS_OK);
+
+    test("StreamInfo with detailed delete: ");
+    o.Stream.Info.DeletedDetails = true;
+    IFOK(s, js_GetStreamInfo(&si, js, "TEST3", &o, &jerr));
+    IFOK(s, natsSubscription_NextMsg(&resp, sub, 1000));
+    testCond((s == NATS_OK)
+                && (resp != NULL)
+                && (natsMsg_GetDataLength(resp) > 0)
+                && (strncmp("{\"deleted_details\":true}",
+                            natsMsg_GetData(resp),
+                            natsMsg_GetDataLength(resp)) == 0));
+    jsStreamInfo_Destroy(si);
+    natsMsg_Destroy(resp);
+    resp = NULL;
+
+    test("Create stream with description: ");
+    jsStreamConfig_Init(&cfg);
+    cfg.Name = "TEST_DESC";
+    cfg.Description = "MyDescription";
+    s = js_AddStream(&si, js, &cfg, NULL, &jerr);
+    testCond((s == NATS_OK) && (si != NULL) && (jerr == 0)
+                && (si->Config != NULL)
+                && (si->Config->Description != NULL)
+                && (strcmp(si->Config->Description, "MyDescription") == 0));
+    jsStreamInfo_Destroy(si);
+    si = NULL;
+
+    test("Create stream with description too long: ");
+    jsStreamConfig_Init(&cfg);
+    cfg.Name = "TEST_DESC2";
+    desc = malloc(4*1024+2);
+    for (i=0;i<4*1024+1;i++)
+        desc[i] = 'a';
+    desc[i]='\0';
+    cfg.Description = (const char*) desc;
+    s = js_AddStream(&si, js, &cfg, NULL, &jerr);
+    testCond((s == NATS_ERR) && (si == NULL) && (jerr == JSStreamInvalidConfig));
+    nats_clearLastError();
+
+    free(desc);
+    jsCtx_Destroy(js2);
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("Create stream with wilcards: ");
+    jsStreamConfig_Init(&cfg);
+    cfg.Name = "STREAM_WITH_WC";
+    cfg.Subjects = (const char*[2]){"foo.>", "bar.*"};
+    cfg.SubjectsLen = 2;
+    s = js_AddStream(&si, js, &cfg, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0) & (si != NULL) && (si->Config != NULL)
+                && (si->Config->SubjectsLen == 2)
+                && (strcmp(si->Config->Subjects[0], "foo.>") == 0)
+                && (strcmp(si->Config->Subjects[1], "bar.*") == 0));
+    jsStreamInfo_Destroy(si);
+
+    test("List stream infos (bad args): ");
+    s = js_Streams(NULL, js, NULL, NULL);
+    if (s == NATS_INVALID_ARG)
+        s = js_Streams(&siList, NULL, NULL, NULL);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Create sub for pagination check: ");
+    s = natsConnection_SubscribeSync(&sub, nc, "$JS.API.STREAM.LIST");
+    testCond(s == NATS_OK);
+
+    natsConn_setFilterWithClosure(nc, _streamsInfoListReq, (void*) &count);
+
+    test("List stream infos: ");
+    s = js_Streams(&siList, js, NULL, &jerr);
+    testCond((s == NATS_OK) && (siList != NULL) && (siList->List != NULL) && (siList->Count == 3));
+
+    natsConn_setFilter(nc, NULL);
+
+    test("Check 1st request: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    testCond((s == NATS_OK)
+                && (strstr(natsMsg_GetData(msg), "offset\":0") != NULL));
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Check 2nd request: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    testCond((s == NATS_OK)
+                && (strstr(natsMsg_GetData(msg), "offset\":2") != NULL));
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Check 3rd request: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    testCond((s == NATS_OK)
+                && (strstr(natsMsg_GetData(msg), "offset\":4") != NULL));
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("Destroy list: ");
+    // Will see with valgrind if this is doing the right thing
+    jsStreamInfoList_Destroy(siList);
+    siList = NULL;
+    // Check this does not crash
+    jsStreamInfoList_Destroy(siList);
+    testCond(true);
+
+    test("List stream infos with filter: ");
+    jsOptions_Init(&o);
+    o.Stream.Info.SubjectsFilter = "TEST";
+    s = js_Streams(&siList, js, &o, &jerr);
+    testCond((s == NATS_OK) && (siList != NULL) && (siList->List != NULL) && (siList->Count == 1)
+                && (strcmp(siList->List[0]->Config->Name, "TEST") == 0));
+    jsStreamInfoList_Destroy(siList);
+    siList = NULL;
+
+    test("List stream infos with filter no match: ");
+    jsOptions_Init(&o);
+    o.Stream.Info.SubjectsFilter = "no.match";
+    s = js_Streams(&siList, js, &o, &jerr);
+    testCond((s == NATS_NOT_FOUND) && (siList == NULL));
+
+    // Do names now
+
+    test("List stream names (bad args): ");
+    s = js_StreamNames(NULL, js, NULL, NULL);
+    if (s == NATS_INVALID_ARG)
+        s = js_StreamNames(&snList, NULL, NULL, NULL);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Create sub for pagination check: ");
+    s = natsConnection_SubscribeSync(&sub, nc, "$JS.API.STREAM.NAMES");
+    testCond(s == NATS_OK);
+
+    count = 0;
+    natsConn_setFilterWithClosure(nc, _streamsNamesListReq, (void*) &count);
+
+    test("List stream names: ");
+    s = js_StreamNames(&snList, js, NULL, &jerr);
+    testCond((s == NATS_OK) && (snList != NULL) && (snList->List != NULL) && (snList->Count == 3));
+
+    natsConn_setFilter(nc, NULL);
+
+    test("Check 1st request: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    testCond((s == NATS_OK)
+                && (strstr(natsMsg_GetData(msg), "offset\":0") != NULL));
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Check 2nd request: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    testCond((s == NATS_OK)
+                && (strstr(natsMsg_GetData(msg), "offset\":2") != NULL));
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Check 3rd request: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    testCond((s == NATS_OK)
+                && (strstr(natsMsg_GetData(msg), "offset\":4") != NULL));
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("Destroy list: ");
+    // Will see with valgrind if this is doing the right thing
+    jsStreamNamesList_Destroy(snList);
+    snList = NULL;
+    // Check this does not crash
+    jsStreamNamesList_Destroy(snList);
+    testCond(true);
+
+    test("List stream names with filter: ");
+    jsOptions_Init(&o);
+    o.Stream.Info.SubjectsFilter = "TEST";
+    s = js_StreamNames(&snList, js, &o, &jerr);
+    testCond((s == NATS_OK) && (snList != NULL) && (snList->List != NULL) && (snList->Count == 1)
+                && (strcmp(snList->List[0], "TEST") == 0));
+    jsStreamNamesList_Destroy(snList);
+    snList = NULL;
+
+    test("List stream names with filter no match: ");
+    jsOptions_Init(&o);
+    o.Stream.Info.SubjectsFilter = "no.match";
+    s = js_StreamNames(&snList, js, &o, &jerr);
+    testCond((s == NATS_NOT_FOUND) && (snList == NULL));
+
+    JS_TEARDOWN;
+}
+
+static void
+_consumersInfoListReq(natsConnection *nc, natsMsg **msg, void *closure)
+{
+    int         *count      = (int*) closure;
+    const char  *payload    = NULL;
+    natsMsg     *newMsg     = NULL;
+
+
+    if (strstr(natsMsg_GetData(*msg), "consumer_list_response") == NULL)
+        return;
+
+    (*count)++;
+    if (*count == 1)
+    {
+        // Pretend limit is 2 and send 2 simplified consumer infos
+        payload = "{\"type\":\"io.nats.jetstream.api.v1.consumer_list_response\",\"total\":5,\"offset\":0,\"limit\":2,"\
+            "\"consumers\":[{\"stream_name\":\"A\",\"name\":\"a\"},{\"stream_name\":\"A\",\"name\":\"b\"}]}";
+    }
+    else if (*count == 2)
+    {
+        // Pretend that there is a repeat of a stream name to check
+        // that we are properly replacing and not leaking memory.
+        payload = "{\"type\":\"io.nats.jetstream.api.v1.consumer_list_response\",\"total\":5,\"offset\":2,\"limit\":2,"\
+            "\"consumers\":[{\"stream_name\":\"A\",\"name\":\"b\"},{\"stream_name\":\"A\",\"name\":\"c\"}]}";
+    }
+    else if (*count == 3)
+    {
+        // Pretend that our next page was over the limit (say streams were removed)
+        // and therefore the server returned no streams (but set offset to total)
+        payload = "{\"type\":\"io.nats.jetstream.api.v1.consumer_list_response\",\"total\":3,\"offset\":3,\"limit\":2,"\
+            "\"consumers\":[]}";
+    }
+    else
+    {
+        // Use original message
+        return;
+    }
+    if (natsMsg_create(&newMsg, (*msg)->subject, (int) strlen((*msg)->subject), NULL, 0,
+                        payload, (int) strlen(payload), 0) == NATS_OK)
+    {
+        natsMsg_Destroy(*msg);
+        *msg = newMsg;
+    }
+}
+
+static void
+_consumerNamesListReq(natsConnection *nc, natsMsg **msg, void *closure)
+{
+    int         *count      = (int*) closure;
+    const char  *payload    = NULL;
+    natsMsg     *newMsg     = NULL;
+
+    if (strstr(natsMsg_GetData(*msg), "consumer_names_response") == NULL)
+        return;
+
+    (*count)++;
+    if (*count == 1)
+    {
+        // Pretend limit is 2 and send 2 stream names
+        payload = "{\"type\":\"io.nats.jetstream.api.v1.consumer_names_response\",\"total\":5,\"offset\":0,\"limit\":2,"\
+            "\"consumers\":[\"a\",\"b\"]}";
+    }
+    else if (*count == 2)
+    {
+        // Pretend that there is a repeat of a stream name to check
+        // that we are properly replacing and not leaking memory.
+        payload = "{\"type\":\"io.nats.jetstream.api.v1.consumer_names_response\",\"total\":5,\"offset\":0,\"limit\":2,"\
+            "\"consumers\":[\"b\",\"c\"]}";
+    }
+    else if (*count == 3)
+    {
+        // Pretend that our next page was over the limit (say streams were removed)
+        // and therefore the server returned no streams (but set offset to total)
+        payload = "{\"type\":\"io.nats.jetstream.api.v1.consumer_names_response\",\"total\":3,\"offset\":3,\"limit\":2,"\
+            "\"consumers\":[]}";
+    }
+    else
+    {
+        // Use original message
+        return;
+    }
+    if (natsMsg_create(&newMsg, (*msg)->subject, (int) strlen((*msg)->subject), NULL, 0,
+                        payload, (int) strlen(payload), 0) == NATS_OK)
+    {
+        natsMsg_Destroy(*msg);
+        *msg = newMsg;
+    }
+}
+
+static void
+test_JetStreamMgtConsumers(void)
+{
+    natsStatus              s;
+    jsConsumerInfo          *ci = NULL;
+    jsConsumerConfig        cfg;
+    jsErrCode               jerr = 0;
+    natsMsg                 *resp = NULL;
+    natsSubscription        *sub  = NULL;
+    char                    *desc = NULL;
+    jsStreamConfig          scfg;
+    int                     i;
+    const char              *dlvPoliciesStr[] = {
+        "\"deliver_policy\":\"" jsDeliverAllStr "\"",
+        "\"deliver_policy\":\"" jsDeliverLastStr "\"",
+        "\"deliver_policy\":\"" jsDeliverNewStr "\"",
+        "\"deliver_policy\":\"" jsDeliverBySeqStr "\"",
+        "\"deliver_policy\":\"" jsDeliverByTimeStr "\"",
+        "\"deliver_policy\":\"" jsDeliverLastPerSubjectStr "\"",
+    };
+    jsDeliverPolicy         dlvPolicies[] = {
+        js_DeliverAll, js_DeliverLast, js_DeliverNew, js_DeliverByStartSequence,
+        js_DeliverByStartTime, js_DeliverLastPerSubject};
+    const char              *ackPoliciesStr[] = {
+        "\"ack_policy\":\"" jsAckNoneStr "\"",
+        "\"ack_policy\":\"" jsAckAllStr "\"",
+        "\"ack_policy\":\"" jsAckExplictStr "\"",
+    };
+    jsAckPolicy             ackPolicies[] = {
+        js_AckNone, js_AckAll, js_AckExplicit};
+    const char              *replayPoliciesStr[] = {
+        "\"replay_policy\":\"" jsReplayInstantStr "\"",
+        "\"replay_policy\":\"" jsReplayOriginalStr "\"",
+    };
+    jsReplayPolicy          replayPolicies[] = {
+        js_ReplayInstant, js_ReplayOriginal};
+    const char              *badConsNames[] = {
+        "foo.bar",
+        ".foobar",
+        "foobar.",
+        "foo bar",
+        " foobar",
+        "foobar ",
+        "foo*bar",
+        "*foobar",
+        "foobar*",
+        "foo>bar",
+        ">foobar",
+        "foobar>",
+    };
+    jsConsumerInfoList  *ciList = NULL;
+    jsConsumerNamesList *cnList = NULL;
+    int                 count   = 0;
+    natsMsg             *msg    = NULL;
+    jsConsumerConfig    *cloneCfg = NULL;
+
+    JS_SETUP(2, 9, 0);
+
+    test("Consumer config init, bad args: ");
+    s = jsConsumerConfig_Init(NULL);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Consumer config init: ");
+    s = jsConsumerConfig_Init(&cfg);
+    testCond(s == NATS_OK);
+
+    test("Add consumer, ctx missing: ");
+    s = js_AddConsumer(&ci, NULL, "MY_STREAM", &cfg, NULL, NULL);
+    testCond((s == NATS_INVALID_ARG) && (ci == NULL));
+    nats_clearLastError();
+
+    test("Add consumer, config missing: ");
+    s = js_AddConsumer(&ci, js, "MY_STREAM", NULL, NULL, NULL);
+    testCond((s == NATS_INVALID_ARG) && (ci == NULL)
+                && (strstr(nats_GetLastError(NULL), jsErrConsumerConfigRequired) != NULL));
+    nats_clearLastError();
+
+    test("Add consumer, stream name required: ");
+    s = js_AddConsumer(&ci, js, NULL, &cfg, NULL, NULL);
+    if (s == NATS_INVALID_ARG)
+        s = js_AddConsumer(&ci, js, "", &cfg, NULL, NULL);
+    testCond((s == NATS_INVALID_ARG) && (ci == NULL)
+                && (strstr(nats_GetLastError(NULL), jsErrStreamNameRequired) != NULL));
+    nats_clearLastError();
+
+    test("Add consumer, stream name invalid: ");
+    s = js_AddConsumer(&ci, js, "bad.stream.name", &cfg, NULL, NULL);
+    testCond((s == NATS_INVALID_ARG) && (ci == NULL)
+                && (strstr(nats_GetLastError(NULL), jsErrInvalidStreamName) != NULL));
+    nats_clearLastError();
+
+    test("Add consumer, invalid durable name: ");
+    cfg.Durable = "invalid.durable.name";
+    s = js_AddConsumer(&ci, js, "MY_STREAM", &cfg, NULL, NULL);
+    testCond((s == NATS_INVALID_ARG) && (ci == NULL)
+                && (strstr(nats_GetLastError(NULL), jsErrInvalidDurableName) != NULL));
+    nats_clearLastError();
+
+    s = NATS_OK;
+    test("Add consumer, invalid name: ");
+    jsConsumerConfig_Init(&cfg);
+    for (i=0; (s == NATS_OK) && (i<(int)(sizeof(badConsNames)/sizeof(char*))); i++)
+    {
+        cfg.Name = badConsNames[i];
+        s = js_AddConsumer(&ci, js, "MY_STREAM", &cfg, NULL, NULL);
+        if ((s == NATS_INVALID_ARG) && (ci == NULL)
+                && (strstr(nats_GetLastError(NULL), jsErrInvalidConsumerName) != NULL))
+        {
+            nats_clearLastError();
+            s = NATS_OK;
+        }
+    }
+    testCond(s == NATS_OK);
+
+    test("Create check sub: ");
+    s = natsConnection_SubscribeSync(&sub, nc, "$JS.API.CONSUMER.CREATE.MY_STREAM");
+    testCond(s == NATS_OK);
+
+    for (i=0; i<6; i++)
+    {
+        test("Deliver policy: ");
+        jsConsumerConfig_Init(&cfg);
+        cfg.DeliverPolicy = dlvPolicies[i];
+        s = js_AddConsumer(&ci, js, "MY_STREAM", &cfg, NULL, &jerr);
+        testCond((s = NATS_ERR) && (jerr == JSStreamNotFoundErr) && (ci == NULL));
+        nats_clearLastError();
+
+        test("Verify config: ");
+        s = natsSubscription_NextMsg(&resp, sub, 1000);
+        testCond((s == NATS_OK) && (resp != NULL)
+                    && (strstr(natsMsg_GetData(resp), dlvPoliciesStr[i]) != NULL));
+        natsMsg_Destroy(resp);
+        resp = NULL;
+    }
+
+    test("Deliver policy bad: ");
+    jsConsumerConfig_Init(&cfg);
+    cfg.DeliverPolicy = (jsDeliverPolicy) 100;
+    s = js_AddConsumer(&ci, js, "MY_STREAM", &cfg, NULL, &jerr);
+    testCond((s = NATS_INVALID_ARG) && (jerr == 0) && (ci == NULL));
+    nats_clearLastError();
+
+    for (i=0; i<3; i++)
+    {
+        test("Ack policy: ");
+        jsConsumerConfig_Init(&cfg);
+        cfg.AckPolicy = ackPolicies[i];
+        s = js_AddConsumer(&ci, js, "MY_STREAM", &cfg, NULL, &jerr);
+        testCond((s = NATS_ERR) && (jerr == JSStreamNotFoundErr) && (ci == NULL));
+        nats_clearLastError();
+
+        test("Verify config: ");
+        s = natsSubscription_NextMsg(&resp, sub, 1000);
+        testCond((s == NATS_OK) && (resp != NULL)
+                    && (strstr(natsMsg_GetData(resp), ackPoliciesStr[i]) != NULL));
+        natsMsg_Destroy(resp);
+        resp = NULL;
+    }
+
+    test("Ack policy bad: ");
+    jsConsumerConfig_Init(&cfg);
+    cfg.AckPolicy = (jsAckPolicy) 100;
+    s = js_AddConsumer(&ci, js, "MY_STREAM", &cfg, NULL, &jerr);
+    testCond((s = NATS_INVALID_ARG) && (jerr == 0) && (ci == NULL));
+    nats_clearLastError();
+
+    for (i=0; i<2; i++)
+    {
+        test("Replay policy: ");
+        jsConsumerConfig_Init(&cfg);
+        cfg.ReplayPolicy = replayPolicies[i];
+        s = js_AddConsumer(&ci, js, "MY_STREAM", &cfg, NULL, &jerr);
+        testCond((s = NATS_ERR) && (jerr == JSStreamNotFoundErr) && (ci == NULL));
+        nats_clearLastError();
+
+        test("Verify config: ");
+        s = natsSubscription_NextMsg(&resp, sub, 1000);
+        testCond((s == NATS_OK) && (resp != NULL)
+                    && (strstr(natsMsg_GetData(resp), replayPoliciesStr[i]) != NULL));
+        natsMsg_Destroy(resp);
+        resp = NULL;
+    }
+
+    test("Replay policy bad: ");
+    jsConsumerConfig_Init(&cfg);
+    cfg.ReplayPolicy = (jsReplayPolicy) 100;
+    s = js_AddConsumer(&ci, js, "MY_STREAM", &cfg, NULL, &jerr);
+    testCond((s = NATS_INVALID_ARG) && (jerr == 0) && (ci == NULL));
+    nats_clearLastError();
+
+    test("Add consumer (non durable): ");
+    cfg.Durable = NULL;
+    cfg.Description = "MyDescription";
+    cfg.DeliverSubject = "foo";
+    cfg.DeliverPolicy = js_DeliverLast;
+    cfg.OptStartSeq = 100;
+    cfg.OptStartTime = 1624472520123450000;
+    cfg.AckPolicy = js_AckExplicit;
+    cfg.AckWait = 200;
+    cfg.MaxDeliver = 300;
+    cfg.FilterSubject = "bar";
+    cfg.ReplayPolicy = js_ReplayInstant;
+    cfg.RateLimit = 400;
+    cfg.SampleFrequency = "60%%";
+    cfg.MaxWaiting = 500;
+    cfg.MaxAckPending = 600;
+    cfg.FlowControl = true;
+    cfg.Heartbeat = 700;
+    cfg.Replicas = 1;
+    cfg.MemoryStorage = true;
+    // We create a consumer with non existing stream, so we
+    // expect this to fail. We are just checking that the config
+    // is properly serialized.
+    s = js_AddConsumer(&ci, js, "MY_STREAM", &cfg, NULL, &jerr);
+    testCond((s = NATS_ERR) && (jerr == JSStreamNotFoundErr) && (ci == NULL));
+    nats_clearLastError();
+
+    test("Verify config: ");
+    s = natsSubscription_NextMsg(&resp, sub, 1000);
+    testCond((s == NATS_OK) && (resp != NULL)
+                && (strncmp(natsMsg_GetData(resp),
+                    "{\"stream_name\":\"MY_STREAM\","\
+                    "\"config\":{\"deliver_policy\":\"last\","\
+                    "\"description\":\"MyDescription\","\
+                    "\"deliver_subject\":\"foo\","\
+                    "\"opt_start_seq\":100,"\
+                    "\"opt_start_time\":\"2021-06-23T18:22:00.12345Z\",\"ack_policy\":\"explicit\","\
+                    "\"ack_wait\":200,\"max_deliver\":300,\"filter_subject\":\"bar\","\
+                    "\"replay_policy\":\"instant\",\"rate_limit_bps\":400,"\
+                    "\"sample_freq\":\"60%%\",\"max_waiting\":500,\"max_ack_pending\":600,"\
+                    "\"flow_control\":true,\"idle_heartbeat\":700,"\
+                    "\"num_replicas\":1,\"mem_storage\":true}}",
+                    natsMsg_GetDataLength(resp)) == 0));
+    natsMsg_Destroy(resp);
+    resp = NULL;
+
+    test("Create check sub: ");
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+    s = natsConnection_SubscribeSync(&sub, nc, "$JS.API.CONSUMER.DURABLE.CREATE.MY_STREAM.dur");
+    testCond(s == NATS_OK);
+
+    test("Add consumer (durable): ");
+    cfg.Durable = "dur";
+    s = js_AddConsumer(&ci, js, "MY_STREAM", &cfg, NULL, &jerr);
+    testCond((s = NATS_ERR) && (jerr == JSStreamNotFoundErr) && (ci == NULL));
+    nats_clearLastError();
+
+    test("Verify config: ");
+    s = natsSubscription_NextMsg(&resp, sub, 1000);
+    testCond((s == NATS_OK) && (resp != NULL)
+                && (strncmp(natsMsg_GetData(resp),
+                    "{\"stream_name\":\"MY_STREAM\","\
+                    "\"config\":{\"deliver_policy\":\"last\","\
+                    "\"description\":\"MyDescription\","\
+                    "\"durable_name\":\"dur\",\"deliver_subject\":\"foo\","\
+                    "\"opt_start_seq\":100,"\
+                    "\"opt_start_time\":\"2021-06-23T18:22:00.12345Z\",\"ack_policy\":\"explicit\","\
+                    "\"ack_wait\":200,\"max_deliver\":300,\"filter_subject\":\"bar\","\
+                    "\"replay_policy\":\"instant\",\"rate_limit_bps\":400,"\
+                    "\"sample_freq\":\"60%%\",\"max_waiting\":500,\"max_ack_pending\":600,"\
+                    "\"flow_control\":true,\"idle_heartbeat\":700,"\
+                    "\"num_replicas\":1,\"mem_storage\":true}}",
+                    natsMsg_GetDataLength(resp)) == 0));
+    natsMsg_Destroy(resp);
+    resp = NULL;
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("Create check sub: ");
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+    s = natsConnection_SubscribeSync(&sub, nc, "$JS.API.CONSUMER.CREATE.MY_STREAM.>");
+    testCond(s == NATS_OK);
+
+    test("Add consumer (name): ");
+    cfg.Durable = NULL;
+    cfg.Name = "my_name";
+    s = js_AddConsumer(&ci, js, "MY_STREAM", &cfg, NULL, &jerr);
+    testCond((s = NATS_ERR) && (jerr == JSStreamNotFoundErr) && (ci == NULL));
+    nats_clearLastError();
+
+    test("Verify config: ");
+    s = natsSubscription_NextMsg(&resp, sub, 1000);
+    testCond((s == NATS_OK) && (resp != NULL)
+                && (strncmp(natsMsg_GetData(resp),
+                    "{\"stream_name\":\"MY_STREAM\","\
+                    "\"config\":{\"deliver_policy\":\"last\","\
+                    "\"name\":\"my_name\","\
+                    "\"description\":\"MyDescription\","\
+                    "\"deliver_subject\":\"foo\","\
+                    "\"opt_start_seq\":100,"\
+                    "\"opt_start_time\":\"2021-06-23T18:22:00.12345Z\",\"ack_policy\":\"explicit\","\
+                    "\"ack_wait\":200,\"max_deliver\":300,\"filter_subject\":\"bar\","\
+                    "\"replay_policy\":\"instant\",\"rate_limit_bps\":400,"\
+                    "\"sample_freq\":\"60%%\",\"max_waiting\":500,\"max_ack_pending\":600,"\
+                    "\"flow_control\":true,\"idle_heartbeat\":700,"\
+                    "\"num_replicas\":1,\"mem_storage\":true}}",
+                    natsMsg_GetDataLength(resp)) == 0));
+    natsMsg_Destroy(resp);
+    resp = NULL;
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("Create stream: ");
+    jsStreamConfig_Init(&scfg);
+    scfg.Name = "MY_STREAM";
+    scfg.Subjects = (const char*[1]){"bar.>"};
+    scfg.SubjectsLen = 1;
+    s = js_AddStream(NULL, js, &scfg, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Add consumer (name): ");
+    jsConsumerConfig_Init(&cfg);
+    cfg.Name = "my_name";
+    cfg.DeliverSubject = "mn.foo";
+    cfg.FilterSubject = "bar.>";
+    s = js_AddConsumer(&ci, js, "MY_STREAM", &cfg, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0) && (ci != NULL)
+                && (strcmp(ci->Stream, "MY_STREAM") == 0)
+                && (strcmp(ci->Name, "my_name") == 0)
+                && (strcmp(ci->Config->Name, "my_name") == 0));
+    jsConsumerInfo_Destroy(ci);
+    ci = NULL;
+
+    test("Add consumer (durable): ");
+    jsConsumerConfig_Init(&cfg);
+    cfg.Durable = "dur";
+    cfg.DeliverSubject = "foo";
+    cfg.FilterSubject = "bar.>";
+    s = js_AddConsumer(&ci, js, "MY_STREAM", &cfg, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0) && (ci != NULL)
+                && (strcmp(ci->Stream, "MY_STREAM") == 0)
+                && (strcmp(ci->Name, "dur") == 0));
+    jsConsumerInfo_Destroy(ci);
+    ci = NULL;
+
+    test("Publish: ");
+    s = natsConnection_Publish(nc, "bar.baz", "hello", 5);
+    testCond(s == NATS_OK);
+
+    test("Get consumer info (bad args): ");
+    s = js_GetConsumerInfo(NULL, js, "MY_STREAM", "dur", NULL, &jerr);
+    if (s == NATS_INVALID_ARG)
+        s = js_GetConsumerInfo(&ci, NULL, "MY_STREAM", "dur", NULL, &jerr);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Get consumer info, stream name missing: ");
+    s = js_GetConsumerInfo(&ci, js, NULL, "dur", NULL, &jerr);
+    if (s == NATS_INVALID_ARG)
+        s = js_GetConsumerInfo(&ci, js, "", "dur", NULL, &jerr);
+    testCond((s == NATS_INVALID_ARG)
+                && (strstr(nats_GetLastError(NULL), jsErrStreamNameRequired) != NULL));
+    nats_clearLastError();
+
+    test("Get consumer info, stream name invalid: ");
+    s = js_GetConsumerInfo(&ci, js, "bad.stream.name", "dur", NULL, &jerr);
+    testCond((s == NATS_INVALID_ARG)
+                && (strstr(nats_GetLastError(NULL), jsErrInvalidStreamName) != NULL));
+    nats_clearLastError();
+
+    test("Get consumer info, consumer name missing: ");
+    s = js_GetConsumerInfo(&ci, js, "MY_STREAM", NULL, NULL, &jerr);
+    if (s == NATS_INVALID_ARG)
+        s = js_GetConsumerInfo(&ci, js, "MY_STREAM", "", NULL, &jerr);
+    testCond((s == NATS_INVALID_ARG)
+                && (strstr(nats_GetLastError(NULL), jsErrConsumerNameRequired) != NULL));
+    nats_clearLastError();
+
+    test("Get consumer info, consumer name invalid: ");
+    s = js_GetConsumerInfo(&ci, js, "MY_STREAM", "bad.consumer.name", NULL, &jerr);
+    testCond((s == NATS_INVALID_ARG)
+                && (strstr(nats_GetLastError(NULL), jsErrInvalidConsumerName) != NULL));
+    nats_clearLastError();
+
+    test("Get consumer info: ");
+    s = js_GetConsumerInfo(&ci, js, "MY_STREAM", "dur", NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0) && (ci != NULL)
+                && (strcmp(ci->Stream, "MY_STREAM") == 0)
+                && (strcmp(ci->Name, "dur") == 0)
+                && (ci->Config != NULL)
+                && (ci->Config->FilterSubject != NULL)
+                && (strcmp(ci->Config->FilterSubject, "bar.>") == 0));
+    jsConsumerInfo_Destroy(ci);
+    ci = NULL;
+
+    test("Get consumer info (not found): ");
+    s = js_GetConsumerInfo(&ci, js, "MY_STREAM", "dur2", NULL, &jerr);
+    testCond((s == NATS_NOT_FOUND)
+                && (jerr == JSConsumerNotFoundErr)
+                && (ci == NULL)
+                && (nats_GetLastError(NULL) == NULL));
+
+    test("Delete consumer (bad args): ");
+    s = js_DeleteConsumer(NULL, "MY_STREAM", "dur", NULL, &jerr);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Delete consumer, stream name missing: ");
+    s = js_DeleteConsumer(js, NULL, "dur", NULL, &jerr);
+    if (s == NATS_INVALID_ARG)
+        s = js_DeleteConsumer(js, "", "dur", NULL, &jerr);
+    testCond((s == NATS_INVALID_ARG)
+                && (strstr(nats_GetLastError(NULL), jsErrStreamNameRequired) != NULL));
+    nats_clearLastError();
+
+    test("Delete consumer, stream name invalid: ");
+    s = js_DeleteConsumer(js, "bad.stream.name", "dur", NULL, &jerr);
+    testCond((s == NATS_INVALID_ARG)
+                && (strstr(nats_GetLastError(NULL), jsErrInvalidStreamName) != NULL));
+    nats_clearLastError();
+
+    test("Delete consumer, consumer name missing: ");
+    s = js_DeleteConsumer(js, "MY_STREAM", NULL, NULL, &jerr);
+    if (s == NATS_INVALID_ARG)
+        s = js_DeleteConsumer(js, "MY_STREAM", "", NULL, &jerr);
+    testCond((s == NATS_INVALID_ARG)
+                && (strstr(nats_GetLastError(NULL), jsErrConsumerNameRequired) != NULL));
+    nats_clearLastError();
+
+    test("Get consumer info, consumer name invalid: ");
+    s = js_DeleteConsumer(js, "MY_STREAM", "bad.consumer.name", NULL, &jerr);
+    testCond((s == NATS_INVALID_ARG)
+                && (strstr(nats_GetLastError(NULL), jsErrInvalidConsumerName) != NULL));
+    nats_clearLastError();
+
+    test("Delete consumer: ");
+    s = js_DeleteConsumer(js, "MY_STREAM", "dur", NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Delete consumer (not found): ");
+    s = js_DeleteConsumer(js, "MY_STREAM", "dur2", NULL, &jerr);
+    testCond((s == NATS_NOT_FOUND)
+                && (jerr == JSConsumerNotFoundErr));
+    nats_clearLastError();
+
+    test("Create consumer with description: ");
+    jsConsumerConfig_Init(&cfg);
+    cfg.Description = "MyDescription";
+    cfg.DeliverSubject = "desc1";
+    s = js_AddConsumer(&ci, js, "MY_STREAM", &cfg, NULL, &jerr);
+    testCond((s == NATS_OK) && (ci != NULL) && (jerr == 0)
+                && (ci->Config != NULL)
+                && (ci->Config->Description != NULL)
+                && (strcmp(ci->Config->Description, "MyDescription") == 0));
+    jsConsumerInfo_Destroy(ci);
+    ci = NULL;
+
+    test("Create consumer with description too long: ");
+    jsConsumerConfig_Init(&cfg);
+    desc = malloc(4*1024+2);
+    for (i=0;i<4*1024+1;i++)
+        desc[i] = 'a';
+    desc[i]='\0';
+    cfg.Description = (const char*) desc;
+    cfg.DeliverSubject = "desc2";
+    s = js_AddConsumer(&ci, js, "MY_STREAM", &cfg, NULL, &jerr);
+    testCond((s == NATS_ERR) && (ci == NULL) && (jerr == JSConsumerDescriptionTooLongErr));
+    nats_clearLastError();
+    free(desc);
+
+    test("Create consumer: ");
+    jsConsumerConfig_Init(&cfg);
+    cfg.Durable = "update_push_consumer";
+    cfg.DeliverSubject = "bar";
+    cfg.FilterSubject = "bar.baz";
+    cfg.AckPolicy = js_AckExplicit;
+    s = js_AddConsumer(NULL, js, "MY_STREAM", &cfg, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    // We will update this config and pass it to UpdateConsumer
+    // and check that the result after UpdateConsumer matches...
+    // Currently, server supports these fields:
+    // description, ack_wait, max_deliver, sample_freq, max_ack_pending, max_waiting and headers_only
+    cfg.Description = "my description";
+    cfg.AckWait = NATS_SECONDS_TO_NANOS(2);
+    cfg.MaxDeliver = 1;
+    cfg.SampleFrequency = "30";
+    cfg.MaxAckPending = 10;
+    cfg.HeadersOnly = true;
+
+    test("Update consumer, config missing: ");
+    s = js_UpdateConsumer(&ci, js, "MY_STREAM", NULL, NULL, &jerr);
+    testCond((s == NATS_INVALID_ARG) && (ci == NULL)
+                && (strstr(nats_GetLastError(NULL), jsErrConsumerConfigRequired) != NULL));
+    nats_clearLastError();
+
+    test("Update consumer, stream name missing: ");
+    s = js_UpdateConsumer(&ci, js, NULL, &cfg, NULL, &jerr);
+    if (s == NATS_INVALID_ARG)
+        s = js_UpdateConsumer(&ci, js, "", &cfg, NULL, &jerr);
+    testCond((s == NATS_INVALID_ARG) && (ci == NULL) && (jerr == 0)
+                && (strstr(nats_GetLastError(NULL), jsErrStreamNameRequired) != NULL));
+    nats_clearLastError();
+
+    test("Update consumer, stream name invalid: ");
+    s = js_UpdateConsumer(&ci, js, "bad.stream.name", &cfg, NULL, &jerr);
+    testCond((s == NATS_INVALID_ARG) && (ci == NULL) && (jerr == 0)
+                && (strstr(nats_GetLastError(NULL), jsErrInvalidStreamName) != NULL));
+    nats_clearLastError();
+
+    test("Update needs durable name: ");
+    cfg.Durable = NULL;
+    s = js_UpdateConsumer(&ci, js, "MY_STREAM", &cfg, NULL, &jerr);
+    if (s == NATS_INVALID_ARG)
+    {
+        cfg.Durable = "";
+        s = js_UpdateConsumer(&ci, js, "MY_STREAM", &cfg, NULL, &jerr);
+    }
+    testCond((s == NATS_INVALID_ARG) && (ci == NULL) && (jerr == 0)
+                && (strstr(nats_GetLastError(NULL), jsErrDurRequired) != NULL));
+    nats_clearLastError();
+    cfg.Durable = "update_push_consumer";
+    cfg.FilterSubject = "bar.bat";
+
+    test("Update works ok: ");
+    s = js_UpdateConsumer(&ci, js, "MY_STREAM", &cfg, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0) && (ci != NULL) && (ci->Config != NULL)
+                && (strcmp(ci->Config->Description, "my description") == 0)
+                && (ci->Config->AckWait == NATS_SECONDS_TO_NANOS(2))
+                && (ci->Config->MaxDeliver == 1)
+                && (strcmp(ci->Config->SampleFrequency, "30") == 0)
+                && (ci->Config->MaxAckPending == 10)
+                && (ci->Config->HeadersOnly)
+                && (ci->Config->FilterSubject != NULL)
+                && (strcmp(ci->Config->FilterSubject, "bar.bat") == 0));
+    jsConsumerInfo_Destroy(ci);
+    ci = NULL;
+
+    test("Add pull consumer: ");
+    jsConsumerConfig_Init(&cfg);
+    cfg.Durable = "update_pull_consumer";
+    cfg.AckPolicy = js_AckExplicit;
+    cfg.MaxWaiting = 1;
+    s = js_AddConsumer(NULL, js, "MY_STREAM", &cfg, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    cfg.Description = "my description";
+    cfg.AckWait = NATS_SECONDS_TO_NANOS(2);
+    cfg.MaxDeliver = 1;
+    cfg.SampleFrequency = "30";
+    cfg.MaxAckPending = 10;
+    cfg.HeadersOnly = true;
+    cfg.MaxRequestBatch = 10;
+    cfg.MaxRequestExpires = NATS_SECONDS_TO_NANOS(2);
+
+    test("Update works ok: ");
+    s = js_UpdateConsumer(&ci, js, "MY_STREAM", &cfg, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0) && (ci != NULL) && (ci->Config != NULL)
+                && (strcmp(ci->Config->Description, "my description") == 0)
+                && (ci->Config->AckWait == NATS_SECONDS_TO_NANOS(2))
+                && (ci->Config->MaxDeliver == 1)
+                && (strcmp(ci->Config->SampleFrequency, "30") == 0)
+                && (ci->Config->MaxAckPending == 10)
+                && (ci->Config->HeadersOnly)
+                && (ci->Config->MaxRequestBatch == 10)
+                && (ci->Config->MaxRequestExpires == NATS_SECONDS_TO_NANOS(2)));
+    jsConsumerInfo_Destroy(ci);
+    ci = NULL;
+
+    test("Create stream: ");
+    jsStreamConfig_Init(&scfg);
+    scfg.Name = "A";
+    scfg.Subjects = (const char*[2]){"foo", "bar"};
+    scfg.SubjectsLen = 2;
+    s = js_AddStream(NULL, js, &scfg, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Create sub: ");
+    s = natsConnection_SubscribeSync(&sub, nc, "$JS.API.CONSUMER.>");
+    testCond(s == NATS_OK);
+
+    test("Ephemeral with name: ");
+    jsConsumerConfig_Init(&cfg);
+    cfg.Name = "a";
+    cfg.AckPolicy = js_AckExplicit;
+    cfg.InactiveThreshold = NATS_SECONDS_TO_NANOS(1);
+    s = js_AddConsumer(&ci, js, "A", &cfg, NULL, &jerr);
+    testCond((s == NATS_OK)
+                && (strcmp(ci->Name, "a") == 0)
+                && (ci->Config->Durable == NULL)
+                && (ci->Config->InactiveThreshold == NATS_SECONDS_TO_NANOS(1))
+                && (jerr == 0));
+    jsConsumerInfo_Destroy(ci);
+    ci = NULL;
+
+    test("Check: ");
+    s = natsSubscription_NextMsg(&resp, sub, 1000);
+    testCond((s == NATS_OK)
+                && (resp != NULL)
+                && (strcmp(natsMsg_GetSubject(resp), "$JS.API.CONSUMER.CREATE.A.a") == 0)
+                && (strstr(natsMsg_GetData(resp), "\"name\":\"a\"") != NULL));
+    natsMsg_Destroy(resp);
+    resp = NULL;
+
+    test("Durable: ");
+    jsConsumerConfig_Init(&cfg);
+    cfg.Durable = "b";
+    cfg.AckPolicy = js_AckExplicit;
+    s = js_AddConsumer(&ci, js, "A", &cfg, NULL, &jerr);
+    testCond((s == NATS_OK)
+                && (strcmp(ci->Name, "b") == 0)
+                && (strcmp(ci->Config->Durable, "b") == 0)
+                && (ci->Config->InactiveThreshold == 0)
+                && (jerr == 0));
+    jsConsumerInfo_Destroy(ci);
+    ci = NULL;
+
+    test("Check: ");
+    s = natsSubscription_NextMsg(&resp, sub, 1000);
+    testCond((s == NATS_OK)
+                && (resp != NULL)
+                && (strcmp(natsMsg_GetSubject(resp), "$JS.API.CONSUMER.DURABLE.CREATE.A.b") == 0)
+                && (strstr(natsMsg_GetData(resp), "\"name\":") == NULL));
+    natsMsg_Destroy(resp);
+    resp = NULL;
+
+    test("Durable and Name same: ");
+    jsConsumerConfig_Init(&cfg);
+    cfg.Name = "b";
+    cfg.Durable = "b";
+    cfg.AckPolicy = js_AckExplicit;
+    s = js_AddConsumer(&ci, js, "A", &cfg, NULL, &jerr);
+    testCond((s == NATS_OK)
+                && (strcmp(ci->Name, "b") == 0)
+                && (strcmp(ci->Config->Durable, "b") == 0)
+                && (ci->Config->InactiveThreshold == 0)
+                && (jerr == 0));
+    jsConsumerInfo_Destroy(ci);
+    ci = NULL;
+
+    test("Check subject: ");
+    s = natsSubscription_NextMsg(&resp, sub, 1000);
+    testCond((s == NATS_OK)
+                && (resp != NULL)
+                && (strcmp(natsMsg_GetSubject(resp), "$JS.API.CONSUMER.CREATE.A.b") == 0)
+                && (strstr(natsMsg_GetData(resp), "\"name\":\"b\"") != NULL));
+    natsMsg_Destroy(resp);
+    resp = NULL;
+
+    test("Durable and Name different: ");
+    jsConsumerConfig_Init(&cfg);
+    cfg.Name = "x";
+    cfg.Durable = "y";
+    cfg.AckPolicy = js_AckExplicit;
+    s = js_AddConsumer(&ci, js, "A", &cfg, NULL, &jerr);
+    testCond((s == NATS_ERR)
+                && (jerr == JSConsumerDurableNameNotMatchSubjectErr)
+                && (strstr(nats_GetLastError(NULL), "consumer name in subject does not match durable name in request") != NULL));
+
+    test("Check subject: ");
+    s = natsSubscription_NextMsg(&resp, sub, 1000);
+    testCond((s == NATS_OK)
+                && (resp != NULL)
+                && (strcmp(natsMsg_GetSubject(resp), "$JS.API.CONSUMER.CREATE.A.x") == 0)
+                && (strstr(natsMsg_GetData(resp), "\"name\":\"x\"") != NULL));
+    natsMsg_Destroy(resp);
+    resp = NULL;
+
+    test("Ephemeral with filter: ");
+    jsConsumerConfig_Init(&cfg);
+    cfg.Name = "c";
+    cfg.AckPolicy = js_AckExplicit;
+    cfg.FilterSubject = "bar";
+    s = js_AddConsumer(&ci, js, "A", &cfg, NULL, &jerr);
+    testCond((s == NATS_OK)
+                && (strcmp(ci->Name, "c") == 0)
+                && (ci->Config->Durable == NULL)
+                && (ci->Config->InactiveThreshold != 0)
+                && (jerr == 0));
+    jsConsumerInfo_Destroy(ci);
+    ci = NULL;
+
+    test("Check subject: ");
+    s = natsSubscription_NextMsg(&resp, sub, 1000);
+    testCond((s == NATS_OK)
+                && (resp != NULL)
+                && (strcmp(natsMsg_GetSubject(resp), "$JS.API.CONSUMER.CREATE.A.c.bar") == 0)
+                && (strstr(natsMsg_GetData(resp), "\"name\":\"c\"") != NULL));
+    natsMsg_Destroy(resp);
+    resp = NULL;
+
+    test("Legacy ephemeral: ");
+    jsConsumerConfig_Init(&cfg);
+    cfg.AckPolicy = js_AckExplicit;
+    cfg.FilterSubject = "bar";
+    s = js_AddConsumer(&ci, js, "A", &cfg, NULL, &jerr);
+    testCond((s == NATS_OK)
+                && (ci->Name != NULL)
+                && (ci->Config->Durable == NULL)
+                && (ci->Config->InactiveThreshold != 0)
+                && (jerr == 0));
+    jsConsumerInfo_Destroy(ci);
+    ci = NULL;
+
+    test("Check subject: ");
+    s = natsSubscription_NextMsg(&resp, sub, 1000);
+    testCond((s == NATS_OK)
+                && (resp != NULL)
+                && (strcmp(natsMsg_GetSubject(resp), "$JS.API.CONSUMER.CREATE.A") == 0)
+                && (strstr(natsMsg_GetData(resp), "\"name\":") == NULL));
+    natsMsg_Destroy(resp);
+    resp = NULL;
+
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("List consumer infos (bad args): ");
+    s = js_Consumers(NULL, js, "A", NULL, NULL);
+    if (s == NATS_INVALID_ARG)
+        s = js_Consumers(&ciList, NULL, "A", NULL, NULL);
+    if (s == NATS_INVALID_ARG)
+        s = js_Consumers(&ciList, js, NULL, NULL, NULL);
+    if (s == NATS_INVALID_ARG)
+        s = js_Consumers(&ciList, js, "", NULL, NULL);
+    if (s == NATS_INVALID_ARG)
+        s = js_Consumers(&ciList, js, "invalid.stream.name", NULL, NULL);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("List consumer infos (unknown stream): ");
+    s = js_Consumers(&ciList, js, "unknown", NULL, &jerr);
+    testCond((s == NATS_NOT_FOUND) && (jerr == JSStreamNotFoundErr));
+    nats_clearLastError();
+
+    test("Create sub for pagination check: ");
+    s = natsConnection_SubscribeSync(&sub, nc, "$JS.API.CONSUMER.LIST.A");
+    testCond(s == NATS_OK);
+
+    natsConn_setFilterWithClosure(nc, _consumersInfoListReq, (void*) &count);
+
+    test("List consumers infos: ");
+    s = js_Consumers(&ciList, js, "A", NULL, &jerr);
+    testCond((s == NATS_OK) && (ciList != NULL) && (ciList->List != NULL) && (ciList->Count == 3));
+
+    natsConn_setFilter(nc, NULL);
+
+    test("Check 1st request: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    testCond((s == NATS_OK)
+                && (strstr(natsMsg_GetData(msg), "offset\":0") != NULL));
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Check 2nd request: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    testCond((s == NATS_OK)
+                && (strstr(natsMsg_GetData(msg), "offset\":2") != NULL));
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Check 3rd request: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    testCond((s == NATS_OK)
+                && (strstr(natsMsg_GetData(msg), "offset\":4") != NULL));
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("Destroy list: ");
+    // Will see with valgrind if this is doing the right thing
+    jsConsumerInfoList_Destroy(ciList);
+    ciList = NULL;
+    // Check this does not crash
+    jsConsumerInfoList_Destroy(ciList);
+    testCond(true);
+
+    // Do names now
+
+    test("List consumer names (bad args): ");
+    s = js_ConsumerNames(NULL, js, "A", NULL, NULL);
+    if (s == NATS_INVALID_ARG)
+        s = js_ConsumerNames(&cnList, NULL, "A", NULL, NULL);
+    if (s == NATS_INVALID_ARG)
+        s = js_ConsumerNames(&cnList, js, NULL, NULL, NULL);
+    if (s == NATS_INVALID_ARG)
+        s = js_ConsumerNames(&cnList, js, "", NULL, NULL);
+    if (s == NATS_INVALID_ARG)
+        s = js_ConsumerNames(&cnList, js, "invalid.stream.name", NULL, NULL);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("List consumer names (unknown stream): ");
+    s = js_ConsumerNames(&cnList, js, "unknown", NULL, &jerr);
+    testCond((s == NATS_NOT_FOUND) && (jerr == JSStreamNotFoundErr));
+    nats_clearLastError();
+
+    test("Create sub for pagination check: ");
+    s = natsConnection_SubscribeSync(&sub, nc, "$JS.API.CONSUMER.NAMES.A");
+    testCond(s == NATS_OK);
+
+    count = 0;
+    natsConn_setFilterWithClosure(nc, _consumerNamesListReq, (void*) &count);
+
+    test("List consumer names: ");
+    s = js_ConsumerNames(&cnList, js, "A", NULL, &jerr);
+    testCond((s == NATS_OK) && (cnList != NULL) && (cnList->List != NULL) && (cnList->Count == 3));
+
+    natsConn_setFilter(nc, NULL);
+
+    test("Check 1st request: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    testCond((s == NATS_OK)
+                && (strstr(natsMsg_GetData(msg), "offset\":0") != NULL));
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Check 2nd request: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    testCond((s == NATS_OK)
+                && (strstr(natsMsg_GetData(msg), "offset\":2") != NULL));
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Check 3rd request: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    testCond((s == NATS_OK)
+                && (strstr(natsMsg_GetData(msg), "offset\":4") != NULL));
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("Destroy list: ");
+    // Will see with valgrind if this is doing the right thing
+    jsConsumerNamesList_Destroy(cnList);
+    cnList = NULL;
+    // Check this does not crash
+    jsConsumerNamesList_Destroy(cnList);
+    testCond(true);
+
+    test("Check clone: ");
+    jsConsumerConfig_Init(&cfg);
+    cfg.Name = "A";
+    cfg.Durable = "B";
+    cfg.Description = "C";
+    cfg.FilterSubject = "D";
+    cfg.SampleFrequency = "E";
+    cfg.DeliverSubject = "F";
+    cfg.DeliverGroup = "G";
+    cfg.BackOff = (int64_t[]){NATS_MILLIS_TO_NANOS(50), NATS_MILLIS_TO_NANOS(250)};
+    cfg.BackOffLen = 2;
+    s = js_cloneConsumerConfig(&cfg, &cloneCfg);
+    testCond((s == NATS_OK) && (cloneCfg != NULL)
+                && (cloneCfg->Name != NULL) && (strcmp(cloneCfg->Name, "A") == 0)
+                && (cloneCfg->Durable != NULL) && (strcmp(cloneCfg->Durable, "B") == 0)
+                && (cloneCfg->Description != NULL) && (strcmp(cloneCfg->Description, "C") == 0)
+                && (cloneCfg->FilterSubject != NULL) && (strcmp(cloneCfg->FilterSubject, "D") == 0)
+                && (cloneCfg->SampleFrequency != NULL) && (strcmp(cloneCfg->SampleFrequency, "E") == 0)
+                && (cloneCfg->DeliverSubject != NULL) && (strcmp(cloneCfg->DeliverSubject, "F") == 0)
+                && (cloneCfg->DeliverGroup != NULL) && (strcmp(cloneCfg->DeliverGroup, "G") == 0)
+                && (cloneCfg->BackOffLen == 2)
+                && (cloneCfg->BackOff != NULL)
+                && (cloneCfg->BackOff[0] == NATS_MILLIS_TO_NANOS(50))
+                && (cloneCfg->BackOff[1] == NATS_MILLIS_TO_NANOS(250)));
+    js_destroyConsumerConfig(cloneCfg);
+
+    JS_TEARDOWN;
+}
+
+static void
+test_JetStreamPublish(void)
+{
+    natsStatus          s;
+    natsConnection      *nc = NULL;
+    jsCtx               *js = NULL;
+    natsPid             pid = NATS_INVALID_PID;
+    jsStreamConfig      cfg;
+    jsPubOptions        opts;
+    jsErrCode           jerr = 0;
+    jsPubAck            *pa = NULL;
+    natsMsg             *msg = NULL;
+    char                datastore[256] = {'\0'};
+    char                cmdLine[1024] = {'\0'};
+    char                confFile[256] = {'\0'};
+    jsOptions           o;
+
+    ENSURE_JS_VERSION(2, 3, 5);
+
+    _makeUniqueDir(datastore, sizeof(datastore), "datastore_");
+    _createConfFile(confFile, sizeof(confFile),
+        " jetstream: { domain: ABC }\n"
+    );
+
+    test("Start JS server: ");
+    snprintf(cmdLine, sizeof(cmdLine), "-js -sd %s -c %s", datastore, confFile);
+    pid = _startServer("nats://127.0.0.1:4222", cmdLine, true);
+    CHECK_SERVER_STARTED(pid);
+    testCond(true);
+
+    test("Connect: ");
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    testCond(s == NATS_OK);
+
+    test("Get context: ");
+    jsOptions_Init(&o);
+    o.Domain = "ABC";
+    s = natsConnection_JetStream(&js, nc, &o);
+    testCond(s == NATS_OK);
+
+    test("Stream config init: ");
+    s = jsStreamConfig_Init(&cfg);
+    testCond(s == NATS_OK);
+
+    test("Add stream: ");
+    cfg.Name = "TEST";
+    cfg.Subjects = (const char*[2]){"foo", "bar"};
+    cfg.SubjectsLen = 2;
+    s = js_AddStream(NULL, js, &cfg, NULL, NULL);
+    testCond(s == NATS_OK);
+
+    test("Publish bad args: ");
+    s = js_Publish(NULL, NULL, NULL, "hello", 5, NULL, &jerr);
+    if (s == NATS_INVALID_ARG)
+        s = js_Publish(NULL, js, NULL, "hello", 5, NULL, &jerr);
+    if (s == NATS_INVALID_ARG)
+        s = js_Publish(NULL, js, "", "hello", 5, NULL, &jerr);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Options init bad args: ");
+    s = jsPubOptions_Init(NULL);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Publish bad ttl option: ");
+    s = jsPubOptions_Init(&opts);
+    if (s == NATS_OK)
+    {
+        opts.MaxWait = -10;
+        s = js_Publish(NULL, js, "foo", "hello", 5, &opts, &jerr);
+    }
+    testCond((s == NATS_INVALID_ARG)
+                && (strstr(nats_GetLastError(NULL), "negative") != NULL));
+    nats_clearLastError();
+
+    test("Publish data: ");
+    opts.MaxWait = 3000;
+    s = js_Publish(NULL, js, "foo", "hello", 5, &opts, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Publish data with pubAck: ");
+    jsPubOptions_Init(&opts);
+    opts.MsgId = "msg2";
+    s = js_Publish(&pa, js, "foo", "hello", 5, &opts, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0) && (pa != NULL)
+                && (strcmp(pa->Domain, "ABC") == 0)
+                && (strcmp(pa->Stream, "TEST") == 0)
+                && (pa->Sequence == 2)
+                && !pa->Duplicate);
+    jsPubAck_Destroy(pa);
+    pa = NULL;
+    // Check this is ok
+    jsPubAck_Destroy(NULL);
+
+    test("Publish message with same msgID: ");
+    s = js_Publish(&pa, js, "foo", "hello", 5, &opts, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0) && (pa != NULL) && pa->Duplicate);
+    jsPubAck_Destroy(pa);
+    pa = NULL;
+
+    test("Publish with wrong expected stream: ");
+    jsPubOptions_Init(&opts);
+    opts.ExpectStream = "WRONG";
+    s = js_Publish(&pa, js, "foo", "hello", 5, &opts, &jerr);
+    testCond((s == NATS_ERR) && ((jerr == 0) || (jerr == JSStreamNotMatchErr)) && (pa == NULL));
+    jerr = 0;
+
+    test("Publish with wrong expected sequence: ");
+    jsPubOptions_Init(&opts);
+    opts.ExpectLastSeq = 4;
+    s = js_Publish(&pa, js, "foo", "hello", 5, &opts, &jerr);
+    testCond((s == NATS_ERR) && ((jerr == 0) || (jerr == JSStreamWrongLastSequenceErr)) && (pa == NULL));
+    jerr = 0;
+
+    test("Publish with wrong expected message ID: ");
+    jsPubOptions_Init(&opts);
+    opts.ExpectLastMsgId = "WRONG";
+    s = js_Publish(&pa, js, "foo", "hello", 5, &opts, &jerr);
+    testCond((s == NATS_ERR) && ((jerr == 0) || (jerr == JSStreamWrongLastMsgIDErr)) && (pa == NULL));
+    jerr = 0;
+
+    test("Publish 1 msg on bar: ");
+    jsPubOptions_Init(&opts);
+    s = js_Publish(&pa, js, "bar", "hello", 5, &opts, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0) && (pa != NULL)
+                && (strcmp(pa->Stream, "TEST") == 0)
+                && (pa->Sequence == 3)
+                && !pa->Duplicate);
+    jsPubAck_Destroy(pa);
+    pa = NULL;
+
+    test("Publish with wrong expected subj sequence: ");
+    jsPubOptions_Init(&opts);
+    // There should be 3 messages now, with "foo, 1", "foo, 2" and "bar, 3"
+    // We are going to send on "foo" and say that last expected msg seq on "foo"
+    // is 3, which is wrong, so should fail.
+    opts.ExpectLastSubjectSeq = 3;
+    s = js_Publish(&pa, js, "foo", "hello", 5, &opts, &jerr);
+    testCond((s == NATS_ERR) && ((jerr == 0) || (jerr == JSStreamWrongLastSequenceErr)) && (pa == NULL));
+    jerr = 0;
+    nats_clearLastError();
+
+    test("Publish with correct expected subj sequence: ");
+    // Now set last expected for subject to 2, and it should be ok, and the sequence will be 4.
+    opts.ExpectLastSubjectSeq = 2;
+    s = js_Publish(&pa, js, "foo", "hello", 5, &opts, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0) && (pa != NULL)
+                && (strcmp(pa->Stream, "TEST") == 0)
+                && (pa->Sequence == 4)
+                && !pa->Duplicate);
+    jsPubAck_Destroy(pa);
+    pa = NULL;
+
+    // ---- Same than above but with PublishMsg variant
+    test("Recreate stream: ");
+    s = js_DeleteStream(js, "TEST", NULL, NULL);
+    IFOK(s, js_AddStream(NULL, js, &cfg, NULL, NULL));
+    testCond(s == NATS_OK);
+
+    test("Publish bad args: ");
+    s = js_PublishMsg(NULL, NULL, NULL, NULL, NULL);
+    if (s == NATS_INVALID_ARG)
+        s = js_PublishMsg(NULL, js, NULL, NULL, NULL);
+    if (s == NATS_INVALID_ARG)
+        s = js_PublishMsg(NULL, NULL, msg, NULL, NULL);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Create msg: ");
+    s = natsMsg_Create(&msg, "foo", NULL, "hello", 5);
+    testCond(s == NATS_OK);
+
+    test("Publish bad ttl option: ");
+    s = jsPubOptions_Init(&opts);
+    if (s == NATS_OK)
+    {
+        opts.MaxWait = -10;
+        s = js_PublishMsg(NULL, js, msg, &opts, &jerr);
+    }
+    testCond((s == NATS_INVALID_ARG)
+                && (strstr(nats_GetLastError(NULL), "negative") != NULL));
+    nats_clearLastError();
+
+    test("Publish data: ");
+    opts.MaxWait = 3000;
+    s = js_PublishMsg(NULL, js, msg, &opts, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Publish data with pubAck: ");
+    jsPubOptions_Init(&opts);
+    opts.MsgId = "msg2";
+    s = js_PublishMsg(&pa, js, msg, &opts, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0) && (pa != NULL)
+                && (strcmp(pa->Stream, "TEST") == 0)
+                && (pa->Sequence == 2)
+                && !pa->Duplicate);
+    jsPubAck_Destroy(pa);
+    pa = NULL;
+    natsMsg_Destroy(msg);
+    msg = NULL;
+    natsMsg_Create(&msg, "foo", NULL, "hello", 5);
+
+    test("Publish message with same msgID: ");
+    s = js_PublishMsg(&pa, js, msg, &opts, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0) && (pa != NULL) && pa->Duplicate);
+    jsPubAck_Destroy(pa);
+    pa = NULL;
+    natsMsg_Destroy(msg);
+    msg = NULL;
+    natsMsg_Create(&msg, "foo", NULL, "hello", 5);
+
+    test("Publish with wrong expected stream: ");
+    jsPubOptions_Init(&opts);
+    opts.ExpectStream = "WRONG";
+    s = js_PublishMsg(&pa, js, msg, &opts, &jerr);
+    testCond((s == NATS_ERR) && ((jerr == 0) || (jerr == JSStreamNotMatchErr)) && (pa == NULL));
+    jerr = 0;
+    natsMsg_Destroy(msg);
+    msg = NULL;
+    natsMsg_Create(&msg, "foo", NULL, "hello", 5);
+
+    test("Publish with wrong expected sequence: ");
+    jsPubOptions_Init(&opts);
+    opts.ExpectLastSeq = 4;
+    s = js_PublishMsg(&pa, js, msg, &opts, &jerr);
+    testCond((s == NATS_ERR) && ((jerr == 0) || (jerr == JSStreamWrongLastSequenceErr)) && (pa == NULL));
+    jerr = 0;
+    natsMsg_Destroy(msg);
+    msg = NULL;
+    natsMsg_Create(&msg, "foo", NULL, "hello", 5);
+
+    test("Publish with wrong expected message ID: ");
+    jsPubOptions_Init(&opts);
+    opts.ExpectLastMsgId = "WRONG";
+    s = js_PublishMsg(&pa, js, msg, &opts, &jerr);
+    testCond((s == NATS_ERR) && ((jerr == 0) || (jerr == JSStreamWrongLastMsgIDErr)) && (pa == NULL));
+    jerr = 0;
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Publish 1 msg on bar: ");
+    jsPubOptions_Init(&opts);
+    natsMsg_Create(&msg, "bar", NULL, "hello", 5);
+    s = js_PublishMsg(&pa, js, msg, &opts, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0) && (pa != NULL)
+                && (strcmp(pa->Stream, "TEST") == 0)
+                && (pa->Sequence == 3)
+                && !pa->Duplicate);
+    jsPubAck_Destroy(pa);
+    pa = NULL;
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Publish with wrong expected subj sequence: ");
+    jsPubOptions_Init(&opts);
+    natsMsg_Create(&msg, "foo", NULL, "hello", 5);
+    // There should be 3 messages now, with "foo, 1", "foo, 2" and "bar, 3"
+    // We are going to send on "foo" and say that last expected msg seq on "foo"
+    // is 3, which is wrong, so should fail.
+    opts.ExpectLastSubjectSeq = 3;
+    s = js_PublishMsg(&pa, js, msg, &opts, &jerr);
+    testCond((s == NATS_ERR) && ((jerr == 0) || (jerr == JSStreamWrongLastSequenceErr)) && (pa == NULL));
+    jerr = 0;
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Publish with correct expected subj sequence: ");
+    natsMsg_Create(&msg, "foo", NULL, "hello", 5);
+    // Now set last expected for subject to 2, and it should be ok, and the sequence will be 4.
+    opts.ExpectLastSubjectSeq = 2;
+    s = js_PublishMsg(&pa, js, msg, &opts, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0) && (pa != NULL)
+                && (strcmp(pa->Stream, "TEST") == 0)
+                && (pa->Sequence == 4)
+                && !pa->Duplicate);
+    jsPubAck_Destroy(pa);
+    pa = NULL;
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    JS_TEARDOWN;
+    remove(confFile);
+}
+
+static void
+_jsPubAckErrHandler(jsCtx *js, jsPubAckErr *pae, void *closure)
+{
+    struct threadArg    *args = (struct threadArg*) closure;
+
+    natsMutex_Lock(args->m);
+    args->sum++;
+    if (strcmp(natsMsg_GetData(pae->Msg), "fail1") == 0)
+    {
+        if ((pae->Err == NATS_ERR)
+            && ((pae->ErrCode == 0) || (pae->ErrCode == JSStreamWrongLastMsgIDErr))
+            && (strstr(pae->ErrText, "wrong last") != NULL))
+        {
+            args->status = NATS_ERR;
+        }
+    }
+    else if (strcmp(natsMsg_GetData(pae->Msg), "fail2") == 0)
+    {
+        // Resend only once
+        if (args->sum == 2)
+            js_PublishMsgAsync(js, &(pae->Msg), NULL);
+    }
+    else if (strcmp(natsMsg_GetData(pae->Msg), "fail3") == 0)
+    {
+        while (!args->done)
+            natsCondition_Wait(args->c, args->m);
+
+        // Destroy context
+        jsCtx_Destroy(js);
+        // Notify that we are done
+        args->closed = true;
+        natsCondition_Broadcast(args->c);
+    }
+    else if (strcmp(natsMsg_GetData(pae->Msg), "block") == 0)
+    {
+        while (!args->done)
+            natsCondition_Wait(args->c, args->m);
+        nats_Sleep(500);
+
+        args->closed = true;
+        natsCondition_Broadcast(args->c);
+    }
+    else if (strcmp(natsMsg_GetData(pae->Msg), "destroyed") == 0)
+    {
+        // Notify that we are in the callback.
+        args->msgReceived = true;
+        natsCondition_Broadcast(args->c);
+
+        // Now wait to be notified that the context was destroyed.
+        while (!args->closed)
+            natsCondition_Wait(args->c, args->m);
+
+        // Then access the message content again to make sure that message
+        // is still valid.
+        if (strcmp(natsMsg_GetData(pae->Msg), "destroyed") != 0)
+            args->status = NATS_ERR;
+
+        // Notify that we are done.
+        args->done = true;
+        natsCondition_Broadcast(args->c);
+    }
+    else if ((pae->Err == NATS_NO_RESPONDERS) || (pae->Err == NATS_TIMEOUT))
+    {
+        args->msgReceived = true;
+        natsCondition_Broadcast(args->c);
+    }
+    natsMutex_Unlock(args->m);
+}
+
+static void
+test_JetStreamPublishAsync(void)
+{
+    natsStatus          s;
+    natsSubscription    *sub= NULL;
+    jsOptions           o;
+    jsStreamConfig      cfg;
+    jsPubOptions        opts;
+    natsMsg             *msg = NULL;
+    natsMsg             *cmsg = NULL;
+    natsMsg             *msg1 = NULL;
+    natsMsg             *msg2 = NULL;
+    const char          *val = NULL;
+    const char          **keys = NULL;
+    int                 keysCount = 0;
+    struct threadArg    args;
+    int                 i;
+    bool                ok1 = false;
+    bool                ok2 = false;
+    natsMsgList         pending;
+
+    JS_SETUP(2, 3, 3);
+    jsCtx_Destroy(js);
+    js = NULL;
+
+    s = _createDefaultThreadArgsForCbTests(&args);
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    test("Create control sub: ");
+    s = natsConnection_SubscribeSync(&sub, nc, "foo");
+    testCond(s == NATS_OK);
+
+    test("Prepare JS options: ");
+    s = jsOptions_Init(&o);
+    if (s == NATS_OK)
+    {
+        o.PublishAsync.ErrHandler        = _jsPubAckErrHandler;
+        o.PublishAsync.ErrHandlerClosure = &args;
+    }
+    testCond(s == NATS_OK);
+
+    test("Get context: ");
+    s = natsConnection_JetStream(&js, nc, &o);
+    testCond(s == NATS_OK);
+
+    test("Stream config init: ");
+    s = jsStreamConfig_Init(&cfg);
+    testCond(s == NATS_OK);
+
+    test("Add stream: ");
+    cfg.Name = "foo";
+    s = js_AddStream(NULL, js, &cfg, NULL, NULL);
+    testCond(s == NATS_OK);
+
+    test("Publish bad args: ");
+    s = js_PublishAsync(NULL, NULL, "hello", 5, NULL);
+    if (s == NATS_INVALID_ARG)
+        s = js_PublishAsync(js, NULL, "hello", 5, NULL);
+    if (s == NATS_INVALID_ARG)
+        s = js_PublishAsync(js, "", "hello", 5, NULL);
+    if (s == NATS_INVALID_ARG)
+        s = js_PublishAsync(NULL, "foo", "hello", 5, NULL);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("PublishAsyncComplete bad args: ");
+    s = js_PublishAsyncComplete(NULL, NULL);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("PublishAsyncComplete with no pending: ");
+    s = js_PublishAsyncComplete(js, NULL);
+    testCond(s == NATS_OK);
+
+    test("Publish data: ");
+    s = js_PublishAsync(js, "foo", "ok1", 3, NULL);
+    IFOK(s, js_PublishAsyncComplete(js, NULL));
+    testCond(s == NATS_OK);
+
+    test("Check pub msg no header and reply set: ");
+    s = natsSubscription_NextMsg(&cmsg, sub, 1000);
+    testCond((s == NATS_OK) && (cmsg != NULL)
+                && !nats_IsStringEmpty(natsMsg_GetReply(cmsg))
+                && (natsMsgHeader_Keys(cmsg, &keys, &keysCount) == NATS_NOT_FOUND));
+    natsMsg_Destroy(cmsg);
+
+    test("Publish msg (bad args): ");
+    s = js_PublishMsgAsync(NULL, NULL, NULL);
+    if (s == NATS_INVALID_ARG)
+        s = js_PublishMsgAsync(NULL, &msg, NULL);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Publish msg: ");
+    s = jsPubOptions_Init(&opts);
+    if (s == NATS_OK)
+        opts.MsgId = "msgID";
+    IFOK(s, natsMsg_Create(&msg, "foo", NULL, "ok2", 3));
+    IFOK(s, js_PublishMsgAsync(js, &msg, &opts));
+    // Check that library took ownership of message by checking
+    // that msg is now NULL.
+    testCond((s == NATS_OK) && (msg == NULL));
+
+    test("Check pub msg reply set: ");
+    s = natsSubscription_NextMsg(&cmsg, sub, 1000);
+    testCond((s == NATS_OK) && (cmsg != NULL)
+                && !nats_IsStringEmpty(natsMsg_GetReply(cmsg)));
+
+    test("Check msg ID header set: ");
+    s = natsMsgHeader_Get(cmsg, jsMsgIdHdr, &val);
+    testCond((s == NATS_OK) && (strcmp(val, "msgID") == 0));
+    natsMsg_Destroy(cmsg);
+    val = NULL;
+
+    test("Wait for complete (bad args): ");
+    opts.MaxWait = -1000;
+    s = js_PublishAsyncComplete(js, &opts);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Wait for complete: ");
+    opts.MaxWait = 1000;
+    s = js_PublishAsyncComplete(js, &opts);
+    testCond(s == NATS_OK);
+
+    test("Send fails due to wrong last ID: ");
+    args.status = NATS_OK;
+    opts.MsgId = NULL;
+    opts.ExpectLastMsgId = "wrong";
+    s = natsMsg_Create(&msg, "foo", NULL, "fail1", 5);
+    IFOK(s, js_PublishMsgAsync(js, &msg, &opts));
+    testCond((s == NATS_OK) && (msg == NULL));
+
+    test("Check pub msg reply set: ");
+    s = natsSubscription_NextMsg(&cmsg, sub, 1000);
+    testCond((s == NATS_OK) && (cmsg != NULL)
+                && !nats_IsStringEmpty(natsMsg_GetReply(cmsg)));
+
+    test("Check msg ID header not set: ");
+    s = natsMsgHeader_Get(cmsg, jsMsgIdHdr, &val);
+    testCond((s == NATS_NOT_FOUND) && (val == NULL));
+
+    test("Check expect last msg ID header set: ");
+    s = natsMsgHeader_Get(cmsg, jsExpectedLastMsgIdHdr, &val);
+    testCond((s == NATS_OK) && (val != NULL) && (strcmp(val, "wrong") == 0));
+    natsMsg_Destroy(cmsg);
+    val = NULL;
+
+    test("Wait for complete: ");
+    s = js_PublishAsyncComplete(js, NULL);
+    testCond(s == NATS_OK);
+
+    test("Check cb got proper failure: ")
+    natsMutex_Lock(args.m);
+    s = ((args.status == NATS_ERR) && (args.sum == 1) ? NATS_OK : NATS_ERR);
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_OK);
+
+    test("Send new failed message, will be resent in cb: ");
+    s = js_PublishAsync(js, "foo", "fail2", 5, &opts);
+    testCond(s == NATS_OK);
+
+    test("Wait complete: ")
+    s = js_PublishAsyncComplete(js, NULL);
+    if (s == NATS_OK)
+    {
+        natsMutex_Lock(args.m);
+        s = (args.sum == 3 ? NATS_OK : NATS_ERR);
+        natsMutex_Unlock(args.m);
+    }
+    testCond(s == NATS_OK);
+
+    test("Send new failed messages which will block cb: ");
+    s = js_PublishAsync(js, "foo", "fail3", 5, &opts);
+    // Send another message, which should not be delivered to CB
+    // since we will destroy context from CB on releasing CB
+    // after fail3 msg is processed.
+    IFOK(s, js_PublishAsync(js, "foo", "fail4", 5, &opts));
+    testCond(s == NATS_OK);
+
+    test("Check complete timeout: ");
+    opts.MaxWait = 100;
+    s = js_PublishAsyncComplete(js, &opts);
+    testCond(s == NATS_TIMEOUT);
+    nats_clearLastError();
+
+    test("Release cb which will destroy context: ");
+    s = NATS_OK;
+    natsMutex_Lock(args.m);
+    args.done = true;
+    natsCondition_Broadcast(args.c);
+    while ((s != NATS_TIMEOUT) && !args.closed)
+        s = natsCondition_TimedWait(args.c, args.m, 2000);
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_OK);
+
+    test("Check that last msg was not delivered to CB: ");
+    natsMutex_Lock(args.m);
+    // cb has seen: fail1, fail2 twice, fail3, so sum == 4
+    s = (args.sum == 4 ? NATS_OK: NATS_ERR);
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_OK);
+
+    js = NULL;
+    jsOptions_Init(&o);
+    test("Stall wait bad args: ");
+    o.PublishAsync.StallWait = -10;
+    s = natsConnection_JetStream(&js, nc, &o);
+    testCond((s == NATS_INVALID_ARG) && (js == NULL));
+    nats_clearLastError();
+
+    test("Recreate context: ");
+    o.PublishAsync.MaxPending        = 1;
+    o.PublishAsync.StallWait         = 100;
+    o.PublishAsync.ErrHandler        = _jsPubAckErrHandler;
+    o.PublishAsync.ErrHandlerClosure = &args;
+    s = natsConnection_JetStream(&js, nc, &o);
+    testCond(s == NATS_OK);
+
+    test("Block CB: ");
+    natsMutex_Lock(args.m);
+    args.done = false;
+    args.closed = false;
+    natsMutex_Unlock(args.m);
+    // Pass options so that we add an expected last msg ID which will
+    // cause failure.
+    jsPubOptions_Init(&opts);
+    opts.ExpectLastMsgId = "WRONG";
+    s = js_PublishAsync(js, "foo", "block", 5, &opts);
+    testCond(s == NATS_OK);
+
+    test("Send should fail due to stall: ");
+    s = js_PublishAsync(js, "foo", "stalled", 7, NULL);
+    testCond((s == NATS_TIMEOUT)
+                && (strstr(nats_GetLastError(NULL), "too many outstanding") != NULL));
+    nats_clearLastError();
+
+    // Release CB, which will sleep a bit before returning, so that we
+    // have time to start a publish here that we will check gets unstalled.
+    // Artificially increase the stallWait so that we don't flap on Travis/etc..
+    natsMutex_Lock(js->mu);
+    js->opts.PublishAsync.StallWait = 10000;
+    natsMutex_Unlock(js->mu);
+    // should unstall the publish that we are going to make here.
+    natsMutex_Lock(args.m);
+    args.done = true;
+    natsCondition_Broadcast(args.c);
+    natsMutex_Unlock(args.m);
+
+    test("Pub will stall: ");
+    s = js_PublishAsync(js, "foo", "ok", 2, NULL);
+    testCond(s == NATS_OK);
+
+    test("Wait complete: ");
+    s = js_PublishAsyncComplete(js, NULL);
+    testCond(s == NATS_OK);
+
+    test("Wait for CB to return: ");
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && !args.closed)
+        s = natsCondition_TimedWait(args.c, args.m, 2000);
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_OK);
+
+    test("Msg needs to be destroyed on failure: ");
+    natsSubscription_Destroy(sub);
+    natsConnection_Destroy(nc);
+    nc = NULL;
+    s = natsMsg_Create(&msg, "foo", NULL, "conclosed", 9);
+    IFOK(s, js_PublishMsgAsync(js, &msg, NULL));
+    testCond((s == NATS_CONNECTION_CLOSED) && (msg != NULL));
+    nats_clearLastError();
+
+    test("Msg destroy: ");
+    natsMsg_Destroy(msg);
+    testCond(true);
+
+    jsCtx_Destroy(js);
+    js = NULL;
+
+    test("Connect: ");
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    testCond(s == NATS_OK);
+
+    test("Create context: ");
+    s = jsOptions_Init(&o);
+    if (s == NATS_OK)
+    {
+        o.PublishAsync.ErrHandler        = _jsPubAckErrHandler;
+        o.PublishAsync.ErrHandlerClosure = &args;
+    }
+    IFOK(s, natsConnection_JetStream(&js, nc, &o));
+    testCond((s == NATS_OK) && (js != NULL));
+
+    test("Publish async no responders: ");
+    s = js_PublishAsync(js, "no.responder.check", "hello", 5, NULL);
+    if (s == NATS_OK)
+    {
+        natsMutex_Lock(args.m);
+        while ((s != NATS_TIMEOUT) && !args.msgReceived)
+            s = natsCondition_TimedWait(args.c, args.m, 2000);
+        args.msgReceived = false;
+        natsMutex_Unlock(args.m);
+    }
+    testCond(s == NATS_OK);
+
+    test("Enqueue message with bad subject: ");
+    s = natsMsg_Create(&msg, "some.subject", NULL, "hello", 5);
+    if (s == NATS_OK)
+    {
+        natsSubscription *rsub;
+
+        js_lock(js);
+        rsub = js->rsub;
+        js_unlock(js);
+
+        _waitSubPending(rsub, 0);
+
+        natsSub_Lock(rsub);
+        rsub->msgList.head = msg;
+        rsub->msgList.tail = msg;
+        rsub->msgList.msgs = 1;
+        rsub->msgList.bytes = natsMsg_dataAndHdrLen(msg);
+        natsCondition_Signal(rsub->cond);
+        natsSub_Unlock(rsub);
+
+        // Message is owned by subscription, do not destroy it here.
+    }
+    testCond(s == NATS_OK);
+
+    test("Publish async cb received non existent pid: ");
+    {
+        char subj[64];
+        snprintf(subj, sizeof(subj), "%sabcdefgh", js->rpre);
+        s = natsConnection_Publish(nc, subj, NULL, 0);
+    }
+    testCond(s == NATS_OK);
+
+    test("Produce failed message: ");
+    jsPubOptions_Init(&opts);
+    opts.ExpectStream = "WRONG";
+    natsMutex_Lock(args.m);
+    args.done        = false;
+    args.closed      = false;
+    args.msgReceived = false;
+    args.status      = NATS_OK;
+    natsMutex_Unlock(args.m);
+    // Pass options with wrong expected stream, so pub will fail.
+    s = js_PublishAsync(js, "foo", "destroyed", 9, &opts);
+    testCond(s == NATS_OK);
+
+    test("Wait for msg in CB: ");
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && !args.msgReceived)
+        s = natsCondition_TimedWait(args.c, args.m, 2000);
+    args.msgReceived = false;
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_OK);
+
+    test("Destroy context, notify CB: ");
+    jsCtx_Destroy(js);
+    js = NULL;
+    natsMutex_Lock(args.m);
+    args.closed = true;
+    natsCondition_Broadcast(args.c);
+    natsMutex_Unlock(args.m);
+    testCond(true);
+
+    test("Wait for CB to return: ");
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && !args.done)
+        s = natsCondition_TimedWait(args.c, args.m, 2000);
+    if (s == NATS_OK)
+        s = args.status;
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_OK);
+
+    test("Reply subject can be set: ");
+    s = natsConnection_JetStream(&js, nc, NULL);
+    IFOK(s, natsMsg_Create(&msg, "bar", "baz", "bat", 3));
+    IFOK(s, js_PublishMsgAsync(js, &msg, NULL));
+    testCond((s == NATS_OK) && (msg == NULL));
+
+    test("Wait complete: ");
+    s = js_PublishAsyncComplete(js, NULL);
+    testCond(s == NATS_OK);
+
+    test("Publish async: ");
+    _stopServer(pid);
+    pid = NATS_INVALID_PID;
+    s = natsMsg_Create(&msg1, "foo", NULL, "hello1", 6);
+    IFOK(s, natsMsg_Create(&msg2, "foo", NULL, "hello2", 6));
+    IFOK(s, js_PublishMsgAsync(js, &msg1, NULL));
+    IFOK(s, js_PublishMsgAsync(js, &msg2, NULL));
+    testCond((s == NATS_OK) && (msg1 == NULL) && (msg2 == NULL));
+
+    test("Get pending (bad args): ");
+    s = js_PublishAsyncGetPendingList(NULL, NULL);
+    if (s == NATS_INVALID_ARG)
+        s = js_PublishAsyncGetPendingList(&pending, NULL);
+    if (s == NATS_INVALID_ARG)
+        s = js_PublishAsyncGetPendingList(NULL, js);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Get pending: ");
+    s = js_PublishAsyncGetPendingList(&pending, js);
+    testCond((s == NATS_OK)
+                && (pending.Msgs != NULL)
+                && (pending.Count == 2));
+
+    test("Verify pending list: ");
+    for (i=0; i<pending.Count; i++)
+    {
+        natsMsg *msg = pending.Msgs[i];
+
+        // Cannot assume order, but we should get hello1 and hello2 in all.
+        if (strncmp(natsMsg_GetData(msg), "hello1", 6) == 0)
+        {
+            ok1 = true;
+            msg1 = msg;
+            pending.Msgs[i] = NULL;
+        }
+        else if (strncmp(natsMsg_GetData(msg), "hello2", 6) == 0)
+            ok2 = true;
+    }
+    testCond(ok1 && ok2 && (msg1 != NULL));
+
+    test("Destroy list leaves msg1 valid: ");
+    natsMsgList_Destroy(&pending);
+    // Access something from msg1 to make sure that memory is still valid
+    s = (strncmp(natsMsg_GetData(msg1), "hello1", 6) == 0 ? NATS_OK : NATS_ERR);
+    testCond(s == NATS_OK);
+    natsMsg_Destroy(msg1);
+    msg1 = NULL;
+
+    test("Get pending, no msg: ");
+    s = js_PublishAsyncGetPendingList(&pending, js);
+    testCond((s == NATS_NOT_FOUND) && (pending.Msgs == NULL) && (pending.Count == 0));
+
+    test("Publish async: ");
+    s = natsMsg_Create(&msg1, "foo", NULL, "hello1", 6);
+    IFOK(s, natsMsg_Create(&msg2, "foo", NULL, "hello2", 6));
+    IFOK(s, js_PublishMsgAsync(js, &msg1, NULL));
+    IFOK(s, js_PublishMsgAsync(js, &msg2, NULL));
+    testCond((s == NATS_OK) && (msg1 == NULL) && (msg2 == NULL));
+
+    test("Get pending: ");
+    s = js_PublishAsyncGetPendingList(&pending, js);
+    testCond((s == NATS_OK)
+                && (pending.Msgs != NULL)
+                && (pending.Count == 2));
+
+    msg1 = pending.Msgs[0];
+    msg2 = pending.Msgs[1];
+
+    test("Check that if Msgs set to NULL, no crash: ");
+    {
+        natsMsg **l  = pending.Msgs;
+        pending.Msgs = NULL;
+        natsMsgList_Destroy(&pending);
+        free(l);
+    }
+    testCond(true);
+
+    natsMsg_Destroy(msg1);
+    natsMsg_Destroy(msg2);
+
+    test("Publish timeout: ");
+    jsCtx_Destroy(js);
+    js = NULL;
+    o.PublishAsync.ErrHandler = _jsPubAckErrHandler;
+    o.PublishAsync.ErrHandlerClosure = (void*) &args;
+    s = natsConnection_JetStream(&js, nc, &o);
+    if (s == NATS_OK)
+    {
+        opts.MaxWait = 100;
+        s = js_PublishAsync(js, "foo", "timeout", 7, &opts);
+    }
+    if (s == NATS_OK)
+    {
+        natsMutex_Lock(args.m);
+        while ((s != NATS_TIMEOUT) && !args.msgReceived)
+            s = natsCondition_TimedWait(args.c, args.m, 2000);
+        args.msgReceived = false;
+        natsMutex_Unlock(args.m);
+    }
+    testCond(s == NATS_OK);
+
+    JS_TEARDOWN;
+    _destroyDefaultThreadArgs(&args);
+}
+
+static void
+_jsPubAckHandler(jsCtx *js, natsMsg *msg, jsPubAck *pa, jsPubAckErr *pae, void *closure)
+{
+    struct threadArg *args = (struct threadArg*) closure;
+
+    natsMutex_Lock(args->m);
+    args->sum++;
+    args->status = NATS_ERR;
+    switch (args->sum) {
+        case 1:
+            if ((pae == NULL) && (pa != NULL)
+                && ((pa->Stream != NULL) && (strcmp(pa->Stream, "TEST") == 0))
+                && (pa->Sequence == 1))
+            {
+                // Test resending message from callback...
+                args->status = js_PublishMsgAsync(js, &msg, NULL);
+            }
+            break;
+        case 2:
+            if ((pae == NULL) && (pa != NULL)
+                && ((pa->Stream != NULL) && (strcmp(pa->Stream, "TEST") == 0))
+                && (pa->Sequence == 1) && (pa->Duplicate))
+            {
+                args->status = NATS_OK;
+            }
+            break;
+        case 3:
+            if ((pa == NULL) && (pae != NULL)
+                && (pae->Err == NATS_ERR) && (pae->ErrCode == JSStreamStoreFailedErr)
+                && (strstr(pae->ErrText, "maximum messages exceeded") != NULL))
+            {
+                args->status = NATS_OK;
+            }
+            break;
+        case 4:
+            if ((msg != NULL) && (natsMsg_GetData(msg)[0] == '1')
+                && (pa == NULL) && (pae != NULL)
+                && (pae->Err == NATS_TIMEOUT) && (pae->ErrCode == 0))
+            {
+                args->status = NATS_OK;
+            }
+            break;
+        case 5:
+            if ((msg != NULL) && (natsMsg_GetData(msg)[0] == '2')
+                && (pa == NULL) && (pae != NULL)
+                && (pae->Err == NATS_TIMEOUT) && (pae->ErrCode == 0))
+            {
+                args->status = NATS_OK;
+            }
+            break;
+        case 6:
+            if ((msg != NULL) && (natsMsg_GetData(msg)[0] == '3')
+                    && (pa == NULL) && (pae != NULL)
+                    && (pae->Err == NATS_TIMEOUT) && (pae->ErrCode == 0))
+            {
+                args->status = NATS_OK;
+            }
+            break;
+    }
+    natsMsg_Destroy(msg);
+    args->done = true;
+    natsCondition_Broadcast(args->c);
+    natsMutex_Unlock(args->m);
+}
+
+static natsStatus
+_checkPubAckResult(natsStatus s, struct threadArg *args)
+{
+    if (s != NATS_OK)
+        return s;
+
+    natsMutex_Lock(args->m);
+    while ((s != NATS_TIMEOUT) && !args->done)
+        s = natsCondition_TimedWait(args->c, args->m, 1000);
+    IFOK(s, args->status);
+    args->done = false;
+    args->status = NATS_OK;
+    natsMutex_Unlock(args->m);
+
+    return s;
+}
+
+static void
+test_JetStreamPublishAckHandler(void)
+{
+    natsStatus          s;
+    jsOptions           o;
+    jsStreamConfig      cfg;
+    jsPubOptions        opts;
+    // natsMsg             *msg = NULL;
+    struct threadArg    args;
+
+
+    JS_SETUP(2, 3, 3);
+    jsCtx_Destroy(js);
+    js = NULL;
+
+    s = _createDefaultThreadArgsForCbTests(&args);
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    test("Prepare JS options: ");
+    s = jsOptions_Init(&o);
+    if (s == NATS_OK)
+    {
+        o.PublishAsync.AckHandler        = _jsPubAckHandler;
+        o.PublishAsync.AckHandlerClosure = &args;
+    }
+    testCond(s == NATS_OK);
+
+    test("Get context: ");
+    s = natsConnection_JetStream(&js, nc, &o);
+    testCond(s == NATS_OK);
+
+    test("Add stream: ");
+    jsStreamConfig_Init(&cfg);
+    cfg.Name = "TEST";
+    cfg.Subjects = (const char*[1]){"foo"};
+    cfg.SubjectsLen = 1;
+    cfg.MaxMsgs = 1;
+    cfg.Discard = js_DiscardNew;
+    s = js_AddStream(NULL, js, &cfg, NULL, NULL);
+    testCond(s == NATS_OK);
+
+    test("Publish async ok: ");
+    jsPubOptions_Init(&opts);
+    opts.MsgId = "msg1";
+    s = js_PublishAsync(js, "foo", (const void*) "ok", 2, &opts);
+    s = _checkPubAckResult(s, &args);
+    testCond(s == NATS_OK);
+
+    test("Publish async (duplicate): ");
+    // Message above is resent from the ack handler callback.
+    s = _checkPubAckResult(s, &args);
+    testCond(s == NATS_OK);
+
+    test("Publish async (max msgs): ");
+    s = js_PublishAsync(js, "foo", (const void*) "ok", 2, NULL);
+    s = _checkPubAckResult(s, &args);
+    testCond(s == NATS_OK);
+
+    _stopServer(pid);
+    pid = NATS_INVALID_PID;
+
+    test("Publish async with timeouts: ");
+    opts.MsgId = NULL;
+    opts.MaxWait = 250;
+    s = js_PublishAsync(js, "foo", (const void*) "2", 1, &opts);
+    opts.MaxWait = 500;
+    IFOK(s, js_PublishAsync(js, "foo", (const void*) "3", 1, &opts));
+    opts.MaxWait = 100;
+    IFOK(s, js_PublishAsync(js, "foo", (const void*) "1", 1, &opts));
+    testCond(s == NATS_OK);
+
+    test("Publish async timeout (1): ");
+    s = _checkPubAckResult(s, &args);
+    testCond(s == NATS_OK);
+
+    test("Publish async timeout (2): ");
+    s = _checkPubAckResult(s, &args);
+    testCond(s == NATS_OK);
+
+    test("Publish async timeout (3): ");
+    s = _checkPubAckResult(s, &args);
+    testCond(s == NATS_OK);
+
+    test("Ctx destroy releases timer: ");
+    opts.MaxWait = 250;
+    s = js_PublishAsync(js, "foo", (const void*) "4", 1, &opts);
+    IFOK(s, js_PublishAsync(js, "foo", (const void*) "5", 1, &opts));
+    if (s == NATS_OK)
+    {
+        js_lock(js);
+        js->refs++;
+        nats_Sleep(300);
+        jsCtx_Destroy(js);
+        js_unlock(js);
+    }
+    testCond(s == NATS_OK);
+
+    test("Check refs: ");
+    nats_Sleep(100);
+    js_lock(js);
+    s = (js->refs == 1 ? NATS_OK : NATS_ERR);
+    js_unlock(js);
+    testCond(s == NATS_OK);
+
+    js_release(js);
+    nats_Sleep(100);
+    js = NULL;
+
+    JS_TEARDOWN;
+    _destroyDefaultThreadArgs(&args);
+}
+
+static void
+_jsMsgHandler(natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure)
+{
+    struct threadArg *args = (struct threadArg*) closure;
+
+    natsMutex_Lock(args->m);
+    args->sum++;
+    if (args->control == 1)
+        natsMsg_Ack(msg, NULL);
+    else if (args->control == 3)
+    {
+        if (args->sum == 1)
+            natsMsg_Nak(msg, NULL);
+        else
+        {
+            while (!args->done)
+                natsCondition_Wait(args->c, args->m);
+            args->msgReceived = true;
+        }
+    }
+    if ((args->control != 2) || (args->sum == args->results[0]))
+        natsCondition_Broadcast(args->c);
+    natsMutex_Unlock(args->m);
+
+    natsMsg_Destroy(msg);
+}
+
+static void
+_jsSubComplete(void *closure)
+{
+    struct threadArg *args = (struct threadArg*) closure;
+
+    natsMutex_Lock(args->m);
+    args->done = true;
+    natsCondition_Broadcast(args->c);
+    natsMutex_Unlock(args->m);
+}
+
+static void
+_jsCreateSubThread(void *closure)
+{
+    struct threadArg    *args = (struct threadArg*) closure;
+    natsStatus          s;
+    jsCtx               *js;
+    jsSubOptions        so;
+    natsSubscription    *sub = NULL;
+
+    natsMutex_Lock(args->m);
+    js = args->js;
+    natsMutex_Unlock(args->m);
+
+    nats_Sleep(100);
+
+    jsSubOptions_Init(&so);
+    so.Stream = "TEST_CONCURRENT";
+    so.Config.Durable = "my_durable";
+    s = js_Subscribe(&sub, js, "concurrent", _jsMsgHandler, (void*) args, NULL, &so, NULL);
+    if (s == NATS_OK)
+    {
+        natsMutex_Lock(args->m);
+        args->attached++;
+        args->sub = sub;
+        natsMutex_Unlock(args->m);
+    }
+    else
+    {
+        natsMutex_Lock(args->m);
+        args->detached++;
+        natsMutex_Unlock(args->m);
+    }
+}
+
+static void
+_jsDrainErrCb(natsConnection *nc, natsSubscription *sub, natsStatus err, void *closure)
+{
+    struct threadArg *args = (struct threadArg*) closure;
+
+    natsMutex_Lock(args->m);
+    if ((err == NATS_NOT_FOUND)
+            && (strstr(nats_GetLastError(NULL), "delete consumer") != NULL))
+    {
+        args->msgReceived = true;
+        natsCondition_Broadcast(args->c);
+    }
+    natsMutex_Unlock(args->m);
+}
+
+static void
+test_JetStreamSubscribe(void)
+{
+    natsStatus          s;
+    natsOptions         *ncOpts = NULL;
+    natsConnection      *nc = NULL;
+    natsSubscription    *sub= NULL;
+    jsCtx               *js = NULL;
+    natsPid             pid = NATS_INVALID_PID;
+    jsErrCode           jerr= 0;
+    char                datastore[256] = {'\0'};
+    char                cmdLine[1024] = {'\0'};
+    natsSubscription    *ackSub = NULL;
+    natsMsg             *ack = NULL;
+    natsSubscription    *sub2= NULL;
+    jsStreamConfig      sc;
+    jsConsumerConfig    cc;
+    jsSubOptions        so;
+    struct threadArg    args;
+    int                 i;
+    jsConsumerInfo      *ci = NULL;
+#ifndef _WIN32
+    char                longsn[256];
+#endif
+    natsThread          *threads[10] = {NULL};
+
+    ENSURE_JS_VERSION(2, 3, 5);
+
+    s = _createDefaultThreadArgsForCbTests(&args);
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    _makeUniqueDir(datastore, sizeof(datastore), "datastore_");
+
+    test("Start JS server: ");
+    snprintf(cmdLine, sizeof(cmdLine), "-js -sd %s", datastore);
+    pid = _startServer("nats://127.0.0.1:4222", cmdLine, true);
+    CHECK_SERVER_STARTED(pid);
+    testCond(true);
+
+    test("Create options: ");
+    s = natsOptions_Create(&ncOpts);
+    IFOK(s, natsOptions_SetErrorHandler(ncOpts, _jsDrainErrCb, (void*) &args));
+    testCond(s == NATS_OK);
+
+    test("Connect: ");
+    s = natsConnection_Connect(&nc, ncOpts);
+    testCond(s == NATS_OK);
+
+    test("Get context: ");
+    s = natsConnection_JetStream(&js, nc, NULL);
+    testCond(s == NATS_OK);
+
+    test("Sub options init (bad args): ");
+    s = jsSubOptions_Init(NULL);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Create async sub (invalid args): ");
+    s = js_Subscribe(NULL, js, "foo", NULL, NULL, NULL, NULL, &jerr);
+    if (s == NATS_INVALID_ARG)
+        s = js_Subscribe(&sub, NULL, "foo", NULL, NULL, NULL, NULL, &jerr);
+    if (s == NATS_INVALID_ARG)
+        s = js_Subscribe(&sub, js, NULL, NULL, NULL, NULL, NULL, &jerr);
+    if (s == NATS_INVALID_ARG)
+        s = js_Subscribe(&sub, js, "", NULL, NULL, NULL, NULL, &jerr);
+    if (s == NATS_INVALID_ARG)
+        s = js_Subscribe(&sub, js, "foo", NULL, NULL, NULL, NULL, &jerr);
+    testCond((s == NATS_INVALID_ARG) && (sub == NULL) && (jerr == 0));
+    nats_clearLastError();
+
+    test("Create, no stream exists: ");
+    s = js_Subscribe(&sub, js, "foo", _dummyMsgHandler, NULL, NULL, NULL, &jerr);
+    testCond((s != NATS_OK) && (sub == NULL)
+                && (strstr(nats_GetLastError(NULL), jsErrNoStreamMatchesSubject) != NULL));
+    nats_clearLastError();
+
+    test("Create stream: ");
+    jsStreamConfig_Init(&sc);
+    sc.Name = "TEST";
+    sc.Subjects = (const char*[1]){"foo"};
+    sc.SubjectsLen = 1;
+    s = js_AddStream(NULL, js, &sc, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Populate: ");
+    s = js_Publish(NULL, js, "foo", "msg1", 4, NULL, &jerr);
+    IFOK(s, js_Publish(NULL, js, "foo", "msg2", 4, NULL, &jerr));
+    IFOK(s, js_Publish(NULL, js, "foo", "msg3", 4, NULL, &jerr));
+    testCond(s == NATS_OK);
+
+    test("Create sub to check lib sends ACKs: ");
+    s = natsConnection_SubscribeSync(&ackSub, nc, "$JS.ACK.TEST.>");
+    testCond(s == NATS_OK);
+
+    test("Subscribe, no options: ");
+    s = js_Subscribe(&sub, js, "foo", _jsMsgHandler, &args, NULL, NULL, &jerr);
+    testCond((s == NATS_OK) && (sub != NULL) && (jerr == 0));
+
+    test("Check msgs received: ");
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && (args.sum != 3))
+        s = natsCondition_TimedWait(args.c, args.m, 2000);
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_OK);
+
+    test("Check acks sent: ");
+    // Sub should have its own autoAck CB, so usrCb should be != NULL
+    natsMutex_Lock(sub->mu);
+    s = (sub->jsi->usrCb != NULL ? NATS_OK : NATS_ERR);
+    natsMutex_Unlock(sub->mu);
+    for (i=0; (s == NATS_OK) && (i < 3); i++)
+    {
+        s = natsSubscription_NextMsg(&ack, ackSub, 1000);
+        if (s == NATS_OK)
+        {
+            // Make sure this was not a sync call...
+            s = (natsMsg_GetReply(ack) == NULL ? NATS_OK : NATS_ERR);
+        }
+        natsMsg_Destroy(ack);
+        ack = NULL;
+    }
+    testCond(s == NATS_OK);
+
+    test("Create sub with manual ack: ");
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+    natsMutex_Lock(args.m);
+    args.control = 1;
+    args.sum = 0;
+    natsMutex_Unlock(args.m);
+    jsSubOptions_Init(&so);
+    so.ManualAck = true;
+    s = js_Subscribe(&sub, js, "foo", _jsMsgHandler, (void*) &args, NULL, &so, &jerr);
+    testCond((s == NATS_OK) && (sub != NULL) && (jerr == 0));
+
+    test("Check msgs received: ");
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && (args.sum != 3))
+        s = natsCondition_TimedWait(args.c, args.m, 2000);
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_OK);
+
+    test("Check acks sent: ");
+    // Sub should have NOT have its own autoAck CB, so usrCb should be NULL
+    natsMutex_Lock(sub->mu);
+    s = (sub->jsi->usrCb == NULL ? NATS_OK : NATS_ERR);
+    natsMutex_Unlock(sub->mu);
+    for (i=0; (s == NATS_OK) && (i < 3); i++)
+    {
+        s = natsSubscription_NextMsg(&ack, ackSub, 1000);
+        natsMsg_Destroy(ack);
+        ack = NULL;
+    }
+    testCond(s == NATS_OK);
+
+    test("Check no auto-ack behavior: ");
+    s = natsSubscription_NextMsg(&ack, ackSub, 150);
+    testCond((s == NATS_TIMEOUT) && (ack == NULL));
+    nats_clearLastError();
+
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("Create sub with auto-ack: ");
+    natsMutex_Lock(args.m);
+    args.control = 3;
+    args.sum = 0;
+    natsMutex_Unlock(args.m);
+    jsSubOptions_Init(&so);
+    so.Stream = "TEST";
+    so.Config.DeliverPolicy = js_DeliverLast;
+    s = js_Subscribe(&sub, js, "foo", _jsMsgHandler, (void*)&args, NULL, &so, &jerr);
+    testCond((s == NATS_OK) && (sub != NULL) && (jerr == 0));
+
+    test("Check msgs received: ");
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && (args.sum < 1))
+        s = natsCondition_TimedWait(args.c, args.m, 2000);
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_OK);
+
+    test("Check NAck sent: ");
+    s = natsSubscription_NextMsg(&ack, ackSub, 1000);
+    testCond(s == NATS_OK);
+    natsMsg_Destroy(ack);
+    ack = NULL;
+
+    test("Check no auto-ack: ");
+    s = natsSubscription_NextMsg(&ack, ackSub, 100);
+    testCond((s == NATS_TIMEOUT) && (ack == NULL));
+    nats_clearLastError();
+    s = NATS_OK;
+
+    natsMutex_Lock(args.m);
+    args.done = true;
+    natsCondition_Broadcast(args.c);
+    while ((s != NATS_TIMEOUT) && !args.msgReceived)
+        s = natsCondition_TimedWait(args.c, args.m, 1000);
+    args.done = false;
+    args.msgReceived = false;
+    natsMutex_Unlock(args.m);
+
+    test("Check auto-ack sent: ");
+    s = natsSubscription_NextMsg(&ack, ackSub, 1000);
+    testCond(s == NATS_OK);
+    natsMsg_Destroy(ack);
+    ack = NULL;
+
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("Create queue sub: ");
+    natsMutex_Lock(args.m);
+    args.control = 0;
+    args.sum = 0;
+    natsMutex_Unlock(args.m);
+    jsSubOptions_Init(&so);
+    so.Stream = "TEST";
+    so.Queue = "queue";
+    so.Config.Durable = "qdurable";
+    s = js_Subscribe(&sub, js, "foo", _jsMsgHandler, (void*)&args, NULL, &so, &jerr);
+    testCond((s == NATS_OK) && (sub != NULL) && (jerr == 0));
+
+    test("Check msgs received: ");
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && (args.sum != 3))
+        s = natsCondition_TimedWait(args.c, args.m, 2000);
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_OK);
+
+    test("Check acks sent: ");
+    for (i=0; (s == NATS_OK) && (i < 3); i++)
+    {
+        s = natsSubscription_NextMsg(&ack, ackSub, 1000);
+        natsMsg_Destroy(ack);
+        ack = NULL;
+    }
+    testCond(s == NATS_OK);
+
+    test("Add second member with binding: ");
+    jsSubOptions_Init(&so);
+    so.Stream = "TEST";
+    so.Queue = "queue";
+    so.Consumer = "qdurable";
+    s = js_Subscribe(&sub2, js, "foo", _jsMsgHandler, (void*)&args, NULL, &so, &jerr);
+    testCond((s == NATS_OK) && (sub2 != NULL) && (jerr == 0));
+
+    // Wait a bit and make sure no new message is delivered
+    test("No new message: ");
+    natsMutex_Lock(args.m);
+    natsCondition_TimedWait(args.c, args.m, 250);
+    s = (args.sum == 3 ? NATS_OK : NATS_ERR);
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_OK);
+
+    test("Attached consumer not destroyed on unsub: ");
+    s = natsSubscription_Unsubscribe(sub2);
+    IFOK(s, js_GetConsumerInfo(&ci, js, "TEST", "qdurable", NULL, &jerr));
+    testCond((s == NATS_OK) && (ci != NULL) && (jerr == 0));
+    jsConsumerInfo_Destroy(ci);
+    ci = NULL;
+
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+    natsSubscription_Destroy(sub2);
+    sub2 = NULL;
+
+    test("No auto-ack for AckNone: ");
+    natsMutex_Lock(args.m);
+    args.control = 0;
+    args.sum = 0;
+    args.done = false;
+    natsMutex_Unlock(args.m);
+    jsSubOptions_Init(&so);
+    so.Config.DeliverPolicy = js_DeliverAll;
+    so.Config.AckPolicy = js_AckNone;
+    s = js_Subscribe(&sub, js, "foo", _jsMsgHandler, (void*) &args, NULL, &so, &jerr);
+    testCond((s == NATS_OK) && (sub != NULL) && (jerr == 0));
+
+    test("Check msgs received: ");
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && (args.sum != 3))
+        s = natsCondition_TimedWait(args.c, args.m, 1000);
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_OK);
+
+    test("Check no ack was sent: ");
+    natsMutex_Lock(sub->mu);
+    // We should not have set an internal autoAck CB, so usrCb should be NULL.
+    s = (sub->jsi->usrCb == NULL ? NATS_OK : NATS_ERR);
+    natsMutex_Unlock(sub->mu);
+    IFOK(s, natsSubscription_NextMsg(&ack, ackSub, 300));
+    testCond((s == NATS_TIMEOUT) && (ack == NULL));
+    nats_clearLastError();
+
+    test("Check user setting onComplete is ok: ");
+    s = natsSubscription_SetOnCompleteCB(sub, _jsSubComplete, (void*)&args);
+    testCond(s == NATS_OK);
+
+    test("Wait for complete: ");
+    natsSubscription_Destroy(sub);
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && !args.done)
+        s = natsCondition_TimedWait(args.c, args.m, 1000);
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_OK);
+
+#ifndef _WIN32
+    test("Create stream with long subject: ");
+    for (i=0; i<((int)sizeof(longsn))-1; i++)
+        longsn[i] = 'a';
+    longsn[i]='\0';
+    jsStreamConfig_Init(&sc);
+    sc.Name = longsn;
+    sc.Subjects = (const char*[1]){"baz"};
+    sc.SubjectsLen = 1;
+    s = js_AddStream(NULL, js, &sc, NULL, NULL);
+    testCond(s == NATS_OK);
+
+    test("Create sub to check lib sends ACKs: ");
+    natsSubscription_Destroy(ackSub);
+    ackSub = NULL;
+    {
+        char tmp[512];
+
+        snprintf(tmp, sizeof(tmp), "$JS.ACK.%s.>", longsn);
+        s = natsConnection_SubscribeSync(&ackSub, nc, tmp);
+    }
+    testCond(s == NATS_OK);
+
+    test("Create sub with auto-ack: ");
+    sub = NULL;
+    natsMutex_Lock(args.m);
+    args.sum = 0;
+    args.control = 0;
+    natsMutex_Unlock(args.m);
+    s = js_Subscribe(&sub, js, "baz", _jsMsgHandler, &args, NULL, NULL, &jerr);
+    testCond((s == NATS_OK) && (sub != NULL) && (jerr == 0));
+
+    test("Send 1 msg: ");
+    s = js_Publish(NULL, js, "baz", "hello", 5, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Check msg received: ");
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && (args.sum != 1))
+        s = natsCondition_TimedWait(args.c, args.m, 1000);
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_OK);
+
+    test("Check ack sent: ");
+    s = natsSubscription_NextMsg(&ack, ackSub, 1000);
+    natsMsg_Destroy(ack);
+    ack = NULL;
+    testCond(s == NATS_OK);
+
+    natsSubscription_Destroy(sub);
+#endif
+    sub = NULL;
+
+    test("Create stream with several subjects: ");
+    jsStreamConfig_Init(&sc);
+    sc.Name = "MULTIPLE_SUBJS";
+    sc.Subjects = (const char*[2]){"sub.1", "sub.2"};
+    sc.SubjectsLen = 2;
+    s = js_AddStream(NULL, js, &sc, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Create consumer with filter: ");
+    jsConsumerConfig_Init(&cc);
+    cc.Durable = "dur";
+    cc.DeliverSubject = "push.dur.sub.2";
+    cc.FilterSubject = "sub.2";
+    s = js_AddConsumer(NULL, js, "MULTIPLE_SUBJS", &cc, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Subscribe subj != filter: ");
+    jsSubOptions_Init(&so);
+    so.Stream = "MULTIPLE_SUBJS";
+    so.Consumer = "dur";
+    s = js_Subscribe(&sub, js, "foo", _jsMsgHandler, &args, NULL, &so, &jerr);
+    testCond((s == NATS_ERR) && (sub == NULL)
+                && (strstr(nats_GetLastError(NULL), "filter subject") != NULL));
+    nats_clearLastError();
+
+    test("Subject not required when binding to stream/consumer: ");
+    s = js_Subscribe(&sub, js, NULL, _jsMsgHandler, &args, NULL, &so, &jerr);
+    testCond((s == NATS_OK) && (sub != NULL) && (jerr == 0));
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("Create consumer for pull: ");
+    jsConsumerConfig_Init(&cc);
+    cc.Durable = "dur2";
+    s = js_AddConsumer(NULL, js, "MULTIPLE_SUBJS", &cc, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Subscribe subj not a pull: ");
+    jsSubOptions_Init(&so);
+    so.Stream = "MULTIPLE_SUBJS";
+    so.Consumer = "dur2";
+    s = js_Subscribe(&sub, js, "foo", _jsMsgHandler, &args, NULL, &so, &jerr);
+    testCond((s == NATS_ERR) && (sub == NULL)
+                && (strstr(nats_GetLastError(NULL), jsErrPullSubscribeRequired) != NULL));
+    nats_clearLastError();
+
+    test("Create stream for concurrent test: ");
+    jsStreamConfig_Init(&sc);
+    sc.Name = "TEST_CONCURRENT";
+    sc.Subjects = (const char*[1]){"concurrent"};
+    sc.SubjectsLen = 1;
+    s = js_AddStream(NULL, js, &sc, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Start concurrent creation of subs: ");
+    natsMutex_Lock(args.m);
+    args.attached = 0;
+    args.detached = 0;
+    args.control = 0;
+    args.js = js;
+    natsMutex_Unlock(args.m);
+    s = NATS_OK;
+    for (i=0; ((s == NATS_OK) && (i<10)); i++)
+        s = natsThread_Create(&threads[i], _jsCreateSubThread, (void*) &args);
+    testCond(s == NATS_OK);
+
+    test("Wait for threads to return: ");
+    for (i=0; i<10; i++)
+    {
+        natsThread_Join(threads[i]);
+        natsThread_Destroy(threads[i]);
+    }
+    testCond(true);
+
+    test("Only 1 should be started, 9 should have failed: ");
+    natsMutex_Lock(args.m);
+    s = ((args.attached == 1) && (args.detached == 9)) ? NATS_OK : NATS_ERR;
+    sub = args.sub;
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_OK);
+
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+    natsSubscription_Destroy(ackSub);
+    ackSub = NULL;
+
+    test("Create consumer: ");
+    jsSubOptions_Init(&so);
+    so.Config.Durable = "delcons1";
+    s = js_Subscribe(&sub, js, "foo", _jsMsgHandler, (void*) &args, NULL, &so, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Unsub deletes consumer: ");
+    s = natsSubscription_Unsubscribe(sub);
+    IFOK(s, js_GetConsumerInfo(&ci, js, "TEST", "delcons1", NULL, &jerr));
+    testCond((s == NATS_NOT_FOUND) && (ci == NULL) && (jerr == JSConsumerNotFoundErr)
+                && (nats_GetLastError(NULL) == NULL));
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("Create consumer: ");
+    jsSubOptions_Init(&so);
+    so.Config.Durable = "delcons2";
+    s = js_Subscribe(&sub, js, "foo", _jsMsgHandler, (void*) &args, NULL, &so, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Drain deletes consumer: ");
+    s = natsSubscription_Drain(sub);
+    IFOK(s, natsSubscription_WaitForDrainCompletion(sub, 1000));
+    IFOK(s, js_GetConsumerInfo(&ci, js, "TEST", "delcons2", NULL, &jerr));
+    testCond((s == NATS_NOT_FOUND) && (ci == NULL) && (jerr == JSConsumerNotFoundErr)
+                && (nats_GetLastError(NULL) == NULL));
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("Create consumer: ");
+    jsSubOptions_Init(&so);
+    so.Config.Durable = "delcons2sync";
+    s = js_SubscribeSync(&sub, js, "foo", NULL, &so, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Drain deletes consumer: ");
+    s = natsSubscription_Drain(sub);
+    for (i=0; i<3; i++)
+    {
+        natsMsg *msg = NULL;
+        IFOK(s, natsSubscription_NextMsg(&msg, sub, 1000));
+        IFOK(s, natsMsg_Ack(msg, NULL));
+        natsMsg_Destroy(msg);
+        msg = NULL;
+    }
+    IFOK(s, natsSubscription_WaitForDrainCompletion(sub, 1000));
+    IFOK(s, js_GetConsumerInfo(&ci, js, "TEST", "delcons2sync", NULL, &jerr));
+    testCond((s == NATS_NOT_FOUND) && (ci == NULL) && (jerr == JSConsumerNotFoundErr)
+                && (nats_GetLastError(NULL) == NULL));
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("Create consumer: ");
+    jsSubOptions_Init(&so);
+    so.Config.Durable = "delcons3";
+    s = js_Subscribe(&sub, js, "foo", _jsMsgHandler, (void*) &args, NULL, &so, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Delete consumer: ");
+    s = js_DeleteConsumer(js, "TEST", "delcons3", NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Unsub report error: ");
+    s = natsSubscription_Unsubscribe(sub);
+    testCond((s != NATS_OK)
+                && (strstr(nats_GetLastError(NULL), "not found") != NULL));
+    nats_clearLastError();
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    natsMutex_Lock(args.m);
+    args.msgReceived = false;
+    natsMutex_Unlock(args.m);
+
+    test("Create consumer: ");
+    jsSubOptions_Init(&so);
+    so.Config.Durable = "delcons4";
+    s = js_Subscribe(&sub, js, "foo", _jsMsgHandler, (void*) &args, NULL, &so, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Delete consumer: ");
+    s = js_DeleteConsumer(js, "TEST", "delcons4", NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Drain report error: ");
+    s = natsSubscription_Drain(sub);
+    if (s == NATS_OK)
+    {
+        natsMutex_Lock(args.m);
+        while ((s != NATS_TIMEOUT) && !args.msgReceived)
+            s = natsCondition_TimedWait(args.c, args.m, 1000);
+        natsMutex_Unlock(args.m);
+    }
+    testCond(s == NATS_OK);
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("Destroy sub does not delete consumer: ");
+    jsSubOptions_Init(&so);
+    so.Config.Durable = "delcons5";
+    s = js_Subscribe(&sub, js, "foo", _jsMsgHandler, (void*) &args, NULL, &so, &jerr);
+    if (s == NATS_OK)
+    {
+        natsSubscription_Destroy(sub);
+        sub = NULL;
+        s = js_GetConsumerInfo(&ci, js, "TEST", "delcons5", NULL, &jerr);
+    }
+    testCond((s == NATS_OK) && (ci != NULL) && (jerr == 0));
+    jsConsumerInfo_Destroy(ci);
+    ci = NULL;
+
+    test("Queue and HB is invalid: ");
+    jsSubOptions_Init(&so);
+    so.Stream = "TEST";
+    so.Queue = "queue";
+    so.Config.Heartbeat = NATS_SECONDS_TO_NANOS(2);
+    s = js_SubscribeSync(&sub, js, "foo", NULL, &so, &jerr);
+    testCond((s == NATS_INVALID_ARG) && (sub == NULL) && (jerr == 0)
+                && (strstr(nats_GetLastError(NULL), jsErrNoHeartbeatForQueueSub) != NULL));
+    nats_clearLastError();
+
+    test("Queue and FlowControl is invalid: ");
+    jsSubOptions_Init(&so);
+    so.Stream = "TEST";
+    so.Queue = "queue";
+    so.Config.FlowControl = true;
+    s = js_SubscribeSync(&sub, js, "foo", NULL, &so, &jerr);
+    testCond((s == NATS_INVALID_ARG) && (sub == NULL) && (jerr == 0)
+                && (strstr(nats_GetLastError(NULL), jsErrNoFlowControlForQueueSub) != NULL));
+    nats_clearLastError();
+
+    test("Queue name can't contain dots: ");
+    jsSubOptions_Init(&so);
+    so.Stream = "TEST";
+    so.Queue = "queue.name";
+    s = js_SubscribeSync(&sub, js, "foo", NULL, &so, &jerr);
+    testCond((s == NATS_INVALID_ARG) && (sub == NULL) && (jerr == 0)
+                && (strstr(nats_GetLastError(NULL), "cannot contain '.'") != NULL));
+    nats_clearLastError();
+
+    test("Queue group serves as durable: ");
+    jsSubOptions_Init(&so);
+    so.Stream = "TEST";
+    so.Queue = "qgroup";
+    s = js_SubscribeSync(&sub, js, "foo", NULL, &so, &jerr);
+    IFOK(s, js_GetConsumerInfo(&ci, js, "TEST", "qgroup", NULL, &jerr));
+    testCond((s == NATS_OK) && (sub != NULL) && (jerr == 0)
+                && (ci != NULL) && (ci->Config != NULL)
+                && (ci->Config->Durable != NULL)
+                && (strcmp(ci->Config->Durable, "qgroup") == 0));
+    jsConsumerInfo_Destroy(ci);
+    ci = NULL;
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("Durable name invalid (push): ");
+    jsSubOptions_Init(&so);
+    so.Config.DeliverSubject = "bar";
+    so.Config.Durable = "dur.invalid";
+    s = js_SubscribeSync(&sub, js, "foo", NULL, &so, &jerr);
+    testCond((s == NATS_INVALID_ARG) && (sub == NULL) && (jerr == 0)
+                && (strstr(nats_GetLastError(NULL), "cannot contain '.'") != NULL));
+    nats_clearLastError();
+
+    test("Durable name invalid (pull): ");
+    s = js_PullSubscribe(&sub, js, "foo", "dur.invalid", NULL, NULL, &jerr);
+    testCond((s == NATS_INVALID_ARG) && (sub == NULL) && (jerr == 0)
+                && (strstr(nats_GetLastError(NULL), "cannot contain '.'") != NULL));
+    nats_clearLastError();
+
+    JS_TEARDOWN;
+    natsOptions_Destroy(ncOpts);
+    _destroyDefaultThreadArgs(&args);
+}
+
+static void
+test_JetStreamSubscribeSync(void)
+{
+    natsStatus          s;
+    natsSubscription    *sub= NULL;
+    jsErrCode           jerr= 0;
+    natsSubscription    *ackSub = NULL;
+    natsMsg             *ack = NULL;
+    jsStreamConfig      sc;
+    int                 i;
+    natsMsg             *msgs[4];
+    natsMsg             *msg = NULL;
+    const char          *consName;
+    jsConsumerInfo      *ci = NULL;
+    jsConsumerInfo      *ci2 = NULL;
+    jsMsgMetaData       *meta = NULL;
+    jsSubOptions        so;
+
+    JS_SETUP(2, 7, 0);
+
+    test("Create sync sub (invalid args): ");
+    s = js_SubscribeSync(NULL, js, "foo", NULL, NULL, &jerr);
+    if (s == NATS_INVALID_ARG)
+        s = js_SubscribeSync(&sub, NULL, "foo", NULL, NULL, &jerr);
+    if (s == NATS_INVALID_ARG)
+        s = js_SubscribeSync(&sub, js, NULL, NULL, NULL, &jerr);
+    if (s == NATS_INVALID_ARG)
+        s = js_SubscribeSync(&sub, js, "", NULL, NULL, &jerr);
+    testCond((s == NATS_INVALID_ARG) && (sub == NULL) && (jerr == 0));
+    nats_clearLastError();
+
+    test("Create, no stream exists: ");
+    s = js_SubscribeSync(&sub, js, "foo", NULL, NULL, &jerr);
+    testCond((s != NATS_OK) && (sub == NULL)
+                && (strstr(nats_GetLastError(NULL), jsErrNoStreamMatchesSubject) != NULL));
+    nats_clearLastError();
+
+    test("Create stream: ");
+    jsStreamConfig_Init(&sc);
+    sc.Name = "TEST";
+    sc.Subjects = (const char*[1]){"foo"};
+    sc.SubjectsLen = 1;
+    s = js_AddStream(NULL, js, &sc, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Populate: ");
+    s = js_Publish(NULL, js, "foo", "msg1", 4, NULL, &jerr);
+    IFOK(s, js_Publish(NULL, js, "foo", "msg2", 4, NULL, &jerr));
+    IFOK(s, js_Publish(NULL, js, "foo", "msg3", 4, NULL, &jerr));
+    IFOK(s, js_Publish(NULL, js, "foo", "msg4", 4, NULL, &jerr));
+    testCond(s == NATS_OK);
+
+    test("Create sub to check ACKs: ");
+    s = natsConnection_SubscribeSync(&ackSub, nc, "$JS.ACK.TEST.>");
+    testCond(s == NATS_OK);
+
+    test("Subscribe, no options: ");
+    s = js_SubscribeSync(&sub, js, "foo", NULL, NULL, &jerr);
+    testCond((s == NATS_OK) && (sub != NULL) && (jerr == 0));
+
+    test("Check msgs received: ");
+    for (i=0; (s == NATS_OK) && (i<4); i++)
+        s = natsSubscription_NextMsg(&msgs[i], sub, 1000);
+    testCond(s == NATS_OK);
+
+    test("Check get meta data (bad args): ");
+    s = natsMsg_GetMetaData(NULL, NULL);
+    if (s == NATS_INVALID_ARG)
+        s = natsMsg_GetMetaData(NULL, msgs[0]);
+    if (s == NATS_INVALID_ARG)
+        s = natsMsg_GetMetaData(&meta, NULL);
+    testCond((s == NATS_INVALID_ARG) && (meta == NULL));
+    nats_clearLastError();
+
+    test("Check get meta: ");
+    s = natsMsg_GetMetaData(&meta, msgs[0]);
+    testCond((s == NATS_OK) && (meta != NULL)
+                && (strcmp(meta->Stream, "TEST") == 0)
+                && (strlen(meta->Consumer) > 0)
+                && (meta->NumPending == 3)
+                && (meta->NumDelivered == 1)
+                && (meta->Sequence.Consumer == 1)
+                && (meta->Sequence.Stream == 1)
+                && (meta->Timestamp > 0));
+    jsMsgMetaData_Destroy(meta);
+    meta = NULL;
+    // Check this is ok
+    jsMsgMetaData_Destroy(NULL);
+
+    test("Ack: ");
+    s = natsMsg_Ack(msgs[0], NULL);
+    IFOK(s, natsSubscription_NextMsg(&ack, ackSub, 1000));
+    if (s == NATS_OK)
+    {
+        s = (strncmp(
+                natsMsg_GetData(ack),
+                jsAckAck,
+                natsMsg_GetDataLength(ack)) == 0 ? NATS_OK : NATS_ERR);
+
+        natsMsg_Destroy(ack);
+        ack = NULL;
+    }
+    testCond(s == NATS_OK);
+
+    test("Second ack does nothing: ");
+    s = natsMsg_Ack(msgs[0], NULL);
+    IFOK(s, natsSubscription_NextMsg(&ack, ackSub, 300));
+    testCond(s == NATS_TIMEOUT);
+    natsMsg_Destroy(msgs[0]);
+
+    test("AckSync: ");
+    s = natsMsg_AckSync(msgs[1], NULL, &jerr);
+    IFOK(s, natsSubscription_NextMsg(&ack, ackSub, 1000));
+    if (s == NATS_OK)
+    {
+        s = (strncmp(
+                natsMsg_GetData(ack),
+                jsAckAck,
+                natsMsg_GetDataLength(ack)) == 0 ? NATS_OK : NATS_ERR);
+
+        natsMsg_Destroy(ack);
+        ack = NULL;
+    }
+    natsMsg_Destroy(msgs[1]);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Nack: ");
+    s = natsMsg_Nak(msgs[2], NULL);
+    IFOK(s, natsSubscription_NextMsg(&ack, ackSub, 1000));
+    if (s == NATS_OK)
+    {
+        s = (strncmp(
+                natsMsg_GetData(ack),
+                jsAckNak,
+                natsMsg_GetDataLength(ack)) == 0 ? NATS_OK : NATS_ERR);
+
+        natsMsg_Destroy(ack);
+        ack = NULL;
+    }
+    natsMsg_Destroy(msgs[2]);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Nack msg resent: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    testCond((s == NATS_OK) && (msg != NULL));
+
+    // Should be able to send InProgress more than once.
+    for (i=0; i<2; i++)
+    {
+        test("InProgress: ");
+        s = natsMsg_InProgress(msg, NULL);
+        IFOK(s, natsSubscription_NextMsg(&ack, ackSub, 1000));
+        if (s == NATS_OK)
+        {
+            s = (strncmp(
+                    natsMsg_GetData(ack),
+                    jsAckInProgress,
+                    natsMsg_GetDataLength(ack)) == 0 ? NATS_OK : NATS_ERR);
+
+            natsMsg_Destroy(ack);
+            ack = NULL;
+        }
+        testCond(s == NATS_OK);
+    }
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Term: ");
+    s = natsMsg_Term(msgs[3], NULL);
+    IFOK(s, natsSubscription_NextMsg(&ack, ackSub, 1000));
+    if (s == NATS_OK)
+    {
+        s = (strncmp(
+                natsMsg_GetData(ack),
+                jsAckTerm,
+                natsMsg_GetDataLength(ack)) == 0 ? NATS_OK : NATS_ERR);
+
+        natsMsg_Destroy(ack);
+        ack = NULL;
+    }
+    natsMsg_Destroy(msgs[3]);
+    testCond(s == NATS_OK);
+
+    test("Ack failure (bad args): ");
+    s = natsMsg_Ack(NULL, NULL);
+    if (s == NATS_INVALID_ARG)
+        s = natsMsg_AckSync(NULL, NULL, NULL);
+    if (s == NATS_INVALID_ARG)
+        s = natsMsg_Nak(NULL, NULL);
+    if (s == NATS_INVALID_ARG)
+        s = natsMsg_InProgress(NULL, NULL);
+    if (s == NATS_INVALID_ARG)
+        s = natsMsg_Term(NULL, NULL);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Ack failure (not bound): ");
+    natsMsg_Create(&msg, "foo", NULL, "test", 4);
+    s = natsMsg_Ack(msg, NULL);
+    if (s == NATS_ILLEGAL_STATE)
+        s = natsMsg_AckSync(msg, NULL, NULL);
+    if (s == NATS_ILLEGAL_STATE)
+        s = natsMsg_Nak(msg, NULL);
+    if (s == NATS_ILLEGAL_STATE)
+        s = natsMsg_InProgress(msg, NULL);
+    if (s == NATS_ILLEGAL_STATE)
+        s = natsMsg_Term(msg, NULL);
+    testCond((s == NATS_ILLEGAL_STATE)
+                && (strstr(nats_GetLastError(NULL), jsErrMsgNotBound) != NULL));
+    nats_clearLastError();
+
+    test("Get Meta failure (not bound): ")
+    s = natsMsg_GetMetaData(&meta, msg);
+    testCond((s == NATS_ILLEGAL_STATE) && (meta == NULL)
+                 && (strstr(nats_GetLastError(NULL), jsErrMsgNotBound) != NULL));
+    nats_clearLastError();
+
+    test("Ack failure (no reply): ");
+    // artificially bind to existing sub
+    msg->sub = sub;
+    s = natsMsg_Ack(msg, NULL);
+    if (s == NATS_ILLEGAL_STATE)
+        s = natsMsg_AckSync(msg, NULL, NULL);
+    if (s == NATS_ILLEGAL_STATE)
+        s = natsMsg_Nak(msg, NULL);
+    if (s == NATS_ILLEGAL_STATE)
+        s = natsMsg_InProgress(msg, NULL);
+    if (s == NATS_ILLEGAL_STATE)
+        s = natsMsg_Term(msg, NULL);
+    testCond((s == NATS_ILLEGAL_STATE)
+                && (strstr(nats_GetLastError(NULL), jsErrMsgNotJS) != NULL));
+    nats_clearLastError();
+
+    test("Get Meta failure (no reply): ");
+    s = natsMsg_GetMetaData(&meta, msg);
+    testCond((s == NATS_ILLEGAL_STATE) && (meta == NULL)
+                && (strstr(nats_GetLastError(NULL), jsErrMsgNotJS) != NULL));
+    nats_clearLastError();
+    msg->sub = NULL;
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Get Meta failure (not JS Ack): ");
+    s = natsMsg_Create(&msg, "foo", "not.a.js.ack", NULL, 0);
+    if (s == NATS_OK)
+        msg->sub = sub;
+    IFOK(s, natsMsg_GetMetaData(&meta, msg));
+    testCond((s == NATS_ERR) && (meta == NULL)
+                && (strstr(nats_GetLastError(NULL), "invalid meta") != NULL));
+    nats_clearLastError();
+    msg->sub = NULL;
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Get Meta failure (terminal dot): ");
+    s = natsMsg_Create(&msg, "foo", "$JS.ACK.TEST.CONSUMER.1.1.1.1629415486698860000.3.", NULL, 0);
+    if (s == NATS_OK)
+        msg->sub = sub;
+    IFOK(s, natsMsg_GetMetaData(&meta, msg));
+    testCond((s == NATS_ERR) && (meta == NULL)
+                && (strstr(nats_GetLastError(NULL), "invalid meta") != NULL));
+    nats_clearLastError();
+    msg->sub = NULL;
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Get Meta failure (too small): ");
+    s = natsMsg_Create(&msg, "foo", "$JS.ACK.TEST.CONSUMER.1.1.1.1629415486698860000", NULL, 0);
+    if (s == NATS_OK)
+        msg->sub = sub;
+    IFOK(s, natsMsg_GetMetaData(&meta, msg));
+    testCond((s == NATS_ERR) && (meta == NULL)
+                && (strstr(nats_GetLastError(NULL), "invalid meta") != NULL));
+    nats_clearLastError();
+    msg->sub = NULL;
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Get Meta failure (too small v2): ");
+    s = natsMsg_Create(&msg, "foo", "$JS.ACK.HUB.accHash.TEST.CONSUMER.1.1.1.1629415486698860000", NULL, 0);
+    if (s == NATS_OK)
+        msg->sub = sub;
+    IFOK(s, natsMsg_GetMetaData(&meta, msg));
+    testCond((s == NATS_ERR) && (meta == NULL)
+                && (strstr(nats_GetLastError(NULL), "invalid meta") != NULL));
+    nats_clearLastError();
+    msg->sub = NULL;
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Get Meta failure (invalid content): ");
+    s = natsMsg_Create(&msg, "foo", "$JS.ACK.TEST.CONSUMER.and.some.bad.other.things", NULL, 0);
+    if (s == NATS_OK)
+        msg->sub = sub;
+    IFOK(s, natsMsg_GetMetaData(&meta, msg));
+    testCond((s == NATS_ERR) && (meta == NULL)
+                && (strstr(nats_GetLastError(NULL), "invalid meta") != NULL));
+    nats_clearLastError();
+    msg->sub = NULL;
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Get Meta failure (invalid content v2): ");
+    s = natsMsg_Create(&msg, "foo", "$JS.ACK.HUB.accHash.TEST.CONSUMER.and.some.bad.other.things", NULL, 0);
+    if (s == NATS_OK)
+        msg->sub = sub;
+    IFOK(s, natsMsg_GetMetaData(&meta, msg));
+    testCond((s == NATS_ERR) && (meta == NULL)
+                && (strstr(nats_GetLastError(NULL), "invalid meta") != NULL));
+    nats_clearLastError();
+    msg->sub = NULL;
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Get Meta v2: ");
+    s = natsMsg_Create(&msg, "foo", "$JS.ACK.HUB.accHash.TEST.CONSUMER.1.2.3.1629415486698860000.4.random", NULL, 0);
+    if (s == NATS_OK)
+        msg->sub = sub;
+    IFOK(s, natsMsg_GetMetaData(&meta, msg));
+    testCond((s == NATS_OK) && (meta != NULL)
+                && (strcmp(meta->Domain, "HUB") == 0)
+                && (strcmp(meta->Stream, "TEST") == 0)
+                && (strcmp(meta->Consumer, "CONSUMER") == 0)
+                && (meta->NumDelivered == 1)
+                && (meta->Sequence.Stream == 2)
+                && (meta->Sequence.Consumer == 3)
+                && (meta->Timestamp == 1629415486698860000)
+                && (meta->NumPending == 4));
+    jsMsgMetaData_Destroy(meta);
+    meta = NULL;
+    msg->sub = NULL;
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Get Meta v2 (empty domain): ");
+    s = natsMsg_Create(&msg, "foo", "$JS.ACK._.accHash.TEST.CONSUMER.1.2.3.1629415486698860000.4.random", NULL, 0);
+    if (s == NATS_OK)
+        msg->sub = sub;
+    IFOK(s, natsMsg_GetMetaData(&meta, msg));
+    testCond((s == NATS_OK) && (meta != NULL)
+                && (meta->Domain == NULL)
+                && (strcmp(meta->Stream, "TEST") == 0)
+                && (strcmp(meta->Consumer, "CONSUMER") == 0)
+                && (meta->NumDelivered == 1)
+                && (meta->Sequence.Stream == 2)
+                && (meta->Sequence.Consumer == 3)
+                && (meta->Timestamp == 1629415486698860000)
+                && (meta->NumPending == 4));
+    jsMsgMetaData_Destroy(meta);
+    meta = NULL;
+    msg->sub = NULL;
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Get Meta v2 (no failure with appended tokens): ");
+    s = natsMsg_Create(&msg, "foo", "$JS.ACK._.accHash.TEST.CONSUMER.1.2.3.1629415486698860000.4.random.new_one", NULL, 0);
+    if (s == NATS_OK)
+        msg->sub = sub;
+    IFOK(s, natsMsg_GetMetaData(&meta, msg));
+    testCond((s == NATS_OK) && (meta != NULL)
+                && (meta->Domain == NULL)
+                && (strcmp(meta->Stream, "TEST") == 0)
+                && (strcmp(meta->Consumer, "CONSUMER") == 0)
+                && (meta->NumDelivered == 1)
+                && (meta->Sequence.Stream == 2)
+                && (meta->Sequence.Consumer == 3)
+                && (meta->Timestamp == 1629415486698860000)
+                && (meta->NumPending == 4));
+    jsMsgMetaData_Destroy(meta);
+    meta = NULL;
+    msg->sub = NULL;
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Get Meta v2 (no failure with appended tokens, malformed ok): ");
+    s = natsMsg_Create(&msg, "foo", "$JS.ACK._.accHash.TEST.CONSUMER.1.2.3.1629415486698860000.4.", NULL, 0);
+    if (s == NATS_OK)
+        msg->sub = sub;
+    IFOK(s, natsMsg_GetMetaData(&meta, msg));
+    testCond((s == NATS_OK) && (meta != NULL)
+                && (meta->Domain == NULL)
+                && (strcmp(meta->Stream, "TEST") == 0)
+                && (strcmp(meta->Consumer, "CONSUMER") == 0)
+                && (meta->NumDelivered == 1)
+                && (meta->Sequence.Stream == 2)
+                && (meta->Sequence.Consumer == 3)
+                && (meta->Timestamp == 1629415486698860000)
+                && (meta->NumPending == 4));
+    jsMsgMetaData_Destroy(meta);
+    meta = NULL;
+    msg->sub = NULL;
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Send msg: ");
+    s = js_Publish(NULL, js, "foo", "block", 5, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Drain does not delete consumer: ");
+    consName = sub->jsi->consumer;
+    s = natsSubscription_Drain(sub);
+    nats_Sleep(500);
+    IFOK(s, js_GetConsumerInfo(&ci, js, "TEST", consName, NULL, &jerr));
+    testCond((s == NATS_OK) && (ci != NULL) && (jerr == 0));
+    jsConsumerInfo_Destroy(ci);
+    ci = NULL;
+
+    test("Wait for drain to complete: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    natsMsg_Destroy(msg);
+    IFOK(s, natsSubscription_WaitForDrainCompletion(sub, 1000));
+    testCond(s == NATS_OK);
+
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("Create sub with ack-none: ");
+    jsSubOptions_Init(&so);
+    so.Config.AckPolicy = js_AckNone;
+    so.Config.DeliverPolicy = js_DeliverLast;
+    s = js_SubscribeSync(&sub, js, "foo", NULL, &so, &jerr);
+    testCond((s == NATS_OK) && (sub != NULL) && (jerr == 0));
+
+    test("Check msg received: ");
+    msg = NULL;
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    testCond(s == NATS_OK);
+
+    test("Check ack: ");
+    s = natsMsg_InProgress(msg, NULL);
+    IFOK(s, natsMsg_Nak(msg, NULL));
+    IFOK(s, natsMsg_Ack(msg, NULL));
+    IFOK(s, natsMsg_Term(msg, NULL));
+    testCond(s == NATS_OK);
+
+    test("Check no ack sent: ");
+    natsMsg_Destroy(msg);
+    msg = NULL;
+    s = natsSubscription_NextMsg(&msg, ackSub, 100);
+    testCond((s == NATS_TIMEOUT) && (msg == NULL));
+
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+    natsSubscription_Destroy(ackSub);
+    ackSub = NULL;
+
+    test("Test InactiveThreshold (bad value): ");
+    jsSubOptions_Init(&so);
+    so.Config.InactiveThreshold = NATS_MILLIS_TO_NANOS(-100);
+    s = js_SubscribeSync(&sub, js, "foo", NULL, &so, &jerr);
+    testCond((s == NATS_INVALID_ARG) && (sub == NULL) && (jerr == 0)
+                && (strstr(nats_GetLastError(NULL), "invalid InactiveThreshold") != NULL));
+    nats_clearLastError();
+
+    test("Create normal sub: ");
+    s = natsConnection_SubscribeSync(&sub, nc, "test");
+    testCond((s == NATS_OK) && (sub != NULL));
+
+    test("sub get info (invalid args): ");
+    s = natsSubscription_GetConsumerInfo(NULL, sub, NULL, &jerr);
+    if (s == NATS_INVALID_ARG)
+        s = natsSubscription_GetConsumerInfo(&ci, NULL, NULL, &jerr);
+    testCond((s == NATS_INVALID_ARG) && (jerr == 0));
+    nats_clearLastError();
+
+    test("sub get info (invalid sub): ");
+    s = natsSubscription_GetConsumerInfo(&ci, sub, NULL, &jerr);
+    testCond((s == NATS_INVALID_SUBSCRIPTION) && (ci == NULL) && (jerr == 0));
+    nats_clearLastError();
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("Create sub: ");
+    jsSubOptions_Init(&so);
+    so.Config.InactiveThreshold = NATS_MILLIS_TO_NANOS(50);
+    s = js_SubscribeSync(&sub, js, "foo", NULL, &so, &jerr);
+    testCond((s == NATS_OK) && (sub != NULL) && (jerr == 0));
+
+    test("Get consumer info: ");
+    s = natsSubscription_GetConsumerInfo(&ci, sub, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0) && (ci != NULL) && (ci->Config != NULL)
+                && (ci->Config->InactiveThreshold == NATS_MILLIS_TO_NANOS(50)));
+
+    test("Close conn: ");
+    jsCtx_Destroy(js);
+    js = NULL;
+    natsConnection_Destroy(nc);
+    nc = NULL;
+    testCond(true);
+
+    nats_Sleep(150);
+
+    test("Check consumer gone: ");
+    s = natsConnection_ConnectTo(&nc, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_JetStream(&js, nc, NULL));
+    IFOK(s, js_GetConsumerInfo(&ci2, js, "TEST", ci->Name, NULL, &jerr));
+    testCond((s == NATS_NOT_FOUND) && (jerr == JSConsumerNotFoundErr) && (ci2 == NULL));
+    jsConsumerInfo_Destroy(ci);
+    natsSubscription_Destroy(sub);
+    JS_TEARDOWN;
+}
+
+static void
+test_JetStreamSubscribeConfigCheck(void)
+{
+    natsStatus          s;
+    natsSubscription    *sub= NULL;
+    const char          *name = NULL;
+    jsErrCode           jerr= 0;
+    char                durName[64];
+    char                testName[64];
+    jsStreamConfig      sc;
+    jsConsumerConfig    cc;
+    int                 i;
+    int64_t             backOffListOf3[3] = {1, 2, 3};
+    int64_t             backOffListOf2[2] = {1, 2};
+
+    JS_SETUP(2, 9, 0);
+
+    test("Create stream: ");
+    jsStreamConfig_Init(&sc);
+    sc.Name = "TEST";
+    sc.Subjects = (const char*[1]){"foo"};
+    sc.SubjectsLen = 1;
+    s = js_AddStream(NULL, js, &sc, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    for (i=0; i<17; i++)
+    {
+        jsSubOptions    so1;
+        jsSubOptions    so2;
+
+        natsNUID_Next(durName, sizeof(durName));
+
+        jsSubOptions_Init(&so1);
+        jsSubOptions_Init(&so2);
+        switch (i)
+        {
+            case 0:
+            {
+                name = "description";
+                so1.Config.Description = "a";
+                so2.Config.Description = "b";
+                break;
+            }
+            case 1:
+            {
+                name = "deliver policy";
+                so1.Config.DeliverPolicy = js_DeliverAll;
+                so2.Config.DeliverPolicy = js_DeliverLast;
+                break;
+            }
+            case 2:
+            {
+                name = "optional start sequence";
+                so1.Config.OptStartSeq = 1;
+                so2.Config.OptStartSeq = 10;
+                break;
+            }
+            case 3:
+            {
+                name = "optional start time";
+                so1.Config.OptStartTime = 1000000000;
+                so2.Config.OptStartTime = 2000000000;
+                break;
+            }
+            case 4:
+            {
+                name = "ack wait";
+                so1.Config.AckWait = NATS_SECONDS_TO_NANOS(10);
+                so2.Config.AckWait = NATS_SECONDS_TO_NANOS(15);
+                break;
+            }
+            case 5:
+            {
+                name = "max deliver";
+                so1.Config.MaxDeliver = 3;
+                so2.Config.MaxDeliver = 5;
+                break;
+            }
+            case 6:
+            {
+                name = "replay policy";
+                so1.Config.ReplayPolicy = js_ReplayOriginal;
+                so2.Config.ReplayPolicy = js_ReplayInstant;
+                break;
+            }
+            case 7:
+            {
+                name = "max waiting";
+                so1.Config.MaxWaiting = 10;
+                so2.Config.MaxWaiting = 20;
+                break;
+            }
+            case 8:
+            {
+                name = "max ack pending";
+                so1.Config.MaxAckPending = 10;
+                so2.Config.MaxAckPending = 20;
+                break;
+            }
+            case 9:
+            {
+                name = "sample frequency";
+                so1.Config.SampleFrequency = "100%";
+                so2.Config.SampleFrequency = "50%";
+                break;
+            }
+            case 10:
+            {
+                name = "backoff";
+                so1.Config.BackOff = backOffListOf3;
+                so1.Config.BackOffLen = 3;
+                so1.Config.MaxDeliver = 5;
+                so2.Config.BackOff = backOffListOf2;
+                so2.Config.BackOffLen = 2;
+                so2.Config.MaxDeliver = 5;
+                break;
+            }
+            case 11:
+            {
+                name = "headers only";
+                so1.Config.HeadersOnly = true;
+                // Not setting it for the 2nd subscribe call should fail.
+                break;
+            }
+            case 12:
+            {
+                name = "max request batch";
+                so1.Config.MaxRequestBatch = 100;
+                so2.Config.MaxRequestBatch = 200;
+                break;
+            }
+            case 13:
+            {
+                name = "max request expires";
+                so1.Config.MaxRequestExpires = NATS_SECONDS_TO_NANOS(1);
+                so2.Config.MaxRequestExpires = NATS_SECONDS_TO_NANOS(2);
+                break;
+            }
+            case 14:
+            {
+                name = "inactive threshold";
+                so1.Config.InactiveThreshold = NATS_SECONDS_TO_NANOS(1);
+                so2.Config.InactiveThreshold = NATS_SECONDS_TO_NANOS(2);
+                break;
+            }
+            case 15:
+            {
+                name = "replicas";
+                so1.Config.Replicas = 1;
+                so2.Config.Replicas = 3;
+                break;
+            }
+            case 16:
+            {
+                name = "memory storage";
+                so1.Config.MemoryStorage = true;
+                // Not setting it for the 2nd subscribe call should fail.
+                break;
+            }
+        }
+        snprintf(testName, sizeof(testName), "Check %s: ", name);
+        test(testName);
+        s = js_PullSubscribe(&sub, js, "foo", durName, NULL, &so1, &jerr);
+        if ((s == NATS_OK) && (jerr == 0))
+        {
+            natsSubscription *nsub = NULL;
+
+            s = js_PullSubscribe(&nsub, js, "foo", durName, NULL, &so2, &jerr);
+            if ((s != NATS_OK) && (nsub == NULL) && (strstr(nats_GetLastError(NULL), name) != NULL))
+            {
+                s = NATS_OK;
+                nats_clearLastError();
+            }
+            else
+                s = NATS_ERR;
+        }
+        testCond(s == NATS_OK);
+        natsSubscription_Unsubscribe(sub);
+        natsSubscription_Destroy(sub);
+        sub = NULL;
+    }
+
+    for (i=0; i<4; i++)
+    {
+        jsConsumerConfig    cc;
+        natsInbox           *inbox = NULL;
+
+        natsInbox_Create(&inbox);
+        natsNUID_Next(durName, sizeof(durName));
+        jsConsumerConfig_Init(&cc);
+        switch (i)
+        {
+            case 0: cc.AckPolicy = js_AckAll; break;
+            case 1: cc.RateLimit = 10; break;
+            case 2: cc.FlowControl = false; break;
+            case 3: cc.Heartbeat = NATS_SECONDS_TO_NANOS(10); break;
+        }
+        cc.Durable = durName;
+        cc.DeliverSubject = inbox;
+        s = js_AddConsumer(NULL, js, "TEST", &cc, NULL, &jerr);
+        if ((s == NATS_OK) && (jerr == 0))
+        {
+            jsSubOptions so;
+
+            jsSubOptions_Init(&so);
+            so.Config.Durable = durName;
+            switch (i)
+            {
+                case 0: name="ack policy"; so.Config.AckPolicy = js_AckNone; break;
+                case 1: name="rate limit"; so.Config.RateLimit = 100; break;
+                case 2: name="flow control"; so.Config.FlowControl = true; break;
+                case 3: name="heartbeat"; so.Config.Heartbeat = NATS_SECONDS_TO_NANOS(20); break;
+            }
+            snprintf(testName, sizeof(testName), "Check %s: ", name);
+            test(testName);
+            s = js_SubscribeSync(&sub, js, "foo", NULL, &so, &jerr);
+            if ((s != NATS_OK) && (sub == NULL) && (strstr(nats_GetLastError(NULL), name) != NULL))
+            {
+                s = NATS_OK;
+                nats_clearLastError();
+            }
+            else
+                s = NATS_ERR;
+            testCond(s == NATS_OK);
+        }
+        natsInbox_Destroy(inbox);
+        inbox = NULL;
+    }
+
+    // Verify that we don't fail if user did not set it.
+    for (i=0; i<14; i++)
+    {
+        natsSubscription *nsub = NULL;
+        jsSubOptions so;
+
+        jsSubOptions_Init(&so);
+        switch (i)
+        {
+            case 0: name = "description"; so.Config.Description = "a"; break;
+            case 1: name = "deliver policy"; so.Config.DeliverPolicy = js_DeliverLast; break;
+            case 2: name = "optional start sequence"; so.Config.OptStartSeq = 10; break;
+            case 3: name = "optional start time"; so.Config.OptStartTime = 1000000000; break;
+            case 4: name = "ack wait"; so.Config.AckWait = NATS_SECONDS_TO_NANOS(10); break;
+            case 5: name = "max deliver"; so.Config.MaxDeliver = 3; break;
+            case 6: name = "replay policy"; so.Config.ReplayPolicy = js_ReplayInstant; break;
+            case 7: name = "max waiting"; so.Config.MaxWaiting = 10; break;
+            case 8: name = "max ack pending"; so.Config.MaxAckPending = 10; break;
+            case 9:
+            {
+                name = "backoff";
+                so.Config.BackOff = backOffListOf3;
+                so.Config.BackOffLen = 3;
+                so.Config.MaxDeliver = 4;
+                break;
+            }
+            case 10: name = "max request batch"; so.Config.MaxRequestBatch = 100; break;
+            case 11: name = "max request expires"; so.Config.MaxRequestExpires = NATS_SECONDS_TO_NANOS(2); break;
+            case 12: name = "inactive threshold"; so.Config.InactiveThreshold = NATS_SECONDS_TO_NANOS(2); break;
+            case 13: name = "replicas"; so.Config.Replicas = 1; break;
+        }
+
+        natsNUID_Next(durName, sizeof(durName));
+
+        snprintf(testName, sizeof(testName), "Check %s: ", name);
+        test(testName);
+        s = js_PullSubscribe(&sub, js, "foo", durName, NULL, &so, &jerr);
+        if (s == NATS_OK)
+        {
+            // If not explicitly asked by the user, we are ok
+            s = js_PullSubscribe(&nsub, js, "foo", durName, NULL, NULL, &jerr);
+
+            natsSubscription_Unsubscribe(nsub);
+            natsSubscription_Destroy(nsub);
+            nsub = NULL;
+        }
+        testCond(s == NATS_OK);
+        natsSubscription_Unsubscribe(sub);
+        natsSubscription_Destroy(sub);
+        sub = NULL;
+    }
+
+    // If the option is the same as the server default, it is not an error either.
+    for (i=0; i<5; i++)
+    {
+        natsSubscription *nsub = NULL;
+        jsSubOptions so;
+
+        jsSubOptions_Init(&so);
+        switch (i)
+        {
+            case 1: name = "default deliver policy"; so.Config.DeliverPolicy = js_DeliverAll; break;
+            case 4: name = "default ack wait"; so.Config.AckWait = NATS_SECONDS_TO_NANOS(30); break;
+            case 6: name = "default replay policy"; so.Config.ReplayPolicy = js_ReplayInstant; break;
+            case 7: name = "default max waiting"; so.Config.MaxWaiting = 512; break;
+            case 8: name = "default max ack pending"; so.Config.MaxAckPending = 65536; break;
+        }
+
+        natsNUID_Next(durName, sizeof(durName));
+
+        snprintf(testName, sizeof(testName), "Check %s: ", name);
+        test(testName);
+        s = js_PullSubscribe(&sub, js, "foo", durName, NULL, NULL, &jerr);
+        if (s == NATS_OK)
+        {
+            s = js_PullSubscribe(&nsub, js, "foo", durName, NULL, &so, &jerr);
+            natsSubscription_Unsubscribe(nsub);
+            natsSubscription_Destroy(nsub);
+            nsub = NULL;
+        }
+        testCond(s == NATS_OK);
+        natsSubscription_Unsubscribe(sub);
+        natsSubscription_Destroy(sub);
+        sub = NULL;
+    }
+
+    for (i=0; i<5; i++)
+    {
+        jsSubOptions so;
+
+        jsSubOptions_Init(&so);
+        switch (i)
+        {
+            case 0: name = "deliver policy"; so.Config.DeliverPolicy = js_DeliverNew; break;
+            case 1: name = "ack wait"; so.Config.AckWait = NATS_SECONDS_TO_NANOS(31); break;
+            case 2: name = "replay policy"; so.Config.ReplayPolicy = js_ReplayOriginal; break;
+            case 3: name = "max waiting"; so.Config.MaxWaiting = 513; break;
+            case 4: name = "max ack pending"; so.Config.MaxAckPending = 2; break;
+        }
+
+        natsNUID_Next(durName, sizeof(durName));
+
+        snprintf(testName, sizeof(testName), "Check %s: ", name);
+        test(testName);
+        s = js_PullSubscribe(&sub, js, "foo", durName, NULL, NULL, &jerr);
+        if (s == NATS_OK)
+        {
+            natsSubscription *nsub = NULL;
+
+            // First time it was created with defaults and the
+            // second time a change is attempted, so it is an error.
+            s = js_PullSubscribe(&nsub, js, "foo", durName, NULL, &so, &jerr);
+            if ((s != NATS_OK) && (nsub == NULL) && (strstr(nats_GetLastError(NULL), name) != NULL))
+            {
+                s = NATS_OK;
+                nats_clearLastError();
+            }
+            else
+                s = NATS_ERR;
+        }
+        testCond(s == NATS_OK);
+        natsSubscription_Unsubscribe(sub);
+        natsSubscription_Destroy(sub);
+        sub = NULL;
+    }
+
+    // Check that binding to a durable (without specifying durable option) works
+    test("Create durable: ");
+    jsConsumerConfig_Init(&cc);
+    cc.Durable = "BindDurable";
+    cc.DeliverSubject = "bar";
+    s = js_AddConsumer(NULL, js, "TEST", &cc, NULL, &jerr);
+    if (s == NATS_OK)
+    {
+        jsSubOptions so;
+
+        jsSubOptions_Init(&so);
+        so.Stream = "TEST";
+        so.Consumer = "BindDurable";
+        s = js_SubscribeSync(&sub, js, "foo", NULL, &so, &jerr);
+        natsSubscription_Destroy(sub);
+    }
+    testCond(s == NATS_OK);
+
+    JS_TEARDOWN;
+}
+
+static void
+_jsSeqMismatch(natsConnection *nc, natsSubscription *sub, natsStatus err, void *closure)
+{
+    struct threadArg *args = (struct threadArg*) closure;
+
+    natsMutex_Lock(args->m);
+    if (err == NATS_MISMATCH)
+        args->done = true;
+    else if (err == NATS_MISSED_HEARTBEAT)
+        args->results[args->control]++;
+    natsCondition_Broadcast(args->c);
+    natsMutex_Unlock(args->m);
+}
+
+static void
+_setMsgReply(natsConnection *nc, natsMsg **msg, void* closure)
+{
+    natsMsg *m = NULL;
+
+    natsMsg_Create(&m, (*msg)->subject, (const char*) closure, (*msg)->data, (*msg)->dataLen);
+    natsMsg_Destroy(*msg);
+    *msg = m;
+    natsConn_setFilter(nc, NULL);
+}
+
+static void
+test_JetStreamSubscribeIdleHearbeat(void)
+{
+    natsStatus          s;
+    natsConnection      *nc = NULL;
+    natsSubscription    *sub= NULL;
+    jsCtx               *js = NULL;
+    natsPid             pid = NATS_INVALID_PID;
+    jsErrCode           jerr= 0;
+    char                datastore[256] = {'\0'};
+    char                cmdLine[1024] = {'\0'};
+    jsStreamConfig      sc;
+    jsSubOptions        so;
+    natsMsg             *msg;
+    struct threadArg    args;
+    natsOptions         *opts = NULL;
+    natsSubscription    *nsub = NULL;
+    char                *inbox = NULL;
+    int                 i;
+    jsConsumerSequenceMismatch csm;
+    jsConsumerConfig cc;
+
+    ENSURE_JS_VERSION(2, 3, 5);
+
+    s = natsOptions_Create(&opts);
+    IFOK(s, _createDefaultThreadArgsForCbTests(&args));
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    _makeUniqueDir(datastore, sizeof(datastore), "datastore_");
+
+    test("Start JS server: ");
+    snprintf(cmdLine, sizeof(cmdLine), "-js -sd %s", datastore);
+    pid = _startServer("nats://127.0.0.1:4222", cmdLine, true);
+    CHECK_SERVER_STARTED(pid);
+    testCond(true);
+
+    test("Connect: ");
+    s = natsOptions_SetErrorHandler(opts, _jsSeqMismatch, (void*) &args);
+    IFOK(s, natsOptions_SetReconnectWait(opts, 50));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    testCond(s == NATS_OK);
+
+    test("Get context: ");
+    s = natsConnection_JetStream(&js, nc, NULL);
+    testCond(s == NATS_OK);
+
+    test("Create stream: ");
+    jsStreamConfig_Init(&sc);
+    sc.Name = "TEST";
+    sc.Subjects = (const char*[1]){"foo"};
+    sc.SubjectsLen = 1;
+    s = js_AddStream(NULL, js, &sc, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Populate: ");
+    s = js_Publish(NULL, js, "foo", "msg1", 4, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Subscribe async: ");
+    jsSubOptions_Init(&so);
+    so.Config.Durable = "dur1";
+    so.Config.Heartbeat = 150*1000000;
+    s = js_Subscribe(&sub, js, "foo", _jsMsgHandler, (void*) &args, NULL, &so, &jerr);
+    testCond((s == NATS_OK) && (sub != NULL) && (jerr == 0));
+
+    test("Check msg received: ");
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && (args.sum != 1))
+        s = natsCondition_TimedWait(args.c, args.m, 1000);
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_OK);
+
+    test("Check HB received: ");
+    nats_Sleep(300);
+    natsSubAndLdw_Lock(sub);
+    s = (sub->jsi->mismatch.dseq == 1 ? NATS_OK : NATS_ERR);
+    natsSubAndLdw_Unlock(sub);
+    testCond(s == NATS_OK);
+
+    test("Check HB is not given to app: ");
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && (args.sum == 1))
+        s = natsCondition_TimedWait(args.c, args.m, 300);
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_TIMEOUT);
+
+    test("Check get mismatch (bad args): ");
+    // Create regular sub to check invalid args.
+    s = natsConnection_SubscribeSync(&nsub, nc, "normal_sub");
+    IFOK(s, natsSubscription_GetSequenceMismatch(NULL, NULL));
+    if (s == NATS_INVALID_ARG)
+        s = natsSubscription_GetSequenceMismatch(NULL, sub);
+    if (s == NATS_INVALID_ARG)
+        s = natsSubscription_GetSequenceMismatch(&csm, NULL);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Not a JS sub: ")
+    s = natsSubscription_GetSequenceMismatch(&csm, nsub);
+    testCond((s == NATS_INVALID_SUBSCRIPTION)
+                && (strstr(nats_GetLastError(NULL), jsErrNotAJetStreamSubscription) != NULL));
+    nats_clearLastError();
+
+    test("Check get mismatch returns not found: ");
+    s = natsSubscription_GetSequenceMismatch(&csm, sub);
+    testCond((s == NATS_NOT_FOUND) && (nats_GetLastError(NULL) == NULL));
+
+    test("Send new message: ");
+    s = js_Publish(NULL, js, "foo", "msg2", 4, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Check seq mismatch: ");
+    natsSub_Lock(sub);
+    inbox = sub->subject;
+    natsSub_Unlock(sub);
+    // Cheat by pretending that the server sends message seq 3, while client received only seq 1.
+    natsConn_setFilterWithClosure(nc, _setMsgReply, (void*) "$JS.ACK.TEST.dur1.1.3.3.1624472520000000000.0");
+    s = natsConnection_PublishString(nc, inbox, "msg3");
+    // Wait for past the next HB and we should get an async error
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && !args.done)
+        s = natsCondition_TimedWait(args.c, args.m, 300);
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_OK);
+
+    test("Check that notification is sent only once: ");
+    natsMutex_Lock(args.m);
+    args.done = false;
+    natsMutex_Unlock(args.m);
+    // Wait for more than 1 HB, the callback should not
+    // be invoked because we have notified once and
+    // the mismatch still exist.
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && !args.done)
+        s = natsCondition_TimedWait(args.c, args.m, 300);
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_TIMEOUT);
+
+    test("Check get mismatch: ");
+    // Server will say that the consumer seq is at 2
+    s = natsSubscription_GetSequenceMismatch(&csm, sub);
+    testCond((s == NATS_OK)
+                && (csm.Stream == 3)
+                && (csm.ConsumerClient == 3)
+                && (csm.ConsumerServer == 2));
+
+    test("Check mismatch suppression cleared: ");
+    // Send real message so that all clears up
+    s = js_Publish(NULL, js, "foo", "msg3", 4, NULL, &jerr);
+    nats_Sleep(300);
+    natsSubAndLdw_Lock(sub);
+    s = (sub->jsi->ssmn == false ? NATS_OK : NATS_ERR);
+    natsSubAndLdw_Unlock(sub);
+    testCond(s == NATS_OK);
+
+    test("Skip again: ");
+    natsConn_setFilterWithClosure(nc, _setMsgReply, (void*) "$JS.ACK.TEST.dur1.1.4.4.1624482520000000000.0");
+    s = natsConnection_PublishString(nc, inbox, "msg4");
+    testCond(s == NATS_OK);
+
+    test("Check async cb invoked: ");
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && !args.done)
+        s = natsCondition_TimedWait(args.c, args.m, 1000);
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_OK);
+
+    test("Check HB timer reports missed HB: ");
+    _stopServer(pid);
+    // The HB interval is 150ms, but we check *2, so be a bit more
+    // than 300ms to avoid flapping.
+    nats_Sleep(500);
+    pid = _startServer("nats://127.0.0.1:4222", cmdLine, true);
+    CHECK_SERVER_STARTED(pid);
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && (args.results[0] == 0))
+        s = natsCondition_TimedWait(args.c, args.m, 1000);
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_OK);
+
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    natsMutex_Lock(args.m);
+    args.sum = 0;
+    args.done = false;
+    args.control = 1;
+    natsMutex_Unlock(args.m);
+
+    test("Subscribe sync: ");
+    jsSubOptions_Init(&so);
+    so.Config.Durable = "dur2";
+    so.Config.Heartbeat = 150*1000000;
+    s = js_SubscribeSync(&sub, js, "foo", NULL, &so, &jerr);
+    testCond((s == NATS_OK) && (sub != NULL) && (jerr == 0));
+
+    test("Check msgs received: ");
+    for (i=0; (s == NATS_OK) && (i<3); i++)
+    {
+        s = natsSubscription_NextMsg(&msg, sub, 1000);
+        IFOK(s, natsMsg_Ack(msg, NULL));
+        natsMsg_Destroy(msg);
+        msg = NULL;
+    }
+    testCond(s == NATS_OK);
+
+    test("Check HB received: ");
+    nats_Sleep(300);
+    natsMutex_Lock(sub->mu);
+    s = (sub->jsi->mismatch.dseq == 3 ? NATS_OK : NATS_ERR);
+    natsMutex_Unlock(sub->mu);
+    testCond(s == NATS_OK);
+
+    test("Check HB is not given to app: ");
+    s = natsSubscription_NextMsg(&msg, sub, 250);
+    testCond((s == NATS_TIMEOUT) && (msg == NULL));
+    nats_clearLastError();
+
+    test("Skip: ");
+    natsSub_Lock(sub);
+    inbox = sub->subject;
+    natsSub_Unlock(sub);
+    natsConn_setFilterWithClosure(nc, _setMsgReply, (void*) "$JS.ACK.TEST.dur2.1.4.4.1624482520000000000.0");
+    s = natsConnection_PublishString(nc, inbox, "msg4");
+    testCond(s == NATS_OK);
+
+    // For sync subs, we should not get async error
+    test("No async error: ");
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && !args.done)
+        s = natsCondition_TimedWait(args.c, args.m, 300);
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_TIMEOUT);
+    nats_clearLastError();
+
+    test("NextMsg reports error: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    testCond((s == NATS_MISMATCH) && (msg == NULL));
+    nats_clearLastError();
+
+    test("NextMsg again is ok: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    testCond((s == NATS_OK) && (msg != NULL));
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Check get mismatch: ");
+    s = natsSubscription_GetSequenceMismatch(&csm, sub);
+    testCond((s == NATS_OK)
+                && (csm.Stream == 4)
+                && (csm.ConsumerClient == 4)
+                && (csm.ConsumerServer == 3));
+
+    test("Check mismatch suppression cleared: ");
+    // Send real message so that all clears up
+    s = js_Publish(NULL, js, "foo", "msg4", 4, NULL, &jerr);
+    nats_Sleep(300);
+    natsSubAndLdw_Lock(sub);
+    s = (sub->jsi->ssmn == false && sub->jsi->sm == false ? NATS_OK : NATS_ERR);
+    natsSubAndLdw_Unlock(sub);
+    testCond(s == NATS_OK);
+
+    test("Skip again: ");
+    natsConn_setFilterWithClosure(nc, _setMsgReply, (void*) "$JS.ACK.TEST.dur1.1.5.5.1624492520000000000.0");
+    s = natsConnection_PublishString(nc, inbox, "msg5");
+    testCond(s == NATS_OK);
+
+    test("NextMsg reports error: ");
+    nats_Sleep(300);
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    testCond((s == NATS_MISMATCH) && (msg == NULL));
+    nats_clearLastError();
+
+    test("Check HB timer reports missed HB: ");
+    s = NATS_OK;
+    _stopServer(pid);
+    nats_Sleep(500);
+    pid = _startServer("nats://127.0.0.1:4222", cmdLine, true);
+    CHECK_SERVER_STARTED(pid);
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && (args.results[1] == 0))
+        s = natsCondition_TimedWait(args.c, args.m, 1000);
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_OK);
+
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("Create consumer with HB: ");
+    jsConsumerConfig_Init(&cc);
+    cc.Durable = "qdur";
+    cc.DeliverSubject = "bar";
+    cc.DeliverGroup = "queue";
+    cc.Heartbeat = 150*1000000;
+    s = js_AddConsumer(NULL, js, "TEST", &cc, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Queue sub against this consumer: ");
+    jsSubOptions_Init(&so);
+    so.Queue = "queue";
+    so.Stream = "TEST";
+    so.Consumer = "qdur";
+    so.Config.DeliverSubject = "bar";
+    s = js_Subscribe(&sub, js, "bar", _jsMsgHandler, (void*)&args, NULL, &so, &jerr);
+    if (s == NATS_ERR)
+        s = js_SubscribeSync(&sub, js, "bar", NULL, &so, &jerr);
+    testCond((s == NATS_ERR) && (sub == NULL) && (jerr == 0)
+                && (strstr(nats_GetLastError(NULL), jsErrNoHeartbeatForQueueSub) != NULL));
+    nats_clearLastError();
+
+    natsSubscription_Destroy(nsub);
+    JS_TEARDOWN;
+    _destroyDefaultThreadArgs(&args);
+    natsOptions_Destroy(opts);
+}
+
+static void
+test_JetStreamSubscribeFlowControl(void)
+{
+    natsStatus          s;
+    natsSubscription    *sub= NULL;
+    jsErrCode           jerr= 0;
+    jsStreamConfig      sc;
+    jsSubOptions        so;
+    natsMsg             *msg  = NULL;
+    struct threadArg    args;
+    natsSubscription    *nsub = NULL;
+    int                 i;
+    int                 total = 20000;
+    char                *data = NULL;
+    char                *subj = NULL;
+    natsBuffer          *buf  = NULL;
+
+    JS_SETUP(2, 3, 3);
+
+    data = malloc(100*1024);
+    if (data == NULL)
+        FAIL("Unable to allocate data");
+
+    if (valgrind)
+        total = 2000;
+
+    if (data == NULL)
+        FAIL("Unable to allocate data");
+    for (i=0; i<1024; i++)
+        data[i] = 'A';
+
+    s = _createDefaultThreadArgsForCbTests(&args);
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+    args.control = 2;
+    args.results[0] = total;
+
+    test("Create stream: ");
+    jsStreamConfig_Init(&sc);
+    sc.Name = "TEST";
+    sc.Subjects = (const char*[2]){"foo", "bar"};
+    sc.SubjectsLen = 2;
+    s = js_AddStream(NULL, js, &sc, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Populate: ");
+    for (i=0; (s == NATS_OK) && (i<total); i++)
+        s = js_PublishAsync(js, "foo", data, 1024, NULL);
+    testCond(s == NATS_OK);
+
+    test("Wait complete: ");
+    s = js_PublishAsyncComplete(js, NULL);
+    testCond(s == NATS_OK);
+
+    test("Create sub to check for FC: ");
+    s = natsConnection_SubscribeSync(&nsub, nc, "$JS.FC.TEST.>");
+    testCond((s == NATS_OK) && (nsub != NULL));
+
+    test("FC requires HB: ");
+    jsSubOptions_Init(&so);
+    so.Config.FlowControl = true;
+    s = js_Subscribe(&sub, js, "foo", _jsMsgHandler, (void*) &args, NULL, &so, &jerr);
+    testCond((s == NATS_ERR) && (sub == NULL) && (jerr == JSConsumerWithFlowControlNeedsHeartbeatsErr));
+    nats_clearLastError();
+
+    test("Subscribe async: ");
+    jsSubOptions_Init(&so);
+    so.Config.FlowControl = true;
+    so.Config.Heartbeat = NATS_SECONDS_TO_NANOS(1);
+    s = js_Subscribe(&sub, js, "foo", _jsMsgHandler, (void*) &args, NULL, &so, &jerr);
+    testCond((s == NATS_OK) && (sub != NULL) && (jerr == 0));
+
+    test("Check msg received: ");
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && (args.sum != total))
+        s = natsCondition_TimedWait(args.c, args.m, 10000);
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_OK);
+
+    test("Check FC responses were sent: ");
+    s = natsSubscription_NextMsg(&msg, nsub, 2000);
+    testCond(s == NATS_OK);
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+    natsSubscription_Destroy(nsub);
+    nsub = NULL;
+
+    test("Create sub to check for FC: ");
+    s = natsConnection_SubscribeSync(&nsub, nc, "$JS.FC.TEST.>");
+    testCond((s == NATS_OK) && (nsub != NULL));
+
+    test("Subscribe sync: ");
+    jsSubOptions_Init(&so);
+    so.Config.FlowControl = true;
+    so.Config.Heartbeat = NATS_SECONDS_TO_NANOS(1);
+    s = js_SubscribeSync(&sub, js, "foo", NULL, &so, &jerr);
+    testCond((s == NATS_OK) && (sub != NULL) && (jerr == 0));
+
+    test("Check msg received: ");
+    for (i=0; (s == NATS_OK) && (i<total); i++)
+    {
+        s = natsSubscription_NextMsg(&msg, sub, 1000);
+        IFOK(s, natsMsg_Ack(msg, NULL));
+        natsMsg_Destroy(msg);
+        msg = NULL;
+    }
+    testCond(s == NATS_OK);
+
+    test("Check FC responses were sent: ");
+    s = natsSubscription_NextMsg(&msg, nsub, 2000);
+    testCond(s == NATS_OK);
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    free(data);
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+    natsSubscription_Destroy(nsub);
+    nsub = NULL;
+
+    test("Create sub to check for FC: ");
+    s = natsConnection_SubscribeSync(&nsub, nc, "$JS.FC.TEST.>");
+    testCond((s == NATS_OK) && (nsub != NULL));
+
+    test("Subscribe: ");
+    jsSubOptions_Init(&so);
+    so.Config.FlowControl = true;
+    so.Config.Heartbeat = NATS_SECONDS_TO_NANOS(1);
+    s = js_Subscribe(&sub, js, "bar", _jsMsgHandler, (void*) &args, NULL, &so, &jerr);
+    testCond((s == NATS_OK) && (sub != NULL) && (jerr == 0));
+
+    test("Send hb header: ");
+    natsSub_Lock(sub);
+    subj = sub->subject;
+    natsSub_Unlock(sub);
+    s = natsBuf_Create(&buf, 256);
+    IFOK(s, natsBuf_Append(buf, "HPUB ", -1));
+    IFOK(s, natsBuf_Append(buf, subj, -1));
+    IFOK(s, natsBuf_Append(buf, " 76 76\r\n", -1));
+    IFOK(s, natsBuf_Append(buf, "NATS/1.0 100 Idle Heartbeat\r\n", -1));
+    IFOK(s, natsBuf_Append(buf, "Nats-Consumer-Stalled: $JS.FC.TEST.fc.reply\r\n\r\n\r\n", -1));
+    natsConn_Lock(nc);
+    IFOK(s, natsSock_WriteFully(&nc->sockCtx, natsBuf_Data(buf), natsBuf_Len(buf)));
+    natsConn_Unlock(nc);
+    testCond(s == NATS_OK);
+
+    test("Check FC reply due to HB header: ");
+    IFOK(s, natsSubscription_NextMsg(&msg, nsub, 1000));
+    testCond(s == NATS_OK);
+
+    natsBuf_Destroy(buf);
+    natsMsg_Destroy(msg);
+    natsSubscription_Destroy(sub);
+    natsSubscription_Destroy(nsub);
+    _destroyDefaultThreadArgs(&args);
+    JS_TEARDOWN;
+}
+
+static void
+_jsPubThread(void *closure)
+{
+    jsCtx   *js = (jsCtx*) closure;
+    int     i;
+
+    nats_Sleep(300);
+    for (i=0; i<5; i++)
+        js_Publish(NULL, js, "foo", "hello", 5, NULL, NULL);
+}
+
+static void
+_sendToPullSub(void *closure)
+{
+    struct threadArg    *args = (struct threadArg*) closure;
+    natsMsg             *msg  = NULL;
+    natsStatus          s;
+
+    nats_Sleep(250);
+    natsMutex_Lock(args->m);
+    s = natsMsg_create(&msg, args->sub->subject, (int) strlen(args->sub->subject),
+                        NULL, 0, args->string, (int) strlen(args->string), (int) strlen(args->string));
+    IFOK(s, natsConnection_PublishMsg(args->nc, msg));
+    natsMutex_Unlock(args->m);
+    natsMsg_Destroy(msg);
+}
+
+static void
+_fetchRequest(void *closure)
+{
+    struct threadArg    *args = (struct threadArg*) closure;
+    natsSubscription    *sub = NULL;
+    jsFetchRequest      fr;
+    natsStatus          s;
+    natsMsgList         list;
+    int64_t             start;
+
+    natsMutex_Lock(args->m);
+    sub = args->sub;
+    natsMutex_Unlock(args->m);
+
+    jsFetchRequest_Init(&fr);
+    // With current messages, for a MaxBytes of 150, we should get 2 messages,
+    // for a total size of 142.
+    fr.Batch = 10;
+    fr.MaxBytes = 150;
+    fr.Expires = NATS_SECONDS_TO_NANOS(2);
+    start = nats_Now();
+    s = natsSubscription_FetchRequest(&list, sub, &fr);
+    if (s == NATS_OK)
+    {
+        int i;
+        int total = 0;
+
+        for (i=0; i<list.Count; i++)
+        {
+            total += list.Msgs[i]->wsz;
+            natsMsg_AckSync(list.Msgs[i], NULL, NULL);
+        }
+
+        if ((total > 150) || (list.Count != 2) || ((nats_Now() - start) >= 1900))
+            s = NATS_ERR;
+
+        natsMsgList_Destroy(&list);
+    }
+
+    natsMutex_Lock(args->m);
+    args->status = s;
+    natsMutex_Unlock(args->m);
+}
+
+static void
+test_JetStreamSubscribePull(void)
+{
+    natsStatus          s;
+    natsSubscription    *sub= NULL;
+    natsMsg             *msg = NULL;
+    jsErrCode           jerr= 0;
+    natsMsgList         list;
+    jsStreamConfig      sc;
+    jsSubOptions        so;
+    struct threadArg    args;
+    int64_t             start, dur;
+    int                 i;
+    natsThread          *t = NULL;
+    jsConsumerConfig    cc;
+    jsFetchRequest      fr;
+    natsSubscription    *sub2 = NULL;
+    natsSubscription    *sub3 = NULL;
+
+    JS_SETUP(2, 9, 2);
+
+    s = _createDefaultThreadArgsForCbTests(&args);
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    test("Create pull sub (invalid args): ");
+    s = js_PullSubscribe(NULL, js, "foo", "dur", NULL, NULL, &jerr);
+    if (s == NATS_INVALID_ARG)
+        s = js_PullSubscribe(&sub, NULL, "foo", "dur", NULL, NULL, &jerr);
+    if (s == NATS_INVALID_ARG)
+        s = js_PullSubscribe(&sub, js, NULL, "dur", NULL, NULL, &jerr);
+    if (s == NATS_INVALID_ARG)
+        s = js_PullSubscribe(&sub, js, "", "dur", NULL, NULL, &jerr);
+    testCond((s == NATS_INVALID_ARG) && (sub == NULL) && (jerr == 0));
+    nats_clearLastError();
+
+    test("Create reg sync sub: ");
+    s = natsConnection_SubscribeSync(&sub, nc, "foo");
+    testCond((s == NATS_OK) && (sub != NULL));
+
+    test("Fetch bad args: ");
+    s = natsSubscription_Fetch(NULL, sub, 1, 1000, NULL);
+    if (s == NATS_INVALID_ARG)
+        s = natsSubscription_Fetch(&list, NULL, 1, 1000, NULL);
+    if (s == NATS_INVALID_ARG)
+        s = natsSubscription_Fetch(&list, sub, 0, 1000, NULL);
+    if (s == NATS_INVALID_ARG)
+        s = natsSubscription_Fetch(&list, sub, -1, 1000, NULL);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Fetch bad timeout: ");
+    s = natsSubscription_Fetch(&list, sub, 1, 0, NULL);
+    if (s == NATS_INVALID_TIMEOUT)
+        s = natsSubscription_Fetch(&list, sub, 1, -1, NULL);
+    testCond(s == NATS_INVALID_TIMEOUT);
+    nats_clearLastError();
+
+    test("Fetch bad sub: ");
+    s = natsSubscription_Fetch(&list, sub, 1, 1000, NULL);
+    testCond((s == NATS_INVALID_SUBSCRIPTION)
+                && (strstr(nats_GetLastError(NULL), jsErrNotAPullSubscription) != NULL));
+    nats_clearLastError();
+
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("Create reg async sub: ");
+    s = natsConnection_Subscribe(&sub, nc, "foo", _dummyMsgHandler, NULL);
+    testCond((s == NATS_OK) && (sub != NULL));
+
+    test("Fetch bad sub: ");
+    s = natsSubscription_Fetch(&list, sub, 1, 1000, NULL);
+    testCond((s == NATS_INVALID_SUBSCRIPTION)
+                && (strstr(nats_GetLastError(NULL), jsErrNotAPullSubscription) != NULL));
+    nats_clearLastError();
+
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("Create stream: ");
+    jsStreamConfig_Init(&sc);
+    sc.Name = "TEST";
+    sc.Subjects = (const char*[1]){"foo"};
+    sc.SubjectsLen = 1;
+    s = js_AddStream(NULL, js, &sc, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("AckNone ok: ");
+    jsSubOptions_Init(&so);
+    so.Config.AckPolicy = js_AckNone;
+    s = js_PullSubscribe(&sub, js, "foo", "ackNone", NULL, &so, &jerr);
+    testCond((s == NATS_OK) && (sub != NULL) && (jerr == 0));
+    natsSubscription_Unsubscribe(sub);
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("AckAll ok: ");
+    jsSubOptions_Init(&so);
+    so.Config.AckPolicy = js_AckAll;
+    s = js_PullSubscribe(&sub, js, "foo", "ackAll", NULL, &so, &jerr);
+    testCond((s == NATS_OK) && (sub != NULL) && (jerr == 0));
+    natsSubscription_Unsubscribe(sub);
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("Create push consumer: ");
+    jsConsumerConfig_Init(&cc);
+    cc.Durable = "push_dur";
+    cc.DeliverSubject = "push.deliver";
+    s = js_AddConsumer(NULL, js, "TEST", &cc, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Try create pull sub from push consumer: ");
+    s = js_PullSubscribe(&sub, js, "foo", "push_dur", NULL, NULL, &jerr);
+    testCond((s == NATS_ERR) && (sub == NULL) && (jerr == 0)
+                && (strstr(nats_GetLastError(NULL), jsErrPullSubscribeToPushConsumer) != NULL));
+    nats_clearLastError();
+
+    test("Create pull bound failure: ");
+    jsSubOptions_Init(&so);
+    so.Stream = "TEST";
+    so.Consumer = "bar";
+    s = js_PullSubscribe(&sub, js, "foo", "bar", NULL, &so, &jerr);
+    testCond((s == NATS_NOT_FOUND) && (sub == NULL) && (jerr == JSConsumerNotFoundErr));
+    nats_clearLastError();
+
+    test("Create pull sub: ");
+    jsSubOptions_Init(&so);
+    so.Config.MaxAckPending = 10;
+    so.Config.AckWait = NATS_MILLIS_TO_NANOS(300);
+    s = js_PullSubscribe(&sub, js, "foo", "dur", NULL, &so, &jerr);
+    testCond((s == NATS_OK) && (sub != NULL) && (jerr == 0));
+
+    test("Can't call NextMsg: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    testCond((s == NATS_INVALID_SUBSCRIPTION) && (msg == NULL)
+                && (strstr(nats_GetLastError(NULL), jsErrNotApplicableToPullSub) != NULL));
+    nats_clearLastError();
+
+    test("Fetch, no msg avail, timeout: ");
+    start = nats_Now();
+    s = natsSubscription_Fetch(&list, sub, 1, 500, &jerr);
+    dur = nats_Now() - start;
+    testCond((s == NATS_TIMEOUT) && (list.Msgs == NULL) && (list.Count == 0) && (jerr == 0)
+                && (dur >= 450) && (dur <= 600));
+    nats_clearLastError();
+
+    test("Send a message: ");
+    s = js_Publish(NULL, js, "foo", "hello", 5, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Fetch batch 1: ");
+    start = nats_Now();
+    s = natsSubscription_Fetch(&list, sub, 1, 1000, &jerr);
+    dur = nats_Now() - start;
+    testCond((s == NATS_OK) && (list.Msgs != NULL) && (list.Count == 1) && (jerr == 0)
+                && (dur <= 500));
+
+    test("Ack: ");
+    for (i=0; (s == NATS_OK) && (i<list.Count); i++)
+        s = natsMsg_AckSync(list.Msgs[i], NULL, &jerr);
+    natsMsgList_Destroy(&list);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Send a message: ");
+    s = js_Publish(NULL, js, "foo", "hello", 5, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Fetch batch more than avail: ");
+    start = nats_Now();
+    s = natsSubscription_Fetch(&list, sub, 5, 1000, &jerr);
+    dur = nats_Now() - start;
+    testCond((s == NATS_OK) && (list.Msgs != NULL) && (list.Count == 1) && (jerr == 0)
+                && (dur <= 500));
+
+    test("Ack: ");
+    for (i=0; (s == NATS_OK) && (i<list.Count); i++)
+        s = natsMsg_Ack(list.Msgs[i], NULL);
+    natsMsgList_Destroy(&list);
+    testCond(s == NATS_OK);
+
+    test("Start thread to send: ");
+    s = natsThread_Create(&t, _jsPubThread, (void*) js);
+    testCond(s == NATS_OK);
+
+    test("Fetch: ");
+    {
+        int got = 0;
+
+        while ((s == NATS_OK) && (got != 5))
+        {
+            s = natsSubscription_Fetch(&list, sub, 5-got, 2000, &jerr);
+            if (s == NATS_OK)
+                got += list.Count;
+            // Destroy msgs without ack'ing them.
+            natsMsgList_Destroy(&list);
+        }
+        testCond(s == NATS_OK);
+    }
+
+    // Wait for AckWait and messages should be redelivered.
+    nats_Sleep(500);
+
+    test("Fetch get redelivered msgs: ");
+    s = natsSubscription_Fetch(&list, sub, 5, 2000, &jerr);
+    testCond((s == NATS_OK) && (list.Msgs != NULL) && (list.Count == 5) && (jerr == 0));
+
+    test("Ack: ");
+    for (i=0; (s == NATS_OK) && (i<list.Count); i++)
+        s = natsMsg_Ack(list.Msgs[i], NULL);
+    natsMsgList_Destroy(&list);
+    testCond(s == NATS_OK);
+
+    natsThread_Join(t);
+    natsThread_Destroy(t);
+    t = NULL;
+
+    test("Receive msg with header no data: ");
+    s = natsMsg_create(&msg, sub->subject, (int) strlen(sub->subject), NULL, 0,
+                        "NATS/1.0\r\nk:v\r\n\r\n", 17, 17);
+    IFOK(s, natsConnection_PublishMsg(nc, msg));
+    IFOK(s, natsSubscription_Fetch(&list, sub, 1, 1000, &jerr));
+    testCond((s == NATS_OK) && (list.Msgs != NULL) && (list.Count == 1) && (jerr == 0));
+    natsMsg_Destroy(msg);
+    msg = NULL;
+    natsMsgList_Destroy(&list);
+
+    // Make sure there is no more pending.
+    _waitSubPending(sub, 0);
+
+    test("Msg with 404 status present before fetch: ");
+    s = natsMsg_create(&msg, sub->subject, (int) strlen(sub->subject), NULL, 0,
+                        "NATS/1.0 404 No Messages\r\n\r\n", 28, 28);
+    IFOK(s, natsConnection_PublishMsg(nc, msg));
+    if (s == NATS_OK)
+        _waitSubPending(sub, 1);
+    IFOK(s, natsSubscription_Fetch(&list, sub, 1, 100, &jerr));
+    testCond((s == NATS_TIMEOUT) && (list.Msgs == NULL) && (list.Count == 0) && (jerr == 0));
+    nats_clearLastError();
+    natsMsg_Destroy(msg);
+    msg = NULL;
+    natsMsgList_Destroy(&list);
+
+    // Since we faked the 404, the server is going to send a 408 when the request
+    // expires, so wait for it to be sent.
+    nats_Sleep(200);
+
+    test("Fetch returns on 408: ");
+    natsMutex_Lock(args.m);
+    args.nc = nc;
+    args.sub = sub;
+    args.string = "NATS/1.0 408 Request Timeout\r\n\r\n";
+    natsMutex_Unlock(args.m);
+    start = nats_Now();
+    s = natsThread_Create(&t, _sendToPullSub, (void*) &args);
+    IFOK(s, natsSubscription_Fetch(&list, sub, 1, 1000, &jerr));
+    dur = nats_Now() - start;
+    // Since we wait 250ms to publish, it will take aound 250ms
+    testCond((s == NATS_TIMEOUT) && (list.Msgs == NULL) && (list.Count == 0) && (jerr == 0)
+                && (dur < 500));
+    nats_clearLastError();
+    natsMsgList_Destroy(&list);
+
+    natsThread_Join(t);
+    natsThread_Destroy(t);
+    t = NULL;
+
+    test("Fetch gets 503: ");
+    natsMutex_Lock(args.m);
+    args.string = "NATS/1.0 503\r\n\r\n";
+    natsMutex_Unlock(args.m);
+    s = natsThread_Create(&t, _sendToPullSub, (void*) &args);
+    IFOK(s, natsSubscription_Fetch(&list, sub, 1, 10000, &jerr));
+    testCond((s == NATS_NO_RESPONDERS) && (list.Msgs == NULL) && (list.Count == 0) && (jerr == 0));
+    nats_clearLastError();
+    natsMsg_Destroy(msg);
+    msg = NULL;
+    natsMsgList_Destroy(&list);
+
+    natsThread_Join(t);
+    natsThread_Destroy(t);
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("Create stream: ");
+    jsStreamConfig_Init(&sc);
+    sc.Name = "TEST2";
+    sc.Subjects = (const char*[4]){"bar", "baz", "bat", "box"};
+    sc.SubjectsLen = 4;
+    s = js_AddStream(NULL, js, &sc, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Pull with max waiting: ");
+    jsSubOptions_Init(&so);
+    so.Config.MaxWaiting = 2;
+    s = js_PullSubscribe(&sub, js, "bar", "pullmaxwaiting", NULL, &so, &jerr);
+    testCond((s == NATS_OK) && (sub != NULL) && (jerr == 0));
+
+    test("Fill requests: ");
+    // Send requests manually to use the max requests
+    s = natsConnection_SubscribeSync(&sub2, nc, "my.pull.cons.inbox1");
+    IFOK(s, natsConnection_SubscribeSync(&sub3, nc, "my.pull.cons.inbox2"));
+    IFOK(s, natsConnection_PublishRequestString(nc, "$JS.API.CONSUMER.MSG.NEXT.TEST2.pullmaxwaiting", "my.pull.cons.inbox1", "{\"batch\":1,\"expires\":1000000000}"));
+    IFOK(s, natsConnection_PublishRequestString(nc, "$JS.API.CONSUMER.MSG.NEXT.TEST2.pullmaxwaiting", "my.pull.cons.inbox1", "{\"batch\":1,\"expires\":1000000000}"));
+    testCond(s == NATS_OK);
+
+    test("Max waiting error: ");
+    s = natsSubscription_Fetch(&list, sub, 1, 1000, &jerr);
+    testCond((s == NATS_ERR) && (strstr(nats_GetLastError(NULL), "Exceeded") != NULL));
+    nats_clearLastError();
+
+    natsSubscription_Destroy(sub2);
+    natsSubscription_Destroy(sub3);
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("Max request batch: ");
+    jsSubOptions_Init(&so);
+    so.Config.MaxRequestBatch = 2;
+    s = js_PullSubscribe(&sub, js, "baz", "max-request-batch", NULL, &so, &jerr);
+    IFOK(s, natsSubscription_Fetch(&list, sub, 10, 1000, &jerr));
+    testCond((s != NATS_OK) && (list.Count == 0) && (list.Msgs == NULL) && (jerr == 0)
+                && (strstr(nats_GetLastError(NULL), "MaxRequestBatch of 2") != NULL));
+    nats_clearLastError();
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("Max request expires: ");
+    jsSubOptions_Init(&so);
+    so.Config.MaxRequestExpires = NATS_MILLIS_TO_NANOS(50);
+    s = js_PullSubscribe(&sub, js, "baz", "max-request-expires", NULL, &so, &jerr);
+    IFOK(s, natsSubscription_Fetch(&list, sub, 10, 1000, &jerr));
+    testCond((s != NATS_OK) && (list.Count == 0) && (list.Msgs == NULL) && (jerr == 0)
+                && (strstr(nats_GetLastError(NULL), "MaxRequestExpires of 50ms") != NULL));
+    nats_clearLastError();
+
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("Ephemeral pull allowed (NULL): ");
+    s = js_PullSubscribe(&sub, js, "bar", NULL, NULL, NULL, &jerr);
+    testCond((s == NATS_OK) && (sub != NULL) && (jerr == 0));
+
+    test("Send a message: ");
+    s = js_Publish(NULL, js, "bar", "hello", 5, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Msgs received: ");
+    s = natsSubscription_Fetch(&list, sub, 1, 1000, &jerr);
+    testCond((s == NATS_OK) && (list.Msgs != NULL) && (list.Count == 1) && (jerr == 0));
+
+    natsMsgList_Destroy(&list);
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("Ephemeral pull allowed (empty): ");
+    s = js_PullSubscribe(&sub, js, "bar", "", NULL, NULL, &jerr);
+    testCond((s == NATS_OK) && (sub != NULL) && (jerr == 0));
+
+    test("Msgs received: ");
+    s = natsSubscription_Fetch(&list, sub, 1, 1000, &jerr);
+    testCond((s == NATS_OK) && (list.Msgs != NULL) && (list.Count == 1) && (jerr == 0));
+
+    natsMsgList_Destroy(&list);
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("jsFetchRequest init bad args: ");
+    s = jsFetchRequest_Init(NULL);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Create pull consumer with MaxRequestBytes: ");
+    jsSubOptions_Init(&so);
+    so.Config.MaxRequestMaxBytes = 1024;
+    s = js_PullSubscribe(&sub, js, "bat", "max-request-bytes", NULL, &so, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    jsFetchRequest_Init(&fr);
+
+    test("FetchRequest bad args: ");
+    s = natsSubscription_FetchRequest(NULL, sub, &fr);
+    if (s == NATS_INVALID_ARG)
+        s = natsSubscription_FetchRequest(&list, NULL, &fr);
+    if (s == NATS_INVALID_ARG)
+        s = natsSubscription_FetchRequest(&list, sub, NULL);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("FetchRequest no expiration err: ");
+    jsFetchRequest_Init(&fr);
+    // If NoWait is false, then Expires must be set.
+    fr.Batch = 1;
+    s = natsSubscription_FetchRequest(&list, sub, &fr);
+    testCond((s == NATS_INVALID_TIMEOUT && (list.Count == 0) && (list.Msgs == NULL)));
+    nats_clearLastError();
+
+    test("Batch must be set: ");
+    jsFetchRequest_Init(&fr);
+    fr.MaxBytes = 100;
+    fr.Expires = NATS_SECONDS_TO_NANOS(1);
+    s = natsSubscription_FetchRequest(&list, sub, &fr);
+    testCond((s == NATS_INVALID_ARG) && (list.Count == 0) && (list.Msgs == NULL));
+    nats_clearLastError();
+
+    test("MaxBytes must be > 0: ");
+    jsFetchRequest_Init(&fr);
+    fr.Batch = 1;
+    fr.MaxBytes = -100;
+    fr.Expires = NATS_SECONDS_TO_NANOS(1);
+    s = natsSubscription_FetchRequest(&list, sub, &fr);
+    testCond((s == NATS_INVALID_ARG) && (list.Count == 0) && (list.Msgs == NULL));
+    nats_clearLastError();
+
+    test("Requesting more than allowed max bytes: ");
+    jsFetchRequest_Init(&fr);
+    fr.Batch = 1;
+    fr.MaxBytes = 2048;
+    fr.Expires = NATS_SECONDS_TO_NANOS(1);
+    s = natsSubscription_FetchRequest(&list, sub, &fr);
+    testCond((s == NATS_ERR) && (list.Count == 0) && (list.Msgs == NULL)
+                && (strstr(nats_GetLastError(NULL), "Exceeded MaxRequestMaxBytes") != NULL));
+    nats_clearLastError();
+
+    test("No concurrent call: ");
+    natsMutex_Lock(args.m);
+    args.sub = sub;
+    args.status = NATS_OK;
+    natsMutex_Unlock(args.m);
+    s = natsThread_Create(&t, _fetchRequest, (void*) &args);
+    if (s == NATS_OK)
+    {
+        nats_Sleep(250);
+        jsFetchRequest_Init(&fr);
+        fr.Batch = 1;
+        fr.Expires = NATS_SECONDS_TO_NANOS(1);
+        s = natsSubscription_FetchRequest(&list, sub, &fr);
+    }
+    testCond((s == NATS_ERR) && (strstr(nats_GetLastError(NULL), jsErrConcurrentFetchNotAllowed) != NULL));
+    nats_clearLastError();
+    s = NATS_OK;
+
+    test("Populate: ");
+    for (i=0; (s == NATS_OK) && (i<10); i++)
+        s = js_PublishAsync(js, "bat", (const void*) "abcdefghij", 10, NULL);
+    testCond(s == NATS_OK);
+
+    test("Received ok: ");
+    natsThread_Join(t);
+    natsMutex_Lock(args.m);
+    s = args.status;
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_OK);
+
+    natsThread_Destroy(t);
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("Create pull consumer: ");
+    s = js_PullSubscribe(&sub, js, "box", "feth-request", NULL, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Populate: ");
+    s = js_PublishAsync(js, "box", (const void*) "abcdefghij", 10, NULL);
+    testCond(s == NATS_OK);
+
+    test("Check expiration: ");
+    // Unlike with the simple fetch, asking for more than is avail will
+    // wait until expiration to return.
+    jsFetchRequest_Init(&fr);
+    fr.Batch = 10;
+    fr.Expires = NATS_MILLIS_TO_NANOS(500);
+    fr.Heartbeat = NATS_MILLIS_TO_NANOS(50);
+    start = nats_Now();
+    s = natsSubscription_FetchRequest(&list, sub, &fr);
+    dur = nats_Now() - start;
+    testCond((s == NATS_OK) && (list.Count == 1) && (list.Msgs != NULL)
+                && (dur > 400) && (dur < 600));
+    natsMsgList_Destroy(&list);
+
+#if _WIN32
+    nats_Sleep(1000);
+#endif
+
+    test("Check invalid hb: ");
+    jsFetchRequest_Init(&fr);
+    fr.Batch = 10;
+    fr.Expires = NATS_SECONDS_TO_NANOS(1);
+    fr.Heartbeat = NATS_SECONDS_TO_NANOS(10);
+    s = natsSubscription_FetchRequest(&list, sub, &fr);
+    testCond((s == NATS_ERR) && (strstr(nats_GetLastError(NULL), "too large") != NULL));
+    nats_clearLastError();
+
+    test("Check idle hearbeat: ");
+    jsFetchRequest_Init(&fr);
+    fr.Batch = 10;
+    // Let's make it wait for 2 seconds
+    fr.Expires = NATS_SECONDS_TO_NANOS(2);
+    // And have HBs every 50ms
+    fr.Heartbeat = NATS_MILLIS_TO_NANOS(50);
+    // Schedule the server to be stopped in a different thread
+    s = natsThread_Create(&t, _stopServerInThread, (void*) &pid);
+    start = nats_Now();
+    // We should be kicked out of the fetch request with an error indicating
+    // that we missed hearbeats.
+    IFOK(s, natsSubscription_FetchRequest(&list, sub, &fr));
+    dur = nats_Now() - start;
+    testCond((s == NATS_MISSED_HEARTBEAT) && (dur < 500));
+
+    natsThread_Join(t);
+    natsThread_Destroy(t);
+    pid = NATS_INVALID_PID;
+
+    natsSubscription_Destroy(sub);
+
+    JS_TEARDOWN;
+    _destroyDefaultThreadArgs(&args);
+}
+
+static void
+test_JetStreamSubscribeHeadersOnly(void)
+{
+    natsStatus          s;
+    natsSubscription    *sub= NULL;
+    natsMsg             *msg = NULL;
+    jsErrCode           jerr= 0;
+    jsStreamConfig      sc;
+    jsSubOptions        so;
+    int                 i;
+
+    JS_SETUP(2, 6, 2);
+
+    test("Create stream: ");
+    jsStreamConfig_Init(&sc);
+    sc.Name = "S";
+    s = js_AddStream(NULL, js, &sc, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Populate: ");
+    for (i=0; (s == NATS_OK) && (i<10); i++)
+    {
+        s = natsMsg_Create(&msg, "S", NULL, "hello", 5);
+        IFOK(s, natsMsgHeader_Set(msg, "User-Header", "MyValue"));
+        IFOK(s, js_PublishMsg(NULL, js, msg, NULL, NULL));
+        natsMsg_Destroy(msg);
+        msg = NULL;
+    }
+    testCond(s == NATS_OK);
+
+    test("Create consumer with headers only: ");
+    jsSubOptions_Init(&so);
+    so.Config.HeadersOnly = true;
+    s = js_SubscribeSync(&sub, js, "S", NULL, &so, &jerr);
+    testCond((s == NATS_OK) && (sub != NULL) && (jerr == 0));
+
+    test("Verify only headers: ");
+    for (i=0; (s == NATS_OK) && (i<10); i++)
+    {
+        const char *val = NULL;
+        s = natsSubscription_NextMsg(&msg, sub, 1000);
+        IFOK(s, (natsMsg_GetDataLength(msg) == 0 ? NATS_OK : NATS_ERR));
+        IFOK(s, natsMsgHeader_Get(msg, "User-Header", &val));
+        IFOK(s, (strcmp(val, "MyValue") == 0 ? NATS_OK : NATS_ERR));
+        IFOK(s, natsMsgHeader_Get(msg, JSMsgSize, &val));
+        IFOK(s, (strcmp(val, "5") == 0 ? NATS_OK : NATS_ERR));
+        natsMsg_Destroy(msg);
+        msg = NULL;
+    }
+    testCond(s == NATS_OK);
+
+    natsSubscription_Destroy(sub);
+    jsCtx_Destroy(js);
+    natsConnection_Destroy(nc);
+    _stopServer(pid);
+    rmtree(datastore);
+}
+
+static void
+_orderedConsCB(natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure)
+{
+    struct threadArg *args = (struct threadArg*) closure;
+
+    natsMutex_Lock(args->m);
+    if (natsMsg_GetDataLength(msg) == 0)
+    {
+        args->done = true;
+        natsCondition_Signal(args->c);
+    }
+    else
+    {
+        natsBuf_Append(args->buf, natsMsg_GetData(msg), natsMsg_GetDataLength(msg));
+        args->sum++;
+    }
+    natsMutex_Unlock(args->m);
+    natsMsg_Destroy(msg);
+}
+
+static natsStatus
+_testOrderedCons(jsCtx *js, jsStreamInfo *si, char *asset, int assetLen, struct threadArg *args, bool async)
+{
+    natsStatus          s    = NATS_OK;
+    natsSubscription    *sub = NULL;
+    int                 received = 0;
+    jsSubOptions        so;
+
+    jsSubOptions_Init(&so);
+    so.Ordered = true;
+    so.Config.Heartbeat = NATS_MILLIS_TO_NANOS(250);
+
+    s = natsBuf_Create(&args->buf, assetLen);
+    if ((s == NATS_OK) && async)
+    {
+        s = js_Subscribe(&sub, js, "a", _orderedConsCB, (void*) args, NULL, &so, NULL);
+        if (s == NATS_OK)
+        {
+            natsMutex_Lock(args->m);
+            while ((s != NATS_TIMEOUT) && !args->done)
+                s = natsCondition_TimedWait(args->c, args->m, 5000);
+            received = args->sum;
+            natsMutex_Unlock(args->m);
+        }
+    }
+    else if (s == NATS_OK)
+    {
+        s = js_SubscribeSync(&sub, js, "a", NULL, &so, NULL);
+        if (s == NATS_OK)
+        {
+            bool    done  = false;
+            int64_t start = 0;
+            natsMsg *msg  = NULL;
+
+            start = nats_Now();
+            while ((s == NATS_OK) && !done)
+            {
+                s = natsSubscription_NextMsg(&msg, sub, 5000);
+                if (s == NATS_OK)
+                {
+                    done = (natsMsg_GetDataLength(msg) == 0 ? true : false);
+                    if (!done)
+                    {
+                        s = natsBuf_Append(args->buf, natsMsg_GetData(msg), natsMsg_GetDataLength(msg));
+                        received++;
+                    }
+                    natsMsg_Destroy(msg);
+                    msg = NULL;
+                }
+                if ((s == NATS_OK) && (nats_Now() - start > 5500))
+                    s = NATS_TIMEOUT;
+            }
+        }
+    }
+    if ((s == NATS_OK) && (natsBuf_Len(args->buf) != assetLen))
+    {
+        fprintf(stderr, "\nAsset length (%d) does not match received data length (%d)\n",
+                assetLen, natsBuf_Len(args->buf));
+        s = NATS_MISMATCH;
+    }
+    else if (s == NATS_OK)
+    {
+        int     i;
+        char    *data = natsBuf_Data(args->buf);
+
+        for (i=0; i<assetLen; i++)
+        {
+            if (data[i] != asset[i])
+            {
+                fprintf(stderr, "\nAsset does not match received data:\nAsset=\n%s\nData=\n%s\n",
+                        asset, data);
+                s = NATS_MISMATCH;
+                break;
+            }
+        }
+    }
+    else if (s == NATS_TIMEOUT)
+        fprintf(stderr, "\nReceived %d chunks out of %d\n", received, (int) (si->State.Msgs-1));
+
+    fflush(stderr);
+    natsSubscription_Destroy(sub);
+    natsMutex_Lock(args->m);
+    natsBuf_Destroy(args->buf);
+    args->buf = NULL;
+    args->sum = 0;
+    args->done = false;
+    natsMutex_Unlock(args->m);
+
+    return s;
+}
+
+static void
+_singleLoss(natsConnection *nc, natsMsg **msg, void* closure)
+{
+    const char  *val = NULL;
+    int         res  = rand() % 100;
+
+    if ((res <= 10) && (natsMsgHeader_Get(*msg, "data", &val) == NATS_OK))
+    {
+        natsMsg_Destroy(*msg);
+        *msg = NULL;
+        natsConn_setFilter(nc, NULL);
+    }
+}
+
+static void
+_multiLoss(natsConnection *nc, natsMsg **msg, void* closure)
+{
+    const char  *val = NULL;
+    int         res  = rand() % 100;
+
+    if ((res <= 10) && (natsMsgHeader_Get(*msg, "data", &val) == NATS_OK))
+    {
+        natsMsg_Destroy(*msg);
+        *msg = NULL;
+    }
+}
+
+static void
+_firstOnlyLoss(natsConnection *nc, natsMsg **msg, void* closure)
+{
+    jsMsgMetaData *meta = NULL;
+
+    if (natsMsg_GetMetaData(&meta, *msg) == NATS_OK)
+    {
+        if (meta->Sequence.Consumer == 1)
+        {
+            natsMsg_Destroy(*msg);
+            *msg = NULL;
+            natsConn_setFilter(nc, NULL);
+        }
+        jsMsgMetaData_Destroy(meta);
+    }
+}
+
+static void
+_lastOnlyLoss(natsConnection *nc, natsMsg **msg, void* closure)
+{
+    jsMsgMetaData   *meta = NULL;
+    jsStreamInfo    *si   = (jsStreamInfo*) closure;
+
+    if (natsMsg_GetMetaData(&meta, *msg) == NATS_OK)
+    {
+        if (meta->Sequence.Stream == si->State.LastSeq-1)
+        {
+            natsMsg_Destroy(*msg);
+            *msg = NULL;
+            natsConn_setFilter(nc, NULL);
+        }
+        jsMsgMetaData_Destroy(meta);
+    }
+}
+
+static void
+test_JetStreamOrderedConsumer(void)
+{
+    natsStatus          s;
+    natsSubscription    *sub= NULL;
+    jsErrCode           jerr= 0;
+    jsStreamConfig      sc;
+    jsSubOptions        so;
+    struct threadArg    args;
+    int                 i;
+    char                *asset = NULL;
+    int                 assetLen = 1024*1024;
+    const int           chunkSize = 1024;
+    jsStreamInfo        *si = NULL;
+    jsConsumerInfo      *ci1 = NULL;
+    jsConsumerInfo      *ci2 = NULL;
+
+    JS_SETUP(2, 3, 3);
+
+    s = _createDefaultThreadArgsForCbTests(&args);
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    test("Create stream: ");
+    jsStreamConfig_Init(&sc);
+    sc.Name = "OBJECT";
+    sc.Subjects = (const char*[1]){"a"};
+    sc.SubjectsLen = 1;
+    sc.Storage = js_MemoryStorage;
+    s = js_AddStream(NULL, js, &sc, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    // Create a sample asset.
+    asset = malloc(assetLen);
+    for (i=0; i<assetLen; i++)
+        asset[i] = (rand() % 26) + 'A';
+
+    test("Send chunks: ");
+    for (i=0; ((s == NATS_OK) && (i<assetLen)); i+=chunkSize)
+    {
+        char    *chunk = asset+i;
+        int     csize  = (assetLen-i <= chunkSize ? assetLen-i : chunkSize);
+        natsMsg *msg   = NULL;
+
+        s = natsMsg_Create(&msg, "a", NULL, (const void*) chunk, csize);
+        IFOK(s, natsMsgHeader_Set(msg, "data", "true"));
+        IFOK(s, js_PublishMsgAsync(js, &msg, NULL));
+        natsMsg_Destroy(msg);
+        msg = NULL;
+    }
+    IFOK(s, js_PublishAsync(js, "a", NULL, 0, NULL));
+    testCond(s == NATS_OK);
+
+    test("Wait for complete: ");
+    s = js_PublishAsyncComplete(js, NULL);
+    testCond(s == NATS_OK);
+
+    // Do some tests on simple misconfigurations first.
+    // For ordered delivery a couple of things need to be set properly.
+    // Can't be durable or have ack policy that is not ack none or max deliver set.
+    test("Ordered consumer, no durable: ");
+    jsSubOptions_Init(&so);
+    so.Ordered = true;
+    so.Config.Durable = "dlc";
+    s = js_SubscribeSync(&sub, js, "a", NULL, &so, &jerr);
+    testCond((s == NATS_INVALID_ARG) && (sub == NULL) && (jerr == 0)
+                && (strstr(nats_GetLastError(NULL), jsErrOrderedConsNoDurable) != NULL));
+    nats_clearLastError();
+
+    test("Ordered consumer, ack explicit: ");
+    jsSubOptions_Init(&so);
+    so.Ordered = true;
+    so.Config.AckPolicy = js_AckExplicit;
+    s = js_SubscribeSync(&sub, js, "a", NULL, &so, &jerr);
+    testCond((s == NATS_INVALID_ARG) && (sub == NULL) && (jerr == 0)
+                && (strstr(nats_GetLastError(NULL), jsErrOrderedConsNoAckPolicy) != NULL));
+    nats_clearLastError();
+
+    test("Ordered consumer, max deliver: ");
+    jsSubOptions_Init(&so);
+    so.Ordered = true;
+    so.Config.MaxDeliver = 10;
+    s = js_SubscribeSync(&sub, js, "a", NULL, &so, &jerr);
+    testCond((s == NATS_INVALID_ARG) && (sub == NULL) && (jerr == 0)
+                && (strstr(nats_GetLastError(NULL), jsErrOrderedConsNoMaxDeliver) != NULL));
+    nats_clearLastError();
+
+    test("Ordered consumer, no deliver subject: ");
+    jsSubOptions_Init(&so);
+    so.Ordered = true;
+    so.Config.DeliverSubject = "not.allowed";
+    s = js_SubscribeSync(&sub, js, "a", NULL, &so, &jerr);
+    testCond((s == NATS_INVALID_ARG) && (sub == NULL) && (jerr == 0)
+                && (strstr(nats_GetLastError(NULL), jsErrOrderedConsNoDeliverSubject) != NULL));
+    nats_clearLastError();
+
+    test("Ordered consumer, no queue: ");
+    jsSubOptions_Init(&so);
+    so.Ordered = true;
+    so.Queue = "queue";
+    s = js_SubscribeSync(&sub, js, "a", NULL, &so, &jerr);
+    testCond((s == NATS_INVALID_ARG) && (sub == NULL) && (jerr == 0)
+                && (strstr(nats_GetLastError(NULL), jsErrOrderedConsNoQueue) != NULL));
+    nats_clearLastError();
+
+    test("Ordered consumer, no consumer: ");
+    jsSubOptions_Init(&so);
+    so.Ordered = true;
+    so.Consumer = "consumer";
+    s = js_SubscribeSync(&sub, js, "a", NULL, &so, &jerr);
+    if (s == NATS_INVALID_ARG)
+    {
+        so.Stream = "OBJECT";
+        s = js_SubscribeSync(&sub, js, "a", NULL, &so, &jerr);
+    }
+    testCond((s == NATS_INVALID_ARG) && (sub == NULL) && (jerr == 0)
+                && (strstr(nats_GetLastError(NULL), jsErrOrderedConsNoBind) != NULL));
+    nats_clearLastError();
+
+    test("Ordered consumer, no pull mode: ");
+    jsSubOptions_Init(&so);
+    so.Ordered = true;
+    s = js_PullSubscribe(&sub, js, "a", "dur", NULL, &so, &jerr);
+    testCond((s == NATS_INVALID_ARG) && (sub == NULL) && (jerr == 0)
+                && (strstr(nats_GetLastError(NULL), jsErrOrderedConsNoPullMode) != NULL));
+    nats_clearLastError();
+
+    test("Get stream info: ");
+    s = js_GetStreamInfo(&si, js, "OBJECT", NULL, &jerr);
+    testCond((s == NATS_OK) && (si != NULL) && (jerr == 0));
+
+    test("Test async consumer: ");
+    s = _testOrderedCons(js, si, asset, assetLen, &args, true);
+    testCond(s == NATS_OK);
+
+    test("Test sync consumer: ");
+    s = _testOrderedCons(js, si, asset, assetLen, &args, false);
+    testCond(s == NATS_OK);
+
+    test("Test with single loss (async): ");
+    natsConn_setFilter(nc, _singleLoss);
+    s = _testOrderedCons(js, si, asset, assetLen, &args, true);
+    testCond(s == NATS_OK);
+
+    test("Test with single loss (sync): ");
+    natsConn_setFilter(nc, _singleLoss);
+    s = _testOrderedCons(js, si, asset, assetLen, &args, false);
+    testCond(s == NATS_OK);
+
+    test("Test with multi loss (async): ");
+    natsConn_setFilter(nc, _multiLoss);
+    s = _testOrderedCons(js, si, asset, assetLen, &args, true);
+    testCond(s == NATS_OK);
+
+    test("Test with multi loss (sync): ");
+    natsConn_setFilter(nc, _multiLoss);
+    s = _testOrderedCons(js, si, asset, assetLen, &args, false);
+    testCond(s == NATS_OK);
+
+    test("Test with first msg loss (async): ");
+    natsConn_setFilter(nc, _firstOnlyLoss);
+    s = _testOrderedCons(js, si, asset, assetLen, &args, true);
+    testCond(s == NATS_OK);
+
+    test("Test with first msg loss (sync): ");
+    natsConn_setFilter(nc, _firstOnlyLoss);
+    s = _testOrderedCons(js, si, asset, assetLen, &args, false);
+    testCond(s == NATS_OK);
+
+    test("Test with last msg loss (async): ");
+    natsConn_setFilterWithClosure(nc, _lastOnlyLoss, (void*) si);
+    s = _testOrderedCons(js, si, asset, assetLen, &args, true);
+    testCond(s == NATS_OK);
+
+    test("Test with last msg loss (sync): ");
+    natsConn_setFilterWithClosure(nc, _lastOnlyLoss, (void*) si);
+    s = _testOrderedCons(js, si, asset, assetLen, &args, false);
+    testCond(s == NATS_OK);
+
+    // A bug was causing the ordered consumer to be recreated at
+    // each hearbeat. Use a low hearbeat and check that name
+    // does not change after some HB intervals.
+    test("Create stream: ");
+    jsStreamConfig_Init(&sc);
+    sc.Name = "TESTNAME";
+    sc.Subjects = (const char*[1]){"b"};
+    sc.SubjectsLen = 1;
+    sc.Storage = js_MemoryStorage;
+    s = js_AddStream(NULL, js, &sc, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Send 1 message: ");
+    s = js_Publish(NULL, js, "b", "hello", 5, NULL, NULL);
+    testCond(s == NATS_OK);
+
+    test("Create ordered cons with small HB: ");
+    jsSubOptions_Init(&so);
+    so.Ordered = true;
+    so.Config.Heartbeat = NATS_MILLIS_TO_NANOS(100);
+    s = js_SubscribeSync(&sub, js, "b", NULL, &so, &jerr);
+    testCond((s == NATS_OK) && (sub != NULL) && (jerr == 0));
+
+    test("Get name: ");
+    s = natsSubscription_GetConsumerInfo(&ci1, sub, NULL, NULL);
+    testCond((s == NATS_OK) && (ci1 != NULL));
+
+    nats_Sleep(300);
+
+    test("Send 1 message: ");
+    s = js_Publish(NULL, js, "b", "hello", 5, NULL, NULL);
+    testCond(s == NATS_OK);
+
+    nats_Sleep(300);
+
+    test("Check name does not change: ");
+    s = natsSubscription_GetConsumerInfo(&ci2, sub, NULL, NULL);
+    testCond((s == NATS_OK) && (ci2 != NULL)
+                && (strcmp(ci1->Name, ci2->Name) == 0));
+    jsConsumerInfo_Destroy(ci1);
+    jsConsumerInfo_Destroy(ci2);
+
+    free(asset);
+    jsStreamInfo_Destroy(si);
+    natsSubscription_Destroy(sub);
+    _destroyDefaultThreadArgs(&args);
+    JS_TEARDOWN;
+}
+
+static void
+_jsOrderedErrHandler(natsConnection *nc, natsSubscription *subscription, natsStatus err, void *closure)
+{
+    struct threadArg    *args = (struct threadArg*) closure;
+
+    natsMutex_Lock(args->m);
+    args->status = err;
+    natsCondition_Signal(args->c);
+    natsMutex_Unlock(args->m);
+}
+
+static void
+test_JetStreamOrderedConsumerWithErrors(void)
+{
+    natsStatus          s;
+    natsConnection      *nc = NULL;
+    natsOptions         *opts = NULL;
+    natsSubscription    *sub= NULL;
+    jsCtx               *js = NULL;
+    natsPid             pid = NATS_INVALID_PID;
+    jsErrCode           jerr= 0;
+    char                datastore[256] = {'\0'};
+    char                cmdLine[1024] = {'\0'};
+    jsStreamConfig      sc;
+    jsSubOptions        so;
+    int                 i, iter;
+    char                *asset = NULL;
+    int                 assetLen = 128*1024;
+    const int           chunkSize = 256;
+    struct threadArg    args;
+
+    ENSURE_JS_VERSION(2, 3, 3);
+
+    s = _createDefaultThreadArgsForCbTests(&args);
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    _makeUniqueDir(datastore, sizeof(datastore), "datastore_");
+
+    test("Start JS server: ");
+    snprintf(cmdLine, sizeof(cmdLine), "-js -sd %s", datastore);
+    pid = _startServer("nats://127.0.0.1:4222", cmdLine, true);
+    CHECK_SERVER_STARTED(pid);
+    testCond(true);
+
+    test("Connect: ");
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_SetErrorHandler(opts, _jsOrderedErrHandler, (void*) &args));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    testCond(s == NATS_OK);
+
+    test("Get context: ");
+    s = natsConnection_JetStream(&js, nc, NULL);
+    testCond(s == NATS_OK);
+
+    // Create a sample asset.
+    asset = malloc(assetLen);
+    for (i=0; i<assetLen; i++)
+        asset[i] = (rand() % 26) + 'A';
+
+    for (iter=0; iter<2; iter++)
+    {
+        test("Create stream: ");
+        jsStreamConfig_Init(&sc);
+        sc.Name = "OBJECT";
+        sc.Subjects = (const char*[1]){"a"};
+        sc.SubjectsLen = 1;
+        sc.Storage = js_MemoryStorage;
+        s = js_AddStream(NULL, js, &sc, NULL, &jerr);
+        testCond((s == NATS_OK) && (jerr == 0));
+
+        test("Send chunks: ");
+        for (i=0; ((s == NATS_OK) && (i<assetLen)); i+=chunkSize)
+        {
+            char    *chunk = asset+i;
+            int     csize  = (assetLen-i <= chunkSize ? assetLen-i : chunkSize);
+
+            s = js_PublishAsync(js, "a", chunk, csize, NULL);
+        }
+        testCond(s == NATS_OK);
+
+        test("Wait for complete: ");
+        s = js_PublishAsyncComplete(js, NULL);
+        testCond(s == NATS_OK);
+
+        test("Create ordered sub: ");
+        jsSubOptions_Init(&so);
+        so.Ordered = true;
+        so.Config.Heartbeat = NATS_MILLIS_TO_NANOS(200);
+        s = js_SubscribeSync(&sub, js, "a", NULL, &so, &jerr);
+        testCond((s == NATS_OK) && (sub != NULL) && (jerr == 0));
+
+        // Since we are sync we will be paused here due to flow control.
+        nats_Sleep(100);
+
+        test("Delete asset: ");
+        if (iter == 0)
+        {
+            s = js_DeleteStream(js, "OBJECT", NULL, &jerr);
+        }
+        else
+        {
+            char *cons = NULL;
+
+            natsSub_Lock(sub);
+            cons = sub->jsi->consumer;
+            natsSub_Unlock(sub);
+            s = js_DeleteConsumer(js, "OBJECT", cons, NULL, &jerr);
+        }
+        testCond((s == NATS_OK) && (jerr == 0));
+
+        test("Check we get error: ");
+        natsMutex_Lock(args.m);
+        while ((s != NATS_TIMEOUT) && (args.status != NATS_MISSED_HEARTBEAT))
+            s = natsCondition_TimedWait(args.c, args.m, 1000);
+        args.status = NATS_OK;
+        natsMutex_Unlock(args.m);
+        testCond(s == NATS_OK);
+
+        natsSubscription_Destroy(sub);
+        sub = NULL;
+    }
+
+    free(asset);
+    JS_TEARDOWN;
+    natsOptions_Destroy(opts);
+    _destroyDefaultThreadArgs(&args);
+}
+
+static void
+_dropMsgFive(natsConnection *nc, natsMsg **msg, void* closure)
+{
+    const char          *val  = NULL;
+    struct threadArg    *args = (struct threadArg*) closure;
+
+    if (natsMsgHeader_Get(*msg, "data", &val) == NATS_OK)
+    {
+        if (++(args->results[0]) == 5)
+        {
+            natsMsg_Destroy(*msg);
+            *msg = NULL;
+            natsConn_setFilter(nc, NULL);
+        }
+    }
+}
+
+static void
+test_JetStreamOrderedConsumerWithAutoUnsub(void)
+{
+    natsStatus          s;
+    natsConnection      *nc2= NULL;
+    natsSubscription    *sub= NULL;
+    jsCtx               *js2= NULL;
+    jsErrCode           jerr= 0;
+    jsStreamConfig      sc;
+    jsSubOptions        so;
+    struct threadArg    args;
+    int                 i;
+    natsStatistics      stats;
+    uint64_t            in1 = 0;
+    uint64_t            in2 = 0;
+
+    JS_SETUP(2, 3, 3);
+
+    s = _createDefaultThreadArgsForCbTests(&args);
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    test("Create stream: ");
+    jsStreamConfig_Init(&sc);
+    sc.Name = "OBJECT";
+    sc.Subjects = (const char*[1]){"a"};
+    sc.SubjectsLen = 1;
+    sc.Storage = js_MemoryStorage;
+    s = js_AddStream(NULL, js, &sc, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Subscribe: ");
+    jsSubOptions_Init(&so);
+    so.Ordered = true;
+    so.Config.Heartbeat = NATS_MILLIS_TO_NANOS(250);
+    s = js_Subscribe(&sub, js, "a", _jsMsgHandler, (void*)&args, NULL, &so, &jerr);
+    testCond((s == NATS_OK) && (sub != NULL) && (jerr == 0));
+
+    test("Auto-unsub: ");
+    s = natsSubscription_AutoUnsubscribe(sub, 10);
+    testCond(s == NATS_OK);
+
+    // Set a message filter that will drop 1 message
+    natsConn_setFilterWithClosure(nc, _dropMsgFive, (void*)&args);
+
+    // Now produce 20 messages
+    test("Produce: ");
+    for (i=0; (s == NATS_OK) && (i < 20); i++)
+    {
+        natsMsg *msg = NULL;
+
+        s = natsMsg_Create(&msg, "a", NULL, "hello", 5);
+        IFOK(s, natsMsgHeader_Set(msg, "data", "true"));
+        IFOK(s, js_PublishMsgAsync(js, &msg, NULL));
+        natsMsg_Destroy(msg);
+        msg = NULL;
+    }
+    testCond(s == NATS_OK);
+
+    test("Wait for all pubs done: ");
+    s = js_PublishAsyncComplete(js, NULL);
+    testCond(s == NATS_OK);
+
+    test("Wait for subscription to be invalid: ");
+    s = NATS_ERR;
+    for (i=0; i<10; i++)
+    {
+        if (!natsSubscription_IsValid(sub))
+        {
+            s = NATS_OK;
+            break;
+        }
+        nats_Sleep(100);
+    }
+    testCond(s == NATS_OK);
+
+    // Wait a bit to make sure we are not receiving more than expected,
+    // and give a chance for the server to process the auto-unsub
+    // protocol.
+    nats_Sleep(500);
+
+    test("Check count: ");
+    natsMutex_Lock(args.m);
+    s = (args.sum == 10 ? NATS_OK : NATS_ERR);
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_OK);
+
+    // Now capture the in msgs count for the connection
+    test("Get stats: ");
+    s = natsConnection_GetStats(nc, &stats);
+    IFOK(s, natsStatistics_GetCounts(&stats, &in1, NULL, NULL, NULL, NULL));
+    testCond(s == NATS_OK);
+
+    // Send one more message and this count should not increase if the
+    // server had properly processed the auto-unsub after the
+    // reset of the ordered consumer. Use a different connection
+    // to send.
+    test("Send one msg: ");
+    s = natsConnection_ConnectTo(&nc2, NATS_DEFAULT_URL);
+    IFOK(s, natsConnection_JetStream(&js2, nc2, NULL));
+    IFOK(s, js_Publish(NULL, js2, "a", "bad", 3, NULL, NULL));
+    testCond(s == NATS_OK);
+
+    test("Get stats 2: ");
+    s = natsConnection_GetStats(nc, &stats);
+    IFOK(s, natsStatistics_GetCounts(&stats, &in2, NULL, NULL, NULL, NULL));
+    testCond(s == NATS_OK);
+
+    test("Msg not received: ");
+    s = (in1 == in2 ? NATS_OK : NATS_ERR);
+    testCond(s == NATS_OK);
+
+    natsSubscription_Destroy(sub);
+    jsCtx_Destroy(js2);
+    natsConnection_Destroy(nc2);
+    _destroyDefaultThreadArgs(&args);
+    JS_TEARDOWN;
+}
+
+static void
+test_JetStreamOrderedConsSrvRestart(void)
+{
+    natsStatus          s;
+    natsSubscription    *sub    = NULL;
+    natsMsg             *msg    = NULL;
+    natsOptions         *opts   = NULL;
+    jsConsumerInfo      *ci     = NULL;
+    jsErrCode           jerr= 0;
+    jsStreamConfig      sc;
+    jsSubOptions        so;
+    struct threadArg    args;
+    int                 i;
+
+    JS_SETUP(2, 9, 2);
+
+    s = _createDefaultThreadArgsForCbTests(&args);
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    // JS_SETUP creates a basic connection, we want to know when
+    // we reconnected, so create a new one.
+    test("Connect: ");
+    natsConnection_Destroy(nc);
+    nc = NULL;
+    jsCtx_Destroy(js);
+    js = NULL;
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_SetReconnectedCB(opts, _reconnectedCb, (void*) &args));
+    IFOK(s, natsOptions_SetReconnectWait(opts, 100));
+    IFOK(s, natsConnection_Connect(&nc, opts));
+    IFOK(s, natsConnection_JetStream(&js, nc, NULL));
+    testCond(s == NATS_OK);
+
+    test("Create stream: ");
+    jsStreamConfig_Init(&sc);
+    sc.Name = "OCRESTART";
+    sc.Subjects = (const char*[1]){"foo"};
+    sc.SubjectsLen = 1;
+    s = js_AddStream(NULL, js, &sc, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Subscribe: ");
+    jsSubOptions_Init(&so);
+    so.Ordered = true;
+    so.Config.Heartbeat = NATS_MILLIS_TO_NANOS(250);
+    so.Config.HeadersOnly = true;
+    s = js_SubscribeSync(&sub, js, "foo", NULL, &so, &jerr);
+    testCond((s == NATS_OK) && (sub != NULL) && (jerr == 0));
+
+    test("Send 1 message: ");
+    s = js_Publish(NULL, js, "foo", "hello", 5, NULL, NULL);
+    testCond(s == NATS_OK)
+
+    test("Consume: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    testCond(s == NATS_OK);
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Stopping server: ");
+    _stopServer(pid);
+    testCond(true);
+    // Wait more than the HB failure detection so that we check
+    // that resetting the ordered consumer works even while the
+    // server is still down.
+    test("Waiting before restarting: ");
+    nats_Sleep(1500);
+    testCond(true);
+    // Restart
+    test("Restarting server: ");
+    pid = _startServer("nats://127.0.0.1:4222", cmdLine, true);
+    CHECK_SERVER_STARTED(pid);
+    testCond(true);
+
+    test("Wait for reconnect: ");
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && !args.reconnected)
+        s = natsCondition_TimedWait(args.c, args.m, 2000);
+    testCond(s == NATS_OK);
+
+    test("Send 1 message: ");
+    s = js_Publish(NULL, js, "foo", "hello", 5, NULL, NULL);
+    testCond(s == NATS_OK)
+
+    test("Consume: ");
+    s = natsSubscription_NextMsg(&msg, sub, 5000);
+    testCond(s == NATS_OK);
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Check configuration is similar: ");
+    for (i=0; (s==NATS_OK) && (i<10); i++)
+    {
+        s = natsSubscription_GetConsumerInfo(&ci, sub, NULL, NULL);
+        if (s == NATS_OK)
+            break;
+        else if (s == NATS_NOT_FOUND)
+        {
+            s = NATS_OK;
+            nats_Sleep(100);
+        }
+    }
+    testCond((s == NATS_OK)
+                && (ci != NULL) && (ci->Config != NULL)
+                && (ci->Config->MemoryStorage)
+                && (ci->Config->Replicas == 1)
+                && (ci->Config->HeadersOnly));
+    jsConsumerInfo_Destroy(ci);
+
+    natsSubscription_Destroy(sub);
+    natsOptions_Destroy(opts);
+    _destroyDefaultThreadArgs(&args);
+    JS_TEARDOWN;
+}
+
+static void
+test_JetStreamSubscribeWithFWC(void)
+{
+    natsStatus          s;
+    natsSubscription    *sub= NULL;
+    jsErrCode           jerr= 0;
+    jsStreamConfig      sc;
+    jsConsumerConfig    cc;
+    jsSubOptions        so;
+
+    JS_SETUP(2, 3, 5);
+
+    test("Create stream: ");
+    jsStreamConfig_Init(&sc);
+    sc.Name = "TEST_WC";
+    sc.Subjects = (const char*[1]){"fwc.>"};
+    sc.SubjectsLen = 1;
+    s = js_AddStream(NULL, js, &sc, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Create consumer: ");
+    jsConsumerConfig_Init(&cc);
+    cc.Durable = "dur";
+    cc.DeliverSubject = "bar";
+    cc.FilterSubject = "fwc.>";
+    s = js_AddConsumer(NULL, js, "TEST_WC", &cc, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Subscribe: ");
+    jsSubOptions_Init(&so);
+    so.Config.Durable = "dur";
+    s = js_SubscribeSync(&sub, js, "fwc.>", NULL, &so, &jerr);
+    testCond((s == NATS_OK) && (sub != NULL));
+    natsSubscription_Destroy(sub);
+
+    JS_TEARDOWN;
+}
+
+static void
+test_JetStreamStreamsSealAndRollup(void)
+{
+    natsStatus          s;
+    jsStreamInfo        *si = NULL;
+    jsStreamConfig      cfg;
+    jsErrCode           jerr = 0;
+    natsMsg             *msg  = NULL;
+    natsSubscription    *sub  = NULL;
+    int                 i;
+
+    JS_SETUP(2, 6, 2);
+
+    test("Create sealed stream fails: ");
+    jsStreamConfig_Init(&cfg);
+    cfg.Name = "SEAL_FAIL";
+    cfg.Sealed = true;
+    s = js_AddStream(&si, js, &cfg, NULL, &jerr);
+    testCond((s == NATS_ERR) && (si == NULL) && (jerr == JSStreamInvalidConfig));
+    nats_clearLastError();
+
+    test("Create stream: ");
+    jsStreamConfig_Init(&cfg);
+    cfg.Name = "SEAL";
+    s = js_AddStream(NULL, js, &cfg, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Seal stream: ");
+    jsStreamConfig_Init(&cfg);
+    cfg.Name = "SEAL";
+    cfg.Sealed = true;
+    s = js_UpdateStream(&si, js, &cfg, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0) && (si != NULL)
+                && (si->Config != NULL) && si->Config->Sealed);
+    jsStreamInfo_Destroy(si);
+    si = NULL;
+
+    test("Can't send: ");
+    s = js_Publish(NULL, js, "SEAL", "a", 1, NULL, &jerr);
+    testCond((s == NATS_ERR) && (jerr == JSStreamSealedErr));
+    nats_clearLastError();
+
+    test("Create stream with deny purge/delete: ");
+    jsStreamConfig_Init(&cfg);
+    cfg.Name = "AUDIT";
+    cfg.Storage = js_MemoryStorage;
+    cfg.DenyPurge = true;
+    cfg.DenyDelete = true;
+    s = js_AddStream(&si, js, &cfg, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0) && (si != NULL)
+                && (si->Config != NULL) && si->Config->DenyDelete
+                && si->Config->DenyPurge);
+    jsStreamInfo_Destroy(si);
+    si = NULL;
+
+    test("Publish: ");
+    for (i=0; (s == NATS_OK) && (i < 10); i++)
+        s = js_Publish(NULL, js, "AUDIT", "ok", 2, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Can't delete: ");
+    s = js_DeleteMsg(js, "AUDIT", 1, NULL, &jerr);
+    testCond((s == NATS_ERR) && (jerr == JSStreamMsgDeleteFailed)
+                && (strstr(nats_GetLastError(NULL), "message delete not permitted") != NULL));
+    nats_clearLastError();
+
+    test("Can't purge: ");
+    s = js_PurgeStream(js, "AUDIT", NULL, &jerr);
+    testCond((s == NATS_ERR) && (jerr == JSStreamPurgeFailedErr)
+                && (strstr(nats_GetLastError(NULL), "stream purge not permitted") != NULL));
+    nats_clearLastError();
+
+    test("Try to remove deny clauses: ");
+    cfg.DenyPurge = false;
+    cfg.DenyDelete = false;
+    s = js_UpdateStream(NULL, js, &cfg, NULL, &jerr);
+    testCond((s == NATS_ERR) && (jerr == JSStreamInvalidConfig));
+    nats_clearLastError();
+
+    test("Create stream for rollup: ");
+    jsStreamConfig_Init(&cfg);
+    cfg.Name = "ROLLUP";
+    cfg.Subjects = (const char*[1]){"rollup.*"};
+    cfg.SubjectsLen = 1;
+    cfg.AllowRollup = true;
+    s = js_AddStream(&si, js, &cfg, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0) && (si != NULL)
+                && (si->Config != NULL) && si->Config->AllowRollup);
+    jsStreamInfo_Destroy(si);
+    si = NULL;
+
+    test("Populate: ");
+    for (i=0; (s == NATS_OK) && (i<10); i++)
+        s = js_Publish(NULL, js, "rollup.a", "a", 1, NULL, &jerr);
+    for (i=0; (s == NATS_OK) && (i<10); i++)
+        s = js_Publish(NULL, js, "rollup.b", "b", 1, NULL, &jerr);
+    for (i=0; (s == NATS_OK) && (i<10); i++)
+        s = js_Publish(NULL, js, "rollup.c", "c", 1, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Check stream: ");
+    s = js_GetStreamInfo(&si, js, "ROLLUP", NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0) && (si != NULL)
+                && (si->State.Msgs == 30));
+    jsStreamInfo_Destroy(si);
+    si = NULL;
+
+    test("Rollup per subject: ");
+    s = natsMsg_Create(&msg, "rollup.b", NULL, "Rollup", 6);
+    IFOK(s, natsMsgHeader_Set(msg, JSMsgRollup, JSMsgRollupSubject));
+    IFOK(s, js_PublishMsg(NULL, js, msg, NULL, &jerr));
+    testCond((s == NATS_OK) && (jerr == 0));
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Create consumer: ");
+    s = js_SubscribeSync(&sub, js, "rollup.b", NULL, NULL, &jerr);
+    testCond((s == NATS_OK) && (sub != NULL) && (jerr == 0));
+
+    test("Check content: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    IFOK(s, (strcmp(natsMsg_GetData(msg), "Rollup") == 0 ? NATS_OK : NATS_ERR));
+    testCond(s == NATS_OK);
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Make sure single msg: ");
+    s = natsSubscription_NextMsg(&msg, sub, 250);
+    testCond((s == NATS_TIMEOUT) && (msg == NULL));
+    nats_clearLastError();
+
+    natsSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("Rollup for all: ");
+    s = natsMsg_Create(&msg, "rollup.c", NULL, "RollupAll", 9);
+    IFOK(s, natsMsgHeader_Set(msg, JSMsgRollup, JSMsgRollupAll));
+    IFOK(s, js_PublishMsg(NULL, js, msg, NULL, &jerr));
+    testCond((s == NATS_OK) && (jerr == 0));
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Create consumer: ");
+    s = js_SubscribeSync(&sub, js, "rollup.c", NULL, NULL, &jerr);
+    testCond((s == NATS_OK) && (sub != NULL) && (jerr == 0));
+
+    test("Check content: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    IFOK(s, (strcmp(natsMsg_GetData(msg), "RollupAll") == 0 ? NATS_OK : NATS_ERR));
+    testCond(s == NATS_OK);
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Make sure single msg: ");
+    s = natsSubscription_NextMsg(&msg, sub, 250);
+    testCond((s == NATS_TIMEOUT) && (msg == NULL));
+    nats_clearLastError();
+
+    test("Check stream: ");
+    s = js_GetStreamInfo(&si, js, "ROLLUP", NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0) && (si != NULL)
+                && (si->State.Msgs == 1));
+    jsStreamInfo_Destroy(si);
+    si = NULL;
+
+    natsSubscription_Destroy(sub);
+    JS_TEARDOWN;
+}
+
+static void
+test_JetStreamGetMsgAndLastMsg(void)
+{
+    natsStatus          s;
+    natsMsg             *msg = NULL;
+    jsStreamConfig      cfg;
+    jsErrCode           jerr = 0;
+    const char          *val = NULL;
+
+    JS_SETUP(2, 3, 1);
+
+    test("Create stream: ");
+    jsStreamConfig_Init(&cfg);
+    cfg.Name = "GET_MSG";
+    cfg.Subjects = (const char*[1]){"foo.*"};
+    cfg.SubjectsLen = 1;
+    cfg.Storage = js_MemoryStorage;
+    s = js_AddStream(NULL, js, &cfg, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Populate: ");
+    s = js_Publish(NULL, js, "foo.bar", "msg1", 4, NULL, NULL);
+    IFOK(s, js_Publish(NULL, js, "foo.bar", "msg2", 4, NULL, NULL));
+    IFOK(s, js_Publish(NULL, js, "foo.baz", "msg3", 4, NULL, NULL));
+    IFOK(s, natsMsg_Create(&msg, "foo.baz", NULL, "msg4", 4));
+    IFOK(s, natsMsgHeader_Set(msg, "Some-Header", "Some-Value"));
+    IFOK(s, js_PublishMsg(NULL, js, msg, NULL, NULL));
+    testCond(s == NATS_OK);
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("GetMsg bad args: ");
+    s = js_GetMsg(NULL, js, "GET_MSG", 1, NULL, &jerr);
+    if (s == NATS_INVALID_ARG)
+        s = js_GetMsg(&msg, NULL, "GET_MSG", 1, NULL, &jerr);
+    if (s == NATS_INVALID_ARG)
+        s = js_GetMsg(&msg, js, "GET_MSG", 0, NULL, &jerr);
+    testCond((s == NATS_INVALID_ARG) && (msg == NULL) && (jerr == 0));
+    nats_clearLastError();
+
+    test("GetMsg stream name required: ");
+    s = js_GetMsg(&msg, js, NULL, 1, NULL, &jerr);
+    if (s == NATS_INVALID_ARG)
+        s = js_GetMsg(&msg, js, "", 1, NULL, &jerr);
+    testCond((s == NATS_INVALID_ARG) && (msg == NULL) && (jerr == 0)
+                && (strstr(nats_GetLastError(NULL), jsErrStreamNameRequired) != NULL));
+    nats_clearLastError();
+
+    test("GetMsg stream not found: ");
+    s = js_GetMsg(&msg, js, "NOT_FOUND", 1, NULL, &jerr);
+    testCond((s == NATS_ERR) && (msg == NULL) && (jerr == JSStreamNotFoundErr)
+                && (strstr(nats_GetLastError(NULL), "stream not found") != NULL));
+    nats_clearLastError();
+
+    test("GetMsg message not found: ");
+    s = js_GetMsg(&msg, js, "GET_MSG", 100, NULL, &jerr);
+    testCond((s == NATS_NOT_FOUND) && (msg == NULL) && (jerr == JSNoMessageFoundErr));
+    nats_clearLastError();
+
+    test("GetMsg message ok: ");
+    s = js_GetMsg(&msg, js, "GET_MSG", 1, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0) && (msg != NULL)
+                && (strcmp(natsMsg_GetSubject(msg), "foo.bar") == 0)
+                && (strcmp(natsMsg_GetData(msg), "msg1") == 0)
+                && (natsMsg_GetSequence(msg) == 1)
+                && (natsMsg_GetTime(msg) != 0));
+
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    // GetLasMsg tests now....
+
+    test("GetLastMsg bad args: ");
+    s = js_GetLastMsg(NULL, js, "GET_MSG", "foo.bar", NULL, &jerr);
+    if (s == NATS_INVALID_ARG)
+        s = js_GetLastMsg(&msg, NULL, "GET_MSG", "foo.bar", NULL, &jerr);
+    if (s == NATS_INVALID_ARG)
+        s = js_GetLastMsg(&msg, js, "GET_MSG", NULL, NULL, &jerr);
+    if (s == NATS_INVALID_ARG)
+        s = js_GetLastMsg(&msg, js, "GET_MSG", "", NULL, &jerr);
+    testCond((s == NATS_INVALID_ARG) && (msg == NULL) && (jerr == 0));
+    nats_clearLastError();
+
+    test("GetLastMsg stream name required: ");
+    s = js_GetLastMsg(&msg, js, NULL, "foo.bar", NULL, &jerr);
+    if (s == NATS_INVALID_ARG)
+        s = js_GetLastMsg(&msg, js, "", "foo.bar", NULL, &jerr);
+    testCond((s == NATS_INVALID_ARG) && (msg == NULL) && (jerr == 0)
+                && (strstr(nats_GetLastError(NULL), jsErrStreamNameRequired) != NULL));
+    nats_clearLastError();
+
+    test("GetLastMsg stream not found: ");
+    s = js_GetLastMsg(&msg, js, "NOT_FOUND", "foo.bar", NULL, &jerr);
+    testCond((s == NATS_ERR) && (msg == NULL) && (jerr == JSStreamNotFoundErr)
+                && (strstr(nats_GetLastError(NULL), "stream not found") != NULL));
+    nats_clearLastError();
+
+    test("GetLastMsg message not found: ");
+    s = js_GetLastMsg(&msg, js, "GET_MSG", "not.found", NULL, &jerr);
+    testCond((s == NATS_NOT_FOUND) && (msg == NULL) && (jerr == JSNoMessageFoundErr));
+    nats_clearLastError();
+
+    test("GetLastMsg message ok: ");
+    s = js_GetLastMsg(&msg, js, "GET_MSG", "foo.baz", NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0) && (msg != NULL) && (msg != NULL)
+                && (strcmp(natsMsg_GetSubject(msg), "foo.baz") == 0)
+                && (strcmp(natsMsg_GetData(msg), "msg4") == 0)
+                && (natsMsgHeader_Get(msg, "Some-Header", &val) == NATS_OK)
+                && (strcmp(val, "Some-Value") == 0)
+                && (natsMsg_GetSequence(msg) == 4)
+                && (natsMsg_GetTime(msg) != 0));
+    natsMsg_Destroy(msg);
+    JS_TEARDOWN;
+}
+
+static void
+test_JetStreamConvertDirectMsg(void)
+{
+    natsStatus  s;
+    natsMsg     *msg = NULL;
+    const char  *val = NULL;
+
+    test("Bad request: ");
+    s = natsMsg_Create(&msg, "inbox", NULL, NULL, 0);
+    IFOK(s, natsMsgHeader_Set(msg, STATUS_HDR, REQ_TIMEOUT));
+    IFOK(s, natsMsgHeader_Set(msg, DESCRIPTION_HDR, "Bad Request"));
+    IFOK(s, js_directGetMsgToJSMsg("test", msg));
+    testCond((s == NATS_ERR) && (strstr(nats_GetLastError(NULL), "Bad Request") != NULL));
+    nats_clearLastError();
+
+    test("Not found: ");
+    s = natsMsgHeader_Set(msg, STATUS_HDR, NOT_FOUND_STATUS);
+    IFOK(s, natsMsgHeader_Set(msg, DESCRIPTION_HDR, "Message Not Found"));
+    IFOK(s, js_directGetMsgToJSMsg("test", msg));
+    testCond((s == NATS_NOT_FOUND) && (strstr(nats_GetLastError(NULL), natsStatus_GetText(NATS_NOT_FOUND)) != NULL));
+    nats_clearLastError();
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Msg has no header: ");
+    s = natsMsg_Create(&msg, "inbox", NULL, "1", 1);
+    IFOK(s, js_directGetMsgToJSMsg("test", msg));
+    testCond((s == NATS_ERR) && (strstr(nats_GetLastError(NULL), "should have headers") != NULL));
+    nats_clearLastError();
+
+    test("Missing stream: ");
+    s = natsMsgHeader_Set(msg, "some", "header");
+    IFOK(s, js_directGetMsgToJSMsg("test", msg));
+    testCond((s == NATS_ERR) && (strstr(nats_GetLastError(NULL), "missing stream") != NULL));
+    nats_clearLastError();
+
+    test("Missing sequence: ");
+    s = natsMsgHeader_Set(msg, JSStream, "test");
+    IFOK(s, js_directGetMsgToJSMsg("test", msg));
+    testCond((s == NATS_ERR) && (strstr(nats_GetLastError(NULL), "invalid sequence") != NULL));
+    nats_clearLastError();
+
+    test("Invalid sequence: ");
+    s = natsMsgHeader_Set(msg, JSSequence, "abc");
+    IFOK(s, js_directGetMsgToJSMsg("test", msg));
+    testCond((s == NATS_ERR) && (strstr(nats_GetLastError(NULL), "invalid sequence 'abc'") != NULL));
+    nats_clearLastError();
+
+    test("Missing timestamp: ");
+    s = natsMsgHeader_Set(msg, JSSequence, "1");
+    IFOK(s, js_directGetMsgToJSMsg("test", msg));
+    testCond((s == NATS_ERR) && (strstr(nats_GetLastError(NULL), "missing or invalid timestamp") != NULL));
+    nats_clearLastError();
+
+    test("Invalid timestamp: ");
+    s = natsMsgHeader_Set(msg, JSTimeStamp, "aaaaaaaaa bbbbbbbbbbbb cccccccccc ddddddddddd eeeeeeeeee ffffff");
+    IFOK(s, js_directGetMsgToJSMsg("test", msg));
+    testCond((s == NATS_ERR) && (strstr(nats_GetLastError(NULL), "missing or invalid timestamp 'aaaaaaaaa bbbbbbbbbbbb cccccccccc ddddddddddd eeeeeeeeee ffffff'") != NULL));
+    nats_clearLastError();
+
+    test("Missing subject: ");
+    s = natsMsgHeader_Set(msg, JSTimeStamp, "2006-01-02T15:04:05Z");
+    IFOK(s, js_directGetMsgToJSMsg("test", msg));
+    testCond((s == NATS_ERR) && (strstr(nats_GetLastError(NULL), "missing or invalid subject") != NULL));
+    nats_clearLastError();
+
+    test("Invalid subject: ");
+    s = natsMsgHeader_Set(msg, JSSubject, "");
+    IFOK(s, js_directGetMsgToJSMsg("test", msg));
+    testCond((s == NATS_ERR) && (strstr(nats_GetLastError(NULL), "missing or invalid subject ''") != NULL));
+    nats_clearLastError();
+
+    test("Valid msg: ");
+    s = natsMsgHeader_Set(msg, JSSubject, "foo");
+    IFOK(s, js_directGetMsgToJSMsg("test", msg));
+    testCond((s == NATS_OK)
+                && (strcmp(natsMsg_GetSubject(msg), "foo") == 0)
+                && (natsMsg_GetSequence(msg) == 1)
+                && (natsMsg_GetTime(msg) == 1136214245000000000L)
+                && (natsMsgHeader_Get(msg, "some", &val) == NATS_OK)
+                && (strcmp(val, "header") == 0));
+
+    natsMsg_Destroy(msg);
+}
+
+static natsStatus
+_checkDirectGet(jsCtx *js, uint64_t seq, const char *nextBySubj, const char *lastBySubj,
+                const char *expectedSubj, uint64_t expectedSeq)
+{
+    natsStatus              s    = NATS_OK;
+    natsMsg                 *msg = NULL;
+    jsDirectGetMsgOptions   o;
+
+    jsDirectGetMsgOptions_Init(&o);
+    o.Sequence = seq;
+    o.NextBySubject = nextBySubj;
+    o.LastBySubject = lastBySubj;
+
+    s = js_DirectGetMsg(&msg, js, "DGM", NULL, &o);
+    if ((s != NATS_OK)
+        || (msg == NULL)
+        || (strcmp(natsMsg_GetSubject(msg), expectedSubj) != 0)
+        || (natsMsg_GetSequence(msg) != expectedSeq)
+        || (natsMsg_GetTime(msg) == 0))
+    {
+        s = NATS_ERR;
+    }
+
+    natsMsg_Destroy(msg);
+    return s;
+}
+
+static void
+test_JetStreamDirectGetMsg(void)
+{
+    natsStatus              s;
+    natsMsg                 *msg = NULL;
+    jsStreamConfig          cfg;
+    jsErrCode               jerr = 0;
+    const char              *val = NULL;
+    jsDirectGetMsgOptions   dgo;
+
+    JS_SETUP(2, 9, 0);
+
+    test("Create stream: ");
+    jsStreamConfig_Init(&cfg);
+    cfg.Name = "DGM";
+    cfg.Subjects = (const char*[2]){"foo", "bar"};
+    cfg.SubjectsLen = 2;
+    cfg.Storage = js_MemoryStorage;
+    cfg.AllowDirect = true;
+    s = js_AddStream(NULL, js, &cfg, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Populate: ");
+    s = js_Publish(NULL, js, "foo", "a", 1, NULL, NULL);
+    IFOK(s, js_Publish(NULL, js, "foo", "b", 1, NULL, NULL));
+    IFOK(s, js_Publish(NULL, js, "foo", "c", 1, NULL, NULL));
+    IFOK(s, js_Publish(NULL, js, "bar", "d", 1, NULL, NULL));
+    IFOK(s, js_Publish(NULL, js, "foo", "e", 1, NULL, NULL));
+    testCond(s == NATS_OK);
+
+    test("DirecGetMsg bad args: ");
+    s = js_DirectGetMsg(NULL, js, "DGM", NULL, &dgo);
+    if (s == NATS_INVALID_ARG)
+        s = js_DirectGetMsg(&msg, NULL, "DGM", NULL, &dgo);
+    if (s == NATS_INVALID_ARG)
+        s = js_DirectGetMsg(&msg, js, "DGM", NULL, NULL);
+    testCond((s == NATS_INVALID_ARG) && (msg == NULL));
+    nats_clearLastError();
+
+    test("GetMsg stream name required: ");
+    s = js_DirectGetMsg(&msg, js, NULL, NULL, &dgo);
+    if (s == NATS_INVALID_ARG)
+        s = js_DirectGetMsg(&msg, js, "", NULL, &dgo);
+    testCond((s == NATS_INVALID_ARG) && (msg == NULL)
+                && (strstr(nats_GetLastError(NULL), jsErrStreamNameRequired) != NULL));
+    nats_clearLastError();
+
+    test("DirectGetMsg options init bad args: ");
+    s = jsDirectGetMsgOptions_Init(NULL);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Seq==0 next_by_subj(bar): ");
+    testCond(_checkDirectGet(js, 0, "bar", NULL, "bar", 4) == NATS_OK);
+
+    test("Seq==0 last_by_subj: ");
+    testCond(_checkDirectGet(js, 0, NULL, "foo", "foo", 5) == NATS_OK);
+
+    test("Seq==0 next_by_subj(foo): ");
+    testCond(_checkDirectGet(js, 0, "foo", NULL, "foo", 1) == NATS_OK);
+
+    test("Seq==4 next_by_subj: ");
+    testCond(_checkDirectGet(js, 4, "foo", NULL, "foo", 5) == NATS_OK);
+
+    test("Seq==2 next_by_subj: ");
+    testCond(_checkDirectGet(js, 2, "foo", NULL, "foo", 2) == NATS_OK);
+
+    test("Publish msg with header: ");
+    s = natsMsg_Create(&msg, "foo", NULL, "f", 1);
+    IFOK(s, natsMsgHeader_Add(msg, "MyHeader", "MyValue"));
+    IFOK(s, js_PublishMsg(NULL, js, msg, NULL, NULL));
+    testCond(s == NATS_OK);
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Check headers preserved: ");
+    jsDirectGetMsgOptions_Init(&dgo);
+    dgo.Sequence = 6;
+    s = js_DirectGetMsg(&msg, js, "DGM", NULL, &dgo);
+    testCond((s == NATS_OK)
+                && (natsMsgHeader_Get(msg, "MyHeader", &val) == NATS_OK)
+                && (val != NULL)
+                && (strcmp(val, "MyValue") == 0));
+
+    test("Change subject header: ");
+    s = natsMsgHeader_Set(msg, JSSubject, "xxx");
+    testCond(s == NATS_OK);
+
+    test("Msg subject not affected: ");
+    testCond(strcmp(natsMsg_GetSubject(msg), "foo") == 0);
+
+    natsMsg_Destroy(msg);
+
+    JS_TEARDOWN;
+}
+
+static void
+test_JetStreamNakWithDelay(void)
+{
+    natsStatus          s;
+    natsSubscription    *sub= NULL;
+    jsErrCode           jerr= 0;
+    jsStreamConfig      sc;
+    natsMsg             *msg = NULL;
+    int64_t             start=0;
+    int64_t             dur  = 0;
+    jsOptions           o;
+
+    JS_SETUP(2, 7, 2);
+
+    test("Create stream: ");
+    jsStreamConfig_Init(&sc);
+    sc.Name = "TEST";
+    sc.Subjects = (const char*[1]){"foo"};
+    sc.SubjectsLen = 1;
+    s = js_AddStream(NULL, js, &sc, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Publish: ");
+    s = js_Publish(NULL, js, "foo", "ok", 2, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Create sub: ");
+    s = js_SubscribeSync(&sub, js, "foo", NULL, NULL, &jerr);
+    testCond((s == NATS_OK) && (sub != NULL) && (jerr == 0));
+
+    test("Get message: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    testCond((s == NATS_OK) && (msg != NULL));
+
+    test("Nak with 500ms: ");
+    s = natsMsg_NakWithDelay(msg, 500, NULL);
+    testCond(s == NATS_OK);
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Should not be redelivered yet: ");
+    s = natsSubscription_NextMsg(&msg, sub, 250);
+    testCond((s == NATS_TIMEOUT) && (msg == NULL));
+    nats_clearLastError();
+
+    test("Wait for redelivery: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    testCond((s == NATS_OK) && (msg != NULL));
+
+    test("NakWithDelay with 0: ");
+    s = natsMsg_NakWithDelay(msg, 0, NULL);
+    testCond(s == NATS_OK);
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Wait for redelivery: ");
+    s = natsSubscription_NextMsg(&msg, sub, 250);
+    testCond((s == NATS_OK) && (msg != NULL));
+
+    natsSub_retain(sub);
+    natsSubscription_Destroy(sub);
+
+    // Stop the server...
+    _stopServer(pid);
+    pid = NATS_INVALID_PID;
+
+    test("Check ack sync with options: ");
+    jsOptions_Init(&o);
+    o.Wait = 500;
+    start = nats_Now();
+    s = natsMsg_Ack(msg, &o);
+    dur = nats_Now()-start;
+    testCond((s == NATS_TIMEOUT) && (dur > 250) && (dur < 750));
+    natsMsg_Destroy(msg);
+    natsSub_release(sub);
+    JS_TEARDOWN;
+}
+
+static void
+test_JetStreamBackOffRedeliveries(void)
+{
+    natsStatus          s;
+    natsSubscription    *sub= NULL;
+    jsErrCode           jerr= 0;
+    jsStreamConfig      sc;
+    natsMsg             *msg = NULL;
+    int64_t             start =0;
+    int64_t             dur = 0;
+    natsInbox           *inbox = NULL;
+    jsConsumerInfo      *ci = NULL;
+    jsSubOptions        so;
+    int                 i;
+
+    JS_SETUP(2, 7, 2);
+
+    test("Create stream: ");
+    jsStreamConfig_Init(&sc);
+    sc.Name = "TEST";
+    sc.Subjects = (const char*[1]){"foo"};
+    sc.SubjectsLen = 1;
+    s = js_AddStream(NULL, js, &sc, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Create inbox: ");
+    s = natsInbox_Create(&inbox);
+    testCond(s == NATS_OK);
+
+    test("Wrong MaxDeliver: ");
+    jsSubOptions_Init(&so);
+    so.Stream = "TEST";
+    so.Config.Durable = "backoff";
+    so.Config.AckPolicy = js_AckExplicit;
+    so.Config.DeliverPolicy = js_DeliverAll;
+    so.Config.DeliverSubject = inbox;
+    so.Config.BackOff = (int64_t[]){NATS_MILLIS_TO_NANOS(50), NATS_MILLIS_TO_NANOS(250)};
+    so.Config.BackOffLen = 2;
+    s = js_SubscribeSync(&sub, js, "foo", NULL, &so, &jerr);
+    testCond((s != NATS_OK) && (sub == NULL) && (jerr == JSConsumerMaxDeliverBackoffErr)
+                && (strstr(nats_GetLastError(NULL), "max deliver is required") != NULL));
+    nats_clearLastError();
+
+    test("Create ok: ");
+    so.Config.MaxDeliver = 4;
+    s = js_SubscribeSync(&sub, js, "foo", NULL, &so, &jerr);
+    testCond((s == NATS_OK) && (sub != NULL) && (jerr == 0));
+
+    test("Send: ");
+    s = js_Publish(NULL, js, "foo", "ok", 2, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Consume msg: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    testCond(s == NATS_OK);
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    // We should get a redelivery at around 50ms
+    test("Redelivered at 50ms: ");
+    start = nats_Now();
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    dur = (nats_Now()-start);
+    testCond((s == NATS_OK) && (dur > 25) && (dur < 100));
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    // Now it should be every 250ms or so
+    for (i=0; i<2; i++)
+    {
+        test("Redelivered at 250ms: ");
+        start = nats_Now();
+        s = natsSubscription_NextMsg(&msg, sub, 1000);
+        dur = (nats_Now()-start);
+        testCond((s == NATS_OK) && (dur > 200) && (dur < 300));
+        natsMsg_Destroy(msg);
+        msg = NULL;
+    }
+
+    // At this point, we should have go reach MaxDeliver
+    test("No more: ");
+    s = natsSubscription_NextMsg(&msg, sub, 300);
+    testCond(s == NATS_TIMEOUT);
+
+    test("Check consumer info: ");
+    s = js_GetConsumerInfo(&ci, js, "TEST", "backoff", NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0) && (ci != NULL) && (ci->Config != NULL)
+                && (ci->Config->BackOffLen == 2)
+                && (ci->Config->BackOff[0] == NATS_MILLIS_TO_NANOS(50))
+                && (ci->Config->BackOff[1] == NATS_MILLIS_TO_NANOS(250)));
+    jsConsumerInfo_Destroy(ci);
+    natsInbox_Destroy(inbox);
+    natsSubscription_Destroy(sub);
+    JS_TEARDOWN;
+}
+
+static void
+_subjectsInfoReq(natsConnection *nc, natsMsg **msg, void *closure)
+{
+    natsMsg     *newMsg     = NULL;
+    int         *count      = (int*) closure;
+    const char  *payload    = NULL;
+
+    if (strstr((*msg)->data, "stream_info_response") == NULL)
+        return;
+
+    (*count)++;
+    if (*count == 1)
+    {
+        // Pretend that we have 5 subjects and a limit of 2
+        payload = "{\"type\":\"io.nats.jetstream.api.v1.stream_info_response\",\"total\":5,\"offset\":0,\"limit\":2,"\
+        "\"config\":{\"name\":\"TEST\",\"subjects\":[\"foo.>\"]},"\
+        "\"state\":{\"num_subjects\":5,\"subjects\":{\"foo.bar\":1,\"foo.baz\":2}}}";
+    }
+    else if (*count == 2)
+    {
+        // Continue with the pagination
+        payload = "{\"type\":\"io.nats.jetstream.api.v1.stream_info_response\",\"total\":5,\"offset\":2,\"limit\":2,"\
+        "\"config\":{\"name\":\"TEST\",\"subjects\":[\"foo.>\"]},"\
+        "\"state\":{\"num_subjects\":5,\"subjects\":{\"foo.bat\":3,\"foo.box\":4}}}";
+    }
+    else if (*count == 3)
+    {
+        // Pretend that the number went down in between page requests and the
+        // last request got nothing in return.
+        payload = "{\"type\":\"io.nats.jetstream.api.v1.stream_info_response\",\"total\":3,\"offset\":3,\"limit\":2,"\
+        "\"config\":{\"name\":\"TEST\",\"subjects\":[\"foo.>\"]},"\
+        "\"state\":{\"num_subjects\":3}}";
+    }
+    else
+    {
+        // Keep the original message
+        return;
+    }
+    if (natsMsg_create(&newMsg, (*msg)->subject, (int) strlen((*msg)->subject),
+                        NULL, 0, payload, (int) strlen(payload), 0) == NATS_OK)
+    {
+        natsMsg_Destroy(*msg);
+        *msg = newMsg;
+    }
+}
+
+static void
+test_JetStreamInfoWithSubjects(void)
+{
+    natsStatus          s;
+    jsStreamInfo        *si = NULL;
+    jsStreamConfig      cfg;
+    jsErrCode           jerr = 0;
+    jsOptions           o;
+    int                 count = 0;
+    natsSubscription    *sub  = NULL;
+    natsMsg             *msg  = NULL;
+
+    JS_SETUP(2, 9, 0);
+
+    test("Create stream: ");
+    jsStreamConfig_Init(&cfg);
+    cfg.Name = "TEST";
+    cfg.Subjects = (const char*[1]){"foo.>"};
+    cfg.SubjectsLen = 1;
+    s = js_AddStream(NULL, js, &cfg, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Send to different subjects: ");
+    s = js_Publish(NULL, js, "foo.bar", "m1", 2, NULL, &jerr);
+    IFOK(s, js_Publish(NULL, js, "foo.baz", "m1", 2, NULL, &jerr));
+    IFOK(s, js_Publish(NULL, js, "foo.baz", "m2", 2, NULL, &jerr));
+    IFOK(s, js_Publish(NULL, js, "foo.baz.bat", "m1", 2, NULL, &jerr));
+    IFOK(s, js_Publish(NULL, js, "foo.baz.bat", "m2", 2, NULL, &jerr));
+    IFOK(s, js_Publish(NULL, js, "foo.baz.bat", "m3", 2, NULL, &jerr));
+    testCond(s == NATS_OK);
+
+    test("Check number subjects: ");
+    s = js_GetStreamInfo(&si, js, "TEST", NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0) && (si != NULL) && (si->State.NumSubjects == 3));
+    jsStreamInfo_Destroy(si);
+    si = NULL;
+
+    test("Get subjects list (no match): ");
+    jsOptions_Init(&o);
+    o.Stream.Info.SubjectsFilter = "none";
+    s = js_GetStreamInfo(&si, js, "TEST", &o, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0) && (si != NULL) && (si->State.NumSubjects == 3)
+                && (si->State.Subjects == NULL));
+    jsStreamInfo_Destroy(si);
+    si = NULL;
+
+    test("Get subjects list (1 match): ");
+    jsOptions_Init(&o);
+    o.Stream.Info.SubjectsFilter = "foo.bar";
+    s = js_GetStreamInfo(&si, js, "TEST", &o, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0) && (si != NULL) && (si->State.NumSubjects == 3)
+                && (si->State.Subjects != NULL)
+                && (si->State.Subjects->Count == 1)
+                && (strcmp(si->State.Subjects->List[0].Subject, "foo.bar") == 0)
+                && (si->State.Subjects->List[0].Msgs == 1));
+    jsStreamInfo_Destroy(si);
+    si = NULL;
+
+    test("Get subjects list (all matches): ");
+    jsOptions_Init(&o);
+    o.Stream.Info.SubjectsFilter = "foo.>";
+    s = js_GetStreamInfo(&si, js, "TEST", &o, &jerr);
+    if ((s == NATS_OK) && ((si == NULL) || (si->State.Subjects == NULL) || (si->State.Subjects->Count != 3)))
+        s = NATS_ERR;
+    else
+    {
+        int i;
+        bool got1, got2, got3;
+
+        for (i=0; i<si->State.Subjects->Count; i++)
+        {
+            jsStreamStateSubject *subj = &(si->State.Subjects->List[i]);
+
+            if ((strcmp(subj->Subject, "foo.bar") == 0) && (subj->Msgs == 1))
+                got1 = true;
+            else if ((strcmp(subj->Subject, "foo.baz") == 0) && (subj->Msgs == 2))
+                got2 = true;
+            else if ((strcmp(subj->Subject, "foo.baz.bat") == 0) && (subj->Msgs == 3))
+                got3 = true;
+        }
+        s = (got1 && got2 && got3 ? NATS_OK : NATS_ERR);
+    }
+    testCond((s == NATS_OK) && (jerr == 0) && (si->State.NumSubjects == 3));
+    jsStreamInfo_Destroy(si);
+    si = NULL;
+
+    test("Create sub for pagination check: ");
+    s = natsConnection_SubscribeSync(&sub, nc, "$JS.API.STREAM.INFO.TEST");
+    testCond(s == NATS_OK);
+
+    natsConn_setFilterWithClosure(nc, _subjectsInfoReq, (void*) &count);
+
+    test("Get all subjects with pagination: ");
+    jsOptions_Init(&o);
+    o.Stream.Info.SubjectsFilter = ">";
+    s = js_GetStreamInfo(&si, js, "TEST", &o, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0) && (si != NULL) && (si->State.NumSubjects == 3)
+                && (si->State.Subjects != NULL)
+                && (si->State.Subjects->List != NULL)
+                && (si->State.Subjects->Count == 4));
+    jsStreamInfo_Destroy(si);
+    si = NULL;
+
+    natsConn_setFilter(nc, NULL);
+
+    test("Check 1st request: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    testCond((s == NATS_OK)
+                && (strstr(natsMsg_GetData(msg), "offset") == NULL));
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Check 2nd request: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    testCond((s == NATS_OK)
+                && (strstr(natsMsg_GetData(msg), "offset\":2") != NULL));
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    test("Check 3rd request: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    testCond((s == NATS_OK)
+                && (strstr(natsMsg_GetData(msg), "offset\":4") != NULL));
+    natsMsg_Destroy(msg);
+    msg = NULL;
+
+    natsSubscription_Destroy(sub);
+
+    JS_TEARDOWN;
+}
+
+static void
+test_KeyValueManager(void)
+{
+    natsStatus          s;
+    kvStore             *kv = NULL;
+    kvConfig            kvc;
+    jsStreamConfig      sc;
+    jsErrCode           jerr = 0;
+    jsStreamInfo        *si = NULL;
+
+    JS_SETUP(2, 7, 2);
+
+    test("kvConfig Init (bad args): ");
+    s = kvConfig_Init(NULL);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Create KV - bad args: ");
+    kvConfig_Init(&kvc);
+    kvc.Bucket = "TEST";
+    s = js_CreateKeyValue(NULL, js, &kvc);
+    if (s == NATS_INVALID_ARG)
+        s = js_CreateKeyValue(&kv, NULL, &kvc);
+    if (s == NATS_INVALID_ARG)
+        s = js_CreateKeyValue(&kv, js, NULL);
+    testCond((s == NATS_INVALID_ARG) && (kv == NULL));
+    nats_clearLastError();
+
+    test("Create KV - bad bucket name: ");
+    kvConfig_Init(&kvc);
+    kvc.Bucket = "This.is.not.a.valid.name!";
+    s = js_CreateKeyValue(&kv, js, &kvc);
+    testCond((s == NATS_INVALID_ARG) && (kv == NULL)
+                && (strstr(nats_GetLastError(NULL), kvErrInvalidBucketName) != NULL));
+    nats_clearLastError();
+
+    test("Create KV - history too big: ");
+    kvConfig_Init(&kvc);
+    kvc.Bucket = "TEST";
+    kvc.History = kvMaxHistory + 10;
+    s = js_CreateKeyValue(&kv, js, &kvc);
+    testCond((s == NATS_INVALID_ARG) && (kv == NULL)
+                && (strstr(nats_GetLastError(NULL), kvErrHistoryTooLarge) != NULL));
+    nats_clearLastError();
+
+    test("Create KV: ");
+    kvConfig_Init(&kvc);
+    kvc.Bucket = "TEST";
+    kvc.History = 3;
+    s = js_CreateKeyValue(&kv, js, &kvc);
+    testCond((s == NATS_OK) && (kv != NULL));
+
+    test("Check discard policy: ");
+    s = js_GetStreamInfo(&si, js, "KV_TEST", NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0) && (si != NULL) && (si->Config != NULL)
+                && (si->Config->Discard == js_DiscardNew));
+    jsStreamInfo_Destroy(si);
+    si = NULL;
+
+    test("Destroy kv store: ")
+    kvStore_Destroy(kv);
+    kv = NULL;
+    // Check that this is ok
+    kvStore_Destroy(NULL);
+    testCond(true);
+
+    test("Bind (bad args): ");
+    s = js_KeyValue(NULL, js, "TEST");
+    if (s == NATS_INVALID_ARG)
+        s = js_KeyValue(&kv, NULL, "TEST");
+    if (s == NATS_INVALID_ARG)
+        s = js_KeyValue(&kv, js, NULL);
+    if (s == NATS_INVALID_ARG)
+        s = js_KeyValue(&kv, NULL, "");
+    if (s == NATS_INVALID_ARG)
+        s = js_KeyValue(&kv, NULL, "bad.bucket.name");
+    testCond((s == NATS_INVALID_ARG) && (kv == NULL));
+    nats_clearLastError();
+
+    test("Bind (not found): ");
+    s = js_KeyValue(&kv, js, "NOT_FOUND");
+    testCond((s == NATS_NOT_FOUND) && (kv == NULL)
+                && (nats_GetLastError(NULL) == NULL));
+
+    test("Bind to existing: ");
+    s = js_KeyValue(&kv, js, "TEST");
+    testCond((s == NATS_OK) && (kv != NULL));
+
+    test("Destroy kv store: ")
+    kvStore_Destroy(kv);
+    kv = NULL;
+    testCond(true);
+
+    test("Create non-kv stream: ");
+    jsStreamConfig_Init(&sc);
+    // Stream name has to start with "KV_" since this is how we
+    // form the stream name: KV_ + bucket name.
+    sc.Name = "KV_NON_KV_STREAM";
+    sc.Subjects = (const char*[1]){"foo"};
+    sc.SubjectsLen = 1;
+    s = js_AddStream(NULL, js, &sc, NULL, &jerr);
+    testCond((s == NATS_OK) && (jerr == 0));
+
+    test("Bind to non-kv stream: ");
+    s = js_KeyValue(&kv, js, "NON_KV_STREAM");
+    testCond((s == NATS_INVALID_ARG) && (kv == NULL)
+                && (strstr(nats_GetLastError(NULL), kvErrBadBucket) != NULL));
+    nats_clearLastError();
+
+    test("Delete kv store (bad args): ");
+    s = js_DeleteKeyValue(NULL, "TEST");
+    if (s == NATS_INVALID_ARG)
+        s = js_DeleteKeyValue(js, NULL);
+    if (s == NATS_INVALID_ARG)
+        s = js_DeleteKeyValue(js, "");
+    if (s == NATS_INVALID_ARG)
+        s = js_DeleteKeyValue(js, "bad.bucket.name");
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Delete kv store: ");
+    s = js_DeleteKeyValue(js, "TEST");
+    testCond(s == NATS_OK);
+
+    test("Check it is gone (bind should fail): ");
+    s = js_KeyValue(&kv, js, "TEST");
+    testCond((s == NATS_NOT_FOUND) && (kv == NULL));
+
+    JS_TEARDOWN;
+}
+
+static void
+test_KeyValueBasics(void)
+{
+    natsStatus          s;
+    kvStore             *kv = NULL;
+    kvEntry             *e  = NULL;
+    kvStatus            *sts= NULL;
+    uint64_t            rev = 0;
+    kvConfig            kvc;
+    int                 iterMax = 1;
+    int                 i;
+    char                bucketName[10];
+
+    JS_SETUP(2, 6, 2);
+
+    if (serverVersionAtLeast(2, 9, 0)) {
+        iterMax = 2;
+    }
+
+    for (i=0; i<iterMax; i++)
+    {
+        sprintf(bucketName, "TEST%d", i);
+
+        test("Create KV: ");
+        kvConfig_Init(&kvc);
+        kvc.Bucket = bucketName;
+        kvc.History = 5;
+        kvc.TTL = NATS_SECONDS_TO_NANOS(3600);
+        kvc.Replicas = 1;
+        s = js_CreateKeyValue(&kv, js, &kvc);
+        testCond((s == NATS_OK) && (kv != NULL));
+
+        if (i == 1)
+        {
+            // This means that we are running against 2.9.0+ server and
+            // so we want to try without "direct get", so we will
+            // artificially set the kv store to not use direct get API.
+            natsMutex_Lock(kv->mu);
+            kv->useDirect = false;
+            natsMutex_Unlock(kv->mu);
+        }
+
+        test("Check bucket: ");
+        s = (strcmp(kvStore_Bucket(kv), bucketName) == 0 ? NATS_OK : NATS_ERR);
+        testCond(s == NATS_OK);
+
+        test("Check bucket (returns NULL): ");
+        s = (kvStore_Bucket(NULL) == NULL ? NATS_OK : NATS_ERR);
+        testCond(s == NATS_OK);
+
+        test("Simple put (bad args): ");
+        rev = 1234;
+        s = kvStore_Put(&rev, NULL, "key", (const void*) "value", 5);
+        testCond((s == NATS_INVALID_ARG) && (rev == 0));
+        nats_clearLastError();
+
+        test("Simple put (bad key): ");
+        rev = 1234;
+        s = kvStore_Put(&rev, kv, NULL, (const void*) "value", 5);
+        if (s == NATS_INVALID_ARG)
+            s = kvStore_Put(&rev, kv, "", (const void*) "value", 5);
+        if (s == NATS_INVALID_ARG)
+            s = kvStore_Put(&rev, kv, ".bad.key", (const void*) "value", 5);
+        if (s == NATS_INVALID_ARG)
+            s = kvStore_Put(&rev, kv, "bad.key.", (const void*) "value", 5);
+        if (s == NATS_INVALID_ARG)
+            s = kvStore_Put(&rev, kv, "this is a bad key", (const void*) "value", 5);
+        testCond((s == NATS_INVALID_ARG) && (rev == 0)
+                    && (strstr(nats_GetLastError(NULL), kvErrInvalidKey) != NULL));
+        nats_clearLastError();
+
+        test("Simple put: ");
+        s = kvStore_Put(&rev, kv, "key", (const void*) "value", 5);
+        testCond((s == NATS_OK) && (rev == 1));
+
+        test("Get (bad args): ");
+        s = kvStore_Get(NULL, kv, "key");
+        if (s == NATS_INVALID_ARG)
+            s = kvStore_Get(&e, NULL, "key");
+        testCond((s == NATS_INVALID_ARG) && (e == NULL));
+        nats_clearLastError();
+
+        test("Get (bad key): ");
+        s = kvStore_Get(&e, kv, NULL);
+        if (s == NATS_INVALID_ARG)
+            s = kvStore_Get(&e, kv, "");
+        if (s == NATS_INVALID_ARG)
+            s = kvStore_Get(&e, kv, ".bad.key");
+        if (s == NATS_INVALID_ARG)
+            s = kvStore_Get(&e, kv, "bad.key.");
+        if (s == NATS_INVALID_ARG)
+            s = kvStore_Get(&e, kv, "this is a bad key");
+        testCond((s == NATS_INVALID_ARG) && (e == NULL)
+                    && (strstr(nats_GetLastError(NULL), kvErrInvalidKey) != NULL));
+        nats_clearLastError();
+
+        test("Simple get: ");
+        s = kvStore_Get(&e, kv, "key");
+        testCond((s == NATS_OK) && (e != NULL)
+                    && (kvEntry_ValueLen(e) == 5)
+                    && (memcmp(kvEntry_Value(e), "value", 5) == 0)
+                    && (kvEntry_Revision(e) == 1));
+
+        test("Destroy entry: ");
+        kvEntry_Destroy(e);
+        e = NULL;
+        // Check that this is ok
+        kvEntry_Destroy(NULL);
+        testCond(true);
+
+        test("Get not found: ");
+        s = kvStore_Get(&e, kv, "not.found");
+        testCond((s == NATS_NOT_FOUND) && (e == NULL)
+                    && (nats_GetLastError(NULL) == NULL));
+
+        test("Simple put string: ");
+        s = kvStore_PutString(&rev, kv, "key", "value2");
+        testCond((s == NATS_OK) && (rev == 2));
+
+        test("Simple get string: ");
+        s = kvStore_Get(&e, kv, "key");
+        testCond((s == NATS_OK) && (e != NULL)
+                    && (strcmp(kvEntry_ValueString(e), "value2") == 0)
+                    && (kvEntry_Revision(e) == 2));
+
+        test("Destroy entry: ");
+        kvEntry_Destroy(e);
+        e = NULL;
+        testCond(true);
+
+        test("Get revision (bad args): ");
+        s = kvStore_GetRevision(&e, kv, "key", 0);
+        testCond((s == NATS_INVALID_ARG) && (e == NULL)
+                    && (strstr(nats_GetLastError(NULL), kvErrInvalidRevision) != NULL));
+        nats_clearLastError();
+
+        test("Get revision: ");
+        s = kvStore_GetRevision(&e, kv, "key", 1);
+        testCond((s == NATS_OK) && (e != NULL)
+                    && (strcmp(kvEntry_ValueString(e), "value") == 0)
+                    && (kvEntry_Revision(e) == 1));
+
+        test("Destroy entry: ");
+        kvEntry_Destroy(e);
+        e = NULL;
+        testCond(true);
+
+        test("Delete key (bad args): ");
+        s = kvStore_Delete(NULL, "key");
+        testCond(s == NATS_INVALID_ARG);
+        nats_clearLastError();
+
+        test("Delete key (bad key): ");
+        s = kvStore_Delete(kv, NULL);
+        if (s == NATS_INVALID_ARG)
+            s = kvStore_Delete(kv, "");
+        if (s == NATS_INVALID_ARG)
+            s = kvStore_Delete(kv, ".bad.key");
+        if (s == NATS_INVALID_ARG)
+            s = kvStore_Delete(kv, "bad.key.");
+        if (s == NATS_INVALID_ARG)
+            s = kvStore_Delete(kv, "this is a bad key");
+        testCond((s == NATS_INVALID_ARG)
+                    && (strstr(nats_GetLastError(NULL), kvErrInvalidKey) != NULL));
+        nats_clearLastError();
+
+        test("Delete key: ");
+        s = kvStore_Delete(kv, "key");
+        testCond(s == NATS_OK);
+
+        test("Check key gone: ");
+        s = kvStore_Get(&e, kv, "key");
+        testCond((s == NATS_NOT_FOUND) && (e == NULL)
+                    && (nats_GetLastError(NULL) == NULL));
+
+        test("Create (bad args): ");
+        s = kvStore_Create(&rev, NULL, "key", (const void*) "value3", 6);
+        testCond(s == NATS_INVALID_ARG);
+        nats_clearLastError();
+
+        test("Create (bad key): ");
+        s = kvStore_Create(&rev, kv, NULL, (const void*) "value3", 6);
+        if (s == NATS_INVALID_ARG)
+            s = kvStore_Create(&rev, kv, "", (const void*) "value3", 6);
+        if (s == NATS_INVALID_ARG)
+            s = kvStore_Create(&rev, kv, ".bad.key", (const void*) "value3", 6);
+        if (s == NATS_INVALID_ARG)
+            s = kvStore_Create(&rev, kv, "bad.key.", (const void*) "value3", 6);
+        if (s == NATS_INVALID_ARG)
+            s = kvStore_Create(&rev, kv, "this..is a bad key", (const void*) "value3", 6);
+        testCond((s == NATS_INVALID_ARG)
+                    && (strstr(nats_GetLastError(NULL), kvErrInvalidKey) != NULL));
+        nats_clearLastError();
+
+        test("Create: ");
+        s = kvStore_Create(&rev, kv, "key", (const void*) "value3", 6);
+        testCond((s == NATS_OK) && (rev == 4));
+
+        test("Create fail, since already exists: ");
+        s = kvStore_Create(&rev, kv, "key", (const void*) "value4", 6);
+        testCond((s == NATS_ERR) && (rev == 0));
+        nats_clearLastError();
+
+        test("Update (bad args): ");
+        s = kvStore_Update(&rev, NULL, "key", (const void*) "value4", 6, 4);
+        testCond((s == NATS_INVALID_ARG) && (rev == 0));
+        nats_clearLastError();
+
+        test("Update (bad key): ");
+        s = kvStore_Update(&rev, kv, NULL, (const void*) "value4", 6, 4);
+        if (s == NATS_INVALID_ARG)
+            s = kvStore_Update(&rev, kv, "", (const void*) "value4", 6, 4);
+        if (s == NATS_INVALID_ARG)
+            s = kvStore_Update(&rev, kv, ".bad.key", (const void*) "value4", 6, 4);
+        if (s == NATS_INVALID_ARG)
+            s = kvStore_Update(&rev, kv, "bad.key.", (const void*) "value4", 6, 4);
+        if (s == NATS_INVALID_ARG)
+            s = kvStore_Update(&rev, kv, "bad&key", (const void*) "value4", 6, 4);
+        testCond((s == NATS_INVALID_ARG) && (rev == 0)
+                    && (strstr(nats_GetLastError(NULL), kvErrInvalidKey) != NULL));
+        nats_clearLastError();
+
+        test("Update: ");
+        s = kvStore_Update(&rev, kv, "key", (const void*) "value4", 6, 4);
+        testCond((s == NATS_OK) && (rev == 5));
+
+        test("Update fail because wrong rev: ");
+        s = kvStore_Update(NULL, kv, "key", (const void*) "value5", 6, 4);
+        testCond(s == NATS_ERR);
+        nats_clearLastError();
+
+        test("Update ok: ");
+        s = kvStore_Update(&rev, kv, "key", (const void*) "value5", 6, rev);
+        testCond((s == NATS_OK) && (rev == 6));
+        nats_clearLastError();
+
+        test("Create (string): ");
+        s = kvStore_CreateString(&rev, kv, "key2", "value1");
+        testCond((s == NATS_OK) && (rev == 7));
+
+        test("Update ok (string): ");
+        s = kvStore_UpdateString(&rev, kv, "key2", "value2", rev);
+        testCond((s == NATS_OK) && (rev == 8));
+
+        test("Status (bad args): ");
+        s = kvStore_Status(NULL, kv);
+        if (s == NATS_INVALID_ARG)
+            s = kvStore_Status(&sts, NULL);
+        testCond((s == NATS_INVALID_ARG) && (sts == NULL));
+        nats_clearLastError();
+
+        test("Status: ");
+        s = kvStore_Status(&sts, kv);
+        testCond((s == NATS_OK) && (sts != NULL));
+
+        test("Check history: ");
+        s = (kvStatus_History(sts) == 5 ? NATS_OK : NATS_ERR);
+        testCond(s == NATS_OK);
+
+        test("Check bucket: ");
+        s = (strcmp(kvStatus_Bucket(sts), bucketName) == 0 ? NATS_OK : NATS_ERR);
+        testCond(s == NATS_OK);
+
+        test("Check TTL: ");
+        s = (kvStatus_TTL(sts) == NATS_SECONDS_TO_NANOS(3600) ? NATS_OK : NATS_ERR);
+        testCond(s == NATS_OK);
+
+        test("Check values: ");
+        s = (kvStatus_Values(sts) == 7 ? NATS_OK : NATS_ERR);
+        testCond(s == NATS_OK);
+
+        test("Check replicas: ");
+        s = (kvStatus_Replicas(sts) == 1 ? NATS_OK : NATS_ERR);
+        testCond(s == NATS_OK);
+
+        test("Check status with NULL: ");
+        if ((kvStatus_History(NULL) != 0) || (kvStatus_Bucket(NULL) != NULL)
+            || (kvStatus_TTL(NULL) != 0) || (kvStatus_Values(NULL) != 0))
+        {
+            s = NATS_ERR;
+        }
+        testCond(s == NATS_OK);
+
+        test("Destroy status: ");
+        kvStatus_Destroy(sts);
+        sts = NULL;
+        // Check that this is ok
+        kvStatus_Destroy(NULL);
+        testCond(true);
+
+        test("Put for revision check: ");
+        s = kvStore_PutString(&rev, kv, "test.rev.one", "val1");
+        IFOK(s, kvStore_PutString(NULL, kv, "test.rev.two", "val2"));
+        testCond(s == NATS_OK);
+
+        test("Get revision (bad args): ");
+        s = kvStore_GetRevision(&e, kv, "test.rev.one", 0);
+        testCond((s == NATS_INVALID_ARG) && (e == NULL)
+                    && (strstr(nats_GetLastError(NULL), kvErrInvalidRevision) != NULL));
+        nats_clearLastError();
+
+        test("Get revision: ");
+        s = kvStore_GetRevision(&e, kv, "test.rev.one", rev);
+        testCond((s == NATS_OK) && (e != NULL)
+                    && (strcmp(kvEntry_ValueString(e), "val1") == 0)
+                    && (kvEntry_Revision(e) == rev));
+        kvEntry_Destroy(e);
+        e = NULL;
+
+        test("Get wrong revision for the key: ");
+        s = kvStore_GetRevision(&e, kv, "test.rev.two", rev);
+        testCond((s == NATS_NOT_FOUND) && (e == NULL));
+
+        test("Destroy kv store: ");
+        kvStore_Destroy(kv);
+        testCond(true);
+        kv = NULL;
+    }
+
+    JS_TEARDOWN;
+}
+
+static bool
+_expectInitDone(kvWatcher *w)
+{
+    natsStatus  s;
+    kvEntry     *e = NULL;
+
+    test("Check init done: ");
+    s = kvWatcher_Next(&e, w, 1000);
+    return ((s == NATS_OK) && (e == NULL));
+}
+
+static bool
+_expectUpdate(kvWatcher *w, const char *key, const char *val, uint64_t rev)
+{
+    natsStatus  s;
+    kvEntry     *e = NULL;
+
+    test("Check update: ");
+    s = kvWatcher_Next(&e, w, 1000);
+    if ((s != NATS_OK) || (e == NULL))
+        return false;
+
+    if ((strcmp(kvEntry_Bucket(e), "WATCH") != 0)
+        || (strcmp(kvEntry_Key(e), key) != 0)
+        || (strcmp(kvEntry_ValueString(e), val) != 0)
+        || (kvEntry_Revision(e) != rev)
+        || (kvEntry_Created(e) == 0))
+    {
+        return false;
+    }
+    kvEntry_Destroy(e);
+    return true;
+}
+
+static bool
+_expectDelete(kvWatcher *w, const char *key, uint64_t rev)
+{
+    natsStatus  s;
+    kvEntry     *e = NULL;
+
+    test("Check update: ");
+    s = kvWatcher_Next(&e, w, 1000);
+    if ((s != NATS_OK) || (e == NULL))
+        return false;
+
+    if ((kvEntry_Operation(e) != kvOp_Delete)
+        || (kvEntry_Revision(e) != rev))
+    {
+        return false;
+    }
+    kvEntry_Destroy(e);
+    return true;
+}
+
+static void
+_stopWatcher(void *closure)
+{
+    kvWatcher *w = (kvWatcher*) closure;
+
+    nats_Sleep(100);
+    kvWatcher_Stop(w);
+}
+
+static void
+test_KeyValueWatch(void)
+{
+    natsStatus          s;
+    kvStore             *kv = NULL;
+    kvWatcher           *w  = NULL;
+    kvEntry             *e  = NULL;
+    natsThread          *t  = NULL;
+    int                 plc = 0;
+    int                 plb = 0;
+    kvConfig            kvc;
+    int64_t             start;
+
+    JS_SETUP(2, 6, 2);
+
+    test("Create KV: ");
+    kvConfig_Init(&kvc);
+    kvc.Bucket = "WATCH";
+    s = js_CreateKeyValue(&kv, js, &kvc);
+    testCond(s == NATS_OK);
+
+    test("Create watcher (bad args): ");
+    s = kvStore_Watch(NULL, kv, "foo", NULL);
+    if (s == NATS_INVALID_ARG)
+        s = kvStore_Watch(&w, NULL, "foo", NULL);
+    if (s == NATS_INVALID_ARG)
+        s = kvStore_Watch(&w, kv, NULL, NULL);
+    if (s == NATS_INVALID_ARG)
+        s = kvStore_Watch(&w, kv, "", NULL);
+    testCond((s == NATS_INVALID_ARG) && (w == NULL));
+    nats_clearLastError();
+
+    test("Create watcher: ");
+    s = kvStore_WatchAll(&w, kv, NULL);
+    testCond((s == NATS_OK) && (w != NULL));
+
+    testCond(_expectInitDone(w));
+
+    test("Create: ");
+    s = kvStore_CreateString(NULL, kv, "name", "derek");
+    testCond(s == NATS_OK);
+    testCond(_expectUpdate(w, "name", "derek", 1));
+
+    test("Put: ");
+    s = kvStore_PutString(NULL, kv, "name", "rip");
+    testCond(s == NATS_OK);
+    testCond(_expectUpdate(w, "name", "rip", 2));
+
+    test("Put: ");
+    s = kvStore_PutString(NULL, kv, "name", "ik");
+    testCond(s == NATS_OK);
+    testCond(_expectUpdate(w, "name", "ik", 3));
+
+    test("Put: ");
+    s = kvStore_PutString(NULL, kv, "age", "22");
+    testCond(s == NATS_OK);
+    testCond(_expectUpdate(w, "age", "22", 4));
+
+    test("Put: ");
+    s = kvStore_PutString(NULL, kv, "age", "33");
+    testCond(s == NATS_OK);
+    testCond(_expectUpdate(w, "age", "33", 5));
+
+    test("Delete: ");
+    s = kvStore_Delete(kv, "age");
+    testCond(s == NATS_OK);
+    testCond(_expectDelete(w, "age", 6));
+
+    test("Next (bad args): ");
+    s = kvWatcher_Next(NULL, w, 1000);
+    if (s == NATS_INVALID_ARG)
+        s = kvWatcher_Next(&e, NULL, 1000);
+    if (s == NATS_INVALID_ARG)
+        s = kvWatcher_Next(&e, w, 0);
+    if (s == NATS_INVALID_ARG)
+        s = kvWatcher_Next(&e, w, -1000);
+    testCond((s == NATS_INVALID_ARG) && (e == NULL));
+    nats_clearLastError();
+
+    test("Next (timeout): ");
+    s = kvWatcher_Next(&e, w, 1);
+    testCond((s == NATS_TIMEOUT) && (e == NULL));
+    nats_clearLastError();
+
+    test("Stop (bad args): ");
+    s = kvWatcher_Stop(NULL);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Stop: ");
+    s = kvWatcher_Stop(w);
+    testCond(s == NATS_OK);
+
+    test("Stop again: ");
+    s = kvWatcher_Stop(w);
+    testCond(s == NATS_OK);
+
+    test("Next fails: ");
+    s = kvWatcher_Next(&e, w, 1000);
+    testCond((s == NATS_ILLEGAL_STATE) && (e == NULL))
+    nats_clearLastError();
+
+    test("Destroy watcher: ");
+    kvWatcher_Destroy(w);
+    w = NULL;
+    // Check that this is ok
+    kvWatcher_Destroy(NULL);
+    testCond(true);
+
+    // Now try wildcard matching and make sure we only get last value when starting.
+    test("Put values in different keys: ");
+    s = kvStore_PutString(NULL, kv, "t.name", "derek");
+    IFOK(s, kvStore_PutString(NULL, kv, "t.name", "ik"));
+    IFOK(s, kvStore_PutString(NULL, kv, "t.age", "22"));
+    IFOK(s, kvStore_PutString(NULL, kv, "t.age", "49"));
+    testCond(s == NATS_OK);
+
+    test("Create watcher: ");
+    s = kvStore_Watch(&w, kv, "t.*", NULL);
+    testCond(s == NATS_OK);
+
+    test("Check pending limits: ");
+    natsMutex_Lock(w->mu);
+    s = natsSubscription_GetPendingLimits(w->sub, &plc, &plb);
+    natsMutex_Unlock(w->mu);
+    testCond((s == NATS_OK) && (plc == -1) && (plb == -1));
+
+    testCond(_expectUpdate(w, "t.name", "ik", 8));
+    testCond(_expectUpdate(w, "t.age", "49", 10));
+    testCond(_expectInitDone(w));
+
+    test("Block: ");
+    start = nats_Now();
+    s = natsThread_Create(&t, _stopWatcher, (void*) w);
+    IFOK(s, kvWatcher_Next(&e, w, 10000));
+    testCond((s == NATS_ILLEGAL_STATE) && (e == NULL)
+                && ((nats_Now() - start) <= 1000));
+    nats_clearLastError();
+
+    natsThread_Join(t);
+    natsThread_Destroy(t);
+    kvWatcher_Destroy(w);
+    kvStore_Destroy(kv);
+
+    JS_TEARDOWN;
+}
+
+static void
+test_KeyValueHistory(void)
+{
+    natsStatus          s;
+    kvStore             *kv = NULL;
+    kvEntry             *e  = NULL;
+    kvEntryList         l;
+    kvWatchOptions      o;
+    kvConfig            kvc;
+    int                 i;
+
+    JS_SETUP(2, 6, 2);
+
+    test("Create KV: ");
+    kvConfig_Init(&kvc);
+    kvc.Bucket = "WATCH";
+    kvc.History = 10;
+    s = js_CreateKeyValue(&kv, js, &kvc);
+    testCond(s == NATS_OK);
+
+    test("Populate: ");
+    for (i=0; (s == NATS_OK) && (i<50); i++)
+    {
+        char tmp[16];
+
+        snprintf(tmp, sizeof(tmp), "%d", i+22);
+        s = kvStore_PutString(NULL, kv, "age", tmp);
+    }
+    testCond(s == NATS_OK);
+
+    test("Get history (bad args): ");
+    s = kvStore_History(NULL, kv, "age", NULL);
+    if (s == NATS_INVALID_ARG)
+        s = kvStore_History(&l, NULL, "age", NULL);
+    if (s == NATS_INVALID_ARG)
+        s = kvStore_History(&l, kv, NULL, NULL);
+    if (s == NATS_INVALID_ARG)
+        s = kvStore_History(&l, kv, "", NULL);
+    testCond((s == NATS_INVALID_ARG) && (l.Entries == NULL) && (l.Count == 0));
+    nats_clearLastError();
+
+    test("Get history (timeout): ");
+    kvWatchOptions_Init(&o);
+    o.Timeout = 1;
+    s = kvStore_History(&l, kv, "age", &o);
+    testCond(((s == NATS_OK) && (l.Entries != NULL) && (l.Count == 10))
+            || ((s == NATS_TIMEOUT) && (l.Entries == NULL) && (l.Count == 0)));
+    nats_clearLastError();
+    kvEntryList_Destroy(&l);
+
+    test("Get History: ");
+    s = kvStore_History(&l, kv, "age", NULL);
+    testCond((s == NATS_OK) && (l.Entries != NULL) && (l.Count == 10));
+
+    test("Check values: ");
+    for (i=0; (s == NATS_OK) && (i < 10); i++)
+    {
+        e = l.Entries[i];
+        if (e == NULL)
+            s = NATS_ERR;
+        if (strcmp(kvEntry_Key(e), "age") != 0)
+            s = NATS_ERR;
+        else if (kvEntry_Revision(e) != (uint64_t)(i+41))
+            s = NATS_ERR;
+        else
+        {
+            int val = (int) nats_ParseInt64(kvEntry_Value(e), kvEntry_ValueLen(e));
+            if (val != i+62)
+                s = NATS_ERR;
+        }
+    }
+    testCond(s == NATS_OK);
+
+    test("Destroy list: ")
+    kvEntryList_Destroy(&l);
+    testCond((l.Entries == NULL) && (l.Count == 0));
+
+    // Check that this is ok
+    kvEntryList_Destroy(NULL);
+
+    kvStore_Destroy(kv);
+
+    JS_TEARDOWN;
+}
+
+static void
+test_KeyValueKeys(void)
+{
+    natsStatus          s;
+    kvStore             *kv = NULL;
+    kvKeysList          l;
+    bool                nameOK = false;
+    bool                ageOK = false;
+    bool                countryOK = false;
+    char                *k = NULL;
+    kvConfig            kvc;
+    kvWatchOptions      o;
+    int                 i;
+
+    JS_SETUP(2, 6, 2);
+
+    test("Create KV: ");
+    kvConfig_Init(&kvc);
+    kvc.Bucket = "KVS";
+    kvc.History = 2;
+    s = js_CreateKeyValue(&kv, js, &kvc);
+    testCond(s == NATS_OK);
+
+    test("Populate: ");
+    s = kvStore_PutString(NULL, kv, "name", "derek");
+    IFOK(s, kvStore_PutString(NULL, kv, "age", "22"));
+    IFOK(s, kvStore_PutString(NULL, kv, "country", "US"));
+    IFOK(s, kvStore_PutString(NULL, kv, "name", "ivan"));
+    IFOK(s, kvStore_PutString(NULL, kv, "age", "33"));
+    IFOK(s, kvStore_PutString(NULL, kv, "country", "US"));
+    IFOK(s, kvStore_PutString(NULL, kv, "name", "rip"));
+    IFOK(s, kvStore_PutString(NULL, kv, "age", "44"));
+    IFOK(s, kvStore_PutString(NULL, kv, "country", "MT"));
+    testCond(s == NATS_OK);
+
+    test("Get keys (bad args): ");
+    s = kvStore_Keys(NULL, kv, NULL);
+    if (s == NATS_INVALID_ARG)
+        s = kvStore_Keys(&l, NULL, NULL);
+    testCond((s == NATS_INVALID_ARG) && (l.Keys == NULL) && (l.Count == 0));
+    nats_clearLastError();
+
+    test("Get keys (timeout): ");
+    kvWatchOptions_Init(&o);
+    o.Timeout = 1;
+    s = kvStore_Keys(&l, kv, &o);
+    testCond((((s == NATS_OK) && (l.Keys != NULL) && (l.Count == 3)))
+                || ((s == NATS_TIMEOUT) && (l.Keys == NULL) && (l.Count == 0)));
+    nats_clearLastError();
+    kvKeysList_Destroy(&l);
+
+    test("Get keys: ");
+    s = kvStore_Keys(&l, kv, NULL);
+    testCond((s == NATS_OK) && (l.Keys != NULL) && (l.Count == 3));
+
+    test("Check keys: ");
+    for (i=0; (s == NATS_OK) && (i<3); i++)
+    {
+        char *k = l.Keys[i];
+        if (k == NULL)
+            s = NATS_ERR;
+        else
+        {
+            if (strcmp(k, "name") == 0)
+                nameOK = true;
+            else if (strcmp(k, "age") == 0)
+                ageOK = true;
+            else if (strcmp(k, "country") == 0)
+                countryOK = true;
+        }
+    }
+    testCond((s == NATS_OK) && nameOK && ageOK && countryOK);
+
+    test("Destroy list: ");
+    kvKeysList_Destroy(&l);
+    testCond((l.Keys == NULL) && (l.Count == 0));
+    // Check this is ok
+    kvKeysList_Destroy(NULL);
+
+    // Make sure delete and purge do the right thing and not return the keys.
+    test("Delete name: ");
+    s = kvStore_Delete(kv, "name");
+    testCond(s == NATS_OK);
+
+    test("Purge country: ");
+    s = kvStore_Purge(kv, "country", NULL);
+    testCond(s == NATS_OK);
+
+    test("Get keys: ");
+    s = kvStore_Keys(&l, kv, NULL);
+    testCond((s == NATS_OK) && (l.Keys != NULL) && (l.Count == 1));
+
+    test("Check key: ");
+    k = l.Keys[0];
+    s = ((k != NULL) && (strcmp(k, "age") == 0) ? NATS_OK : NATS_ERR);
+    testCond(s == NATS_OK);
+    kvKeysList_Destroy(&l);
+
+    kvStore_Destroy(kv);
+
+    JS_TEARDOWN;
+}
+
+static void
+test_KeyValueDeleteVsPurge(void)
+{
+    natsStatus          s;
+    kvStore             *kv = NULL;
+    kvEntry             *e  = NULL;
+    kvEntryList         l;
+    kvConfig            kvc;
+    int                 i;
+
+    JS_SETUP(2, 6, 2);
+
+    test("Create KV: ");
+    kvConfig_Init(&kvc);
+    kvc.Bucket = "KVS";
+    kvc.History = 10;
+    s = js_CreateKeyValue(&kv, js, &kvc);
+    testCond(s == NATS_OK);
+
+    test("Populate: ");
+    s = kvStore_PutString(NULL, kv, "name", "derek");
+    IFOK(s, kvStore_PutString(NULL, kv, "age", "22"));
+    IFOK(s, kvStore_PutString(NULL, kv, "name", "ivan"));
+    IFOK(s, kvStore_PutString(NULL, kv, "age", "33"));
+    IFOK(s, kvStore_PutString(NULL, kv, "name", "rip"));
+    IFOK(s, kvStore_PutString(NULL, kv, "age", "44"));
+    testCond(s == NATS_OK);
+
+    test("Delete age: ");
+    s = kvStore_Delete(kv, "age");
+    testCond(s == NATS_OK);
+
+    test("Get age history: ");
+    s = kvStore_History(&l, kv, "age", NULL);
+    testCond((s == NATS_OK) && (l.Entries != NULL) && (l.Count == 4));
+
+    test("Check: ");
+    for (i=0;(s == NATS_OK) && (i<4); i++)
+    {
+        e = l.Entries[i];
+        if (e == NULL)
+            s = NATS_ERR;
+        else if ((int) kvEntry_Delta(e) != (3-i))
+            s = NATS_ERR;
+    }
+    testCond(s == NATS_OK);
+    kvEntryList_Destroy(&l);
+
+    test("Purge name: ");
+    s = kvStore_Purge(kv, "name", NULL);
+    testCond(s == NATS_OK);
+
+    test("Check marker: ");
+    s = kvStore_Get(&e, kv, "age");
+    testCond((s == NATS_NOT_FOUND) && (e == NULL));
+
+    test("Get history: ");
+    s = kvStore_History(&l, kv, "name", NULL);
+    testCond((s == NATS_OK) && (l.Entries != NULL) && (l.Count == 1));
+
+    test("Check: ");
+    e = l.Entries[0];
+    s = ((e != NULL) && (kvEntry_Operation(e) == kvOp_Purge) ? NATS_OK : NATS_ERR);
+    testCond(s == NATS_OK);
+    kvEntryList_Destroy(&l);
+
+    kvStore_Destroy(kv);
+
+    JS_TEARDOWN;
+}
+
+static void
+test_KeyValueDeleteTombstones(void)
+{
+    natsStatus          s;
+    kvStore             *kv = NULL;
+    char                *v  = NULL;
+    jsStreamInfo        *si = NULL;
+    kvConfig            kvc;
+    kvPurgeOptions      po;
+    int                 i;
+
+    JS_SETUP(2, 6, 2);
+
+    test("Create KV: ");
+    kvConfig_Init(&kvc);
+    kvc.Bucket = "KVS";
+    kvc.History = 10;
+    s = js_CreateKeyValue(&kv, js, &kvc);
+    testCond(s == NATS_OK);
+
+    test("Create asset: ");
+    v = (char*) malloc(100);
+    if (v != NULL)
+    {
+        for (i=0; i<100; i++)
+            v[i] = 'A' + (char)(i % 26);
+        v[99] = '\0';
+    }
+    testCond(v != NULL);
+
+    test("Populate: ");
+    for (i=0; (s == NATS_OK) && (i<100); i++)
+    {
+        char tmp[64];
+        snprintf(tmp, sizeof(tmp), "key-%d", i);
+        s = kvStore_PutString(NULL, kv, tmp, v);
+    }
+    testCond(s == NATS_OK);
+    free(v);
+
+    test("Delete: ");
+    for (i=0; (s == NATS_OK) && (i<100); i++)
+    {
+        char tmp[64];
+        snprintf(tmp, sizeof(tmp), "key-%d", i);
+        s = kvStore_Delete(kv, tmp);
+    }
+    testCond(s == NATS_OK);
+
+    test("Purge deletes (bad args): ");
+    s = kvStore_PurgeDeletes(NULL, NULL);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Purge deletes: ");
+    kvPurgeOptions_Init(&po);
+    po.DeleteMarkersOlderThan = -1;
+    s = kvStore_PurgeDeletes(kv, &po);
+    testCond(s == NATS_OK);
+
+    test("Check stream: ");
+    s = js_GetStreamInfo(&si, js, "KV_KVS", NULL, NULL);
+    testCond((s == NATS_OK) && (si != NULL) && (si->State.Msgs == 0));
+    jsStreamInfo_Destroy(si);
+
+    kvStore_Destroy(kv);
+
+    JS_TEARDOWN;
+}
+
+static void
+test_KeyValuePurgeDeletesMarkerThreshold(void)
+{
+    natsStatus          s;
+    kvStore             *kv = NULL;
+    kvConfig            kvc;
+    kvPurgeOptions      po;
+    kvEntryList         list;
+
+    JS_SETUP(2, 7, 2);
+
+    test("Create KV: ");
+    kvConfig_Init(&kvc);
+    kvc.Bucket = "KVS";
+    kvc.History = 10;
+    s = js_CreateKeyValue(&kv, js, &kvc);
+    testCond(s == NATS_OK);
+
+    test("Put keys: ")
+    s = kvStore_PutString(NULL, kv, "foo", "foo1");
+    IFOK(s, kvStore_PutString(NULL, kv, "bar", "bar1"));
+    IFOK(s, kvStore_PutString(NULL, kv, "foo", "foo2"));
+    testCond(s == NATS_OK);
+
+    test("Delete foo: ");
+    s = kvStore_Delete(kv, "foo");
+    testCond(s == NATS_OK);
+
+    nats_Sleep(500);
+
+    test("Delete bar: ");
+    s = kvStore_Delete(kv, "bar");
+    testCond(s == NATS_OK);
+
+    test("PurgeOptions init bad args: ");
+    s = kvPurgeOptions_Init(NULL);
+    testCond(s == NATS_INVALID_ARG);
+    nats_clearLastError();
+
+    test("Purge deletes: ");
+    kvPurgeOptions_Init(&po);
+    po.DeleteMarkersOlderThan = NATS_MILLIS_TO_NANOS(100);
+    s = kvStore_PurgeDeletes(kv, &po);
+    testCond(s == NATS_OK);
+
+       // The key foo should have been completely cleared of the data
+       // and the delete marker.
+    test("Check foo history: ")
+    s = kvStore_History(&list, kv, "foo", NULL);
+    testCond((s == NATS_NOT_FOUND) && (list.Entries == NULL) && (list.Count == 0));
+
+    test("Check bar history: ");
+    s = kvStore_History(&list, kv, "bar", NULL);
+    testCond((s == NATS_OK) && (list.Count == 1) && (list.Entries != NULL)
+                && (kvEntry_Operation(list.Entries[0]) == kvOp_Delete));
+    kvEntryList_Destroy(&list);
+    kvStore_Destroy(kv);
+
+    JS_TEARDOWN;
+}
+
+static void
+test_KeyValueCrossAccount(void)
+{
+    natsStatus          s;
+    natsOptions         *opts= NULL;
+    natsConnection      *nc1 = NULL;
+    natsConnection      *nc2 = NULL;
+    jsCtx               *js1 = NULL;
+    jsCtx               *js2 = NULL;
+    natsPid             pid  = NATS_INVALID_PID;
+    kvStore             *kv1 = NULL;
+    kvWatcher           *w1  = NULL;
+    kvStore             *kv2 = NULL;
+    kvWatcher           *w2  = NULL;
+    kvEntry             *e   = NULL;
+    jsStreamInfo        *si  = NULL;
+    uint64_t            rev  = 0;
+    kvConfig            kvc;
+    jsOptions           o;
+    char                datastore[256] = {'\0'};
+    char                cmdLine[1024] = {'\0'};
+    char                confFile[256] = {'\0'};
+    kvPurgeOptions      po;
+
+    ENSURE_JS_VERSION(2, 6, 2);
+
+    _makeUniqueDir(datastore, sizeof(datastore), "datastore_");
+    _createConfFile(confFile, sizeof(confFile),
+        "jetstream: enabled\n"\
+        "accounts: {\n"\
+        "   A: {\n"\
+        "       users: [ {user: a, password: a} ]\n"\
+        "       jetstream: enabled\n"\
+        "       exports: [\n"\
+        "           {service: '$JS.API.>' }\n"\
+        "           {service: '$KV.>'}\n"\
+        "           {stream: 'accI.>'}\n"\
+        "       ]\n"\
+        "   },\n"\
+        "   I: {\n"\
+        "       users: [ {user: i, password: i} ]\n"\
+        "       imports: [\n"\
+        "           {service: {account: A, subject: '$JS.API.>'}, to: 'fromA.>' }\n"\
+        "           {service: {account: A, subject: '$KV.>'}, to: 'fromA.$KV.>' }\n"\
+        "           {stream: {subject: 'accI.>', account: A}}\n"\
+        "       ]\n"\
+        "   }\n"\
+        "}");
+
+    test("Start JS server: ");
+    snprintf(cmdLine, sizeof(cmdLine), "-js -sd %s -c %s", datastore, confFile);
+    pid = _startServer("nats://127.0.0.1:4222", cmdLine, true);
+    CHECK_SERVER_STARTED(pid);
+    testCond(true);
+
+    test("Create conn1: ");
+    s = natsConnection_ConnectTo(&nc1, "nats://a:a@127.0.0.1:4222");
+    testCond(s == NATS_OK);
+
+    test("Get context1: ");
+    s = natsConnection_JetStream(&js1, nc1, NULL);
+    testCond(s == NATS_OK);
+
+    test("Create KV1: ");
+    kvConfig_Init(&kvc);
+    kvc.Bucket = "Map";
+    s = js_CreateKeyValue(&kv1, js1, &kvc);
+    testCond(s == NATS_OK);
+
+    test("Create Watcher1: ");
+    s = kvStore_Watch(&w1, kv1, "map", NULL);
+    IFOK(s, kvWatcher_Next(&e, w1, 1000));
+    testCond((s == NATS_OK) && (e == NULL));
+
+    test("Create conn2: ");
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_SetURL(opts, "nats://i:i@127.0.0.1:4222"));
+    IFOK(s, natsOptions_SetCustomInboxPrefix(opts, "accI"));
+    IFOK(s, natsConnection_Connect(&nc2, opts));
+    testCond(s == NATS_OK);
+
+    test("Get context2: ");
+    jsOptions_Init(&o);
+    o.Prefix = "fromA";
+    s = natsConnection_JetStream(&js2, nc2, &o);
+    testCond(s == NATS_OK);
+
+    test("Create KV2: ");
+    kvConfig_Init(&kvc);
+    kvc.Bucket = "Map";
+    s = js_CreateKeyValue(&kv2, js2, &kvc);
+    testCond(s == NATS_OK);
+
+    test("Create Watcher2: ");
+    s = kvStore_Watch(&w2, kv2, "map", NULL);
+    IFOK(s, kvWatcher_Next(&e, w2, 1000));
+    testCond((s == NATS_OK) && (e == NULL));
+
+    test("Put: ");
+    s = kvStore_PutString(&rev, kv2, "map", "value");
+    testCond(s == NATS_OK);
+
+    test("Get from kv1: ");
+    s = kvStore_Get(&e, kv1, "map");
+    testCond((s == NATS_OK) && (e != NULL)
+            && (strcmp(kvEntry_Key(e), "map") == 0)
+            && (strcmp(kvEntry_ValueString(e), "value") == 0));
+    kvEntry_Destroy(e);
+    e = NULL;
+
+    test("Get from kv2: ");
+    s = kvStore_Get(&e, kv2, "map");
+    testCond((s == NATS_OK) && (e != NULL)
+            && (strcmp(kvEntry_Key(e), "map") == 0)
+            && (strcmp(kvEntry_ValueString(e), "value") == 0));
+    kvEntry_Destroy(e);
+    e = NULL;
+
+    test("Watcher1 Next: ");
+    s = kvWatcher_Next(&e, w1, 1000);
+    testCond((s == NATS_OK) && (e != NULL)
+            && (strcmp(kvEntry_Key(e), "map") == 0)
+            && (strcmp(kvEntry_ValueString(e), "value") == 0));
+    kvEntry_Destroy(e);
+    e = NULL;
+
+    test("Watcher2 Next: ");
+    s = kvWatcher_Next(&e, w2, 1000);
+    testCond((s == NATS_OK) && (e != NULL)
+            && (strcmp(kvEntry_Key(e), "map") == 0)
+            && (strcmp(kvEntry_ValueString(e), "value") == 0));
+    kvEntry_Destroy(e);
+    e = NULL;
+
+    test("Update from kv2: ");
+    s = kvStore_UpdateString(NULL, kv2, "map", "updated", rev);
+    testCond(s == NATS_OK);
+
+    test("Get from kv1: ");
+    s = kvStore_Get(&e, kv1, "map");
+    testCond((s == NATS_OK) && (e != NULL)
+            && (strcmp(kvEntry_Key(e), "map") == 0)
+            && (strcmp(kvEntry_ValueString(e), "updated") == 0));
+    kvEntry_Destroy(e);
+    e = NULL;
+
+    test("Get from kv2: ");
+    s = kvStore_Get(&e, kv2, "map");
+    testCond((s == NATS_OK) && (e != NULL)
+            && (strcmp(kvEntry_Key(e), "map") == 0)
+            && (strcmp(kvEntry_ValueString(e), "updated") == 0));
+    kvEntry_Destroy(e);
+    e = NULL;
+
+    test("Watcher1 Next: ");
+    s = kvWatcher_Next(&e, w1, 1000);
+    testCond((s == NATS_OK) && (e != NULL)
+            && (strcmp(kvEntry_Key(e), "map") == 0)
+            && (strcmp(kvEntry_ValueString(e), "updated") == 0));
+    kvEntry_Destroy(e);
+    e = NULL;
+
+    test("Watcher2 Next: ");
+    s = kvWatcher_Next(&e, w2, 1000);
+    testCond((s == NATS_OK) && (e != NULL)
+            && (strcmp(kvEntry_Key(e), "map") == 0)
+            && (strcmp(kvEntry_ValueString(e), "updated") == 0));
+    kvEntry_Destroy(e);
+    e = NULL;
+
+    test("Purge key from kv2: ");
+    s = kvStore_Purge(kv2, "map", NULL);
+    testCond(s == NATS_OK);
+
+    test("Check purge ok from w1: ");
+    s = kvWatcher_Next(&e, w1, 1000);
+    testCond((s == NATS_OK) && (e != NULL) && (kvEntry_Operation(e) == kvOp_Purge));
+    kvEntry_Destroy(e);
+    e = NULL;
+
+    test("Check purge ok from w2: ");
+    s = kvWatcher_Next(&e, w2, 1000);
+    testCond((s == NATS_OK) && (e != NULL) && (kvEntry_Operation(e) == kvOp_Purge));
+    kvEntry_Destroy(e);
+    e = NULL;
+
+    test("Delete purge records: ");
+    kvPurgeOptions_Init(&po);
+    po.DeleteMarkersOlderThan = -1;
+    s = kvStore_PurgeDeletes(kv2, &po);
+    testCond(s == NATS_OK);
+
+    test("All gone: ");
+    s = js_GetStreamInfo(&si, js1, "KV_Map", NULL, NULL);
+    testCond((s == NATS_OK) && (si != NULL) && (si->State.Msgs == 0));
+    jsStreamInfo_Destroy(si);
+    si = NULL;
+
+    test("Delete key from kv2: ");
+    s = kvStore_Delete(kv2, "map");
+    testCond(s == NATS_OK);
+
+    test("Check key gone: ");
+    s = kvStore_Get(&e, kv1, "map");
+    testCond((s == NATS_NOT_FOUND) && (e == NULL));
+
+    kvWatcher_Destroy(w2);
+    w2 = NULL;
+    kvStore_Destroy(kv2);
+    kv2 = NULL;
+    jsCtx_Destroy(js2);
+    js2 = NULL;
+
+    test("Get context2 (with trailing dot for prefix): ");
+    jsOptions_Init(&o);
+    o.Prefix = "fromA";
+    s = natsConnection_JetStream(&js2, nc2, &o);
+    testCond(s == NATS_OK);
+
+    test("Create KV2: ");
+    kvConfig_Init(&kvc);
+    kvc.Bucket = "Map";
+    s = js_CreateKeyValue(&kv2, js2, &kvc);
+    testCond(s == NATS_OK);
+
+    test("Put: ");
+    s = kvStore_PutString(NULL, kv2, "map", "value2");
+    testCond(s == NATS_OK);
+
+    test("Get from kv1: ");
+    s = kvStore_Get(&e, kv1, "map");
+    testCond((s == NATS_OK) && (e != NULL)
+            && (strcmp(kvEntry_Key(e), "map") == 0)
+            && (strcmp(kvEntry_ValueString(e), "value2") == 0));
+    kvEntry_Destroy(e);
+    e = NULL;
+
+    kvWatcher_Destroy(w1);
+    kvStore_Destroy(kv1);
+    jsCtx_Destroy(js1);
+    kvWatcher_Destroy(w2);
+    kvStore_Destroy(kv2);
+    jsCtx_Destroy(js2);
+    natsOptions_Destroy(opts);
+    natsConnection_Destroy(nc1);
+    natsConnection_Destroy(nc2);
+    _stopServer(pid);
+    rmtree(datastore);
+    remove(confFile);
+}
+
+static natsStatus
+_checkDiscard(jsCtx *js, jsDiscardPolicy expected, kvStore **newKV)
+{
+    kvStore             *kv = NULL;
+    jsStreamInfo        *si = NULL;
+    kvConfig            kvc;
+    natsStatus          s;
+
+    kvConfig_Init(&kvc);
+    kvc.Bucket = "TEST";
+    s = js_CreateKeyValue(&kv, js, &kvc);
+    IFOK(s, js_GetStreamInfo(&si, js, "KV_TEST", NULL, NULL));
+    IFOK(s, (si->Config->Discard == expected ? NATS_OK : NATS_ERR));
+
+    jsStreamInfo_Destroy(si);
+
+    *newKV = kv;
+
+    return s;
+}
+
+static void
+test_KeyValueDiscardOldToNew(void)
+{
+    kvStore             *kv = NULL;
+    kvEntry             *e  = NULL;
+    kvConfig            kvc;
+    natsStatus          s;
+    int                 i;
+
+    JS_SETUP(2, 7, 2);
+
+    // We are going to go from 2.7.1->2.7.2->2.7.1 and 2.7.2 again.
+    for (i=0; i<2; i++)
+    {
+        // Change the server version in the connection to
+        // create as-if we were connecting to a v2.7.1 server.
+        natsConn_Lock(nc);
+        nc->srvVersion.ma = 2;
+        nc->srvVersion.mi = 7;
+        nc->srvVersion.up = 1;
+        natsConn_Unlock(nc);
+
+        test("Check discard (old): ");
+        s = _checkDiscard(js, js_DiscardOld, &kv);
+        if ((s == NATS_OK) && (i == 0))
+            s = kvStore_PutString(NULL, kv, "foo", "value");
+        testCond(s == NATS_OK);
+        kvStore_Destroy(kv);
+        kv = NULL;
+
+        // Now change version to 2.7.2
+        natsConn_Lock(nc);
+        nc->srvVersion.ma = 2;
+        nc->srvVersion.mi = 7;
+        nc->srvVersion.up = 2;
+        natsConn_Unlock(nc);
+
+        test("Check discard (new): ");
+        s = _checkDiscard(js, js_DiscardNew, &kv);
+        IFOK(s, kvStore_Get(&e, kv, "foo"));
+        if ((s == NATS_OK) && (strcmp(kvEntry_ValueString(e), "value") != 0))
+            s = NATS_ERR;
+        testCond(s == NATS_OK);
+        kvEntry_Destroy(e);
+        e = NULL;
+        kvStore_Destroy(kv);
+        kv = NULL;
+    }
+
+    test("Check that other changes are rejected: ");
+    kvConfig_Init(&kvc);
+    kvc.Bucket = "TEST";
+    kvc.MaxBytes = 1024*1024;
+    s = js_CreateKeyValue(&kv, js, &kvc);
+    testCond((s == NATS_ERR)
+                && (strstr(nats_GetLastError(NULL), "configuration is different") != NULL));
+    kvStore_Destroy(kv);
+
+    JS_TEARDOWN;
+}
+
+static void
+test_KeyValueRePublish(void)
+{
+    kvStore             *kv     = NULL;
+    jsStreamInfo        *si     = NULL;
+    natsSubscription    *sub    = NULL;
+    natsMsg             *msg    = NULL;
+    kvConfig            kvc;
+    jsRePublish         rp;
+    natsStatus          s;
+
+    JS_SETUP(2, 9, 0);
+
+    test("Create KV: ");
+    kvConfig_Init(&kvc);
+    kvc.Bucket = "TEST_UPDATE";
+    s = js_CreateKeyValue(&kv, js, &kvc);
+    testCond(s == NATS_OK);
+
+    kvStore_Destroy(kv);
+    kv = NULL;
+
+    test("Set RePublish should fail: ");
+    jsRePublish_Init(&rp);
+    rp.Source = ">";
+    rp.Destination = "bar.>";
+    kvc.RePublish =&rp;
+    s = js_CreateKeyValue(&kv, js, &kvc);
+    testCond((s == NATS_ERR) && (strstr(nats_GetLastError(NULL), "can not change RePublish") != NULL));
+    nats_clearLastError();
+
+    test("Create with repub: ");
+    kvc.Bucket = "TEST";
+    s = js_CreateKeyValue(&kv, js, &kvc);
+    testCond(s == NATS_OK);
+
+    test("Check set: ");
+    s = js_GetStreamInfo(&si, js, "KV_TEST", NULL, NULL);
+    testCond((s == NATS_OK) && (si->Config != NULL) && (si->Config->RePublish != NULL));
+    jsStreamInfo_Destroy(si);
+
+    test("Sub: ");
+    s = natsConnection_SubscribeSync(&sub, nc, "bar.>");
+    testCond(s == NATS_OK);
+
+    test("Put: ");
+    s = kvStore_PutString(NULL, kv, "foo", "value");
+    testCond(s == NATS_OK);
+
+    test("Get msg: ");
+    s = natsSubscription_NextMsg(&msg, sub, 1000);
+    testCond(s == NATS_OK);
+
+    test("Check msg: ");
+    s = (strcmp(natsMsg_GetData(msg), "value") == 0 ? NATS_OK : NATS_ERR);
+    if (s == NATS_OK)
+    {
+        const char *subj = NULL;
+
+        s = natsMsgHeader_Get(msg, JSSubject, &subj);
+        if (s == NATS_OK)
+            s = (strcmp(subj, "$KV.TEST.foo") == 0 ? NATS_OK : NATS_ERR);
+    }
+    testCond(s == NATS_OK);
+
+    natsMsg_Destroy(msg);
+    natsSubscription_Destroy(sub);
+    kvStore_Destroy(kv);
+
+    JS_TEARDOWN;
+}
+
+static void
+test_KeyValueMirrorDirectGet(void)
+{
+    kvStore             *kv     = NULL;
+    kvConfig            kvc;
+    jsStreamConfig      sc;
+    jsStreamSource      ss;
+    natsStatus          s;
+    int                 i;
+
+    JS_SETUP(2, 9, 0);
+
+    test("Create KV: ");
+    kvConfig_Init(&kvc);
+    kvc.Bucket = "DIRECT_GET";
+    s = js_CreateKeyValue(&kv, js, &kvc);
+    testCond(s == NATS_OK);
+
+    test("Add mirror: ");
+    jsStreamConfig_Init(&sc);
+    sc.Name = "MIRROR";
+    jsStreamSource_Init(&ss);
+    ss.Name = "KV_DIRECT_GET";
+    sc.Mirror = &ss;
+    sc.MirrorDirect = true;
+    s = js_AddStream(NULL, js, &sc, NULL, NULL);
+    testCond(s == NATS_OK);
+
+    test("Populate: ");
+    for (i=0; (s==NATS_OK) && (i<100); i++)
+    {
+        char key[64];
+
+        snprintf(key, sizeof(key), "KEY.%d", i);
+        s = kvStore_PutString(NULL, kv, key, key);
+    }
+    testCond(s == NATS_OK);
+
+    test("Check get: ");
+    for (i=0; (s==NATS_OK) && (i<100); i++)
+    {
+        kvEntry *e = NULL;
+        s = kvStore_Get(&e, kv, "KEY.22");
+        if (s == NATS_OK)
+        {
+            s = (strcmp(kvEntry_ValueString(e), "KEY.22") == 0 ? NATS_OK : NATS_ERR);
+            kvEntry_Destroy(e);
+        }
+    }
+    testCond(s == NATS_OK);
+
+    kvStore_Destroy(kv);
+
+    JS_TEARDOWN;
+}
+
+#if defined(NATS_HAS_STREAMING)
+
+static int
+_roundUp(int val)
+{
+    return ((val + (MEMALIGN-1))/MEMALIGN)*MEMALIGN;
+}
+
+static void
+test_StanPBufAllocator(void)
+{
+    natsPBufAllocator   *a = NULL;
+    natsStatus          s;
+    char                *ptr1;
+    char                *ptr2;
+    char                *ptr3;
+    char                *ptr4;
+    char                *oldBuf;
+    int                 oldCap;
+    int                 expectedProtoSize;
+    int                 expectedOverhead;
+    int                 expectedUsed;
+    int                 expectedRemaining;
+    int                 expectedCap;
+    int                 prevUsed;
+
+    test("Create: ");
+    s = natsPBufAllocator_Create(&a, 10, 2);
+    expectedProtoSize = MEMALIGN + _roundUp(10);
+    expectedOverhead  = (MEMALIGN * 2) + 2 + (2 * (MEMALIGN-1));
+    testCond((s == NATS_OK)
+            && (a->protoSize == expectedProtoSize)
+            && (a->overhead == expectedOverhead)
+            && (a->base.alloc != NULL)
+            && (a->base.free != NULL)
+            && (a->base.allocator_data == a));
+
+    test("Prepare: ");
+    natsPBufAllocator_Prepare(a, 20);
+    expectedCap = expectedProtoSize + expectedOverhead + 20;
+    testCond((a->buf != NULL)
+            && (a->cap == expectedCap)
+            && (a->remaining == a->cap)
+            && (a->used == 0));
+
+    test("Alloc 1: ");
+    ptr1 = (char*) a->base.alloc((void*)a, 10);
+    expectedUsed = MEMALIGN + _roundUp(10);
+    expectedRemaining = expectedCap - expectedUsed;
+    testCond((ptr1 != NULL)
+            && ((ptr1-MEMALIGN) == a->buf)
+            && ((ptr1-MEMALIGN)[0] == '0')
+            && (a->used == expectedUsed)
+            && (a->remaining == expectedRemaining));
+
+    test("Alloc 2: ");
+    ptr2 = (char*) a->base.alloc((void*)a, 5);
+    prevUsed           = expectedUsed;
+    expectedUsed      += MEMALIGN + _roundUp(5);
+    expectedRemaining  = expectedCap - expectedUsed;
+    testCond((ptr2 != ptr1)
+            && ((ptr2-MEMALIGN) == (a->buf + prevUsed))
+            && ((ptr2-MEMALIGN)[0] == '0')
+            && (a->used == expectedUsed)
+            && (a->remaining == expectedRemaining));
+
+    test("Alloc 3: ");
+    ptr3 = (char*) a->base.alloc((void*)a, 3);
+    prevUsed           = expectedUsed;
+    expectedUsed      += MEMALIGN + _roundUp(3);
+    expectedRemaining  = expectedCap - expectedUsed;
+    testCond((ptr3 != ptr2)
+            && ((ptr3-MEMALIGN) == (a->buf + prevUsed))
+            && ((ptr3-MEMALIGN)[0] == '0')
+            && (a->used == expectedUsed)
+            && (a->remaining == expectedRemaining));
+
+    test("Alloc 4: ");
+    ptr4 = (char*) a->base.alloc((void*)a, 50);
+    testCond((ptr4 != ptr3)
+            && (((ptr4-MEMALIGN) < a->buf) || ((ptr4-MEMALIGN) > (a->buf+a->cap)))
+            && ((ptr4-MEMALIGN)[0] == '1')
+            && (a->used == expectedUsed)
+            && (a->remaining == expectedRemaining));
+
+    // Free out of order, just make sure it does not crash
+    // and valgrind will make sure that we freed ptr4.
+    test("Free 2: ");
+    a->base.free((void*) a, (void*) ptr2);
+    testCond(1);
+
+    test("Free 1: ");
+    a->base.free((void*) a, (void*) ptr1);
+    testCond(1);
+
+    test("Free 4: ");
+    a->base.free((void*) a, (void*) ptr4);
+    testCond(1);
+
+    test("Free 3: ");
+    a->base.free((void*) a, (void*) ptr3);
+    testCond(1);
+
+    // Call prepare again with smaller buffer, buf should
+    // remain same, but used/remaining should be updated.
+    oldBuf = a->buf;
+    oldCap = a->cap;
+    test("Prepare with smaller buffer: ");
+    natsPBufAllocator_Prepare(a, 5);
+    testCond((a->buf == oldBuf)
+            && (a->cap == oldCap)
+            && (a->remaining == a->cap)
+            && (a->used == 0));
+
+    test("Prepare requires expand: ");
+    natsPBufAllocator_Prepare(a, 100);
+    // Realloc may or may not make a->buf be different...
+    expectedCap = expectedProtoSize + expectedOverhead + 100;
+    testCond((a->buf != NULL)
+            && (a->cap == expectedCap)
+            && (a->remaining == a->cap)
+            && (a->used == 0));
+
+    test("Destroy: ");
+    natsPBufAllocator_Destroy(a);
+    testCond(1);
+}
+
+static void
+_stanConnLostCB(stanConnection *sc, const char *errorTxt, void *closure)
+{
+    struct threadArg *arg = (struct threadArg*) closure;
+
+    natsMutex_Lock(arg->m);
+    arg->closed = true;
+    arg->status = NATS_OK;
+    if ((arg->string != NULL) && (strcmp(errorTxt, arg->string) != 0))
+        arg->status = NATS_ERR;
+    natsCondition_Signal(arg->c);
+    natsMutex_Unlock(arg->m);
+}
+
+static void
+test_StanConnOptions(void)
+{
+    natsStatus      s;
+    stanConnOptions *opts = NULL;
+    stanConnOptions *clone= NULL;
+    natsOptions     *no   = NULL;
+
+    test("Create option: ");
+    s = stanConnOptions_Create(&opts);
+    testCond(s == NATS_OK);
+
+    test("Has default values: ");
+    testCond(
+            (opts->connTimeout == STAN_CONN_OPTS_DEFAULT_CONN_TIMEOUT) &&
+            (opts->connectionLostCB == stanConn_defaultConnLostHandler) &&
+            (opts->connectionLostCBClosure == NULL) &&
+            (strcmp(opts->discoveryPrefix, STAN_CONN_OPTS_DEFAULT_DISCOVERY_PREFIX) == 0) &&
+            (opts->maxPubAcksInFlightPercentage == STAN_CONN_OPTS_DEFAULT_MAX_PUB_ACKS_INFLIGHT_PERCENTAGE) &&
+            (opts->maxPubAcksInflight == STAN_CONN_OPTS_DEFAULT_MAX_PUB_ACKS_INFLIGHT) &&
+            (opts->ncOpts == NULL) &&
+            (opts->pingInterval == STAN_CONN_OPTS_DEFAULT_PING_INTERVAL) &&
+            (opts->pingMaxOut == STAN_CONN_OPTS_DEFAULT_PING_MAX_OUT) &&
+            (opts->pubAckTimeout == STAN_CONN_OPTS_DEFAULT_PUB_ACK_TIMEOUT) &&
+            (opts->url == NULL));
+
+    test("Check invalid connection wait: ");
+    s = stanConnOptions_SetConnectionWait(opts, -10);
+    if (s != NATS_OK)
+        s = stanConnOptions_SetConnectionWait(opts, 0);
+    testCond(s != NATS_OK);
+    nats_clearLastError();
+
+    test("Check invalid discovery prefix: ");
+    s = stanConnOptions_SetDiscoveryPrefix(opts, NULL);
+    if (s != NATS_OK)
+        s = stanConnOptions_SetDiscoveryPrefix(opts, "");
+    testCond(s != NATS_OK);
+    nats_clearLastError();
+
+    test("Check invalid max pub acks: ");
+    s = stanConnOptions_SetMaxPubAcksInflight(opts, -1, 1);
+    if (s != NATS_OK)
+        s = stanConnOptions_SetMaxPubAcksInflight(opts, 0, 1);
+    if (s != NATS_OK)
+        s = stanConnOptions_SetMaxPubAcksInflight(opts, 10, -1);
+    if (s != NATS_OK)
+        s = stanConnOptions_SetMaxPubAcksInflight(opts, 10, 0);
+    if (s != NATS_OK)
+        s = stanConnOptions_SetMaxPubAcksInflight(opts, 10, 2);
+    testCond(s != NATS_OK);
+    nats_clearLastError();
+
+    test("Check invalid pings: ");
+    s = stanConnOptions_SetPings(opts, -1, 10);
+    if (s != NATS_OK)
+        s = stanConnOptions_SetPings(opts, 0, 10);
+    if (s != NATS_OK)
+        s = stanConnOptions_SetPings(opts, 1, -1);
+    if (s != NATS_OK)
+        s = stanConnOptions_SetPings(opts, 1, 0);
+    if (s != NATS_OK)
+        s = stanConnOptions_SetPings(opts, 1, 1);
+    testCond(s != NATS_OK);
+    nats_clearLastError();
+
+    test("Check invalid pub ack wait: ");
+    s = stanConnOptions_SetPubAckWait(opts, -1);
+    if (s != NATS_OK)
+        s = stanConnOptions_SetPubAckWait(opts, 0);
+    testCond(s != NATS_OK);
+    nats_clearLastError();
+
+    test("Set values: ");
+    s = stanConnOptions_SetConnectionWait(opts, 10000);
+    IFOK(s, stanConnOptions_SetDiscoveryPrefix(opts, "myPrefix"));
+    IFOK(s, stanConnOptions_SetMaxPubAcksInflight(opts, 10, (float) 0.8));
+    IFOK(s, stanConnOptions_SetPings(opts, 1, 10));
+    IFOK(s, stanConnOptions_SetPubAckWait(opts, 2000));
+    IFOK(s, stanConnOptions_SetURL(opts, "nats://me:1"));
+    IFOK(s, stanConnOptions_SetConnectionLostHandler(opts, _stanConnLostCB, (void*) 1));
+    testCond((s == NATS_OK) &&
+            (opts->connTimeout == 10000) &&
+            (strcmp(opts->discoveryPrefix, "myPrefix") == 0) &&
+            (opts->maxPubAcksInFlightPercentage == (float) 0.8) &&
+            (opts->maxPubAcksInflight == 10) &&
+            (opts->pingInterval == 1) &&
+            (opts->pingMaxOut == 10) &&
+            (opts->pubAckTimeout == 2000) &&
+            (strcmp(opts->url, "nats://me:1") == 0) &&
+            (opts->connectionLostCB == _stanConnLostCB) &&
+            (opts->connectionLostCBClosure == (void*) 1)
+            );
+
+    test("Set NATS options: ");
+    s = natsOptions_Create(&no);
+    IFOK(s, natsOptions_SetMaxPendingMsgs(no, 1000));
+    IFOK(s, stanConnOptions_SetNATSOptions(opts, no));
+    // change value from no after setting to stan opts
+    // check options were cloned.
+    IFOK(s, natsOptions_SetMaxPendingMsgs(no, 2000));
+    testCond((s == NATS_OK) &&
+            (opts->ncOpts != NULL) && // set
+            (opts->ncOpts != no) &&   // not a reference
+            (opts->ncOpts->maxPendingMsgs == 1000) // original value
+            );
+
+    test("Check clone: ");
+    s = stanConnOptions_clone(&clone, opts);
+    // Change values from original, check that clone
+    // keeps original values.
+    IFOK(s, stanConnOptions_SetConnectionWait(opts, 3000));
+    IFOK(s, stanConnOptions_SetDiscoveryPrefix(opts, "xxxxx"));
+    IFOK(s, stanConnOptions_SetMaxPubAcksInflight(opts, 100, (float) 0.2));
+    IFOK(s, stanConnOptions_SetPings(opts, 10, 20));
+    IFOK(s, stanConnOptions_SetPubAckWait(opts, 3000));
+    IFOK(s, stanConnOptions_SetURL(opts, "nats://metoo:1"));
+    IFOK(s, stanConnOptions_SetConnectionLostHandler(opts, NULL, NULL));
+    IFOK(s, stanConnOptions_SetNATSOptions(opts, NULL));
+    testCond((s == NATS_OK) &&
+            (clone != opts) &&
+            (clone->connTimeout == 10000) &&
+            (strcmp(clone->discoveryPrefix, "myPrefix") == 0) &&
+            (clone->maxPubAcksInFlightPercentage == (float) 0.8) &&
+            (clone->maxPubAcksInflight == 10) &&
+            (clone->pingInterval == 1) &&
+            (clone->pingMaxOut == 10) &&
+            (clone->pubAckTimeout == 2000) &&
+            (strcmp(clone->url, "nats://me:1") == 0) &&
+            (clone->connectionLostCB == _stanConnLostCB) &&
+            (clone->connectionLostCBClosure == (void*) 1) &&
+            (clone->ncOpts != NULL) &&
+            (clone->ncOpts != no) &&
+            (clone->ncOpts->maxPendingMsgs == 1000)
+            );
+
+    test("Check cb and NATS options can be set to NULL: ");
+    testCond(
+            (opts->ncOpts == NULL) &&
+            (opts->connectionLostCB == NULL) &&
+            (opts->connectionLostCBClosure == NULL));
+
+    test("Check URL can be set to NULL: ");
+    s = stanConnOptions_SetURL(opts, NULL);
+    testCond(s == NATS_OK);
+
+    test("Check clone ok after destroy original: ");
+    stanConnOptions_Destroy(opts);
+    testCond((s == NATS_OK) &&
+                (clone->connTimeout == 10000) &&
+                (strcmp(clone->discoveryPrefix, "myPrefix") == 0) &&
+                (clone->maxPubAcksInFlightPercentage == (float) 0.8) &&
+                (clone->maxPubAcksInflight == 10) &&
+                (clone->pingInterval == 1) &&
+                (clone->pingMaxOut == 10) &&
+                (clone->pubAckTimeout == 2000) &&
+                (strcmp(clone->url, "nats://me:1") == 0) &&
+                (clone->connectionLostCB == _stanConnLostCB) &&
+                (clone->connectionLostCBClosure == (void*) 1) &&
+                (clone->ncOpts != NULL) &&
+                (clone->ncOpts != no) &&
+                (clone->ncOpts->maxPendingMsgs == 1000)
+                );
+
+    natsOptions_Destroy(no);
+    stanConnOptions_Destroy(clone);
+}
+
+static void
+test_StanSubOptions(void)
+{
+    natsStatus      s;
+    stanSubOptions  *opts = NULL;
+    stanSubOptions  *clone= NULL;
+    int64_t         now   = 0;
+
+    test("Create Options: ");
+    s = stanSubOptions_Create(&opts);
+    testCond(s == NATS_OK);
+
+    test("Default values: ");
+    testCond(
+            (opts->ackWait == STAN_SUB_OPTS_DEFAULT_ACK_WAIT) &&
+            (opts->durableName == NULL) &&
+            (opts->manualAcks == false) &&
+            (opts->maxInflight == STAN_SUB_OPTS_DEFAULT_MAX_INFLIGHT) &&
+            (opts->startAt == PB__START_POSITION__NewOnly) &&
+            (opts->startSequence == 0) &&
+            (opts->startTime == 0)
+            );
+
+    test("Check invalid ackwait: ");
+    s = stanSubOptions_SetAckWait(opts, -1);
+    if (s != NATS_OK)
+        s = stanSubOptions_SetAckWait(opts, 0);
+    testCond(s != NATS_OK);
+    nats_clearLastError();
+
+    test("Check invalid maxinflight: ");
+    s = stanSubOptions_SetMaxInflight(opts, -1);
+    if (s != NATS_OK)
+        s = stanSubOptions_SetMaxInflight(opts, 0);
+    testCond(s != NATS_OK);
+    nats_clearLastError();
+
+    test("Check invalid start seq: ");
+    s = stanSubOptions_StartAtSequence(opts, 0);
+    testCond(s != NATS_OK);
+    nats_clearLastError();
+
+    test("Check invalid start time: ");
+    s = stanSubOptions_StartAtTime(opts, -1);
+    testCond(s != NATS_OK);
+    nats_clearLastError();
+
+    test("Check invalid start time: ");
+    s = stanSubOptions_StartAtTimeDelta(opts, -1);
+    testCond(s != NATS_OK);
+    nats_clearLastError();
+
+    test("Check set values: ");
+    s = stanSubOptions_SetAckWait(opts, 1000);
+    IFOK(s, stanSubOptions_SetDurableName(opts, "myDurable"));
+    IFOK(s, stanSubOptions_SetManualAckMode(opts, true));
+    IFOK(s, stanSubOptions_SetMaxInflight(opts, 200));
+    testCond((s == NATS_OK) &&
+            (opts->ackWait == 1000) &&
+            (strcmp(opts->durableName, "myDurable") == 0) &&
+            (opts->manualAcks == true) &&
+            (opts->maxInflight == 200)
+            );
+
+    now = nats_Now();
+    test("Check start at time delta: ");
+    s = stanSubOptions_StartAtTimeDelta(opts, 20000);
+    testCond((s == NATS_OK) &&
+            (opts->startAt == PB__START_POSITION__TimeDeltaStart) &&
+                ((opts->startTime >= now-20200) &&
+                 (opts->startTime <= now-19800))
+            );
+
+    test("Check start at time: ");
+    s = stanSubOptions_StartAtTime(opts, 1234567890);
+    testCond((s == NATS_OK) &&
+            (opts->startAt == PB__START_POSITION__TimeDeltaStart) &&
+            (opts->startTime == 1234567890)
+            );
+
+    test("Check start at seq: ");
+    s = stanSubOptions_StartAtSequence(opts, 100);
+    testCond((s == NATS_OK) &&
+            (opts->startAt == PB__START_POSITION__SequenceStart) &&
+            (opts->startSequence == 100)
+            );
+
+    test("Check deliver all avail: ");
+    s = stanSubOptions_DeliverAllAvailable(opts);
+    testCond((s == NATS_OK) && (opts->startAt == PB__START_POSITION__First));
+
+    test("Check clone: ");
+    s = stanSubOptions_clone(&clone, opts);
+    // Change values of opts to show that this does not affect
+    // the clone
+    IFOK(s, stanSubOptions_SetAckWait(opts, 20000));
+    IFOK(s, stanSubOptions_SetDurableName(opts, NULL));
+    IFOK(s, stanSubOptions_SetManualAckMode(opts, false));
+    IFOK(s, stanSubOptions_SetMaxInflight(opts, 4000));
+    IFOK(s, stanSubOptions_StartAtSequence(opts, 100));
+    testCond((s == NATS_OK) &&
+            (clone != opts) &&
+            (clone->ackWait == 1000) &&
+            (strcmp(clone->durableName, "myDurable") == 0) &&
+            (clone->manualAcks == true) &&
+            (clone->maxInflight == 200) &&
+            (clone->startAt == PB__START_POSITION__First)
+            );
+
+    test("Check clone ok after destroy original: ");
+    stanSubOptions_Destroy(opts);
+    testCond((s == NATS_OK) &&
+            (clone != opts) &&
+            (clone->ackWait == 1000) &&
+            (strcmp(clone->durableName, "myDurable") == 0) &&
+            (clone->manualAcks == true) &&
+            (clone->maxInflight == 200) &&
+            (clone->startAt == PB__START_POSITION__First)
+            );
+
+    stanSubOptions_Destroy(clone);
+}
+
+static void
+test_StanMsg(void)
+{
+    test("GetSequence with NULL msg: ");
+    testCond(stanMsg_GetSequence(NULL) == 0);
+
+    test("GetData with NULL msg: ");
+    testCond(stanMsg_GetData(NULL) == NULL);
+
+    test("GetDataLength with NULL msg: ");
+    testCond(stanMsg_GetDataLength(NULL) == 0);
+
+    test("GetTimestamp with NULL msg: ");
+    testCond(stanMsg_GetTimestamp(NULL) == 0);
+
+    test("IsRedelivered with NULL msg: ");
+    testCond(stanMsg_IsRedelivered(NULL) == false);
+
+    stanMsg_Destroy(NULL);
+}
+
+static void
+test_StanServerNotReachable(void)
+{
+    natsStatus      s;
+    stanConnection  *sc = NULL;
+    stanConnOptions *opts = NULL;
+    natsPid         serverPid = NATS_INVALID_PID;
+    int64_t         now = 0;
+    int64_t         elapsed = 0;
+
+    s = stanConnOptions_Create(&opts);
+    IFOK(s, stanConnOptions_SetURL(opts, "nats://127.0.0.1:4222"));
+    IFOK(s, stanConnOptions_SetConnectionWait(opts, 250));
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    serverPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(serverPid);
+
+    test("Connect fails if no streaming server running: ");
+    now = nats_Now();
+    s = stanConnection_Connect(&sc, clusterName, clientName, opts);
+    elapsed = nats_Now()-now;
+    if (serverVersionAtLeast(2, 2, 0))
+    {
+        testCond((s == NATS_NO_RESPONDERS) &&
+                 (strstr(nats_GetLastError(NULL), STAN_ERR_CONNECT_REQUEST_NO_RESP) != NULL));
+    }
+    else
+    {
+        testCond((s == NATS_TIMEOUT) &&
+                 (strstr(nats_GetLastError(NULL), STAN_ERR_CONNECT_REQUEST_TIMEOUT) != NULL) &&
+                 (elapsed < 2000));
+    }
+
+    stanConnOptions_Destroy(opts);
+
+    _stopServer(serverPid);
+}
+
+static void
+test_StanBasicConnect(void)
+{
+    natsStatus      s;
+    stanConnection  *sc = NULL;
+    natsPid         pid = NATS_INVALID_PID;
+    stanConnOptions *opts   = NULL;
+    natsOptions     *nopts  = NULL;
+
+    pid = _startStreamingServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    test("Basic connect: ");
+    s = stanConnection_Connect(&sc, clusterName, clientName, NULL);
+    testCond(s == NATS_OK);
+
+    test("Connection close: ");
+    s = stanConnection_Close(sc);
+    testCond(s == NATS_OK);
+
+    test("Connection double close: ");
+    s = stanConnection_Close(sc);
+    testCond(s == NATS_OK);
+
+    stanConnection_Destroy(sc);
+    sc = NULL;
+
+    _stopServer(pid);
+    pid = NATS_INVALID_PID;
+
+    pid = _startStreamingServer("nats://127.0.0.1:4223", "-p 4223", true);
+    CHECK_SERVER_STARTED(pid);
+
+    test("Connect with non default stan URL: ");
+    s = stanConnOptions_Create(&opts);
+    IFOK(s, stanConnOptions_SetURL(opts, "nats://127.0.0.1:4223"));
+    IFOK(s, stanConnection_Connect(&sc, clusterName, clientName, opts));
+    testCond(s == NATS_OK);
+
+    stanConnection_Destroy(sc);
+    sc = NULL;
+
+    test("stan URL takes precedence: ");
+    s = natsOptions_Create(&nopts);
+    IFOK(s, natsOptions_SetURL(nopts, "nats://127.0.0.1:4224")); // wrong URL
+    IFOK(s, stanConnOptions_SetNATSOptions(opts, nopts));
+    IFOK(s, stanConnection_Connect(&sc, clusterName, clientName, opts));
+    // Should connect because it should use the one from stanConnOptions_SetURL.
+    testCond(s == NATS_OK);
+
+    stanConnection_Destroy(sc);
+    sc = NULL;
+
+    test("If no stan URL set, uses NATS URL: ");
+    s = stanConnOptions_SetURL(opts, NULL);
+    IFOK(s, natsOptions_SetURL(nopts, "nats://127.0.0.1:4223"));
+    IFOK(s, stanConnOptions_SetNATSOptions(opts, nopts));
+    IFOK(s, stanConnection_Connect(&sc, clusterName, clientName, opts));
+    // Should connect because it should use the one from StanURL.
+    testCond(s == NATS_OK);
+
+    stanConnection_Destroy(sc);
+    stanConnOptions_Destroy(opts);
+    natsOptions_Destroy(nopts);
+
+    _stopServer(pid);
+}
+
+static void
+test_StanConnectError(void)
+{
+    natsStatus          s;
+    stanConnection      *sc = NULL;
+    stanConnection      *sc2 = NULL;
+    natsPid             nPid = NATS_INVALID_PID;
+    natsPid             sPid = NATS_INVALID_PID;
+    stanConnOptions     *opts = NULL;
+
+    nPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(nPid);
+
+    sPid = _startStreamingServer("nats://127.0.0.1:4222", "-ns nats://127.0.0.1:4222", true);
+    CHECK_SERVER_STARTED(sPid);
+
+    test("Check connect response error: ");
+    s = stanConnection_Connect(&sc, clusterName, clientName, NULL);
+    IFOK(s, stanConnection_Connect(&sc2, clusterName, clientName, NULL));
+    testCond((s == NATS_ERR) &&
+            (strstr(nats_GetLastError(NULL), "clientID already registered") != NULL));
+
+    test("Check wrong discovery prefix: ");
+    s = stanConnOptions_Create(&opts);
+    IFOK(s, stanConnOptions_SetDiscoveryPrefix(opts, "wrongprefix"));
+    IFOK(s, stanConnOptions_SetConnectionWait(opts, 500));
+    IFOK(s, stanConnection_Connect(&sc2, clusterName, "newClient", opts));
+    testCond(serverVersionAtLeast(2, 2, 0) ? (s == NATS_NO_RESPONDERS) : (s == NATS_TIMEOUT));
+
+    stanConnection_Destroy(sc);
+    stanConnOptions_Destroy(opts);
+
+    _stopServer(sPid);
+    _stopServer(nPid);
+}
+
+
+static void
+test_StanBasicPublish(void)
+{
+    natsStatus      s;
+    stanConnection  *sc = NULL;
+    natsPid         pid = NATS_INVALID_PID;
+
+    pid = _startStreamingServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    test("Basic publish: ");
+    s = stanConnection_Connect(&sc, clusterName, clientName, NULL);
+    IFOK(s, stanConnection_Publish(sc, "foo", (const void*) "hello", 5));
+    testCond(s == NATS_OK);
+
+    stanConnection_Destroy(sc);
+
+    _stopServer(pid);
+}
+
+static void
+_stanPubAckHandler(const char *guid, const char *errTxt, void* closure)
+{
+    struct threadArg *args= (struct threadArg*) closure;
+
+    natsMutex_Lock(args->m);
+    args->status = NATS_OK;
+    if (errTxt != NULL)
+    {
+        if ((args->string == NULL) || (strstr(errTxt, args->string) == NULL))
+            args->status = NATS_ERR;
+    }
+    else if (args->string != NULL)
+    {
+        args->status = NATS_ERR;
+    }
+    args->msgReceived = true;
+    natsCondition_Signal(args->c);
+    natsMutex_Unlock(args->m);
+}
+
+static void
+test_StanBasicPublishAsync(void)
+{
+    natsStatus          s;
+    stanConnection      *sc = NULL;
+    natsPid             pid = NATS_INVALID_PID;
+    struct threadArg    args;
+
+    s = _createDefaultThreadArgsForCbTests(&args);
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    pid = _startStreamingServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    test("Basic publish async: ");
+    s = stanConnection_Connect(&sc, clusterName, clientName, NULL);
+    IFOK(s, stanConnection_PublishAsync(sc, "foo", (const void*) "hello", 5,
+                                        _stanPubAckHandler, (void*) &args));
+    testCond(s == NATS_OK);
+
+    test("PubAck callback report no error: ");
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && !args.msgReceived)
+        s = natsCondition_TimedWait(args.c, args.m, 2000);
+    IFOK(s, args.status);
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_OK);
+
+    stanConnection_Destroy(sc);
+
+    _destroyDefaultThreadArgs(&args);
+
+    _stopServer(pid);
+}
+
+static void
+test_StanPublishTimeout(void)
+{
+    natsStatus          s;
+    stanConnection      *sc = NULL;
+    struct threadArg    args;
+    natsPid             nPid = NATS_INVALID_PID;
+    natsPid             sPid = NATS_INVALID_PID;
+    stanConnOptions     *opts = NULL;
+
+    s = _createDefaultThreadArgsForCbTests(&args);
+    IFOK(s, stanConnOptions_Create(&opts));
+    IFOK(s, stanConnOptions_SetPubAckWait(opts, 50));
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    nPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(nPid);
+
+    sPid = _startStreamingServer("nats://127.0.0.1:4222", "-ns nats://127.0.0.1:4222", true);
+    CHECK_SERVER_STARTED(sPid);
+
+    // First connect, then once that's done, shutdown streaming server
+    s = stanConnection_Connect(&sc, clusterName, clientName, opts);
+
+    _stopServer(sPid);
+
+    if (s != NATS_OK)
+    {
+        _stopServer(nPid);
+        FAIL("Not able to create connection for this test");
+    }
+
+    args.string = STAN_ERR_PUB_ACK_TIMEOUT;
+
+    test("Check publish async timeout");
+    s = stanConnection_PublishAsync(sc, "foo", (const void*) "hello", 5,
+                                    _stanPubAckHandler, (void*) &args);
+    testCond(s == NATS_OK);
+
+    test("PubAck callback report pub ack timeout error: ");
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && !args.msgReceived)
+        s = natsCondition_TimedWait(args.c, args.m, 2000);
+    IFOK(s, args.status);
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_OK);
+
+    // Speed up test by closing stan's nc connection to avoid timing out on conn close
+    stanConnClose(sc, false);
+
+    stanConnOptions_Destroy(opts);
+    stanConnection_Destroy(sc);
+
+    _destroyDefaultThreadArgs(&args);
+
+    _stopServer(nPid);
+}
+
+static void
+_stanPublishAsyncThread(void *closure)
+{
+    struct threadArg *args = (struct threadArg*) closure;
+    int i;
+
+    for (i = 0; i < 10; i++)
+        stanConnection_PublishAsync(args->sc, "foo", (const void*)"hello", 5, NULL, NULL);
+}
+
+static void
+_stanPublishSyncThread(void *closure)
+{
+    stanConnection *sc = (stanConnection*) closure;
+
+    stanConnection_Publish(sc, "foo", (const void*)"hello", 5);
+}
+
+static void
+test_StanPublishMaxAcksInflight(void)
+{
+    natsStatus          s;
+    stanConnection      *sc1 = NULL;
+    stanConnection      *sc2 = NULL;
+    struct threadArg    args;
+    natsPid             nPid = NATS_INVALID_PID;
+    natsPid             sPid = NATS_INVALID_PID;
+    stanConnOptions     *opts = NULL;
+    natsThread          *t = NULL;
+    natsThread          *pts[10];
+    int                 i;
+    natsConnection      *nc = NULL;
+
+    for (i=0;i<10;i++)
+        pts[i] = NULL;
+
+    s = _createDefaultThreadArgsForCbTests(&args);
+    IFOK(s, stanConnOptions_Create(&opts));
+    IFOK(s, stanConnOptions_SetMaxPubAcksInflight(opts, 5, 1.0));
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    nPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(nPid);
+
+    sPid = _startStreamingServer("nats://127.0.0.1:4222", "-ns nats://127.0.0.1:4222", true);
+    CHECK_SERVER_STARTED(sPid);
+
+    // First connect, then once that's done, shutdown streaming server
+    s = stanConnection_Connect(&sc1, clusterName, clientName, opts);
+    IFOK(s, stanConnection_Connect(&sc2, clusterName, "otherClient", opts));
+    if (s != NATS_OK)
+    {
+        stanConnection_Destroy(sc1);
+        stanConnection_Destroy(sc2);
+        _stopServer(sPid);
+        _stopServer(nPid);
+        FAIL("Not able to create connection for this test");
+    }
+
+    _stopServer(sPid);
+
+    // grap nc first
+    natsMutex_Lock(sc1->mu);
+    nc = sc1->nc;
+    natsMutex_Unlock(sc1->mu);
+
+    test("Check max inflight: ");
+    args.sc = sc1;
+    // Retain the connection
+    stanConn_retain(sc1);
+    s = natsThread_Create(&t, _stanPublishAsyncThread, (void*) &args);
+    if (s == NATS_OK)
+    {
+        int i = 0;
+        // Check that pubAckMap size is never greater than 5.
+        for (i=0; (s == NATS_OK) && (i<10); i++)
+        {
+            nats_Sleep(100);
+            natsMutex_Lock(sc1->pubAckMu);
+            s = (natsStrHash_Count(sc1->pubAckMap) <= 5 ? NATS_OK : NATS_ERR);
+            natsMutex_Unlock(sc1->pubAckMu);
+        }
+    }
+    testCond(s == NATS_OK);
+
+    test("Close unblock: ");
+    natsConn_close(nc);
+    nc = NULL;
+    stanConnection_Destroy(sc1);
+    natsThread_Join(t);
+    natsThread_Destroy(t);
+    stanConn_release(sc1);
+    testCond(s == NATS_OK);
+
+    // Repeat test with sync publishers
+
+    // grap nc first
+    natsMutex_Lock(sc2->mu);
+    nc = sc2->nc;
+    natsMutex_Unlock(sc2->mu);
+
+    test("Check max inflight: ");
+    // Retain the connection
+    stanConn_retain(sc2);
+    for (i=0; (s == NATS_OK) && (i<10); i++)
+        s = natsThread_Create(&(pts[i]), _stanPublishSyncThread, (void*) sc2);
+    if (s == NATS_OK)
+    {
+        int i = 0;
+        // Check that pubAckMap size is never greater than 5.
+        for (i=0; (s == NATS_OK) && (i<10); i++)
+        {
+            nats_Sleep(100);
+            natsMutex_Lock(sc2->pubAckMu);
+            s = (natsStrHash_Count(sc2->pubAckMap) <= 5 ? NATS_OK : NATS_ERR);
+            natsMutex_Unlock(sc2->pubAckMu);
+        }
+    }
+    testCond(s == NATS_OK);
+
+    test("Close unblock: ");
+    natsConn_close(nc);
+    nc = NULL;
+    stanConnection_Destroy(sc2);
+    for (i = 0; i<10; i++)
+    {
+        if (pts[i] != NULL)
+        {
+            natsThread_Join(pts[i]);
+            natsThread_Destroy(pts[i]);
+        }
+    }
+    stanConn_release(sc2);
+    testCond(s == NATS_OK);
+
+    stanConnOptions_Destroy(opts);
+
+    _destroyDefaultThreadArgs(&args);
+
+    _stopServer(nPid);
+}
+
+static void
+_dummyStanMsgHandler(stanConnection *sc, stanSubscription *sub, const char *channel,
+                     stanMsg *msg, void* closure)
+{
+    stanMsg_Destroy(msg);
+}
+
+static void
+_stanMsgHandlerBumpSum(stanConnection *sc, stanSubscription *sub, const char *channel,
+                      stanMsg *msg, void* closure)
+{
+    struct threadArg *args = (struct threadArg*) closure;
+
+    natsMutex_Lock(args->m);
+    if (!stanMsg_IsRedelivered(msg))
+        args->sum++;
+    else
+        args->redelivered++;
+    natsCondition_Broadcast(args->c);
+    natsMutex_Unlock(args->m);
+
+    stanMsg_Destroy(msg);
+}
+
+static void
+test_StanBasicSubscription(void)
+{
+    natsStatus          s;
+    stanConnection      *sc = NULL;
+    stanSubscription    *sub = NULL;
+    stanSubscription    *subf = NULL;
+    natsPid             pid = NATS_INVALID_PID;
+
+    pid = _startStreamingServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    s = stanConnection_Connect(&sc, clusterName, clientName, NULL);
+    if (s != NATS_OK)
+    {
+        _stopServer(pid);
+        FAIL("Unable to create connection for this test");
+    }
+
+    test("Basic subscibe: ");
+    s = stanConnection_Subscribe(&sub, sc, "foo", _dummyStanMsgHandler, NULL, NULL);
+    testCond(s == NATS_OK);
+
+    test("Close connection: ")
+    s = stanConnection_Close(sc);
+    testCond(s == NATS_OK);
+
+    test("Subscribe should fail after conn closed: ");
+    s = stanConnection_Subscribe(&subf, sc, "foo", _dummyStanMsgHandler, NULL, NULL);
+    testCond(s == NATS_CONNECTION_CLOSED);
+
+    test("Subscribe should fail after conn closed: ");
+    s = stanConnection_QueueSubscribe(&subf, sc, "foo", "bar", _dummyStanMsgHandler, NULL, NULL);
+    testCond(s == NATS_CONNECTION_CLOSED);
+
+    stanSubscription_Destroy(sub);
+    stanConnection_Destroy(sc);
+
+    _stopServer(pid);
+}
+
+static void
+test_StanSubscriptionCloseAndUnsubscribe(void)
+{
+    natsStatus          s;
+    stanConnection      *sc = NULL;
+    stanSubscription    *sub = NULL;
+    stanSubscription    *sub2 = NULL;
+    natsPid             pid = NATS_INVALID_PID;
+    natsPid             spid = NATS_INVALID_PID;
+    char                *cs = NULL;
+    stanConnOptions     *opts = NULL;
+
+    s = stanConnOptions_Create(&opts);
+    IFOK(s, stanConnOptions_SetConnectionWait(opts, 250));
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    pid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    spid = _startStreamingServer("nats://127.0.0.1:4222", "-ns nats://127.0.0.1:4222", true);
+    CHECK_SERVER_STARTED(spid);
+
+    s = stanConnection_Connect(&sc, clusterName, clientName, opts);
+    if (s != NATS_OK)
+    {
+        _stopServer(spid);
+        _stopServer(pid);
+        FAIL("Unable to create connection for this test");
+    }
+
+    test("Unsubscribe: ");
+    s = stanConnection_Subscribe(&sub, sc, "foo", _dummyStanMsgHandler, NULL, NULL);
+    IFOK(s, stanSubscription_Unsubscribe(sub));
+    testCond(s == NATS_OK);
+
+    stanSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("Close: ");
+    s = stanConnection_Subscribe(&sub, sc, "foo", _dummyStanMsgHandler, NULL, NULL);
+    IFOK(s, stanSubscription_Close(sub));
+    testCond(s == NATS_OK);
+
+    stanSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("Close not supported: ");
+    // Simulate that we connected to an older server
+    natsMutex_Lock(sc->mu);
+    cs = sc->subCloseRequests;
+    sc->subCloseRequests = NULL;
+    natsMutex_Unlock(sc->mu);
+    s = stanConnection_Subscribe(&sub, sc, "foo", _dummyStanMsgHandler, NULL, NULL);
+    IFOK(s, stanSubscription_Close(sub));
+    testCond((s == NATS_NO_SERVER_SUPPORT) &&
+            (strstr(nats_GetLastError(NULL), STAN_ERR_SUB_CLOSE_NOT_SUPPORTED) != NULL));
+
+    stanSubscription_Destroy(sub);
+    sub = NULL;
+
+    natsMutex_Lock(sc->mu);
+    sc->subCloseRequests = cs;
+    natsMutex_Unlock(sc->mu);
+
+    test("Close/Unsub timeout: ");
+    s = stanConnection_Subscribe(&sub, sc, "foo", _dummyStanMsgHandler, NULL, NULL);
+    IFOK(s, stanConnection_Subscribe(&sub2, sc, "foo", _dummyStanMsgHandler, NULL, NULL));
+
+    // Stop the serer
+    _stopServer(spid);
+
+    if (s == NATS_OK)
+    {
+        s = stanSubscription_Close(sub);
+        if (s != NATS_OK)
+            s = stanSubscription_Unsubscribe(sub2);
+    }
+    if (serverVersionAtLeast(2, 2, 0))
+    {
+        testCond((s == NATS_NO_RESPONDERS) &&
+                 (strstr(nats_GetLastError(NULL), "no streaming server was listening") != NULL));
+    }
+    else
+    {
+        testCond((s == NATS_TIMEOUT) &&
+                 (strstr(nats_GetLastError(NULL), "request timeout") != NULL));
+    }
+    stanSubscription_Destroy(sub);
+    stanSubscription_Destroy(sub2);
+
+    stanConnClose(sc, false);
+    stanConnection_Destroy(sc);
+    stanConnOptions_Destroy(opts);
+
+    _stopServer(pid);
+}
+
+static void
+test_StanDurableSubscription(void)
+{
+    natsStatus          s;
+    stanConnection      *sc = NULL;
+    stanSubscription    *dur = NULL;
+    stanSubOptions      *opts = NULL;
+    natsPid             pid = NATS_INVALID_PID;
+    struct threadArg    args;
+    int                 i;
+
+    s = _createDefaultThreadArgsForCbTests(&args);
+    if (s != NATS_OK)
+        FAIL("Error setting up test");
+
+    pid = _startStreamingServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    s = stanConnection_Connect(&sc, clusterName, clientName, NULL);
+    if (s != NATS_OK)
+    {
+        _stopServer(pid);
+        FAIL("Unable to create connection for this test");
+    }
+
+    test("Send some messages: ");
+    for (i=0; (s == NATS_OK) && (i<3); i++)
+        s = stanConnection_Publish(sc, "foo", (const void*) "hello", 5);
+    testCond(s == NATS_OK);
+
+    test("Basic durable subscibe: ");
+    s = stanSubOptions_Create(&opts);
+    IFOK(s, stanSubOptions_SetDurableName(opts, "dur"));
+    IFOK(s, stanSubOptions_DeliverAllAvailable(opts));
+    IFOK(s, stanConnection_Subscribe(&dur, sc, "foo", _stanMsgHandlerBumpSum, &args, opts));
+    testCond(s == NATS_OK);
+
+    test("Check 3 messages received: ");
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && (args.sum != 3))
+        s = natsCondition_TimedWait(args.c, args.m, 2000);
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_OK);
+
+    // Wait a bit to give a chance for the server to process acks.
+    nats_Sleep(500);
+
+    test("Close connection: ");
+    s = stanConnection_Close(sc);
+    testCond(s == NATS_OK);
+
+    stanSubscription_Destroy(dur);
+    dur = NULL;
+    stanConnection_Destroy(sc);
+    sc = NULL;
+
+    test("Connect again: ");
+    s = stanConnection_Connect(&sc, clusterName, clientName, NULL);
+    testCond(s == NATS_OK);
+
+    test("Send 2 more messages: ");
+    for (i=0; (s == NATS_OK) && (i<2); i++)
+        s = stanConnection_Publish(sc, "foo", (const void*) "hello", 5);
+    testCond(s == NATS_OK);
+
+    test("Recreate durable with start seq 1: ");
+    s = stanSubOptions_StartAtSequence(opts, 1);
+    IFOK(s, stanConnection_Subscribe(&dur, sc, "foo", _stanMsgHandlerBumpSum, &args, opts));
+    testCond(s == NATS_OK);
+
+    test("Check 5 messages total are received: ");
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && (args.sum != 5))
+        s = natsCondition_TimedWait(args.c, args.m, 2000);
+    testCond(s == NATS_OK);
+    test("Check no redelivered: ");
+    testCond((s == NATS_OK) && (args.redelivered == 0));
+    natsMutex_Unlock(args.m);
+
+    stanSubscription_Destroy(dur);
+    stanSubOptions_Destroy(opts);
+    stanConnection_Destroy(sc);
+
+    _destroyDefaultThreadArgs(&args);
+
+    _stopServer(pid);
+}
+
+static void
+test_StanBasicQueueSubscription(void)
+{
+    natsStatus          s;
+    stanConnection      *sc = NULL;
+    stanSubscription    *qsub1 = NULL;
+    stanSubscription    *qsub2 = NULL;
+    stanSubscription    *qsub3 = NULL;
+    stanSubOptions      *opts = NULL;
+    natsPid             pid = NATS_INVALID_PID;
+    struct threadArg    args;
+
+    s = _createDefaultThreadArgsForCbTests(&args);
+    if (s != NATS_OK)
+        FAIL("Error setting up test");
+
+    pid = _startStreamingServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    s = stanConnection_Connect(&sc, clusterName, clientName, NULL);
+    if (s != NATS_OK)
+    {
+        _stopServer(pid);
+        FAIL("Unable to create connection for this test");
+    }
+
+    test("Basic queue subscibe: ");
+    s = stanConnection_QueueSubscribe(&qsub1, sc, "foo", "bar", _stanMsgHandlerBumpSum, &args, NULL);
+    IFOK(s, stanConnection_QueueSubscribe(&qsub2, sc, "foo", "bar", _stanMsgHandlerBumpSum, &args, NULL));
+    testCond(s == NATS_OK);
+
+    // Test that durable and non durable queue subscribers with
+    // same name can coexist and they both receive the same message.
+    test("New durable queue sub with same queue name: ");
+    s = stanSubOptions_Create(&opts);
+    IFOK(s, stanSubOptions_SetDurableName(opts, "durable-queue-sub"));
+    IFOK(s, stanConnection_QueueSubscribe(&qsub3, sc, "foo", "bar", _stanMsgHandlerBumpSum, &args, opts));
+    testCond(s == NATS_OK);
+
+    test("Check published message ok: ");
+    s = stanConnection_Publish(sc, "foo", (const void*)"hello", 5);
+    testCond(s == NATS_OK);
+
+    test("Check 1 message published is received once per group: ");
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && (args.sum != 2))
+        s = natsCondition_TimedWait(args.c, args.m, 2000);
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_OK);
+
+    stanSubscription_Destroy(qsub1);
+    stanSubscription_Destroy(qsub2);
+    stanSubscription_Destroy(qsub3);
+    stanSubOptions_Destroy(opts);
+    stanConnection_Destroy(sc);
+
+    _destroyDefaultThreadArgs(&args);
+
+    _stopServer(pid);
+}
+
+static void
+test_StanDurableQueueSubscription(void)
+{
+    natsStatus          s;
+    stanConnection      *sc = NULL;
+    stanSubscription    *dur = NULL;
+    stanSubOptions      *opts = NULL;
+    natsPid             pid = NATS_INVALID_PID;
+    struct threadArg    args;
+    int                 i;
+
+    s = _createDefaultThreadArgsForCbTests(&args);
+    if (s != NATS_OK)
+        FAIL("Error setting up test");
+
+    pid = _startStreamingServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    s = stanConnection_Connect(&sc, clusterName, clientName, NULL);
+    if (s != NATS_OK)
+    {
+        _stopServer(pid);
+        FAIL("Unable to create connection for this test");
+    }
+
+    test("Send some messages: ");
+    for (i=0; (s == NATS_OK) && (i<3); i++)
+        s = stanConnection_Publish(sc, "foo", (const void*) "hello", 5);
+    testCond(s == NATS_OK);
+
+    test("Basic durable subscibe: ");
+    s = stanSubOptions_Create(&opts);
+    IFOK(s, stanSubOptions_SetDurableName(opts, "dur"));
+    IFOK(s, stanSubOptions_DeliverAllAvailable(opts));
+    IFOK(s, stanConnection_QueueSubscribe(&dur, sc, "foo", "bar", _stanMsgHandlerBumpSum, &args, opts));
+    testCond(s == NATS_OK);
+
+    test("Check 3 messages received: ");
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && (args.sum != 3))
+        s = natsCondition_TimedWait(args.c, args.m, 2000);
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_OK);
+
+    // Give a chance for the server to process those acks
+    nats_Sleep(500);
+
+    test("Close connection: ");
+    s = stanConnection_Close(sc);
+    testCond(s == NATS_OK);
+
+    stanSubscription_Destroy(dur);
+    dur = NULL;
+    stanConnection_Destroy(sc);
+    sc = NULL;
+
+    test("Connect again: ");
+    s = stanConnection_Connect(&sc, clusterName, clientName, NULL);
+    testCond(s == NATS_OK);
+
+    test("Send 2 more messages: ");
+    for (i=0; (s == NATS_OK) && (i<2); i++)
+        s = stanConnection_Publish(sc, "foo", (const void*) "hello", 5);
+    testCond(s == NATS_OK);
+
+    test("Recreate durable with start seq 1: ");
+    s = stanSubOptions_StartAtSequence(opts, 1);
+    IFOK(s, stanConnection_QueueSubscribe(&dur, sc, "foo", "bar", _stanMsgHandlerBumpSum, &args, opts));
+    testCond(s == NATS_OK);
+
+    test("Check 5 messages total are received: ");
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && (args.sum != 5))
+        s = natsCondition_TimedWait(args.c, args.m, 2000);
+    testCond(s == NATS_OK);
+    test("Check no redelivered: ");
+    testCond((s == NATS_OK) && (args.redelivered == 0));
+    natsMutex_Unlock(args.m);
+
+    stanSubscription_Destroy(dur);
+    stanSubOptions_Destroy(opts);
+    stanConnection_Destroy(sc);
+
+    _destroyDefaultThreadArgs(&args);
+
+    _stopServer(pid);
+}
+
+static void
+_stanCheckRecvStanMsg(stanConnection *sc, stanSubscription *sub, const char *channel,
+        stanMsg *msg, void *closure)
+{
+    struct threadArg *args = (struct threadArg*) closure;
+
+    natsMutex_Lock(args->m);
+    if (strcmp(channel, args->channel) != 0)
+        args->status = NATS_ERR;
+    if ((args->status == NATS_OK) && (strncmp(args->string, (char*) stanMsg_GetData(msg), strlen(args->string)) != 0))
+        args->status = NATS_ERR;
+    if ((args->status == NATS_OK) && (stanMsg_GetDataLength(msg) != 5))
+        args->status = NATS_ERR;
+    if ((args->status == NATS_OK) && (stanMsg_GetSequence(msg) == 0))
+        args->status = NATS_ERR;
+    if ((args->status == NATS_OK) && (stanMsg_GetTimestamp(msg) == 0))
+        args->status = NATS_ERR;
+    stanMsg_Destroy(msg);
+    args->done = true;
+    natsCondition_Signal(args->c);
+    natsMutex_Unlock(args->m);
+}
+
+static void
+test_StanCheckReceivedvMsg(void)
+{
+    natsStatus          s;
+    stanConnection      *sc = NULL;
+    stanSubscription    *sub = NULL;
+    natsPid             pid = NATS_INVALID_PID;
+    struct threadArg    args;
+
+    s = _createDefaultThreadArgsForCbTests(&args);
+    if (s != NATS_OK)
+        FAIL("Error setting up test");
+    args.channel = "foo";
+    args.string = "hello";
+
+    pid = _startStreamingServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    s = stanConnection_Connect(&sc, clusterName, clientName, NULL);
+    if (s != NATS_OK)
+    {
+        _stopServer(pid);
+        FAIL("Unable to create connection for this test");
+    }
+
+    test("Create sub: ");
+    s = stanConnection_Subscribe(&sub, sc, "foo", _stanCheckRecvStanMsg, (void*) &args, NULL);
+    testCond(s == NATS_OK);
+
+    test("Send a message: ");
+    s = stanConnection_Publish(sc, "foo", (const void*) "hello", 5);
+    testCond(s == NATS_OK);
+
+    test("Check message received: ");
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && !args.done)
+        s = natsCondition_TimedWait(args.c, args.m, 2000);
+    s = args.status;
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_OK);
+
+    stanSubscription_Destroy(sub);
+    stanConnection_Destroy(sc);
+
+    _destroyDefaultThreadArgs(&args);
+
+    _stopServer(pid);
+}
+
+static void
+_stanManualAck(stanConnection *sc, stanSubscription *sub, const char *channel,
+               stanMsg *msg, void *closure)
+{
+    struct threadArg *args = (struct threadArg*) closure;
+    natsStatus s;
+
+    natsMutex_Lock(args->m);
+    // control 1 means auto-ack, so expect ack to fail
+    s = stanSubscription_AckMsg(sub, msg);
+    args->status = NATS_OK;
+    if ((args->control == 1) &&
+            (s != NATS_ERR) &&
+            (strstr(nats_GetLastError(NULL), STAN_ERR_MANUAL_ACK) == NULL))
+    {
+        args->status = NATS_ERR;
+    }
+    else if ((args->control == 2) && (s != NATS_OK))
+    {
+        args->status = NATS_ERR;
+    }
+    args->sum++;
+    natsCondition_Signal(args->c);
+    stanMsg_Destroy(msg);
+    natsMutex_Unlock(args->m);
+}
+
+static void
+_stanGetMsg(stanConnection *sc, stanSubscription *sub, const char *channel,
+            stanMsg *msg, void *closure)
+{
+    struct threadArg *args = (struct threadArg*) closure;
+
+    natsMutex_Lock(args->m);
+    args->sMsg = msg;
+    args->msgReceived = true;
+    natsCondition_Signal(args->c);
+    natsMutex_Unlock(args->m);
+}
+
+static void
+test_StanSubscriptionAckMsg(void)
+{
+    natsStatus          s;
+    stanConnection      *sc = NULL;
+    stanSubscription    *sub = NULL;
+    stanSubscription    *sub2 = NULL;
+    natsPid             pid = NATS_INVALID_PID;
+    stanSubOptions      *opts = NULL;
+    struct threadArg    args;
+
+    s = _createDefaultThreadArgsForCbTests(&args);
+    IFOK(s, stanSubOptions_Create(&opts));
+    IFOK(s, stanSubOptions_SetManualAckMode(opts, true));
+    if (s != NATS_OK)
+        FAIL("Error setting up test");
+
+    pid = _startStreamingServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    s = stanConnection_Connect(&sc, clusterName, clientName, NULL);
+    if (s != NATS_OK)
+    {
+        _stopServer(pid);
+        FAIL("Unable to create connection for this test");
+    }
+
+    test("Create sub with auto-ack: ");
+    args.control = 1;
+    s = stanConnection_Subscribe(&sub, sc, "foo", _stanManualAck, (void*) &args, NULL);
+    testCond(s == NATS_OK);
+
+    test("Publish message: ");
+    s = stanConnection_Publish(sc, "foo", (const void*) "hello", 5);
+    testCond(s == NATS_OK);
+
+    test("Check manual ack fails: ");
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && (args.sum != 1))
+        s = natsCondition_TimedWait(args.c, args.m, 2000);
+    if (s == NATS_OK)
+        s = args.status;
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_OK);
+
+    stanSubscription_Destroy(sub);
+    sub = NULL;
+
+    natsMutex_Lock(args.m);
+    args.control = 2;
+    args.sum     = 0;
+    natsMutex_Unlock(args.m);
+
+    test("Create sub with manual ack: ");
+    s = stanConnection_Subscribe(&sub, sc, "foo", _stanManualAck, (void*) &args, opts);
+    testCond(s == NATS_OK);
+
+    test("Publish message: ");
+    s = stanConnection_Publish(sc, "foo", (const void*) "hello", 5);
+    testCond(s == NATS_OK);
+
+    test("Check manual ack ok: ");
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && (args.sum != 1))
+        s = natsCondition_TimedWait(args.c, args.m, 2000);
+    if (s == NATS_OK)
+        s = args.status;
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_OK);
+
+    stanSubscription_Destroy(sub);
+    sub = NULL;
+
+    test("Create sub and get message: ");
+    s = stanConnection_Subscribe(&sub, sc, "foo", _stanGetMsg, (void*) &args, NULL);
+    IFOK(s, stanConnection_Publish(sc, "foo", (const void*) "hello", 5));
+    if (s == NATS_OK)
+    {
+        natsMutex_Lock(args.m);
+        while ((s != NATS_TIMEOUT) && !args.msgReceived)
+            s = natsCondition_TimedWait(args.c, args.m, 2000);
+        natsMutex_Unlock(args.m);
+    }
+    testCond(s == NATS_OK)
+
+    test("Create sub with manual ack: ");
+    s = stanConnection_Subscribe(&sub2, sc, "foo", _dummyStanMsgHandler, NULL, opts);
+    testCond(s == NATS_OK);
+
+    test("NULL Sub should fail: ");
+    s = stanSubscription_AckMsg(NULL, args.sMsg);
+    testCond(s == NATS_INVALID_ARG);
+
+    test("NULL Msg should fail: ");
+    s = stanSubscription_AckMsg(sub2, NULL);
+    testCond(s == NATS_INVALID_ARG);
+
+    test("Sub acking not own message fails: ");
+    s = stanSubscription_AckMsg(sub2, args.sMsg);
+    testCond((s == NATS_ILLEGAL_STATE)
+                && (nats_GetLastError(NULL) != NULL)
+                && (strstr(nats_GetLastError(NULL), STAN_ERR_SUB_NOT_OWNER) != NULL));
+
+    natsMutex_Lock(args.m);
+    if (args.sMsg != NULL)
+        stanMsg_Destroy(args.sMsg);
+    natsMutex_Unlock(args.m);
+
+    stanSubscription_Destroy(sub);
+    stanSubscription_Destroy(sub2);
+    stanConnection_Destroy(sc);
+    stanSubOptions_Destroy(opts);
+
+    _destroyDefaultThreadArgs(&args);
+
+    _stopServer(pid);
+}
+
+static void
+test_StanPings(void)
+{
+    natsStatus          s;
+    natsPid             pid = NATS_INVALID_PID;
+    stanConnection      *sc = NULL;
+    stanConnOptions     *opts = NULL;
+    natsConnection      *nc = NULL;
+    natsSubscription    *psub = NULL;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s == NATS_OK)
+    {
+        testAllowMillisecInPings = true;
+        s = stanConnOptions_Create(&opts);
+    }
+    IFOK(s, stanConnOptions_SetPings(opts, -50, 5));
+    if (s == NATS_OK)
+    {
+        arg.string = STAN_ERR_MAX_PINGS;
+        s = stanConnOptions_SetConnectionLostHandler(opts, _stanConnLostCB, (void*) &arg);
+    }
+    if (s != NATS_OK)
+    {
+        _destroyDefaultThreadArgs(&arg);
+        stanConnOptions_Destroy(opts);
+        testAllowMillisecInPings = false;
+        FAIL("Unable to setup test");
+    }
+
+    pid = _startStreamingServer("nats://127.0.0.1:4222", NULL, true);
+    if (pid == NATS_INVALID_PID)
+    {
+        testAllowMillisecInPings = false;
+        FAIL("Unable to start server");
+    }
+
+    // Create NATS Subscription on pings subject and count the
+    // outgoing pings.
+    test("Pings are sent: ");
+    s = natsConnection_ConnectTo(&nc, "nats://127.0.0.1:4222");
+    // Use _recvTestString with control == 3 to increment sum up to 10
+    if (s == NATS_OK)
+    {
+        char psubject[256];
+
+        snprintf(psubject, sizeof(psubject), "%s.%s.pings", STAN_CONN_OPTS_DEFAULT_DISCOVERY_PREFIX, clusterName);
+        arg.control = 3;
+        s = natsConnection_Subscribe(&psub, nc, psubject, _recvTestString, (void*) &arg);
+    }
+
+    // Connect to Stan
+    IFOK(s, stanConnection_Connect(&sc, clusterName, clientName, opts));
+
+    // We should start receiving PINGs
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && (arg.sum < 10))
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    if ((s == NATS_OK) && (arg.sum < 10))
+        s = NATS_ERR;
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    natsSubscription_Destroy(psub);
+    natsConnection_Destroy(nc);
+
+    test("Connection lost handler invoked: ");
+    _stopServer(pid);
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.closed)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    IFOK(s, arg.status);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    test("Connection closed: ");
+    natsMutex_Lock(sc->mu);
+    s = (sc->closed ? NATS_OK : NATS_ERR);
+    natsMutex_Unlock(sc->mu);
+    testCond(s == NATS_OK);
+
+    stanConnClose(sc, false);
+    stanConnection_Destroy(sc);
+    stanConnOptions_Destroy(opts);
+    testAllowMillisecInPings = false;
+
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+test_StanPingsNoResponder(void)
+{
+    natsStatus          s;
+    natsPid             nPid = NATS_INVALID_PID;
+    natsPid             sPid = NATS_INVALID_PID;
+    stanConnection      *sc = NULL;
+    stanConnOptions     *opts = NULL;
+    struct threadArg    arg;
+
+    nPid = _startServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(nPid);
+
+    sPid = _startStreamingServer("nats://127.0.0.1:4222", "-ns nats://127.0.0.1:4222", true);
+    CHECK_SERVER_STARTED(sPid);
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s == NATS_OK)
+    {
+        testAllowMillisecInPings = true;
+        s = stanConnOptions_Create(&opts);
+    }
+    IFOK(s, stanConnOptions_SetPings(opts, -50, 5));
+    IFOK(s, stanConnOptions_SetConnectionLostHandler(opts, _stanConnLostCB, (void*) &arg));
+    if (s != NATS_OK)
+    {
+        _destroyDefaultThreadArgs(&arg);
+        stanConnOptions_Destroy(opts);
+        testAllowMillisecInPings = false;
+        FAIL("Unable to setup test");
+    }
+
+    // Connect to Stan
+    test("Connects ok: ")
+    s = stanConnection_Connect(&sc, clusterName, clientName, opts);
+    testCond(s == NATS_OK);
+
+    // Shutdown the streaming server, but not NATS Server
+    _stopServer(sPid);
+
+    // We should get the connection lost callback invoked.
+    test("Connection lost: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.closed)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    stanConnection_Destroy(sc);
+    stanConnOptions_Destroy(opts);
+    testAllowMillisecInPings = false;
+
+    _stopServer(nPid);
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+test_StanConnectionLostHandlerNotSet(void)
+{
+    natsStatus          s;
+    natsPid             pid = NATS_INVALID_PID;
+    stanConnection      *sc = NULL;
+    stanConnOptions     *opts = NULL;
+    natsOptions         *nOpts = NULL;
+    struct threadArg    arg;
+
+    testAllowMillisecInPings = true;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    IFOK(s, natsOptions_Create(&nOpts));
+    IFOK(s, natsOptions_SetClosedCB(nOpts, _closedCb, (void*)&arg));
+    IFOK(s, stanConnOptions_Create(&opts));
+    IFOK(s, stanConnOptions_SetNATSOptions(opts, nOpts));
+    IFOK(s, stanConnOptions_SetPings(opts, -50, 5));
+    if (s != NATS_OK)
+    {
+        _destroyDefaultThreadArgs(&arg);
+        stanConnOptions_Destroy(opts);
+        testAllowMillisecInPings = false;
+        FAIL("Unable to setup test");
+    }
+
+    pid = _startStreamingServer("nats://127.0.0.1:4222", NULL, true);
+    if (pid == NATS_INVALID_PID)
+    {
+        testAllowMillisecInPings = false;
+        FAIL("Unable to start server");
+    }
+
+    test("Connect: ");
+    s = stanConnection_Connect(&sc, clusterName, clientName, opts);
+    testCond(s == NATS_OK);
+
+    // Stop server and wait for closed notification
+    _stopServer(pid);
+
+    test("Connection closed: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.closed)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    test("Connection closed: ");
+    natsMutex_Lock(sc->mu);
+    s = (sc->closed ? NATS_OK : NATS_ERR);
+    natsMutex_Unlock(sc->mu);
+    testCond(s == NATS_OK);
+
+    stanConnClose(sc, false);
+    stanConnection_Destroy(sc);
+    stanConnOptions_Destroy(opts);
+    natsOptions_Destroy(nOpts);
+    testAllowMillisecInPings = false;
+
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+test_StanPingsUnblockPubCalls(void)
+{
+    natsStatus          s;
+    natsPid             pid = NATS_INVALID_PID;
+    stanConnection      *sc = NULL;
+    stanConnOptions     *opts = NULL;
+    natsThread          *t    = NULL;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s == NATS_OK)
+    {
+        testAllowMillisecInPings = true;
+        s = stanConnOptions_Create(&opts);
+    }
+    IFOK(s, stanConnOptions_SetMaxPubAcksInflight(opts, 1, 1.0));
+    IFOK(s, stanConnOptions_SetPings(opts, -100, 5));
+    if (s == NATS_OK)
+    {
+        arg.string = STAN_ERR_MAX_PINGS;
+        s = stanConnOptions_SetConnectionLostHandler(opts, _stanConnLostCB, (void*) &arg);
+    }
+    if (s != NATS_OK)
+    {
+        _destroyDefaultThreadArgs(&arg);
+        stanConnOptions_Destroy(opts);
+        testAllowMillisecInPings = false;
+        FAIL("Unable to setup test");
+    }
+
+    pid = _startStreamingServer("nats://127.0.0.1:4222", NULL, true);
+    if (pid == NATS_INVALID_PID)
+    {
+        testAllowMillisecInPings = false;
+        FAIL("Unable to start server");
+    }
+
+    test("Connect: ");
+    s = stanConnection_Connect(&sc, clusterName, clientName, opts);
+    testCond(s == NATS_OK);
+
+    _stopServer(pid);
+
+    natsThread_Create(&t, _stanPublishAsyncThread, (void*) &arg);
+
+    test("Sync publish released: ");
+    s = stanConnection_Publish(sc, "foo", (const void*)"hello", 5);
+    testCond(s != NATS_OK);
+    nats_clearLastError();
+    s = NATS_OK;
+
+    test("Async publish released: ");
+    if (t != NULL)
+    {
+        natsThread_Join(t);
+        natsThread_Destroy(t);
+    }
+    testCond(s == NATS_OK);
+
+    test("Connection lost handler invoked: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.closed)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    IFOK(s, arg.status);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    test("Connection closed: ");
+    natsMutex_Lock(sc->mu);
+    s = (sc->closed ? NATS_OK : NATS_ERR);
+    natsMutex_Unlock(sc->mu);
+    testCond(s == NATS_OK);
+
+    stanConnClose(sc, false);
+    stanConnection_Destroy(sc);
+
+    stanConnOptions_Destroy(opts);
+    testAllowMillisecInPings = false;
+
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+test_StanGetNATSConnection(void)
+{
+    natsStatus          s;
+    natsPid             pid     = NATS_INVALID_PID;
+    stanConnection      *sc     = NULL;
+    stanSubscription    *ssub   = NULL;
+    natsConnection      *nc     = NULL;
+    natsConnection      *nc2    = NULL;
+    natsSubscription    *nsub   = NULL;
+    struct threadArg    args;
+
+    s = _createDefaultThreadArgsForCbTests(&args);
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    pid = _startStreamingServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    test("Connect: ");
+    s = stanConnection_Connect(&sc, clusterName, clientName, NULL);
+    testCond(s == NATS_OK);
+
+    test("Create sub: ");
+    s = stanConnection_Subscribe(&ssub, sc, "foo", _stanMsgHandlerBumpSum, (void*) &args, NULL);
+    testCond(s == NATS_OK);
+
+    test("Get NATS Connection: ");
+    s = stanConnection_GetNATSConnection(sc, &nc);
+    testCond((s == NATS_OK) && (nc != NULL));
+
+    test("Create sub & pub with NATS OK: ");
+    s = natsConnection_Subscribe(&nsub, nc, "foo", _dummyMsgHandler, NULL);
+    IFOK(s, natsConnection_PublishString(nc, "foo", "hello"));
+    testCond(s == NATS_OK);
+
+    test("Invalid to drain: ");
+    s = natsConnection_Drain(nc);
+    if (s == NATS_ILLEGAL_STATE)
+        s = natsConnection_DrainTimeout(nc, 1000);
+    if ((s == NATS_ILLEGAL_STATE)
+            && (nats_GetLastError(NULL) != NULL)
+            && (strstr(nats_GetLastError(NULL), "owned") != NULL))
+    {
+        s = NATS_OK;
+        nats_clearLastError();
+    }
+    testCond(s == NATS_OK);
+
+    test("Closing NATS Conn has no effect: ");
+    natsConnection_Close(nc);
+    s = stanConnection_Publish(sc, "foo", (const void*)"hello", 5);
+    testCond(s == NATS_OK);
+
+    test("Destroying NATS Conn has no effect: ");
+    natsConnection_Destroy(nc);
+    s = stanConnection_Publish(sc, "foo", (const void*)"hello", 5);
+    testCond(s == NATS_OK);
+
+    test("Calling release more than get does not crash: ");
+    stanConnection_ReleaseNATSConnection(sc);
+    stanConnection_ReleaseNATSConnection(sc);
+    s = stanConnection_Publish(sc, "foo", (const void*)"hello", 5);
+    testCond(s == NATS_OK);
+
+    test("Should have received 3 messages: ");
+    natsMutex_Lock(args.m);
+    while ((s != NATS_TIMEOUT) && (args.sum != 3))
+        s = natsCondition_TimedWait(args.c, args.m, 2000);
+    natsMutex_Unlock(args.m);
+    testCond(s == NATS_OK);
+
+    nc2 = NULL;
+    test("Invalid arg (sc == NULL): ");
+    s = stanConnection_GetNATSConnection(NULL, &nc2);
+    testCond((s == NATS_INVALID_ARG) && (nc2 == NULL));
+    nats_clearLastError();
+
+    test("Invalid arg (nc == NULL): ");
+    s = stanConnection_GetNATSConnection(sc, NULL);
+    testCond((s == NATS_INVALID_ARG) && (nc2 == NULL));
+    nats_clearLastError();
+
+    test("GetNATSConnection on closed connection fails: ");
+    s = stanConnection_Close(sc);
+    IFOK(s, stanConnection_GetNATSConnection(sc, &nc2));
+    testCond(s == NATS_CONNECTION_CLOSED);
+    nats_clearLastError();
+
+    natsSubscription_Destroy(nsub);
+    stanSubscription_Destroy(ssub);
+    // Valgrind will tell us if the NATS connection/STAN connection
+    // were properly released.
+    stanConnection_Destroy(sc);
+
+    _destroyDefaultThreadArgs(&args);
+
+    _stopServer(pid);
+}
+
+static void
+test_StanNoRetryOnFailedConnect(void)
+{
+    natsStatus      s;
+    natsOptions     *opts  = NULL;
+    stanConnOptions *sopts = NULL;
+    stanConnection  *sc    = NULL;
+
+    test("RetryOnFailedConnect not supported: ");
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_SetRetryOnFailedConnect(opts, true, _dummyConnHandler, (void*)1));
+    IFOK(s, stanConnOptions_Create(&sopts));
+    IFOK(s, stanConnOptions_SetNATSOptions(sopts, opts));
+    IFOK(s, stanConnection_Connect(&sc, clusterName, clientName, sopts));
+    testCond(s == NATS_NO_SERVER);
+
+    natsOptions_Destroy(opts);
+    stanConnOptions_Destroy(sopts);
+}
+
+static bool
+_subDlvThreadPooled(natsSubscription *sub)
+{
+    bool pooled;
+    natsSub_Lock(sub);
+    pooled = (sub->libDlvWorker != NULL);
+    natsSub_Unlock(sub);
+    return pooled;
+}
+
+static void
+test_StanInternalSubsNotPooled(void)
+{
+    natsStatus          s;
+    natsPid             pid         = NATS_INVALID_PID;
+    natsOptions         *opts       = NULL;
+    stanConnOptions     *sopts      = NULL;
+    stanSubscription    *sub        = NULL;
+    stanConnection      *sc         = NULL;
+    natsSubscription    *hbSub      = NULL;
+    natsSubscription    *ackSub     = NULL;
+    natsSubscription    *pingSub    = NULL;
+    natsSubscription    *inboxSub   = NULL;
+
+    pid = _startStreamingServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    test("Can connet: ");
+    s = natsOptions_Create(&opts);
+    IFOK(s, natsOptions_UseGlobalMessageDelivery(opts, true));
+    IFOK(s, stanConnOptions_Create(&sopts));
+    IFOK(s, stanConnOptions_SetNATSOptions(sopts, opts));
+    IFOK(s, stanConnection_Connect(&sc, clusterName, clientName, sopts));
+    testCond(s == NATS_OK);
+
+    test("Create sub: ");
+    s = stanConnection_Subscribe(&sub, sc, "foo", _dummyStanMsgHandler, NULL, NULL);
+    testCond(s == NATS_OK);
+
+    stanConn_Lock(sc);
+    hbSub   = sc->hbSubscription;
+    ackSub  = sc->ackSubscription;
+    pingSub = sc->pingSub;
+    stanConn_Unlock(sc);
+
+    stanSub_Lock(sub);
+    inboxSub = sub->inboxSub;
+    stanSub_Unlock(sub);
+
+    test("HBSub not pooled: ");
+    testCond((s == NATS_OK) && !_subDlvThreadPooled(hbSub));
+
+    test("AckSub not pooled: ");
+    testCond((s == NATS_OK) && !_subDlvThreadPooled(ackSub));
+
+    test("PingSub not pooled: ");
+    testCond((s == NATS_OK) && !_subDlvThreadPooled(pingSub));
+
+    test("InboxSub pooled: ");
+    testCond((s == NATS_OK) && _subDlvThreadPooled(inboxSub));
+
+    natsOptions_Destroy(opts);
+    stanConnOptions_Destroy(sopts);
+    stanSubscription_Destroy(sub);
+    stanConnection_Destroy(sc);
+
+    if (valgrind)
+        nats_Sleep(900);
+
+    _stopServer(pid);
+}
+
+static void
+_stanSubOnComplete(void *closure)
+{
+    struct threadArg    *arg = (struct threadArg*) closure;
+
+    natsMutex_Lock(arg->m);
+    if (arg->control == 1)
+    {
+        arg->done = true;
+        natsCondition_Signal(arg->c);
+    }
+    natsMutex_Unlock(arg->m);
+}
+
+static void
+_stanSubOnCompleteMsgCB(stanConnection *sc, stanSubscription *sub, const char *channel,
+    stanMsg *msg, void* closure)
+{
+    struct threadArg    *arg = (struct threadArg*) closure;
+
+    natsMutex_Lock(arg->m);
+    arg->msgReceived = true;
+    natsCondition_Signal(arg->c);
+    natsMutex_Unlock(arg->m);
+    // Sleep to simulate callbac doing some processing and let the
+    // main thread close the subscription.
+    nats_Sleep(500);
+    // Update a field that _stanSubOnComplete will ensure is set to
+    // prove that the onComplete is invoked after the msg callback
+    // has returned.
+    natsMutex_Lock(arg->m);
+    arg->control = 1;
+    natsMutex_Unlock(arg->m);
+
+    stanMsg_Destroy(msg);
+}
+
+static void
+test_StanSubOnComplete(void)
+{
+    natsStatus          s;
+    natsPid             pid         = NATS_INVALID_PID;
+    stanConnection      *sc         = NULL;
+    stanSubscription    *sub        = NULL;
+    struct threadArg    arg;
+
+    s = _createDefaultThreadArgsForCbTests(&arg);
+    if (s != NATS_OK)
+        FAIL("Unable to setup test");
+
+    pid = _startStreamingServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    test("Can connet: ");
+    s = stanConnection_Connect(&sc, clusterName, clientName, NULL);
+    testCond(s == NATS_OK);
+
+    test("SetOnComplete error: ");
+    s = stanSubscription_SetOnCompleteCB(NULL, _stanSubOnComplete, NULL);
+    testCond(s == NATS_INVALID_ARG);
+
+    test("Create sub: ");
+    s = stanConnection_Subscribe(&sub, sc, "foo", _stanSubOnCompleteMsgCB, &arg, NULL);
+    testCond(s == NATS_OK);
+
+    test("SetOnComplete ok: ");
+    s = stanSubscription_SetOnCompleteCB(sub, _stanSubOnComplete, &arg);
+    testCond(s == NATS_OK);
+
+    test("Remove onComplete: ");
+    s = stanSubscription_SetOnCompleteCB(sub, NULL, NULL);
+    if (s == NATS_OK)
+    {
+        stanSub_Lock(sub);
+        if ((sub->onCompleteCB != NULL) || (sub->onCompleteCBClosure != NULL))
+            s = NATS_ERR;
+        stanSub_Unlock(sub);
+    }
+    testCond(s == NATS_OK);
+
+    test("SetOnComplete ok: ");
+    s = stanSubscription_SetOnCompleteCB(sub, _stanSubOnComplete, &arg);
+    testCond(s == NATS_OK);
+
+    test("Publish msg: ");
+    s = stanConnection_Publish(sc, "foo", (const void*) "hello", 5);
+    testCond(s == NATS_OK);
+
+    test("Wait for message to be received: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.msgReceived)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    test("Close subscription: ")
+    s = stanSubscription_Close(sub);
+    testCond(s == NATS_OK);
+
+    test("Ensure onComplete invoked after cb returned: ");
+    natsMutex_Lock(arg.m);
+    while ((s != NATS_TIMEOUT) && !arg.done)
+        s = natsCondition_TimedWait(arg.c, arg.m, 2000);
+    natsMutex_Unlock(arg.m);
+    testCond(s == NATS_OK);
+
+    test("SetOnComplete after close: ");
+    s = stanSubscription_SetOnCompleteCB(sub, _stanSubOnComplete, &arg);
+    testCond(s == NATS_INVALID_SUBSCRIPTION);
+
+    stanSubscription_Destroy(sub);
+    stanConnection_Destroy(sc);
+    _stopServer(pid);
+
+    _destroyDefaultThreadArgs(&arg);
+}
+
+static void
+test_StanSubTimeout(void)
+{
+    natsStatus          s;
+    natsPid             pid         = NATS_INVALID_PID;
+    stanConnection      *sc         = NULL;
+    stanSubscription    *sub        = NULL;
+    natsConnection      *nc         = NULL;
+    natsSubscription    *ncSub      = NULL;
+    const char          *closeSubj  = NULL;
+    natsMsg             *resp       = NULL;
+    int                 i           = 0;
+    Pb__SubscriptionRequest *r      = NULL;
+
+    pid = _startStreamingServer("nats://127.0.0.1:4222", NULL, true);
+    CHECK_SERVER_STARTED(pid);
+
+    test("Can connect: ");
+    s = stanConnection_Connect(&sc, clusterName, clientName, NULL);
+    testCond(s == NATS_OK);
+
+    test("Get NATS subscription: ");
+    s = stanConnection_GetNATSConnection(sc, &nc);
+    testCond(s == NATS_OK);
+
+    test("Setup NATS sub: ");
+    natsMutex_Lock(sc->mu);
+    closeSubj = (const char*) sc->subCloseRequests;
+    natsMutex_Unlock(sc->mu);
+    s = natsConnection_SubscribeSync(&ncSub, nc, closeSubj);
+    testCond(s == NATS_OK);
+
+    // Artificially lower the timeout to make sure it fails.
+    natsMutex_Lock(sc->mu);
+    sc->opts->connTimeout=1;
+    natsMutex_Unlock(sc->mu);
+
+    test("Subscribe should timeout: ");
+    // Try to get the timeout...
+    for (i=0;i<50;i++)
+    {
+        s = stanConnection_Subscribe(&sub, sc, "foo", _dummyStanMsgHandler, NULL, NULL);
+        if (s == NATS_TIMEOUT)
+            break;
+        stanSubscription_Destroy(sub);
+        sub = NULL;
+    }
+    // We don't want to fail the thest if we did not get a timeout.
+    testCond((s == NATS_OK) || (s == NATS_TIMEOUT));
+
+    // However, proceed with the rest of the test only if it was a timeout.
+    if (s == NATS_TIMEOUT)
+    {
+        test("Check sub close request sent: ");
+        s = natsSubscription_NextMsg(&resp, ncSub, 1000);
+        testCond((s == NATS_OK) && (resp != NULL));
+
+        test("Check request: ");
+        r = pb__subscription_request__unpack(NULL,
+                                            (size_t) natsMsg_GetDataLength(resp),
+                                            (const uint8_t*) natsMsg_GetData(resp));
+        testCond((r != NULL)
+                    && (strcmp(r->clientid, clientName) == 0)
+                    && (strcmp(r->subject, "foo") == 0)
+                    && (r->inbox != NULL));
+        if (r != NULL)
+            pb__subscription_request__free_unpacked(r, NULL);
+
+        natsMsg_Destroy(resp);
+    }
+
+    natsSubscription_Destroy(ncSub);
+    stanSubscription_Destroy(sub);
+    stanConnection_ReleaseNATSConnection(sc);
+    stanConnection_Destroy(sc);
+    _stopServer(pid);
+}
+
+#endif
+
+typedef void (*testFunc)(void);
+
+typedef struct __testInfo
+{
+    const char  *name;
+    testFunc    func;
+
+} testInfo;
+
+static testInfo allTests[] =
+{
+    // Building blocks
+    {"Version",                         test_Version},
+    {"VersionMatchesTag",               test_VersionMatchesTag},
+    {"OpenCloseAndWait",                test_OpenCloseAndWait},
+    {"natsNowAndSleep",                 test_natsNowAndSleep},
+    {"natsAllocSprintf",                test_natsAllocSprintf},
+    {"natsStrCaseStr",                  test_natsStrCaseStr},
+    {"natsSnprintf",                    test_natsSnprintf},
+    {"natsBuffer",                      test_natsBuffer},
+    {"natsParseInt64",                  test_natsParseInt64},
+    {"natsParseControl",                test_natsParseControl},
+    {"natsNormalizeErr",                test_natsNormalizeErr},
+    {"natsMutex",                       test_natsMutex},
+    {"natsThread",                      test_natsThread},
+    {"natsCondition",                   test_natsCondition},
+    {"natsTimer",                       test_natsTimer},
+    {"natsUrl",                         test_natsUrl},
+    {"natsCreateStringFromBuffer",      test_natsCreateStringFromBuffer},
+    {"natsHash",                        test_natsHash},
+    {"natsHashing",                     test_natsHashing},
+    {"natsStrHash",                     test_natsStrHash},
+    {"natsInbox",                       test_natsInbox},
+    {"natsOptions",                     test_natsOptions},
+    {"natsSock_ConnectTcp",             test_natsSock_ConnectTcp},
+    {"natsSock_ShuffleIPs",             test_natsSock_ShuffleIPs},
+    {"natsSock_IPOrder",                test_natsSock_IPOrder},
+    {"natsSock_ReadLine",               test_natsSock_ReadLine},
+    {"natsJSON",                        test_natsJSON},
+    {"natsEncodeTimeUTC",               test_natsEncodeTimeUTC},
+    {"natsErrWithLongText",             test_natsErrWithLongText},
+    {"natsErrStackMoreThanMaxFrames",   test_natsErrStackMoreThanMaxFrames},
+    {"natsMsg",                         test_natsMsg},
+    {"natsBase32",                      test_natsBase32Decode},
+    {"natsBase64",                      test_natsBase64Encode},
+    {"natsCRC16",                       test_natsCRC16},
+    {"natsKeys",                        test_natsKeys},
+    {"natsReadFile",                    test_natsReadFile},
+    {"natsGetJWTOrSeed",                test_natsGetJWTOrSeed},
+    {"natsHostIsIP",                    test_natsHostIsIP},
+    {"natsWaitReady",                   test_natsWaitReady},
+    {"natsSign",                        test_natsSign},
+    {"HeadersLift",                     test_natsMsgHeadersLift},
+    {"HeadersAPIs",                     test_natsMsgHeaderAPIs},
+    {"MsgIsJSControl",                  test_natsMsgIsJSCtrl},
+    {"SrvVersionAtLeast",               test_natsSrvVersionAtLeast},
+
+    // Package Level Tests
+
+    {"ReconnectServerStats",            test_ReconnectServerStats},
+    {"ParseStateReconnectFunctionality",test_ParseStateReconnectFunctionality},
+    {"ServersRandomize",                test_ServersRandomize},
+    {"SelectNextServer",                test_SelectNextServer},
+    {"ParserPing",                      test_ParserPing},
+    {"ParserErr",                       test_ParserErr},
+    {"ParserOK",                        test_ParserOK},
+    {"ParseINFO",                       test_ParseINFO},
+    {"ParserShouldFail",                test_ParserShouldFail},
+    {"ParserSplitMsg",                  test_ParserSplitMsg},
+    {"ProcessMsgArgs",                  test_ProcessMsgArgs},
+    {"LibMsgDelivery",                  test_LibMsgDelivery},
+    {"AsyncINFO",                       test_AsyncINFO},
+    {"RequestPool",                     test_RequestPool},
+    {"NoFlusherIfSendAsapOption",       test_NoFlusherIfSendAsap},
+    {"HeadersAndSubPendingBytes",       test_HeadersAndSubPendingBytes},
+
+    // Public API Tests
+
+    {"DefaultConnection",               test_DefaultConnection},
+    {"SimplifiedURLs",                  test_SimplifiedURLs},
+    {"IPResolutionOrder",               test_IPResolutionOrder},
+    {"UseDefaultURLIfNoServerSpecified",test_UseDefaultURLIfNoServerSpecified},
+    {"ConnectToWithMultipleURLs",       test_ConnectToWithMultipleURLs},
+    {"ConnectionWithNULLOptions",       test_ConnectionWithNullOptions},
+    {"ConnectionToWithNullURLs",        test_ConnectionToWithNullURLs},
+    {"ConnectionStatus",                test_ConnectionStatus},
+    {"ConnClosedCB",                    test_ConnClosedCB},
+    {"CloseDisconnectedCB",             test_CloseDisconnectedCB},
+    {"ServerStopDisconnectedCB",        test_ServerStopDisconnectedCB},
+    {"ClosedConnections",               test_ClosedConnections},
+    {"ConnectVerboseOption",            test_ConnectVerboseOption},
+    {"ReconnectThreadLeak",             test_ReconnectThreadLeak},
+    {"ReconnectTotalTime",              test_ReconnectTotalTime},
+    {"ReconnectDisallowedFlags",        test_ReconnectDisallowedFlags},
+    {"ReconnectAllowedFlags",           test_ReconnectAllowedFlags},
+    {"ConnCloseBreaksReconnectLoop",    test_ConnCloseBreaksReconnectLoop},
+    {"BasicReconnectFunctionality",     test_BasicReconnectFunctionality},
+    {"ExtendedReconnectFunctionality",  test_ExtendedReconnectFunctionality},
+    {"QueueSubsOnReconnect",            test_QueueSubsOnReconnect},
+    {"IsClosed",                        test_IsClosed},
+    {"IsReconnectingAndStatus",         test_IsReconnectingAndStatus},
+    {"ReconnectBufSize",                test_ReconnectBufSize},
+    {"RetryOnFailedConnect",            test_RetryOnFailedConnect},
+    {"NoPartialOnReconnect",            test_NoPartialOnReconnect},
+    {"ReconnectFailsPendingRequests",   test_ReconnectFailsPendingRequest},
+
+    {"ErrOnConnectAndDeadlock",         test_ErrOnConnectAndDeadlock},
+    {"ErrOnMaxPayloadLimit",            test_ErrOnMaxPayloadLimit},
+
+    {"Auth",                            test_Auth},
+    {"AuthFailNoDisconnectCB",          test_AuthFailNoDisconnectCB},
+    {"AuthToken",                       test_AuthToken},
+    {"AuthTokenHandler",                test_AuthTokenHandler},
+    {"PermViolation",                   test_PermViolation},
+    {"AuthViolation",                   test_AuthViolation},
+    {"AuthenticationExpired",           test_AuthenticationExpired},
+    {"AuthenticationExpiredReconnect",  test_AuthenticationExpiredReconnect},
+    {"ConnectedServer",                 test_ConnectedServer},
+    {"MultipleClose",                   test_MultipleClose},
+    {"SimplePublish",                   test_SimplePublish},
+    {"SimplePublishNoData",             test_SimplePublishNoData},
+    {"PublishMsg",                      test_PublishMsg},
+    {"InvalidSubsArgs",                 test_InvalidSubsArgs},
+    {"AsyncSubscribe",                  test_AsyncSubscribe},
+    {"AsyncSubscribeTimeout",           test_AsyncSubscribeTimeout},
+    {"SyncSubscribe",                   test_SyncSubscribe},
+    {"PubSubWithReply",                 test_PubSubWithReply},
+    {"NoResponders",                    test_NoResponders},
+    {"Flush",                           test_Flush},
+    {"ConnCloseDoesFlush",              test_ConnCloseDoesFlush},
+    {"QueueSubscriber",                 test_QueueSubscriber},
+    {"ReplyArg",                        test_ReplyArg},
+    {"SyncReplyArg",                    test_SyncReplyArg},
+    {"Unsubscribe",                     test_Unsubscribe},
+    {"DoubleUnsubscribe",               test_DoubleUnsubscribe},
+    {"SubRemovedWhileProcessingMsg",    test_SubRemovedWhileProcessingMsg},
+    {"RequestTimeout",                  test_RequestTimeout},
+    {"Request",                         test_Request},
+    {"RequestNoBody",                   test_RequestNoBody},
+    {"RequestMuxWithMappedSubject",     test_RequestMuxWithMappedSubject},
+    {"OldRequest",                      test_OldRequest},
+    {"SimultaneousRequests",            test_SimultaneousRequest},
+    {"RequestClose",                    test_RequestClose},
+    {"CustomInbox",                     test_CustomInbox},
+    {"FlushInCb",                       test_FlushInCb},
+    {"ReleaseFlush",                    test_ReleaseFlush},
+    {"FlushErrOnDisconnect",            test_FlushErrOnDisconnect},
+    {"Inbox",                           test_Inbox},
+    {"Stats",                           test_Stats},
+    {"BadSubject",                      test_BadSubject},
+    {"SubBadSubjectAndQueueNames",      test_SubBadSubjectAndQueueName},
+    {"ClientAsyncAutoUnsub",            test_ClientAsyncAutoUnsub},
+    {"ClientSyncAutoUnsub",             test_ClientSyncAutoUnsub},
+    {"ClientAutoUnsubAndReconnect",     test_ClientAutoUnsubAndReconnect},
+    {"AutoUnsubNoUnsubOnDestroy",       test_AutoUnsubNoUnsubOnDestroy},
+    {"NextMsgOnClosedSub",              test_NextMsgOnClosedSub},
+    {"CloseSubRelease",                 test_CloseSubRelease},
+    {"IsValidSubscriber",               test_IsValidSubscriber},
+    {"SlowSubscriber",                  test_SlowSubscriber},
+    {"SlowAsyncSubscriber",             test_SlowAsyncSubscriber},
+    {"SlowConsumerCb",                  test_SlowConsumerCB},
+    {"PendingLimitsDeliveredAndDropped",test_PendingLimitsDeliveredAndDropped},
+    {"PendingLimitsWithSyncSub",        test_PendingLimitsWithSyncSub},
+    {"AsyncSubscriptionPending",        test_AsyncSubscriptionPending},
+    {"AsyncSubscriptionPendingDrain",   test_AsyncSubscriptionPendingDrain},
+    {"SyncSubscriptionPending",         test_SyncSubscriptionPending},
+    {"SyncSubscriptionPendingDrain",    test_SyncSubscriptionPendingDrain},
+    {"AsyncErrHandler",                 test_AsyncErrHandler},
+    {"AsyncSubscriberStarvation",       test_AsyncSubscriberStarvation},
+    {"AsyncSubscriberOnClose",          test_AsyncSubscriberOnClose},
+    {"NextMsgCallOnAsyncSub",           test_NextMsgCallOnAsyncSub},
+    {"SubOnComplete",                   test_SubOnComplete},
+    {"GetLastError",                    test_GetLastError},
+    {"StaleConnection",                 test_StaleConnection},
+    {"ServerErrorClosesConnection",     test_ServerErrorClosesConnection},
+    {"NoEcho",                          test_NoEcho},
+    {"NoEchoOldServer",                 test_NoEchoOldServer},
+    {"DrainSub",                        test_DrainSub},
+    {"DrainSubStops",                   test_DrainSubStops},
+    {"DrainSubRaceOnAutoUnsub",         test_DrainSubRaceOnAutoUnsub},
+    {"DrainSubNotResentOnReconnect",    test_DrainSubNotResentOnReconnect},
+    {"DrainConn",                       test_DrainConn},
+    {"NoDoubleCloseCbOnDrain",          test_NoDoubleConnClosedOnDrain},
+    {"GetClientID",                     test_GetClientID},
+    {"GetClientIP",                     test_GetClientIP},
+    {"GetRTT",                          test_GetRTT},
+    {"GetLocalIPAndPort",               test_GetLocalIPAndPort},
+    {"UserCredsCallbacks",              test_UserCredsCallbacks},
+    {"UserCredsFromFiles",              test_UserCredsFromFiles},
+    {"NKey",                            test_NKey},
+    {"NKeyFromSeed",                    test_NKeyFromSeed},
+    {"ConnSign",                        test_ConnSign},
+    {"WriteDeadline",                   test_WriteDeadline},
+    {"HeadersNotSupported",             test_HeadersNotSupported},
+    {"HeadersBasic",                    test_HeadersBasic},
+    {"MsgsFilter",                      test_natsMsgsFilter},
+    {"EventLoop",                       test_EventLoop},
+    {"EventLoopRetryOnFailedConnect",   test_EventLoopRetryOnFailedConnect},
+    {"EventLoopTLS",                    test_EventLoopTLS},
+    {"SSLBasic",                        test_SSLBasic},
+    {"SSLVerify",                       test_SSLVerify},
+    {"SSLCAFromMemory",                 test_SSLLoadCAFromMemory},
+    {"SSLCertAndKeyFromMemory",         test_SSLCertAndKeyFromMemory},
+    {"SSLVerifyHostname",               test_SSLVerifyHostname},
+    {"SSLSkipServerVerification",       test_SSLSkipServerVerification},
+    {"SSLCiphers",                      test_SSLCiphers},
+    {"SSLMultithreads",                 test_SSLMultithreads},
+    {"SSLConnectVerboseOption",         test_SSLConnectVerboseOption},
+    {"SSLSocketLeakEventLoop",          test_SSLSocketLeakWithEventLoop},
+    {"SSLReconnectWithAuthError",       test_SSLReconnectWithAuthError},
+
+    // Clusters Tests
+
+    {"ServersOption",                   test_ServersOption},
+    {"AuthServers",                     test_AuthServers},
+    {"AuthFailToReconnect",             test_AuthFailToReconnect},
+    {"ReconnectWithTokenHandler",       test_ReconnectWithTokenHandler},
+    {"BasicClusterReconnect",           test_BasicClusterReconnect},
+    {"HotSpotReconnect",                test_HotSpotReconnect},
+    {"ProperReconnectDelay",            test_ProperReconnectDelay},
+    {"ProperFalloutAfterMaxAttempts",   test_ProperFalloutAfterMaxAttempts},
+    {"StopReconnectAfterTwoAuthErr",    test_StopReconnectAfterTwoAuthErr},
+    {"TimeoutOnNoServer",               test_TimeoutOnNoServer},
+    {"PingReconnect",                   test_PingReconnect},
+    {"GetServers",                      test_GetServers},
+    {"GetDiscoveredServers",            test_GetDiscoveredServers},
+    {"DiscoveredServersCb",             test_DiscoveredServersCb},
+    {"IgnoreDiscoveredServers",         test_IgnoreDiscoveredServers},
+    {"INFOAfterFirstPONGisProcessedOK", test_ReceiveINFORightAfterFirstPONG},
+    {"ServerPoolUpdatedOnClusterUpdate",test_ServerPoolUpdatedOnClusterUpdate},
+    {"ReconnectJitter",                 test_ReconnectJitter},
+    {"CustomReconnectDelay",            test_CustomReconnectDelay},
+    {"LameDuckMode",                    test_LameDuckMode},
+    {"ReconnectImplicitUserInfo",       test_ReconnectImplicitUserInfo},
+
+    {"JetStreamUnmarshalAccInfo",       test_JetStreamUnmarshalAccountInfo},
+    {"JetStreamUnmarshalStreamState",   test_JetStreamUnmarshalStreamState},
+    {"JetStreamUnmarshalStreamCfg",     test_JetStreamUnmarshalStreamConfig},
+    {"JetStreamUnmarshalStreamInfo",    test_JetStreamUnmarshalStreamInfo},
+    {"JetStreamMarshalStreamCfg",       test_JetStreamMarshalStreamConfig},
+    {"JetStreamUnmarshalConsumerInfo",  test_JetStreamUnmarshalConsumerInfo},
+    {"JetStreamContext",                test_JetStreamContext},
+    {"JetStreamDomain",                 test_JetStreamContextDomain},
+    {"JetStreamMgtStreams",             test_JetStreamMgtStreams},
+    {"JetStreamMgtConsumers",           test_JetStreamMgtConsumers},
+    {"JetStreamPublish",                test_JetStreamPublish},
+    {"JetStreamPublishAsync",           test_JetStreamPublishAsync},
+    {"JetStreamPublishAckHandler",      test_JetStreamPublishAckHandler},
+    {"JetStreamSubscribe",              test_JetStreamSubscribe},
+    {"JetStreamSubscribeSync",          test_JetStreamSubscribeSync},
+    {"JetStreamSubscribeConfigCheck",   test_JetStreamSubscribeConfigCheck},
+    {"JetStreamSubscribeIdleHeartbeat", test_JetStreamSubscribeIdleHearbeat},
+    {"JetStreamSubscribeFlowControl",   test_JetStreamSubscribeFlowControl},
+    {"JetStreamSubscribePull",          test_JetStreamSubscribePull},
+    {"JetStreamSubscribeHeadersOnly",   test_JetStreamSubscribeHeadersOnly},
+    {"JetStreamOrderedCons",            test_JetStreamOrderedConsumer},
+    {"JetStreamOrderedConsWithErrors",  test_JetStreamOrderedConsumerWithErrors},
+    {"JetStreamOrderedConsAutoUnsub",   test_JetStreamOrderedConsumerWithAutoUnsub},
+    {"JetStreamOrderedConsSrvRestart",  test_JetStreamOrderedConsSrvRestart},
+    {"JetStreamSubscribeWithFWC",       test_JetStreamSubscribeWithFWC},
+    {"JetStreamStreamsSealAndRollup",   test_JetStreamStreamsSealAndRollup},
+    {"JetStreamGetMsgAndLastMsg",       test_JetStreamGetMsgAndLastMsg},
+    {"JetStreamConvertDirectMsg",       test_JetStreamConvertDirectMsg},
+    {"JetStreamDirectGetMsg",           test_JetStreamDirectGetMsg},
+    {"JetStreamNakWithDelay",           test_JetStreamNakWithDelay},
+    {"JetStreamBackOffRedeliveries",    test_JetStreamBackOffRedeliveries},
+    {"JetStreamInfoWithSubjects",       test_JetStreamInfoWithSubjects},
+
+    {"KeyValueManager",                 test_KeyValueManager},
+    {"KeyValueBasics",                  test_KeyValueBasics},
+    {"KeyValueWatch",                   test_KeyValueWatch},
+    {"KeyValueHistory",                 test_KeyValueHistory},
+    {"KeyValueKeys",                    test_KeyValueKeys},
+    {"KeyValueDeleteVsPurge",           test_KeyValueDeleteVsPurge},
+    {"KeyValueDeleteTombstones",        test_KeyValueDeleteTombstones},
+    {"KeyValueDeleteMarkerThreshold",   test_KeyValuePurgeDeletesMarkerThreshold},
+    {"KeyValueCrossAccount",            test_KeyValueCrossAccount},
+    {"KeyValueDiscardOldToNew",         test_KeyValueDiscardOldToNew},
+    {"KeyValueRePublish",               test_KeyValueRePublish},
+    {"KeyValueMirrorDirectGet",         test_KeyValueMirrorDirectGet},
+
+#if defined(NATS_HAS_STREAMING)
+    {"StanPBufAllocator",               test_StanPBufAllocator},
+    {"StanConnOptions",                 test_StanConnOptions},
+    {"StanSubOptions",                  test_StanSubOptions},
+    {"StanMsg",                         test_StanMsg},
+    {"StanServerNotReachable",          test_StanServerNotReachable},
+    {"StanBasicConnect",                test_StanBasicConnect},
+    {"StanConnectError",                test_StanConnectError},
+    {"StanBasicPublish",                test_StanBasicPublish},
+    {"StanBasicPublishAsync",           test_StanBasicPublishAsync},
+    {"StanPublishTimeout",              test_StanPublishTimeout},
+    {"StanPublishMaxAcksInflight",      test_StanPublishMaxAcksInflight},
+    {"StanBasicSubscription",           test_StanBasicSubscription},
+    {"StanSubscriptionCloseAndUnsub",   test_StanSubscriptionCloseAndUnsubscribe},
+    {"StanDurableSubscription",         test_StanDurableSubscription},
+    {"StanBasicQueueSubscription",      test_StanBasicQueueSubscription},
+    {"StanDurableQueueSubscription",    test_StanDurableQueueSubscription},
+    {"StanCheckReceivedMsg",            test_StanCheckReceivedvMsg},
+    {"StanSubscriptionAckMsg",          test_StanSubscriptionAckMsg},
+    {"StanPings",                       test_StanPings},
+    {"StanPingsNoResponder",            test_StanPingsNoResponder},
+    {"StanConnectionLostHandlerNotSet", test_StanConnectionLostHandlerNotSet},
+    {"StanPingsUnblockPublishCalls",    test_StanPingsUnblockPubCalls},
+    {"StanGetNATSConnection",           test_StanGetNATSConnection},
+    {"StanNoRetryOnFailedConnect",      test_StanNoRetryOnFailedConnect},
+    {"StanInternalSubsNotPooled",       test_StanInternalSubsNotPooled},
+    {"StanSubOnComplete",               test_StanSubOnComplete},
+    {"StanSubTimeout",                  test_StanSubTimeout},
+
+#endif
+
+};
+
+static int  maxTests = (int) (sizeof(allTests)/sizeof(testInfo));
+
+static void
+generateList(void)
+{
+    FILE    *list = fopen("list.txt", "w");
+    int     i;
+
+    if (list == NULL)
+    {
+        printf("@@ Unable to create file 'list.txt': %d\n", errno);
+        return;
+    }
+
+    printf("Number of tests: %d\n", maxTests);
+
+    for (i=0; i<maxTests; i++)
+        fprintf(list, "%s\n", allTests[i].name);
+
+    fflush(list);
+    fclose(list);
+}
+
+int main(int argc, char **argv)
+{
+    const char *envStr;
+    int testStart   = 0;
+    int testEnd     = 0;
+    int i;
+
+    if (argc == 1)
+    {
+        generateList();
+        return 0;
+    }
+
+    if (argc == 3)
+    {
+        testStart = atoi(argv[1]);
+        testEnd   = atoi(argv[2]);
+    }
+
+    if ((argc != 3)
+        || (testStart < 0) || (testStart >= maxTests)
+        || (testEnd < 0) || (testEnd >= maxTests)
+        || (testStart > testEnd))
+    {
+        printf("@@ Usage: %s [start] [end] (0 .. %d)\n", argv[0], (maxTests - 1));
+        return 1;
+    }
+
+    envStr = getenv("NATS_TEST_TRAVIS");
+    if ((envStr != NULL) && (envStr[0] != '\0'))
+        runOnTravis = true;
+
+    envStr = getenv("NATS_TEST_VALGRIND");
+    if ((envStr != NULL) && (envStr[0] != '\0'))
+    {
+        valgrind = true;
+        printf("Test running in VALGRIND mode.\n");
+    }
+
+    envStr = getenv("NATS_TEST_KEEP_SERVER_OUTPUT");
+    if ((envStr != NULL) && (envStr[0] != '\0'))
+    {
+        keepServerOutput = true;
+        printf("Test prints server's output.\n");
+    }
+
+    envStr = getenv("NATS_TEST_SERVER_EXE");
+    if ((envStr != NULL) && (envStr[0] != '\0'))
+    {
+        natsServerExe = envStr;
+        printf("Test using server executable: %s\n", natsServerExe);
+    }
+
+    envStr = getenv("NATS_TEST_STREAMING_SERVER_EXE");
+    if ((envStr != NULL) && (envStr[0] != '\0'))
+    {
+        natsStreamingServerExe = envStr;
+        printf("Test using server executable: %s\n", natsStreamingServerExe);
+    }
+
+    envStr = getenv("NATS_TEST_SERVER_VERSION");
+    if ((envStr != NULL) && (envStr[0] != '\0'))
+    {
+        serverVersion = envStr;
+        printf("Test server version: %s\n", serverVersion);
+    }
+
+    if (nats_Open(-1) != NATS_OK)
+    {
+        printf("@@ Unable to run tests: unable to initialize the library!\n");
+        return 1;
+    }
+
+    if (natsMutex_Create(&slMu) != NATS_OK)
+    {
+        printf("@@ Unable to create lock for servers map\n");
+        return 1;
+    }
+    if (natsHash_Create(&slMap, 4) != NATS_OK)
+    {
+        natsMutex_Destroy(slMu);
+        printf("@@ Unable to create lock for servers map\n");
+        return 1;
+    }
+
+    // Execute tests
+    for (i=testStart; (i<=testEnd) && !failed; i++)
+    {
+#ifdef _WIN32
+        printf("\n== %s ==\n", allTests[i].name);
+#else
+        printf("\033[0;34m\n== %s ==\n\033[0;0m", allTests[i].name);
+#endif
+        (*(allTests[i].func))();
+    }
+
+#ifdef _WIN32
+    if (logHandle != NULL)
+    {
+        CloseHandle(logHandle);
+        DeleteFile(LOGFILE_NAME);
+    }
+#else
+    remove(LOGFILE_NAME);
+#endif
+
+    // Shutdown servers that are still running likely due to failed test
+    {
+        natsHashIter iter;
+        int64_t      key;
+
+        natsMutex_Lock(slMu);
+        natsHashIter_Init(&iter, slMap);
+
+        while (natsHashIter_Next(&iter, &key, NULL))
+            _stopServer((natsPid) key);
+
+        natsHash_Destroy(slMap);
+        natsMutex_Destroy(slMu);
+    }
+
+    // Makes valgrind happy
+    nats_CloseAndWait((failed ? 1 : 2000));
+
+    if (failed)
+    {
+        printf("*** TEST FAILED ***\n");
+        return 1;
+    }
+
+    printf("ALL PASSED\n");
+    return 0;
+}
diff --git a/test/tls.conf b/test/tls.conf
new file mode 100644 (file)
index 0000000..7017966
--- /dev/null
@@ -0,0 +1,15 @@
+
+# Simple TLS config file
+
+port: 4443
+net: "0.0.0.0"
+
+tls {
+  # Server cert
+  cert_file: "certs/server-cert.pem"
+  # Server private key
+  key_file:  "certs/server-key.pem"
+  # Increase timeout for valgrind tests
+  timeout: 2
+}
+
diff --git a/test/tls_default_port.conf b/test/tls_default_port.conf
new file mode 100644 (file)
index 0000000..5ace4fb
--- /dev/null
@@ -0,0 +1,15 @@
+
+# Simple TLS config file
+
+port: 4222
+net: "0.0.0.0"
+
+tls {
+  # Server cert
+  cert_file: "certs/server-cert.pem"
+  # Server private key
+  key_file:  "certs/server-key.pem"
+  # Increase timeout for valgrind tests
+  timeout: 2
+}
+
diff --git a/test/tlsverify.conf b/test/tlsverify.conf
new file mode 100644 (file)
index 0000000..1f839db
--- /dev/null
@@ -0,0 +1,19 @@
+
+# Simple TLS config file
+
+port: 4443
+net: "0.0.0.0"
+
+tls {
+  # Server cert
+  cert_file: "certs/server-cert.pem"
+  # Server private key
+  key_file:  "certs/server-key.pem"
+  # Verify client certs
+  verify: true
+  # Server verifies client certificate, so need a CA
+  ca_file: "certs/ca.pem"
+  # Increase timeout for valgrind tests
+  timeout: 2
+}
+